/* ============================================================
   CASE STUDY pages (/work/<slug>/)
   The cream rule: the studio page is dark, the client's work is cream.
   Screens are never tinted; they sit in a bezel with a warm halo so they
   read as a lit screen in a dark room. Annotation is cobalt or electric.
   ============================================================ */

.page-case main { padding-top: 0; }
.page-case section { position: relative; }
.case-container { padding-inline: var(--pad-x); max-width: 1240px; margin-inline: auto; }
.case-eyebrow {
  display: inline-flex; flex-wrap: wrap; gap: 6px 0;
  font-size: 0.74rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--electric-text);
}
.case-eyebrow span:not(:last-child)::after { content: "\00B7"; margin-inline: 10px; opacity: 0.6; }
.case-h2 { font-size: clamp(1.9rem, 4vw, 3.2rem); font-weight: 640; font-stretch: 112%; line-height: 1.02; letter-spacing: -0.03em; }
.case-lede { color: var(--muted); max-width: 58ch; margin-top: 14px; font-size: 1.05rem; }
.case-section { padding-block: clamp(72px, 11vh, 140px); }
.case-section + .case-section { border-top: 1px solid var(--line); }
.case-note { color: var(--muted); font-size: 0.9rem; max-width: 60ch; }
.case-note a, .case-lede a { color: var(--electric); }

/* a lit screen in a dark room */
.bezel {
  position: relative;
  background: #0b0e17; border-radius: 40px; padding: 12px;
  box-shadow: 0 0 0 1px rgba(238, 240, 248, 0.08), 0 40px 100px rgba(0, 0, 0, 0.6), 0 0 120px rgba(250, 246, 239, 0.06);
}
.bezel-screen { position: relative; overflow: hidden; border-radius: 30px; background: #FAF6EF; }
.bezel-screen img { width: 100%; height: auto; display: block; }
.halo { position: absolute; inset: -12%; border-radius: 50%; background: radial-gradient(closest-side, rgba(250, 246, 239, 0.10), transparent 70%); pointer-events: none; z-index: 0; }

/* ============ HERO ============ */
.case-hero { padding-top: clamp(120px, 18vh, 190px); min-height: 100dvh; overflow: clip visible; z-index: 1; display: flex; align-items: center; }
.case-hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: clamp(60px, 10vh, 120px); background: linear-gradient(to bottom, transparent, var(--bg)); pointer-events: none; z-index: 1; }
.case-hero-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: clamp(32px, 5vw, 80px); align-items: center; width: 100%; }
.case-hero h1 { margin-top: 18px; font-size: clamp(2.6rem, 6.6vw, 6rem); font-weight: 700; font-stretch: 108%; line-height: 0.98; letter-spacing: -0.035em; max-width: 12ch; }
.case-hero .case-lede { font-size: clamp(1.02rem, 1.4vw, 1.2rem); max-width: 48ch; }
.case-hero-cta { margin-top: clamp(22px, 3.6vh, 36px); display: flex; flex-wrap: wrap; gap: 12px 14px; }
.case-facts-strip { margin-top: clamp(18px, 3vh, 28px); display: flex; flex-wrap: wrap; gap: 6px 0; color: var(--muted); font-size: 0.86rem; font-variant-numeric: tabular-nums; }
.case-facts-strip span:not(:last-child)::after { content: "\00B7"; margin-inline: 11px; opacity: 0.6; }
.case-hero-phone { position: relative; justify-self: end; width: min(390px, 100%); margin-bottom: 0; }
.case-hero-phone .bezel-screen { aspect-ratio: 390 / 844; }
.case-hero-phone .bezel-screen img { object-fit: cover; object-position: top; height: 100%; }
.case-hero .glow-hero { left: -24vw; bottom: -30vw; clip-path: inset(0 0 30vw 0); }

/* ============ BRIEF ============ */
.brief-grid { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: clamp(32px, 6vw, 96px); align-items: start; margin-top: clamp(28px, 4vh, 44px); }
.brief-quote { border-left: 2px solid var(--cobalt); padding-left: clamp(20px, 3vw, 36px); font-size: clamp(1.2rem, 1.9vw, 1.6rem); line-height: 1.45; font-weight: 480; max-width: 30ch; text-wrap: pretty; }
.brief-quote footer { margin-top: 16px; color: var(--muted); font-size: 0.95rem; }
.brief-facts { display: grid; gap: 0; }
.brief-facts div { display: grid; grid-template-columns: 110px 1fr; gap: 16px; padding-block: 12px; border-top: 1px solid var(--line); }
.brief-facts div:last-child { border-bottom: 1px solid var(--line); }
.brief-facts dt { color: var(--muted); font-size: 0.86rem; letter-spacing: 0.04em; }
.brief-facts dd { font-size: 0.98rem; }
.brief-honest { margin-top: 22px; }

/* ============ DECISIONS: sticky phone + seven notes ============ */
.dec-head { margin-bottom: clamp(32px, 5vh, 56px); }
.dec-scene { display: grid; grid-template-columns: 420px 1fr; gap: clamp(40px, 6vw, 110px); align-items: start; }
.dec-stage { position: sticky; top: calc(72px + 6vh); height: calc(100vh - 72px - 12vh); display: flex; align-items: center; justify-content: center; }
.dec-backdrop { position: absolute; inset: 0 -6% ; border-radius: 28px; background: #FAF6EF; opacity: 0.08; transform: scale(0.94); pointer-events: none; }
.dec-frame { position: relative; width: 360px; height: 740px; z-index: 1; }
.dec-frame .bezel { height: 100%; }
.dec-frame .bezel-screen { height: 100%; }
.dec-screen-img { position: absolute; left: 0; top: 0; width: 100%; will-change: transform; opacity: 0; transition: opacity 0.4s var(--ease-out); pointer-events: none; }
.dec-screen-img.is-active { opacity: 1; }
.dec-screen-img img { width: 100%; display: block; }
.dec-pin {
  position: absolute; width: 30px; height: 30px; margin: -15px 0 0 -15px; border-radius: 999px; z-index: 3;
  background: var(--cobalt); color: #fff; font-size: 0.8rem; font-weight: 700; display: grid; place-items: center;
  box-shadow: 0 0 0 5px rgba(77, 107, 255, 0.28), 0 8px 24px rgba(0, 0, 0, 0.35);
  opacity: 0; transform: scale(0.6); transition: opacity 0.3s var(--ease-out), transform 0.4s var(--ease-out);
}
.dec-pin.is-active { opacity: 1; transform: none; }
.dec-pin::after { content: ""; position: absolute; inset: -9px; border-radius: 999px; border: 1.5px solid rgba(77, 107, 255, 0.55); animation: pinPulse 2.2s ease-out infinite; }
@keyframes pinPulse { 0% { transform: scale(0.7); opacity: 0.9; } 100% { transform: scale(1.4); opacity: 0; } }
.dec-notes { display: grid; gap: 0; padding-top: 6vh; }
.dec-note { min-height: 78vh; display: flex; flex-direction: column; justify-content: center; padding-block: 8vh; border-top: 1px solid var(--line); transition: opacity 0.35s var(--ease-out); }
.dec-note:first-of-type { border-top: 0; }
html.motion .dec-note { opacity: 0.32; }
html.motion .dec-note.is-active { opacity: 1; }
.dec-num { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 999px; background: var(--cobalt); color: #fff; font-weight: 700; font-size: 0.9rem; margin-bottom: 18px; }
.dec-note h3 { font-size: clamp(1.4rem, 2.2vw, 2rem); font-weight: 640; font-stretch: 110%; letter-spacing: -0.02em; line-height: 1.1; max-width: 24ch; }
.dec-note p { color: var(--muted); margin-top: 14px; max-width: 54ch; font-size: 1.02rem; }
.dec-note p + p { margin-top: 12px; }
.dec-note .see { display: inline-flex; align-items: center; gap: 6px; margin-top: 18px; color: var(--electric); font-weight: 560; font-size: 0.95rem; }
.dec-progress { position: absolute; left: -28px; top: 0; bottom: 0; width: 2px; background: rgba(238, 240, 248, 0.1); }
.dec-progress span { display: block; width: 100%; height: 100%; background: linear-gradient(180deg, var(--cobalt), var(--electric)); transform-origin: top; transform: scaleY(0); }
.dec-notes { position: relative; }

/* ============ FORM, TAP BY TAP ============ */
.form-scene { display: grid; grid-template-columns: 400px 1fr; gap: clamp(40px, 6vw, 110px); align-items: start; margin-top: clamp(28px, 4vh, 44px); }
.form-stage { position: sticky; top: calc(72px + 8vh); }
.form-stage .bezel-screen { aspect-ratio: 640 / 900; }
.form-stage .bezel-screen img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top; opacity: 0; transition: opacity 0.5s var(--ease-out); }
.form-stage .bezel-screen img.is-active { opacity: 1; }
.form-dots { display: flex; gap: 8px; justify-content: center; margin-top: 18px; }
.form-dots span { width: 8px; height: 8px; border-radius: 999px; background: rgba(238, 240, 248, 0.16); transition: background-color 0.3s var(--ease-out), transform 0.3s var(--ease-out); }
.form-dots span.is-active { background: var(--electric); transform: scale(1.25); }
.form-captions { display: grid; }
.form-caption { min-height: 52vh; display: flex; flex-direction: column; justify-content: center; padding-block: 6vh; border-top: 1px solid var(--line); transition: opacity 0.35s var(--ease-out); }
.form-caption:first-child { border-top: 0; }
html.motion .form-caption { opacity: 0.32; }
html.motion .form-caption.is-active { opacity: 1; }
.form-caption .step { font-size: 0.74rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--electric-text); margin-bottom: 12px; }
.form-caption p { font-size: clamp(1.15rem, 1.8vw, 1.5rem); line-height: 1.4; max-width: 26ch; text-wrap: pretty; }
.form-closing { margin-top: clamp(24px, 4vh, 40px); display: flex; flex-wrap: wrap; align-items: baseline; gap: 12px 28px; color: var(--muted); }
.form-closing a { color: var(--electric); font-weight: 560; white-space: nowrap; }

/* ============ TIMELINE ============ */
.tl-wrap { position: relative; margin-top: clamp(36px, 6vh, 64px); }
.tl-spine { position: absolute; left: 50%; top: 0; bottom: 0; width: 2px; margin-left: -1px; }
.tl-spine svg { width: 2px; height: 100%; overflow: visible; }
.tl-spine line { stroke: var(--electric); stroke-width: 2; stroke-linecap: round; }
.tl-spine .base { stroke: rgba(238, 240, 248, 0.1); }
.tl-steps { list-style: none; display: grid; gap: clamp(20px, 3vh, 36px); }
.tl-step { position: relative; width: calc(50% - 40px); padding: 22px 24px; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r-card); }
.tl-step:nth-child(odd) { margin-right: auto; }
.tl-step:nth-child(even) { margin-left: auto; }
.tl-step::before { content: ""; position: absolute; top: 30px; width: 12px; height: 12px; border-radius: 999px; background: var(--bg-3); border: 2px solid rgba(238, 240, 248, 0.25); transition: background-color 0.3s var(--ease-out), border-color 0.3s var(--ease-out), box-shadow 0.4s var(--ease-out); }
.tl-step:nth-child(odd)::before { right: -46px; }
.tl-step:nth-child(even)::before { left: -46px; }
.tl-step.is-lit::before { background: var(--electric); border-color: var(--electric); box-shadow: 0 0 18px rgba(77, 107, 255, 0.7); }
.tl-step h3 { font-size: 1.15rem; font-weight: 640; font-stretch: 110%; }
.tl-step h3 small { display: block; font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--electric-text); font-weight: 600; margin-bottom: 6px; }
.tl-step p { color: var(--muted); font-size: 0.95rem; margin-top: 8px; }
.tl-step dl { margin-top: 12px; display: grid; gap: 4px; font-size: 0.9rem; }
.tl-step dl div { display: flex; gap: 8px; }
.tl-step dt { color: var(--muted); flex: none; }
.tl-total { margin-top: clamp(28px, 4vh, 44px); text-align: center; font-size: clamp(1.2rem, 2vw, 1.6rem); font-weight: 640; font-stretch: 110%; }
.tl-total em { font-style: normal; color: var(--electric); }
.tl-caption { text-align: center; margin: 14px auto 0; }

/* ============ BUILD ============ */
.build-grid { display: grid; grid-template-columns: 1.4fr 0.6fr; gap: clamp(32px, 6vw, 96px); align-items: start; margin-top: clamp(28px, 4vh, 44px); }
.fact-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.fact { padding: 20px 22px; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r-card); }
.fact-value { display: block; font-size: clamp(1.7rem, 2.6vw, 2.4rem); font-weight: 700; font-stretch: 116%; letter-spacing: -0.02em; line-height: 1; font-variant-numeric: tabular-nums; }
.fact-label { display: block; margin-top: 8px; font-weight: 560; font-size: 0.95rem; }
.fact-how { display: block; margin-top: 6px; color: var(--muted); font-size: 0.82rem; }
.measured { margin-top: 12px; color: var(--muted); font-size: 0.82rem; font-variant-numeric: tabular-nums; }
.rings { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 22px; }
.ring { text-align: center; }
.ring svg { width: 84px; height: 84px; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 6; }
.ring .track { stroke: rgba(238, 240, 248, 0.1); }
.ring .bar { stroke: var(--electric); stroke-linecap: round; stroke-dasharray: 226; stroke-dashoffset: 226; }
.ring .val { font-size: 1.35rem; font-weight: 700; font-stretch: 116%; margin-top: -58px; height: 58px; display: grid; place-items: center; font-variant-numeric: tabular-nums; }
.ring .lab { color: var(--muted); font-size: 0.78rem; margin-top: 4px; }
.verify { margin-top: 22px; display: flex; flex-wrap: wrap; gap: 10px 22px; align-items: center; color: var(--muted); font-size: 0.92rem; }
.verify a { color: var(--ink); border-bottom: 1px solid rgba(238, 240, 248, 0.3); white-space: nowrap; }
.verify a:hover { border-color: var(--electric); }
.five { margin-top: clamp(28px, 4vh, 44px); }
.five h3 { font-size: 1.1rem; font-weight: 640; font-stretch: 110%; }
.five ul { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.five li { border: 1px solid rgba(238, 240, 248, 0.18); border-radius: 999px; padding: 6px 14px; font-size: 0.9rem; color: var(--muted); }
.five p { margin-top: 12px; }
.qr-card { position: sticky; top: calc(72px + 8vh); }
.qr-card .bezel-screen { aspect-ratio: 9 / 16; background: #FAF6EF; display: grid; place-items: center; padding: 14%; }
.qr-card .bezel-screen svg { width: 100%; height: auto; }
.qr-card .bezel { box-shadow: 0 0 0 1px rgba(238, 240, 248, 0.08), 0 40px 100px rgba(0, 0, 0, 0.6), 0 0 120px rgba(37, 78, 255, 0.18); }
.qr-caption { margin-top: 14px; text-align: center; color: var(--muted); font-size: 0.9rem; }
.qr-open { display: none; }

/* ============ MOTION SHEET ============ */
.mo-rows { margin-top: clamp(28px, 4vh, 44px); border-top: 1px solid var(--line); }
.mo-row { display: grid; grid-template-columns: 120px 1fr 1fr auto; gap: 20px 28px; align-items: center; padding-block: 20px; border-bottom: 1px solid var(--line); }
.mo-row h3 { font-size: 1.05rem; font-weight: 640; font-stretch: 110%; }
.mo-row .move { color: var(--ink); font-size: 0.95rem; }
.mo-row .vals { color: var(--muted); font-size: 0.82rem; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.mo-row .why { color: var(--muted); font-size: 0.95rem; }
.mo-row .why em { font-style: italic; color: var(--ink); }
.swatch { width: 120px; height: 72px; border-radius: 12px; background: #FAF6EF; position: relative; overflow: hidden; }
.replay { border: 1px solid rgba(238, 240, 248, 0.22); border-radius: 999px; padding: 6px 14px; font-size: 0.82rem; color: var(--muted); transition: color 0.3s var(--ease-out), border-color 0.3s var(--ease-out); }
.replay:hover { color: var(--ink); border-color: rgba(238, 240, 248, 0.4); }
/* the six swatches, each replays when .is-playing is added */
.sw-rise { padding: 16px 18px; display: grid; gap: 7px; }
.sw-rise i { display: block; height: 8px; border-radius: 4px; background: #1F1C18; opacity: 0; transform: translateY(6px); }
.sw-rise i:nth-child(2) { width: 70%; background: #5B564F; }
.sw-rise i:nth-child(3) { width: 45%; background: #1F5B45; height: 12px; }
.is-playing.sw-rise i { animation: swRise 0.45s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.is-playing.sw-rise i:nth-child(2) { animation-delay: 60ms; }
.is-playing.sw-rise i:nth-child(3) { animation-delay: 120ms; }
@keyframes swRise { to { opacity: 1; transform: none; } }
.sw-rule { padding: 26px 18px; }
.sw-rule i { display: block; width: 0; height: 2px; border-radius: 2px; background: #A34D2A; }
.sw-rule b { display: block; margin-top: 8px; width: 60%; height: 8px; border-radius: 4px; background: #1F1C18; }
.is-playing.sw-rule i { animation: swRule 0.4s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
@keyframes swRule { to { width: 40px; } }
.sw-nav { padding: 30px 18px; display: flex; gap: 14px; }
.sw-nav i { position: relative; display: block; width: 26px; height: 6px; border-radius: 3px; background: #5B564F; }
.sw-nav i::after { content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 2px; background: #A34D2A; transform: scaleX(0); transform-origin: left; }
.is-playing.sw-nav i:nth-child(2)::after { animation: swUnderline 0.18s cubic-bezier(0.22, 1, 0.36, 1) 0.2s both; }
@keyframes swUnderline { to { transform: scaleX(1); } }
.sw-nudge { display: grid; place-items: center; }
.sw-nudge i { display: block; width: 76px; height: 40px; border-radius: 6px; background: #fff; border: 1px solid #E4DDD2; box-shadow: 0 2px 12px rgba(31, 28, 24, 0.08); }
.is-playing.sw-nudge i { animation: swNudge 0.3s cubic-bezier(0.2, 0.7, 0.2, 1) 0.15s both; }
@keyframes swNudge { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
.sw-send { display: grid; place-items: center; }
.sw-send i { display: block; width: 22px; height: 22px; border-radius: 999px; border: 2.5px solid rgba(31, 91, 69, 0.3); border-top-color: #1F5B45; opacity: 0; }
.sw-send svg { position: absolute; width: 28px; height: 28px; color: #A34D2A; opacity: 0; }
.sw-send svg path { stroke-dasharray: 40; stroke-dashoffset: 40; }
.is-playing.sw-send i { animation: swSpin 0.8s linear 0s 1, swFade 0.2s linear 0s both, swOut 0.2s linear 0.7s both; }
.is-playing.sw-send svg { animation: swFade 0.2s linear 0.85s both; }
.is-playing.sw-send svg path { animation: swTick 0.4s cubic-bezier(0.2, 0.7, 0.2, 1) 0.9s both; }
@keyframes swSpin { to { transform: rotate(360deg); } }
@keyframes swFade { to { opacity: 1; } }
@keyframes swOut { to { opacity: 0; } }
@keyframes swTick { to { stroke-dashoffset: 0; } }
.sw-shadow { padding: 14px 0 0; }
.sw-shadow i { display: block; height: 22px; background: #fff; border-bottom: 1px solid #E4DDD2; }
.sw-shadow b { display: block; margin: 10px 18px 0; height: 8px; width: 60%; border-radius: 4px; background: #E4DDD2; }
.is-playing.sw-shadow i { animation: swShadow 0.2s linear 0.3s both; }
@keyframes swShadow { to { box-shadow: 0 2px 12px rgba(31, 28, 24, 0.14); } }
.mo-summary { margin-top: 22px; font-weight: 560; }
.mo-summary strong { color: var(--electric); font-variant-numeric: tabular-nums; }
.mo-closing { margin-top: 10px; }
.mo-reduced { display: none; }
@media (prefers-reduced-motion: reduce) {
  .mo-reduced { display: block; }
  .replay { display: none; }
  .sw-rise i { opacity: 1; transform: none; }
  .sw-rule i { width: 40px; }
  .sw-nav i:nth-child(2)::after { transform: scaleX(1); }
  .sw-send svg { opacity: 1; }
  .sw-send svg path { stroke-dashoffset: 0; }
  .sw-shadow i { box-shadow: 0 2px 12px rgba(31, 28, 24, 0.14); }
}

/* ============ YOURS NEXT ============ */
.next-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 96px); align-items: start; margin-top: clamp(28px, 4vh, 44px); }
.next-list { list-style: none; display: grid; gap: 10px; }
.next-list li { display: flex; gap: 12px; align-items: flex-start; color: var(--muted); }
.next-list li::before { content: ""; flex: none; width: 7px; height: 7px; margin-top: 10px; border-radius: 999px; background: var(--electric); box-shadow: 0 0 10px rgba(77, 107, 255, 0.8); }
.next-card { background: var(--bg-3); border: 1px solid rgba(77, 107, 255, 0.45); border-radius: var(--r-card); padding: clamp(24px, 3vw, 40px); box-shadow: 0 0 60px rgba(20, 55, 200, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.06); }
.next-card h3 { font-size: clamp(1.5rem, 2vw, 1.9rem); font-weight: 660; font-stretch: 112%; }
.next-card .tier-line { margin-top: 10px; color: var(--muted); }
.next-card .price-list { margin-bottom: 0; }
.next-card .cta { margin-top: clamp(22px, 3.4vh, 32px); display: flex; flex-wrap: wrap; gap: 12px 14px; }

/* ============ RAIL ============ */
.case-rail { position: fixed; right: clamp(14px, 2vw, 28px); top: 50%; transform: translateY(-50%); z-index: 60; display: none; }
.case-rail a { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 0.78rem; letter-spacing: 0.06em; text-transform: uppercase; transition: color 0.3s var(--ease-out); }
.case-rail a::before { content: ""; width: 28px; height: 1px; background: rgba(238, 240, 248, 0.25); transform: scaleX(0.64); transform-origin: right center; transition: transform 0.3s var(--ease-out), background-color 0.3s var(--ease-out); }
.case-rail a.is-current { color: var(--electric); }
.case-rail a.is-current::before { transform: none; background: var(--electric); }
.case-rail { transition: opacity 0.3s var(--ease-out); }
.case-rail.is-off { opacity: 0; pointer-events: none; }
.case-rail ul { list-style: none; display: grid; gap: 10px; }
.case-progress { position: fixed; left: 0; right: 0; top: 72px; height: 2px; z-index: 89; background: rgba(238, 240, 248, 0.06); }
.case-progress span { display: block; height: 100%; background: linear-gradient(90deg, var(--cobalt), var(--electric)); transform: scaleX(0); transform-origin: left; }
@media (min-width: 1100px) { .case-rail { display: block; } .case-progress { display: none; } }

/* ============ RESPONSIVE ============ */
@media (max-width: 1099px) {
  .dec-scene { grid-template-columns: 360px 1fr; gap: 40px; }
  .form-scene { grid-template-columns: 340px 1fr; gap: 40px; }
  .rings { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 899px) {
  .case-hero { padding-top: 110px; min-height: 0; }
  .case-hero-grid { grid-template-columns: 1fr; }
  .case-hero-phone { justify-self: start; width: min(300px, 80%); margin-bottom: 0; }
  .case-hero .glow-hero { bottom: 0; }
  .case-eyebrow, .case-facts-strip { gap: 6px 16px; }
  .case-eyebrow span:not(:last-child)::after, .case-facts-strip span:not(:last-child)::after { content: none; }
  .brief-grid, .build-grid, .next-grid { grid-template-columns: 1fr; }
  .brief-quote { max-width: none; }
  /* decisions: the phone sticks at the top at 46vh while the notes flow underneath */
  .dec-scene { grid-template-columns: 1fr; gap: 0; }
  .dec-stage { position: sticky; top: 72px; height: 46vh; z-index: 5; background: var(--bg); box-shadow: 0 18px 18px -8px var(--bg); align-items: flex-start; padding-top: 12px; }
  .dec-backdrop { display: none; }
  .dec-frame { width: auto; height: calc(46vh - 30px); aspect-ratio: 360 / 740; }
  .dec-frame .bezel { border-radius: 28px; padding: 8px; }
  .dec-frame .bezel-screen { border-radius: 22px; }
  .dec-notes { padding-top: 4vh; }
  .dec-note { min-height: 0; padding-block: 28px; }
  html.motion .dec-note { opacity: 1; }
  .dec-progress { display: none; }
  .form-scene { grid-template-columns: 1fr; gap: 0; }
  .form-stage { position: sticky; top: 72px; z-index: 5; background: var(--bg); box-shadow: 0 18px 18px -8px var(--bg); padding: 12px 0 8px; }
  .form-stage .bezel { width: min(300px, 78%); margin-inline: auto; border-radius: 28px; padding: 8px; }
  .form-stage .bezel-screen { border-radius: 22px; aspect-ratio: 640 / 700; }
  .form-caption { min-height: 0; padding-block: 24px; }
  html.motion .form-caption { opacity: 1; }
  .tl-spine { left: 12px; }
  .tl-step { width: auto; margin-left: 40px !important; }
  .tl-step::before { left: -34px !important; right: auto !important; }
  .fact-grid { grid-template-columns: 1fr 1fr; }
  .qr-card { display: none; }
  .qr-open { display: inline-flex; margin-top: 8px; }
  .mo-row { grid-template-columns: 120px 1fr; }
  .mo-row .why { grid-column: 2; }
  .mo-row .replay { grid-column: 2; justify-self: start; }
}
@media (max-width: 479px) {
  .fact-grid { grid-template-columns: 1fr; }
  .rings { grid-template-columns: repeat(2, 1fr); }
  .mo-row { grid-template-columns: 1fr; }
  .mo-row .why, .mo-row .replay { grid-column: auto; }
}

/* ============ REDUCED MOTION / NO JS: everything laid out, nothing hidden ============ */
@media (prefers-reduced-motion: reduce) {
  .dec-stage, .form-stage, .qr-card { position: static; height: auto; }
  .dec-frame { height: 740px; }
  .dec-pin::after { animation: none; }
  .dec-note, .form-caption { opacity: 1 !important; min-height: 0; }
  .form-stage .bezel-screen img:first-child { opacity: 1; }
  .ring .bar { stroke-dashoffset: var(--ring, 226); }
  .tl-spine .draw { stroke-dashoffset: 0 !important; }
  .dec-progress span { transform: none; }
}
html.no-motion .dec-note, html.no-motion .form-caption { opacity: 1; }
html.no-motion .form-stage .bezel-screen img:first-child { opacity: 1; }
html.no-motion .ring .bar { stroke-dashoffset: var(--ring, 226); }

/* ============ BEFORE / AFTER ============ */
.ba { margin-top: clamp(36px, 6vh, 64px); padding-top: clamp(28px, 4vh, 44px); border-top: 1px solid var(--line); }
.ba h3 { font-size: clamp(1.3rem, 2vw, 1.7rem); font-weight: 640; font-stretch: 110%; letter-spacing: -0.02em; }
.ba-grid { display: grid; grid-template-columns: 400px 1fr; gap: clamp(28px, 4vw, 64px); align-items: start; margin-top: 22px; }
.ba-stage { position: relative; aspect-ratio: 480 / 1039; border-radius: 30px; overflow: hidden; background: var(--bg-2); box-shadow: 0 0 0 1px rgba(238, 240, 248, 0.1), 0 30px 80px rgba(0, 0, 0, 0.5); touch-action: pan-y; user-select: none; }
.ba-pane { position: absolute; inset: 0; }
.ba-pane img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
.ba-before { clip-path: inset(0 calc(100% - var(--cut, 50%)) 0 0); }
.ba-handle { position: absolute; top: 0; bottom: 0; left: var(--cut, 50%); width: 2px; margin-left: -1px; background: var(--electric); box-shadow: 0 0 18px rgba(77, 107, 255, 0.8); cursor: ew-resize; }
.ba-handle span { position: absolute; top: 50%; left: 50%; width: 44px; height: 44px; margin: -22px 0 0 -22px; border-radius: 999px; background: var(--cobalt); box-shadow: 0 0 0 5px rgba(77, 107, 255, 0.28), 0 8px 24px rgba(0, 0, 0, 0.4); }
.ba-handle span::before, .ba-handle span::after { content: ""; position: absolute; top: 50%; width: 7px; height: 7px; border-top: 2px solid #fff; border-left: 2px solid #fff; }
.ba-handle span::before { left: 12px; transform: translateY(-50%) rotate(-45deg); }
.ba-handle span::after { right: 12px; transform: translateY(-50%) rotate(135deg); }
.ba-handle:focus-visible { outline: none; }
.ba-handle:focus-visible span { box-shadow: 0 0 0 3px var(--bg), 0 0 0 6px var(--electric); }
.ba-label { position: absolute; bottom: 14px; padding: 5px 10px; border-radius: 999px; font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; background: rgba(5, 6, 10, 0.72); color: var(--ink); backdrop-filter: blur(8px); pointer-events: none; }
.ba-label-before { left: 14px; }
.ba-label-after { right: 14px; }
.ba-toggle { display: none; gap: 8px; margin-top: 14px; }
.ba-toggle button { flex: 1; min-height: 40px; border: 1px solid rgba(238, 240, 248, 0.22); border-radius: 999px; color: var(--muted); font-weight: 560; font-size: 0.9rem; }
.ba-toggle button[aria-pressed="true"] { background: var(--cobalt); border-color: transparent; color: #fff; }
.ba-facts { list-style: none; display: grid; gap: 0; }
.ba-facts li { display: grid; grid-template-columns: 120px 1fr 1fr; gap: 12px 20px; padding-block: 14px; border-top: 1px solid var(--line); align-items: baseline; }
.ba-facts li:last-child { border-bottom: 1px solid var(--line); }
.ba-facts .ba-k { color: var(--muted); font-size: 0.86rem; letter-spacing: 0.04em; }
.ba-facts .ba-b { color: var(--muted); font-size: 0.95rem; }
.ba-facts .ba-a { color: var(--ink); font-size: 0.95rem; font-weight: 560; }
.ba-facts .ba-a strong, .ba-facts .ba-b strong { font-variant-numeric: tabular-nums; }
.ba-facts .ba-a strong { color: var(--electric); }
.ba-head { display: grid; grid-template-columns: 120px 1fr 1fr; gap: 12px 20px; padding-bottom: 8px; font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.ba-head span:last-child { color: var(--electric-text); }
.ba-note { margin-top: 16px; }
.ba-note a { color: var(--electric); }
@media (max-width: 1099px) { .ba-grid { grid-template-columns: 340px 1fr; } }
@media (max-width: 899px) {
  .ba-grid { grid-template-columns: 1fr; }
  .ba-stage { max-width: 360px; margin-inline: auto; }
  .ba-toggle { display: flex; max-width: 360px; margin-inline: auto; }
  .ba-facts li, .ba-head { grid-template-columns: 96px 1fr 1fr; gap: 8px 12px; }
}
@media (prefers-reduced-motion: reduce) { .ba-before { transition: none; } }
