/* ════════════════════════════════════════════════════════
   CASE DECK — the shared format for every case study
   A deck of blush slides, one idea per slide. A title slide set in
   type alone, then slides labelled by where they sit in the story
   (Problem, Before, Solution, Redesigned, Result…). Inside a slide
   the words take a narrow column and the picture takes the rest,
   beside it or under it. Pictures sit straight on the blush: no
   frame, no mount, no caption. Type stays at reading size.
   Inside the landing's case-study panel the slides sit on the
   panel's green and the facts move up into the panel's header.
════════════════════════════════════════════════════════ */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg:    #ffffff;
  --card:  #f8d5d1;      /* the landing's blush: every slide */
  --ink:   #191712;
  --text:  rgba(25,23,18,0.78);
  --mute:  rgba(25,23,18,0.46);
  --soft:  rgba(25,23,18,0.68);   /* labels and small supporting text */

  --nav-h: 64px;
  --edge:  20px;                     /* page edge and the gap between slides */
  --pad:   clamp(28px, 3.6vw, 64px); /* inside a slide */
  --prose: 580px;
  --side:  clamp(260px, 27vw, 400px);/* the words column on a split slide */
  --r:     15px;                     /* slide radius   */
  --r-ui:  8px;                      /* picture radius */
}

html { background: var(--bg); scroll-behavior: smooth; }
body {
  background: var(--bg); color: var(--text);
  font: 400 16px/1.62 'Space Grotesk', Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
code { font: 500 .92em/1 ui-monospace, 'SF Mono', Menlo, Consolas, monospace; color: var(--ink); }

/* ── Site nav, as on every other page ── */
#site-nav {
  position: fixed; z-index: 60; inset: 0 0 auto;
  height: var(--nav-h); padding: 0 32px;
  display: grid; grid-template-columns: minmax(0,275px) minmax(0,1fr) auto;
  column-gap: clamp(28px,3.5vw,64px); align-items: center;
  background: var(--bg);
  font: 600 25.4px/1.2 'Space Grotesk', Arial, sans-serif; letter-spacing: -.011em;
}
#site-nav a { color: var(--ink); text-decoration: none; transition: opacity .2s ease; }
#site-nav:hover > a { opacity: .4; }
#site-nav > a:hover { opacity: 1; }
@media (max-width: 900px) {
  #site-nav { grid-template-columns: 1fr auto auto; column-gap: 20px; font-size: 21.75px; padding: 0 16px; }
}

/* ── The deck ── */
.deck { padding: calc(var(--nav-h) + 8px) var(--edge) 80px; }
.slide {
  position: relative;
  background: var(--card); border-radius: var(--r);
  padding: var(--pad);
  min-height: calc(100vh - var(--nav-h) - var(--edge));
  display: flex; flex-direction: column; justify-content: center;
  gap: clamp(22px, 2.6vw, 36px);
}
.slide + .slide { margin-top: var(--edge); }
/* Words only: the slide is as tall as what it says, not a screen of air. */
.slide--fit { min-height: 0; }

/* Split: words in a column of their own, the picture takes the rest. */
@media (min-width: 980px) {
  .slide--split {
    display: grid; align-items: center;
    grid-template-columns: var(--side) minmax(0, 1fr);
    column-gap: clamp(34px, 4.4vw, 84px);
  }
}

/* ── Where in the story a slide sits, top left ── */
.label {
  position: absolute; top: calc(var(--pad) * .6); left: var(--pad);
  font-size: 12px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase;
  color: var(--soft);
}
.slide:has(> .label) { padding-top: calc(var(--pad) + 30px); }

/* ── Type: reading size throughout ── */
.words { max-width: var(--prose); }
.words p + p { margin-top: 1em; }
.words h2 {
  font-size: 16px; font-weight: 600; color: var(--ink);
  letter-spacing: -.005em; margin-bottom: .7em;
}

/* ── Title slide, set in type alone ── */
.slide--hero { justify-content: space-between; }
.eyebrow { font-size: 12px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase;
           color: var(--soft); margin-bottom: clamp(24px, 3vw, 40px); }
.eyebrow span { margin: 0 8px; opacity: .45; }
.slide--hero h1 {
  font-size: clamp(56px, 9.6vw, 148px); font-weight: 480;
  letter-spacing: -.073em; line-height: .9; color: var(--ink);
  margin-bottom: clamp(24px, 3vw, 44px);
}
.hero-line { max-width: 660px; font-size: clamp(17px, 1.6vw, 21px); line-height: 1.6; color: var(--text); }

/* ── Pictures, straight on the blush ──
   A small radius and a hairline keep white UI from bleeding into
   the pink. A dark recording (a terminal) needs neither. */
figure { min-width: 0; }
.pic img, .pic video {
  display: block; width: 100%; height: auto;
  border-radius: var(--r-ui);
  box-shadow: 0 0 0 1px rgba(60,20,20,.08);
  background: #fff;
}
.pic--dark img, .pic--dark video { background: #111; box-shadow: none; }
.duo { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(12px, 1.6vw, 22px); align-items: start; }

/* ── A written excerpt, set like a page of the source ── */
.excerpt {
  background: rgba(255,255,255,.55); border-radius: var(--r-ui);
  padding: clamp(20px, 2.4vw, 34px); max-width: 860px;
  font-size: 15px; line-height: 1.6; color: var(--ink);
}
.excerpt h3 { font-size: 15px; font-weight: 600; margin-bottom: .8em; }
.excerpt p + p, .excerpt ul + p, .excerpt p + ul { margin-top: .8em; }
.excerpt ul { padding-left: 1.1em; }
.excerpt li + li { margin-top: .3em; }
.excerpt .check { margin-top: 1em; padding-top: .9em; border-top: 1px solid rgba(25,23,18,.14); }
.excerpt .check b { font-weight: 600; }

/* ── Numbers ── */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px 32px; max-width: 1000px; }
.stats b { display: block; font-size: clamp(30px, 3.2vw, 46px); font-weight: 600; letter-spacing: -.03em; line-height: 1.05; color: var(--ink); }
.stats small { display: block; margin-top: 6px; font-size: 14px; color: var(--soft); }

/* ── Closing facts and the way on ── */
.facts {
  padding-top: 24px; margin-top: clamp(40px, 5vw, 72px); border-top: 1px solid rgba(25,23,18,.16);
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px;
  font-size: 14px; max-width: 1000px;
}
.facts dt { color: var(--soft); margin-bottom: 4px; }
.facts dd { color: var(--ink); }
.next {
  align-self: flex-start; color: var(--ink); text-decoration: none;
  font-size: 18px; font-weight: 500; padding-bottom: 4px;
  border-bottom: 1px solid rgba(25,23,18,.3);
}
.next span { display: inline-block; transition: transform .3s cubic-bezier(.22,1,.36,1); }
.next:hover span { transform: translateX(5px); }

/* ── Inside the landing's panel ── */
html.in-panel { --nav-h: 0px; scrollbar-width: none; }
html.in-panel::-webkit-scrollbar { display: none; }
html.in-panel, html.in-panel body { background: var(--panel-green, #CFE6A0); }
html.in-panel #site-nav, html.in-panel .facts { display: none; }
html.in-panel .deck { padding: 0 var(--edge) var(--edge); }
html.in-panel .slide { min-height: calc(100vh - var(--edge) * 2); }
html.in-panel .slide--fit { min-height: 0; }

/* ── Narrow ── */
@media (max-width: 979px) {
  .slide, html.in-panel .slide { min-height: 0; }
}
@media (max-width: 700px) {
  :root { --edge: 12px; --pad: 22px; }
  .duo { grid-template-columns: 1fr; }
  .facts, .stats { grid-template-columns: 1fr 1fr; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
