/* Case pages: same dark poster as the home page. A giant title that tears with speed,
   a full-bleed hero, numbered text chapters, justified media rows, a red next-case slab,
   and the dissolving wordmark footer. */
:root {
  --paper: #050505;
  --paper-2: #0c0c0b;
  --ink: #ebe8e1;
  --red: #ff2a1f;
  --stone: #8a857e;
  --line: rgb(235 232 225 / .14);
  --slab: #000;
  --display: "Nata Sans", "Arial Black", "Helvetica Neue", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  --ease-out: cubic-bezier(.23, 1, .32, 1);
  --ease-io: cubic-bezier(.77, 0, .175, 1);
  --gut: max(16px, env(safe-area-inset-left, 0px));
  color-scheme: dark;
}
@media (min-width: 900px) { :root { --gut: max(40px, env(safe-area-inset-left, 0px)); } }
* { box-sizing: border-box; }
html { overflow-x: clip; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 1rem/1.5 var(--display); -webkit-font-smoothing: antialiased; overflow-x: clip; }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 50; background: var(--paper); }
body::after {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 60; opacity: .06; mix-blend-mode: screen;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.gut { padding-left: var(--gut); padding-right: var(--gut); }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 4px; }
.skip { position: fixed; left: 16px; top: -60px; z-index: 100; padding: 10px 14px; background: var(--red); color: #000; font: 500 .75rem var(--mono); text-transform: uppercase; text-decoration: none; }
.skip:focus { top: 16px; }
.btn { white-space: nowrap; }
@media (max-width: 380px) { .nav .btn { padding: 11px 13px; font-size: .72rem; } }
/* bigger tap targets for the small mono links */
.nav .links a, .c-top a, footer a, .facts dd a { padding-block: 10px; margin-block: -10px; }

.mono { font: 500 .72rem/1.4 var(--mono); letter-spacing: .06em; text-transform: uppercase; }
.normal { font: inherit; color: transparent; -webkit-text-stroke: max(1px, .022em) var(--ink); }
.normal.s { text-decoration: line-through var(--red); text-decoration-thickness: .1em; text-decoration-skip-ink: none; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.red { color: var(--red); }

/* ---------- nav (as home) ---------- */
.nav {
  position: fixed; top: env(safe-area-inset-top, 0px); left: 0; right: 0; z-index: 40;
  display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 16px;
  mix-blend-mode: difference; color: #fff; pointer-events: none; transition: color 200ms ease;
}
.nav > * { pointer-events: auto; }
.nav .mark { width: 92px; height: auto; display: block; }
.nav .links { display: flex; gap: clamp(16px, 2.5vw, 36px); }
.nav .links a { text-decoration: none; }
.nav .links a:hover { text-decoration: line-through; }
.on-red .nav { mix-blend-mode: normal; color: var(--paper); }
.btn {
  display: inline-flex; align-items: center; gap: 10px; text-decoration: none;
  font: 800 .8rem/1 var(--display); text-transform: uppercase; letter-spacing: .02em;
  padding: 13px 18px; border: 1.5px solid currentColor; border-radius: 999px;
  transition: transform 160ms var(--ease-out), background-color 200ms ease, color 200ms ease;
}
.btn:active { transform: scale(.97); }
@media (hover: hover) and (pointer: fine) { .btn:hover { background: #fff; color: #000; } }
@media (max-width: 700px) { .nav .links { display: none; } }

/* ---------- hero: the name, fitted edge to edge, tearing with speed ---------- */
.c-hero {
  min-height: max(560px, min(88svh, 900px)); display: grid; grid-template-rows: auto 1fr auto auto; grid-template-columns: minmax(0, 1fr);
  padding-block: calc(76px + env(safe-area-inset-top, 0px)) clamp(24px, 3vw, 40px); cursor: crosshair; touch-action: pan-y;
}
.c-top { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; color: var(--stone); }
.c-top a { text-decoration: none; color: var(--ink); }
.c-top a:hover { text-decoration: line-through var(--red); }
.title {
  grid-row: 3; margin: 0; font-weight: 900; font-style: italic; text-transform: uppercase;
  line-height: .82; letter-spacing: -.04em; white-space: nowrap; font-size: 12vw;
  padding-top: .06em; /* room for the italic cap tops */
}
.title .w, .n-title .w { display: inline-block; }
.title .ch { display: inline-block; will-change: transform; }
.title .w + .w, .n-title .w + .w { margin-left: .22em; }
@media (max-width: 700px) { .title.stack .w { display: block; margin-left: 0; } }
.js .title .w { clip-path: inset(-20% -10% 100% -10%); animation: wipe 1000ms var(--ease-out) 80ms forwards; }
.js .title .w:nth-child(2) { animation-delay: 160ms; }
@keyframes wipe { to { clip-path: inset(-20% -10% -20% -10%); } }
.c-sub {
  grid-row: 4; margin-top: clamp(20px, 2.6vw, 32px); padding-top: 16px; border-top: 1.5px solid var(--ink);
  display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 24px 40px; align-items: start;
}
.c-sub .tag { margin: 0; font-weight: 900; font-style: italic; text-transform: uppercase; font-size: clamp(1.5rem, 3vw, 2.8rem); line-height: .95; letter-spacing: -.02em; text-wrap: balance; }
.c-sub .tag + p { margin: 12px 0 0; color: var(--stone); max-width: 44ch; font-size: clamp(1rem, 1.2vw, 1.12rem); }
.facts { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 24px; }
.facts dt { color: var(--stone); margin-bottom: 4px; }
.facts dd { margin: 0; font-weight: 700; font-size: 1rem; line-height: 1.3; }
.facts dd a { text-decoration: none; border-bottom: 1.5px solid var(--red); }
.facts dd a:hover { color: var(--red); }
@media (max-width: 860px) { .c-sub { grid-template-columns: 1fr; } }

/* ---------- media ---------- */
.lead { margin: 0; position: relative; overflow: hidden; background: #111; aspect-ratio: 16 / 9; max-height: 92svh; width: 100%; }
.lead img, .lead video { position: absolute; inset: -6% 0; width: 100%; height: 112%; object-fit: cover; display: block; will-change: transform; }
/* reveals run on transform only: an animated clip-path can stay stuck fully closed in
   Chrome on Android (GPU-composited), which left every case image blank there */
.js .lead { transform: scale(.92); transition: transform 1300ms var(--ease-io); }
.js .lead.in { transform: none; }

.row { display: flex; gap: clamp(8px, 1vw, 16px); margin-top: clamp(8px, 1vw, 16px); }
.row figure { margin: 0; flex: var(--a) 1 0; min-width: 0; position: relative; overflow: hidden; background: #111; aspect-ratio: var(--a); }
.row img, .row video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 1200ms var(--ease-out); }
/* a page-coloured curtain shrinks toward the bottom edge, so the image opens from the top down */
.js .row figure::after { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; background: var(--paper); transform-origin: 50% 100%; transition: transform 1100ms var(--ease-io); }
.js .row figure:nth-child(2)::after { transition-delay: 90ms; }
.js .row figure:nth-child(3)::after { transition-delay: 180ms; }
.js .row figure.in::after { transform: scaleY(0); }
.js .row figure:not(.in) img { transform: scale(1.12); }
@media (max-width: 700px) { .row:not(.keep) { flex-direction: column; } .row:not(.keep) figure { flex: none; } }
.media { padding-bottom: clamp(8px, 1vw, 16px); }

/* ---------- chapters ---------- */
.intro { padding-block: clamp(72px, 10vw, 150px); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2.4fr); gap: 16px 40px; }
.intro .mono { color: var(--stone); }
.intro p { margin: 0; font-weight: 700; font-size: clamp(1.35rem, 2.6vw, 2.5rem); line-height: 1.12; letter-spacing: -.015em; text-wrap: pretty; max-width: 34ch; }
.chap { padding-block: clamp(72px, 9vw, 140px); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px 40px; border-top: 1px solid var(--line); margin-top: clamp(64px, 8vw, 120px); }
.media + .chap, .intro + .chap { margin-top: 0; }
.chap .num { grid-column: 1 / -1; color: var(--stone); display: flex; justify-content: space-between; }
.chap h2 { margin: 0; font-weight: 900; font-style: italic; text-transform: uppercase; font-size: clamp(2rem, 5vw, 4.8rem); line-height: .9; letter-spacing: -.03em; text-wrap: balance; }
.chap .body { display: grid; gap: 1em; align-content: start; max-width: 50ch; font-size: clamp(1.02rem, 1.25vw, 1.18rem); line-height: 1.5; }
.chap .body p { margin: 0; }
.chap .body p:first-child { color: var(--ink); }
.chap .body p + p { color: #b9b4ac; }
@media (max-width: 760px) { .intro, .chap { grid-template-columns: 1fr; } }

.quote { padding-block: clamp(80px, 12vw, 180px); }
.quote p { margin: 0; font-weight: 900; font-style: italic; text-transform: uppercase; font-size: clamp(2.2rem, 7.4vw, 7.8rem); line-height: .88; letter-spacing: -.035em; text-wrap: balance; }
.quote p .red { color: var(--red); }
.quote .mono { display: block; margin-top: 20px; color: var(--stone); }

/* ---------- next case: a red slab that floods in ---------- */
.next { position: relative; display: block; text-decoration: none; overflow: hidden; padding-block: clamp(56px, 8vw, 120px) clamp(40px, 6vw, 80px); border-top: 1px solid var(--line); margin-top: clamp(80px, 10vw, 160px); cursor: pointer; }
.next::before { content: ""; position: absolute; inset: 0; background: var(--red); clip-path: inset(100% 0 0 0); transition: clip-path 700ms var(--ease-io); z-index: 0; }
.next > * { position: relative; z-index: 1; }
.next .n-top { display: flex; justify-content: space-between; gap: 16px; color: var(--stone); transition: color 300ms ease; }
.next .n-title { display: block; margin-top: clamp(16px, 2vw, 28px); font-weight: 900; font-style: italic; text-transform: uppercase; line-height: .84; letter-spacing: -.04em; white-space: nowrap; font-size: 12vw; transition: color 300ms ease; }
.next .n-title .ch { display: inline-block; will-change: transform; }
.next .n-sub { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-top: clamp(16px, 2vw, 28px); }
.next .n-sub p { margin: 0; max-width: 46ch; color: var(--stone); transition: color 300ms ease; }
@media (hover: hover) and (pointer: fine) {
  .next:hover::before { clip-path: inset(0 0 0 0); }
  .next:hover .n-title, .next:hover .n-top, .next:hover .n-sub p { color: var(--paper); }
}

/* ---------- contact (as home): black, the wordmark dissolving behind it ---------- */
.contact {
  background: var(--slab); color: var(--ink); padding-block: calc(84px + env(safe-area-inset-top, 0px)) 24px;
  position: relative; overflow: hidden; min-height: max(100svh, 720px);
  display: grid; grid-template-rows: auto 1fr auto; grid-template-columns: minmax(0, 1fr); cursor: crosshair; touch-action: pan-y;
}
.foot-stage { position: absolute; inset: 0; z-index: 0; }
.foot-stage canvas { display: block; width: 100%; height: 100%; }
.contact > :not(.foot-stage) { position: relative; z-index: 1; pointer-events: none; }
.contact a, .contact button, .contact .mail { pointer-events: auto; }
.contact .c-top { color: var(--stone); }
.c-main { align-self: center; display: grid; justify-items: center; text-align: center; padding-block: clamp(40px, 6vw, 80px); }
.contact h2 { margin: 0; font-weight: 900; font-style: italic; text-transform: uppercase; font-size: clamp(2.4rem, 8.2vw, 8.6rem); line-height: .86; letter-spacing: -.035em; text-wrap: balance; }
.contact .normal.s { text-decoration-color: var(--ink); }
.mailrow { margin-top: clamp(24px, 3.4vw, 48px); display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 14px 22px; }
.mail { font-weight: 800; font-size: clamp(1.5rem, 4vw, 3.6rem); color: var(--ink); letter-spacing: -.02em; overflow-wrap: anywhere; min-width: 0; user-select: all; }
.copy { font: 500 .72rem var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--ink); background: rgb(0 0 0 / .4); border: 1.5px solid currentColor; border-radius: 999px; padding: 11px 16px; cursor: pointer; transition: transform 160ms var(--ease-out), background-color 200ms ease, color 200ms ease; }
.copy:active { transform: scale(.97); }
@media (hover: hover) and (pointer: fine) { .copy:hover { background: var(--ink); color: var(--paper); } }
footer { display: grid; grid-template-columns: 1fr auto 1fr; gap: 8px 24px; padding-top: 16px; border-top: 1px solid var(--line); color: #8f8a83; }
footer > :last-child { justify-self: end; text-decoration: none; }
footer a:hover { color: var(--ink); }
@media (max-width: 700px) { footer { grid-template-columns: 1fr; } footer > :last-child { justify-self: start; } }

@media (prefers-reduced-motion: reduce) {
  .js .title .w { animation: none; clip-path: none; }
  .js .lead { transform: none; transition: none; }
  .js .row figure::after { display: none; }
  .js .row figure:not(.in) img { transform: none; }
  .next::before { transition: none; }
}
