/* Case study template (loaded after v2.css): works for product or marketing work.
   Fixed skeleton → Overview · Problem · Process · The motion · Spec · Outcome · Next.
   Shared by every case-study page; page-only pieces stay in each page's <style>. */

/* ─── Header: one title style, one metadata style ─── */
.cs-hero { padding-top: 64px; }
.back { font-family: var(--label); font-size: 12px; color: var(--muted); display: inline-flex; gap: 6px; margin-bottom: 40px; }
.back:hover { color: var(--ink); }
.cs-title { font-family: var(--head); font-size: clamp(38px, 6vw, 88px); line-height: .95; font-weight: 800; letter-spacing: -.005em; max-width: 16ch; }
.cs-summary { font-size: var(--fs-intro); color: var(--ink-2); max-width: 52ch; margin-top: 28px; }
.facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--gutter); margin-top: 48px; padding-top: 20px; border-top: 1px solid var(--ink); }
.facts dt { font-family: var(--label); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 6px; }
.facts dd { font-size: 15px; }

/* ─── Hero stage (live piece + optional controls under it) ─── */
.stage { margin-top: 56px; overflow: hidden; background: transparent; position: relative; aspect-ratio: 16 / 8.5; }
.stage iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.stage-ui { position: absolute; left: 20px; right: 20px; bottom: 20px; display: flex; justify-content: space-between; align-items: end; gap: 12px; flex-wrap: wrap; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { flex: none; border: 1px solid rgba(0,0,0,.1); background: rgba(255,255,255,.88); border-radius: 999px; padding: 8px 14px; font: 500 13px var(--display); cursor: pointer; }
.chip.on { background: var(--ink); color: #fff; border-color: var(--ink); }

/* ─── Long-form body: sticky label column + content column ─── */
.block { display: grid; grid-template-columns: 1fr 2fr; gap: var(--gutter); padding-top: 96px; }
.block-label { position: sticky; top: 96px; align-self: start; }
.block-label .eyebrow { margin-bottom: 8px; }
.block-label h2 { font-family: var(--head); font-size: var(--fs-h3); font-weight: 800; letter-spacing: 0; line-height: 1.1; }
.prose p { font-size: var(--fs-body); color: var(--ink-2); max-width: 60ch; }
.prose p + p { margin-top: 18px; }
.pull { font-size: clamp(26px, 3vw, 36px); line-height: 1.2; font-weight: 500; letter-spacing: -.025em; color: var(--ink); max-width: 28ch; padding-left: 20px; border-left: 3px solid var(--mark); margin: 32px 0; }

/* ─── Media: always the full content column ─── */
figure { margin: 0; }
.gallery { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
.refs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 32px; }
.refs img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.screen { margin-top: 28px; overflow: hidden; box-shadow: 0 1px 0 var(--line), 0 24px 60px rgba(60, 30, 50, .10); background: #F8F9FA; }
.screen img { width: 100%; height: auto; }
.screen.flat { box-shadow: none; background: none; }
/* process shots: the piece in a 4:3 box, caption underneath (never on top of the piece) */
.shot { position: relative; }
.shot .shot-media { position: relative; aspect-ratio: 4 / 3; overflow: hidden; }
.shot .mini-orb-stage { background: transparent; }
.shot .mini-orb { width: 46%; }

/* ─── Captions: one style everywhere, smaller than body and secondary ─── */
.cap, .prose .cap, .cs-cap, figcaption { font-family: var(--label); font-size: 13px; line-height: 1.45; letter-spacing: .01em; color: var(--muted); }
.cap, .prose .cap { margin-top: 10px; }
.shot figcaption { margin-top: 10px; }

/* ─── Spec table ─── */
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-family: var(--label); font-size: 11px; font-weight: 500; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 0 0 10px; border-bottom: 1px solid var(--ink); }
td { padding: 11px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
td:first-child { font-family: var(--label); font-size: 12.5px; padding-right: 16px; white-space: nowrap; }

/* ─── Outcome ─── */
.outcome { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gutter); margin-top: 8px; }
.kpi { border-top: 1px solid var(--ink); padding-top: 16px; }
.kpi b { display: block; font-family: var(--head); font-size: var(--fs-stat); font-weight: 800; letter-spacing: 0; line-height: 1; margin-bottom: 8px; }
.kpi span { color: var(--ink-2); font-size: 15px; }

@media (max-width: 860px) {
  .facts { grid-template-columns: 1fr 1fr; }
  .block { grid-template-columns: 1fr; }
  .block-label { position: static; }
  .outcome { grid-template-columns: 1fr; }
  .refs { gap: 8px; }   /* references stay in one row on phones: they are swatches, not reading material */
  .screen { box-shadow: 0 1px 0 var(--line), 0 10px 28px rgba(60, 30, 50, .08); }   /* lighter shadow at phone size */
  /* stage: the piece gets the area above the controls, so state pills never sit on it */
  .stage { aspect-ratio: auto; }
  .stage iframe { position: relative; display: block; height: auto; aspect-ratio: 1; }
  .stage-ui { position: static; padding: 24px 0 28px; }
  .chips { flex-wrap: nowrap; overflow-x: auto; padding: 0 16px; scroll-padding: 0 16px; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .chips::-webkit-scrollbar { display: none; }
}
