:root {
  --paper: #f7f7f2;
  --paper-deep: #ecece6;
  --ink: #141414;
  --muted: #70706a;
  --berry: #f46246;
  --moss: #8fa982;
  --gold: #f3c64e;
  --sky: #6977e8;
  --white: #ffffff;
  --line: #deded7;
  --radius: 22px;
  --page-pad: clamp(20px, 5vw, 78px);
  --body: "Inter Tight", Arial, sans-serif;
  --display: "Inter Tight", Arial, sans-serif;
  --mono: "DM Mono", Consolas, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--body);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
button { font: inherit; }
img { display: block; max-width: 100%; }

/* Header */
.case-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 76px;
  padding: 0 var(--page-pad);
  background: rgb(247 247 242 / 90%);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.case-wordmark {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  justify-self: start;
  color: var(--ink);
  font-size: 14px;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.case-wordmark span {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
}

.case-wordmark span img { width: 100%; height: 100%; object-fit: contain; }

.case-header-links {
  display: flex;
  gap: clamp(22px, 3vw, 44px);
  font-size: 12px;
}

.case-header a { color: inherit; text-decoration: none; }
.case-header-links a:hover { text-decoration: underline; text-underline-offset: 5px; }

.case-close {
  display: inline-flex;
  gap: 14px;
  align-items: center;
  justify-self: end;
  padding: 8px 13px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  font-size: 11px;
  text-decoration: none;
}

.case-close span { font-size: 18px; line-height: 0.7; }

.progress {
  position: fixed;
  top: 76px;
  left: 0;
  z-index: 60;
  width: 0;
  height: 3px;
  background: var(--berry);
}

/* Chapter nav */
.chapter-nav {
  position: sticky;
  top: 76px;
  z-index: 40;
  display: flex;
  gap: 6px;
  width: 100%;
  padding: 12px var(--page-pad);
  overflow-x: auto;
  background: rgb(250 249 245 / 92%);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
  scrollbar-width: none;
}

.chapter-nav::-webkit-scrollbar { display: none; }

.chapter-nav a {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 11px;
  color: var(--muted);
  border: 1px solid transparent;
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  text-decoration: none;
}

.chapter-nav a:hover,
.chapter-nav a.active {
  color: var(--ink);
  background: var(--paper);
  border-color: var(--line);
}

/* Slides */
main { overflow: clip; }

.slide {
  padding: clamp(72px, 7vw, 112px) var(--page-pad);
  border-bottom: 1px solid var(--line);
}

.content { width: min(1320px, 100%); margin: 0 auto; }

.eyebrow {
  display: inline-flex;
  margin-bottom: 22px;
  padding: 7px 10px;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1, h2, .display {
  font-family: var(--display);
  font-weight: 500;
  letter-spacing: -0.06em;
}

h1 {
  max-width: 1000px;
  margin: 0 0 26px;
  font-size: clamp(52px, 8vw, 122px);
  line-height: 0.9;
}

h2 {
  max-width: 940px;
  margin: 0 0 22px;
  font-size: clamp(40px, 5.4vw, 78px);
  line-height: 1;
}

h3 { font-size: 17px; letter-spacing: -0.025em; }

.lead {
  max-width: 680px;
  margin: 0;
  color: var(--muted);
  font-size: clamp(17px, 1.65vw, 24px);
  letter-spacing: -0.02em;
  line-height: 1.5;
}

/* Hero */
#intro {
  color: var(--white);
  background: var(--ink);
}

#intro .eyebrow { color: var(--white); border-color: rgb(255 255 255 / 22%); }
#intro .lead { color: rgb(250 249 245 / 68%); }

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  gap: clamp(40px, 6vw, 90px);
  align-items: center;
}

.hero-figure {
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid rgb(255 255 255 / 14%);
  background: rgb(255 255 255 / 6%);
}

.hero-figure img { width: 100%; height: 100%; object-fit: cover; }

.meta { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 32px; }

.pill {
  padding: 8px 12px;
  color: rgb(250 249 245 / 72%);
  background: rgb(255 255 255 / 6%);
  border: 1px solid rgb(255 255 255 / 18%);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* Brief cards */
.case-brief {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
  gap: 14px;
  margin-top: 44px;
}

.brief-card {
  padding: clamp(28px, 4vw, 46px);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.brief-card span {
  display: block;
  margin-bottom: 24px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.brief-card h3 {
  max-width: 720px;
  margin: 0;
  font-size: clamp(24px, 3vw, 40px);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.brief-card p { max-width: 560px; margin: 22px 0 0; color: var(--muted); font-size: 16px; line-height: 1.5; }

.brief-card-dark { color: var(--white); background: var(--ink); border-color: var(--ink); }
.brief-card-dark span, .brief-card-dark p { color: rgb(255 255 255 / 64%); }

.brief-card-dark ul {
  display: grid;
  gap: 12px;
  max-width: 620px;
  margin: 26px 0 0;
  padding: 0;
  list-style: none;
  color: rgb(255 255 255 / 76%);
  font-size: 16px;
  line-height: 1.45;
}

.brief-card-dark li { position: relative; padding-left: 22px; }
.brief-card-dark li::before {
  position: absolute;
  top: 0.6em;
  left: 0;
  width: 8px;
  height: 8px;
  content: "";
  background: var(--gold);
  border-radius: 50%;
}

/* Stat grid */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 38px;
}

.stat {
  min-height: 180px;
  padding: 26px;
  background: var(--paper-deep);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.stat:nth-child(2n) { background: var(--white); }

.stat strong {
  display: block;
  margin-bottom: 12px;
  color: var(--ink);
  font-family: var(--display);
  font-size: clamp(34px, 4vw, 56px);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.06em;
}

.stat span { color: var(--muted); font-size: 13px; }

/* Note head (section intros) */
.note-head { max-width: 720px; margin-top: clamp(34px, 4vw, 54px); margin-bottom: 18px; }
.note-head h3 {
  margin-bottom: 8px;
  font-family: var(--display);
  font-size: clamp(22px, 2.2vw, 32px);
  font-weight: 500;
  letter-spacing: -0.04em;
}
.note-head p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.5; }

/* Process steps */
.process { display: grid; gap: 14px; margin-top: 16px; }

.step {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(24px, 4vw, 56px);
  align-items: center;
  padding: clamp(26px, 3.5vw, 44px);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.step:nth-child(even) { background: var(--paper-deep); }
.step:nth-child(even) .step-body { order: 2; }
.step:nth-child(even) .step-figure { order: 1; }

.step-body .num {
  display: block;
  margin-bottom: 18px;
  color: var(--berry);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.step-body h3 {
  margin: 0 0 14px;
  font-family: var(--display);
  font-size: clamp(24px, 2.6vw, 38px);
  font-weight: 500;
  line-height: 1.04;
  letter-spacing: -0.05em;
}

.step-body p { margin: 0; color: var(--muted); font-size: 16px; line-height: 1.55; }

.step-figure {
  display: grid;
  place-items: center;
  padding: 18px;
  overflow: hidden;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) - 6px);
}

.step-figure img {
  width: auto;
  max-width: 100%;
  max-height: 440px;
  object-fit: contain;
  border-radius: calc(var(--radius) - 12px);
}

/* Figure gallery */
.gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.shot {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.shot img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--paper-deep); }
.shot figcaption { padding: 16px 18px 20px; color: var(--muted); font-size: 14px; line-height: 1.45; }
.shot strong { display: block; margin-bottom: 6px; color: var(--ink); font-size: 15px; }

/* Prop / furniture gallery */
.props {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.prop {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.prop img {
  width: 100%;
  aspect-ratio: 1;
  padding: 12px;
  object-fit: contain;
  background: var(--paper-deep);
}

.prop figcaption { padding: 11px 13px 14px; color: var(--muted); font-size: 11px; line-height: 1.35; }
.prop strong { display: block; margin-bottom: 3px; color: var(--ink); font-size: 13px; }

/* Reflection */
.reflection {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 42px;
}

.reflection .card {
  min-height: 320px;
  padding: 30px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  border-top-width: 4px;
}

.reflection .role { border-top-color: var(--sky); }
.reflection .win { border-top-color: var(--moss); }
.reflection .learn { border-top-color: var(--gold); }

.reflection h3 { margin: 0 0 14px; font-size: 18px; }
.reflection ul { margin: 0; padding-left: 18px; color: var(--muted); font-size: 13px; line-height: 1.55; }
.reflection li { margin: 9px 0; }
.reflection p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.6; }

/* Closing */
.closing { color: var(--white); background: var(--ink); border-bottom: 0; }
.closing .eyebrow { color: var(--white); border-color: rgb(255 255 255 / 22%); }
.closing h2 { max-width: 1000px; }
.closing .lead { color: rgb(250 249 245 / 68%); }
.closing .pill { color: rgb(250 249 245 / 72%); }

/* Responsive */
@media (max-width: 900px) {
  .case-header { grid-template-columns: 1fr auto; }
  .case-header-links { display: none; }
  .hero-grid,
  .case-brief,
  .step,
  .step:nth-child(even) .step-body,
  .step:nth-child(even) .step-figure { grid-template-columns: 1fr; order: 0; }
  .stat-grid, .gallery, .reflection, .props { grid-template-columns: repeat(2, 1fr); }
  .hero-figure { aspect-ratio: 16 / 10; }
}

@media (max-width: 600px) {
  .stat-grid, .gallery, .reflection { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
