/* ─────────────────────────────────────────────────────────────
   new-12 · style.css
   Design system snapped from https://www.eladiodieste.com/ (2026-09-12).

   Layer order, declared once. Later layers win without specificity fights;
   anything unlayered wins over everything (keep that rare: @font-face and
   the reduced-motion block only).
   ───────────────────────────────────────────────────────────── */
@layer reset, tokens, base, layout, components, motion, utilities;

/* Inter Tight 400/500 — the web font is linked above. This is the
   metric-matched fallback so the page does not reflow when the font lands.
   Inter Tight vertical metrics: ascender 2728 / descender −680 / UPM 2816. */
@font-face {
  font-family: 'Inter Tight Fallback';
  src: local('Arial');
  ascent-override: 96.88%;
  descent-override: 24.15%;
  line-gap-override: 0%;
  size-adjust: 100%;
}

@layer reset {
  *, ::before, ::after { margin: 0; padding: 0; box-sizing: border-box; border: 0 solid; }
  html, body {
    width: 100%;
    /* house rule: no rubber-band bounce, ever */
    overscroll-behavior: none;
  }
  img, svg, video, canvas, picture { display: block; max-width: 100%; }
  img, video { height: auto; }
  button, input, select, textarea { font: inherit; letter-spacing: inherit; color: inherit; background: none; border-radius: 0; }
  button { cursor: pointer; }
  ol, ul, menu { list-style: none; }
  a { color: inherit; text-decoration: none; }
  h1, h2, h3, h4, h5, h6 { font-size: inherit; font-weight: inherit; }
  :focus:not(:focus-visible) { outline: none; }
}

@layer tokens {
  :root {
    /* ── palette — three colours, from the SEMA-poster reference:
       near-black plate, red-orange for the giant headlines and small accent
       elements, white for everything you read. ── */
    --night:  #0d0e10;   /* default background */
    --red:    #e8472a;   /* accent: display type + detached details */
    --white:  #f4f4f2;   /* type */
    --black:  #000;      /* pure black: scrims, menu panel */

    --bg:          var(--night);
    --ink:         var(--white);
    --accent:      var(--red);
    --display-ink: var(--accent);      /* .t-hero / .t-display default colour */
    --bg-footer:   var(--accent);      /* body.is-footer-inview field */

    /* tints — derived, never hand-picked */
    --tint-image:  color-mix(in oklab, var(--ink) 10%, transparent);    /* reveal-image placeholder */
    --line-faint:  color-mix(in oklab, var(--ink) 20%, transparent);    /* timeline rail */
    --scrim:       color-mix(in oklab, var(--black) 50%, transparent);  /* video cover */
    --caption-ink: color-mix(in oklab, var(--ink) 80%, transparent);
    --ink-40:      color-mix(in oklab, var(--ink) 40%, transparent);    /* dimmed timeline years */

    /* ── type scale · rem on a fluid root (15px → 18px → 22px, see @layer base)
       resolved px:                       @390   @768   @1440   @1920 */
    --fs-hero:       36vw;             /* 140    —      —       —     (md: 20vw → 154 / 288 / 384) */
    --fs-display:    3rem;             /*  45     54    —       —     (md: 7rem → 122.9 / 154) */
    --fs-statement:  1.875rem;         /*  28     34    —       —     (md: 3rem  →  52.7 / 66) */
    --fs-sublead:    1.5rem;           /*  22.5   27    —       —     (md: 1.875rem → 32.9 / 41) */
    --fs-h3:         1.25rem;          /*  19     22.5  —       —     (md: 1.875rem → 32.9 / 41) */
    --fs-year:       1.125rem;         /*  17     20    —       —     (md: 1.875rem → 32.9 / 41) */
    --fs-menu:       3.75rem;          /*  56     —     —       —     (md: 7rem) */
    --fs-body-lg:    1.125rem;         /*  17     20    19.7    24.75 */
    --fs-body:       1.0625rem;        /*  16     19    18.65   23.4  */
    --fs-ui:         1rem;             /*  15     18    17.55   22    */
    --fs-caption:    .875rem;          /*  13     16    15.4    19.25 */
    --fs-meta:       .75rem;           /*  11     13.5  13.2    16.5  */

    /* line-heights */
    --lh-hero:       1;                /* + text-box trim */
    --lh-display:    1;
    --lh-display-tight: .85;
    --lh-statement:  1;
    --lh-sublead:    1;
    --lh-h3:         1.05;
    --lh-year:       1.2;
    --lh-menu:       1;
    --lh-body-lg:    1.1;
    --lh-body:       1.05;
    --lh-body-loose: 1.15;
    --lh-ui:         1.5;
    --lh-caption:    1.43;
    --lh-meta:       1.33;

    /* tracking — never positive, tighter as size grows */
    --ls-hero:       -.075em;
    --ls-display:    -.05em;
    --ls-display-tight: -.035em;
    --ls-statement:  -.04em;
    --ls-quote:      -.025em;
    --ls-sublead:    -.01em;
    --ls-h3:         -.04em;
    --ls-year:       -.025em;
    --ls-body-lg:    -.01em;
    --ls-body:       -.02em;
    --ls-credit:     -.025em;
    --ls-ui:         -.001em;
    --ls-note:       -.08em;

    /* weights — two, and 500 only where it is clickable or a micro-label */
    --w-text: 400;
    --w-ui:   500;

    /* ── easing (all four are the reference's own names) ── */
    --ease-magic:    cubic-bezier(.33, 0, 0, 1);    /* default for reveals, hovers, snap */
    --ease-out-expo: cubic-bezier(.19, 1, .22, 1);  /* word/char/divider reveals */
    --ease-quart:    cubic-bezier(.41, .35, .2, 1); /* image clip reveal, fade-in, h3 hover */
    --ease-base:     cubic-bezier(.46, .03, .12, 1);/* pill nav show/hide */
    --ease-out:      cubic-bezier(0, 0, .2, 1);     /* Tailwind ease-out, misc */

    /* durations */
    --dur-tap:    .3s;
    --dur-mid:    .6s;
    --dur-body:   .7s;    /* body color swap, fade-in */
    --dur-hover:  .75s;   /* timeline sibling dim */
    --dur-image:  1.2s;   /* reveal-clip */
    --dur-line:   1.4s;   /* reveal-lines, divider */
    --dur-word:   1.6s;   /* reveal-words / chars */

    /* reveal stagger steps (multiplied by --line / --word / --char from SplitText propIndex) */
    --step-line: 50ms;
    --step-word: 75ms;
    --step-char: 75ms;
    --step-image: .2s;    /* × --i */

    /* split masks: clip with a bleed so ascenders/descenders survive at rest */
    --split-mask-pad:     .08em;
    --split-mask-bleed-y: .3em;

    /* ── spacing (Tailwind base .25rem) ── */
    --u:        .25rem;
    --pad-x:    1rem;                 /* px-global */
    --gap-grid: 1.25rem;              /* grid-default gap-5 */
    --radius-md: .375rem;
    --rule-heavy: clamp(3px, .4vw, 8px);   /* the poster's thick underline */
    --hero-runway: 55lvh;                  /* scroll distance the hero stage stays pinned after its first screen */
    --hero-overlap: 35lvh;                 /* the next section rides up over the last part of the runway */
    --hero-scrim-top: .3;                  /* darkening over the media so the type reads: top / middle / bottom alpha */
    --hero-scrim-mid: .1;
    --hero-scrim-bottom: .4;
    --hero-video-sat: 0;                   /* the clip under the diamond raster is B&W; 1 = colour */
    --plate-scrim: .5;                     /* darkening over the Rules plates so the rule text reads */
    --header-py: 1rem;                /* md: .75rem */
    --section-pt: calc(var(--u) * 6);
    --section-pb: calc(var(--u) * 40);/* md: 72 */
    --display-mb: calc(var(--u) * 32);/* md: 56 */

    /* z-stack */
    --z-burger: 60;
    --z-pill:   40;
    --z-menu:   10;
    --z-transition-scrim: 40;
    --z-transition-panel: 50;
  }

  @media (min-width: 48rem) {
    :root {
      --fs-hero:      20vw;
      --fs-display:   7rem;
      --fs-statement: 3rem;
      --fs-sublead:   1.875rem;
      --fs-h3:        1.875rem;
      --fs-year:      1.875rem;
      --fs-menu:      7rem;
      --header-py:    .75rem;
      --section-pb:   calc(var(--u) * 72);
      --display-mb:   calc(var(--u) * 56);
    }
  }
}

@layer base {
  /* fluid root — three segments, exactly the reference's clamp() chain */
  html { font-size: 15px; }
  @media (min-width: 640px)  { html { font-size: clamp(15px, 12.9574px + .3191vw, 18px); } }
  @media (min-width: 1580px) { html { font-size: clamp(18px, 1.1765vw - .5882px, 22px); } }

  html {
    -webkit-text-size-adjust: 100%;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    -webkit-tap-highlight-color: transparent;
    tab-size: 4;
  }
  body {
    font-family: 'Inter Tight', 'Inter Tight Fallback', -apple-system, BlinkMacSystemFont, sans-serif;
    font-weight: var(--w-text);
    line-height: 1.5;
    background-color: var(--bg);
    color: var(--ink);
    transition: background-color var(--dur-body), color var(--dur-body);
  }
  /* mode: footer in view — the whole page turns accent (one token: --bg-footer) */
  body.is-footer-inview { background-color: var(--bg-footer) !important; color: var(--white) !important; }

  ::selection { background-color: var(--accent); color: var(--white); text-shadow: none; }
  html:where(html.is-changing *) { cursor: wait; }

  /* Lenis (lenis.css 1.3.17, inlined) */
  html.lenis, html.lenis body { height: auto; }
  .lenis:not(.lenis-autoToggle).lenis-stopped { overflow: clip; }
  .lenis [data-lenis-prevent], .lenis [data-lenis-prevent-wheel], .lenis [data-lenis-prevent-touch] { overscroll-behavior: contain; }
  .lenis.lenis-smooth iframe { pointer-events: none; }
  .lenis.lenis-autoToggle { transition-property: overflow; transition-duration: 1ms; transition-behavior: allow-discrete; }
}

@layer layout {
  .container, .px-global { width: 100%; padding-inline: var(--pad-x); margin-inline: auto; }
  .grid-12 { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--gap-grid); }
  .grid-16 { display: grid; grid-template-columns: repeat(16, minmax(0, 1fr)); gap: var(--pad-x); }
  @media (min-width: 48rem) { .grid-16 { gap: 0; } }

  .section { padding-top: var(--section-pt); }
  .section--deep { padding-bottom: var(--section-pb); }
  .h-lvh { height: 100lvh; }
  .h-svh { height: 100svh; }
  .h-dvh { height: 100dvh; }
  .h-screen { height: 100vh; height: 100svh; }
}

@layer components {
  /* ── type roles — one class per row of the type scale ── */
  .t-hero      { font-size: var(--fs-hero);      line-height: var(--lh-hero);      letter-spacing: var(--ls-hero);      font-weight: var(--w-text); color: var(--display-ink); }
  .t-display   { font-size: var(--fs-display);   line-height: var(--lh-display);   letter-spacing: var(--ls-display);   font-weight: var(--w-text); color: var(--display-ink); }
  .t-display-tight { font-size: var(--fs-display); line-height: var(--lh-display); letter-spacing: var(--ls-display-tight); font-weight: var(--w-text); color: var(--display-ink); }
  .is-ink { color: var(--ink); }      /* opt a display role back to white */
  .is-accent { color: var(--accent); }/* opt any small element into red */
  @media (min-width: 48rem) { .t-display-tight { line-height: var(--lh-display-tight); } }
  .t-statement { font-size: var(--fs-statement); line-height: var(--lh-statement); letter-spacing: var(--ls-statement); font-weight: var(--w-text); }
  .t-quote     { font-size: var(--fs-statement); line-height: var(--lh-statement); letter-spacing: var(--ls-quote);     font-weight: var(--w-text); }
  .t-sublead   { font-size: var(--fs-sublead);   line-height: var(--lh-sublead);   letter-spacing: var(--ls-sublead);   font-weight: var(--w-text); }
  .t-h3        { font-size: var(--fs-h3);        line-height: var(--lh-h3);        letter-spacing: var(--ls-h3);        font-weight: var(--w-ui); }
  .t-year      { font-size: var(--fs-year);      line-height: var(--lh-year);      letter-spacing: var(--ls-year);      font-weight: var(--w-ui); }
  .t-menu      { font-size: var(--fs-menu);      line-height: var(--lh-menu);      letter-spacing: 0;                   font-weight: var(--w-text); }
  .t-body-lg   { font-size: var(--fs-body-lg);   line-height: var(--lh-body-lg);   letter-spacing: var(--ls-body-lg);   font-weight: var(--w-text); }
  .t-body      { font-size: var(--fs-body);      line-height: var(--lh-body);      letter-spacing: var(--ls-body);      font-weight: var(--w-text); }
  .t-body-loose{ font-size: var(--fs-body);      line-height: var(--lh-body-loose);letter-spacing: 0;                   font-weight: var(--w-text); }
  .t-credit    { font-size: var(--fs-body);      line-height: var(--lh-body);      letter-spacing: var(--ls-credit);    font-weight: var(--w-text); }
  .t-ui        { font-size: var(--fs-ui);        line-height: var(--lh-ui);        letter-spacing: var(--ls-ui);        font-weight: var(--w-ui); }
  .t-ui-lg     { font-size: var(--fs-body-lg);   line-height: 1.556;               letter-spacing: 0;                   font-weight: var(--w-ui); }
  .t-caption   { font-size: var(--fs-caption);   line-height: var(--lh-caption);   letter-spacing: 0;                   font-weight: var(--w-ui); }
  .t-meta      { font-size: var(--fs-meta);      line-height: var(--lh-meta);      letter-spacing: 0;                   font-weight: var(--w-text); }
  .t-note      { font-size: .5em;                line-height: 1;                   letter-spacing: var(--ls-note);      opacity: .75; display: block; margin-top: .5rem; }

  /* trims the half-leading above cap height and below the baseline —
     nav, hero words and years sit on the grid instead of in a line box */
  .text-trim { text-box: trim-both cap alphabetic; }
  .balance { text-wrap: balance; }

  /* ── hairline + the heavy rule ── */
  .divider { background-color: currentColor; width: 100%; height: 1px; }
  .rule-heavy { background-color: var(--accent); width: 100%; height: var(--rule-heavy); }

  /* ── burger — the only fixed chrome. Two bars = the poster's "=" glyph; accent
     by default, white on the footer field; morphs into a cross while open ── */
  .burger {
    position: fixed; top: 1rem; right: var(--pad-x); z-index: var(--z-burger);
    display: flex; flex-direction: column; justify-content: space-between;
    width: 1.75rem; height: 1.125rem; padding: 0;
    color: var(--accent); transition: opacity var(--dur-tap), color var(--dur-body);
  }
  @media (min-width: 48rem) { .burger { top: 2rem; } }
  .burger span {
    display: block; height: 2px; width: 100%; background: currentColor;
    transition: translate var(--dur-tap) var(--ease-magic), rotate var(--dur-tap) var(--ease-magic);
  }
  .burger[aria-expanded="true"] span:first-child { translate: 0 .5rem; rotate: 45deg; }
  .burger[aria-expanded="true"] span:last-child  { translate: 0 -.5rem; rotate: -45deg; }
  .burger[aria-expanded="true"] { color: var(--ink); }
  body.is-footer-inview .burger { color: var(--white); }
  @media (hover: hover) { .burger:hover { opacity: .6; } }

  /* nav row (kept for inner pages / the pill; no longer on the home hero) */
  .nav {
    display: flex; align-items: center; justify-content: space-between; gap: 2rem;
    padding-block: var(--header-py);
    font-weight: var(--w-ui);
  }
  .nav__link { display: inline-flex; }

  /* nav link with the dot: hover → dot grows in, label slides right;
     aria-current="true" → dot parked, label parked */
  .nav__link {
    align-items: center; gap: .5em;
    text-box: trim-both cap alphabetic;
  }
  .nav__link::before {
    content: ""; display: block; width: .625em; height: .625em; flex-shrink: 0;
    border-radius: 50%; background-color: transparent; transform: scale(0);
    transition: background-color var(--dur-tap) ease-in-out, transform var(--dur-tap) var(--ease-magic);
  }
  .nav__link > span {
    display: inline-block; translate: -1.125em 0;
    transition: translate var(--dur-tap) var(--ease-magic);
  }
  .nav__link--static > span { translate: 0; }
  @media (hover: hover) {
    .nav__link:hover::before { transform: scale(1); background-color: var(--accent); }
    .nav__link:hover > span { translate: 0; }
  }
  .nav__link[aria-current="true"]::before { transform: scale(1); background-color: var(--accent); }
  .nav__link[aria-current="true"] > span { translate: 0; }

  /* ── plain links ── */
  .link-dim { transition: opacity var(--dur-tap); }
  @media (hover: hover) { .link-dim:hover { opacity: .6; } }

  /* ── image credit (bottom-right of a reveal-image) ── */
  .credit {
    position: absolute; right: .5rem; bottom: .5rem;
    color: var(--caption-ink); font-weight: var(--w-ui);
    border-radius: var(--radius-md);
    filter: drop-shadow(0 25px 25px rgb(0 0 0 / .15));
    opacity: 0; transition: opacity var(--dur-tap);
  }
  .credit.is-inview { opacity: 1; }
  @media (min-width: 48rem) { .credit { right: 1rem; bottom: 1rem; } }

  /* ── mobile menu panel — GSAP drives clip-path; CSS holds the rest ── */
  .menu {
    position: fixed; top: 0; bottom: 1.5rem; left: 0; z-index: var(--z-menu);
    height: 100dvh; width: 100%; padding: 1rem; text-align: center;
    background: var(--black); color: var(--ink);
    visibility: hidden; pointer-events: auto;
  }
  .menu__inner { display: flex; height: 100%; flex-direction: column; justify-content: flex-end; }
  .menu__inner > nav { margin-block: auto; }     /* list floats to the vertical centre, footer stays down */
  .menu__list { display: flex; flex-direction: column; text-align: left; }
  .menu__list li { overflow: hidden; }
  .menu__list a { display: block; border-top: 1px solid var(--ink); padding: 1rem 0 1.25rem; }
  @media (min-width: 48rem) { .menu { padding: 2rem var(--pad-x); } .menu__list a { padding: 1.25rem 0 1.5rem; } }
  .menu__footer { display: flex; flex-direction: column; gap: 1rem; text-align: left; }

  /* ── project pill nav ── */
  .pill-nav {
    pointer-events: none; position: fixed; inset-inline: 0; bottom: 1rem; z-index: var(--z-pill);
    display: flex; justify-content: center;
    transition: translate .5s var(--ease-base);
  }
  .pill-nav[data-hidden="true"] { translate: 0 calc(100% + 1.5rem); }
  .pill-nav__box {
    pointer-events: auto; position: relative; height: 2.5rem; width: 11.75rem;
    overflow: clip; background: var(--ink); color: var(--night);
  }
  .pill-nav__cta {
    position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
    transition: opacity var(--dur-tap);
  }
  @media (hover: hover) { .pill-nav__cta:hover { opacity: .6; } }

  /* ── footer wordmark: an HTML block cut to the glyphs by an SVG clipPath; inside — the B&W
     still + its raster in a frame twice as tall that parallaxes on scroll. currentColor (white on
     the accent field) shows until the image arrives ── */
  .wordmark { position: relative; width: 100%; aspect-ratio: 1408 / 285; overflow: hidden; clip-path: url(#wordmark-clip); background: currentColor; }
  .wordmark__frame { position: absolute; inset-inline: 0; top: 0; height: 200%; }
  .wordmark img { display: block; width: 100%; height: 100%; object-fit: cover; filter: saturate(0); }

  /* ── timeline → speedometer ──
     The reference's centre rail + progress line became an arc: a sticky
     full-viewport layer holds one SVG (viewBox = viewport, set by JS) with the
     faint track, the accent progress (pathLength 1, dashoffset 1 → 0) and the
     needle (rotate −180° → 0° around the bottom centre). It sticks for the
     section's whole height and takes no flow space (negative bottom margin). */
  .timeline { position: relative; min-height: 100vh; overflow-x: clip; display: grid; }
  .timeline__speedo, .timeline__body { grid-area: 1 / 1; }          /* one cell: the layer overlays the body, adds no height */
  .timeline__body { position: relative; }   /* the section's own padding sits OUTSIDE .timeline, so the sticky dial ends with the plates */
  .timeline__speedo {
    pointer-events: none; position: sticky; top: 0; z-index: 20; align-self: start;
    height: 100lvh; margin-inline: calc(-1 * var(--pad-x));         /* edge to edge, past px-global */
  }
  .timeline__speedo svg { display: block; width: 100%; height: 100%; overflow: visible; }
  .timeline__rail, .timeline__progress { fill: none; stroke-width: 1; vector-effect: non-scaling-stroke; }
  .timeline__rail { stroke: var(--line-faint); }
  .timeline__progress { stroke: var(--accent); stroke-dasharray: 1; stroke-dashoffset: 1; }
  .timeline__needle { fill: var(--accent); }           /* a tapered block (points set by JS), not a stroke */
  .timeline__dial { position: absolute; bottom: 1.25rem; color: var(--ink-40); }   /* .t-year — the size the rail's dates had */
  .timeline__dial--0 { left: var(--pad-x); }
  .timeline__dial--max { right: var(--pad-x); }
  .timeline__grid { position: relative; grid-auto-rows: auto; padding-bottom: 1.5rem; }
  /* each item declares its row and 16-col span inline (--row / --col);
     below md everything spans the full width */
  .timeline__cell { position: relative; grid-row-start: var(--row, auto); grid-column: 1 / -1; }
  @media (min-width: 48rem) { .timeline__cell { grid-column: var(--col, 1 / -1); } }
  .timeline__num { display: block; margin-bottom: .5rem; color: var(--accent); }   /* rule number over the text */
  .timeline__item { position: relative; display: block; padding-bottom: 1.5rem; transition: opacity var(--dur-hover) var(--ease-magic); }
  @media (min-width: 48rem) {
    .timeline__item { padding-bottom: 0; }
    .timeline:has(.timeline__item:hover) .timeline__item { opacity: .3; }
    .timeline:has(.timeline__item:hover) .timeline__item:hover { opacity: 1; }
  }
  .timeline__media {
    margin-inline: auto; width: 50%; overflow: hidden; background: var(--tint-image);
    clip-path: inset(0%); transition: clip-path var(--dur-body) var(--ease-magic);
  }
  @media (min-width: 48rem) {
    .timeline__media { margin-inline: 0; width: 100%; }
    .timeline__item:hover .timeline__media { clip-path: inset(5%); }
  }
  .timeline__reveal { position: relative; height: 100%; width: 100%; background-size: cover; background-position: center; }
  /* the frame is what the parallax moves; the still is B&W under its raster, like the hero clip */
  .timeline__frame { position: absolute; inset: 0; }
  .timeline__reveal img { height: 100%; width: 100%; object-fit: cover; opacity: 0; transition: opacity .5s; filter: saturate(0); }
  .timeline__reveal img.is-loaded { opacity: 1; }
  /* scrim above image + raster: the white rule text sits partly over the plate */
  .timeline__reveal::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: rgb(13 14 16 / var(--plate-scrim)); }
  .timeline__title { margin-top: 2rem; text-align: center; }
  @media (min-width: 48rem) {
    .timeline__title { position: absolute; top: 50%; margin-top: 0; translate: 0 -50%; }
    .timeline__title--left  { left: -20%; text-align: left;  max-width: var(--timeline-title-safe-w, 43ch); }
    .timeline__title--right { right: -20%; text-align: right; max-width: var(--timeline-title-safe-w, 45ch); }
    .timeline__title--right.is-edge { right: -40%; }
  }

  /* ── stack ── */
  .stack { position: relative; height: var(--stack-height); }
  @media (min-width: 48rem) { .stack { height: 100vh; } }
  .stack__viewport { position: sticky; top: 0; height: 100dvh; }
  @media (min-width: 48rem) { .stack__viewport { height: 100%; } }
  .stack__slide { position: absolute; inset: 0; display: flex; flex-direction: column; overflow: hidden; }
  .stack__media { position: relative; height: 60%; width: 100%; flex-shrink: 0; overflow: hidden; will-change: transform; background: var(--night); }   /* opaque under a lazy image */
  .stack__media-inner { position: absolute; inset: 0; will-change: transform; }
  .stack__media img { height: 100%; width: 100%; object-fit: cover; }
  .stack__caption {
    display: flex; height: 40%; flex-shrink: 0; flex-direction: column; overflow: auto; padding: 1rem;
    background: var(--bg); color: var(--ink); line-height: 1.2em; font-weight: var(--w-ui); letter-spacing: -.025em;
    will-change: transform;
  }
  .stack__caption > div { margin-block: auto; display: flex; flex-direction: column; gap: 1rem; }
  .stack__layer { position: absolute; inset: 0; background: transparent; }
  @media (min-width: 48rem) {
    .stack__slide { flex-direction: row; align-items: center; justify-content: center; }
    .stack__media { position: absolute; inset: 0; height: auto; }
    .stack__media img { height: 130%; }
    .stack__caption { position: absolute; bottom: 0; left: 0; height: auto; max-width: 36rem; background: transparent; color: var(--white); }
    .stack__layer { background: var(--black); }
  }

  /* ── hero stage ──
     155lvh section (100lvh + 55lvh runway), 100lvh sticky stage: the media layer (scroll-scrubbed
     video) sits in .hero__scene. The chrome is the poster composition:
     "Undr." + heavy rule + three-word row top-left, date + time across the
     vertical centre with a red "+", note bottom-left, "Drift" bottom-right. */
  .hero { position: relative; height: calc(100lvh + var(--hero-runway)); visibility: visible; color: var(--ink); }
  html.js .hero { visibility: hidden; }
  .hero__sticky { position: sticky; top: 0; height: 100lvh; overflow: hidden; }
  .hero__scene { position: absolute; inset: 0; overflow: hidden; }
  .hero__layers { position: absolute; inset: 0; }
  .hero__media { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
  /* diamond raster: a WebGL canvas over the clip; the clip itself goes B&W
     and shows through at 27%. Both hang on .has-fx — FX off = neither */
  .hero.has-fx .hero__media { filter: saturate(var(--hero-video-sat)); }
  .raster { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }   /* hero + plates */
  /* scrim: the type must read over any frame of the clip; two tokens, zero to disable */
  .hero__layers::after {
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background: linear-gradient(180deg,
      rgb(13 14 16 / var(--hero-scrim-top)) 0%, rgb(13 14 16 / var(--hero-scrim-mid)) 30%,
      rgb(13 14 16 / var(--hero-scrim-mid)) 70%, rgb(13 14 16 / var(--hero-scrim-bottom)) 100%);
  }
  /* the section after the hero starts before the runway ends, so its statement
     lands on the video while the scene is fading to the night plate */
  .hero-overlap { position: relative; z-index: 1; margin-top: calc(-1 * var(--hero-overlap)); }
  .hero__chrome { pointer-events: none; position: absolute; inset-inline: 0; top: 0; height: 100svh; overflow: hidden; }
  .hero__word { display: inline-block; white-space: nowrap; }
  .hero__word--right { text-align: right; }

  .hero__top { position: absolute; inset-inline: 0; top: 0; padding-top: 2rem; }
  .hero__underline { display: inline-block; }                /* the rule takes the word's width */
  .hero__underline .rule-heavy { margin-top: clamp(4px, .5vw, 10px); }
  .hero__row { display: flex; flex-direction: column; gap: .25rem; margin-top: 1.25rem; }
  .hero__row > * { display: inline-block; }
  @media (min-width: 48rem) {
    .hero__top { padding-top: 2rem; }
    .hero__underline { margin-left: -1.5rem; }               /* optical: the "U" hugs the gutter */
    .hero__underline .rule-heavy { margin-left: 1.5rem; width: calc(100% - 1.5rem); }
    .hero__row { flex-direction: row; justify-content: space-between; gap: 2rem; }
  }

  .hero__mid {
    position: absolute; inset-inline: 0; top: 50%; translate: 0 -50%;
    display: flex; align-items: center; justify-content: space-between;
  }
  .hero__mid > span { display: inline-block; }
  .hero__plus { color: var(--accent); font-size: calc(var(--fs-statement) * 1.6); line-height: 1; }   /* reads as a glyph, like the poster's "=" */
  @media (max-width: 47.99rem) {
    .hero__mid .t-statement { font-size: var(--fs-sublead); letter-spacing: var(--ls-sublead); }
    .hero__mid .hero__plus { font-size: calc(var(--fs-sublead) * 1.6); }
  }

  .hero__bottom {
    position: absolute; inset-inline: 0; bottom: 0; padding-bottom: 2rem;
    display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem;
  }
  .hero__note { padding-bottom: .1em; }
  .hero__coords { white-space: nowrap; }
  /* redacted digits: blurred in place, still selectable-looking but unreadable */
  .is-redacted { display: inline-block; filter: blur(3px); user-select: none; }

  /* placeholder plate for images that do not exist yet — same tint the
     reveal-image plate uses, so the composition reads without assets */
  .ph { background: color-mix(in oklab, var(--ink) 10%, var(--night)); }   /* opaque, so stacked plates do not bleed through */
  .reveal-image .ph { background: color-mix(in oklab, var(--ink) 18%, var(--night)); }
  .ph--accent { background: color-mix(in oklab, var(--accent) 70%, var(--night)); }

  /* ── three columns of images ── */
  .three-images { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--gap-grid); }
  .three-images > * { grid-column: span 12; }
  @media (min-width: 48rem) { .three-images > * { grid-column: span 4; } }

  /* ── page transition chrome ── */
  .transition-scrim { pointer-events: none; position: fixed; inset: 0; z-index: var(--z-transition-scrim); background: var(--black); opacity: 0; }
  .transition-panel { position: fixed; inset-inline: 0; top: 0; z-index: var(--z-transition-panel); height: 100lvh; background: var(--black); clip-path: inset(0 0 100% 0); }
  .transition-panel img { position: absolute; inset: 0; height: 100%; width: 100%; object-fit: cover; opacity: 0; }

  /* ── video cover ── */
  .video-cover { position: absolute; inset: 0; transition: opacity var(--dur-body); }
  .video-cover video { position: absolute; inset: 0; height: 100%; width: 100%; object-fit: cover; filter: saturate(80%); transition: filter 1s; }
  .video-cover__scrim { position: absolute; inset: 0; background: var(--scrim); transition: opacity 1s; }
  .video-cover__play { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 2.5rem; transition: transform var(--dur-tap) var(--ease-magic); }
  .video-cover__play svg { width: 2.5rem; }
  @media (min-width: 48rem) { .video-cover__play svg { width: 5.25rem; } }
  @media (hover: hover) {
    .video-cover:hover video { filter: saturate(100%); }
    .video-cover:hover .video-cover__scrim { opacity: 0; }
    .video-cover__play:hover { transform: scale(1.4); }
  }
}

@layer motion {
  /* ═══════════════════════════════════════════════════════════════
     The reveal contract.
     JS toggles ONE class — `.is-inview` (Locomotive Scroll `data-scroll`) —
     and adds `.is-loaded` on images. Everything else is CSS: the index each
     SplitText unit carries (`--line`, `--word`, `--char`, set by propIndex)
     is the stagger.
     `:where(html.js *)` — with JS off nothing is ever hidden.
     ═══════════════════════════════════════════════════════════════ */

  /* lines rise 1em and fade in, 50ms apart */
  .reveal-lines:where(html.js *) { opacity: 0; }
  .reveal-lines.is-inview { opacity: 1; }
  .reveal-lines .line {
    translate: 0 1em; opacity: 0;
    transition-property: translate, transform, opacity;
    transition-duration: var(--dur-line);
    transition-timing-function: var(--ease-magic);
  }
  .reveal-lines.is-inview .line {
    translate: 0 0; opacity: 1;
    transition-delay: calc(var(--line, 0) * var(--step-line));
  }

  /* words / chars slide up out of a mask, 75ms apart */
  .reveal-words:where(html.js *), .reveal-chars:where(html.js *) { opacity: 0; }
  .reveal-words.is-inview, .reveal-chars.is-inview { opacity: 1; }
  .reveal-words .word {
    transition: var(--dur-word) var(--ease-out-expo) transform;
    transition-delay: calc(var(--step-word) * var(--word, 0));
    transform: translateY(130%);
  }
  .reveal-chars .char {
    transition: var(--dur-word) var(--ease-out-expo) transform;
    transition-delay: calc(var(--step-char) * var(--char, 0));
    transform: translateY(130%);
  }
  .reveal-words.is-inview .word, .reveal-chars.is-inview .char { transform: translateY(0%); }

  /* hairline draws from the left */
  .reveal-divider { transition: transform var(--dur-line) var(--ease-out-expo); transform-origin: 0; transform: scaleX(0); }
  .reveal-divider.is-inview { transform: scaleX(1); }

  /* image: tinted plate, then reveal top-to-bottom and settle once in view AND loaded */
  .reveal-image { background-color: var(--tint-image); overflow: hidden; }
  .reveal-image img, .reveal-image video, .reveal-image .ph { opacity: 0; }
  .reveal-image.is-inview.is-loaded img, .reveal-image.is-inview.is-loaded video, .reveal-image.is-inview.is-loaded .ph {
    opacity: 1;
    animation: reveal-clip var(--dur-image) var(--ease-quart) both;
    animation-delay: calc(var(--i, 0) * var(--step-image));
  }
  @keyframes reveal-clip {
    0%  { clip-path: inset(0 0 100%); transform: scale(1.1) translateY(-5%); }
    to  { clip-path: inset(0 0 0%);   transform: scale(1); }
  }
  @keyframes fade-in { 0% { opacity: 0; } to { opacity: 1; } }
  .animate-fade-in { animation: fade-in var(--dur-body) var(--ease-quart) forwards; }

  /* SplitText masks — GSAP wraps each unit in `.<unit>-mask`; we swap its
     overflow:clip for a clip-path with vertical bleed so glyph extenders
     are not shaved at rest, and pad the right edge so italics/overhangs fit. */
  .line-mask { display: block; }
  .char-mask, .word-mask, .line, .word, .char { display: inline-block; }
  .word-mask, .char-mask { padding-right: var(--split-mask-pad); margin-right: calc(var(--split-mask-pad) * -1); }
  .line-mask, .word-mask, .char-mask {
    clip-path: inset(calc(var(--split-mask-bleed-y) * -1) 0 calc(var(--split-mask-bleed-y) * -1) 0);
    overflow: visible !important;
  }

  /* generic inview fade (credits, small labels) */
  .inview-fade { opacity: 0; transition: opacity var(--dur-tap); }
  .inview-fade.is-inview { opacity: 1; }
}

@layer utilities {
  .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border-width: 0; }
  .invisible { visibility: hidden; }
  .hidden { display: none; }
  .relative { position: relative; }
  .overflow-clip { overflow: clip; }
  .pointer-none { pointer-events: none; }
  .pointer-auto { pointer-events: auto; }
  .md-only { display: none; }
  @media (min-width: 48rem) { .md-only { display: block; } .mobile-only { display: none; } }
  .w-full { width: 100%; }
  .object-cover { object-fit: cover; width: 100%; height: 100%; }
  .aspect-3-2 { aspect-ratio: 3 / 2; }
  .aspect-4-3 { aspect-ratio: 4 / 3; }
  .aspect-16-9 { aspect-ratio: 16 / 9; }
  .mt-2 { margin-top: calc(var(--u) * 2); }
  .mt-5 { margin-top: calc(var(--u) * 5); }
  .mt-6 { margin-top: calc(var(--u) * 6); }
  .mt-8 { margin-top: calc(var(--u) * 8); }
  .mt-24 { margin-top: calc(var(--u) * 24); }
  .mb-5 { margin-bottom: calc(var(--u) * 5); }
  .mb-6 { margin-bottom: calc(var(--u) * 6); }
  .mb-display { margin-bottom: var(--display-mb); }
  .pt-6 { padding-top: calc(var(--u) * 6); }
  .pb-6 { padding-bottom: calc(var(--u) * 6); }
  .pt-24 { padding-top: calc(var(--u) * 24); }
  .pb-43 { padding-bottom: calc(var(--u) * 43); }
  .py-8 { padding-block: calc(var(--u) * 8); }
  .gap-5 { gap: calc(var(--u) * 5); }
  .col-span-4 { grid-column: span 4 / span 4; }
  .col-span-7 { grid-column: span 7 / span 7; }
  .col-span-12 { grid-column: span 12 / span 12; }
  @media (min-width: 48rem) {
    .md\:col-span-7 { grid-column: span 7 / span 7; }
    .md\:col-start-6 { grid-column-start: 6; }
    .md\:col-span-5 { grid-column: span 5 / span 5; }
    .md\:col-span-6 { grid-column: span 6 / span 6; }
    .md\:col-start-7 { grid-column-start: 7; }
    .md\:max-w-66 { max-width: 66%; }
  }
  .text-right { text-align: right; }
  .flex { display: flex; }
  .items-end { align-items: flex-end; }
  .items-center { align-items: center; }
  .justify-between { justify-content: space-between; }
  .flex-col { flex-direction: column; }
  .gap-2 { gap: calc(var(--u) * 2); }
  .gap-4 { gap: calc(var(--u) * 4); }
}

/* Readable static layout: no script, or a missing animation dependency. */
html:not(.js) *, html:not(.js) *::before, html:not(.js) *::after { animation: none !important; transition: none !important; }
html:not(.js) main { transform: none !important; }
html:not(.js) .hero { height: 100svh; visibility: visible !important; }
html:not(.js) .hero__sticky { height: 100svh; }
html:not(.js) .hero-overlap { margin-top: 0; }
html:not(.js) .hero__scene, html:not(.js) .hero__layers,
html:not(.js) [data-line], html:not(.js) [data-line] .char,
html:not(.js) [data-hero-row], html:not(.js) [data-hero-row] > *,
html:not(.js) [data-hero-date], html:not(.js) [data-hero-time],
html:not(.js) [data-hero-plus], html:not(.js) [data-hero-note] {
  transform: none !important; clip-path: none !important; opacity: 1 !important; visibility: visible !important;
}
html:not(.js) .reveal-lines, html:not(.js) .reveal-words, html:not(.js) .reveal-chars,
html:not(.js) .line, html:not(.js) .word, html:not(.js) .char,
html:not(.js) .inview-fade, html:not(.js) .credit,
html:not(.js) .timeline__item, html:not(.js) .timeline__title h3,
html:not(.js) .reveal-image img, html:not(.js) .reveal-image video,
html:not(.js) .reveal-image .ph, html:not(.js) .timeline__reveal img {
  opacity: 1 !important; visibility: visible !important; translate: 0 0 !important; transform: none !important;
}
html:not(.js) .reveal-divider { transform: scaleX(1) !important; }
html:not(.js) .timeline__media, html:not(.js) .timeline__reveal,
html:not(.js) .timeline__frame, html:not(.js) .wordmark__frame { clip-path: none !important; transform: none !important; }
html:not(.js) .timeline__speedo, html:not(.js) .raster,
html:not(.js) .transition-scrim, html:not(.js) .transition-panel,
html:not(.js) .pill-nav { display: none !important; }
html:not(.js) .stack { height: auto; }
html:not(.js) .stack__viewport { position: static; height: auto; display: flex; flex-direction: column-reverse; }
html:not(.js) .stack__slide { position: static; display: flex; flex-direction: column; transform: none !important; clip-path: none !important; }
html:not(.js) .stack__media { position: relative; height: auto; aspect-ratio: 3 / 2; transform: none !important; }
html:not(.js) .stack__media-inner, html:not(.js) .stack__media img { transform: none !important; }
html:not(.js) .stack__media img { height: 100%; }
html:not(.js) .stack__caption { position: static; height: auto; max-width: none; width: 100%; background: var(--bg); transform: none !important; }
html:not(.js) .stack__layer { display: none; }
html:not(.js):not(.is-static) .burger { display: none; }
html.is-static .menu { visibility: hidden !important; opacity: 0 !important; pointer-events: none; }
html.is-static .menu.is-open { visibility: visible !important; opacity: 1 !important; clip-path: none !important; pointer-events: auto; }
html.is-static .menu.is-open a, html.is-static .menu.is-open .menu__footer { transform: none !important; opacity: 1 !important; visibility: visible !important; }

/* Reduced motion also removes scroll-driven scenes and presents every slide. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .hero { height: 100svh; visibility: visible !important; }
  .hero__sticky { height: 100svh; }
  .hero-overlap { margin-top: 0; }
  .reveal-lines .line, .reveal-words .word, .reveal-chars .char { transition: none; translate: 0 0; transform: none; opacity: 1; }
  .reveal-lines:where(html.js *), .reveal-words:where(html.js *), .reveal-chars:where(html.js *) { opacity: 1; }
  .reveal-divider { transition: none; transform: scaleX(1); }
  .reveal-image img, .reveal-image video, .reveal-image .ph { opacity: 1; animation: none; }
  .burger, .burger span, .pill-nav, .nav__link::before, .nav__link > span, .timeline__item, .timeline__media { transition: none; }
  .timeline__speedo, .raster { display: none; }
  .timeline__item, .timeline__title h3, .timeline__reveal img { opacity: 1 !important; transform: none !important; }
  .timeline__media, .timeline__reveal, .timeline__frame, .wordmark__frame { clip-path: none !important; transform: none !important; }
  .stack { height: auto; }
  .stack__viewport { position: static; height: auto; display: flex; flex-direction: column-reverse; }
  .stack__slide { position: static; display: flex; flex-direction: column; transform: none !important; clip-path: none !important; }
  .stack__media { position: relative; height: auto; aspect-ratio: 3 / 2; transform: none !important; }
  .stack__media-inner, .stack__media img { transform: none !important; }
  .stack__media img { height: 100%; }
  .stack__caption { position: static; height: auto; max-width: none; width: 100%; background: var(--bg); transform: none !important; }
  .stack__layer { display: none; }
}

/* Explicit reduced-motion comparison mode. */
html.is-reduced *, html.is-reduced *::before, html.is-reduced *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }html.is-reduced .hero { height: 100svh; visibility: visible !important; }html.is-reduced .hero__sticky { height: 100svh; }html.is-reduced .hero-overlap { margin-top: 0; }html.is-reduced .reveal-lines .line, html.is-reduced .reveal-words .word, html.is-reduced .reveal-chars .char { transition: none; translate: 0 0; transform: none; opacity: 1; }html.is-reduced .reveal-lines:where(html.js *), html.is-reduced .reveal-words:where(html.js *), html.is-reduced .reveal-chars:where(html.js *) { opacity: 1; }html.is-reduced .reveal-divider { transition: none; transform: scaleX(1); }html.is-reduced .reveal-image img, html.is-reduced .reveal-image video, html.is-reduced .reveal-image .ph { opacity: 1; animation: none; }html.is-reduced .burger, html.is-reduced .burger span, html.is-reduced .pill-nav, html.is-reduced .nav__link::before, html.is-reduced .nav__link > span, html.is-reduced .timeline__item, html.is-reduced .timeline__media { transition: none; }html.is-reduced .timeline__speedo, html.is-reduced .raster { display: none; }html.is-reduced .timeline__item, html.is-reduced .timeline__title h3, html.is-reduced .timeline__reveal img { opacity: 1 !important; transform: none !important; }html.is-reduced .timeline__media, html.is-reduced .timeline__reveal, html.is-reduced .timeline__frame, html.is-reduced .wordmark__frame { clip-path: none !important; transform: none !important; }html.is-reduced .stack { height: auto; }html.is-reduced .stack__viewport { position: static; height: auto; display: flex; flex-direction: column-reverse; }html.is-reduced .stack__slide { position: static; display: flex; flex-direction: column; transform: none !important; clip-path: none !important; }html.is-reduced .stack__media { position: relative; height: auto; aspect-ratio: 3 / 2; transform: none !important; }html.is-reduced .stack__media-inner, html.is-reduced .stack__media img { transform: none !important; }html.is-reduced .stack__media img { height: 100%; }html.is-reduced .stack__caption { position: static; height: auto; max-width: none; width: 100%; background: var(--bg); transform: none !important; }html.is-reduced .stack__layer { display: none; }

