/* Shared by every case-study article page. */

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 clamp(20px, 5vw, 64px); }
/* The frame is wide, but prose stays at a readable measure rather than running the
   full 1080px; headings, meta and the outcome grid still span the whole width. */
.section p, .section li { max-width: var(--measure); }

.head { padding: 64px 0 40px; }
.head-eyebrow { font-size: 13px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: oklch(0.65 0.02 250); margin: 0 0 18px; }
.head-title { font-size: clamp(2.2rem, 6vw, 3.6rem); line-height: 1.02; margin: 0 0 20px; }
.head-meta { display: flex; flex-wrap: wrap; gap: 10px 28px; font-size: 14px; color: oklch(0.75 0.015 250); margin-bottom: 28px; }
.head-meta strong { color: oklch(0.97 0.008 255); font-weight: 700; }
.head-metric { display: inline-flex; align-items: baseline; gap: 10px; border: 2px solid oklch(0.97 0.008 255); padding: 14px 22px; box-shadow: 6px 6px 0 var(--case-accent, var(--accent1)); }
.head-metric .num { font-family: 'Archivo Black', sans-serif; font-size: 2rem; color: var(--accent2); }
.head-metric .lbl { font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: oklch(0.7 0.02 250); }

.section { padding: 44px 0; border-top: 1px solid oklch(0.97 0.008 255 / 0.12); }
.section h2 { font-size: 1.5rem; margin: 0 0 16px; }
.section p { font-size: 17px; line-height: 1.75; color: oklch(0.87 0.01 250); margin: 0 0 16px; }
.section ul { margin: 0 0 16px; padding-left: 20px; }
.section li { font-size: 17px; line-height: 1.75; color: oklch(0.87 0.01 250); margin-bottom: 8px; }
.section strong { color: oklch(0.97 0.008 255); font-weight: 700; }

.outcome-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 20px; margin-top: 8px; }
.outcome { border: 2px solid oklch(0.97 0.008 255 / 0.3); padding: 22px; }
.outcome .num { font-family: 'Archivo Black', sans-serif; font-size: 2.1rem; color: var(--accent1); }
.outcome .lbl { font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: oklch(0.65 0.02 250); margin-top: 6px; }

.footer-nav { padding: 60px clamp(20px, 5vw, 64px) 80px; text-align: center; }
.footer-nav a { display: inline-block; font-size: 14px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; border-bottom: 2px solid var(--accent1); padding-bottom: 4px; }

/* ---------- imagery ---------- */
.shot { margin: 26px 0 0; text-align: center; }
/* Images vary from panoramic (4.9:1) to almost square (1:1). Capping the height
   rather than forcing full width stops the square ones from eating a whole screen;
   wide ones are still limited by the container. */
.shot img {
  display: block; margin: 0 auto;
  width: auto; height: auto; max-width: 100%; max-height: 600px;
  border: 2px solid oklch(0.97 0.008 255 / 0.18); border-radius: 10px;
  background: oklch(0.14 0.02 255);
}
.shot figcaption { margin-top: 10px; font-size: 14px; font-weight: 600; line-height: 1.5; letter-spacing: 0.01em; color: oklch(0.76 0.02 250); }

/* A wide flow shown as separate per-step screens rather than one panoramic
   image - each step stays legible instead of shrinking to fit a single row.
   Wrapped in a plain <figure class="shot"> so it gets the same outer
   boundary and single caption as every other shot on the page; the trio
   itself is just the grid of screens inside that boundary. */
.shot-trio {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px;
  margin-top: 0; padding: 20px;
  border: 2px solid oklch(0.97 0.008 255 / 0.18); border-radius: 10px;
  background: oklch(0.14 0.02 255);
}
.shot-trio img { max-height: none; border: none; background: none; border-radius: 9px; }

/* ---------- rhythm against the divider lines ---------- */
/* Everything that sits above a section's border-top should clear it by the same
   amount. The section's own 44px padding provides that gap, so the last child in
   a section contributes nothing extra, and the banner figure (which sits outside
   any section, between the header and the first line) matches it explicitly. */
.section > *:last-child { margin-bottom: 0; }
.wrap > .shot { margin-bottom: 44px; }

/* ---------- the short version ---------- */
.tldr { border-left: 3px solid var(--accent1); padding-left: 22px; margin: 0 0 6px; }
.tldr dt { font-size: 11px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: oklch(0.6 0.02 250); }
.tldr dd { margin: 3px 0 14px; font-size: 16px; line-height: 1.6; color: oklch(0.9 0.01 250); max-width: var(--measure); }
.tldr dd:last-child { margin-bottom: 0; }

/* ---------- "what I got wrong" ---------- */
/* A recurring block, not a one-off: the same treatment in every case study that
   has a failed approach worth showing. */
.section.wrong { border-left: 3px solid var(--accent2); padding-left: 26px; }
.wrong-label { font-size: 11px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent2); margin: 0 0 10px; }

/* ---------- swap: two versions, one frame ---------- */
/* Pure CSS via radio inputs, matching the reduced-motion toggle on the home page.
   Works with no JavaScript at all. */
.swap {
  margin: 28px 0 0;
  background: oklch(0.235 0.012 255);
  border: 1px solid oklch(0.97 0.008 255 / 0.14);
  border-radius: 10px;
  overflow: hidden;
}
.swap-radio { position: absolute; opacity: 0; width: 1px; height: 1px; }
.swap-switch { display: flex; flex-wrap: wrap; gap: 6px; padding: 14px 16px; border-bottom: 1px solid oklch(0.97 0.008 255 / 0.14); }
.swap-switch label {
  font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 9px 15px; border: 1px solid oklch(0.97 0.008 255 / 0.25);
  color: oklch(0.72 0.02 250); border-radius: 6px; cursor: pointer; transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.swap-switch label:hover { color: oklch(0.97 0.008 255); border-color: oklch(0.97 0.008 255 / 0.5); }
.swap-pane { display: none; padding: 22px 20px; }
.swap-note { margin: 0; padding: 0 20px 20px; font-size: 14px; line-height: 1.6; color: oklch(0.68 0.02 250); }
.swap-pane .shot { margin: 0; }

/* One rule per option: the checked radio reveals its pane and lights its label. */
#wv-star:checked ~ .swap-pane[data-pane="star"],
#wv-cq:checked   ~ .swap-pane[data-pane="cq"],
#dy-patch:checked   ~ .swap-pane[data-pane="patch"],
#dy-rebuild:checked ~ .swap-pane[data-pane="rebuild"],
#pr-raw:checked   ~ .swap-pane[data-pane="raw"],
#pr-boost:checked ~ .swap-pane[data-pane="boost"],
#rf-def:checked   ~ .swap-pane[data-pane="def"],
#rf-ex:checked    ~ .swap-pane[data-pane="ex"] { display: block; }
#wv-star:checked ~ .swap-switch label[for="wv-star"],
#wv-cq:checked   ~ .swap-switch label[for="wv-cq"],
#dy-patch:checked   ~ .swap-switch label[for="dy-patch"],
#dy-rebuild:checked ~ .swap-switch label[for="dy-rebuild"],
#pr-raw:checked   ~ .swap-switch label[for="pr-raw"],
#pr-boost:checked ~ .swap-switch label[for="pr-boost"],
#rf-def:checked   ~ .swap-switch label[for="rf-def"],
#rf-ex:checked    ~ .swap-switch label[for="rf-ex"] {
  background: var(--accent1); border-color: var(--accent1); color: oklch(0.16 0.02 255);
}
#wv-star:focus-visible ~ .swap-switch label[for="wv-star"],
#wv-cq:focus-visible   ~ .swap-switch label[for="wv-cq"],
#dy-patch:focus-visible   ~ .swap-switch label[for="dy-patch"],
#dy-rebuild:focus-visible ~ .swap-switch label[for="dy-rebuild"],
#pr-raw:focus-visible   ~ .swap-switch label[for="pr-raw"],
#pr-boost:focus-visible ~ .swap-switch label[for="pr-boost"],
#rf-def:focus-visible   ~ .swap-switch label[for="rf-def"],
#rf-ex:focus-visible    ~ .swap-switch label[for="rf-ex"] { outline: 2px solid var(--accent1); outline-offset: 3px; }

/* copy and single-bullet panes */
.swap-copy { margin: 0 0 14px; font-size: 16px; line-height: 1.65; color: oklch(0.88 0.01 250); max-width: var(--measure); }
.mock-bullet { margin: 0; font-size: 16px; line-height: 1.65; color: oklch(0.92 0.01 250); max-width: var(--measure); }
.mock-bullet::before { content: '\2022'; color: var(--accent1); font-weight: 700; margin-right: 10px; }

/* the mock form inside the Winterview demo */
.mock-field { margin-bottom: 14px; }
.mock-field:last-child { margin-bottom: 0; }
.mock-field label { display: block; font-size: 13px; font-weight: 700; color: oklch(0.9 0.01 250); margin-bottom: 6px; }
.mock-field input, .mock-field textarea {
  width: 100%; padding: 11px 13px; font: inherit; font-size: 15px;
  color: oklch(0.95 0.008 255); background: oklch(0.18 0.02 255);
  border: 1px solid oklch(0.97 0.008 255 / 0.22); border-radius: 6px;
}
.mock-field input:focus-visible, .mock-field textarea:focus-visible { outline: 2px solid var(--accent1); outline-offset: 2px; }
.mock-field textarea { min-height: 74px; resize: vertical; }
.mock-count { font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: oklch(0.62 0.02 250); margin: 0 0 16px; }

/* ---------- chart ---------- */
.chart { margin: 28px 0 0; }
.chart h3 { font-size: 15px; margin: 0 0 4px; }
.chart-sub { font-size: 13px; color: oklch(0.66 0.02 250); margin: 0 0 14px; }
.chart svg { display: block; width: 100%; height: auto; max-width: 640px; }
.stat-hero { margin-top: 24px; border: 2px solid oklch(0.97 0.008 255 / 0.3); padding: 20px 22px; display: inline-block; }
.stat-hero .num { font-family: 'Archivo Black', sans-serif; font-size: 2.4rem; color: var(--accent2); line-height: 1; }
.stat-hero .lbl { display: block; margin-top: 8px; font-size: 13px; color: oklch(0.72 0.02 250); max-width: 42ch; }

/* ---------- wide artifacts + zoom ---------- */
/* The research artifacts are dense; they get more room and open full size. */
.shot--wide { width: min(1360px, calc(100vw - 40px)); margin-left: 50%; transform: translateX(-50%); }
.shot--wide img { max-height: 760px; }
.shot-zoom { display: block; cursor: zoom-in; }
.shot-zoom:focus-visible { outline: 2px solid var(--accent1); outline-offset: 4px; }
.shot-hint { display: block; margin-top: 6px; font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: oklch(0.58 0.02 250); }

.lightbox { position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center; padding: 24px; background: oklch(0.1 0.02 255 / 0.94); }
.lightbox img { max-width: 100%; max-height: 100%; width: auto; height: auto; border-radius: 6px; }
.lightbox-close {
  position: absolute; top: 18px; right: 18px; padding: 10px 16px; font: inherit;
  font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: oklch(0.16 0.02 255); background: var(--accent1); border: 0; cursor: pointer;
}

/* Per-image view-transition morph was tried and removed - see home.css's
   "page transitions" comment. The site-wide crossfade from base.css still runs. */

/* ---------- closing CTA ---------- */
/* A recurring block (same heading, callback body per project) rather than a
   one-off, matching the "what didn't work" pattern elsewhere on these pages. */
.cta-block h2 { margin-bottom: 12px; }
.cta-block p { max-width: var(--measure); }
.cta-btn {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 6px;
  padding: 14px 26px; font-weight: 700; font-size: 14px; letter-spacing: 0.03em;
  border: 2px solid oklch(0.97 0.008 255);
  background: var(--accent1); color: oklch(0.16 0.02 255);
  box-shadow: 6px 6px 0 var(--accent2);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.cta-btn:hover { transform: translate(-3px, -3px); box-shadow: 9px 9px 0 var(--accent2); }
