/* Homepage scroll story (scroll-story.js). Base styles are a static list (no JavaScript); .story--live pins the section and
   plays the canvas animation against scroll; .story--still (prefers-reduced-motion) shows the finished picture above the list. */
.story { position: relative; background: radial-gradient(50% 60% at 70% 45%, rgba(122,32,40,.28), transparent 70%), radial-gradient(40% 50% at 85% 80%, rgba(91,58,140,.2), transparent 70%), var(--ink); border-top: 1px solid var(--line-dark); }
.story-pin { padding: 5rem 0; }
.story-canvas { display: none; }
.story-title { font-size: clamp(2rem, 4vw, 2.9rem); margin-bottom: 2.5rem; }
.story-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2rem; margin: 0; padding: 0; list-style: none; }
.story-num { display: block; font-size: .72rem; letter-spacing: .16em; color: var(--muted-dark); margin-bottom: .75rem; }
.story-step h3 { font-size: 1.45rem; line-height: 1.15; margin-bottom: .6rem; }
.story-step p { margin: 0; font-size: .9rem; color: #d6d4ce; }
.story-progress { display: none; }
@media (max-width: 62rem) { .story-steps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 40rem) { .story-pin { padding: 3.5rem 0; } .story-steps { grid-template-columns: 1fr; gap: 1.5rem; } }

/* Still picture for reduced motion */
.story--still .story-canvas { display: block; width: 100%; height: 24rem; margin-bottom: 1rem; }

/* Live: a tall section with a pinned full-screen stage; the copy shows one step at a time */
.story--live { height: 420vh; }
.story--live .story-pin { position: sticky; top: 0; height: 100vh; height: 100svh; padding: 0; overflow: hidden; }
.story--live .story-canvas { display: block; position: absolute; inset: 0; width: 100%; height: 100%; }
/* Desktop: a soft dark fade behind the copy so flying tiles never compete with the text */
.story--live .story-pin::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(90deg, rgba(11,11,12,.92) 0%, rgba(11,11,12,.78) 30%, rgba(11,11,12,0) 52%); }
.story--live .story-copy { position: relative; z-index: 2; height: 100%; display: flex; flex-direction: column; justify-content: center; padding-top: var(--nav-h); pointer-events: none; }
.story--live .story-copy > * { max-width: 26rem; }
.story--live .story-title { margin-bottom: 1.75rem; font-size: clamp(1.6rem, 2.6vw, 2.1rem); color: var(--muted-dark); }
.story--live .story-steps { display: block; position: relative; min-height: 13rem; }
.story--live .story-step { position: absolute; inset: 0 0 auto 0; opacity: 0; transform: translate3d(0, 18px, 0); transition: opacity .5s ease, transform .6s cubic-bezier(.2,.7,.2,1); }
.story--live .story-step.is-on { opacity: 1; transform: none; }
.story--live .story-step h3 { font-size: clamp(2.2rem, 4.2vw, 3.6rem); line-height: 1.04; margin-bottom: 1rem; }
.story--live .story-step p { font-size: 1rem; max-width: 24rem; }
.story--live .story-num { font-size: .8rem; color: #e6a0b0; }
.story--live .story-progress { display: block; height: 2px; width: 10rem; background: var(--line-dark); margin-top: 1.5rem; }
.story--live .story-progress span { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, #efede7, #b06a7a); transform-origin: left; transform: scaleX(var(--story-p, 0)); }

/* Phones: the animation fills the top of the screen and the copy sits at the bottom over a fade */
@media (max-width: 62rem) {
  .story--live { height: 360vh; }
  .story--live .story-pin::after { display: none; }
  .story--live .story-copy { justify-content: flex-end; padding-bottom: 2.5rem; }
  .story--live .story-copy::before { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 52%; z-index: -1;
    background: linear-gradient(180deg, transparent, rgba(11,11,12,.88) 38%, var(--ink)); }
  .story--live .story-title { display: none; }
  .story--live .story-steps { min-height: 11rem; }
  .story--live .story-step h3 { font-size: clamp(1.9rem, 8vw, 2.5rem); }
  .story--live .story-step p { font-size: .92rem; }
}
