/* =============================================================================
   sections.css · swaysalyedweb starter kit
   Styles every starter section, one banner each, in DOM order: P1 hero and
   P10 finale (js/product.js), P2 exploded internals (js/component.js), and
   P3 statement, P4 rail, P6 numeral fill, P9 finish picker (js/sections.js).
   Uses the token names from css/tokens.css (--void, --paper, --graphite,
   --text-dark, --muted-dark, --text-light, --muted-light, --hair-dark,
   --hair-light, --accent, --font-*, --step-*, --display-*, --space-*, --ease-*,
   --dur-*, --gutter, --nav-h) and the shared components from css/base.css
   (.eyebrow .mono .caption .seg .toggle .btn .swatch).

   Rules this file follows (and your own sections should too):
   - A pinned section is a 100svh stage with overflow:hidden; GSAP pins it.
   - Anything JS animates FROM a hidden state is hidden only under html.js,
     so the page still reads as a document when scripts fail.
   - Colour roles (--fg, --fg-muted, --hair, --bg) are per section, so a
     section can flip light/dark with one class (.is-dark, [data-tone]).
   - Copy that sits over a canvas gets a radial scrim (::before) so it is
     legible over any frame of the animation, not just the one you checked.
   Breakpoints: <=420 (small phone), <=768 (APP.isMobile), <=1280, >=1920.
   ========================================================================== */

/* Pinned stages owned here. The rail sets its own height (it stacks on phones). */
.hero,.fill,.finish,.finale{height:100vh;height:100svh;overflow:hidden}

/* =============================================================================
   P1 · Product hero (transparent over the fixed stage; product.js pins + scrubs it)
   The product is framed low (product.js REST.frameY .19), so the copy owns the
   top band: that band is the text safe area. Never let copy sit on the product.
   ========================================================================== */
.hero{color:var(--text-dark)}
/* Film bars: product.js scales them 0 → 1 while the light sweeps, and back to 0 in the dive. */
.hero__letterbox{
  position:absolute;left:0;right:0;height:48px;background:var(--black);z-index:var(--z-section-ui);
  transform:scaleY(0);will-change:transform;pointer-events:none;
}
.hero__letterbox--top{top:0;transform-origin:50% 0}
.hero__letterbox--bottom{bottom:0;transform-origin:50% 100%}
html.is-reduced .hero__letterbox,html:not(.js) .hero__letterbox{display:none}
.hero__copy{
  position:absolute;left:0;right:0;top:calc(var(--nav-h) + clamp(24px,5.5vh,80px));z-index:2;
  padding-inline:var(--gutter);text-align:center;pointer-events:none;
}
.hero__eyebrow{margin-bottom:var(--space-4);color:var(--muted-dark)}
.hero__title{
  font-size:var(--display-2);line-height:var(--lh-display);letter-spacing:-.035em;font-weight:var(--w-display);
  color:var(--text-dark);padding-bottom:.06em;
}
/* The light on the letters: a mask highlight whose centre (--sweep) product.js scrubs 0% → 100%
   with the 3D sweep light (CONFIG.heroDom.sweep). 50% at rest reads as an evenly lit title. */
html.js:not(.is-reduced) .hero__title[data-product-sweep]{
  --sweep:50%;
  -webkit-mask-image:linear-gradient(100deg,rgb(0 0 0 / .68) calc(var(--sweep) - 32%),#000 var(--sweep),rgb(0 0 0 / .68) calc(var(--sweep) + 32%));
          mask-image:linear-gradient(100deg,rgb(0 0 0 / .68) calc(var(--sweep) - 32%),#000 var(--sweep),rgb(0 0 0 / .68) calc(var(--sweep) + 32%));
}
/* Hold to peek: a glass pill above the scroll cue, in the left gutter (never on the product).
   Holding blends product.js CONFIG.hold.set in. */
.hero__hold{
  position:absolute;left:var(--gutter);bottom:calc(clamp(28px,6vh,64px) + 56px);z-index:3;
  display:inline-flex;align-items:center;gap:var(--space-3);min-height:44px;padding:0 var(--space-5) 0 var(--space-4);
  border-radius:var(--r-pill);border:1px solid var(--hair-dark);
  background:color-mix(in srgb,var(--space-shade) 45%,transparent);-webkit-backdrop-filter:blur(14px) saturate(1.3);backdrop-filter:blur(14px) saturate(1.3);
  font-size:var(--step--1);font-weight:500;color:var(--text-dark);letter-spacing:-.005em;
  transition:border-color var(--dur-hover) var(--ease-hover),background-color var(--dur-hover) var(--ease-hover);
  user-select:none;-webkit-user-select:none;touch-action:manipulation;
}
.hero__hold::before{
  content:"";width:8px;height:8px;border-radius:50%;flex:none;background:var(--text-dark);
  box-shadow:0 0 0 4px rgb(245 245 247 / .12);animation:hold-pulse 2.4s var(--ease-state) infinite;
}
.hero__hold:hover{border-color:rgb(236 238 242 / .34)}
.hero__hold[aria-pressed="true"]::before{animation:none;transform:scale(.7)}
@keyframes hold-pulse{0%,100%{box-shadow:0 0 0 3px rgb(245 245 247 / .14)}50%{box-shadow:0 0 0 7px rgb(245 245 247 / 0)}}
html.is-reduced .hero__hold,html.is-touch .hero__hold,html.no-webgl .hero__hold,html:not(.js) .hero__hold{display:none}
.hero__sub{
  max-width:34ch;margin:var(--space-5) auto 0;font-size:var(--step-1);line-height:1.38;color:var(--muted-dark);letter-spacing:-.012em;
}
.hero__cue,.hero__note{
  position:absolute;bottom:clamp(28px,6vh,64px);z-index:3;min-height:44px;
  display:flex;align-items:center;gap:var(--space-3);text-transform:uppercase;color:var(--muted-dark);
}
.hero__cue{left:var(--gutter)}
.hero__note{right:var(--gutter)}
.hero__cue-line{position:relative;display:block;width:56px;height:1px;background:var(--hair-dark);overflow:hidden}
.hero__cue-line::after{
  content:"";position:absolute;inset:0;background:var(--text-dark);transform:translateX(-100%);
  animation:cue-run 2.2s var(--ease-state) infinite;
}
@keyframes cue-run{0%{transform:translateX(-100%)}55%{transform:translateX(0)}100%{transform:translateX(100%)}}
html.is-reduced .hero__cue-line::after{animation:none;transform:none}

/* In-stage headings: smaller than a free-flowing section H2, so the stage breathes. */
.fill__copy h2,.finish__copy h2{
  font-size:clamp(1.75rem,1.1rem + 2.1vw,3.25rem);line-height:1.02;letter-spacing:-.03em;
}

/* =============================================================================
   P3 · Kinetic statement (void)
   ========================================================================== */
.statement{
  --fg:var(--text-dark);--fg-muted:var(--muted-dark);--hair:var(--hair-dark);--bg:var(--void);
  background:var(--bg);color:var(--fg);
  min-height:100vh;min-height:100svh;
  padding:var(--pad-airy) var(--gutter);
  display:grid;grid-template-columns:repeat(12,minmax(0,1fr));column-gap:var(--space-6);align-content:center;
}
/* Hand-off variant: slides up under the hero's last (empty) screen, so the sentence the
   dive lands on is revealed in place as the stage fades, not after a screen of black. */
html.js:not(.is-reduced) .statement--overlap{margin-top:-100vh;margin-top:-100svh;background:transparent}
.statement > .eyebrow{grid-column:1 / -1;text-align:center;margin-bottom:var(--space-5)}
.statement__lead{
  grid-column:1 / -1;justify-self:center;text-align:center;max-width:16ch;
  font-size:var(--display-1);line-height:var(--lh-display);letter-spacing:-.03em;
  margin-bottom:clamp(72px,14vh,168px);
}
.statement__body{
  grid-column:2 / span 7;max-width:30ch;
  font-family:var(--font-display);font-size:var(--step-3);font-weight:500;line-height:1.24;letter-spacing:-.022em;
  color:var(--fg);
}
.statement__body .word{will-change:opacity}
/* Gloss: a quiet dotted rule at rest, a solid underline sweeps in on hover/focus/open. */
.gloss{
  display:inline;padding:0 0 .08em;margin:0;font:inherit;letter-spacing:inherit;color:inherit;text-align:inherit;line-height:inherit;
  border-radius:2px;cursor:help;
  background-image:linear-gradient(currentColor,currentColor),radial-gradient(circle,color-mix(in srgb,currentColor 55%,transparent) .9px,transparent 1.3px);
  background-repeat:no-repeat,repeat-x;background-position:0 100%,0 100%;background-size:0% 1.5px,5px 3px;
  transition:background-size var(--dur-sweep) var(--ease-reveal);
}
.gloss:hover,.gloss:focus-visible,.gloss[aria-expanded="true"]{background-size:100% 1.5px,5px 3px}
.gloss:focus-visible{box-shadow:var(--focus);border-radius:var(--r-tag)}
.statement__notes{
  grid-column:10 / span 3;align-self:end;min-height:7.5em;
  font-size:var(--step--1);line-height:1.55;letter-spacing:.01em;color:var(--fg);
}
.statement__notes p{padding-top:var(--space-4);border-top:1px solid var(--hair);max-width:28ch}
.statement__notes p:not([hidden]){animation:note-in var(--dur-hover) var(--ease-hover)}
@keyframes note-in{from{opacity:0;transform:translateY(6px)}}
html:not(.js) .statement__notes p[hidden]{display:block!important;margin-bottom:var(--space-4)}

/* =============================================================================
   P2 · Exploded internals + multi-stop zoom (die surface; component.js pins it)
   Layers back to front: WebGL stack → 2D floorplan → SVG leaders → labels →
   copy steps → HUD. Copy column left, HUD right, the subject in the free frame
   between them (component.js measures both). Never let copy sit on the subject.
   ========================================================================== */
.component{height:100vh;height:100svh;overflow:hidden;background:var(--die);color:var(--text-dark);
  --fg:var(--text-dark);--fg-muted:var(--muted-dark);--hair:var(--hair-dark);--bg:var(--die)}
.component__stage{position:absolute;inset:0;z-index:0}
.component__gl,.component__die{position:absolute;inset:0;width:100%;height:100%;touch-action:pan-y}
.component__gl{pointer-events:none}
.component__leaders{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;overflow:visible}
.component__leaders polyline{fill:none;stroke:rgb(236 238 242 / .42);stroke-width:1;vector-effect:non-scaling-stroke}
.component__leaders circle{fill:var(--text-dark)}
.component__labels{position:absolute;inset:0;pointer-events:none}
.component__label{
  position:absolute;left:0;top:0;transform:translate3d(var(--x,0px),var(--y,0px),0);
  padding:5px 10px;border:1px solid var(--hair-dark);border-radius:var(--r-tag);
  background:rgb(11 13 16 / .72);-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);
  text-transform:uppercase;white-space:nowrap;color:var(--text-dark);
  opacity:0;transition:opacity var(--dur-state) var(--ease-reveal);
}
.component__label.is-visible{opacity:1}
.component__tip{
  position:absolute;left:0;top:0;z-index:4;pointer-events:none;transform:translate3d(var(--x,0px),var(--y,0px),0);
  display:grid;gap:var(--space-1);min-width:180px;max-width:260px;padding:var(--space-3) var(--space-4);
  border:1px solid var(--die-line);border-radius:var(--r-control);
  background:rgb(11 13 16 / .9);-webkit-backdrop-filter:blur(12px);backdrop-filter:blur(12px);
  box-shadow:0 18px 40px rgb(0 0 0 / .45);animation:note-in var(--dur-hover) var(--ease-hover);
}
.component__tip strong{font-family:var(--font-display);font-size:var(--step--1);font-weight:600;letter-spacing:-.01em}
.component__tip span{font-size:var(--step--1);color:var(--muted-dark);line-height:1.4}
.component__copy{position:absolute;left:var(--gutter);top:50%;transform:translateY(-50%);z-index:2;width:min(26rem,34vw);display:grid}
/* scrims: copy and HUD stay legible over any frame of the animation */
.component__copy::before,.component__hud::before{
  content:"";position:absolute;z-index:-1;pointer-events:none;
  background:radial-gradient(closest-side,rgb(11 13 16 / .8),rgb(11 13 16 / .58) 52%,rgb(11 13 16 / 0));
}
.component__copy::before{inset:-140px -180px -140px calc(-1 * var(--gutter) - 160px)}
.component__hud::before{inset:-40px calc(-1 * var(--gutter) - 60px) -40px -120px}
.component__step{grid-area:1 / 1;align-self:center}
.component__step h2{font-size:clamp(1.75rem,1.1rem + 2.1vw,3.25rem);line-height:1.02;letter-spacing:-.03em;margin-bottom:var(--space-5)}
.component__step p{color:var(--muted-dark);max-width:var(--measure)}
.component__step .eyebrow{margin-bottom:var(--space-4)}
.component__stats{display:grid;grid-template-columns:1fr 1fr;gap:0 var(--space-5);margin-top:var(--space-5)}
.component__stats li{padding:var(--space-3) 0;border-top:1px solid var(--hair-dark);text-transform:uppercase;color:var(--text-dark)}
html.js .component__step{opacity:0;pointer-events:none;transition:opacity var(--dur-hover) var(--ease-hover)}
html.js .component__step.is-active{opacity:1;pointer-events:auto}
.component__hud{
  position:absolute;right:var(--gutter);top:calc(var(--nav-h) + var(--space-7));bottom:clamp(32px,7vh,72px);z-index:3;
  display:flex;flex-direction:column;align-items:flex-end;text-align:right;width:max-content;min-width:160px;
}
.component__hud-label{text-transform:uppercase;color:var(--muted-dark);min-height:1.5em}
.component__zoom{
  font-family:var(--font-display);font-size:clamp(2.25rem,1.6rem + 2vw,3.75rem);font-weight:500;letter-spacing:-.03em;line-height:1;
  font-variant-numeric:tabular-nums;color:var(--text-dark);margin-top:var(--space-2);
}
.component__stops{margin-block:auto;display:grid;gap:2px;justify-items:end;counter-reset:stop}
.component__stops li{counter-increment:stop}
.component__stops button{
  position:relative;display:inline-flex;align-items:center;gap:var(--space-3);min-height:30px;padding:0 0 0 var(--space-3);
  font-family:var(--font-mono);font-size:var(--step--2);letter-spacing:var(--track-mono);text-transform:uppercase;white-space:nowrap;
  color:var(--muted-dark);transition:color var(--dur-hover) var(--ease-hover);
}
.component__stops button::before{content:"0" counter(stop);opacity:.5;font-variant-numeric:tabular-nums}
.component__stops button::after{
  content:"";width:16px;height:1px;background:currentColor;opacity:.5;
  transition:width var(--dur-state) var(--ease-reveal),background-color var(--dur-hover) var(--ease-hover),opacity var(--dur-hover);
}
.component__stops button:hover,.component__stops button[aria-current="step"]{color:var(--text-dark)}
/* accent budget: the active stop's rule is one of its six uses */
.component__stops button[aria-current="step"]::after{width:36px;background:var(--accent);opacity:1}
.component__stops button:focus-visible{border-radius:var(--r-tag)}
.component__hud .caption{max-width:22ch;font-size:12px;color:var(--muted-dark);opacity:.8}
.component__stepper{
  position:absolute;left:50%;bottom:clamp(32px,7vh,72px);transform:translateX(-50%);z-index:4;
  display:inline-flex;gap:var(--space-2);padding:3px;border-radius:var(--r-pill);border:1px solid var(--hair-dark);
  background:rgb(11 13 16 / .6);-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);
}
.component__stepper button{min-height:40px;padding:0 var(--space-5);border-radius:var(--r-pill);font-size:var(--step--1);font-weight:500;color:var(--text-dark)}
.component__stepper button:hover{background:rgb(236 238 242 / .08)}
.component.no-gl .component__die{opacity:1!important;visibility:visible!important}
/* No JS: a plain illustrated list of the steps. */
html:not(.js) .component{height:auto;padding:var(--pad-airy) var(--gutter)}
html:not(.js) .component__stage,html:not(.js) .component__hud{display:none}
html:not(.js) .component__copy{position:static;transform:none;width:auto;max-width:44rem;gap:var(--space-9)}
html:not(.js) .component__step{grid-area:auto}

/* =============================================================================
   P4 · Numeral rail (graphite, horizontal pin)
   ========================================================================== */
.rail{
  --fg:var(--text-dark);--fg-muted:var(--muted-dark);--hair:var(--hair-dark);--bg:var(--graphite);
  background:var(--bg);color:var(--fg);
  height:100vh;height:100svh;overflow:hidden;
  display:flex;flex-direction:column;
}
.rail__head{
  padding:calc(var(--nav-h) + clamp(32px,7vh,72px)) var(--gutter) 0;
  display:grid;grid-template-columns:repeat(12,minmax(0,1fr));column-gap:var(--space-6);align-items:end;
}
.rail__head .eyebrow{grid-column:1 / -1}
.rail__head h2{grid-column:1 / span 7;font-size:var(--display-1);line-height:var(--lh-display);letter-spacing:-.035em}
.rail__head > p:last-child{grid-column:9 / span 4;justify-self:end;max-width:30ch;color:var(--fg-muted)}
.rail__viewport{position:relative;flex:1;min-height:0;display:flex;align-items:center;overflow:hidden;touch-action:pan-y;cursor:grab}
.rail__viewport:active{cursor:grabbing}
.rail__viewport:focus-visible{box-shadow:inset 0 0 0 2px var(--accent);border-radius:0}
.rail__track{display:flex;align-items:stretch;padding-inline:var(--gutter) 12vw;will-change:transform}
.rail__panel{
  position:relative;flex:0 0 clamp(520px,58vw,1040px);
  display:flex;flex-direction:column;justify-content:flex-end;
  min-height:min(58vh,560px);padding:var(--space-6) var(--space-8) var(--space-2) var(--space-7);
  border-left:1px solid var(--hair);
}
.rail__panel:first-child{border-left-color:transparent;padding-left:0}
/* Ghost word: outlined, huge, behind the numeral; parallaxes at ~0.5x. */
.rail__ghost{
  position:absolute;left:var(--space-7);top:0;z-index:-1;pointer-events:none;user-select:none;
  font-family:var(--font-display);font-size:calc(var(--display-4) * .72);font-weight:var(--w-mega);letter-spacing:var(--track-mega);line-height:.8;
  white-space:nowrap;color:transparent;-webkit-text-stroke:1px color-mix(in srgb,var(--fg) 10%,transparent);
  will-change:transform;
}
.rail__panel:first-child .rail__ghost{left:0}
.rail__num{
  display:flex;align-items:baseline;gap:.12em;
  font-family:var(--font-display);font-size:var(--display-4);font-weight:var(--w-mega);letter-spacing:var(--track-mega);line-height:.84;
  font-variant-numeric:tabular-nums;color:var(--fg);white-space:nowrap;
}
.rail__unit{font-size:clamp(1.5rem,1rem + 1.8vw,3rem);font-weight:500;letter-spacing:-.02em;color:var(--fg-muted);line-height:1}
.rail__label{margin-top:var(--space-6);padding-top:var(--space-3);border-top:1px solid var(--hair);max-width:34ch;text-transform:uppercase;color:var(--fg-muted)}
.rail__cap{margin-top:var(--space-3);max-width:30ch;font-size:var(--step-1);line-height:1.35;letter-spacing:-.012em;will-change:transform}
/* Odometer (built by sections.js): digit strips of blank + 0..9, static "." and separators. */
[data-odo]{display:inline-flex;align-items:flex-start;overflow:hidden;height:.86em;line-height:.86}
[data-odo] .odo__col{display:inline-block;height:.86em;overflow:hidden;position:relative}
[data-odo] .odo__strip{display:flex;flex-direction:column;will-change:transform}
[data-odo] .odo__strip > *{display:block;height:.86em;line-height:.86}
[data-odo] .odo__dot,[data-odo] .odo__sep{display:inline-block;line-height:.86}
/* Until its numeral rolls, a panel still shows the previous value: ghost it. */
html.js .rail__num [data-odo]{transition:opacity .6s var(--ease-reveal)}
html.js .rail__panel:not(.is-rolled) .rail__num [data-odo]{opacity:.16}
/* Stacked rail: phones, reduced motion and no-JS. */
@media (max-width:768px){
  .rail{height:auto;overflow:visible;overflow-x:clip;padding-bottom:var(--pad-dense)}
  .rail__head{display:block;padding-top:var(--pad-dense)}
  .rail__head h2{margin-bottom:var(--space-4)}
  .rail__head > p:last-child{justify-self:start}   /* block-level justify-self applies in block layout too */
  .rail__viewport{display:block;overflow:visible;cursor:auto}
  .rail__track{display:block;padding:var(--space-6) var(--gutter) 0;transform:none!important}
  .rail__panel{min-height:0;padding:var(--space-7) 0;border-left:0;border-top:1px solid var(--hair)}
  .rail__panel:first-child{border-top-color:var(--hair)}
  .rail__ghost{left:0;top:var(--space-5);font-size:26vw;transform:none!important}
  .rail__num{font-size:clamp(5.5rem,30vw,9rem)}
  .rail__cap{transform:none!important}
}
html.is-reduced .rail,html:not(.js) .rail{height:auto;overflow:visible;overflow-x:clip;padding-bottom:var(--pad-dense)}
html.is-reduced .rail__viewport,html:not(.js) .rail__viewport{display:block;overflow:visible;cursor:auto}
html.is-reduced .rail__track,html:not(.js) .rail__track{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,520px),1fr));padding:var(--space-7) var(--gutter) 0;transform:none!important}
html.is-reduced .rail__panel,html:not(.js) .rail__panel{min-height:0;padding:var(--space-7) var(--space-6) var(--space-7) 0;border-left:0;border-top:1px solid var(--hair)}
html.is-reduced .rail__panel:first-child,html:not(.js) .rail__panel:first-child{border-top-color:var(--hair)}
html.is-reduced .rail__ghost,html:not(.js) .rail__ghost,html.is-reduced .rail__cap{transform:none!important}

/* =============================================================================
   P6 · Numeral fill (backdrop canvas, 1.5 pin). Light text by day, dark by night.
   ========================================================================== */
.fill{
  --fg:var(--text-light);--fg-muted:var(--muted-light);--hair:var(--hair-light);--bg:var(--paper);
  --ink:var(--text-light);          /* the liquid */
  color:var(--fg);
  display:grid;
  grid-template-columns:minmax(0,30rem) minmax(0,1fr);
  grid-template-rows:auto auto auto 1fr auto auto;
  grid-template-areas:"copy num" "readout num" "mode num" ". num" "ticks ticks" "cap cap";
  column-gap:var(--space-8);
  padding:calc(var(--nav-h) + clamp(32px,7vh,80px)) var(--gutter) clamp(20px,4vh,40px);
  transition:color var(--dur-state) var(--ease-state);
}
.fill.is-dark{--fg:var(--text-dark);--fg-muted:var(--muted-dark);--hair:var(--hair-dark);--bg:var(--void);--ink:var(--silver)}
/* The backdrop passes through mid-tones at dusk and dawn, where stock muted greys drop under
   3:1. Muted copy is ink at reduced alpha instead, and the mode control carries its own glass. */
.fill{--fg-muted:rgb(29 29 31 / .74)}
.fill.is-dark{--fg-muted:rgb(236 238 242 / .76)}
.fill > .seg{background:color-mix(in srgb,var(--paper) 34%,transparent);transition:background-color var(--dur-state) var(--ease-state)}
.fill.is-dark > .seg{background:color-mix(in srgb,var(--void) 34%,transparent)}
.fill.is-low{--ink:var(--accent)}  /* accent budget: the level below 10% is one of its few uses */
.fill__sky{
  position:absolute;inset:0;width:100%;height:100%;z-index:-1;touch-action:pan-y;cursor:ew-resize;
  background:linear-gradient(180deg,var(--paper) 0%,var(--silver) 100%);
}
.fill__sky:focus-visible{box-shadow:inset 0 0 0 2px var(--accent);border-radius:0}
.fill__copy{grid-area:copy;position:relative;pointer-events:none}
.fill__copy h2{margin-bottom:var(--space-5);max-width:13ch}
.fill__copy p{max-width:var(--measure);color:var(--fg-muted);transition:color var(--dur-state) var(--ease-state)}
.fill .eyebrow{color:var(--fg-muted);transition:color var(--dur-state) var(--ease-state)}
.fill__readout{
  grid-area:readout;margin-top:var(--space-7);position:relative;pointer-events:none;
  font-family:var(--font-mono);font-size:clamp(1.75rem,1.2rem + 1.6vw,2.75rem);letter-spacing:.02em;line-height:1;
  font-variant-numeric:tabular-nums;color:var(--fg);
}
.fill__pct{grid-area:num;align-self:end;justify-self:end;position:relative;z-index:1;pointer-events:none;color:var(--fg-muted);font-variant-numeric:tabular-nums;text-transform:uppercase}
.fill > .seg{grid-area:mode;justify-self:start;align-self:start;margin-top:var(--space-5);position:relative}
.fill__numeral{
  grid-area:num;position:relative;justify-self:end;align-self:center;
  width:100%;height:100%;max-height:64vh;min-height:0;pointer-events:none;overflow:visible;
}
.fill__numeral text{font-family:var(--font-display);font-weight:800}
[data-fill-level],[data-fill-wave]{fill:var(--ink);transition:fill var(--dur-state) var(--ease-state)}
/* Outline = a 2.4-unit ring grown from the glyph alpha (feMorphology), so it never
   doubles up where strokes overlap the fill. */
.fill__outline{fill:var(--fg);filter:url(#fill-ring)}
.fill__ring-color{flood-color:var(--fg);transition:flood-color var(--dur-state) var(--ease-state)}
.fill__ticks{
  grid-area:ticks;position:relative;pointer-events:none;
  display:flex;justify-content:space-between;align-items:flex-start;
  margin-top:var(--space-5);padding-top:var(--space-2);border-top:1px solid var(--hair);
  font-size:10px;letter-spacing:.06em;color:var(--fg-muted);font-variant-numeric:tabular-nums;
  transition:border-color var(--dur-state) var(--ease-state),color var(--dur-state) var(--ease-state);
}
.fill__ticks > span{position:relative;flex:1 1 0;min-width:0;padding-top:var(--space-3);white-space:nowrap;text-indent:-.65em}
.fill__ticks > span::before{content:"";position:absolute;left:0;top:calc(-1 * var(--space-2) - 1px);width:1px;height:8px;background:currentColor;opacity:.6}
.fill__ticks > .is-major::before{height:14px;opacity:1}
.fill__ticks > .is-now{color:var(--fg)}
.fill__ticks > .is-occluded{color:transparent}              /* label hidden, tick kept */
.fill__ticks > .is-occluded::before{background:var(--fg-muted)}
.fill__ticks > .fill__end{position:absolute;top:var(--space-2);width:0;flex:none;text-indent:0;color:var(--fg)}
.fill__ticks > .fill__end::before{width:1.5px;height:22px;top:-15px;opacity:1}
.fill__end b{display:inline-block;font-weight:600;white-space:nowrap;background:transparent}
.fill > .caption{grid-area:cap;position:relative;margin-top:var(--space-4);font-size:12px;color:var(--fg-muted);pointer-events:none}
html.is-reduced .fill__sky{cursor:auto}
html:not(.js) .fill{height:auto;min-height:100svh}

/* =============================================================================
   P9 · Finish picker (transparent over the fixed product stage)
   ========================================================================== */
.finish{
  --fg:var(--text-dark);--fg-muted:var(--muted-dark);--hair:var(--hair-dark);--bg:var(--void);
  color:var(--fg);transition:color var(--dur-sweep) var(--ease-state);
}
.finish[data-tone="light"]{--fg:var(--text-light);--fg-muted:var(--muted-light);--hair:var(--hair-light);--bg:var(--paper)}
/* Giant finish name. It sits in the top band that the product pose leaves empty:
   check it never crosses the product (or its lit screen) at 1440x900 and 1920x1080. */
.finish__name{
  position:absolute;right:var(--gutter);top:calc(var(--nav-h) + clamp(16px,3.5vh,44px));z-index:1;
  text-align:right;white-space:nowrap;pointer-events:none;overflow:hidden;
  font-family:var(--font-display);font-size:clamp(3rem,6.2vw,var(--display-3));font-weight:var(--w-mega);letter-spacing:var(--track-mega);line-height:1;
  padding:0 .04em .1em;color:var(--fg);
  transition:color var(--dur-sweep) var(--ease-state);
}
.finish__name .char{display:inline-block;will-change:transform}
.finish__copy{position:absolute;z-index:3;left:var(--gutter);bottom:clamp(32px,7vh,72px);max-width:min(24rem,40vw);pointer-events:none}
.finish__copy h2{margin-bottom:var(--space-4)}
.finish__copy p{max-width:30ch;color:var(--fg-muted);transition:color var(--dur-sweep) var(--ease-state)}
.finish .eyebrow{transition:color var(--dur-sweep) var(--ease-state)}
.finish__hit{position:absolute;z-index:2;inset:24% 18% 18% 18%;touch-action:pan-y;cursor:grab;border-radius:var(--r-screen)}
.finish__hit:focus-visible{box-shadow:inset 0 0 0 2px var(--accent)}
.finish.is-dragging .finish__hit{cursor:grabbing}
.finish.is-dragging{user-select:none;-webkit-user-select:none}
.finish__controls{
  position:absolute;z-index:3;right:var(--gutter);bottom:clamp(32px,7vh,72px);
  display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:var(--space-3);
  /* never reach into the copy column: extra groups (wheels, band) wrap onto a second row instead */
  max-width:calc(100% - 2 * var(--gutter) - min(24rem,40vw) - var(--space-6));
}
/* Swatch chips (.swatch / .swatch__chip) are styled in base.css from style="--swatch:#hex"
   on each button: a lit sphere of the finish. Nothing product-specific lives here. */

/* =============================================================================
   P10 · Finale (transparent over the fixed stage; product.js pins + scrubs it)
   Copy bottom-left, credits roll on the right, the product rests in the centre
   spotlight, and the glow narrows to the hairline that becomes the footer rule.
   ========================================================================== */
.finale{
  --fg:var(--text-dark);--fg-muted:var(--muted-dark);--hair:var(--hair-dark);--bg:var(--void);
  color:var(--fg);
  display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);column-gap:var(--space-9);align-items:center;
  padding:var(--nav-h) var(--gutter) 0;
}
/* Lights down: a void spotlight keeps light copy legible over whatever studio colour the
   finish picker left, while the product stays lit in the centre. Soft top edge as it rises in. */
.finale::before{
  content:"";position:absolute;inset:0;z-index:0;pointer-events:none;
  background:radial-gradient(ellipse 44% 58% at 50% 42%,color-mix(in srgb,var(--void) 0%,transparent) 0%,color-mix(in srgb,var(--void) 50%,transparent) 62%,color-mix(in srgb,var(--void) 94%,transparent) 100%);
  -webkit-mask-image:linear-gradient(180deg,transparent 0,#000 28%);mask-image:linear-gradient(180deg,transparent 0,#000 28%);
}
.finale__copy{position:relative;z-index:2;align-self:end;padding-bottom:clamp(48px,11vh,120px)}
.finale__copy h2{font-size:var(--display-1);line-height:var(--lh-display);letter-spacing:-.035em;max-width:13ch;margin-bottom:var(--space-6)}
.finale__price{font-family:var(--font-display);font-size:var(--step-2);font-weight:500;line-height:1.25;letter-spacing:-.02em;max-width:26ch}
.finale__meta{margin-top:var(--space-4);color:var(--fg-muted);text-transform:uppercase;max-width:44ch}
.finale__actions{display:flex;flex-wrap:wrap;gap:var(--space-3);margin-top:var(--space-7)}
.finale .btn--ghost{background:color-mix(in srgb,var(--void) 35%,transparent);-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px)}
.finale__roll{
  position:relative;z-index:2;align-self:center;justify-self:end;width:min(100%,30rem);
  display:grid;grid-template-columns:minmax(7rem,auto) minmax(0,1fr);column-gap:var(--space-6);
  font-size:12px;letter-spacing:.04em;line-height:1.55;will-change:transform;isolation:isolate;
}
.finale__roll::before{
  content:"";position:absolute;z-index:-1;inset:-64px -120px -64px -140px;pointer-events:none;
  background:radial-gradient(closest-side,color-mix(in srgb,var(--void) 88%,transparent),color-mix(in srgb,var(--void) 70%,transparent) 60%,color-mix(in srgb,var(--void) 0%,transparent));
}
.finale__roll dt{grid-column:1;padding:var(--space-3) 0;border-top:1px solid var(--hair);color:var(--fg-muted);text-transform:uppercase}
.finale__roll dd{grid-column:2;padding:var(--space-3) 0;border-top:1px solid var(--hair);color:var(--fg)}
/* The glow as a hairline: the only pure white on the page besides emitted light. */
.finale__line{
  position:absolute;left:0;right:0;bottom:0;height:1px;z-index:3;pointer-events:none;
  background:linear-gradient(90deg,transparent,var(--display) 18%,var(--display) 82%,transparent);
  box-shadow:0 0 14px 1px rgb(255 241 226 / .45),0 0 42px 6px rgb(255 241 226 / .12);
  transform:scaleX(0);transform-origin:50% 50%;will-change:transform;
}
html:not(.js) .finale__line,html.is-reduced .finale__line{transform:none}

/* =============================================================================
   Wide screens (>=1920): hold the measure, let the stage breathe.
   ========================================================================== */
@media (min-width:1920px){
  .statement{padding-inline:max(var(--gutter),calc((100vw - 1680px) / 2))}
  .rail__head{padding-inline:max(var(--gutter),calc((100vw - 1760px) / 2))}
  .finale{padding-inline:max(var(--gutter),calc((100vw - 1760px) / 2))}
}
@media (max-width:1280px){
  .finale{column-gap:var(--space-8)}
}

/* =============================================================================
   Tablet and phone (<=768 = APP.isMobile). Pins run at 0.6x length (APP.pinEnd).
   ========================================================================== */
@media (max-width:768px){
  /* Hero: copy tighter to the nav; the product frame is pushed back by the fit formula. */
  .hero__copy{top:calc(var(--nav-h) + clamp(24px,5vh,48px))}
  .hero__sub{font-size:var(--step-0);max-width:28ch}
  .hero__note{display:none}

  /* Finale: copy, then a static roll; the spotlight becomes a vertical gradient. */
  .finale{
    height:auto;min-height:100vh;min-height:100svh;display:flex;flex-direction:column;justify-content:flex-end;
    padding:calc(var(--nav-h) + var(--space-7)) var(--gutter) var(--space-7);gap:var(--space-7);
  }
  .finale::before{background:linear-gradient(180deg,color-mix(in srgb,var(--void) 20%,transparent) 0%,color-mix(in srgb,var(--void) 0%,transparent) 22%,color-mix(in srgb,var(--void) 55%,transparent) 40%,color-mix(in srgb,var(--void) 94%,transparent) 60%)}
  .finale__copy{align-self:stretch;padding-bottom:0}
  .finale__roll{justify-self:stretch;width:auto;transform:none!important;grid-template-columns:minmax(6.5rem,auto) minmax(0,1fr);column-gap:var(--space-4);font-size:11px}

  /* Component: copy on top, the subject in the middle band, HUD docked to the bottom. */
  .component__copy{left:var(--gutter);right:var(--gutter);top:calc(var(--nav-h) + var(--space-5));transform:none;width:auto}
  .component__copy::before{inset:-40px calc(-1 * var(--gutter)) -60px}
  .component__step{align-self:start}
  .component__step h2{font-size:var(--step-2);margin-bottom:var(--space-3)}
  .component__step p{font-size:var(--step--1)}
  .component__labels,.component__leaders{display:none}
  .component__hud{left:0;right:0;top:auto;bottom:0;width:auto;align-items:stretch;text-align:left;padding:var(--space-3) var(--gutter) max(var(--space-4),env(safe-area-inset-bottom));
    background:linear-gradient(180deg,rgb(11 13 16 / 0),rgb(11 13 16 / .92) 40%)}
  .component__hud::before{display:none}
  .component__zoom{font-size:var(--step-3);margin-top:0}
  .component__stops{display:flex;gap:var(--space-3);overflow-x:auto;margin-block:var(--space-2) 0;scrollbar-width:none}
  .component__stops button{padding:0}
  .component__hud .caption{display:none}
  .component__stepper{bottom:calc(120px + var(--space-4))}

  /* Statement: one column, notes under the body, words start fully visible. */
  .statement{display:block;padding-block:var(--pad-airy) var(--pad-dense)}
  .statement__lead{max-width:14ch;margin-inline:auto}
  .statement__body{max-width:none;font-size:var(--step-2);line-height:1.28}
  .statement__notes{min-height:0;margin-top:var(--space-7)}

  /* Fill: numeral on top at 40vh, readout + mode share a row, ticks every 3 units. */
  .fill{
    grid-template-columns:minmax(0,1fr) auto;
    grid-template-rows:auto minmax(0,1fr) auto auto auto;
    grid-template-areas:"copy copy" "num num" "readout mode" "ticks ticks" "cap cap";
    padding-top:calc(var(--nav-h) + var(--space-5));column-gap:var(--space-4);
  }
  .fill__copy h2{font-size:var(--step-3);max-width:none;margin-bottom:var(--space-3)}
  .fill__copy p{font-size:var(--step--1)}
  .fill__numeral{justify-self:center;height:40vh;max-height:40vh;width:auto;max-width:100%}
  .fill__readout{margin:0;align-self:center;font-size:var(--step-3)}
  .fill__pct{display:none}
  .fill > .seg{margin:0;justify-self:end;align-self:center}
  .fill > .seg button{padding:0 var(--space-3);font-size:12px}

  /* Finish: the name spans the top, controls dock to the bottom edge. */
  .finish__name{font-size:18vw;left:0;right:0;text-align:center;top:calc(var(--nav-h) + var(--space-5))}
  .finish__copy{left:var(--gutter);right:var(--gutter);bottom:calc(96px + var(--space-5));max-width:none}
  .finish__copy p{max-width:none}
  .finish__hit{inset:22% 0 34% 0}
  .finish__controls{
    left:0;right:0;bottom:0;justify-content:space-between;flex-wrap:nowrap;max-width:none;
    padding:var(--space-3) var(--gutter) max(var(--space-4),env(safe-area-inset-bottom));
    border-top:1px solid var(--hair);
    background:color-mix(in srgb,var(--bg) 55%,transparent);
    -webkit-backdrop-filter:blur(16px) saturate(1.3);backdrop-filter:blur(16px) saturate(1.3);
  }
  .finish__controls .swatches{flex-wrap:nowrap}
  .finish__controls .swatch{padding:0 var(--space-3) 0 var(--space-2);gap:var(--space-2)}
  .finish__controls .swatch span{white-space:nowrap}
  .finish__controls .swatch__chip{width:22px;height:22px}
  /* 3+ finishes: chips only (the giant name above already says which one is on). */
  .finish__controls .swatches:has(> :nth-child(3)) .swatch{padding:0 var(--space-2);min-width:44px;justify-content:center}
  .finish__controls .swatches:has(> :nth-child(3)) .swatch span{
    position:absolute;width:1px;height:1px;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap;
  }
  .finish__controls .toggle{padding:0 var(--space-3) 0 var(--space-2);gap:var(--space-2)}
}
@media (max-width:420px){
  .finish__controls .swatch span{font-size:12px}
  .finish__controls .swatches{gap:var(--space-1)}
}

/* =============================================================================
   No-JS document mode: pinned stages become normally flowing sections.
   ========================================================================== */
html:not(.js) .finish,html:not(.js) .finale{height:auto;min-height:100svh}
html:not(.js) .finale__roll{transform:none}
