/* ═════════════ Tokens ═════════════ */
:root {
  --font-display: "Bagel Fat One", "Arial Black", system-ui, sans-serif;
  --font-body: "DM Sans", system-ui, -apple-system, sans-serif;
  --font-film: "Instrument Serif", Georgia, serif;
  --font-hand: "Caveat", "Comic Sans MS", cursive;

  --radius: 22px;
  --radius-sm: 14px;
  --bw: 3px;                      /* cartoon border width */
  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --ease-spring: cubic-bezier(.34, 1.56, .64, 1);
  --t-fast: 160ms;
  --t-med: 320ms;
  --t-slow: 600ms;

  --space-1: 8px; --space-2: 16px; --space-3: 24px; --space-4: 40px; --space-5: 64px; --space-6: 112px;
  --maxw: 1240px;

  --z-scene: 1; --z-header: 40; --z-chat: 60;

  --sc-line: #241B14;             /* scene outlines stay dark in both themes */
}

:root[data-theme="day"] {
  color-scheme: light;
  --bg: #F3E6D3;
  --bg-2: #EBD9C1;
  --card: #FBF4EA;
  --ink: #2B2118;
  --ink-soft: #5B4B3D;
  --border: #2B2118;
  --shadow-c: #2B2118;
  --rust: #B83D27;
  --rust-soft: #E07A5F;
  --olive: #3D4A1F;
  --olive-soft: #7D8B45;
  --mustard: #E3A33B;
  --on-accent: #FBF4EA;
  --focus: #B83D27;

  --sc-wall: #E8CFAE; --sc-wall-2: #DDBF98; --sc-floor: #C8946A; --sc-floor-line: #A87650;
  --sc-sky: #A9D3E6; --sc-bldg: #7C93A8; --sc-win: #D9E8F0; --sc-board: #3D4A1F;
  --sc-frame: #FBF4EA; --sc-rug: #E0A458; --sc-rug-in: #C8432B; --sc-chair: #3B3A4A; --sc-screen: #22304A;
  --sc-shelf: #8A5A3B; --sc-shade: #F3E6D3; --sc-bulb: #F3E6D3;
  --sc-glow: 0; --sc-strip: 0;
}

:root[data-theme="night"] {
  color-scheme: dark;
  --bg: #111830;
  --bg-2: #18213F;
  --card: #1B2547;
  --ink: #F3E6D3;
  --ink-soft: #C3B6A4;
  --border: #E9DCC8;
  --shadow-c: #F2A65A;
  --rust: #EC7A60;
  --rust-soft: #F29A82;
  --olive: #B5C77A;
  --olive-soft: #8E9F55;
  --mustard: #F2B35E;
  --on-accent: #111830;
  --focus: #F2B35E;

  --sc-wall: #1E2A52; --sc-wall-2: #18234A; --sc-floor: #2A2D4A; --sc-floor-line: #22253F;
  --sc-sky: #0C1330; --sc-bldg: #1C2448; --sc-win: #F7C46C; --sc-board: #20281A;
  --sc-frame: #2B3762; --sc-rug: #3B4472; --sc-rug-in: #6E4A6E; --sc-chair: #15182A; --sc-screen: #1A2238;
  --sc-shelf: #4A3A3A; --sc-shade: #FFE1A8; --sc-bulb: #FFF3D1;
  --sc-glow: 1; --sc-strip: 1;
}

/* ═════════════ Base ═════════════ */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  transition: background-color var(--t-slow) ease, color var(--t-slow) ease;
  padding-bottom: 110px; /* room for the chat bar */
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }

[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 16px; top: -60px; z-index: 100; background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 10px; }
.skip-link:focus { top: 12px; }

.display {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.02;
  letter-spacing: -0.01em;
  margin: 0;
  color: var(--olive);
  text-wrap: balance;
}
:root[data-theme="night"] .display { color: var(--ink); }
.eyebrow {
  margin: 0 0 var(--space-1);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--rust);
}
.muted { color: var(--ink-soft); }
.tiny { font-size: 13px; margin: 0; }

.section { max-width: var(--maxw); margin: 0 auto; padding: var(--space-6) 24px 0; }
.section-head { margin-bottom: var(--space-4); }
.section-head h2 { font-size: clamp(40px, 6vw, 76px); }
.section-head .muted { max-width: 52ch; margin: var(--space-2) 0 0; }

/* ═════════════ Buttons ═════════════ */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 48px; padding: 0 22px;
  border: var(--bw) solid var(--border);
  border-radius: 999px;
  font-weight: 700; font-size: 16px; text-decoration: none;
  box-shadow: 4px 4px 0 var(--shadow-c);
  transition: transform var(--t-fast) var(--ease-out), box-shadow var(--t-fast) var(--ease-out), background-color var(--t-med);
}
.btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.btn:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--shadow-c); }
.btn:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--shadow-c); }
.btn-primary { background: var(--olive); color: var(--on-accent); }
.btn-ghost { background: var(--card); color: var(--ink); }
.btn-sm { min-height: 44px; padding: 0 18px; font-size: 15px; }
.cta-row { display: flex; flex-wrap: wrap; gap: 14px; margin-top: var(--space-3); }
.cta-row.center { justify-content: center; }

/* ═════════════ Top bar ═════════════ */
.topbar {
  position: sticky; top: 0; z-index: var(--z-header);
  display: flex; align-items: center; gap: var(--space-2);
  padding: 14px clamp(16px, 3vw, 32px);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 2px solid color-mix(in srgb, var(--border) 14%, transparent);
  transition: background-color var(--t-slow), transform var(--t-med) var(--ease-out);
}
.topbar.tucked { transform: translateY(-100%); }
@media (min-width: 900px) {
  .topbar.on-hero { background: transparent; border-bottom-color: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; }
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; }
.brand-mark {
  display: grid; place-items: center;
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--rust); color: var(--card);
  border: var(--bw) solid var(--border);
  font-family: var(--font-display); font-size: 16px; letter-spacing: .02em;
}
:root[data-theme="night"] .brand-mark { color: var(--on-accent); }
.brand-mark.sm { width: 36px; height: 36px; font-size: 13px; }
.status-pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 14px; border-radius: 999px;
  border: 2px solid var(--border);
  background: var(--card);
  font-size: 13px; font-weight: 500; letter-spacing: .02em;
  white-space: nowrap;
}
.status-pill strong { font-weight: 700; }
.status-link { text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
.status-link:hover { color: var(--rust); }
.status-sep { color: var(--ink-soft); }
.status-dot { width: 9px; height: 9px; border-radius: 50%; background: #3FA34D; box-shadow: 0 0 0 0 rgba(63,163,77,.6); animation: ping 2.2s infinite; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(63,163,77,.55); } 70%,100% { box-shadow: 0 0 0 9px rgba(63,163,77,0); } }

.nav { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.btn-nav { white-space: nowrap; min-height: 44px; padding: 0 18px; font-size: 15px; box-shadow: 3px 3px 0 var(--shadow-c); }
.btn-nav svg { width: 18px; height: 18px; }
.btn-nav:hover svg { transform: translateX(3px); }
.btn-nav svg { transition: transform var(--t-fast) var(--ease-out); }
.nav-links { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 44px; padding: 0 14px; border-radius: 999px;
  text-decoration: none; font-weight: 700; font-size: 14px; letter-spacing: .06em; text-transform: uppercase;
  transition: background-color var(--t-fast);
}
.nav-links a:hover { background: var(--bg-2); }
.nav-links a.active { background: var(--ink); color: var(--bg); }
.btn-nav svg, .icon-btn svg, .round-btn svg, .send-btn svg {
  width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round;
}
.icon-btn {
  display: grid; place-items: center;
  width: 44px; height: 44px; border-radius: 50%;
  border: 2px solid var(--border); background: var(--card);
  transition: transform var(--t-fast) var(--ease-out);
}

/* ═════════════ Hero ═════════════ */
/* Mobile first: headline above a square crop of the room. */
.hero { padding: var(--space-4) 16px 0; }
.hero-stage { display: flex; flex-direction: column; position: relative; }
.hero-copy { order: -1; margin-bottom: var(--space-4); }
.hero-kicker {
  margin: 0 0 var(--space-1);
  font-size: 13px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--rust);
}
.hero-title {
  margin: 0;
  font-family: var(--font-display); font-weight: 400; line-height: 1.02;
  font-size: clamp(40px, 10vw, 72px); color: var(--olive); text-wrap: balance;
}
:root[data-theme="night"] .hero-title { color: var(--ink); }
.hero-title .hl { color: var(--rust); }
.hero-lede { margin: var(--space-2) 0 0; font-size: 17px; color: var(--ink-soft); max-width: 46ch; }
.hero-notes { display: flex; flex-wrap: wrap; gap: 14px; margin-top: var(--space-3); }
.note {
  display: inline-flex; align-items: center; min-height: 48px; padding: 4px 18px;
  font-family: var(--font-hand); font-size: 24px; font-weight: 600; line-height: 1;
  color: #241B14; text-decoration: none;
  border: 2px solid #241B14; border-radius: 4px;
  box-shadow: 3px 4px 0 rgba(0, 0, 0, .35);
  transform: rotate(-2.5deg);
  transition: transform var(--t-fast) var(--ease-spring), box-shadow var(--t-fast);
}
.note-yellow { background: #F6D365; }
.note-pink { background: #F4A3B5; transform: rotate(2deg); }
.note:hover { transform: rotate(0) translateY(-3px); box-shadow: 4px 7px 0 rgba(0, 0, 0, .35); }
.note:active { transform: rotate(0) translateY(1px); box-shadow: 1px 1px 0 rgba(0, 0, 0, .35); }
.note:focus-visible { outline: 3px solid #F6D365; outline-offset: 4px; }

.scene {
  width: 100%; height: auto; aspect-ratio: 1 / 1;
  border: 3px solid var(--border); border-radius: 18px;
  box-shadow: 6px 6px 0 var(--shadow-c);
  background: var(--sc-wall);
}
.scene-hint {
  position: absolute; left: 12px; bottom: 10px; margin: 0;
  font-family: var(--font-hand); font-size: 17px; color: var(--sc-line);
  background: #F6D365; padding: 2px 12px; border-radius: 8px; border: 2px solid var(--sc-line);
  transform: rotate(-2deg);
}

/* Desktop: the room fills the first screen; the copy sits on the chalkboard.
   Positions are viewBox units ÷ 1200 (x) or ÷ 680 (y), so they track the SVG exactly. */
@media (min-width: 900px) {
  .hero { padding: 0; margin-top: calc(-1 * var(--topbar-h, 74px)); }
  .hero-stage { display: block; container-type: inline-size; border-bottom: 4px solid var(--border); }
  .scene { aspect-ratio: auto; border: 0; border-radius: 0; box-shadow: none; }
  .hero-copy {
    position: absolute; margin: 0;
    left: 32%; top: 17%; width: 35.2%; height: 30.6%;
    display: flex; flex-direction: column; justify-content: center;
  }
  .hero-kicker { font-size: max(10px, .82cqw); color: #F6C453; margin-bottom: .5cqw; }
  .hero-title, :root[data-theme="night"] .hero-title { font-size: 2.3cqw; line-height: 1.06; color: #F3E6D3; }
  .hero-title .hl { color: #F6C453; }
  .hero-lede { font-family: var(--font-hand); font-weight: 600; font-size: 1.5cqw; line-height: 1.2; color: #F3E6D3; opacity: .9; margin-top: .6cqw; }
  .hero-notes { gap: 1.2cqw; margin-top: 1.1cqw; }
  .note { font-size: 1.45cqw; min-height: max(32px, 3cqw); padding: .3cqw 1cqw; }
  .scene-hint { left: 1.6cqw; bottom: 1.4cqw; font-size: max(15px, 1.5cqw); }
}

/* scene paint */
.scene * { transition: fill var(--t-slow) ease, opacity var(--t-slow) ease; }
.scene .ol { stroke: var(--sc-line); stroke-width: 5; stroke-linejoin: round; }
.scene .ol-thin { stroke: var(--sc-line); stroke-width: 3.5; stroke-linejoin: round; }
.scene .ol-line { stroke: var(--sc-line); stroke-width: 4; stroke-linecap: round; fill: none; }
.scene .wall { fill: var(--sc-wall); }
.scene .wall-2 { fill: var(--sc-wall-2); }
.scene .floor { fill: var(--sc-floor); }
.scene .floor-line { stroke: var(--sc-floor-line); stroke-width: 3; fill: none; }
.scene .frame { fill: var(--sc-frame); }
.scene .sky { fill: var(--sc-sky); }
.scene .cloud { fill: #FBF4EA; stroke: var(--sc-line); stroke-width: 3; }
.scene .bldg { fill: var(--sc-bldg); stroke: var(--sc-line); stroke-width: 3; }
.scene .win { fill: var(--sc-win); }
.scene .win.off { fill: var(--sc-bldg); filter: brightness(.8); }
.scene .board { fill: var(--sc-board); }
.scene .chalk text { font-family: var(--font-hand); font-size: 36px; fill: #F3E6D3; }
.scene .chalk path { stroke: #F3E6D3; stroke-width: 3; fill: none; stroke-linecap: round; }
.scene .sticky text { font-family: var(--font-hand); font-size: 18px; fill: var(--sc-line); }
.scene .poster-title { font-family: var(--font-display); font-size: 24px; fill: var(--sc-line); }
.scene .poster-sub { font-family: var(--font-body); font-weight: 700; font-size: 10px; letter-spacing: 2px; fill: var(--sc-line); }
.scene .shelf { fill: var(--sc-shelf); }
.scene .strip { fill: #FFD58F; opacity: var(--sc-strip); filter: drop-shadow(0 6px 10px #FFB45E); }
.scene .leaf { fill: #6B8F3A; stroke: var(--sc-line); stroke-width: 3; }
.scene .screen { fill: var(--sc-screen); }
.scene .desk-top { fill: #A86E48; }
.scene .rug { fill: var(--sc-rug); }
.scene .rug-in { fill: none; stroke: var(--sc-rug-in); stroke-width: 4; stroke-dasharray: 14 10; }
.scene .glow { opacity: var(--sc-glow); mix-blend-mode: screen; pointer-events: none; }
.scene .lamp-shade { fill: var(--sc-shade); }
.scene .bulb { fill: var(--sc-bulb); }
.scene .lamp { cursor: pointer; outline: none; }
.scene .lamp:hover .lamp-shade, .scene .lamp:focus-visible .lamp-shade { fill: #FFE1A8; }
.scene .lamp:focus-visible .lamp-shade { stroke: var(--focus); stroke-width: 7; }
.scene .chair { fill: var(--sc-chair); }
.scene .skin { fill: #F1C29C; }
.scene .hair { fill: #241B14; }
.scene .hoodie { fill: url(#jacketPrint); }
.scene .pants-fill { fill: #2E3440; }
.scene .limb-ol { stroke: var(--sc-line); stroke-width: 32; stroke-linecap: round; fill: none; }
.scene .limb { stroke-width: 22; stroke-linecap: round; fill: none; }
.scene .pants { stroke: #2E3440; }
.scene .hoodie-stroke { stroke: url(#jacketPrint); }
.scene .laptop { fill: #C9CCD3; }
.scene .glass { fill: rgba(255,255,255,.16); stroke-width: 5.5; }
.scene .tail-ol { stroke: var(--sc-line); stroke-width: 22; fill: none; stroke-linecap: round; }
.scene .tail { stroke: #C8432B; stroke-width: 13; fill: none; stroke-linecap: round; }
.scene .zzz text { font-family: var(--font-display); fill: var(--sc-line); font-size: 18px; }
:root[data-theme="night"] .scene .zzz text { fill: #F3E6D3; }
.scene .steam { stroke: #FBF4EA; stroke-width: 3; fill: none; stroke-linecap: round; opacity: .85; }
:root[data-theme="day"] .night-only, :root[data-theme="night"] .day-only { opacity: 0; }


.scene .board-mobile text { font-size: 44px; }
@media (min-width: 900px) { .scene .board-mobile { display: none; } }
.scene .chalk-doodle path { stroke: #F3E6D3; stroke-width: 3; fill: none; stroke-linecap: round; stroke-linejoin: round; opacity: .7; }
.scene .poster-link { cursor: pointer; outline: none; }
.scene .poster { transform-box: fill-box; transform-origin: 50% 0; transition: transform var(--t-med) var(--ease-spring); }
.scene .poster-link:hover .poster, .scene .poster-link:focus-visible .poster { transform: rotate(-4deg) scale(1.04); }
.scene .poster-link:focus-visible rect:first-child { stroke: var(--focus); stroke-width: 7; }
.scene .poster-tip { opacity: 0; transition: opacity var(--t-fast); pointer-events: none; }
.scene .poster-tip text { font-family: var(--font-hand); font-size: 19px; font-weight: 600; fill: var(--sc-line); }
.scene:has(.poster-link:hover) .poster-tip, .scene:has(.poster-link:focus-visible) .poster-tip { opacity: 1; }

/* scene motion */
.scene .eyes { transform-box: fill-box; transform-origin: center; animation: blink 5s infinite; }
@keyframes blink { 0%, 94%, 100% { transform: scaleY(1); } 96% { transform: scaleY(.1); } }
.scene .hands { animation: type 0.5s steps(2) infinite; }
@keyframes type { 50% { transform: translateY(-2px); } }
.scene .cursor { animation: caret 1s steps(1) infinite; }
@keyframes caret { 50% { opacity: 0; } }
.scene .cat-body { transform-box: fill-box; transform-origin: bottom center; animation: breathe 3.6s ease-in-out infinite; }
@keyframes breathe { 50% { transform: scale(1.03, 1.06); } }
.scene .zzz text { animation: zz 3.6s ease-in-out infinite; opacity: 0; }
.scene .zzz text:nth-child(2) { animation-delay: .6s; }
.scene .zzz text:nth-child(3) { animation-delay: 1.2s; }
@keyframes zz { 0% { opacity: 0; transform: translateY(6px); } 30%, 60% { opacity: 1; } 100% { opacity: 0; transform: translateY(-14px); } }
.scene .steam { stroke-dasharray: 6 8; animation: steam 1.6s linear infinite; }
@keyframes steam { to { stroke-dashoffset: -28; } }
.scene .reel { transform-box: fill-box; transform-origin: center; animation: spin 10s linear infinite; }

/* ═════════════ Projects (discs) ═════════════ */
.cinema {
  display: grid;
  grid-template-columns: minmax(280px, 380px) 1fr;
  gap: var(--space-4);
  align-items: center;
}
.credits { transition: opacity var(--t-med) ease, transform var(--t-med) var(--ease-out); }
.credits.swapping { opacity: 0; transform: translateY(8px); }
.credit-count { font-family: var(--font-film); font-size: 20px; margin: 0; color: var(--ink-soft); }
.film-title {
  font-family: var(--font-film); font-weight: 400;
  font-size: clamp(44px, 5.4vw, 72px); line-height: .95; margin: 6px 0 var(--space-3);
  text-transform: uppercase; letter-spacing: -.01em;
}
.credit-table { margin: 0; border-top: 2px solid var(--border); }
.credit-table div {
  display: grid; grid-template-columns: 110px 1fr; gap: 12px;
  padding: 10px 0; border-bottom: 1.5px solid color-mix(in srgb, var(--border) 40%, transparent);
}
.credit-table dt { font-size: 11px; letter-spacing: .2em; text-transform: uppercase; font-weight: 700; color: var(--ink-soft); padding-top: 4px; }
.credit-table dd { margin: 0; text-align: right; font-weight: 500; }
.logline { margin: var(--space-3) 0 0; color: var(--ink-soft); }
.credit-links { display: flex; flex-wrap: wrap; gap: 12px; margin-top: var(--space-3); }

.stage-wrap { min-width: 0; }
.stage {
  position: relative;
  height: clamp(320px, 44vw, 600px);
  perspective: 1400px;
  overflow: hidden;
  border-radius: var(--radius);
  outline-offset: 6px;
}
.disc {
  position: absolute; left: 50%; top: 50%;
  width: min(78%, clamp(250px, 34vw, 470px)); aspect-ratio: 1;
  padding: 0; border: 0; background: none; border-radius: 50%;
  transition: transform var(--t-slow) var(--ease-out), opacity var(--t-slow) ease, filter var(--t-slow) ease;
  will-change: transform;
  filter: drop-shadow(8px 14px 0 color-mix(in srgb, var(--shadow-c) 22%, transparent));
}
.disc.is-active { filter: drop-shadow(12px 20px 0 color-mix(in srgb, var(--shadow-c) 30%, transparent)); }
.disc:not(.is-active) { filter: saturate(.75) drop-shadow(6px 10px 0 color-mix(in srgb, var(--shadow-c) 15%, transparent)); }
.disc svg { width: 100%; height: 100%; }
.disc .hole { fill: var(--bg); transition: fill var(--t-slow); }
.disc.is-active .disc-art { animation: spin 24s linear infinite; transform-origin: 50% 50%; transform-box: view-box; }
.disc.is-active:hover .disc-art { animation-play-state: paused; }
@keyframes spin { to { transform: rotate(360deg); } }
.disc-title { font-family: var(--font-display); paint-order: stroke; stroke-linejoin: round; }
.disc-rim { font-family: var(--font-body); font-weight: 700; letter-spacing: 1px; font-size: 12px; text-transform: uppercase; }
.disc-year { font-family: var(--font-film); font-style: italic; font-size: 30px; }

.stage-controls { display: flex; align-items: center; justify-content: center; gap: var(--space-2); margin-top: var(--space-2); }
.round-btn, .send-btn {
  display: grid; place-items: center;
  width: 52px; height: 52px; border-radius: 50%;
  border: var(--bw) solid var(--border); background: var(--card);
  box-shadow: 3px 3px 0 var(--shadow-c);
  transition: transform var(--t-fast) var(--ease-out), box-shadow var(--t-fast);
}
.round-btn:hover { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--shadow-c); }
.round-btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--shadow-c); }
.round-btn svg { width: 22px; height: 22px; }
.dots { display: flex; gap: 4px; }
.dots button {
  width: 28px; height: 44px; border: 0; background: none; padding: 0; display: grid; place-items: center;
}
.dots button::after {
  content: ""; width: 12px; height: 12px; border-radius: 50%;
  border: 2px solid var(--border); background: transparent;
  transition: background-color var(--t-fast), transform var(--t-fast) var(--ease-spring);
}
.dots button[aria-selected="true"]::after { background: var(--rust); transform: scale(1.25); }

/* ═════════════ Proof ═════════════ */
.stat-grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-2); }
.stat-grid li {
  display: flex; flex-direction: column; gap: 8px; padding: 22px;
  background: var(--card); border: 3px solid var(--border); border-radius: var(--radius);
  box-shadow: 5px 5px 0 var(--shadow-c);
}
.stat-num { font-family: var(--font-display); font-size: clamp(34px, 3.6vw, 46px); line-height: 1; color: var(--rust); font-variant-numeric: tabular-nums; }
.stat-text { color: var(--ink-soft); font-size: 15px; line-height: 1.45; }
.quotes { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: var(--space-2); margin-top: var(--space-3); }
.quote { margin: 0; padding: 24px; border: 3px solid var(--border); border-radius: var(--radius); background: var(--bg-2); }
.quote blockquote { margin: 0 0 14px; font-family: var(--font-film); font-size: 24px; line-height: 1.3; }
.quote figcaption { display: grid; font-size: 14px; color: var(--ink-soft); }
.quote figcaption strong { color: var(--ink); }

/* Disc → case study transition */
.soon-tag {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px;
  border: 2px dashed var(--border); border-radius: 999px;
  font-size: 15px; font-weight: 700; color: var(--ink-soft);
}
.credit-links .btn svg { width: 18px; height: 18px; }
.disc.is-active { cursor: pointer; }
.disc-zoom { position: fixed; inset: 0; z-index: 500; pointer-events: none; }
.disc-zoom-fill { position: absolute; inset: 0; clip-path: circle(0 at 50% 50%); }
.disc-zoom-svg { position: fixed; transform-origin: 50% 50%; }
.disc-zoom-svg .disc-art { animation: none !important; }

/* Arriving on a case study from a disc: the disc colour fades away */
html.entering::after {
  content: ""; position: fixed; inset: 0; z-index: 1000; pointer-events: none;
  background: var(--enter-bg);
  animation: enter-out 600ms var(--ease-out) 60ms forwards;
}
@keyframes enter-out { to { opacity: 0; visibility: hidden; } }
html.entering .case-hero { animation: case-rise 700ms var(--ease-out) 140ms both; }
@keyframes case-rise { from { opacity: 0; transform: translateY(28px); } }

/* ═════════════ About ═════════════ */
.about { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-5); align-items: center; }
.about h2 { font-size: clamp(40px, 5.6vw, 72px); margin-bottom: var(--space-3); }
.about-copy > p { max-width: 54ch; }
.about-meta { display: flex; gap: var(--space-4); margin-bottom: var(--space-4); font-size: 14px; font-weight: 500; }
.about-meta p { margin: 0; line-height: 1.4; }
#clock { font-variant-numeric: tabular-nums; }
.mini-head { font-size: 13px; letter-spacing: .18em; text-transform: uppercase; margin: var(--space-4) 0 var(--space-2); color: var(--ink-soft); }
.capabilities { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 6px 24px; font-weight: 500; }
.capabilities li::before { content: "✦"; color: var(--rust); margin-right: 10px; font-size: 12px; }
.certs { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; font-weight: 500; }
.certs li::before { content: "✦"; color: var(--rust); margin-right: 10px; font-size: 12px; }
.chips { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.chips li {
  padding: 6px 14px; border-radius: 999px; border: 2px solid var(--border);
  background: var(--card); font-weight: 500; font-size: 15px;
}
.chips li:nth-child(3n+1) { background: color-mix(in srgb, var(--rust-soft) 30%, var(--card)); }
.chips li:nth-child(3n+2) { background: color-mix(in srgb, var(--olive-soft) 26%, var(--card)); }
.chips li:nth-child(3n) { background: color-mix(in srgb, var(--mustard) 30%, var(--card)); }

.head-art svg { width: 100%; max-width: 520px; margin: 0 auto; overflow: visible; }
.head-art .ln { stroke: var(--ink); stroke-width: 4.5; stroke-linecap: round; stroke-linejoin: round; fill: var(--card); }
.head-art .ln-only { stroke: var(--ink); stroke-width: 4.5; stroke-linecap: round; stroke-linejoin: round; fill: none; }
.head-art .ink { fill: var(--ink); }
.head-art .ink-text { fill: var(--ink); font-family: var(--font-body); font-weight: 700; font-size: 26px; dominant-baseline: middle; }
.head-art .pat-bg { fill: var(--card); }
.head-art .pat-dot { fill: var(--ink); }
.head-art .pat-line { stroke: var(--ink); stroke-width: 2.4; fill: none; stroke-linecap: round; }
.head-art .cat-fill { fill: var(--rust); }
.head-art .confetti { stroke-width: 4; }

.head-art .pop {
  transform-box: fill-box; transform-origin: center;
  transform: translate(var(--fx), var(--fy)) scale(.2);
  opacity: 0;
  transition: transform 900ms var(--ease-spring) var(--d), opacity 300ms ease var(--d);
}
.head-art.in-view .pop { transform: none; opacity: 1; }
.head-art .float { transform-box: fill-box; transform-origin: center; animation: bob var(--t, 5s) ease-in-out infinite; }
@keyframes bob { 0%, 100% { transform: translateY(-6px) rotate(-3deg); } 50% { transform: translateY(6px) rotate(3deg); } }
.head-art .spin-slow { transform-box: fill-box; transform-origin: center; animation: spin 14s linear infinite; }
.head-art .sparkle { transform-box: fill-box; transform-origin: center; animation: twinkle 2.4s ease-in-out infinite; }
@keyframes twinkle { 50% { transform: scale(.7) rotate(45deg); } }
.head-art .steam-2 { stroke-dasharray: 5 6; animation: steam 1.6s linear infinite; }

/* ═════════════ Experience ═════════════ */
.filmography { list-style: none; margin: 0; padding: 0; border-top: 3px solid var(--border); }
.filmography li {
  display: grid; grid-template-columns: 150px 1fr auto; gap: var(--space-3); align-items: baseline;
  padding: var(--space-3) 0; border-bottom: 1.5px solid color-mix(in srgb, var(--border) 40%, transparent);
  transition: background-color var(--t-fast), padding var(--t-med) var(--ease-out);
}
.filmography li:hover { background: var(--bg-2); padding-left: 12px; padding-right: 12px; }
.film-year { font-family: var(--font-film); font-style: italic; font-size: 24px; color: var(--rust); }
.film-role { font-family: var(--font-film); font-size: clamp(26px, 3vw, 36px); line-height: 1.1; margin: 0; font-weight: 400; }
.film-org { font-size: 13px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-soft); margin: 4px 0 6px; }
.film-desc { margin: 0; color: var(--ink-soft); max-width: 62ch; }
.film-tag {
  font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  padding: 4px 10px; border-radius: 999px; border: 2px solid var(--border); white-space: nowrap;
}

/* ═════════════ Contact ═════════════ */
.contact { text-align: center; padding-bottom: var(--space-4); }
.contact-card {
  border: 4px solid var(--border); border-radius: 32px;
  background: var(--card); box-shadow: 10px 10px 0 var(--shadow-c);
  padding: clamp(40px, 7vw, 88px) clamp(20px, 5vw, 64px);
}
.contact h2 { font-size: clamp(38px, 6vw, 80px); max-width: 14ch; margin: 0 auto var(--space-2); }
.footer { margin-top: var(--space-5); font-size: 14px; color: var(--ink-soft); }

/* ═════════════ Chat ═════════════ */
.chat {
  position: fixed; z-index: var(--z-chat);
  left: 50%; bottom: 18px; transform: translateX(-50%);
  width: min(680px, calc(100% - 32px));
}
.chat-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 6px 6px 22px;
  background: var(--card);
  border: var(--bw) solid var(--border); border-radius: 999px;
  box-shadow: 5px 5px 0 var(--shadow-c);
}
.chat-bar input {
  flex: 1; min-width: 0; min-height: 44px;
  border: 0; background: transparent; color: var(--ink);
  font: inherit; font-size: 16px; outline: none;
}
.chat-bar input::placeholder { color: var(--ink-soft); }
.chat-bar:focus-within { outline: 3px solid var(--focus); outline-offset: 3px; }
.send-btn { width: 46px; height: 46px; background: var(--rust); color: var(--card); box-shadow: none; flex-shrink: 0; }
:root[data-theme="night"] .send-btn { color: var(--on-accent); }
.send-btn:hover { transform: rotate(-12deg) scale(1.05); }

.chat-panel {
  margin-bottom: 12px;
  background: var(--card);
  border: var(--bw) solid var(--border); border-radius: var(--radius);
  box-shadow: 6px 6px 0 var(--shadow-c);
  overflow: hidden;
  animation: panel-in var(--t-med) var(--ease-out);
}
@keyframes panel-in { from { opacity: 0; transform: translateY(12px) scale(.98); } }
.chat-head { display: flex; align-items: center; gap: 12px; padding: 12px 12px 12px 16px; border-bottom: 2px solid color-mix(in srgb, var(--border) 25%, transparent); }
.chat-head strong { display: block; line-height: 1.2; }
.chat-head .icon-btn { margin-left: auto; }
.chat-log { max-height: min(46vh, 380px); overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; overscroll-behavior: contain; }
.msg { max-width: 85%; padding: 10px 14px; border-radius: 18px; font-size: 15px; line-height: 1.5; animation: panel-in var(--t-med) var(--ease-out); }
.msg.bot { background: var(--bg-2); border-bottom-left-radius: 6px; align-self: flex-start; }
.msg.me { background: var(--olive); color: var(--on-accent); border-bottom-right-radius: 6px; align-self: flex-end; }
.msg a { color: inherit; font-weight: 700; }
.msg.typing span { display: inline-block; width: 7px; height: 7px; margin: 0 2px; border-radius: 50%; background: var(--ink-soft); animation: dot 1s infinite; }
.msg.typing span:nth-child(2) { animation-delay: .15s; }
.msg.typing span:nth-child(3) { animation-delay: .3s; }
@keyframes dot { 50% { transform: translateY(-4px); opacity: .4; } }
.chat-chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 16px 16px; }
.chat-chips button {
  min-height: 36px; padding: 0 14px; border-radius: 999px;
  border: 2px solid var(--border); background: var(--card); font-size: 14px; font-weight: 500;
  transition: background-color var(--t-fast);
}
.chat-chips button:hover { background: var(--bg-2); }

/* ═════════════ Reveal ═════════════ */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 700ms ease, transform 700ms var(--ease-out); }
.reveal.in-view { opacity: 1; transform: none; }

/* ═════════════ Case-study pages ═════════════ */
.case-page { padding-bottom: 0; }
.case-footer { text-align: center; margin: 0; padding: 0 24px var(--space-5); }
.read-progress { position: fixed; inset: 0 0 auto 0; height: 4px; z-index: calc(var(--z-header) + 1); pointer-events: none; }
.read-progress span { display: block; height: 100%; background: var(--rust); transform: scaleX(0); transform-origin: 0 50%; }
.back-link { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; font-weight: 700; font-size: 14px; letter-spacing: .06em; text-transform: uppercase; text-decoration: none; color: var(--ink-soft); }
.back-link:hover { color: var(--rust); }
.back-link svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

.case-hero { max-width: var(--maxw); margin: 0 auto; padding: var(--space-4) 24px 0; }
.case-kicker { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; margin: var(--space-2) 0 0; }
.case-kicker .eyebrow { margin: 0; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border: 2px solid var(--border); border-radius: 999px; font-size: 13px; font-weight: 700; background: var(--card); }
.case-title { font-family: var(--font-film); font-weight: 400; text-transform: uppercase; font-size: clamp(52px, 9vw, 120px); line-height: .9; margin: var(--space-2) 0; letter-spacing: -.01em; }
.case-summary { font-size: clamp(19px, 2vw, 24px); line-height: 1.45; max-width: 40ch; margin: 0; color: var(--ink-soft); }
.case-meta { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; margin: var(--space-4) 0 0; border-top: 3px solid var(--border); }
.case-meta div { padding: 14px 16px 14px 0; border-bottom: 1.5px solid color-mix(in srgb, var(--border) 40%, transparent); }
.case-meta dt { font-size: 11px; letter-spacing: .2em; text-transform: uppercase; font-weight: 700; color: var(--ink-soft); margin-bottom: 4px; }
.case-meta dd { margin: 0; font-weight: 500; line-height: 1.45; }
.case-results { list-style: none; padding: 0; margin: var(--space-3) 0 0; display: flex; flex-wrap: wrap; gap: 12px; }
.case-results li { padding: 10px 16px; border: 2px solid var(--border); border-radius: var(--radius-sm); background: color-mix(in srgb, var(--mustard) 24%, var(--card)); font-weight: 500; }
.case-results strong { font-family: var(--font-display); font-weight: 400; color: var(--rust); font-size: 22px; margin-right: 6px; }

.case-cover { max-width: 900px; margin: var(--space-4) auto 0; padding: 0 24px; }
.shot { margin: var(--space-3) 0; }
.shot-frame { border: 3px solid var(--border); border-radius: var(--radius); overflow: hidden; background: #EDEDED; box-shadow: 8px 8px 0 var(--shadow-c); }
.shot-frame img { width: 100%; height: auto; }
.shot figcaption { margin-top: 12px; font-size: 14px; color: var(--ink-soft); }
.shot-row { display: grid; grid-template-columns: 220px 1fr; gap: var(--space-3); align-items: start; }

.case-layout { max-width: var(--maxw); margin: 0 auto; padding: 0 24px var(--space-6); display: grid; grid-template-columns: 200px minmax(0, 720px); gap: var(--space-5); }
.case-toc { position: sticky; top: 96px; align-self: start; padding-top: var(--space-5); }
.case-toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; border-left: 2px solid color-mix(in srgb, var(--border) 25%, transparent); }
.case-toc a { display: block; padding: 8px 14px; margin-left: -2px; border-left: 2px solid transparent; text-decoration: none; font-size: 14px; font-weight: 500; color: var(--ink-soft); transition: color var(--t-fast), border-color var(--t-fast); }
.case-toc a:hover { color: var(--ink); }
.case-toc a.active { color: var(--rust); border-left-color: var(--rust); font-weight: 700; }
.case-toc .meta { font-size: 13px; color: var(--ink-soft); margin: 0 0 12px 14px; }

.case-body { min-width: 0; }
.case-section { padding-top: var(--space-5); }
.case-section h2 { font-family: var(--font-display); font-weight: 400; font-size: clamp(32px, 4vw, 46px); line-height: 1.05; color: var(--olive); margin: 0 0 var(--space-2); }
:root[data-theme="night"] .case-section h2 { color: var(--ink); }
.case-num { display: block; font-family: var(--font-film); font-style: italic; font-size: 20px; color: var(--rust); margin-bottom: 4px; }
.case-section h3 { font-size: 20px; margin: var(--space-4) 0 var(--space-1); }
.case-section p, .case-section li { max-width: 66ch; }
.case-section ul.ticks { padding-left: 0; list-style: none; display: grid; gap: 10px; }
.case-section ul.ticks li { position: relative; padding-left: 28px; }
.case-section ul.ticks li::before { content: ""; position: absolute; left: 4px; top: .55em; width: 10px; height: 10px; border-radius: 50%; background: var(--rust); }

.callout { margin: var(--space-3) 0; padding: 24px 28px; border: 3px solid var(--border); border-radius: var(--radius); background: color-mix(in srgb, var(--mustard) 28%, var(--card)); box-shadow: 6px 6px 0 var(--shadow-c); }
.callout .eyebrow { margin-bottom: 6px; }
.callout p { margin: 0; font-family: var(--font-film); font-size: clamp(24px, 2.6vw, 32px); line-height: 1.2; max-width: none; }

.steps { list-style: none; padding: 0; margin: var(--space-3) 0; display: grid; gap: 14px; counter-reset: step; }
.steps > li { counter-increment: step; position: relative; padding: 18px 20px 18px 72px; border: 2px solid var(--border); border-radius: var(--radius-sm); background: var(--card); max-width: none; }
.steps > li::before { content: counter(step, decimal-leading-zero); position: absolute; left: 20px; top: 16px; font-family: var(--font-film); font-style: italic; font-size: 26px; color: var(--rust); }
.steps strong { display: block; margin-bottom: 2px; }
.steps p { margin: 0; color: var(--ink-soft); }

.findings { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: var(--space-3) 0; }
.finding { padding: 18px; border: 2px solid var(--border); border-radius: var(--radius-sm); background: var(--card); }
.finding h4 { margin: 0 0 6px; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--rust); }
.finding p { margin: 0; font-size: 15px; color: var(--ink-soft); }

.table-wrap { margin: var(--space-3) 0; overflow-x: auto; border: 3px solid var(--border); border-radius: var(--radius-sm); background: var(--card); }
.data-table { width: 100%; border-collapse: collapse; font-size: 15px; min-width: 520px; }
.data-table th, .data-table td { padding: 12px 14px; text-align: left; border-bottom: 1.5px solid color-mix(in srgb, var(--border) 25%, transparent); }
.data-table thead th { background: var(--ink); color: var(--bg); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; }
.data-table tbody tr:last-child td, .data-table tbody tr:last-child th { border-bottom: 0; }
.data-table tbody th { font-weight: 700; }
.yes, .no { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 14px; }
.yes { color: #2F7D3A; } .no { color: var(--rust); }
:root[data-theme="night"] .yes { color: #8FD39A; }
.yes svg, .no svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.data-table .old { color: var(--ink-soft); text-decoration: line-through; text-decoration-thickness: 1.5px; }
.data-table .new { font-weight: 700; }

.proto-embed { margin: var(--space-4) 0; border: 3px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--card); box-shadow: 8px 8px 0 var(--shadow-c); }
.proto-poster { padding: clamp(24px, 4vw, 40px); background: repeating-linear-gradient(-45deg, transparent 0 14px, color-mix(in srgb, var(--border) 5%, transparent) 14px 28px); }
.proto-poster h3 { margin: 0 0 8px; font-size: clamp(22px, 2.6vw, 28px); }
.proto-poster p { margin: 0; color: var(--ink-soft); }
.proto-poster .cta-row { margin-top: var(--space-2); }
.proto-embed.is-loaded { aspect-ratio: 16 / 10; }
.proto-embed iframe { display: block; width: 100%; height: 100%; border: 0; }
@media (max-width: 640px) { .proto-embed.is-loaded { aspect-ratio: 9 / 14; } }
.flow { list-style: none; padding: 0; margin: var(--space-3) 0 var(--space-1); display: flex; flex-wrap: wrap; gap: 10px 8px; align-items: center; }
.flow li { position: relative; padding: 10px 14px; border: 2px solid var(--border); border-radius: var(--radius-sm); background: var(--card); font-size: 15px; font-weight: 500; max-width: none; }
.flow li:not(:last-child)::after { content: "→"; margin-left: 12px; color: var(--ink-soft); font-weight: 700; }
.flow li.device { background: color-mix(in srgb, var(--rust) 16%, var(--card)); border-color: var(--rust); }
 margin: var(--space-3) 0 0; padding: 20px 22px; border: 2px dashed var(--border); border-radius: var(--radius-sm); }
.ai-note h3 { margin: 0 0 6px; font-size: 16px; }
.ai-note p { margin: 0; color: var(--ink-soft); }
.team { list-style: none; padding: 0; margin: var(--space-2) 0 0; display: flex; flex-wrap: wrap; gap: 10px; }
.team li { padding: 6px 14px; border: 2px solid var(--border); border-radius: 999px; background: var(--card); font-weight: 500; font-size: 15px; }
.team li.me { background: var(--rust); color: var(--card); }
:root[data-theme="night"] .team li.me { color: var(--on-accent); }

.next-case { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 16px; margin-top: var(--space-5); padding: 28px; border: 4px solid var(--border); border-radius: 28px; background: var(--card); box-shadow: 8px 8px 0 var(--shadow-c); text-decoration: none; transition: transform var(--t-fast) var(--ease-out), box-shadow var(--t-fast); }
.next-case:hover { transform: translate(-2px, -2px); box-shadow: 10px 10px 0 var(--shadow-c); }
.next-case .film-title { margin: 4px 0 0; font-size: clamp(36px, 5vw, 56px); }
.next-case svg { width: 40px; height: 40px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }

@media (max-width: 1080px) {
  .case-layout { grid-template-columns: 1fr; gap: 0; }
  .case-toc { display: none; }
  .case-meta { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .case-hero, .case-cover, .case-layout { padding-left: 16px; padding-right: 16px; }
  .case-meta { grid-template-columns: 1fr; }
  .findings { grid-template-columns: 1fr; }
  .shot-row { grid-template-columns: 1fr; }
  .shot-row .shot:first-child { max-width: 220px; }
  .steps > li { padding-left: 60px; }
  .steps > li::before { left: 16px; }
}

/* ═════════════ Responsive ═════════════ */
@media (max-width: 860px) {
  .status-pill { display: none; }
}
@media (max-width: 900px) {
  .cinema { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .credits { order: 2; }
  .about { grid-template-columns: 1fr; }
  .head-art { order: -1; max-width: 420px; margin: 0 auto; }
  .filmography li { grid-template-columns: 1fr; gap: 4px; }
  .film-tag { justify-self: start; margin-top: 8px; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .section { padding-top: var(--space-5); padding-left: 16px; padding-right: 16px; }
  .brand-name { display: none; }
  .capabilities { grid-template-columns: 1fr; }
  .credit-table div { grid-template-columns: 90px 1fr; }
  .stage { height: 340px; }
  .disc { width: 74%; }
  .contact-card { box-shadow: 6px 6px 0 var(--shadow-c); }
  .chat { bottom: 12px; }
}

@media (max-width: 480px) {
  .stat-grid { grid-template-columns: 1fr; }
}
@media (max-width: 420px) {
  .nav { gap: 4px; }
  .nav-links a { padding: 0 10px; }
  .btn-nav { padding: 0 14px; }
  .btn-nav svg { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html.entering::after { display: none; }
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-duration: 1ms !important; transition-delay: 0ms !important; }
  .reveal { opacity: 1; transform: none; }
  .head-art .pop { opacity: 1; transform: none; }
}
