/* "One blouse, from tape to trial": six-step scroll story (js/story.js). Everything is scoped to .story.
   Without .is-live (no JavaScript, reduced motion, very short screens) it is a plain list with the blouse. */
.story { background: var(--accent-tint); }
.story__inner { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: 48px; align-items: center; padding-top: 104px; padding-bottom: 104px; }
.story__copy { position: relative; }
.story__title { margin-bottom: 24px; font-size: clamp(24px, 2.4vw, 34px); font-weight: 600; line-height: 1.2; color: var(--ink); }
.story__rail { display: none; max-width: 480px; margin-bottom: 40px; }
.story__rail li { position: relative; flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
.story__rail li::before { content: ""; position: absolute; top: 15px; left: -50%; width: 100%; height: 2px; background: #eadbcd; }
.story__rail li:first-child::before { display: none; }
.story__rail li.is-done::before, .story__rail li.is-active::before { background: var(--accent); }
.story__rail b { position: relative; z-index: 1; display: grid; place-items: center; width: 32px; height: 32px; border: 2px solid #eadbcd; border-radius: 50%; background: var(--white); color: var(--muted); font-size: 14px; font-variant-numeric: tabular-nums; transition: background-color .3s, border-color .3s, color .3s; }
.story__rail li.is-done b { border-color: var(--accent); color: var(--accent-dark); }
.story__rail li.is-active b { border-color: var(--accent); background: var(--accent); color: var(--white); box-shadow: 0 0 0 4px rgb(164 80 26 / .2); }
.story__rail li.is-active span { color: var(--ink); font-weight: 600; }
.story__steps .step { margin-bottom: 28px; }
.story__steps h3 { margin-bottom: 12px; font-size: clamp(28px, min(3.2vw, 5.4vh), 44px); font-weight: 700; line-height: 1.12; }
.story__steps p { max-width: 440px; font-size: 17px; color: var(--ink-2); }
.story__note { font-size: 12px; color: var(--muted); }
.story__stage { display: flex; align-items: center; justify-content: center; height: min(560px, 80vh); padding: 24px; border: 1px solid #eadbcd; border-radius: var(--r-l); background: var(--white); box-shadow: 0 24px 48px -32px rgb(17 24 28 / .35); }
.story__stage svg { display: block; width: 100%; height: 100%; max-width: none; overflow: visible; }

/* the pictures that only make sense while the animation runs */
.story:not(.is-live) :is(#st-form, #st-card, #st-sheet, #st-projBeam, #st-projDev, #st-pieces, #st-scissors, #st-wa) { display: none; }

/* pinned: one screen, below the floating menu */
.story.is-live .story__inner { box-sizing: border-box; height: 100vh; height: 100svh; padding-top: 92px; padding-bottom: 20px; }
.story.is-live .story__rail { display: flex; }
.story.is-live .story__steps { position: relative; min-height: 200px; }
.story.is-live .story__steps .step { position: absolute; inset: 0 0 auto; margin: 0; }
.story.is-live .story__stage { height: min(640px, calc(100vh - 128px)); height: min(640px, calc(100svh - 128px)); }

/* drawing */
.story .tape { fill: none; stroke: #e2bf2c; stroke-width: 6; stroke-linecap: round; }
.story .mlead { fill: none; stroke: var(--accent); stroke-width: 2; stroke-dasharray: 4 4; }
.story .mlabel rect, .story .fit-tag rect { fill: var(--ink); }
.story .mlabel text { fill: #c9d1da; font: 500 15px var(--font); }
.story .mlabel tspan { fill: var(--white); font-weight: 700; }
.story .c-name { fill: var(--white); font: 700 19px var(--font); }
.story .c-id { fill: var(--accent-light); font: 500 12px var(--font); letter-spacing: .1em; }
.story .c-cells rect { fill: rgb(255 255 255 / .08); }
.story .cval { fill: var(--white); font: 700 17px var(--font); text-anchor: middle; }
.story .clab { fill: #c9d1da; font: 400 12px var(--font); text-anchor: middle; }
.story .c-qr .qcell { fill: var(--ink); }
.story .scanline { opacity: 0; }
.story #st-sheetRect { fill: #f1c6d2; stroke: none; }
.story .p-fill { fill: url(#st-silk); fill-opacity: 0; }
.story .p-glow { fill: #8e2a5c; opacity: 0; }
.story .p-line { fill: none; stroke: #ffd3e0; stroke-width: 3; stroke-linejoin: round; }
.story .p-dart { fill: none; stroke: #ffd3e0; stroke-width: 2; }
.story .p-cut { fill: none; stroke: var(--ink); stroke-width: 3; stroke-linejoin: round; }
.story .p-label { fill: #ffe4ec; font: 700 16px var(--font); }
.story #st-scissors circle { fill: none; stroke: var(--ink); stroke-width: 3; }
.story #st-scissors path { stroke: var(--ink); stroke-width: 3.5; stroke-linecap: round; }
.story .b-seams--photo path { fill: none; stroke: var(--accent-light); stroke-width: 3; stroke-dasharray: 8 6; }
.story .fit-tag path { fill: none; stroke: var(--accent-light); stroke-width: 3; stroke-linecap: round; }
.story .fit-tag text { fill: var(--white); font: 700 15px var(--font); }
.story .wa-from { fill: #1f7a46; font: 700 14px var(--font); }
.story .wa-text { fill: var(--ink); font: 400 16px var(--font); }
.story .wa-time { fill: var(--muted); font: 400 12px var(--font); }

@media (max-width: 900px) {
  .story__inner { grid-template-columns: minmax(0, 1fr); gap: 24px; padding-top: 72px; padding-bottom: 72px; }
  .story__stage { order: -1; height: min(420px, 100vw); padding: 12px; }
  .story__title { margin-bottom: 12px; font-size: 21px; }
  .story__rail { margin-bottom: 14px; }
  .story__rail span { display: none; }
  .story__steps h3 { margin-bottom: 6px; font-size: 25px; }
  .story__steps p { font-size: 15px; line-height: 1.55; }
  .story.is-live .story__inner { grid-template-rows: minmax(0, 1fr) auto; align-content: stretch; gap: 12px; padding-top: 86px; padding-bottom: 12px; }
  .story.is-live .story__stage { height: 100%; min-height: 0; }
  .story.is-live .story__steps { min-height: 150px; }
}
