/* Approach scroll story.
   Default (no JS, mobile, reduced motion): the existing .timeline layout from site.css,
   a plain list of four steps. story.js adds .story-on to #approach on wide screens with
   motion allowed; only then is the stage pinned and the steps cross-faded. */
.story-steps{list-style:none;margin:0;padding:0}
.story-progress,.story-visual{display:none}

@media (min-width:961px) and (prefers-reduced-motion:no-preference){
  /* Tall scroll container; the stage sticks under the 56px header while it scrolls past */
  .story-on .story-track{position:relative;height:calc(100vh - 56px + 210vh)}
  .story-on .story-stage{position:sticky;top:56px;height:calc(100vh - 56px);display:grid;grid-template-columns:1fr 1fr;align-items:center;gap:56px}

  /* Steps share one grid cell and cross-fade; inactive steps stay in the accessibility tree (opacity only) */
  .story-on .story-steps{display:grid;grid-template-columns:1fr;gap:0}
  .story-on .story-steps::before,.story-on .story-steps::after{display:none}
  .story-on .step{grid-area:1/1;opacity:0;transform:translateY(24px);transition:opacity .5s ease,transform .6s cubic-bezier(.2,.7,.2,1);pointer-events:none}
  .story-on .step.is-active{opacity:1;transform:none;pointer-events:auto}
  .story-on .step.is-past{transform:translateY(-24px)}
  .story-on .step .num,
  .story-on .timeline.in .step .num{width:auto;height:auto;border:0;border-radius:0;background:none;display:block;font-size:clamp(3rem,5vw,4.5rem);font-weight:700;line-height:1;letter-spacing:-.03em;color:var(--accent);transition:none}
  .story-on .step h3{margin:16px 0 12px;font-size:clamp(2.25rem,4vw,3.5rem);font-weight:700;letter-spacing:-.025em;line-height:1.08}
  .story-on .step p{font-size:1.25rem;line-height:1.45;max-width:26em}

  /* Progress: four short segments, filled up to the current step */
  .story-on .story-progress{display:flex;gap:8px;margin-top:40px}
  .story-on .story-progress span{width:40px;height:4px;border-radius:2px;background:var(--line-strong);transition:background .4s}
  .story-on .story-progress span.on{background:var(--accent)}

  /* Visual: one SVG, four groups cross-faded; monochrome plus the accent */
  .story-on .story-visual{display:block;justify-self:center;width:100%;max-width:440px}
  .story-visual svg{display:block;width:100%;height:auto;max-height:calc(100vh - 200px);overflow:visible}
  .story-visual .sv{opacity:0;transform:scale(.94);transform-origin:200px 160px;transition:opacity .5s ease,transform .6s cubic-bezier(.2,.7,.2,1)}
  .story-visual .sv.is-active{opacity:1;transform:none}
  .story-visual .sv-soft{fill:var(--surface);stroke:var(--line-strong);stroke-width:1.5}
  .story-visual .sv-frame{fill:var(--surface);stroke:var(--muted);stroke-width:2;stroke-linecap:round}
  .story-visual path.sv-frame{fill:none}
  .story-visual .sv-line{fill:none;stroke:var(--dim);stroke-width:4;stroke-linecap:round}
  .story-visual .sv-link{fill:none;stroke:var(--line-strong);stroke-width:2;stroke-dasharray:6 6}
  .story-visual .sv-dot{fill:var(--line-strong)}
  .story-visual .sv-acc-fill{fill:rgba(var(--accent-rgb),.14);stroke:var(--accent);stroke-width:2}
  .story-visual .sv-acc-ink{fill:none;stroke:var(--accent);stroke-width:4;stroke-linecap:round}
  .story-visual .sv-acc-solid{fill:var(--accent)}
  .story-visual .sv-check{fill:none;stroke:#fff;stroke-width:5;stroke-linecap:round;stroke-linejoin:round}

  /* Short windows: tighten type so the pinned stage never clips */
  @media (max-height:640px){
    .story-on .step .num{font-size:2.5rem}
    .story-on .step h3{font-size:2rem;margin:10px 0 8px}
    .story-on .story-progress{margin-top:24px}
  }
}
