/* Syzora Health: scroll hero module ("night to dawn"). Needs tokens.css.
   Two modes:
   1. Static (default; no JS, reduced motion, forced colours, viewports under 40rem tall,
      a final frame that does not fit the stage, or any script failure):
      the final composed frame (official mark, h1, sentence, Contact us) plus the four
      narration lines as calm text.
   2. Scrubbed (html.js, motion allowed, no forced colours, viewport at least 40rem tall): a pinned stage.
      hero.js writes --p and the eased stage variables listed below on .hero; every
      visual here is derived from them. The timeline itself lives in hero.js (STAGES).
   All rules are scoped under .hero, except the short "page hooks" block for the
   header (data-hero-header) and the page background. */

@property --t   { syntax: "<number>"; inherits: false; initial-value: 0; }
@property --tt  { syntax: "<number>"; inherits: false; initial-value: 0; }
@property --u   { syntax: "<number>"; inherits: false; initial-value: 1; }
@property --tw  { syntax: "<number>"; inherits: false; initial-value: 0; }
@property --twe { syntax: "<number>"; inherits: false; initial-value: 0; }

/* =====================================================================
   Static hero (default)
   ===================================================================== */
.hero { position: relative; background: var(--color-ground); color: var(--color-ink); }
.hero__stage {
  position: relative; overflow: hidden;
  min-height: 100vh; min-height: 100svh;
  display: flex; flex-direction: column; justify-content: center;
  padding: 7rem 0 4.5rem;
}
.hero__scene { display: none; }

.hero__copy {
  width: 100%; max-width: var(--stage-max); margin-inline: auto;
  padding-inline: var(--gutter);
  display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.7fr);
  align-items: center; column-gap: clamp(2rem, 6vw, 6rem);
}
.hero__text { max-width: 44rem; }
.hero__title {
  margin: 0;
  font-weight: 600;
  font-size: var(--fs-display); /* shared with the 404 */
  line-height: 1.02;
  letter-spacing: -0.035em;
  text-wrap: balance;
}
.hero__lead {
  margin: 1.5rem 0 0; max-width: 34rem;
  font-size: var(--fs-lead); line-height: var(--lh-lead);
  color: var(--color-ink);
  text-wrap: pretty;
}
/* Same spec as .btn in site.css: 48 px, saffron hover, 0.97 press, transparent border for forced colours. */
.hero__button {
  margin-top: 2.25rem;
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 calc(1.5rem - 1px);
  border: 1px solid transparent;
  background: var(--color-ink); color: var(--color-ground);
  font-weight: 600; font-size: 1.0625rem; line-height: 1; text-decoration: none;
  border-radius: var(--radius-1);
  -webkit-tap-highlight-color: transparent;
  transition: transform var(--dur-press) var(--ease-out), background-color var(--dur-ui) ease, color var(--dur-ui) ease;
}
.hero__button:focus-visible { outline: var(--focus-width) solid var(--focus-on-ground); outline-offset: var(--focus-offset); }
@media (hover: hover) and (pointer: fine) { .hero__button:hover { background-color: var(--color-accent); color: var(--color-ink); } }
.hero__button:active { transform: scale(0.97); }
@media (prefers-reduced-motion: reduce) {
  .hero__button:active { transform: none; background-color: var(--color-accent); color: var(--color-ink); }
}

.hero__slot { position: relative; width: min(100%, 25rem); aspect-ratio: 1; justify-self: center; }
.hero__slot svg { position: absolute; inset: 0; width: 100%; height: 100%; }

.hero__story {
  width: 100%; max-width: var(--stage-max);
  margin: clamp(3rem, 6vw, 4.5rem) auto 0;
  padding-inline: var(--gutter);
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.25rem clamp(1.5rem, 3vw, 3rem);
}
.hero__story::before { content: ""; grid-column: 1 / -1; height: 1px; background: var(--color-line); }
.hero__line {
  margin: 0;
  font-weight: 600; font-size: 1.25rem; line-height: 1.3; letter-spacing: -0.01em;
  color: var(--color-ink); text-wrap: balance;
}

@media (max-width: 767px) {
  .hero__stage { padding: 5.5rem 0 3.5rem; }
  .hero__copy { grid-template-columns: minmax(0, 1fr); row-gap: 2rem; }
  /* phone: the mark sits top right, opposite the header lockup, above the copy */
  .hero__slot { order: -1; width: 46vw; justify-self: end; margin-right: -4.6vw; }
  .hero__story { grid-template-columns: minmax(0, 1fr); }
  .hero__line { font-size: 1.125rem; }
}
/* Portrait tablet: the phone's stacked composition at a larger scale (static and scrubbed).
   hero.js reads the slot rect, so the mark's fly-in follows. */
@media (min-width: 768px) and (max-width: 63.999rem) and (orientation: portrait) {
  .hero__copy { grid-template-columns: minmax(0, 1fr); row-gap: 3rem; align-content: center; }
  .hero__slot { order: -1; width: min(42vw, 22rem); justify-self: end; }
  .hero__text { max-width: 40rem; }
}

/* =====================================================================
   Page hooks (outside .hero): header lockup tone, page background.
   The link's accessible name always comes from the white lockup's alt,
   so both images stay rendered and only cross-fade.
   ===================================================================== */
[data-hero-header] .brand__colour { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); }
[data-hero-header] .brand__white { opacity: 0; }
[data-hero-header] .brand__colour { opacity: 1; }

/* =====================================================================
   Scrubbed experience. Keep this media query identical to SCRUB_QUERY in hero.js and to the
   header query in site.css. 40rem: on shorter screens (200% zoom, small phones) the final frame
   does not fit the pinned stage, so they get the static hero. hero.js also checks the fit.
   ===================================================================== */
@media (prefers-reduced-motion: no-preference) and (min-height: 40rem) and (forced-colors: none) {

  /* Night canvas (top overscroll, scrollbar). At dawn (data-day) it turns to ground. */
  html.js { background: var(--color-ink); scrollbar-color: var(--color-line-night) var(--color-ink); scroll-padding-top: 6rem; }
  html.js body { background: var(--color-ink); }
  html.js:has(.hero[data-day]) { background: var(--color-ground); scrollbar-color: #B4BCCB var(--color-ground); }
  html.js:has(.hero[data-day]) body { background: var(--color-ground); }

  html.js [data-hero-header] {
    position: fixed;
    transition: background-color 240ms var(--ease-out), box-shadow 240ms var(--ease-out);
  }
  html.js [data-hero-header] .brand img { transition: opacity 240ms var(--ease-out); }
  html.js [data-hero-header] .brand__white { opacity: 1; }
  html.js [data-hero-header] .brand__colour { opacity: 0; }
  html.js [data-hero-header] .brand:focus-visible { outline-color: var(--focus-on-ink); }
  html.js [data-hero-header][data-tone="day"] .brand__white { opacity: 0; }
  html.js [data-hero-header][data-tone="day"] .brand__colour { opacity: 1; }
  html.js [data-hero-header][data-tone="day"] .brand:focus-visible { outline-color: var(--focus-on-ground); }
  html.js [data-hero-header][data-solid] { background-color: var(--color-ground); box-shadow: inset 0 -1px 0 var(--color-line); }

  html.js .hero {
    /* Stage variables. hero.js writes them every frame; these defaults are frame 0. */
    --p: 0; --g: 0; --wh: 0; --rs: 0; --rt: 0; --av: 0; --ah: 0;
    --ax: 0; --axa: 0; --lt: 0; --lr: 0; --lf: 0; --lw: 0; --ls: 0; --lc: 0; --lh: 0; --wm: 0; --dn: 0; --w: 0;
    --bs: 0.32; --bo: 0; --bd: 0; --ba: -28; --bl: 0; --bk: 0.55; --br: 0.16; --bwb: 1; --bwc: 0.7;
    --fm: 0; --c1: 0; --c2: 0; --c3: 0;
    --n1: 1; --n1y: 0; --n2a: 0; --n2ay: 14; --n2b: 0; --n2by: 14; --n2c: 0; --n2cy: 14;
    --n3: 0; --n3y: 18; --n4: 0; --n4y: 18;
    --fx: 0px; --fy: 0px; --fs: 1;
    /* Composition (hero.js reads --spread). */
    --M: min(50vh, 36vw);   /* mark size */
    --mark-cy: 43%;         /* mark centre, from the stage top */
    --spread: 0.6;          /* how far apart the two halves start, in mark widths */
    height: 400vh;
    background: var(--color-ink);
  }
  @supports (height: 1svh) {
    html.js .hero { --M: min(50svh, 36vw); height: 400svh; }
  }
  /* Matches the dawn, so the strip under a 100svh stage (iOS toolbar collapsed) is never dark. */
  html.js .hero[data-day] { background: var(--color-ground); }

  html.js .hero__stage {
    position: sticky; top: 0;
    height: 100vh; height: 100svh; min-height: 0;
    display: block; padding: 0;
    overflow: hidden;
    background: var(--color-ink);
    color: var(--color-ground);
  }
  html.js .hero__scene { display: block; position: absolute; inset: 0; pointer-events: none; }

  /* The room warms a little when the light opens (opacity of a flat layer). */
  html.js .hero__warm { position: absolute; inset: 0; background: var(--color-dawn-1); opacity: calc(var(--wm) * 0.6); }

  /* Dawn: a horizon band rises from below. Edge = the gradient (0.75 of the stage),
     day = flat ground under it. Both move by transform only; total travel 1.75 stages. */
  html.js .hero__dawn-edge,
  html.js .hero__dawn-day { position: absolute; left: 0; right: 0; will-change: transform; }
  html.js .hero__dawn-edge {
    top: 100%; height: 75%;
    background: linear-gradient(to bottom,
      rgba(27, 42, 74, 0) 0%, var(--color-dawn-1) 20%, var(--color-dawn-2) 50%,
      var(--color-dawn-3) 78%, var(--color-ground) 100%);
    transform: translate3d(0, calc(var(--dn) * -175vh), 0);
  }
  html.js .hero__dawn-day {
    top: calc(175% - 2px); height: calc(100% + 4px);
    background: var(--color-ground);
    transform: translate3d(0, calc(var(--dn) * -175vh), 0);
  }
  @supports (height: 1svh) {
    html.js .hero__dawn-edge,
    html.js .hero__dawn-day { transform: translate3d(0, calc(var(--dn) * -175svh), 0); }
  }

  /* The mark: a square box in the 100-unit space of the official geometry.
     At the end it moves (transform only) into the empty .hero__slot of the final layout. */
  html.js .hero__mark {
    position: absolute;
    width: var(--M); height: var(--M);
    left: calc(50% - var(--M) / 2);
    top: calc(var(--mark-cy) - var(--M) / 2);
    transform:
      translate3d(calc(var(--fx) * var(--fm)), calc(var(--fy) * var(--fm)), 0)
      scale(calc(1 + (var(--fs) - 1) * var(--fm)));
    will-change: transform;
  }
  html.js .hero[data-final] .hero__mark { will-change: auto; } /* re-raster crisp at rest */

  /* One axis: a saffron hairline drawn from the diamond centre through the seam. */
  html.js .hero__axis {
    position: absolute; left: 50%; top: -12%;
    width: 1px; height: 124%; margin-left: -0.5px;
    background: linear-gradient(to bottom,
      rgba(227, 162, 26, 0), rgba(227, 162, 26, 0.95) 22%, rgba(227, 162, 26, 0.95) 78%, rgba(227, 162, 26, 0));
    transform: scaleY(var(--ax));
    opacity: var(--axa);
    will-change: transform, opacity;
  }

  /* Light: clipped to the cut (diamond + seam), so it is always a crisp diamond.
     Night window = the part of the mark above the dawn line (--w = share below it). */
  html.js .hero__light,
  html.js .hero__day { position: absolute; inset: 0; overflow: hidden; will-change: transform; }
  html.js .hero__light-in,
  html.js .hero__day-in { position: absolute; inset: 0; will-change: transform; }
  html.js .hero__light    { transform: translate3d(0, calc(var(--w) * -100%), 0); }
  html.js .hero__light-in { transform: translate3d(0, calc(var(--w) * 100%), 0); }
  html.js .hero__day      { transform: translate3d(0, calc((1 - var(--w)) * 100%), 0); }
  html.js .hero__day-in   { transform: translate3d(0, calc((var(--w) - 1) * 100%), 0); }
  html.js .hero__light svg,
  html.js .hero__day svg,
  html.js .hero__solid { position: absolute; inset: 0; width: 100%; height: 100%; }
  html.js .hero__light-core { opacity: var(--lc); will-change: opacity; }
  html.js .hero__light-hot  { opacity: var(--lh); will-change: opacity; }
  /* The light lives in the cut. The halves are painted above it, so the cut itself is the window and
     no clip-path animates. Sequence (hero.js STAGE MAP): a point of cream light ignites on the hairline
     at the diamond centre and runs out along the seam (--lt, --lr); saffron fills the seam wall to wall
     under it (--lf) and widens into the diamond (--ls); the cut runs hot while the bloom is up (--lh);
     the rest core comes up under it (--lc). */
  /* Saffron band: the box of the diamond (x 31.5 to 68.5, y 22 to 78; its top and bottom edges are the
     seam mouths). Opaque from its first frame (bright, never brown); it grows in width only, so its
     leading edges stay crisp: 1.6 units (under the filament), 6.8 (the seam, wall to wall), 37 (the diamond). */
  html.js .hero__light-band {
    position: absolute; left: 31.5%; top: 22%; width: 37%; height: 56%;
    /* circle of 30 units at the notch centre: gold at the heart, saffron to the seam ends */
    background: radial-gradient(ellipse 81.08% 53.57% at 50% 50%,
      #F4C452 0%, #EDB43A 45%, #E3A21A 60%, rgba(227, 162, 26, 0.82) 95%);
    opacity: var(--lw);
    transform: scaleX(calc(0.0432 + 0.1406 * var(--lf) + 0.8162 * var(--ls)));
    will-change: transform, opacity;
  }
  /* The filament: cream with a saffron halo. Its box is twice the seam's height, so once it passes the
     diamond it reads as an even line cut flush by the seam mouths (the static wrapper), not a lens
     inside the diamond (no slit-pupil read). It starts as a point (scale 0.06), runs out at an even speed,
     thickens as the seam fills, and hands over to the saffron before the diamond is wide (no streak). */
  html.js .hero__light-seam { position: absolute; left: 0; right: 0; top: 22%; height: 56%; overflow: hidden; }
  html.js .hero__light-thread {
    position: absolute; left: 47%; top: -50%; width: 6%; height: 200%;
    background: radial-gradient(closest-side,
      #FFFFFF 0%, var(--light-core) 24%, rgba(244, 196, 82, 0.8) 44%,
      rgba(227, 162, 26, 0.4) 68%, rgba(227, 162, 26, 0) 100%);
    opacity: var(--lt);
    transform: scale(calc(0.4 + 0.6 * var(--lf)), calc(0.06 + 0.94 * var(--lr)));
    will-change: transform, opacity;
  }

  /* Light: option E "axis flare" of the 25 Nov 2026 light lab. All parts are BEHIND the halves.
     A = body: a medium gold bloom, 1.5 marks in diameter.
     S = streak: one soft horizontal streak through the notch, 5.2 marks wide (it grows in width only).
     V = beam: a soft vertical beam along the seam, 2.7 marks tall (it grows in height only).
     L = hairline: a 2 px cream line on the streak, 6 marks wide.
     A, S and V are half their drawn size and are scaled up by 2. Per frame only transform and opacity change.
     The stage clips the parts that are wider than the screen.
     Amber (239, 165, 69) and rose (224, 135, 106) are NEW light colours. They need founder approval.
     hero.js is the same file as in version 9; the lobe variables (--bl, --bk, --br, --ba, --bwb, --bwc)
     are not used here. */
  html.js .hero__bloom { position: absolute; left: 50%; top: 50%; width: 0; height: 0; visibility: hidden; }
  html.js .hero[data-bloom] .hero__bloom { visibility: visible; }
  html.js .hero__bloom > span { position: absolute; left: 0; top: 0; will-change: transform, opacity; }
  html.js .hero__bloom-a {
    width: calc(var(--M) * 0.75); height: calc(var(--M) * 0.75);
    margin: calc(var(--M) * -0.375) 0 0 calc(var(--M) * -0.375);
    background: radial-gradient(closest-side, #F6CC62 0%, #EFB546 34%, rgba(234, 166, 58, 0.66) 56%,
      rgba(239, 165, 69, 0.24) 76%, transparent 100%);
    transform: scale(calc(var(--bs) * 2));
    opacity: calc(var(--bo) * 0.9);
  }
  html.js .hero__bloom-s {
    width: calc(var(--M) * 2.6); height: calc(var(--M) * 0.25);
    margin: calc(var(--M) * -0.125) 0 0 calc(var(--M) * -1.3);
    background: radial-gradient(closest-side, rgba(255, 243, 209, 0.95) 0%, rgba(244, 196, 82, 0.62) 14%,
      rgba(239, 165, 69, 0.26) 40%, rgba(224, 135, 106, 0.08) 70%, transparent 100%);
    transform: scale(calc(var(--bs) * 2), 2);
    opacity: var(--bo);
  }
  html.js .hero__bloom-v {
    width: calc(var(--M) * 0.21); height: calc(var(--M) * 1.35);
    margin: calc(var(--M) * -0.675) 0 0 calc(var(--M) * -0.105);
    background: radial-gradient(closest-side, rgba(255, 243, 209, 0.9) 0%, rgba(244, 196, 82, 0.58) 22%,
      rgba(239, 165, 69, 0.22) 55%, transparent 100%);
    transform: scale(2, calc(var(--bs) * 2));
    opacity: var(--bo);
  }
  html.js .hero__bloom-l {
    width: calc(var(--M) * 6); height: 2px;
    margin: -1px 0 0 calc(var(--M) * -3);
    background: linear-gradient(to right, transparent, rgba(255, 243, 209, 0.9) 30%, #FFFFFF 50%,
      rgba(255, 243, 209, 0.9) 70%, transparent);
    transform: scaleX(var(--bs));
    opacity: var(--bo);
  }

  /* Fallback light: option A "current bloom" (one small soft bloom, 1.2 marks in diameter, no streak, no beam).
     It is on when the hero has data-light="a". The page ships with data-light="e". */
  html.js .hero[data-light="a"] .hero__bloom-s,
  html.js .hero[data-light="a"] .hero__bloom-v,
  html.js .hero[data-light="a"] .hero__bloom-l { display: none; }
  html.js .hero[data-light="a"] .hero__bloom-a {
    width: calc(var(--M) * 0.6); height: calc(var(--M) * 0.6);
    margin: calc(var(--M) * -0.3) 0 0 calc(var(--M) * -0.3);
    background: radial-gradient(closest-side, var(--light-core) 0%, #F8D785 40%, rgba(244, 196, 82, 0.9) 52%,
      rgba(237, 180, 58, 0.66) 61%, rgba(242, 179, 86, 0.42) 69%, rgba(247, 178, 114, 0.22) 77%,
      rgba(247, 178, 114, 0.08) 86%, transparent 100%);
    opacity: calc(var(--bo) * 0.92);
  }

  /* The two halves: spread apart and out of register until they align (vertical, then close). */
  html.js .hero__half { position: absolute; inset: 0; will-change: transform; }
  html.js .hero__half--stock { transform: translate3d(calc(-100% * var(--spread) * (1 - var(--ah))), calc(-12% * (1 - var(--av))), 0); }
  html.js .hero__half--foil  { transform: translate3d(calc(100% * var(--spread) * (1 - var(--ah))), calc(10% * (1 - var(--av))), 0); }
  html.js .hero__tiles, html.js .hero__strays { position: absolute; inset: 0; }
  html.js .hero__solid { opacity: var(--rs); }
  html.js .hero__solid path { fill: #FFFFFF; } /* the official reversed mark */
  html.js .hero[data-tiles-off] .hero__tiles,
  html.js .hero[data-tiles-off] .hero__strays { visibility: hidden; }
  html.js .hero[data-daymark] .hero__half,
  html.js .hero[data-daymark] .hero__light,
  html.js .hero[data-daymark] .hero__axis,
  html.js .hero[data-daymark] .hero__bloom { visibility: hidden; }

  /* Slips (built by hero.js). Each carries its scatter offset (--dx/--dy, px), depth (--z),
     start scale (--s0), start opacity (--o0), tilt (--rz), stagger (--d), base grey (--tc)
     and its place in the brightening front (--wd). */
  html.js .hero__frag {
    position: absolute;
    --t: clamp(0, calc((var(--g) - var(--d)) * 1.6667), 1);
    --tt: calc(var(--t) * var(--t) * (3 - 2 * var(--t)));
    --u: calc(1 - var(--tt));
    transform:
      translate3d(calc(var(--dx) * var(--u)), calc((var(--dy) - var(--z) * var(--p) * 300px) * var(--u)), 0)
      rotate(calc(var(--rz) * var(--u)))
      scale(calc(1 - (1 - var(--s0)) * var(--u)));
    will-change: transform, opacity;
  }
  html.js .hero__tile {
    --tw: clamp(0, calc((var(--wh) - var(--wd)) * 2.5), 1);
    --twe: calc(var(--tw) * var(--tw) * (3 - 2 * var(--tw)));
    background-color: color-mix(in srgb, color-mix(in srgb, var(--tc), var(--color-fog) calc(var(--tt) * 24%)), #FFFFFF calc(var(--twe) * 100%));
    opacity: calc((var(--o0) + (1 - var(--o0)) * var(--tt)) * (1 - var(--rt)));
  }
  html.js .hero__stray { background-color: var(--tc); opacity: calc(var(--o0) * (1 - var(--tt))); }

  /* Narration: one cell under the mark; never over it. */
  html.js .hero__story {
    position: absolute; left: 0; right: 0; bottom: 4%;
    top: calc(var(--mark-cy) + var(--M) * 0.44 + 2rem);
    max-width: none; margin: 0; padding: 0 var(--gutter);
    display: grid; grid-template-columns: minmax(0, 1fr); place-items: center;
    text-align: center;
    pointer-events: none;
  }
  html.js .hero__story::before { content: none; }
  html.js .hero__line {
    grid-area: 1 / 1;
    font-size: clamp(2rem, 1.2rem + 2.4vw, 3rem);
    line-height: 1.1; letter-spacing: -0.03em;
    color: var(--color-ground);
    opacity: var(--o);
    transform: translate3d(0, calc(var(--y) * 1px), 0);
    will-change: transform, opacity;
    /* Text guard. The beam along the seam reaches this cell. Measured in the light lab: 3.4:1 without it, 6.8:1 or more with it. */
    text-shadow:
      0 0 0.14em rgb(27 42 74 / calc(var(--bo) * 0.95)), 0 0 0.34em rgb(27 42 74 / calc(var(--bo) * 0.9)),
      0 0 0.7em rgb(27 42 74 / calc(var(--bo) * 0.8)), 0 0 1.3em rgb(27 42 74 / calc(var(--bo) * 0.6));
  }
  html.js .hero[data-light="a"] .hero__line { text-shadow: none; } /* the small bloom does not reach the text */
  html.js .hero__line--1 { --o: var(--n1); --y: var(--n1y); color: var(--color-fog); }
  html.js .hero__line--1 span:first-child { color: var(--color-ground); }
  html.js .hero__line--3 { --o: var(--n3); --y: var(--n3y); }
  html.js .hero__line--4 { --o: var(--n4); --y: var(--n4y); }
  /* n2: each phrase sits under the part it becomes: stock, light, foil. */
  html.js .hero__line--2 { --o: 1; --y: 0; will-change: auto; }
  html.js .hero__line--2 span { display: block; opacity: var(--so); will-change: transform, opacity; }
  html.js .hero__line--2 span:nth-child(1) { --so: var(--n2a); --sy: var(--n2ay); --side: -1; }
  html.js .hero__line--2 span:nth-child(2) { --so: var(--n2b); --sy: var(--n2by); --side: 0; }
  html.js .hero__line--2 span:nth-child(3) { --so: var(--n2c); --sy: var(--n2cy); --side: 1; }

  /* Wide screens: the three phrases in one row, centred under stock, seam and foil. */
  @media (min-width: 64rem) {
    html.js .hero__line--2 {
      width: 100%;
      display: grid; place-items: center;
      /* scale with the mark on short, wide windows so the three phrases never touch */
      font-size: min(clamp(1.5rem, 0.9rem + 1.4vw, 2.25rem), calc(var(--M) * 0.085));
    }
    /* Each phrase wraps inside its own column, so wider letter or word spacing (WCAG 1.4.12)
       can never push it into its neighbour. */
    html.js .hero__line--2 span {
      grid-area: 1 / 1;
      width: max-content;
      max-width: calc(max((0.215 + var(--spread)) * var(--M), 18rem) - 1.5rem);
      text-align: center;
      transform: translate3d(calc(var(--side) * max((0.215 + var(--spread)) * var(--M), 18rem)), calc(var(--sy) * 1px), 0);
    }
  }
  /* Narrower: stacked, each phrase aligned to its part (left, centre, right). */
  @media (max-width: 63.999rem) {
    html.js .hero__line--2 {
      display: flex; flex-direction: column;
      width: calc(var(--M) * (0.8 + 2 * var(--spread))); max-width: 100%;
    }
    html.js .hero__line--2 span { transform: translate3d(0, calc(var(--sy) * 1px), 0); }
    html.js .hero__line--2 span:nth-child(1) { text-align: left; }
    html.js .hero__line--2 span:nth-child(3) { text-align: right; }
  }

  /* Final copy: laid out in its resting place; the mark flies into the empty slot. */
  html.js .hero__copy { position: absolute; inset: 0; }
  html.js .hero__text { color: var(--color-ink); }
  html.js .hero__slot { visibility: hidden; }
  html.js .hero__title,
  html.js .hero__lead,
  html.js .hero__button { will-change: transform, opacity; }
  html.js .hero__title  { opacity: var(--c1); transform: translate3d(0, calc((1 - var(--c1)) * 22px), 0); }
  html.js .hero__lead   { opacity: var(--c2); transform: translate3d(0, calc((1 - var(--c2)) * 18px), 0); }
  html.js .hero__button { opacity: var(--c3); transform: translate3d(0, calc((1 - var(--c3)) * 14px), 0); }
  html.js .hero__button:active { transform: scale(0.97); }
  /* While the scroll drives it, the button follows the scroll exactly (no time-based lag). */
  html.js .hero:not([data-final]) .hero__button { transition: none; }
  html.js .hero:not([data-final]) .hero__copy { pointer-events: none; }

  /* Tablet: stacked n2, closer start; a larger mark when the screen is portrait. */
  @media (max-width: 63.999rem) {
    html.js .hero { --spread: 0.25; }
  }
  @media (min-width: 768px) and (max-width: 63.999rem) and (orientation: portrait) {
    html.js .hero { --M: min(56vw, 42vh); }
    @supports (height: 1svh) { html.js .hero { --M: min(56vw, 42svh); } }
  }

  /* Phone (portrait): its own composition. */
  @media (max-width: 767px) {
    /* 360svh: touch flicks travel far, so each narration beat needs at least 200 px of scroll. */
    html.js .hero { --M: min(82vw, 42vh); --mark-cy: 40%; --spread: 0.1; height: 360vh; }
    @supports (height: 1svh) {
      html.js .hero { --M: min(82vw, 42svh); height: 360svh; }
    }
    html.js .hero__copy { align-content: center; padding-top: 3rem; }
    html.js .hero__story { bottom: 5%; }
    html.js .hero__line--2 { font-size: clamp(1.5rem, 1rem + 2.6vw, 1.75rem); }
  }
}
