/* Case study pages — shares the home page's palette and type */
:root {
  --bg: #0e0e0d;
  --fg: #f4f3ef;
  --fg-2: #bdbbb5;
  --muted: #8a8883;
  --line: #2a2927;
  --max: 1280px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { background: var(--bg); color: var(--fg); font-family: "Space Grotesk", system-ui, sans-serif; -webkit-font-smoothing: antialiased; line-height: 1.5; }
a { color: inherit; text-decoration: none; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 40px; }
.mono { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; }

header { position: sticky; top: 0; z-index: 10; background: rgba(14,14,13,.9); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
nav { height: 72px; display: flex; align-items: center; justify-content: space-between; }
.brand { display: flex; align-items: center; gap: 14px; font-weight: 500; letter-spacing: .28em; font-size: 14px; }
.brand svg { width: 26px; height: 26px; }
.back { color: var(--fg-2); transition: color .2s; }
.back:hover { color: var(--fg); }
.btn { display: inline-flex; align-items: center; gap: 12px; border: 1px solid var(--fg); padding: 14px 22px; transition: background .2s, color .2s; }
.btn:hover { background: var(--fg); color: var(--bg); }

/* Hero */
.case-hero { padding: 120px 0 72px; }
.case-hero .label { display: flex; justify-content: space-between; color: var(--muted); margin-bottom: 48px; }
.case-hero h1 { font-weight: 400; font-size: clamp(40px, 5.6vw, 80px); letter-spacing: -.035em; line-height: 1.02; max-width: 13em; color: var(--muted); }
.case-hero h1 .hl { color: var(--fg); }
.case-hero .lede { color: var(--fg-2); font-weight: 300; font-size: clamp(17px, 1.4vw, 20px); max-width: 640px; margin-top: 32px; }

.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 40px; align-items: center; }
.prize-fig { margin: 0; text-align: center; }
.prize { width: 100%; aspect-ratio: 1; display: block; max-width: 460px; margin: 0 auto; }
.prize-fig figcaption { color: var(--muted); margin-top: 8px; }

/* Key numbers */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.stat { background: var(--bg); padding: 32px 28px; }
.stat .n { font-size: clamp(40px, 4.4vw, 64px); font-weight: 300; letter-spacing: -.04em; line-height: 1; }
.stat .mono { color: var(--muted); display: block; margin-top: 16px; line-height: 1.6; }

/* Story */
.story { padding: 96px 0 40px; }
.block { display: grid; grid-template-columns: 240px 1fr; gap: 40px; padding: 40px 0; border-top: 1px solid var(--line); }
.block .mono { color: var(--muted); padding-top: 6px; }
.block p { font-size: 19px; font-weight: 300; color: var(--fg-2); max-width: 720px; }
.block p + p { margin-top: 16px; }
.block p b { color: var(--fg); font-weight: 400; }

/* Comparison (before / during) */
.compare { display: grid; gap: 18px; padding: 8px 0; }
.compare .row { display: grid; grid-template-columns: 200px 1fr 140px; gap: 20px; align-items: center; }
.compare .track { height: 14px; background: #1c1c1a; }
.compare .fill { height: 100%; background: var(--fg); }
.compare .fill.pre { background: #4a4946; }
.compare .v { text-align: right; font-size: 18px; }

/* Footer CTA + next case */
.cta { border-top: 1px solid var(--line); padding: 96px 0; }
.cta h2 { font-weight: 400; font-size: clamp(32px, 4vw, 56px); letter-spacing: -.03em; line-height: 1.05; max-width: 14em; margin-bottom: 40px; }
.next { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.next a { background: var(--bg); padding: 36px 40px; display: block; transition: background .2s; }
.next a:hover { background: #151514; }
.next a:last-child { text-align: right; }
.next .mono { color: var(--muted); display: block; margin-bottom: 10px; }
.next .t { font-size: 22px; }
.note { color: var(--muted); padding: 28px 0 0; }
footer { padding: 32px 0; color: var(--muted); }
footer .wrap { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
footer a { color: var(--fg-2); }

@media (max-width: 900px) {
  .wrap { padding: 0 20px; }
  .case-hero { padding: 72px 0 48px; }
  .hero-grid { grid-template-columns: 1fr; gap: 24px; }
  .prize { max-width: 300px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat { padding: 24px 18px; }
  .stat .n { font-size: clamp(28px, 9vw, 40px); }
  .block { grid-template-columns: 1fr; gap: 12px; }
  .block p { font-size: 17px; }
  .compare .row { grid-template-columns: 1fr; gap: 8px; }
  .compare .v { text-align: left; }
  .next { grid-template-columns: 1fr; }
  .next a, .next a:last-child { padding: 28px 20px; text-align: left; }
}
