/* Case studies: a card comes off the line and hangs open as a full sheet. */
.case {
  --sheet-w: min(1120px, calc(100vw - 2 * var(--gutter)));
  --sheet-top: 46px;
  position: fixed; inset: 0; width: 100%; height: 100%;
  max-width: none; max-height: none; margin: 0; padding: 0; border: 0;
  background: transparent; color: var(--ink); overflow: hidden;
}
.case::backdrop { background: rgb(38 35 31 / 0.56); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
html.case-open { overflow: hidden; }

.case-rope {
  position: absolute; left: -2vw; right: -2vw; top: calc(var(--sheet-top) - var(--rope-w) - 6px); height: var(--rope-w); z-index: 3;
  background:
    linear-gradient(to bottom, rgb(255 255 255 / 0.16), transparent 45%, rgb(0 0 0 / 0.18)),
    repeating-linear-gradient(-58deg, var(--ox) 0 calc(var(--rope-w) * 0.42), var(--ox-dark) calc(var(--rope-w) * 0.42) calc(var(--rope-w) * 0.6));
  border-radius: 999px; box-shadow: 0 6px 12px rgb(0 0 0 / 0.25);
}
.case-rope .peg { top: -10px; }
.case-rope .peg:first-child { left: calc(2vw + 50% - var(--sheet-w) * 0.34); }
.case-rope .peg:nth-child(2) { left: calc(2vw + 50% + var(--sheet-w) * 0.34 - 12px); right: auto; }

.case-sheet {
  position: absolute; top: var(--sheet-top); bottom: 0; left: 50%; width: var(--sheet-w); margin-left: calc(var(--sheet-w) / -2);
  display: flex; flex-direction: column;
  background: var(--paper);
  box-shadow: 0 30px 80px -30px rgb(0 0 0 / 0.6);
  transform-origin: 50% 0;
}
.case-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px clamp(18px, 3vw, 40px); border-bottom: 1px solid var(--line);
}
.case-pos { margin: 0; font: 600 11px/1.3 var(--mono); letter-spacing: 0.07em; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.case-pos b { color: var(--ox); }
.case-nav { display: flex; gap: 8px; flex: none; }
.case-nav button {
  width: 42px; height: 42px; display: grid; place-items: center;
  background: transparent; border: 1px solid var(--ink); color: var(--ink);
  font: 400 18px/1 var(--body); cursor: pointer;
}
.case-nav button:hover { background: var(--ink); color: var(--paper); }
.case-close { font-size: 24px !important; }
.case-scroll { flex: 1; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.case-body {
  --pad: clamp(20px, 4.5vw, 64px);
  padding: 0 var(--pad);
  transition: opacity 220ms ease, translate 320ms cubic-bezier(0.2, 0.7, 0.2, 1);
}
.case-body.is-leaving { opacity: 0; translate: var(--leave, -24px) 0; }
.case-body > * + * { margin-top: clamp(40px, 6vw, 72px); }

/* ---------- Case content ---------- */
.cs-head { padding-top: clamp(32px, 5vw, 64px); }
.cs-meta, .cs-label, .cs-path, .cs-note, .cs-strip figcaption, .cs-plate figcaption, .cs-hero figcaption, .cs-film figcaption {
  margin: 0; font: 600 11px/1.45 var(--mono); letter-spacing: 0.07em; text-transform: uppercase; color: var(--soft);
}
.cs-head h2 { font-size: clamp(48px, 7.4vw, 116px); line-height: 0.98; margin: 14px 0 16px; max-width: 14ch; }
.cs-deck { margin: 0; font: 600 clamp(22px, 2.5vw, 36px)/1.15 var(--body); letter-spacing: -0.01em; max-width: 26ch; }
.cs-deck span { color: var(--ox); }
.cs-split { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 80px); align-items: start; }
.cs-copy p { margin: 0 0 16px; font-size: clamp(17px, 1.3vw, 19px); line-height: 1.55; max-width: 52ch; }
.cs-copy .cs-path, .cs-copy .cs-note { font-size: 11px; }
.cs-path { color: var(--ink); margin-top: 22px !important; }
.cs-question { font: 600 clamp(20px, 1.8vw, 26px)/1.3 var(--body) !important; letter-spacing: -0.01em; }
.cs-ledger { margin: 0; border-bottom: 1px solid var(--ink); }
.cs-ledger div { display: grid; grid-template-columns: 11ch 1fr; gap: 12px; align-items: baseline; padding: 11px 0; border-top: 1px solid var(--ink); }
.cs-ledger dt { font: 600 10px/1.3 var(--mono); letter-spacing: 0.07em; text-transform: uppercase; color: var(--soft); }
.cs-ledger dd { margin: 0; font: 400 clamp(22px, 2.1vw, 30px)/1.1 var(--display); }
.cs-links { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.cs-links a { color: var(--ox); font-weight: 700; text-underline-offset: 4px; }
.cs-retail { margin-top: 26px; }
.cs-retail img { margin-top: 10px; width: 220px; }

.cs-strip {
  display: grid; grid-auto-flow: column; grid-auto-columns: min(78%, 520px); gap: 16px;
  margin-inline: calc(var(--pad) * -1); padding: 0 var(--pad) 14px; scroll-padding-inline: var(--pad);
  overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: thin;
}
.cs-strip figure { margin: 0; scroll-snap-align: start; }
.cs-strip img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--bg); margin-bottom: 10px; }
.cs-strip figcaption b { color: var(--ox); margin-right: 8px; }
.cs-strip-steps { grid-auto-columns: min(78%, 460px); }

.cs-hero { margin: 0; }
.cs-hero img { width: 100%; max-height: 78vh; object-fit: contain; background: var(--bg); margin-bottom: 10px; }
.cs-hero-wide img { object-fit: cover; aspect-ratio: 1200 / 630; max-height: none; }

.cs-feature { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 72px); align-items: center; }
.cs-feature-tall { align-items: start; }
.cs-feature h3, .cs-press h3 { font-size: clamp(30px, 3.2vw, 48px); line-height: 1.02; margin: 10px 0 14px; }
.cs-feature p:not(.cs-label):not(.cs-links) { margin: 0 0 14px; font-size: 18px; max-width: 46ch; }
.cs-plate { margin: 0; }
.cs-plate img { width: 100%; background: var(--bg); padding: clamp(10px, 2vw, 24px); margin-bottom: 10px; }
.cs-feature-tall .cs-plate img { padding: 0; }
.cs-press { margin-top: 36px; padding-top: 22px; border-top: 1px solid var(--ink); }

.cs-film { margin: 0; }
.cs-film button, .cs-film iframe, .cs-film video {
  display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; padding: 0; background: var(--ink); margin-bottom: 10px;
}
.cs-film button { position: relative; cursor: pointer; overflow: hidden; }
.cs-film button img { width: 100%; height: 100%; object-fit: cover; transition: scale 600ms ease; }
.cs-film button:hover img { scale: 1.03; }
.cs-film button span {
  position: absolute; left: 16px; bottom: 16px; display: inline-flex; align-items: center; gap: 12px;
  padding: 12px 16px; background: var(--paper); color: var(--ink);
  font: 700 12px/1 var(--body); letter-spacing: 0.04em; text-transform: uppercase;
}
.cs-film button span b { color: var(--ox); }

.cs-logos ul { list-style: none; margin: 14px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.cs-logos li { background: var(--paper); display: grid; place-items: center; padding: 20px; }
.cs-logos img { height: 44px; width: auto; max-width: 100%; object-fit: contain; filter: grayscale(1); opacity: 0.8; }

.cs-credits { list-style: none; margin: 12px 0 22px; padding: 0; }
.cs-credits li { font: 400 clamp(30px, 3vw, 44px)/1.1 var(--display); }
.cs-sum { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); padding: 20px 0; }
.cs-sum p { margin: 0; display: grid; gap: 6px; }
.cs-sum strong { font: 400 clamp(48px, 6vw, 88px)/0.9 var(--display); }
.cs-sum p:last-child strong { color: var(--ox); }
.cs-sum span { font: 600 10px/1 var(--mono); letter-spacing: 0.07em; text-transform: uppercase; color: var(--soft); }
.cs-sum i { font: 400 clamp(28px, 3vw, 44px)/1 var(--display); font-style: normal; color: var(--soft); }

.cs-chapter { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(20px, 4vw, 64px); border-top: 1px solid var(--ink); padding-top: 22px; }
.cs-chapter h3 { font-size: clamp(30px, 3.2vw, 48px); line-height: 1.02; }

.cs-flow { list-style: none; margin: 0; padding: 0; counter-reset: step; }
.cs-flow li {
  counter-increment: step; position: relative; padding: 0 0 22px 46px;
  font: 400 clamp(22px, 2vw, 30px)/1.1 var(--display);
}
.cs-flow li::before {
  content: counter(step); position: absolute; left: 0; top: -2px; width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center; border: 1.5px solid var(--ox); color: var(--ox); background: var(--paper);
  font: 700 11px/1 var(--mono);
}
.cs-flow li:not(:last-child)::after {
  content: ""; position: absolute; left: 13px; top: 28px; bottom: 0; width: 3px;
  background: repeating-linear-gradient(to bottom, var(--ox) 0 4px, var(--ox-dark) 4px 6px); border-radius: 2px;
}
.cs-flow em { font-style: normal; color: var(--soft); }
.cs-close { margin: 0; font: 400 clamp(32px, 4vw, 60px)/1 var(--display); }
.cs-close a { display: inline-block; margin-left: 12px; font: 700 15px/1 var(--body); color: var(--ox); vertical-align: middle; }

.case-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap;
  margin: clamp(56px, 8vw, 96px) clamp(20px, 4.5vw, 64px) 0; padding: 26px 0 36px; border-top: 1px solid var(--ink);
}
.case-next-big { display: grid; gap: 6px; text-align: left; background: none; border: 0; padding: 0; cursor: pointer; color: var(--ink); }
.case-next-big span { font: 600 11px/1 var(--mono); letter-spacing: 0.07em; text-transform: uppercase; color: var(--soft); }
.case-next-big strong { font: 400 clamp(32px, 4vw, 60px)/1 var(--display); }
.case-next-big strong::after { content: " →"; color: var(--ox); }
.case-next-big:hover strong { color: var(--ox); }

@media (max-width: 760px) {
  .case { --sheet-w: 100vw; --sheet-top: 40px; }
  .case-rope .peg:first-child { left: calc(2vw + 18%); }
  .case-rope .peg:nth-child(2) { left: auto; right: calc(2vw + 18%); }
  .case-nav button { width: 38px; height: 38px; }
  .cs-split, .cs-feature, .cs-chapter { grid-template-columns: 1fr; }
  .cs-logos ul { grid-template-columns: repeat(2, 1fr); }
  .cs-ledger div { grid-template-columns: 1fr; gap: 4px; }
  .cs-strip { grid-auto-columns: 84%; }
}
@media (prefers-reduced-motion: reduce) {
  .case-body { transition: opacity 1ms; }
  .cs-film button img { transition: none; }
}
.cs-copy .cs-label { font-size: 11px; line-height: 1.45; margin-bottom: 0; }
