/* Archibald Crooks — hero scrub styles. Engineering per scrub-pipeline.md.
   The five static-hero gate queries here are character-identical to GATES in hero.js. */

.hero{position:relative;height:800vh}
.hero-stage{position:sticky;top:0;height:100vh;overflow:hidden;background:var(--canvas)}

.hero-poster{position:absolute;inset:0;background-size:cover;background-position:center}
#hero-video{
  position:absolute;inset:0;width:100%;height:100%;object-fit:cover;
  opacity:0;transition:opacity 1.2s var(--ease-out);
  will-change:transform;transform:translateZ(0);
}
.hero-stage.video-ready #hero-video{opacity:1}
.hero-stage.video-failed #hero-video{display:none}

/* Global base scrim — always on, no raw frame behind the page */
.hero-scrim{position:absolute;inset:0;pointer-events:none;background:radial-gradient(ellipse 120% 90% at 50% 45%,rgba(10,10,14,0) 35%,rgba(10,10,14,.62) 100%)}

/* Loading ring — honest progress, replaced by cue on failure */
.hero-ring{position:absolute;bottom:2.2rem;left:50%;transform:translateX(-50%);color:var(--accent);opacity:.85;transition:opacity .8s var(--ease-out)}
.hero-ring.done{opacity:0}
.hero-ring.failed{display:none}
.hero-ring circle{transition:stroke-dashoffset .12s linear}

/* Caption bands — flanked text over centred action; two-sided scrim variant */
.band{
  position:absolute;inset:0;display:flex;align-items:center;
  visibility:hidden;opacity:0;pointer-events:none;
  text-shadow:var(--tshadow);
  padding:0 clamp(1.5rem,7vw,7rem);
}
.band .band-copy{position:relative;z-index:1}
/* ch caps live on the text elements themselves, never the container (quality floor).
   Flank lines stay narrow so the columns never reach the lit action lane. */
.band .band-line{max-width:20ch}
.band h1{max-width:18ch}
.band--center .band-line{max-width:26ch}
.hero-static .band-line{max-width:70ch;margin-inline:auto;text-wrap:balance}
.band--left{justify-content:flex-start}
.band--right{justify-content:flex-end}
/* Early dusk bands sit low, over the dark building silhouettes, clear of the bright sky.
   Their scrim ellipses re-anchor with them — a scrim must live where its text lives. */
.band--low{align-items:flex-end;padding-bottom:14vh}
.band--low.band--left::before{background:radial-gradient(ellipse 46% 56% at 22% 74%,rgba(5,5,10,var(--scrim,.62)) 0%,rgba(5,5,10,calc(var(--scrim,.62) * .66)) 46%,rgba(5,5,10,0) 76%)}
.band--low.band--right::before{background:radial-gradient(ellipse 46% 56% at 78% 74%,rgba(5,5,10,var(--scrim,.62)) 0%,rgba(5,5,10,calc(var(--scrim,.62) * .66)) 46%,rgba(5,5,10,0) 76%)}
/* The settle on the brightest frame: a wide full-strength plateau under the whole text block,
   dying at the edges so the morning light still reads around it */
.band--settle.band--center::before{background:radial-gradient(ellipse 90% 74% at 50% 48%,rgba(5,5,10,var(--scrim,.62)) 0%,rgba(5,5,10,var(--scrim,.62)) 42%,rgba(5,5,10,calc(var(--scrim,.62) * .6)) 62%,rgba(5,5,10,0) 84%)}
.band--center{justify-content:center;text-align:center}
.band .kicker{display:block;margin-bottom:1.1rem}
.band h1,.band .band-line{color:var(--text-primary)}
.band .band-line{font-family:var(--font-display);font-weight:300;font-size:clamp(1.5rem,2.8vw,2.2rem);letter-spacing:.06em;line-height:1.35;margin:0}
/* Centring must come after the margin reset above — equal specificity, source order decides */
.band--center .band-line,.band--center h1{margin-inline:auto}
/* Settle subline: two lines against the one-line headline (2026-08-24) — one point down,
   a measure wide enough to break near the sentence midpoint, balanced wrapping.
   Placed after the base band-line rule so the size declaration wins the cascade. */
.band--settle .settle-sub{font-size:clamp(1.4rem,2.6vw,2.05rem);max-width:70ch;text-wrap:balance}
/* In-hero buttons keep the transparent-bordered look but carry the chip backing —
   small gold text over live footage needs a floor the scrim alone cannot guarantee */
.band .btn{text-shadow:none;pointer-events:auto;background:rgba(8,8,15,.7);backdrop-filter:blur(6px)}
.band .btn:hover{background:var(--accent)}
/* One CTA gap across the site, matched to the engage section's measured 20px.
   The flank-line margin reset zeroes text bottom-margins in bands, so the gap lives on the CTA row. */
.band .band-cta{margin-top:1.25rem}
.band .settle-cta{margin-top:1.25rem}
.hero-static .cta-row{margin-top:1.25rem}

/* Per-band scrims: ellipse anchored on the text column, centre lane left alone */
.band::before{
  content:"";position:absolute;inset:-4%;pointer-events:none;
  opacity:calc(.25 + .75 * var(--k,0));
}
.band--left::before{background:radial-gradient(ellipse 46% 62% at 22% 50%,rgba(5,5,10,var(--scrim,.62)) 0%,rgba(5,5,10,calc(var(--scrim,.62) * .66)) 46%,rgba(5,5,10,0) 76%)}
.band--right::before{background:radial-gradient(ellipse 46% 62% at 78% 50%,rgba(5,5,10,var(--scrim,.62)) 0%,rgba(5,5,10,calc(var(--scrim,.62) * .66)) 46%,rgba(5,5,10,0) 76%)}
.band--center::before{background:radial-gradient(ellipse 74% 58% at 50% 44%,rgba(5,5,10,var(--scrim,.62)) 0%,rgba(5,5,10,calc(var(--scrim,.62) * .66)) 46%,rgba(5,5,10,0) 76%)}

/* Entrances — transform/opacity only, scrubbed off --k, reversible */
.split .w{display:inline-block;white-space:nowrap}
.split .c{display:inline-block}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}

/* (c) blur-to-sharp: two stacked copies, STATIC blur on the soft one, opacity-only crossfade */
.ent-blur .stack{position:relative;display:block}
.ent-blur .copy-soft{filter:blur(10px);opacity:calc(1 - var(--k,0))}
.ent-blur .copy-sharp{position:absolute;inset:0;opacity:var(--k,0)}

/* (a) scatter */
.ent-scatter .c{
  --kc:clamp(0,calc((var(--k,0) - var(--th,0)) * 2.6),1);
  opacity:var(--kc);
  transform:translate(calc((1 - var(--kc)) * var(--jx,0px)),calc((1 - var(--kc)) * var(--jy,0px))) rotate(calc((1 - var(--kc)) * var(--jr,0deg)));
}
/* (b) grid snap-align: horizontal-only jitter, ordered thresholds set in JS via data-spread */
.ent-grid .c{
  --kc:clamp(0,calc((var(--k,0) - var(--th,0)) * 2.6),1);
  opacity:var(--kc);
  transform:translateX(calc((1 - var(--kc)) * var(--jx,24px)));
}
/* (f) drift-down */
.ent-drift .w{
  --kc:clamp(0,calc((var(--k,0) - var(--th,0)) * 2.8),1);
  opacity:var(--kc);
  transform:translateY(calc((1 - var(--kc)) * -24px));
}
/* (g) approach-from-depth */
.ent-approach .band-copy{
  --kc:var(--k,0);
  opacity:var(--kc);
  transform:scale(calc(0.82 + 0.18 * var(--kc)));
}
/* (h) halves parting: two .half spans, opposite signs via --dir */
.ent-halves .half{
  display:inline-block;
  --kc:var(--k,0);
  opacity:var(--kc);
  transform:translateX(calc((1 - var(--kc)) * var(--dir,1) * -1.2ch));
}
/* (e) word-by-word rise into staged settle (the ending band) */
.ent-rise .w{
  --kc:clamp(0,calc((var(--k,0) - var(--th,0)) * 3),1);
  opacity:var(--kc);
  transform:translateY(calc((1 - var(--kc)) * 26px));
}
.ent-rise .settle-sub{
  --ks:clamp(0,calc((var(--k,0) - 0.66) * 4),1);
  opacity:var(--ks);
  transform:translateY(calc((1 - var(--ks)) * 18px));
}
.ent-rise .settle-cta{
  --kb:clamp(0,calc((var(--k,0) - 0.78) * 5),1);
  opacity:var(--kb);
  transform:translateY(calc((1 - var(--kb)) * 14px));
}

/* Masked text descender room */
.band .mask{overflow:hidden;padding:.14em 0;margin:-.14em 0}

/* Pinned finals (reduced-motion flip mid-session) */
.band.pinned{visibility:visible;opacity:1}
.band.pinned .c,.band.pinned .w,.band.pinned .band-copy,.band.pinned .half,
.band.pinned .settle-sub,.band.pinned .settle-cta{opacity:1;transform:none}

/* Static hero — a designed layout, not an apology */
.hero-static{display:none;position:absolute;inset:0;align-items:flex-start;justify-content:center;text-align:center;padding:18vh 1.5rem 0;background-size:cover;background-position:center}
.hero-static .band-copy{max-width:none}
.hero-static::before{content:"";position:absolute;inset:0;background:radial-gradient(ellipse 80% 56% at 50% 30%,rgba(5,5,10,.66) 0%,rgba(5,5,10,.44) 48%,rgba(5,5,10,.18) 78%)}
.hero-static .inner{position:relative;text-shadow:var(--tshadow)}

/* The five gates — character-identical to hero.js GATES */
@media (max-width: 720px){.hero{height:100vh}.hero-stage .scrub-only{display:none}.hero-static{display:flex}}
@media (orientation: portrait) and (max-width: 1024px){.hero{height:100vh}.hero-stage .scrub-only{display:none}.hero-static{display:flex}}
@media (orientation: portrait) and (pointer: coarse){.hero{height:100vh}.hero-stage .scrub-only{display:none}.hero-static{display:flex}}
@media (orientation: landscape) and (pointer: coarse) and (max-height: 560px){.hero{height:100vh}.hero-stage .scrub-only{display:none}.hero-static{display:flex}}
@media (prefers-reduced-motion: reduce){.hero{height:100vh}.hero-stage .scrub-only{display:none}.hero-static{display:flex}}

/* Short scrub-capable windows: keep the scrub, hide small overlays */
@media (max-height:560px){.hero-cue,.hero-ring{display:none}}

/* Scroll cue */
.hero-cue{position:absolute;bottom:2rem;left:50%;transform:translateX(-50%);color:var(--text-secondary);font-family:var(--font-mono);font-size:.7rem;letter-spacing:.22em;text-transform:uppercase}
