/* Thinkwill homepage: one night at a gate, dusk to dawn.
   Built on the scroll-craft engine (vendor/scrollcraft). Engine selectors are the mechanism;
   everything here styles our own markup. Plan and score: _build/scrollcraft/BRIEF.md */
body.home {
  --sc-canvas: #0b0c10;
  --sc-surface: #14151b;
  --sc-ink: #f4f3f1;
  --sc-ink-soft: #a9a9b2;
  --sc-accent: #e60000;
  --sc-accent-ink: #ffffff;
  --sc-font-display: "Geist", system-ui, sans-serif;
  --sc-font-text: "Geist", system-ui, sans-serif;
  --sc-font-mono: "Geist Mono", ui-monospace, monospace;
  --night: #0b0c10;
  --dawn-top: #f3d5c4;
  --dawn-bottom: #ffffff;
  background: var(--sc-canvas);
  color: var(--sc-ink);
}
.home .sc-display { font-weight: 600; }
.home .hud { color: var(--sc-ink-soft); }

/* Header floats over the night; the pill stays light so the logo reads */
.home .hdr { position: fixed; left: 0; right: 0; }
.home .hdr-in { background: color-mix(in srgb, var(--surface) 86%, transparent); }
.home [data-sc-progress] { z-index: 120; }
.btn-ghost-dark { background: transparent; color: var(--sc-ink); box-shadow: inset 0 0 0 1px rgba(255,255,255,.28); }
.btn-ghost-dark:hover { background: rgba(255,255,255,.08); }

/* ------------------------------------------------ signature: the DVR clock --
   A fixed on-screen display. Scroll drives the clock from 18:00 to 06:00, so
   reading the page is watching one night pass on the recorder. */
.tw-osd {
  --nt: 0;
  position: fixed; z-index: 90; left: var(--sc-gutter); bottom: 22px; width: min(420px, calc(100vw - 2 * var(--sc-gutter)));
  display: grid; gap: 10px; padding: 14px 18px 14px; border-radius: 16px;
  font: 500 12px/1 var(--sc-font-mono); letter-spacing: .08em; text-transform: uppercase; color: #fff;
  background: rgba(8, 9, 12, .78); backdrop-filter: blur(14px) saturate(1.2); -webkit-backdrop-filter: blur(14px) saturate(1.2);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12), inset 3px 0 0 #e60000, 0 18px 40px -12px rgba(0, 0, 0, .7);
  font-variant-numeric: tabular-nums;
  transition: opacity .4s var(--sc-ease-out), transform .4s var(--sc-ease-out);
}
.tw-osd.off { opacity: 0; transform: translateY(12px); pointer-events: none; }
.tw-osd-top, .tw-osd-mid, .tw-osd-night { display: flex; align-items: center; gap: 12px; }
.tw-rec { display: inline-flex; align-items: center; gap: 6px; padding: 5px 8px 5px 7px; border-radius: 6px; background: #e60000; font-weight: 600; letter-spacing: .12em; }
.tw-rec .rec { width: 7px; height: 7px; border-radius: 50%; background: #fff; animation: blink 1.2s steps(2, jump-none) infinite; }
.tw-osd-cam { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tw-osd-time { font: 600 clamp(28px, 2.6vw, 38px)/1 var(--sc-font-mono); letter-spacing: .02em; }
.tw-osd-date { color: #a9a9b2; }
.tw-osd-net { display: inline-flex; align-items: center; gap: 6px; color: #a9a9b2; }
.tw-osd .bars { display: inline-flex; align-items: flex-end; gap: 2px; height: 10px; }
.tw-osd .bars i { width: 3px; background: #3ddc84; border-radius: 1px; }
.tw-osd .bars i:nth-child(1) { height: 30%; } .tw-osd .bars i:nth-child(2) { height: 55%; } .tw-osd .bars i:nth-child(3) { height: 80%; } .tw-osd .bars i:nth-child(4) { height: 100%; }
.tw-osd-night { font-size: 10.5px; color: #a9a9b2; }
.tw-osd-bar { flex: 1; height: 3px; border-radius: 3px; background: rgba(255, 255, 255, .14); overflow: hidden; }
.tw-osd-bar i { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, #e60000, #ff7a45); transform-origin: left; transform: scaleX(var(--nt)); }
.tw-osd.cut { animation: cut .5s ease-out; }
@keyframes cut { 0% { box-shadow: inset 0 0 0 2px #fff, inset 3px 0 0 #e60000, 0 0 0 6px rgba(230, 0, 0, .35); filter: brightness(1.8); } 100% { filter: none; } }
@keyframes blink { 50% { opacity: .15; } }
/* Camera-feed corners around the whole screen: you are watching a Thinkwill feed */
.tw-frame { position: fixed; inset: 12px; z-index: 89; pointer-events: none; transition: opacity .4s; }
.tw-frame.off { opacity: 0; }
.tw-frame i { position: absolute; width: 34px; height: 34px; border: 0 solid rgba(255, 255, 255, .85); filter: drop-shadow(0 0 2px rgba(0, 0, 0, .55)); }
.tw-frame i:nth-child(1) { top: 0; left: 0; border-top-width: 2px; border-left-width: 2px; }
.tw-frame i:nth-child(2) { top: 0; right: 0; border-top-width: 2px; border-right-width: 2px; }
.tw-frame i:nth-child(3) { bottom: 0; left: 0; border-bottom-width: 2px; border-left-width: 2px; }
.tw-frame i:nth-child(4) { bottom: 0; right: 0; border-bottom-width: 2px; border-right-width: 2px; }
/* Phones: the panel and corners crowd a small screen, so the story runs without them */
@media (max-width: 640px) {
  .tw-osd, .tw-frame { display: none; }
}

/* ------------------------------------------------ scene blends --
   home.js overlaps each .blend-in act with the one before and publishes --fi
   (0..1) as the overlap is scrolled, so the incoming stage dissolves in over the
   outgoing one, which is still pinned underneath. */
.blend-in.blending > [data-sc-stage] { opacity: var(--fi, 1); pointer-events: none; }
.blend-in.blend-live > [data-sc-stage] { pointer-events: auto; }
@media (prefers-reduced-motion: no-preference) {
  .blend-in.blending > [data-sc-stage] { transform: scale(calc(1.035 - var(--fi, 1) * .035)); transform-origin: 50% 60%; }
}
/* Words crossfade in two steps across each overlap: the outgoing scene's copy
   is gone by the midpoint (--fo), the incoming scene's copy arrives after it
   (--fi), so two headlines never stack, even on a fast flick. */
.act-range .rail { opacity: clamp(0, calc(1 - var(--fo, 0) * 2.4), 1); }
[data-sc-act] [data-sc-cue] > * { opacity: clamp(0, min(calc((var(--fi, 1) - .5) * 2.4), calc(1 - var(--fo, 0) * 2.4)), 1); }
/* The peak fades back to night as it ends, so the setup copy rises out of the
   same dark instead of the scene sliding away as a block. */
.blend-in.blending.act-peak > [data-sc-stage] { opacity: min(var(--fi, 1), clamp(0, calc((.93 - var(--sc-p, 0)) * 12), 1)); }

/* ------------------------------------------------ act 1: dusk at the gate --
   Five planes, back to front: sky, far hills and a 4G tower, skyline, headline,
   boundary wall and gate, then the camera on its pole closest to you.
   --sc-p (0..1 across the pin) sets the sun and drives each plane at its own rate. */
.hero-stage { background: #1b2448; }
.pl { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; pointer-events: none; }
.pl-sky { background: linear-gradient(180deg, #1b2448 0%, #4d3f6e 42%, #c8706a 72%, #f2a35e 100%); }
.sky-night { position: absolute; inset: 0; background: linear-gradient(180deg, #04050a 0%, #0b1024 55%, #1a2140 100%); opacity: clamp(0, calc((var(--sc-p, 0) - .08) * 2.2), 1); }
.sun { position: absolute; left: 62%; top: 58%; width: 9vmin; height: 9vmin; border-radius: 50%; background: radial-gradient(circle, #fff1c9 0%, #ffc070 55%, rgba(255,160,90,0) 72%); transform: translateY(calc(var(--sc-p, 0) * 14vh)); opacity: calc(1 - var(--sc-p, 0) * 2.2); }
.stars { position: absolute; inset: 0 0 45% 0; opacity: clamp(0, calc((var(--sc-p, 0) - .35) * 2), 1);
  background-image: radial-gradient(1.2px 1.2px at 12% 18%, #fff, transparent), radial-gradient(1px 1px at 27% 32%, #fff, transparent), radial-gradient(1.4px 1.4px at 41% 12%, #fff, transparent), radial-gradient(1px 1px at 58% 26%, #fff, transparent), radial-gradient(1.2px 1.2px at 72% 9%, #fff, transparent), radial-gradient(1px 1px at 86% 30%, #fff, transparent), radial-gradient(1px 1px at 93% 14%, #fff, transparent), radial-gradient(1px 1px at 6% 40%, #fff, transparent), radial-gradient(1.2px 1.2px at 35% 44%, #fff, transparent), radial-gradient(1px 1px at 79% 46%, #fff, transparent); }
.pl-far .tower { opacity: .9; }
.pl-far .beacon { animation: blink 2s steps(2, jump-none) infinite; }
.win { opacity: clamp(0, calc((var(--sc-p, 0) - .2) * 2.4), 1); }
.lamp { opacity: clamp(.15, calc((var(--sc-p, 0) - .25) * 3), 1); filter: drop-shadow(0 0 12px #ffcf7a); }
.led { opacity: clamp(.2, calc(var(--sc-p, 0) * 3), 1); animation: blink 1.4s steps(2, jump-none) infinite; }
.hero-floor { position: absolute; inset: auto 0 0 0; height: 220px; background: linear-gradient(to bottom, transparent, var(--night)); }
.hero-copy { inset-inline: var(--sc-gutter) auto; left: var(--sc-gutter); top: clamp(108px, 17vh, 170px); bottom: auto; max-width: min(66rem, 88vw); display: grid; gap: 22px; justify-items: start; }
.hero-copy :is(h1, h2) { color: #fff; font-size: clamp(2.7rem, 6.2vw, 6.4rem); }
.hero-copy .sc-lede { max-width: 40ch; }
.hero-copy .sc-lede { color: #e7e3ee; }
.hero-copy .hud { color: #d9d4e4; }
.hero-night .hud b { color: #ffc96b; }
.hero-night { pointer-events: none; }
@media (prefers-reduced-motion: no-preference) {
  .pl-far { transform: translateY(calc(var(--sc-p, 0) * -1.5vh)); }
  .pl-city { transform: translateY(calc(var(--sc-p, 0) * -4vh)); }
  .pl-wall { transform: translateY(calc(var(--sc-p, 0) * -10vh)); }
  .pl-pole { transform: translate(calc(var(--sc-p, 0) * -2vw), calc(var(--sc-p, 0) * -16vh)) scale(calc(1 + var(--sc-p, 0) * .08)); transform-origin: 90% 100%; }
}
/* Phones: the copy owns the top of the frame and the scene is squeezed into the
   band below it, so the buttons never sit on the skyline and the camera clears
   the DVR bar. Sizes use svh so Safari's toolbars can't push things together. */
@media (max-width: 760px) {
  .hero-copy { top: 88px; gap: 14px; max-width: none; right: var(--sc-gutter); }
  .hero-copy :is(h1, h2) { font-size: clamp(2.1rem, 10.4vw, 2.7rem); }
  .hero-copy .sc-lede { font-size: 1rem; line-height: 1.5; }
  .hero-copy .actions { gap: 10px; flex-wrap: nowrap; }
  .hero-copy .btn { padding: 12px 16px; font-size: .95rem; white-space: nowrap; }
  .pl-far, .pl-city, .pl-wall { top: auto; bottom: 0; height: 58svh; }
  .pl-pole { top: auto; bottom: 0; height: 52svh; }
  .hero-floor { height: 120px; }
  .sun { left: 26%; top: 70%; width: 12vmin; height: 12vmin; }
}
@media (max-width: 760px) and (max-height: 700px) {
  .hero-copy { top: 80px; gap: 12px; }
  .hero-copy :is(h1, h2) { font-size: clamp(2rem, 9.4vw, 2.4rem); }
  .hero-copy .sc-lede { font-size: .95rem; }
  .pl-far, .pl-city, .pl-wall { height: 50svh; }
  .pl-pole { height: 46svh; }
}

/* ------------------------------------------------ act 2: the problem, set in type */
.tension-stage { background: var(--night); display: grid; align-items: center;
  /* local progress of each problem scene, from the act's --sc-p */
  --q1: clamp(0, calc((var(--sc-p, 0) - .2) / .2), 1);
  --q2: clamp(0, calc((var(--sc-p, 0) - .5) / .24), 1);
}
.tension-grid { width: 100%; max-width: var(--sc-maxw); margin: 0 auto; padding-inline: var(--sc-gutter); display: grid; grid-template-columns: 1fr minmax(0, 1fr); gap: clamp(2rem, 5vw, 5rem); align-items: center; }
.tension-lines { position: relative; height: 46vh; }
.t-line { position: absolute; inset: 0 0 auto 0; margin: 0; display: grid; gap: 18px; align-content: start; }
.t-line h2 { margin: 0; font: 600 var(--sc-t-3xl)/1.02 var(--sc-font-display); letter-spacing: var(--sc-track-tight); color: var(--sc-ink); max-width: 14ch; text-wrap: balance; }
.t-kicker { margin: 0; } .t-kicker b { color: #ff5a4e; font-weight: 500; }
.t-fix { margin: 6px 0 0; display: flex; gap: 12px; align-items: baseline; max-width: 34ch; font-size: 1.12rem; line-height: 1.45; color: #e6e6ea; }
.t-fix .t-ok { flex: none; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: #1f9d55; transform: translateY(3px); }
.t-ok svg { width: 14px; height: 14px; fill: none; stroke: #fff; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.t1 .t-fix { --q: var(--q1); } .t2 .t-fix { --q: var(--q2); }
.t-fix { opacity: clamp(0, calc((var(--q) - .5) * 6), 1); transform: translateY(calc((1 - clamp(0, calc((var(--q) - .5) * 6), 1)) * 12px)); }

/* The three drawings share one square on the right */
.tension-vis { position: relative; aspect-ratio: 1; width: min(100%, 62vh); justify-self: center; }
.tv { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; fill: none; stroke: #c9cbd2; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.tv text { stroke: none; font: 600 14px/1 var(--sc-font-mono); letter-spacing: .1em; text-anchor: middle; }
.tv * { transform-box: fill-box; }
.g-ground { stroke: rgba(255,255,255,.18); }
/* Every scene: the problem on the left, then the fix arrives on the right
   and the problem dims, so the change reads at a glance */
.tv .prob { opacity: calc(1 - clamp(0, (var(--q) - .45) * 2, .68)); }
.tv .sol { opacity: clamp(0, calc((var(--q) - .38) * 5), 1); transform: translateX(calc((1 - clamp(0, (var(--q) - .38) * 3, 1)) * 60px)); }
.tv .x { stroke: #ff5a4e; stroke-width: 5; }
/* 01 - the line is cut, then a 4G tower lights the badge */
.tv-net { --q: var(--q1); }
.tv-net .pole { stroke: #8f93a3; }
.tv-net .wire { stroke: #8f93a3; stroke-width: 4; }
.tv-net .wire-drop { transform-origin: 100% 0; transform: rotate(calc(var(--q) * -40deg)); }
.tv-net .spark { stroke: #ffb020; fill: #ffb020; animation: flick .18s steps(2, jump-none) infinite; }
.tv-net .nosvc { fill: #ff5a4e; }
.tv-net .tower { stroke: #f4f3f1; }
.tv-net .beacon { fill: #ff3b2f; stroke: none; }
.tv-net .badge rect:first-child { fill: #14151b; stroke: rgba(255,255,255,.2); stroke-width: 1.5; }
.tv-net .b { stroke: none; fill: rgba(255,255,255,.18); }
.tv-net .b1 { fill: color-mix(in srgb, #3ddc84 calc(clamp(0, (var(--q) - .5) * 8, 1) * 100%), rgba(255,255,255,.18)); }
.tv-net .b2 { fill: color-mix(in srgb, #3ddc84 calc(clamp(0, (var(--q) - .58) * 8, 1) * 100%), rgba(255,255,255,.18)); }
.tv-net .b3 { fill: color-mix(in srgb, #3ddc84 calc(clamp(0, (var(--q) - .66) * 8, 1) * 100%), rgba(255,255,255,.18)); }
.tv-net .b4 { fill: color-mix(in srgb, #3ddc84 calc(clamp(0, (var(--q) - .74) * 8, 1) * 100%), rgba(255,255,255,.18)); }
.tv-net .ok { fill: #3ddc84; font-size: 22px; opacity: clamp(0, calc((var(--q) - .6) * 6), 1); }
.tv-net .sim { stroke: #ffc96b; fill: rgba(255, 201, 107, .12); transform: translateY(calc((1 - clamp(0, (var(--q) - .45) * 3, 1)) * -30px)); }
.ring { stroke: #3ddc84; stroke-width: 2; transform-origin: 50% 50%; animation: ring 2.2s ease-out infinite; }
.ring.r2 { animation-delay: 1.1s; } .ring.r3 { animation-delay: .73s; }
/* 02 - a dead socket, then the sun charges a battery through the panel */
.tv-power { --q: var(--q2); }
.tv-power .socket { stroke: #8f93a3; opacity: calc(1 - clamp(0, (var(--q) - .45) * 2, .7)); }
.tv-power .socket .x { stroke: #ff5a4e; stroke-width: 5; }
.tv-power .plug { stroke: #8f93a3; transform-origin: 50% 100%; transform: rotate(calc(var(--q) * -10deg)); opacity: calc(1 - clamp(0, (var(--q) - .45) * 2, .7)); }
.tv-power .sun { stroke: #ffc96b; fill: none; opacity: clamp(0, calc((var(--q) - .3) * 5), 1); transform: translateY(calc((1 - clamp(0, (var(--q) - .3) * 3, 1)) * 40px)); }
.tv-power .sun circle { fill: #ffc96b; }
.tv-power .panel { stroke: #9fb4ff; fill: rgba(80, 110, 220, .18); opacity: clamp(0, calc((var(--q) - .38) * 5), 1); transform: translateX(calc((1 - clamp(0, (var(--q) - .38) * 3, 1)) * 60px)); }
.tv-power .battery rect { stroke: #f4f3f1; }
.tv-power .battery .tip { fill: #f4f3f1; }
.tv-power .battery .fill { stroke: none; fill: #3ddc84; transform-origin: 0 50%; transform: scaleX(clamp(.04, calc((var(--q) - .5) * 2.2), 1)); }
.tv-power .battery text { fill: #3ddc84; opacity: clamp(0, calc((var(--q) - .55) * 6), 1); }
.tv-power .battery { opacity: clamp(.35, calc((var(--q) - .35) * 4), 1); }
@keyframes ring { from { transform: scale(.6); opacity: .9; } to { transform: scale(2.6); opacity: 0; } }
@keyframes flick { 50% { opacity: .2; } }
@media (max-width: 860px) {
  .tension-grid { grid-template-columns: 1fr; gap: 1rem; align-content: center; height: 100%; padding-top: 84px; }
  .tension-vis { order: -1; width: min(100%, 38svh); }
  .tension-lines { height: 40svh; }
  .t-line h2 { font-size: clamp(1.9rem, 8.4vw, 2.6rem); }
  .t-fix { font-size: 1rem; }
}
@media (prefers-reduced-motion: reduce) { .ring, .spark { animation: none; } }

/* ------------------------------------------------ act 3, the peak: lights out */
.peak-stage { background: #000; }
.peak-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; transition: filter .7s var(--sc-ease-out), opacity .5s; }
.peak-stage[data-mode="night"] .scene { filter: brightness(.09) saturate(.3) contrast(1.1); }
.peak-stage[data-mode="ir"] .scene { filter: grayscale(1) brightness(1.35) contrast(1.25); }
.peak-stage[data-mode="colour"] .scene { filter: saturate(1.1) brightness(1.05); }
.peak-stage .grain { mix-blend-mode: screen; opacity: 0; }
.peak-stage[data-mode="ir"] .grain { opacity: .5; }
.peak-stage[data-mode="night"] .grain { opacity: .22; }
.peak-mode { position: absolute; z-index: 5; top: clamp(96px, 14vh, 130px); left: var(--sc-gutter); margin: 0; color: #fff; font-size: 13px; padding: 7px 11px; border: 1px solid rgba(255,255,255,.35); border-radius: 8px; }
.peak-stage .corner { position: absolute; z-index: 4; top: 50%; left: 50%; width: 30px; height: 30px; border: 0 solid rgba(255,255,255,.7); }
.peak-stage .corner.a { transform: translate(-150%, -150%); border-top-width: 1.5px; border-left-width: 1.5px; }
.peak-stage .corner.b { transform: translate(50%, -150%); border-top-width: 1.5px; border-right-width: 1.5px; }
.peak-stage .corner.c { transform: translate(-150%, 50%); border-bottom-width: 1.5px; border-left-width: 1.5px; }
.peak-stage .corner.d { transform: translate(50%, 50%); border-bottom-width: 1.5px; border-right-width: 1.5px; }
.peak-copy { --sc-canvas: #000; max-width: min(36rem, 80vw); bottom: clamp(5rem, 14vh, 9rem); }
.peak-copy .sc-display { color: #fff; }
.peak-copy .sc-lede { color: #e6e6ea; margin-top: 14px; margin-left: auto; }
.peak-stage .sc-scrim { --sc-canvas: #000; }
@media (max-width: 860px) { .peak-copy .sc-lede { margin-left: 0; } .peak-stage .corner { display: none; } }

/* ------------------------------------------------ act 4: substance, in flow */
/* Pulled up into the peak's last, already-dark stretch so the copy rises
   straight out of the night instead of after an empty screen. */
.act-substance { position: relative; z-index: 2; margin-top: -55vh; margin-top: -55svh; padding-block: clamp(2rem, 4vw, 4rem) clamp(4rem, 8vw, 8rem); }
.sub-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: clamp(2.5rem, 6vw, 6rem); align-items: end; }
.sub-steps { list-style: none; padding: 0; margin: 2rem 0 0; display: grid; gap: 0; counter-reset: s; }
.sub-steps li { counter-increment: s; display: grid; grid-template-columns: auto 1fr; gap: 1.1rem; align-items: start; padding: 1.2rem 0; border-top: 1px solid var(--sc-hairline); color: var(--sc-ink-soft); max-width: 50ch; }
.step-txt::before { display: block; content: "0" counter(s); font: 500 11px/1 var(--sc-font-mono); color: #ff4a3d; letter-spacing: .12em; margin: .25rem 0 .45rem; }
.sub-steps b { color: var(--sc-ink); font-weight: 600; }
.sub-stats { display: grid; gap: 1.6rem; }
.sub-stats p { margin: 0; display: grid; grid-template-columns: auto 1fr; column-gap: 1.2rem; row-gap: 4px; align-items: center; padding-bottom: 1.2rem; border-bottom: 1px solid var(--sc-hairline); }
.sub-stats p .ico { grid-row: span 2; width: 64px; height: 64px; border-radius: 18px; }
.sub-stats p .ico svg { width: 30px; height: 30px; }
/* line icons: tile pops in, strokes draw themselves once the block is revealed */
.ico { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 15px;
  background: linear-gradient(160deg, color-mix(in oklab, var(--sc-ink) 9%, transparent), color-mix(in oklab, var(--sc-ink) 3%, transparent));
  box-shadow: inset 0 0 0 1px var(--sc-hairline), inset 0 1px 0 color-mix(in oklab, var(--sc-ink) 10%, transparent);
  color: var(--sc-ink); opacity: 0; transform: scale(.8); transition: opacity .5s ease, transform .7s cubic-bezier(.2,.9,.3,1.3); }
.ico svg { width: 27px; height: 27px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; overflow: visible; }
.ico svg .a { stroke: #ff4a3d; }
.ico svg > * { stroke-dasharray: 1 1; stroke-dashoffset: 1; transition: stroke-dashoffset 1s cubic-bezier(.6,0,.2,1); }
.ico svg .a { transition-delay: .45s; }
.sc-in .ico, .sc-in.ico { opacity: 1; transform: none; }
.sc-in .ico svg > * { stroke-dashoffset: 0; }
.sub-steps li:nth-child(2) .ico, .sub-steps li:nth-child(2) .ico svg > * { transition-delay: .18s; }
.sub-steps li:nth-child(2) .ico svg .a { transition-delay: .63s; }
.sub-steps li:nth-child(3) .ico, .sub-steps li:nth-child(3) .ico svg > * { transition-delay: .36s; }
.sub-steps li:nth-child(3) .ico svg .a { transition-delay: .81s; }
.sub-steps li:hover .ico svg .a, .sub-stats p:hover .ico svg .a { animation: ico-nudge .6s ease; }
@keyframes ico-nudge { 50% { transform: translateY(-1.5px); } }
@media (prefers-reduced-motion: reduce) { .ico, .ico svg > * { transition: none !important; opacity: 1; transform: none; stroke-dashoffset: 0; } }
@media (max-width: 640px) { .ico { width: 42px; height: 42px; border-radius: 12px; } .ico svg { width: 21px; height: 21px; } .sub-stats p .ico { width: 52px; height: 52px; border-radius: 15px; } .sub-stats p .ico svg { width: 25px; height: 25px; } }
.sub-num { font: 600 var(--sc-t-3xl)/1 var(--sc-font-display); letter-spacing: var(--sc-track-tight); }
@media (max-width: 860px) { .sub-grid { grid-template-columns: 1fr; } }

/* ------------------------------------------------ act 5: the range, panned */
.range-stage { background: var(--night); display: flex; align-items: center; }
.rail { gap: clamp(14px, 2vw, 24px); padding-inline: var(--sc-gutter); align-items: stretch; }
.rail-lead { flex: 0 0 clamp(16rem, 26vw, 24rem); display: grid; gap: 16px; align-content: center; padding-right: 2rem; }
.rail-lead .arrow, .rail-note .arrow { color: #ff5a4e; }
.rc { flex: 0 0 clamp(15rem, 22vw, 19rem); }
.rc-link { display: grid; gap: 8px; padding: 10px 10px 22px; border-radius: 22px; background: var(--sc-surface); box-shadow: var(--sc-edge), var(--sc-e2); height: 100%; }
.rc-link:hover { box-shadow: inset 0 0 0 1px rgba(255, 74, 61, .5), var(--sc-e2); }
.rc .stage { aspect-ratio: 1 / 1; margin-bottom: 8px; }
.rc .hud, .rc h3, .rc-facts { padding-inline: 10px; }
.rc .hud b { color: #ff5a4e; }
.rc h3 { font-size: 1.2rem; letter-spacing: -0.02em; margin: 0; }
.rc-facts { list-style: none; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.rc-facts li { font: 500 11px/1 var(--sc-font-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--sc-ink-soft); padding: 6px 8px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--sc-hairline-strong); }
.rail-note { display: grid; gap: 12px; align-content: center; padding: 28px; border-radius: 22px; box-shadow: inset 0 0 0 1px var(--sc-hairline-strong); }
.rail-note h3 { margin: 0; font-size: 1.5rem; letter-spacing: -0.02em; }
@media (prefers-reduced-motion: no-preference) {
  /* Cards settle in sequence as the rail travels, like a drawer being pulled */
  .rc { --s: clamp(0, calc(var(--sc-p, 0) * 10 - var(--i) + 2.2), 1); opacity: calc(.55 + .45 * var(--s)); transform: translateY(calc((1 - var(--s)) * 26px)); }
}

/* ------------------------------------------------ act 6: dawn, the close */
.close-stage { background: linear-gradient(180deg, var(--dawn-top) 0%, #fbe9dc 45%, var(--dawn-bottom) 100%); color: var(--fg); display: grid; place-items: center; --sc-accent: #e60000; }
.close-inner { max-width: 52rem; padding-inline: var(--sc-gutter); text-align: center; display: grid; gap: 22px; justify-items: center; }
.close-inner .sc-display { color: var(--fg); }
.close-lede { color: var(--fg-2); max-width: 40ch; }
.close-kicker { color: var(--fg-2) !important; }
.close-kicker b { color: var(--accent); }
.close-actions { justify-content: center; }
.home .ftr { background: var(--bg); color: var(--fg-2); }
.home .ftr h4, .home .ftr a:hover { color: var(--fg); }
@media (max-width: 380px) {
  .hero-copy .actions { gap: 8px; }
  .hero-copy .btn { padding: 11px 13px; font-size: .9rem; }
}
