/* How it works (/demo): THE OTHER SHIFT. The homepage's marker-line world, alive: one shop, the owner and their
   double, then the same day in two realities. Drawn by how-it-works.js. Night ground, steel line, Forge only where
   Silent Ratchet acts or a person is needed. Type follows the approved system (13992e2). */

.os-page { overflow-x: clip; }

/* Copy ------------------------------------------------------------------------------------------------- */
.os { padding-block: clamp(2.5rem, 7vh, 4.5rem) clamp(3rem, 8vh, 5rem); }
.os-frame { display: grid; gap: clamp(2rem, 5vh, 3rem); }
.os-copy { display: grid; gap: 2rem; }
.os-k { margin-bottom: 1rem; color: var(--muted); }
.os-beat h1, .os-beat h2 {
  font-family: var(--serif); font-weight: 360; font-optical-sizing: none; font-variation-settings: "opsz" 44;
  letter-spacing: -0.016em; line-height: 1.06; color: var(--paper); text-wrap: balance;
}
.os-beat h1, .os-beat h2 { font-size: clamp(1.875rem, 1rem + 2.1vw, 3rem); }
.os-beat p:not(.eyebrow) { margin-top: 0.75rem; max-width: 30rem; font-size: clamp(1.0625rem, 1rem + 0.2vw, 1.1875rem); line-height: 1.55; color: var(--text); text-wrap: pretty; }

/* The scene -------------------------------------------------------------------------------------------- */
.os-scene { position: relative; margin: 0; }
.os-rows { display: none; gap: clamp(0.75rem, 2vh, 1.25rem); }
.os-ready .os-rows { display: grid; }
.os-ready .os-still { display: none; }
.os-still { display: block; width: 100%; height: auto; border-radius: 16px; }
.os-row { position: relative; border: 1px solid #222327; border-radius: 18px; background: radial-gradient(120% 95% at 55% 45%, #15161A, #0F1012 75%); overflow: hidden; transition: none; }
.os-row[data-row="b"] { border-color: #3A2A22; }
.os-row-k {
  position: absolute; left: 1rem; top: 0.75rem; z-index: 2; display: flex; align-items: center; gap: 0.5rem;
  font-family: var(--sans); font-size: 0.75rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted);
}
.os-row[data-row="b"] .os-row-k { color: var(--steel); }
.os-row-k { padding: 0.125rem 0.5rem 0.125rem 0.375rem; margin-left: -0.375rem; border-radius: 6px; background: #121316; }
.os-row-mark { display: inline-block; width: var(--sprag-w); height: 0.875rem; background: var(--forge-bright); transform: skewX(-30deg); }
.os-live .os-row[data-row="a"] .os-row-k { opacity: var(--split, 1); }
.os-svg { display: block; width: 100%; height: 100%; overflow: visible; }

/* the drawing: people in the homepage's confident marker line; the room quieter and thinner behind them, so the
   eye goes to the people. Forge only where Silent Ratchet acts or a person is needed. */
.os-svg .pl { fill: none; stroke: #E6E2DA; stroke-width: 3.1; stroke-linecap: round; stroke-linejoin: round; }
.os-svg .pl.thin { stroke-width: 2.1; }
.os-svg .pl.hair { stroke-width: 1.5; stroke: #BDB9B1; }
.os-svg .pf { fill: #121316; stroke: #E6E2DA; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.os-svg .inkfill { fill: #E6E2DA; stroke: #E6E2DA; stroke-width: 2.4; stroke-linejoin: round; }
.os-svg .groundline { stroke: #121316; stroke-width: 1.6; }
.os-svg .ink { fill: #E6E2DA; }
.os-svg .ink.dim { fill: #BDB9B1; }
.os-svg .ground { fill: #121316; }
.os-svg .tube-o { fill: none; stroke: #E6E2DA; stroke-linecap: round; stroke-linejoin: round; }
.os-svg .tube-i { fill: none; stroke: #121316; stroke-linecap: round; stroke-linejoin: round; }
.os-svg .bub { fill: #16171B; stroke: #8F8B84; stroke-width: 1.6; stroke-linejoin: round; }
.os-svg .accent-l { fill: none; stroke: var(--forge-bright); stroke-width: 3; stroke-linecap: round; }
.os-svg .accent-f { fill: var(--forge-bright); }
.os-svg .env { fill: none; stroke: #8E8A83; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.os-svg .env.thin { stroke: #6D6A65; stroke-width: 1.8; }
.os-svg .env.steam { stroke: #6D6A65; stroke-width: 1.4; }
.os-svg .note-f { fill: #1C1D21; }
.os-svg .os-slot.lit { stroke: var(--paper); stroke-width: 2.4; }
/* the managed board keeps each request's state: open (lit), done (quiet, its bullet a check), unconfirmed (Forge) */
.os-svg .os-slot.done { stroke: #8E8A83; stroke-width: 2.1; }
.os-svg .os-slot.alert { stroke: var(--forge-bright); stroke-width: 2.4; }
.os-svg .os-check { fill: none; stroke: var(--paper); stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; opacity: 0; }
.os-svg .os-cord { fill: none; stroke: var(--forge-bright); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; opacity: 0.9; }
.os-svg .os-cord.thin { stroke-width: 1.8; opacity: 0.85; }
.os-svg .os-catch { fill: none; stroke: var(--forge-bright); stroke-width: 3; stroke-linecap: round; }
.os-svg .os-tag { fill: #17181C; stroke: #E6E2DA; stroke-width: 1.6; stroke-linejoin: round; stroke-linecap: round; }
.os-svg .os-tag.esc { stroke: var(--forge-bright); stroke-width: 2; }
.os-svg .os-tag.done { stroke: #E6E2DA; }
.os-svg .os-msg { fill: #17181C; stroke: var(--forge-bright); stroke-width: 1.6; stroke-linejoin: round; }
.os-svg .os-sign { font-family: var(--sans); font-size: 10px; font-weight: 700; letter-spacing: 0.16em; fill: #8E8A83; }
.os-svg .os-board { font-family: var(--sans); font-size: 13px; font-weight: 700; letter-spacing: 0.24em; fill: #8E8A83; }

/* request labels: small and quiet, a hint of a game's annotation; never louder than the people */
.os-labels { position: absolute; inset: 0; pointer-events: none; }
.os-label[hidden] { display: none; }
.os-label {
  position: absolute; left: 0; top: 0; display: inline-flex; align-items: center; gap: 0.3125rem; padding: 0.125rem 0.4375rem 0.125rem 0.375rem;
  border: 1px solid rgba(236, 233, 226, 0.16); border-radius: 999px; background: rgba(15, 16, 18, 0.8);
  font-family: var(--sans); font-stretch: 104%; font-size: 0.625rem; font-weight: 600; letter-spacing: 0.1em; line-height: 1.3; white-space: nowrap; color: #D9D5CD;
}
.os-label i { width: 0.3125rem; height: 0.3125rem; border-radius: 50%; background: #BDB9B1; }
.os-label.ok i { background: var(--steel); }
.os-label.you { border-color: rgba(236, 233, 226, 0.4); color: #fff; font-size: 0.6875rem; padding: 0.1875rem 0.5rem 0.1875rem 0.4375rem; }
.os-label.you i { background: #fff; }
.os-label.alert { border-color: rgba(242, 96, 28, 0.6); color: #fff; box-shadow: 0 0 16px -6px rgba(242, 96, 28, 0.6); }
.os-label.alert i { background: var(--forge-bright); box-shadow: 0 0 6px rgba(242, 96, 28, 0.8); }
/* a message the customer receives (only where texting is set up): their words, in sentence case, a speech bubble
   whose square corner sits over the person reading it */
.os-label.msg {
  padding: 0.25rem 0.5625rem; border-color: rgba(242, 96, 28, 0.55); border-radius: 0.6875rem 0.6875rem 0.6875rem 0.1875rem; background: rgba(15, 16, 18, 0.94);
  font-stretch: 100%; font-size: 0.6875rem; font-weight: 500; letter-spacing: 0.005em; color: #F1EEE8;
}
.os-label.msg i { display: none; }
.os-live.os-tall .os-label.msg { padding: 0.1875rem 0.4375rem; font-size: 0.625rem; }

.os-note { margin-top: 0.625rem; font-family: var(--sans); font-size: 0.8125rem; line-height: 1.4; color: var(--muted); }
.os-pause {
  justify-self: end; padding: 0.375rem 0.75rem; border: 1px solid #34353A; border-radius: 999px; background: transparent;
  font-family: var(--sans); font-size: 0.75rem; font-weight: 600; letter-spacing: 0.08em; color: var(--text); cursor: pointer;
}
.os-pause:hover, .os-pause:focus-visible { color: #fff; border-color: var(--line-strong); }

/* Desktop: the copy beside the shops */
@media (min-width: 64em) {
  .os-frame { grid-template-columns: minmax(0, 3.4fr) minmax(0, 8.6fr); align-items: center; column-gap: clamp(2rem, 3.5vw, 3.5rem); }
  .os-pause { grid-column: 2; }
}

/* Live: pinned under the header, scrubbed by scroll ---------------------------------------------------- */
.os-live { padding-block: 0; }
.os-live .os-track { position: relative; height: var(--track, 560vh); }
.os-live .os-sticky { position: sticky; top: var(--hh); height: calc(100vh - var(--hh)); height: calc(100svh - var(--hh)); overflow: hidden; display: flex; align-items: center; }
.os-live .os-frame { width: 100%; row-gap: 1rem; }
.os-live .os-copy { display: grid; }
.os-live .os-copy > * { grid-area: 1 / 1; align-self: center; }
.os-live .os-note { margin-top: 0.5rem; font-size: 0.75rem; text-align: right; }
.os-live .os-scene { padding-bottom: 0; }
.os-live .os-rows { position: relative; display: block; }
.os-live .os-row { position: absolute; left: 0; right: 0; }
.os-live .os-canvas { aspect-ratio: auto !important; }
.os-live.os-tall .os-copy { min-height: 9.5rem; align-content: end; }
.os-live.os-tall .os-beat h1, .os-live.os-tall .os-beat h2 { font-size: clamp(1.625rem, 1.2rem + 2vw, 2rem); }
.os-live.os-tall .os-beat p:not(.eyebrow) { margin-top: 0.375rem; font-size: 0.9375rem; line-height: 1.42; }
.os-live.os-tall .os-caption { right: 0.75rem; top: 0.625rem; font-size: 1rem; }
.os-live.os-tall .os-k { margin-bottom: 0.5rem; }
.os-live.os-tall .os-frame { row-gap: 0.75rem; }

/* What you're paying for ----------------------------------------------------------------------------- */
.os-split { padding-block: clamp(3.5rem, 10vh, 6rem); border-top: 1px solid var(--line); }
.os-split .eyebrow { margin-bottom: 1rem; color: var(--muted); }
.os-split h2, .os-setup h2 {
  font-family: var(--serif); font-weight: 360; font-optical-sizing: none; font-variation-settings: "opsz" 40;
  letter-spacing: -0.014em; line-height: 1.08; color: var(--paper); text-wrap: balance;
}
.os-split h2 { max-width: 14em; font-size: clamp(2rem, 1.15rem + 2.8vw, 3.75rem); }
.os-cols { display: grid; gap: 2rem clamp(2rem, 5vw, 5rem); margin-top: clamp(2rem, 5vh, 3rem); }
@media (min-width: 48em) { .os-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.os-col { padding-top: 1.25rem; border-top: 1px solid #34353A; }
.os-col-sr { border-top-color: var(--forge-bright); }
.os-col h3 { font-family: var(--sans); font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.os-col-sr h3 { color: var(--steel); }
.os-col ul { display: grid; gap: 0.75rem; margin-top: 1rem; }
.os-col li { position: relative; padding-left: 1.25rem; font-size: clamp(1.0625rem, 1rem + 0.3vw, 1.25rem); line-height: 1.5; color: var(--paper); }
.os-col li::before { content: ""; position: absolute; left: 0.125rem; top: 0.7em; width: 0.4375rem; height: 1px; background: var(--muted); }
.os-col-sr li::before { background: var(--forge-bright); height: 2px; }

.os-setup { padding-block: clamp(2.5rem, 7vh, 4rem); border-top: 1px solid var(--line); }
.os-setup-in { display: grid; gap: 1.75rem 3rem; align-items: center; }
@media (min-width: 60em) { .os-setup-in { grid-template-columns: minmax(0, 1fr) auto; } }
.os-setup h2 { font-size: clamp(1.75rem, 1.15rem + 1.8vw, 2.75rem); }
.os-setup p { margin-top: 0.875rem; max-width: 40rem; font-size: clamp(1.0625rem, 1rem + 0.3vw, 1.25rem); line-height: 1.6; color: var(--text); text-wrap: pretty; }
.os-setup p strong { font-weight: 700; color: var(--paper); }
.os-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; margin-top: 0; }
/* the reveal's caption, drawn into the scene; hidden without the live stage */
.os-caption { display: none; }
.os-live .os-caption {
  display: block; position: absolute; right: 1.25rem; top: 1rem; z-index: 2; margin: 0;
  font-family: var(--serif); font-weight: 400; font-size: clamp(1.125rem, 0.9rem + 0.7vw, 1.5rem); line-height: 1.2; color: var(--paper); opacity: 0;
  padding: 0.125rem 0.5rem; margin-right: -0.5rem; border-radius: 6px; background: #121316;
}
.os-setup .eyebrow { margin-bottom: 1rem; color: var(--muted); }
.os-setup p + p { margin-top: 0.625rem; }
/* the shop titles stay on one line, a size smaller on phones, so they never run into a label */
.os-row-k { white-space: nowrap; }
@media (max-width: 47.49em) { .os-row-k { left: 0.75rem; top: 0.5rem; font-size: 0.6875rem; letter-spacing: 0.09em; } }

/* Design system alignment (Oct 22, desktop polish): the shared scale from styles.css. "What you're paying for"
   becomes the page's Paper band (the dark story, a light explanation, the dark close); the closing headline takes
   the shared closing size, and its label the shared eyebrow (a paragraph rule had been enlarging it). */
.os-split.paper { padding-block: var(--sp-section); border-top: 0; }
.os-split.paper h2 { font-size: var(--t-section); font-weight: 340; color: var(--ink); }
.os-split.paper .os-col { border-top-color: var(--line-strong); }
.os-split.paper .os-col-sr { border-top-color: var(--forge-bright); }
.os-split.paper .os-col h3 { color: var(--muted); }
.os-split.paper .os-col-sr h3 { color: var(--ink); }
.os-split.paper .os-col li { color: var(--text); }
.os-split.paper .os-col li::before { background: var(--line-strong); }
.os-split.paper .os-col-sr li::before { background: var(--forge-bright); }

.os-setup { padding-block: var(--sp-close); border-top: 0; }
.os-setup h2 { font-size: var(--t-close); }
.os-setup .eyebrow { margin-top: 0; max-width: none; font-size: 0.8125rem; line-height: 1.4; }

/* Design finish (Oct 23, issue #3): a page-specific rhythm rather than the same dark-light-dark on every page. How It
   Works is two acts: the dark story, then one light chapter (what you're paying for, then getting started) that
   runs into the footer. A hairline on the content width separates the two parts of the chapter. */
.os-setup.paper {
  padding-block: clamp(2.75rem, 7vh, 4.25rem) var(--sp-section);
  background: linear-gradient(var(--line), var(--line)) top center / calc(min(100%, var(--page-max) + 2 * var(--gutter)) - 2 * var(--gutter)) 1px no-repeat, var(--paper);
}
.os-split.paper { padding-bottom: clamp(2.75rem, 7vh, 4.25rem); }
.os-setup.paper h2 { font-weight: 340; color: var(--ink); }
.os-setup.paper p { color: var(--text); }
.os-setup.paper p strong { color: var(--ink); }

/* Mobile pass (Oct 24, RC3). A phone gets the same story, composed for a phone rather than shrunk from the desktop.
   Live: the copy has a slot as tall as its longest beat, directly under the header; both shops share the rest of the
   screen (the script narrows them to fit rather than dropping the story); pause is a round control in the scene's
   corner; the disclaimer reads after the story. Still (reduced motion, or a screen too short to pin): the picture
   arrives with the words that introduce it, "Same business. Same customers. Same day.", not after the whole story. */
.os-pause { min-height: 2.5rem; padding-inline: 1rem; }
.os-note-after { display: none; }
.os-live.os-tall .os-sticky { align-items: flex-start; padding-top: 0.75rem; }
.os-live.os-tall .os-copy { min-height: 0; align-content: start; }
.os-live.os-tall .os-beat h1, .os-live.os-tall .os-beat h2 { font-size: clamp(1.5rem, 1.1rem + 1.9vw, 1.875rem); line-height: 1.08; }
.os-live.os-tall .os-beat p:not(.eyebrow) { margin-top: 0.4375rem; font-size: 0.9375rem; line-height: 1.45; }
.os-live.os-tall .os-k { margin-bottom: 0.375rem; }
.os-live.os-tall .os-frame { position: relative; row-gap: 0.875rem; }
.os-live.os-tall .os-rows { margin-inline: auto; }
.os-live.os-tall .os-scene .os-note {
  position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.os-live.os-tall .os-note-after { display: block; margin-top: 0; text-align: left; padding-block: 1rem 0; font-size: 0.75rem; }
.os-live.os-tall .os-pause {
  position: absolute; right: calc(var(--gutter) + 0.375rem); bottom: 0.375rem; z-index: 3;
  width: 2.75rem; height: 2.75rem; min-height: 0; padding: 0; border-color: #3A3B40; border-radius: 50%;
  background: rgba(15, 16, 18, 0.86); font-size: 0; display: grid; place-items: center;
}
.os-live.os-tall .os-pause[hidden] { display: none; }
.os-live.os-tall .os-pause::before {   /* two bars: pause */
  content: ""; width: 0.625rem; height: 0.75rem;
  background: linear-gradient(90deg, currentColor 0 35%, transparent 35% 65%, currentColor 65%);
}
.os-live.os-tall .os-pause[aria-pressed="true"]::before {   /* a triangle: play */
  width: 0; height: 0; background: none; margin-left: 0.1875rem;
  border-style: solid; border-width: 0.4375rem 0 0.4375rem 0.6875rem; border-color: transparent transparent transparent currentColor;
}
@media (max-width: 63.99em) {
  .os:not(.os-live) .os-copy { display: contents; }
  .os:not(.os-live) .os-beat[data-beat="3"], .os:not(.os-live) .os-beat[data-beat="4"] { order: 2; }
  .os:not(.os-live) .os-scene { order: 1; }
  .os:not(.os-live) .os-pause { order: 1; }
}
