/* Chapter 4 "The proof" story layer for /use-case/1..6 (templates/_uc_story.html).
   Uses the site tokens from style.css. Animations are progressive: content is visible
   without JS, and all motion is disabled under prefers-reduced-motion. */

.st-band { background: var(--surface-2, #F6F7F9); border-bottom: 1px solid var(--line); padding: 44px 0 40px; }
.st-lens { background: var(--surface); border-bottom: 1px solid var(--line); padding: 72px 0 80px; scroll-margin-top: 72px; }
.st-next { background: var(--ink); color: #fff; padding: 72px 0; }
#squad { scroll-margin-top: 80px; }

.st-k { display: block; font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 8px; }
.st-h2 { font-family: var(--font-serif); font-weight: 500; font-size: clamp(1.75rem, 3vw, 2.375rem); letter-spacing: -0.02em; color: var(--ink); margin: 0 0 10px; line-height: 1.15; }
.st-h3 { font-family: var(--font-serif); font-weight: 500; font-size: 1.5rem; color: var(--ink); margin: 0; }
.st-sub { font-size: 1.0625rem; line-height: 1.65; color: var(--ink-3); margin: 0; max-width: 720px; }

/* ── Band: chapter + stage ─────────────────────────────── */
.st-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-bottom: 24px; }
.st-chapter { display: inline-flex; align-items: center; gap: 10px; background: var(--ink); color: #fff; padding: 6px 14px 6px 6px; font-size: 0.8125rem; font-weight: 600; text-decoration: none; border-radius: 2px; }
.st-chapter:hover { color: #fff; background: var(--accent); }
.st-chapter-n { background: var(--accent); color: #fff; padding: 2px 8px; font-size: 0.6875rem; letter-spacing: 0.1em; text-transform: uppercase; }
.st-chapter:hover .st-chapter-n { background: var(--ink); }
.st-count { font-size: 0.8125rem; font-weight: 600; color: var(--ink-3); }
.st-stage-badge { display: inline-flex; align-items: center; gap: 10px; border: 1px solid var(--accent); background: var(--accent-soft); color: var(--ink); padding: 6px 12px; font-size: 0.8125rem; font-weight: 600; min-width: 0; }
.st-stage-badge > i { color: var(--accent); font-size: 1rem; }
.st-stage-k { display: block; font-size: 0.625rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); font-weight: 700; }

.st-band-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: start; margin-bottom: 36px; }
.st-arc { font-family: var(--font-serif); font-weight: 500; font-size: clamp(2rem, 4vw, 2.875rem); letter-spacing: -0.025em; line-height: 1.08; color: var(--ink); margin: 0 0 18px; }
.st-pressure, .st-why { font-size: 0.9875rem; line-height: 1.65; color: var(--ink-2); margin: 0 0 14px; padding-left: 14px; border-left: 2px solid var(--line-2, #C9CED6); }
.st-why { border-left-color: var(--accent); color: var(--ink); margin-bottom: 0; }

/* Value-chain rail */
.st-chain { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; }
.st-chain-step { position: relative; background: var(--surface); border: 1px solid var(--line); padding: 12px 8px 10px; min-height: 92px; display: flex; flex-direction: column; gap: 8px; font-size: 0.75rem; font-weight: 600; line-height: 1.25; color: var(--ink-4, #8A94A3); min-width: 0; overflow-wrap: anywhere; }
.st-chain-step i { font-size: 1.125rem; color: var(--ink-4, #8A94A3); }
.st-chain-step.is-on { color: var(--ink); border-color: var(--accent); background: var(--accent-soft); }
.st-chain-step.is-on i { color: var(--accent); }
.st-chain-step.is-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.st-chain-step.is-primary i { color: #fff; }
.st-chain-step.is-on::after { content: ''; position: absolute; top: 8px; right: 8px; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.st-chain-step.is-primary::after { background: #fff; animation: st-pulse 2.2s ease-out infinite; }
.st-chain-note { font-size: 0.8125rem; color: var(--ink-3); margin: 10px 0 0; }

/* Story so far */
.st-sofar { background: var(--surface); border: 1px solid var(--line); border-top: 3px solid var(--ink); padding: 20px 24px 18px; }
.st-sofar-head { display: flex; justify-content: space-between; align-items: center; gap: 8px 20px; flex-wrap: wrap; margin-bottom: 18px; }
.st-sofar-ends { display: flex; gap: 8px 20px; flex-wrap: wrap; font-size: 0.8125rem; font-weight: 600; }
.st-track { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); position: relative; }
.st-track::before, .st-track::after { content: ''; position: absolute; top: 15px; left: calc(100% / 12); height: 2px; }
.st-track::before { right: calc(100% / 12); background: var(--line); }
.st-track::after { width: calc(var(--p) * 5 / 6); background: var(--accent); transform-origin: left; }
.st-node { position: relative; z-index: 1; min-width: 0; text-align: center; }
.st-node a { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 0 6px; text-decoration: none; color: inherit; }
.st-dot { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-size: 0.8125rem; font-weight: 700; background: var(--surface); border: 2px solid var(--line-2, #C9CED6); color: var(--ink-3); transition: transform .2s ease, background .2s ease; }
.st-node.is-done .st-dot { border-color: var(--accent); color: var(--accent); }
.st-node.is-current .st-dot { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 0 0 5px var(--accent-soft); }
.st-node a:hover .st-dot { transform: scale(1.1); border-color: var(--accent); }
.st-node-arc { font-size: 0.8125rem; font-weight: 600; color: var(--ink); line-height: 1.3; }
.st-node-name { font-size: 0.6875rem; color: var(--ink-3); line-height: 1.35; }
.st-node.is-current .st-node-arc { color: var(--accent); }
.st-node:not(.is-current) .st-node-arc { color: var(--ink-2); }
.st-sentinel { margin: 16px 0 0; padding-top: 12px; border-top: 1px solid var(--line); font-size: 0.8125rem; color: var(--ink-3); }
.st-sentinel i { color: var(--accent); margin-right: 4px; }
.st-sentinel a { font-weight: 600; }

/* Jump nav */
.st-jump { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 20px; }
.st-jump .st-k { margin-right: 6px; }
.st-jump a { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line-2, #C9CED6); background: var(--surface); padding: 5px 12px 5px 6px; font-size: 0.8125rem; font-weight: 600; color: var(--ink); text-decoration: none; }
.st-jump a span { display: grid; place-items: center; width: 20px; height: 20px; background: var(--ink); color: #fff; font-size: 0.6875rem; }
.st-jump a:hover { border-color: var(--accent); color: var(--accent); }
.st-jump a:hover span { background: var(--accent); }

/* ── Business lens ─────────────────────────────────────── */
.st-lens-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px 32px; flex-wrap: wrap; margin-bottom: 40px; }
.st-lens-head .eyebrow { margin-bottom: 10px; }
.st-method-link { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 0.9375rem; white-space: nowrap; border-bottom: 2px solid var(--accent); padding-bottom: 2px; text-decoration: none; }

.st-steps { list-style: none; margin: 0 0 56px; padding: 0; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 0; position: relative; }
/* connector: track + animated fill + travelling pulse */
.st-steps::before, .st-steps::after { content: ''; position: absolute; top: 22px; left: 33px; right: calc(100% / 7 - 33px); height: 2px; }
.st-steps::before { background: var(--accent); transform-origin: left; transform: scaleX(1); }
.st-steps::after { right: auto; width: 10px; height: 10px; top: 18px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); opacity: 0; }
.st-step { position: relative; z-index: 1; min-width: 0; padding: 0 10px; display: flex; flex-direction: column; align-items: flex-start; }
.st-step-n { width: 46px; height: 46px; border-radius: 50%; background: var(--surface); border: 2px solid var(--accent); color: var(--accent); display: grid; place-items: center; font-size: 1.125rem; margin-bottom: 14px; }
.st-step:first-child .st-step-n, .st-step:last-child .st-step-n { background: var(--accent); color: #fff; }
.st-step-k { font-size: 0.625rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); margin-bottom: 6px; }
.st-step-h { font-family: var(--font-serif); font-size: 1.0625rem; font-weight: 500; color: var(--ink); line-height: 1.25; margin-bottom: 6px; }
.st-step-b { font-size: 0.78rem; line-height: 1.5; color: var(--ink-3); }

/* ── How we'd deliver it ───────────────────────────────── */
.st-deliver { border: 1px solid var(--line); border-top: 3px solid var(--accent); padding: 28px 28px 22px; background: var(--surface); }
.st-deliver-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px 24px; flex-wrap: wrap; margin-bottom: 18px; }
.st-illus { font-size: 0.75rem; font-weight: 600; color: var(--warning); background: var(--warning-soft); padding: 3px 10px; }
.st-gantt { display: flex; gap: 4px; margin-bottom: 20px; }
.st-bar { flex: var(--w) 1 0; min-width: 0; height: 34px; background: var(--ink); color: #fff; display: flex; align-items: center; gap: 8px; padding: 0 10px; font-size: 0.75rem; font-weight: 600; overflow: hidden; white-space: nowrap; transform-origin: left; }
.st-bar:nth-child(3) { background: var(--accent); }
.st-bar.is-run { background: linear-gradient(90deg, var(--ink) 0%, var(--ink) 55%, rgba(5, 28, 44, 0.15) 100%); }
.st-bar b { display: grid; place-items: center; width: 18px; height: 18px; flex: 0 0 18px; background: rgba(255,255,255,.18); font-size: 0.6875rem; }
.st-bar em { font-style: normal; overflow: hidden; text-overflow: ellipsis; }
.st-phases { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; }
.st-phase { min-width: 0; border-top: 2px solid var(--ink); padding-top: 12px; }
.st-phase:nth-child(3) { border-top-color: var(--accent); }
.st-phase-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 6px; }
.st-phase-n { font-family: var(--font-serif); color: var(--ink-4, #8A94A3); font-size: 1rem; }
.st-phase-dur { font-size: 0.6875rem; font-weight: 600; color: var(--ink-2); border: 1px solid var(--line-2, #C9CED6); padding: 1px 8px; white-space: nowrap; }
.st-phase-name { font-weight: 600; color: var(--ink); font-size: 0.9375rem; margin-bottom: 8px; }
.st-phase-k { font-size: 0.625rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-4, #8A94A3); margin-bottom: 2px; }
.st-phase p { font-size: 0.8125rem; color: var(--ink-2); line-height: 1.5; margin: 0 0 10px; }
.st-phase-svcs { display: flex; flex-wrap: wrap; gap: 4px; }
.st-phase-svcs a { font-size: 0.6875rem; font-weight: 600; color: var(--accent); background: var(--accent-soft); padding: 2px 8px; text-decoration: none; }
.st-phase-svcs a:hover { background: var(--accent); color: #fff; }
.st-deliver-foot { margin: 18px 0 0; padding-top: 14px; border-top: 1px solid var(--line); font-size: 0.8125rem; color: var(--ink-3); }

/* ── Close / next ──────────────────────────────────────── */
.st-next .eyebrow { color: #9DB4FF; margin-bottom: 10px; }
.st-next .st-h2 { color: #fff; }
.st-next .st-sub { color: rgba(255,255,255,.72); }
.st-next-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.st-next-cards { display: grid; gap: 12px; }
.st-next-card { display: grid; gap: 4px; padding: 18px 22px; border: 1px solid rgba(255,255,255,.22); color: #fff; text-decoration: none; transition: background .2s ease, border-color .2s ease, transform .2s ease; }
.st-next-card.is-primary { background: var(--accent); border-color: var(--accent); }
.st-next-card:hover { color: #fff; border-color: #fff; transform: translateX(4px); }
.st-next-k { font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; opacity: .8; }
.st-next-t { font-family: var(--font-serif); font-size: 1.25rem; font-weight: 500; }
.st-next-go { font-size: 0.875rem; font-weight: 600; }
.st-next-go i { transition: transform .2s ease; display: inline-block; }
.st-next-card:hover .st-next-go i { transform: translateX(4px); }
.st-next-back { color: rgba(255,255,255,.75); font-size: 0.875rem; font-weight: 600; text-decoration: none; }
.st-next-back:hover { color: #fff; }

/* Illustrative demo brief (replaces live LLM read-outs) */
.st-brief { background: var(--surface); border: 1px solid var(--line); border-top: 3px solid var(--ink); padding: 24px 28px; }
.st-brief-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; padding-bottom: 14px; margin-bottom: 18px; border-bottom: 1px solid var(--line); }
.st-brief-tag { display: inline-flex; align-items: center; gap: 6px; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--warning); background: var(--warning-soft); padding: 4px 10px; }
.st-brief-src { font-size: 0.8125rem; color: var(--ink-3); }
.st-brief-grid { display: grid; grid-template-columns: 1.2fr 1fr 0.9fr; gap: 28px; }
.st-brief-grid > div { min-width: 0; }
.st-brief-k { font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); margin-bottom: 8px; display: flex; gap: 6px; align-items: center; }
.st-brief p, .st-brief li { font-size: 0.875rem; line-height: 1.6; color: var(--ink-2); }
.st-brief p { margin: 0; }
.st-brief ol { margin: 0; padding-left: 1.1rem; }
.st-brief li + li { margin-top: 6px; }
@media (max-width: 991px) { .st-brief-grid { grid-template-columns: 1fr; gap: 20px; } .st-brief { padding: 20px 18px; } }

/* ── Reveal & motion (JS adds .st-js to <html>) ─────────── */
.st-js .st-reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease var(--d, 0ms), transform .6s ease var(--d, 0ms); }
.st-js .st-reveal.is-in { opacity: 1; transform: none; }
.st-js .st-chain-step { opacity: 0; transform: translateY(8px); transition: opacity .4s ease, transform .4s ease; transition-delay: calc(150ms + var(--i) * 70ms); }
.st-js .is-in .st-chain-step { opacity: 1; transform: none; }
.st-js .st-track::after { transform: scaleX(0); transition: transform 1.1s cubic-bezier(.2,.7,.2,1) .35s; }
.st-js .st-track.is-in::after, .st-js .is-in .st-track::after { transform: scaleX(1); }
.st-js .st-node { opacity: 0; transform: translateY(6px); transition: opacity .4s ease, transform .4s ease; transition-delay: calc(200ms + var(--i) * 90ms); }
.st-js .is-in .st-node { opacity: 1; transform: none; }
.st-js .st-steps::before { transform: scaleX(0); transition: transform 1.6s cubic-bezier(.2,.7,.2,1) .2s; }
.st-js .st-steps.is-in::before { transform: scaleX(1); }
.st-js .st-steps.is-in::after { animation: st-travel 4.5s ease-in-out 1.8s infinite; }
.st-js .st-step { opacity: 0; transform: translateY(14px); transition: opacity .5s ease, transform .5s ease; transition-delay: calc(var(--i) * 180ms); }
.st-js .st-steps.is-in .st-step { opacity: 1; transform: none; }
.st-js .st-bar { transform: scaleX(0); transition: transform .7s cubic-bezier(.2,.7,.2,1); transition-delay: calc(200ms + var(--i) * 220ms); }
.st-js .is-in .st-bar { transform: scaleX(1); }
.st-js .st-phase { opacity: 0; transform: translateY(10px); transition: opacity .5s ease, transform .5s ease; transition-delay: calc(400ms + var(--i) * 140ms); }
.st-js .is-in .st-phase { opacity: 1; transform: none; }

@keyframes st-pulse { 0% { box-shadow: 0 0 0 0 rgba(255,255,255,.8); } 70% { box-shadow: 0 0 0 9px rgba(255,255,255,0); } 100% { box-shadow: 0 0 0 0 rgba(255,255,255,0); } }
@keyframes st-travel { 0% { left: 28px; opacity: 0; } 8% { opacity: 1; } 92% { opacity: 1; } 100% { left: calc(100% - 100% / 7 + 28px); opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
    .st-js .st-reveal, .st-js .st-chain-step, .st-js .st-node, .st-js .st-step, .st-js .st-phase { opacity: 1 !important; transform: none !important; transition: none !important; }
    .st-js .st-track::after, .st-js .st-steps::before, .st-js .st-bar { transform: none !important; transition: none !important; }
    .st-steps::after, .st-chain-step.is-primary::after { animation: none !important; opacity: 0 !important; }
    .st-next-card, .st-dot, .st-next-go i { transition: none !important; }
}

/* ── Responsive ────────────────────────────────────────── */
@media (max-width: 1199px) {
    .st-band-grid { grid-template-columns: 1fr; gap: 28px; }
    .st-steps { grid-template-columns: 1fr; gap: 0; padding-left: 0; }
    .st-steps::before { left: 22px; right: auto; top: 22px; bottom: 22px; width: 2px; height: auto; transform-origin: top; }
    .st-js .st-steps::before { transform: scaleY(0); }
    .st-js .st-steps.is-in::before { transform: scaleY(1); }
    .st-steps::after { display: none; }
    .st-step { display: grid; grid-template-columns: 46px 1fr; column-gap: 18px; padding: 0 0 22px; align-items: start; }
    .st-step-n { grid-row: 1 / span 3; margin: 0; }
    .st-step-h { font-size: 1.125rem; }
    .st-step-b { font-size: 0.875rem; }
    .st-phases { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 991px) {
    .st-chain { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .st-next-grid { grid-template-columns: 1fr; gap: 28px; }
    .st-phases { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
    .st-band { padding: 32px 0; }
    .st-lens { padding: 56px 0 60px; }
    .st-next { padding: 56px 0; }
    .st-chain { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .st-chain-step { min-height: 0; flex-direction: row; align-items: center; padding: 10px 22px 10px 10px; }
    .st-sofar { padding: 16px; }
    .st-track { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 16px; }
    .st-track::before, .st-track::after { display: none; }
    .st-node-name { display: none; }
    .st-node-arc { font-size: 0.75rem; }
    .st-deliver { padding: 20px 16px 16px; }
    .st-bar { padding: 0; justify-content: center; }
    .st-bar em { display: none; }
    .st-phases { grid-template-columns: 1fr; }
    .st-stage-badge { width: 100%; }
}
