/* =========================================================================
   Scroll version (1 Dec 2026). The content that used to sit behind tabs and
   toggles plays as you scroll. Everything here is scoped to two classes that
   assets/js/scroll.js puts on <html>:
     .scrolly  desktop: sections hold on screen while their steps play
     .stack    phones, short screens, reduced motion: every step stacked, no clicks
   To revert: delete the scroll.css <link> and the scroll.js <script> in
   index.html (or open the page with ?scroll=off to compare).
   ========================================================================= */

/* ---------- 1. The challenge: today -> with Acrostic ---------- */
.scrolly .sx-cpin{position:sticky;z-index:1}
.sx-cpin .challenge-head{margin-bottom:28px}
.sx-cpin #flowSvg{max-width:100%}
/* heading, intro, pills and count stacked left; wide chart underneath */
.sx-ctop{display:grid;gap:18px;justify-items:start}
.sx-ctop .challenge-head{margin-bottom:6px}
.sx-ctop .switch,.sx-ctop .flow-count{margin:0}
.sx-cpin .flow-fig{margin-top:0}
.scrolly #flowFig .switch,.stack #flowFig .switch{margin-bottom:28px}
.sx-spacer{pointer-events:none}

/* ---------- 2. Grow / Retain / Automate ---------- */
.sx-pillars{display:grid;grid-template-columns:minmax(0,.86fr) minmax(0,1.14fr);gap:clamp(32px,4vw,64px);align-items:start}
.sx-left .txt{min-height:78vh;display:grid;gap:18px;align-content:center;opacity:.28;transition:opacity .5s}
.sx-left .txt.on{opacity:1}
.sx-left .txt:first-child{min-height:62vh;align-content:start;padding-top:8vh}
.sx-left .txt:last-child{min-height:0}   /* set to the screenshot's height in scroll.js, so both end together */
.sx-right{align-self:stretch}
.sx-sticky{position:sticky}
.sx-sticky .tablist{margin-bottom:24px}
.sx-stack{display:grid}
.sx-stack > *{grid-area:1/1;opacity:0;visibility:hidden;transition:opacity .5s,visibility 0s .5s}
.sx-stack > .on{opacity:1;visibility:visible;transition:opacity .5s,visibility 0s}
.scrolly #p-grow,.scrolly #p-retain,.scrolly #p-automate{display:none}
.sx-left.panel{display:block}  /* borrows the .panel text styles only */

.stack #pillars .tablist{display:none}
.stack #pillars .panel[hidden]{display:grid}
.stack #pillars .panel + .panel{margin-top:72px}

/* ---------- 3. Four seats as rows ---------- */
.scrolly .seatbar,.scrolly #seatpanel,.stack .seatbar,.stack #seatpanel{display:none}
.sx-seats{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:clamp(48px,5vw,72px) clamp(32px,4vw,64px);margin-top:12px}
.sx-seats .seatpanel{grid-template-columns:minmax(0,1fr);gap:18px;align-content:start;padding:0;border:0;border-radius:0}   /* open, no cards (Anuj, 1 Dec) */
.sx-seats .seat-copy p{max-width:none}
@media (max-width:760px){.sx-seats{grid-template-columns:minmax(0,1fr)}}
.sx-seats .seatpanel{opacity:0;transform:translateY(12px);transition:opacity .6s var(--ease),transform .6s var(--ease)}
.sx-seats .seatpanel.in{opacity:1;transform:none}
@media (prefers-reduced-motion:reduce){.sx-seats .seatpanel{opacity:1;transform:none;transition:none}}

/* ---------- 4. Member journey ---------- */
.scrolly .sx-jpin{position:sticky;z-index:1;background:var(--night)}
/* the line starts at the first dot and ends at the last (scroll.js sets --l / --r) */
.scrolly .track::before{left:var(--l,0);right:var(--r,0)}
.scrolly .track .fill{left:var(--l,0);transition:none}
.stack #journey .track,.stack #journey #stage{display:none}
.sx-stages{display:grid;gap:56px}

/* overflow:hidden on an ancestor stops position:sticky; clip keeps the crop without that */
.scrolly .flowband{overflow:clip}

/* the challenge morph is driven frame by frame from scroll, so no CSS easing on it */
.flow-fig.morph .rails .rail-s,.flow-fig.morph .rails .rail-c,.flow-fig.morph .silos,.flow-fig.morph .stages,
.flow-fig.morph .node rect,.flow-fig.morph .node text,.flow-fig.morph .silo,.flow-fig.morph .stage{transition:none}

/* the chart's lower half is empty once the tools are gone, so no extra padding under it (Anuj, 1 Dec) */
.scrolly #challenge{padding-bottom:0}
