/* ============================================================
   TELLER — toldbyteller.com
   Design language: "The Shooting Script"
   Paper (day) & screening room (night). Fraunces + Brown + Courier Prime.
   ============================================================ */

/* ---------- Fonts ---------- */
@font-face {
  font-family: 'Brown';
  src: url('../fonts/Brown-Light.otf') format('opentype');
  font-weight: 300; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Brown';
  src: url('../fonts/Brown-Regular.otf') format('opentype');
  font-weight: 400; font-style: normal; font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  /* DAY — the page */
  --paper: #F2EDE2;        /* pale linen */
  --paper-raise: #F8F4EB;  /* raised surfaces */
  --ink: #191712;          /* letterpress ink */
  --ink-soft: #45423A;     /* long-form body */
  --muted: #6E6A5F;        /* captions, meta */
  --line: rgba(25, 23, 18, 0.16);
  --line-strong: rgba(25, 23, 18, 0.34);
  --marker: #F5E03F;       /* highlighter, roughly, by hand */
  --marker-blend: multiply;
  --scrim: rgba(10, 10, 12, 0.42);

  --font-serif: 'Fraunces', 'Iowan Old Style', Georgia, serif;
  --font-sans: 'Brown', 'Helvetica Neue', Helvetica, -apple-system, sans-serif;
  --font-mono: 'Courier Prime', 'Courier New', monospace;

  --gutter: clamp(20px, 4.5vw, 76px);
  --max: 1560px;
  --scope: 8 / 3;          /* 2.66:1 — every frame on this site is cinemascope */

  --ease-page: cubic-bezier(0.22, 1, 0.36, 1);
  --dur: 750ms;

  color-scheme: light;
  --theme-flip: 0; /* used by grain + odd bits */
}

html[data-theme='night'] {
  /* NIGHT — the screening room (cool black, not warm) */
  --paper: #0F0F12;
  --paper-raise: #17171B;
  --ink: #EFEDE6;
  --ink-soft: #C9C6BC;
  --muted: #8F8D85;
  --line: rgba(239, 237, 230, 0.16);
  --line-strong: rgba(239, 237, 230, 0.36);
  --marker: #C9B52E;
  --marker-blend: screen;
  --scrim: rgba(5, 5, 8, 0.5);
  color-scheme: dark;
  --theme-flip: 1;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-weight: 300;
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.1rem);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-optical-sizing: auto;
  transition: background-color 260ms ease, color 260ms ease;
}
img, video { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
::selection { background: #F1DC4E; color: #191712; }

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
  border-radius: 2px;
}

/* faint fibre over everything — linen, not white */
html::before {
  content: '';
  position: fixed; inset: 0; z-index: 95; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
  background-size: 240px 240px;
  opacity: 0.05;
}
html[data-theme='night']::before { opacity: 0.035; }

.skip-link {
  position: fixed; top: 10px; left: 10px; z-index: 200;
  background: var(--ink); color: var(--paper);
  padding: 0.6em 1em; font-family: var(--font-mono); font-size: 0.8rem;
  transform: translateY(-300%);
}
.skip-link:focus { transform: none; }

.container {
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* Typography helpers */
.slug {
  font-family: var(--font-mono);
  font-size: clamp(0.75rem, 0.71rem + 0.15vw, 0.85rem);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.smallcaps {
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

/* Grain — one shared texture, media only */
.grain::after {
  content: '';
  position: absolute; inset: 0;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
  background-size: 240px 240px;
  opacity: 0.07;
  mix-blend-mode: overlay;
}

/* ============================================================
   NAVIGATION — monochrome, blends over film and paper alike
   ============================================================ */
.site-nav {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  mix-blend-mode: difference; color: #fff;
  transition: transform 480ms var(--ease-page);
}
.site-nav.is-hidden { transform: translateY(-110%); }
/* Windows High Contrast / forced-colors: blend-mode legibility can't be
   guaranteed, so fall back to solid system colours over a solid backing. */
@media (forced-colors: active) {
  .site-nav { mix-blend-mode: normal; color: CanvasText; background: Canvas; forced-color-adjust: none; }
}
.site-nav .container {
  display: flex; align-items: center; justify-content: space-between;
  gap: 2rem;
  padding-block: clamp(16px, 2.4vw, 26px);
}
.site-nav :focus-visible { outline-color: currentColor; }

.wordmark { display: block; height: clamp(20px, 2.1vw, 26px); width: auto; }
.wordmark svg { height: 100%; width: auto; fill: currentColor; display: block; }

/* The homepage opens on the wordmark at full size; the corner mark
   only takes over once the masthead has scrolled away. */
.masthead {
  display: grid; place-items: center;
  padding: clamp(84px, 13vh, 150px) var(--gutter) clamp(22px, 4.5vh, 46px);
}
.masthead svg {
  display: block; width: auto; fill: var(--ink);
  height: clamp(34px, 6.3vw, 77px);
}
.masthead .wordmark { height: auto; }
html[data-home] .site-nav .wordmark {
  opacity: 0; transform: translateY(-8px); pointer-events: none; visibility: hidden;
  transition: opacity 420ms var(--ease-page), transform 420ms var(--ease-page), visibility 0s linear 420ms;
}
html[data-home].nav-mark-in .site-nav .wordmark {
  opacity: 1; transform: none; pointer-events: auto; visibility: visible;
  transition: opacity 420ms var(--ease-page), transform 420ms var(--ease-page), visibility 0s linear 0s;
}
html[data-home] .hero { padding-top: 0; }

.nav-right { display: flex; align-items: center; gap: clamp(1.1rem, 2.6vw, 2.6rem); }
.nav-links { display: flex; gap: clamp(1.1rem, 2.6vw, 2.4rem); list-style: none; margin: 0; padding: 0; }
.nav-links a {
  font-weight: 400; font-size: 0.72rem; letter-spacing: 0.22em; text-transform: uppercase;
  position: relative; padding-block: 4px;
}
.nav-links a::after {
  content: ''; position: absolute; left: 0; right: 100%; bottom: 0;
  height: 1px; background: currentColor;
  transition: right 320ms var(--ease-page);
}
.nav-links a:hover::after { right: 0; }

.mode-switch {
  display: flex; align-items: center; gap: 0.45em;
  font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.1em;
}
.mode-switch button {
  padding: 4px 2px; opacity: 0.55; border-bottom: 1px solid transparent;
}
.mode-switch button[aria-pressed='true'] {
  opacity: 1; border-bottom-color: currentColor;
}
.mode-switch .sep { opacity: 0.4; }

/* ============================================================
   HERO — the reel sits on the page like a plate, not over it
   ============================================================ */
.hero { padding: clamp(108px, 16vh, 176px) 0 clamp(0.6rem, 1.5vw, 1.2rem); }
.hero-inner { max-width: 1240px; margin-inline: auto; }
.hero .fade-in-slug { min-height: 1.2em; margin: 0 0 clamp(0.8rem, 1.8vh, 1.2rem); }
.hero-frame {
  position: relative; aspect-ratio: var(--scope);
  overflow: hidden; border-radius: 3px; background: #0c0c0e;
  box-shadow: 0 26px 70px -34px rgba(20, 18, 12, 0.5);
}
.hero-frame video { width: 100%; height: 100%; object-fit: cover; }
.hero-caption {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 0.4rem 1.4rem; flex-wrap: wrap;
  padding-top: 10px;
}
.hero-caption .right { display: flex; align-items: baseline; gap: 1.6rem; }

.video-toggle {
  font-family: var(--font-mono);
  font-size: 0.72rem; letter-spacing: 0.14em;
  color: var(--muted);
  border-bottom: 1px solid transparent; padding-bottom: 2px;
  min-width: 4.5em; text-align: left;
}
.video-toggle:hover { color: var(--ink); border-bottom-color: var(--marker); }

/* load-in choreography */
.fade-item { opacity: 0; transform: translateY(22px); }
.is-loaded .fade-item {
  opacity: 1; transform: none;
  transition: opacity 900ms var(--ease-page), transform 900ms var(--ease-page);
  transition-delay: var(--d, 0ms);
}
.caret::after {
  content: ''; display: inline-block; width: 0.55em; height: 1.05em;
  margin-left: 2px; vertical-align: text-bottom;
  background: currentColor; opacity: 0;
}
.caret.is-typing::after { animation: caret-blink 720ms steps(1) infinite; }
@keyframes caret-blink { 0%, 55% { opacity: 1; } 56%, 100% { opacity: 0; } }

/* ============================================================
   SECTION FURNITURE — sluglines and hairlines
   ============================================================ */
section { position: relative; }
.section-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 1.5rem;
  border-top: 1px solid var(--line-strong);
  padding-top: 14px;
  margin-bottom: clamp(1.4rem, 3vw, 2.4rem);
}
.section-head .num { color: var(--ink-soft); }
.section-head .scribble { align-self: center; }
.section-head h2 { margin: 0; font-weight: 400; }

/* ============================================================
   SYNOPSIS — the logline
   ============================================================ */
.synopsis { padding-block: clamp(2.6rem, 5.5vw, 4.6rem) clamp(2.6rem, 5vw, 4.4rem); }
.synopsis .lede {
  margin: 0 0 0.55em;
  font-family: var(--font-serif); font-weight: 370;
  font-size: clamp(2.1rem, 0.9rem + 4.6vw, 4.9rem);
  line-height: 1.04; letter-spacing: -0.015em;
  max-width: 14em;
}
/* ------------------------------------------------------------
   THE MARKER PEN
   Two overlapping strokes with ragged, chisel-tip ends; the
   overlap darkens like real highlighter ink.
   ------------------------------------------------------------ */
/* inline-block so the pseudo-elements' percentage heights resolve against
   this span's own box rather than the taller line box — on small text the
   second stroke otherwise lands below the glyphs and reads as an underline.
   Safe here because .mark is always nowrap. */
/* line-height: 1 makes this robust to whatever the surrounding element sets —
   .slug's inherited 1.6 was leaving this box far taller than the glyphs it
   contains, so the percentage-positioned strokes below landed under the
   text instead of on it. */
.mark { position: relative; z-index: 0; white-space: nowrap; display: inline-block; line-height: 1; }
.mark::before, .mark::after {
  content: ''; position: absolute; z-index: -1;
  background: var(--marker);
  mix-blend-mode: var(--marker-blend);
  transform-origin: left center;
}
.mark::before {
  left: -2%; right: -3%; top: 12%; height: 74%;
  clip-path: polygon(1.4% 6%, 99% 0%, 100% 84%, 0% 100%);
  transform: rotate(-0.9deg) scaleX(var(--mark-x, 1));
  opacity: 0.9;
}
.mark::after {
  left: 1%; right: -1.5%; top: 44%; height: 46%;
  clip-path: polygon(0% 12%, 99.4% 0%, 98.6% 96%, 0.8% 100%);
  transform: rotate(0.7deg) scaleX(var(--mark-x, 1));
  opacity: 0.62;
}
.mark--draw { --mark-x: 0; }
.is-in .mark--draw, .mark--draw.is-in { --mark-x: 1; }
.mark--draw::before { transition: transform 520ms var(--ease-page) 560ms; }
.mark--draw::after { transition: transform 560ms var(--ease-page) 660ms; }

/* short marker on a running phrase */
/* A running phrase can wrap across lines, unlike the single-word .mark
   above — absolutely-positioned pseudo-elements misbehave at the wrap
   point (a stray sliver on the empty tail fragment), so this paints
   directly on the element's own background instead. box-decoration-break
   gives each wrapped line its own independently clipped highlight. */
.hl {
  background: var(--marker);
  mix-blend-mode: var(--marker-blend);
  /* clip-path does not fragment reliably alongside box-decoration-break
     across engines (it can clip a wrapped continuation instead of just
     shaping the highlight) — border-radius does fragment correctly. */
  /* small, uneven pixel radii read as a rough-cut rectangle rather than
     a smooth pill — closer in spirit to the H1 mark's angular strokes,
     and unlike large percentage curves this stays crisp at any length. */
  border-radius: 2px 8px 3px 9px / 7px 2px 8px 3px;
  padding: 0.02em 0.16em 0.1em 0.14em;
  margin-inline: -0.14em;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}
.synopsis .after {
  margin: 0; max-width: 56ch; color: var(--ink-soft);
  font-size: clamp(1.05rem, 1rem + 0.35vw, 1.25rem); line-height: 1.65;
}
.synopsis .after::first-letter {
  initial-letter: 2;
  -webkit-initial-letter: 2;
  font-family: var(--font-serif);
  color: var(--ink);
  font-weight: 480;
  margin-right: 0.14em;
}
.synopsis .after strong { font-weight: 400; color: var(--ink); }

/* ============================================================
   WORK — contents page with dotted leaders
   ============================================================ */
.work { padding-bottom: clamp(2.2rem, 4.5vw, 3.6rem); }
.work-list { list-style: none; margin: 0; padding: 0; }
.work-row { border-bottom: 1px solid var(--line); }
.work-row .row {
  display: grid; align-items: baseline;
  grid-template-columns: 3.2em minmax(0, auto) 1fr auto;
  gap: clamp(0.8rem, 2vw, 1.6rem);
  padding-block: clamp(1.05rem, 2.4vw, 1.7rem);
}
div.work-row .row { cursor: default; }
.work-row .no { font-family: var(--font-mono); font-size: 0.78rem; color: var(--muted); transition: color 250ms ease; }
.work-row .title {
  font-family: var(--font-serif); font-weight: 400;
  font-size: clamp(1.35rem, 0.9rem + 1.9vw, 2.6rem);
  line-height: 1.05; letter-spacing: -0.01em;
  transition: transform 420ms var(--ease-page), color 250ms ease;
}
/* dotted leader is real type, so it sits on the shared baseline */
.work-row .leader {
  overflow: hidden; white-space: nowrap; min-width: 2rem;
  font-family: var(--font-mono); font-size: 0.8rem;
  letter-spacing: 0.6em; color: var(--line-strong);
}
.work-row .leader::before {
  content: '. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .';
}
.work-row .meta { color: var(--muted); white-space: nowrap; }
@media (hover: hover) and (pointer: fine) {
  .work-row .row:hover .title, .work-row .row:focus-visible .title {
    transform: translateX(10px); font-style: italic;
  }
  .work-row .row:hover .no, .work-row .row:focus-visible .no { color: var(--ink); }
}
@media (max-width: 720px) {
  .work-row .row { grid-template-columns: 2.4em 1fr; }
  .work-row .leader, .work-row .meta { display: none; }
}

/* floating preview — takes the media's own shape, never crops */
.work-preview {
  position: fixed; left: 0; top: 0; z-index: 60;
  pointer-events: none; overflow: hidden; border-radius: 3px;
  opacity: 0;
  transition: opacity 300ms var(--ease-page);
  box-shadow: 0 24px 70px -18px rgba(8, 8, 12, 0.45);
  background: #101014;
  line-height: 0;
}
.work-preview.is-on { opacity: 1; }
.work-preview img, .work-preview video {
  display: block; width: auto; height: auto;
  max-height: min(52vh, 520px); max-width: min(42vw, 620px);
}
.work-preview img[hidden], .work-preview video[hidden] { display: none; }
.work-preview .pv-label {
  position: absolute; left: 10px; bottom: 8px;
  font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.1em;
  color: rgba(244, 242, 236, 0.85); text-transform: uppercase;
}

/* ============================================================
   PRACTICE — three acts
   ============================================================ */
.practice { padding-block: clamp(2rem, 4vw, 3.4rem) clamp(2.6rem, 5vw, 4.2rem); }
.acts {
  display: grid; grid-template-columns: 1fr; gap: 0;
  border-top: 1px solid var(--line);
}
@media (min-width: 880px) {
  .acts { grid-template-columns: repeat(3, 1fr); border-top: 0; }
  .act { border-left: 1px solid var(--line); padding-inline: clamp(1.4rem, 2.6vw, 2.6rem); }
  .act:first-child { border-left: 0; padding-left: 0; }
}
.act { padding-block: clamp(1.6rem, 3vw, 0.6rem) 0.4rem; border-bottom: 1px solid var(--line); }
@media (min-width: 880px) { .act { border-bottom: 0; } }
.act .slug { display: block; margin-bottom: 1.4rem; }
.act h3 {
  margin: 0 0 0.55em;
  font-family: var(--font-serif); font-weight: 420;
  font-size: clamp(1.5rem, 1.1rem + 1.4vw, 2.2rem); letter-spacing: -0.01em;
}
.act p { margin: 0 0 1.6rem; color: var(--ink-soft); max-width: 34ch; }

/* ============================================================
   STUDIO — author's note
   ============================================================ */
.studio { padding-bottom: clamp(2rem, 4vw, 3.4rem); }
.studio-grid {
  display: grid; gap: clamp(1.6rem, 3.5vw, 3.2rem);
  grid-template-columns: 1fr;
}
@media (min-width: 960px) {
  .studio-grid { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); align-items: start; }
}
.studio-media figure { margin: 0; }
.studio-media .frame {
  position: relative; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 3px;
  background: #101014;
}
.studio-media video, .studio-media img { width: 100%; height: 100%; object-fit: cover; }
.studio-media img { width: 100%; height: 100%; object-fit: cover; }
.studio-media figcaption { padding-top: 10px; display: flex; justify-content: space-between; }
.studio-copy h3 {
  margin: 0 0 0.7em;
  font-family: var(--font-serif); font-weight: 380;
  font-size: clamp(2rem, 1.2rem + 3vw, 3.6rem); line-height: 1.06; letter-spacing: -0.012em;
  text-wrap: balance;
}
.studio-copy p { margin: 0 0 1.2em; color: var(--ink-soft); max-width: 56ch; }

/* ============================================================
   CREDITS — client marquee
   ============================================================ */
.credits { padding-bottom: clamp(2.2rem, 4.5vw, 3.6rem); }
.credits .section-head { margin-bottom: clamp(1.6rem, 3.5vw, 2.6rem); }
.marquee { overflow: hidden; -webkit-mask-image: linear-gradient(to right, transparent, #000 7%, #000 93%, transparent); mask-image: linear-gradient(to right, transparent, #000 7%, #000 93%, transparent); }
.marquee-track {
  display: flex; gap: 3.4rem; width: max-content;
  animation: marquee 46s linear infinite;
  padding-block: 0.4rem;
}
.marquee ul {
  display: flex; gap: 4.2rem; list-style: none; margin: 0; padding: 0;
  align-items: center;
}
.marquee li { display: flex; align-items: center; white-space: nowrap; color: var(--ink-soft); }
.logo {
  display: block; height: clamp(20px, 2.1vw, 28px); width: var(--lw, 130px);
  background-color: currentColor;
  -webkit-mask: var(--m) center / contain no-repeat;
  mask: var(--m) center / contain no-repeat;
  opacity: 0.8;
}
/* mask urls live here so they resolve against this stylesheet */
.logo--ralphlauren { --m: url('../img/logos/ralphlauren.svg'); --lw: 170px; }
.logo--google { --m: url('../img/logos/google.svg'); --lw: 118px; }
.logo--adidas { --m: url('../img/logos/adidas.svg'); --lw: 64px; }
.logo--rayban { --m: url('../img/logos/rayban.svg'); --lw: 112px; }
.logo--waitrose { --m: url('../img/logos/waitrose.svg'); --lw: 158px; }
.logo--bbc { --m: url('../img/logos/bbc.svg'); --lw: 96px; }
.logo--fortyseven { --m: url('../img/logos/fortyseven.svg'); --lw: 52px; }
.logo--acca { --m: url('../img/logos/acca.svg'); --lw: 104px; }
.logo-text {
  font-family: var(--font-sans); font-weight: 400;
  font-size: clamp(0.8rem, 1vw, 0.95rem);
  letter-spacing: 0.24em; text-transform: uppercase;
  opacity: 0.75;
}
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
@keyframes marquee { to { transform: translateX(-50%); } }

/* ============================================================
   CORRESPONDENCE — footer
   ============================================================ */
.correspondence {
  border-top: 1px solid var(--line-strong);
  padding-block: clamp(2.6rem, 5vw, 4.4rem) clamp(2rem, 4vw, 3rem);
}
.corr-grid { display: grid; gap: 3rem; grid-template-columns: 1fr; }
@media (min-width: 900px) { .corr-grid { grid-template-columns: 1fr auto; align-items: end; } }
.corr-lede { margin: 0 0 0.4em; }
.corr-mail {
  display: inline-block;
  font-family: var(--font-serif); font-weight: 380;
  font-size: clamp(1.45rem, 0.7rem + 4.4vw, 5rem);
  line-height: 1.05; letter-spacing: -0.015em;
  position: relative; padding-bottom: 0.08em;
  overflow-wrap: anywhere;
}
/* Two overlapping chisel-stroke bands, same idea as the "Authored" mark —
   safe to do directly here (not the shared .mark class) because .mark
   forces white-space:nowrap, which would stop this address from
   breaking on a narrow phone; inline-block already gives these
   pseudo-elements one solid box to size against, wrap or not. */
.corr-mail::before, .corr-mail::after {
  content: ''; position: absolute; z-index: -1;
  background: var(--marker); mix-blend-mode: var(--marker-blend);
  transform-origin: left center;
}
.corr-mail::before {
  left: -2%; right: -1%; top: 10%; height: 76%;
  clip-path: polygon(1.2% 5%, 99% 0%, 100% 86%, 0% 100%);
  transform: scaleX(0) rotate(-0.8deg);
  transition: transform 620ms var(--ease-page) 160ms;
}
.corr-mail::after {
  left: -1%; right: -0.5%; top: 44%; height: 46%;
  clip-path: polygon(0% 12%, 99% 2%, 98% 96%, 1% 100%);
  transform: scaleX(0) rotate(0.6deg);
  transition: transform 660ms var(--ease-page) 260ms;
}
.corr-mail.reveal.is-in::before { transform: scaleX(1) rotate(-0.8deg); }
.corr-mail.reveal.is-in::after { transform: scaleX(1) rotate(0.6deg); }
.corr-social { display: grid; gap: 0.5rem; justify-items: start; }
.corr-social a, .corr-social span {
  font-weight: 400; font-size: 0.75rem; letter-spacing: 0.22em; text-transform: uppercase;
  border-bottom: 2px solid transparent; padding-bottom: 3px;
}
.corr-social span { color: var(--muted); }
.corr-social a:hover { border-color: var(--marker); color: var(--ink); }
.corr-note { position: absolute; right: clamp(0px, 6vw, 120px); top: -2.4em; }
.corr-grid { position: relative; }

.colophon {
  margin-top: clamp(4rem, 8vw, 6rem);
  border-top: 1px solid var(--line);
  padding-top: 1.2rem;
  display: flex; flex-wrap: wrap; gap: 0.8rem 2.4rem;
  font-family: var(--font-mono); font-size: 0.74rem; letter-spacing: 0.06em;
  color: var(--muted);
}
.colophon a { border-bottom: 1px solid var(--line-strong); }
.colophon a:hover { color: var(--accent); border-color: var(--accent); }
.fade-out {
  text-align: center; padding: clamp(3rem, 7vw, 5rem) 0 0;
  font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.3em;
  color: var(--muted);
}

/* ============================================================
   CASE PAGE — the title page
   ============================================================ */
.case-title { padding: clamp(6.5rem, 13vh, 9rem) 0 clamp(2rem, 4vw, 3.2rem); text-align: center; }
.case-title .slug { display: block; margin-bottom: 2.4rem; }
.case-title h1 {
  margin: 0 auto 0.35em;
  font-family: var(--font-serif); font-weight: 370;
  font-size: clamp(2.6rem, 1.2rem + 6vw, 6.4rem);
  line-height: 1.0; letter-spacing: -0.015em; max-width: 14em; text-wrap: balance;
}
.case-title .for { color: var(--muted); font-weight: 300; }
.case-hero { margin-bottom: clamp(1.6rem, 3vw, 2.6rem); }
.work--all { padding-top: 0; }
.work-all { margin-top: clamp(1.6rem, 3.5vw, 2.6rem); }
.work-all a { color: var(--ink); }
.case-hero .frame {
  position: relative; overflow: hidden; border-radius: 3px; background: #101014;
  aspect-ratio: var(--ratio, 16 / 9);
}
.case-hero img, .case-hero video { width: 100%; height: 100%; object-fit: cover; }

/* ============================================================
   WATCH THE FILM — the loop stands in until you ask for it
   ============================================================ */
.watch { position: relative; }
.watch-btn {
  position: absolute; inset: 0; display: grid; place-items: center;
  color: #F4F2EC; z-index: 2;
}
.watch-btn .chip {
  display: inline-flex; align-items: center; gap: 0.7em;
  font-family: var(--font-mono); font-size: clamp(0.72rem, 0.9vw, 0.84rem);
  letter-spacing: 0.14em;
  padding: 0.9em 1.6em; border: 1px solid rgba(244, 242, 236, 0.6); border-radius: 999px;
  background: rgba(12, 12, 16, 0.3); backdrop-filter: blur(6px);
  transition: background 280ms ease, color 280ms ease, border-color 280ms ease;
}
.watch-btn:hover .chip { background: #F4F2EC; color: #121215; border-color: #F4F2EC; }
.watch-btn:focus-visible { outline: none; }
.watch-btn:focus-visible .chip { outline: 2px solid #F4F2EC; outline-offset: 4px; }
.watch.is-playing .watch-btn { display: none; }
.watch.is-playing video { object-fit: contain; background: #000; }

.case-body {
  display: grid; gap: clamp(2rem, 4vw, 3.5rem); grid-template-columns: 1fr;
  padding-bottom: clamp(2rem, 4vw, 3.4rem);
}
@media (min-width: 960px) { .case-body { grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); } }
/* without a credits column the synopsis sets its own measure */
.case-body--solo { grid-template-columns: 1fr; }
@media (min-width: 960px) { .case-body--solo { grid-template-columns: 1fr; } }
.case-body--solo .case-prose { max-width: 62ch; margin-left: auto; margin-right: auto; }
.case-credits { align-self: start; position: sticky; top: 100px; }
.case-credits dl { margin: 0; border-top: 1px solid var(--line-strong); }
.case-credits div { display: grid; grid-template-columns: 9em 1fr; gap: 1rem; padding: 0.75rem 0; border-bottom: 1px solid var(--line); }
.case-credits dt { font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.case-credits dd { margin: 0; font-weight: 300; }
.case-prose .lede {
  font-family: var(--font-serif); font-weight: 370;
  font-size: clamp(1.5rem, 1rem + 1.8vw, 2.4rem); line-height: 1.2; margin: 0 0 1em; letter-spacing: -0.01em;
}
.case-prose p { color: var(--ink-soft); max-width: 62ch; margin: 0 0 1.2em; }
.case-stills { display: grid; gap: clamp(1rem, 2.4vw, 2rem); margin-top: clamp(2rem, 4vw, 3rem); }
.case-stills figure { margin: 0; }
.case-stills .frame { aspect-ratio: var(--scope); overflow: hidden; border-radius: 3px; position: relative; background: #101014; }
.case-stills img { width: 100%; height: 100%; object-fit: cover; }
.case-stills figcaption { padding-top: 8px; }
.case-next { border-top: 1px solid var(--line-strong); }
.case-next a {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: baseline; gap: 2rem;
  padding-block: clamp(2rem, 5vw, 3.4rem);
}
.case-next a > :first-child { justify-self: start; }
.case-next a > :last-child { justify-self: end; }
@media (max-width: 720px) {
  .case-next a { grid-template-columns: 1fr; gap: 0.6rem; text-align: left; }
  .case-next a > :first-child, .case-next a > :last-child { justify-self: start; }
}
.case-next .title {
  font-family: var(--font-serif); font-weight: 380;
  font-size: clamp(1.8rem, 1rem + 3vw, 3.6rem); letter-spacing: -0.012em;
  transition: transform 420ms var(--ease-page), color 250ms ease;
}
.case-next a:hover .title { transform: translateX(12px); font-style: italic; }

/* ============================================================
   CASE PLATES — mixed-ratio collages for the deeper studies
   ============================================================ */
.case-section { margin: clamp(1.8rem, 3.4vw, 2.8rem) 0; }
.case-section .section-head { margin-bottom: clamp(1rem, 2vw, 1.6rem); }
.plates { display: grid; gap: clamp(1rem, 2vw, 1.8rem); grid-template-columns: repeat(3, 1fr); }
.plates--2 { grid-template-columns: repeat(2, 1fr); }
.plates--4 { grid-template-columns: repeat(4, 1fr); gap: clamp(0.7rem, 1.4vw, 1.2rem); }
/* photography that sets its own height: never cropped */
.plates--4 { align-items: start; }
.plate--mf .frame { aspect-ratio: auto; }
.plate--mf img { width: 100%; height: auto; object-fit: contain; }
.plate { margin: 0; }
.plate .frame { position: relative; overflow: hidden; border-radius: 3px; background: #101014; }
/* ratios match the source files, so nothing is cropped */
.plate--tall .frame { aspect-ratio: 9 / 16; }
.plate--45 .frame { aspect-ratio: 4 / 5; }
.plate--34 .frame { aspect-ratio: 3 / 4; }
.plate--wide .frame { aspect-ratio: 16 / 9; }
.plate--pano .frame { aspect-ratio: 16 / 5; }
.plate--scope .frame { aspect-ratio: var(--scope); }
.plate img, .plate video { width: 100%; height: 100%; object-fit: cover; display: block; }
.plate figcaption { padding-top: 8px; }
.plate--full { grid-column: 1 / -1; }
@media (max-width: 760px) {
  .plates, .plates--2, .plates--4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .plates, .plates--2 { grid-template-columns: 1fr; }
  .plates--4 { grid-template-columns: repeat(2, 1fr); }
}

/* ============================================================
   COMPACT VIEWPORTS
   ============================================================ */
@media (max-width: 640px) {
  .wordmark { height: 18px; }
  .site-nav .container { gap: 1rem; }
  .nav-right { gap: 1rem; }
  .nav-links { gap: 0.9rem; }
  .nav-links a { letter-spacing: 0.14em; font-size: 0.68rem; }
  .mode-switch { font-size: 0.68rem; }
}
@media (max-width: 560px) {
  .nav-links li:nth-child(2) { display: none; } /* STUDIO — one scroll away */
}
@media (max-width: 430px) {
  .nav-links li:nth-child(1) { display: none; } /* WORK — the page opens with it */
}
@media (max-height: 540px) {
  .hero { padding-top: 88px; }
}

/* ============================================================
   REVEALS — text rises, media wipes open, sections arrive
   ============================================================ */
.reveal { opacity: 0; transform: translateY(26px); }
.reveal.is-in {
  opacity: 1; transform: none;
  transition: opacity var(--dur) var(--ease-page), transform var(--dur) var(--ease-page);
  transition-delay: calc(var(--i, 0) * 70ms);
}

/* media opens like a shutter rather than fading */
.wipe .frame, .wipe.frame, .wipe .hero-frame {
  clip-path: inset(0 0 100% 0);
  transition: clip-path 980ms var(--ease-page);
}
.wipe.is-in .frame, .wipe.frame.is-in, .wipe.is-in .hero-frame {
  clip-path: inset(0 0 0 0);
  transition-delay: calc(var(--i, 0) * 80ms);
}
.wipe img, .wipe video {
  transform: scale(1.06);
  transition: transform 1400ms var(--ease-page);
}
.wipe.is-in img, .wipe.is-in video { transform: scale(1); }

/* sluglines draw their rule in as the section arrives */
.section-head.reveal { position: relative; }
.section-head.reveal::before {
  content: ''; position: absolute; left: 0; top: -1px; height: 1px; width: 0;
  background: var(--ink); opacity: 0.5;
  transition: width 900ms var(--ease-page);
}
.section-head.reveal.is-in::before { width: 100%; }

/* ============================================================
   TYPED HEADLINES — characters arrive, no layout shift
   ============================================================ */
.type-in .ch { opacity: 0; transition: opacity 90ms linear; }
.type-in.is-typed .ch { opacity: 1; }

/* ============================================================
   CAPTURE MODE — final states for automated screenshots
   ============================================================ */
html.is-capture .fade-item,
html.is-capture .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
html.is-capture .mark--draw { --mark-x: 1; }
html.is-capture .wipe .frame, html.is-capture .wipe.frame, html.is-capture .wipe .hero-frame { clip-path: none !important; }
html.is-capture .wipe img, html.is-capture .wipe video { transform: none !important; }
html.is-capture .section-head.reveal::before { width: 100% !important; }
html.is-capture .type-in .ch { opacity: 1 !important; }
html.is-capture .caret::after { display: none; }
html.is-capture .marquee-track { animation-play-state: paused; }
/* headless renderers may not decode video — show posters instead */
html.is-capture video { display: none !important; }
html.is-capture .hero-frame { background: #0c0c0e url('../img/hero_poster.jpg') center / cover no-repeat; }
html.is-capture .plate .frame, html.is-capture .case-hero .frame { background-size: cover; background-position: center; }

/* ============================================================
   REDUCED MOTION — final states, no theatre
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .fade-item, .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
  .mark--draw { --mark-x: 1; }
  .wipe .frame, .wipe.frame, .wipe .hero-frame { clip-path: none !important; }
  .wipe img, .wipe video { transform: none !important; }
  .section-head.reveal::before { width: 100% !important; }
  .type-in .ch { opacity: 1 !important; }
  .caret::after, .caret.is-typing::after { animation: none; opacity: 0; }
  .marquee-track { animation: none; }
  .marquee { overflow-x: auto; mask-image: none; -webkit-mask-image: none; }
  .work-preview { transition: opacity 200ms ease; transform: none; }
  .site-nav, .work-row .title, .case-next .title { transition: none; }
}
