/* ── Base ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── Accessibility ────────────────────────────────────────── */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  z-index: 10001;
  background: var(--gold);
  color: var(--bg);
  font-family: var(--cond);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.75rem 1.5rem;
  text-decoration: none;
  transition: top 0.15s ease;
}

.skip-link:focus {
  top: 0.5rem;
}

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

/* Remove the default focus outline for mouse users but keep it for keyboard */
:focus:not(:focus-visible) {
  outline: none;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .reveal {
    opacity: 1 !important;
    transform: none !important;
  }
  #vbg iframe { transition: none !important; }
  #now-playing { transition: none !important; }
  .hero-left,
  .hero-right,
  .hero-scroll {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}

:root {
  /*
   * TOKEN REFERENCE — fashion editorial (see docs/design-fashion-editorial.md)
   * Image owns the viewport. Type is the masthead.
   * --gold = platinum SIGNAL (legacy name). Links/CTAs/labels only.
   */
  --bg: #0a0a0a;
  --bg2: #121212;
  --bg3: #1a1a1a;
  --text: #f2f0eb;
  --text-dim: #9a9893;
  --text-dimmer: #6e6c68;
  --gold: #d4d0c8;
  --gold-dim: #7a7670;
  --gold-bright: #ebe7e0;
  --rule: #2a2a2a;
  --display: 'Syne', system-ui, sans-serif;
  --display-editorial: 'Fraunces', Georgia, serif;
  --serif: var(--display-editorial);
  --cond: 'Barlow Condensed', sans-serif;
  --body: 'Barlow', sans-serif;
  --scrim-bottom: linear-gradient(to top, rgba(0,0,0,0.72) 0%, rgba(0,0,0,0.35) 42%, transparent 72%);
  --scrim-left: linear-gradient(to right, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.28) 45%, transparent 70%);
  --scrim-top: linear-gradient(to bottom, rgba(0,0,0,0.858) 0%, rgba(0,0,0,0.55) 32%, rgba(0,0,0,0.198) 64%, transparent 100%);
  --scrim-right: linear-gradient(to left, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.28) 45%, transparent 70%);
  --type-shadow: 0 2px 24px rgba(0,0,0,0.55), 0 1px 3px rgba(0,0,0,0.4);

  /* Interaction motion — site-wide controls */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-press: cubic-bezier(0.4, 0, 0.2, 1);
  --dur-fast: 0.18s;
  --dur-med: 0.28s;
  --btn-lift: translateY(-2px);
  --btn-press: translateY(0) scale(0.97);
}

html { scroll-behavior: smooth; }

/* ── Video Background (homepage hero only — scrolls with content) ─ */
#vbg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background: var(--bg);
}

#vbg iframe {
  position: absolute;
  top: 50%;
  left: 50%;
  /* Cover the hero stage (16:9) at any aspect ratio */
  width: 177.78%; /* 16:9 of hero height */
  height: 100%;
  min-width: 100%;
  min-height: 56.25vw; /* 16:9 of viewport width */
  transform: translate(-50%, -50%);
  border: 0;
  opacity: 0;
  transition: opacity 1.8s ease;
}

#vbg-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  /* Light global dim only — local hero scrim does the readability work */
  background: rgba(10, 10, 10, 0.38);
  pointer-events: none;
}

/* now-playing credit — bottom-right of hero; scrolls away with the stage */
#now-playing {
  position: absolute;
  top: auto;
  bottom: 2.25rem;
  right: 2.5rem;
  left: auto;
  z-index: 5;
  text-align: right;
  font-family: var(--cond);
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  opacity: 0;
  transition: opacity 0.8s ease;
  max-width: min(22rem, 36vw);
  pointer-events: none;
}

#now-playing.visible { opacity: 1; pointer-events: auto; }

#now-playing .np-label {
  color: var(--text-dimmer);
  display: block;
  margin-bottom: 0.35rem;
  letter-spacing: 0.25em;
}

#now-playing a {
  color: var(--text-dim);
  text-decoration: none;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 2px;
  transition: color 0.2s, border-color 0.2s;
}

#now-playing a:hover { color: var(--gold); border-color: var(--gold-dim); }

@media (max-width: 768px) {
  #now-playing { bottom: 1.25rem; right: 1.25rem; max-width: min(14rem, 52vw); }
}

/* Hero content sits above the video stage */
.hero:has(#vbg) > .hero-left,
.hero:has(#vbg) > .hero-right,
.hero:has(#vbg) > .hero-scroll {
  position: relative;
  z-index: 2;
}

/* Soft support shadow over video — local scrim is primary */
.hero:has(#vbg) .hero-eyebrow,
.hero:has(#vbg) h1,
.hero:has(#vbg) .hero-body,
.hero:has(#vbg) .hero-body strong,
.hero:has(#vbg) .scroll-hint,
.hero:has(#vbg) #now-playing .np-label,
.hero:has(#vbg) #now-playing a {
  text-shadow: var(--type-shadow);
}

.hero:has(#vbg) #now-playing .np-label,
.hero:has(#vbg) .scroll-hint {
  color: var(--text-dim);
}

.hero:has(#vbg) #now-playing a {
  color: #c2cfc5;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  font-weight: 300;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
  opacity: 0.35;
  pointer-events: none;
  z-index: 1000;
}

/* Site header only — do not use bare `nav` (case-study adjacent nav is also <nav>) */
#nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 2.5rem;
  border-bottom: 1px solid transparent;
  background: transparent;
  transition: border-color 0.3s ease;
}

/* Stay optically clear — no solid bar that crops hero/cinema spill.
   Soft top scrim only, so the wordmark and links separate from bright plates. */
#nav::before {
  content: '';
  position: absolute;
  z-index: -1;
  left: 0;
  right: 0;
  top: 0;
  height: 8.5rem;
  pointer-events: none;
  background: var(--scrim-top);
}

#nav.scrolled {
  border-color: transparent;
  background: transparent;
  backdrop-filter: none;
}

/* Clear fixed nav when jumping to homepage anchors (#about, #contact, etc.) */
#about,
#featured,
#contact {
  scroll-margin-top: 5rem;
}

.nav-name {
  display: inline-flex;
  align-items: center;
  color: #fff;
  text-decoration: none;
}

/* ── Solid-gold name mark ───────────────────────────────────
   Black room. Ambient fill keeps the face gold. One tungsten
   spot hangs on the grid behind the mark and aims down, out
   front, at 45° from vertical. The spot does not move. Pointer
   motion only turns the mark a few degrees; shading, the top
   rim, and the floor shadow are recomputed from that fixed lamp.
   The floor is 10px under the letters. */
.nav-logo {
  --flare: 0;
  --lamp-x: 42%;
  --lamp-y: 16%;
  --lamp-a: 0.5;
  --shade-x: 76%;
  --shade-y: 64%;
  position: relative;
  display: block;
  height: 48px;
  aspect-ratio: 262 / 44;
  width: auto;
  overflow: visible;
}

/* Shrink on mobile so it doesn't crowd the toggle button */
@media (max-width: 560px) {
  .nav-logo { height: 32px; }
}

/* Letterform mask for the floor shadow. The mark itself is the SVG. */
.nav-logo-shadow {
  position: absolute;
  inset: 0;
  -webkit-mask: url("/assets/images/smc-logo.svg") center / 100% 100% no-repeat;
  mask: url("/assets/images/smc-logo.svg") center / 100% 100% no-repeat;
  -webkit-mask-mode: alpha;
  mask-mode: alpha;
  pointer-events: none;
}

/* Spotlight pool on the floor. Fixed in the room — the lamp does not track. */
.nav-logo-spill {
  position: absolute;
  z-index: 0;
  left: 8%;
  right: 8%;
  top: calc(100% + 6px);
  height: 28px;
  pointer-events: none;
  background: radial-gradient(ellipse 70% 80% at 50% 35%,
    rgba(255, 186, 96, 0.14) 0%,
    rgba(160, 96, 28, 0.05) 46%,
    transparent 74%);
  filter: blur(2px);
}

/* Soft shadow of the letters on the floor. The box starts 16px down so
   the blurred edge reads about 10px under the mark. JS projects the pose. */
.nav-logo-shadow {
  z-index: 1;
  top: calc(100% + 16px);
  right: 0;
  bottom: auto;
  left: 0;
  height: 32%;
  background: #000;
  filter: blur(7px);
  opacity: 0.5;
  transform-origin: center top;
}

.nav-logo-scene {
  position: absolute;
  inset: 0;
  z-index: 2;
  perspective: 480px;
  perspective-origin: 50% 42%;
}

.nav-logo-tilt {
  position: absolute;
  inset: 0;
  transform-origin: center center;
  transform-style: preserve-3d;
}

/* Bronze body. The bevel follows the fixed lamp. A soft tungsten
   shape and an opposite shade sit on the strokes and slide with tilt. */
.nav-logo-solid {
  position: absolute;
  inset: 0;
  filter: drop-shadow(0 1px 0.4px rgba(20, 10, 2, 0.45));
}

.nav-logo-shade,
.nav-logo-reflect {
  position: absolute;
  inset: 0;
  pointer-events: none;
  -webkit-mask: url("/assets/images/smc-logo.svg") center / 100% 100% no-repeat;
  mask: url("/assets/images/smc-logo.svg") center / 100% 100% no-repeat;
  -webkit-mask-mode: alpha;
  mask-mode: alpha;
}

.nav-logo-shade {
  mix-blend-mode: multiply;
  background: radial-gradient(ellipse 55% 70% at var(--shade-x) var(--shade-y),
    transparent 0%,
    transparent 46%,
    rgba(42, 18, 6, 0.28) 78%,
    rgba(22, 8, 2, 0.55) 100%);
}

.nav-logo-reflect {
  mix-blend-mode: screen;
  opacity: var(--lamp-a);
  filter: blur(0.6px);
  background:
    radial-gradient(ellipse 16% 58% at var(--lamp-x) var(--lamp-y),
      rgba(255, 250, 236, 1) 0%,
      rgba(255, 210, 120, 0.85) 14%,
      rgba(255, 150, 40, 0.28) 36%,
      transparent 62%),
    radial-gradient(ellipse 30% 38% at calc(var(--lamp-x) + 10%) calc(var(--lamp-y) + 28%),
      rgba(255, 170, 60, 0.55) 0%,
      transparent 70%),
    radial-gradient(ellipse 9% 28% at calc(var(--lamp-x) - 3%) calc(var(--lamp-y) - 12%),
      rgba(255, 255, 245, 0.95) 0%,
      transparent 68%);
}

.nav-logo-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  display: block;
}

/* Faded 16mm color. Each ghost is three soft, misregistered dye
   layers. The cluster slides on the locked 45° axis. */
.nav-logo-flare {
  position: absolute;
  z-index: 4;
  left: 62%;
  top: 18%;
  width: 96%;
  height: 220%;
  transform: translate(-50%, -34%) rotate(-45deg);
  transform-origin: 50% 42%;
  pointer-events: none;
  mix-blend-mode: screen;
  opacity: var(--flare);
}

.flare-halation,
.flare-streak,
.flare-ghost {
  position: absolute;
  pointer-events: none;
}

.flare-halation {
  left: 48%;
  top: 42%;
  width: 34%;
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle,
    rgba(255, 214, 168, 0.28) 0%,
    rgba(176, 64, 40, 0.12) 28%,
    rgba(48, 88, 112, 0.08) 52%,
    transparent 74%);
  filter: blur(7px);
}

.flare-streak {
  left: 22%;
  right: 22%;
  top: 42%;
  height: 8px;
  transform: translateY(-50%);
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(168, 56, 36, 0.22) 28%,
    rgba(255, 206, 150, 0.16) 48%,
    rgba(56, 104, 132, 0.2) 70%,
    transparent 100%);
  filter: blur(3.5px);
}

.flare-ghost {
  top: 42%;
  left: var(--gx);
  width: var(--gs);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  filter: blur(2.8px);
}

.flare-ghost .ch {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(circle, var(--ink) 0%, var(--ink) 22%, transparent 70%);
}

.flare-ghost .r { --ink: rgba(168, 58, 36, 0.55); transform: translate(-22%, -10%); }
.flare-ghost .g { --ink: rgba(96, 108, 52, 0.38); transform: translate(2%, 8%); }
.flare-ghost .b { --ink: rgba(42, 86, 124, 0.48); transform: translate(20%, 4%); }

@media (prefers-reduced-motion: reduce) {
  .nav-logo-flare { opacity: 0 !important; }
}


.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  font-family: var(--cond);
  font-weight: 400;
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.78);
  text-decoration: none;
  position: relative;
  mix-blend-mode: difference;
  filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.32));
  transition: color var(--dur-fast) var(--ease-out);
}

.nav-links a::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -0.35rem;
  height: 1px;
  background: #fff;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform var(--dur-med) var(--ease-out);
}

.nav-links a:hover,
.nav-links a.active { color: #fff; }

.nav-links a:hover::after,
.nav-links a.active::after { transform: scaleX(1); }

/* Nav text contrast: mix-blend-mode: difference on .nav-name / links / toggle.
   Never force dark ink from plate sampling — Lab/Work cinema keeps the nav
   over the dark hall, so that path caused black-on-black. */

section {
  padding: 6rem 2.5rem;
  border-top: 1px solid var(--rule);
  position: relative;
}

/* H2 / section kickers — small, quiet, magazine folio */
h2:not(.about-headline):not(.contact-headline) {
  font-family: var(--cond);
  font-weight: 500;
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-dim);
  line-height: 1.3;
}

.section-label {
  font-family: var(--cond);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 3rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.section-label::after {
  content: '';
  display: block;
  height: 1px;
  width: 48px;
  background: var(--rule);
}

/* Shared button chrome — primary + ghost share type, padding, motion */
.btn-primary,
.btn-ghost {
  font-family: var(--cond);
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.75rem 1.75rem;
  min-height: 44px;
  box-sizing: border-box;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 0;
  transform: translateY(0);
  transition:
    background var(--dur-fast) var(--ease-out),
    color var(--dur-fast) var(--ease-out),
    border-color var(--dur-fast) var(--ease-out),
    transform var(--dur-med) var(--ease-out),
    box-shadow var(--dur-med) var(--ease-out);
}

.btn-primary {
  font-weight: 500;
  color: var(--bg);
  background: var(--gold);
  border: 1px solid var(--gold);
  box-shadow: 0 0 0 transparent;
}

.btn-primary:hover {
  background: var(--gold-bright);
  border-color: var(--gold-bright);
  transform: var(--btn-lift);
  box-shadow: 0 8px 24px rgba(212, 208, 200, 0.14);
}

.btn-primary:active {
  transform: var(--btn-press);
  box-shadow: none;
  transition-duration: var(--dur-fast);
  transition-timing-function: var(--ease-press);
}

.btn-ghost {
  font-weight: 400;
  color: var(--text-dim);
  background: transparent;
  border: 1px solid var(--rule);
}

.btn-ghost:hover {
  color: var(--text);
  border-color: var(--gold-dim);
  transform: var(--btn-lift);
}

.btn-ghost:active {
  transform: var(--btn-press);
  transition-duration: var(--dur-fast);
  transition-timing-function: var(--ease-press);
}

.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.in {
  opacity: 1;
  transform: translateY(0);
}

footer {
  padding: 2rem 2.5rem;
  border-top: 1px solid var(--rule);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-name {
  font-family: var(--cond);
  font-size: 12px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-dimmer);
}

.footer-links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
}

.footer-links a {
  font-family: var(--cond);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dimmer);
  text-decoration: none;
  transition: color var(--dur-fast) var(--ease-out);
}

.footer-links a:hover { color: var(--text-dim); }

@keyframes fadeUp {
  to { opacity: 1; transform: translateY(0); }
}

/* ── Hero scrims + text zones (homepage + case study) ─────
   Prefer composition (hero_text) → local scrim → glass → text-shadow.
─────────────────────────────────────────────────────────── */
.hero-scrim--bottom::before,
.hero-scrim--left::before,
.hero-scrim--right::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}
.hero-scrim--bottom::before { background: var(--scrim-bottom); }
.hero-scrim--left::before { background: var(--scrim-left); }
.hero-scrim--right::before { background: var(--scrim-right); }
.hero-scrim--none::before { display: none; }

.hero > .hero-left,
.hero > .hero-right {
  position: relative;
  z-index: 2;
}
.hero > .hero-scroll { z-index: 2; }
.cs-hero > .cs-slides { z-index: 0; }
.cs-hero > .cs-hero-graphic,
.cs-hero > .cs-hero-masthead,
.cs-hero > .cs-arrow,
.cs-hero > .cs-dots,
.cs-hero > .cs-skip {
  z-index: 4;
}
.cs-hero > .cs-arrow { z-index: 5; }
.cs-hero > .cs-dots { z-index: 5; }

/* ── Homepage ─────────────────────────────────────────────── */
.hero {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: end;
  padding: 0 2.5rem 5rem;
  position: relative;
  overflow: hidden;
  border-top: none;
  /* Flush under fixed nav — content sits on the bottom via align-items */
  padding-top: 0;
}

.hero.hero-text--left { align-items: end; }
.hero.hero-text--right .hero-left { order: 2; }
.hero.hero-text--right .hero-right { order: 1; align-items: flex-start; padding-left: 0; padding-right: 4rem; }
.hero.hero-text--bottom {
  grid-template-columns: 1fr;
  align-items: end;
}
.hero.hero-text--bottom .hero-right { display: none; }

.hero-left {
  opacity: 0;
  transform: translateY(24px);
  animation: fadeUp 0.9s ease forwards 0.2s;
}

.hero-eyebrow {
  font-family: var(--cond);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 1.25rem;
}

/* Fashion masthead — bold, minimal, Syne */
h1 {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(3.75rem, 8.5vw, 7.5rem);
  line-height: 0.88;
  letter-spacing: -0.035em;
  color: var(--text);
  margin-bottom: 1.75rem;
  text-wrap: balance;
}

h1 em {
  font-style: normal;
  font-weight: 800;
  color: var(--text);
}

[data-display-voice="editorial"] h1,
.voice-editorial h1 {
  font-family: var(--display-editorial);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 0.95;
}

[data-display-voice="editorial"] h1 em,
.voice-editorial h1 em {
  font-style: italic;
  font-weight: 500;
}

.hero-body {
  font-weight: 300;
  font-size: 1.1rem;
  line-height: 1.75;
  color: var(--text-dim);
  max-width: 460px;
  margin-bottom: 2.5rem;
}

.hero-body strong { color: var(--text); font-weight: 400; }

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.hero-scroll {
  position: absolute;
  bottom: 3rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 1rem;
  opacity: 0;
  animation: fadeUp 0.6s ease forwards 1.2s;
}

.hero-scroll span {
  display: block;
  width: 1px;
  height: 48px;
  background: var(--text-dimmer);
}

.scroll-hint {
  font-family: var(--cond);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-dimmer);
  writing-mode: vertical-rl;
}

.about-essay {
  max-width: 680px;
  margin: 0 auto;
}

.about-essay .section-label { margin-bottom: 1.5rem; }

.about-headline {
  font-family: var(--serif);
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: 0;
  color: var(--text);
  margin-bottom: 2rem;
}

.about-headline em {
  font-style: italic;
  font-weight: 500;
  color: var(--text);
  padding-right: 0.12em;
}

.about-body p {
  font-size: 1.05rem;
  color: var(--text-dim);
  margin-bottom: 1.5rem;
  line-height: 1.85;
}

.about-body p:last-child { margin-bottom: 0; }

.about-body p strong { color: var(--text); font-weight: 400; }
.about-body a { color: var(--gold); text-decoration: none; border-bottom: 1px solid var(--gold-dim); }
.about-body a:hover { border-color: var(--gold); }

.about-body figure {
  margin: 2.5rem 0;
  border: 1px solid var(--rule);
}

.about-body figure img {
  width: 100%;
  height: auto;
  display: block;
}

.about-body figcaption {
  font-family: var(--cond);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-dim);
  padding: 0.65rem 0.85rem;
  border-top: 1px solid var(--rule);
}

.work-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
}

.work-item {
  position: relative;
  background: var(--bg);
  padding: 2rem;
  transition: background 0.2s;
  text-decoration: none;
  display: block;
  color: inherit;
}

.work-item:hover { background: var(--bg2); }

.work-item.has-thumb {
  padding: 0;
  overflow: hidden;
}

.work-item-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.work-item-copy {
  display: block;
  text-decoration: none;
  color: inherit;
}

.work-section-eyebrow {
  display: inline-block;
  font-family: var(--cond);
  font-size: 10px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--gold);
  text-decoration: none;
  margin-bottom: 0.75rem;
  transition: color 0.2s;
}

.work-section-eyebrow:hover,
.work-section-eyebrow:focus-visible {
  color: var(--text);
  outline: none;
}

.work-thumb {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--bg3);
}

.work-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.work-item:hover .work-thumb img { transform: scale(1.03); }

.work-item-body { padding: 2rem; }

.work-medium {
  font-family: var(--cond);
  font-size: 10px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.75rem;
}

.work-title {
  font-family: var(--serif);
  font-size: 1.2rem;
  font-weight: 400;
  color: var(--text);
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

.work-desc {
  font-size: 0.85rem;
  color: var(--text-dimmer);
  line-height: 1.65;
}

.work-meta-line {
  font-family: var(--cond);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dimmer);
  margin-top: 0.75rem;
}

.work-cta-row {
  margin-top: 3rem;
  text-align: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}

.work-empty-note {
  font-family: var(--cond);
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dimmer);
  margin-bottom: 1.25rem;
}

.tools-intro {
  max-width: 580px;
  margin-bottom: 3rem;
}

.tools-intro p {
  font-size: 1rem;
  color: var(--text-dim);
  line-height: 1.8;
}

.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 1.5rem;
}

.tool-card {
  background: var(--bg2);
  border: 1px solid var(--rule);
  padding: 1.75rem;
  transition:
    border-color var(--dur-fast) var(--ease-out),
    transform var(--dur-med) var(--ease-out);
  text-decoration: none;
  display: block;
}

.tool-card:hover {
  border-color: var(--gold-dim);
  transform: var(--btn-lift);
}

.tool-tag {
  font-family: var(--cond);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  /* --text-dimmer on --bg2 (this card's background) falls just under 4.5:1
     at this size — --text-dim is used here instead to keep this pair AA-compliant. */
  color: var(--text-dim);
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.tool-tag .dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--gold);
  display: inline-block;
}

.tool-name {
  font-family: var(--serif);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.tool-desc {
  font-size: 0.875rem;
  color: var(--text-dim);
  line-height: 1.7;
  margin-bottom: 1.25rem;
}

.tool-cta {
  font-family: var(--cond);
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: gap var(--dur-med) var(--ease-out), color var(--dur-fast) var(--ease-out);
}

.tool-cta::after {
  content: '→';
  transition: transform var(--dur-med) var(--ease-out);
}

.tool-card:hover .tool-cta { gap: 0.65rem; }
.tool-card:hover .tool-cta::after { transform: translateX(3px); }

.contact-inner {
  max-width: 36rem;
}

@media (min-width: 960px) {
  .contact-inner {
    max-width: none;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: clamp(3rem, 6vw, 7rem);
    align-items: start;
  }

  .contact-links { margin-bottom: 0; }
  .contact-form { margin-top: 0; }
}

.contact-headline {
  font-family: var(--display);
  font-size: clamp(1.65rem, 2.8vw, 2.35rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.025em;
  color: var(--text);
  margin-bottom: 1.5rem;
}

.contact-headline em {
  font-style: normal;
  font-weight: 700;
  color: var(--text-dim);
}

.contact-body {
  font-size: 1rem;
  color: var(--text-dim);
  line-height: 1.8;
  margin-bottom: 2rem;
}

.contact-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.contact-links a {
  font-family: var(--cond);
  font-size: 14px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  transition: color var(--dur-fast) var(--ease-out);
}

.contact-links a:hover { color: var(--gold); }

.cl-label {
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--text-dimmer);
  min-width: 60px;
}

/* ── Contact form ────────────────────────────────────────── */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-top: 1rem;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.form-field label {
  font-family: var(--cond);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-dimmer);
}

.form-field input,
.form-field textarea {
  font-family: var(--sans);
  font-size: 1rem;
  background: var(--bg2);
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: 0.7rem 0.85rem;
  color: var(--text);
  transition: border-color var(--dur-fast) var(--ease-out);
}

.form-field input:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--gold);
}

.form-field textarea {
  resize: vertical;
  min-height: 6rem;
}

.contact-form .btn-primary {
  align-self: flex-start;
  margin-top: 0.25rem;
}

.form-note {
  font-size: 0.8125rem;
  color: var(--text-dimmer);
  margin: 0;
}

/* ── Lab cinema landing ─────────────────────────────────────
   Comp 2: plate enters from beyond left edge FLAT (rotateY 0),
   eases into rest while skewing INWARD (negative rotateY —
   left edge toward page center), fades in early; exit drifts
   right + fades. Hall spill samples the active plate color.
──────────────────────────────────────────────────────────── */
.cinema {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  gap: clamp(2rem, 4vw, 4rem);
  align-items: center;
  padding: 7.5rem 2.5rem 2.5rem;
  min-height: min(88svh, 900px);
  overflow: visible; /* let screen spill bloom under the transparent nav */
  --cinema-spill-rgb: 212, 208, 200;
}

.cinema-copy {
  max-width: 34rem;
  position: relative;
  z-index: 2;
}

.cinema-copy .archive-headline { margin-bottom: 1rem; }
.cinema-copy .archive-sub { max-width: 36rem; }

.cinema-stage {
  position: relative;
  justify-self: stretch;
  min-width: 0;
  overflow: visible;
}

/* Dynamic projector spill — color set by cinema.js from plate pixels */
.cinema-spill {
  position: absolute;
  z-index: 0;
  pointer-events: none;
  /* Bleed past the hall so glow isn't cropped by the stage */
  inset: -18% -12% -28% -18%;
  background:
    radial-gradient(
      ellipse 55% 48% at 68% 42%,
      rgba(var(--spill-rgb, 212, 208, 200), calc(var(--spill-strength, 0.32) * 0.95)) 0%,
      transparent 68%
    ),
    radial-gradient(
      ellipse 70% 55% at 62% 58%,
      rgba(var(--spill-rgb, 212, 208, 200), calc(var(--spill-strength, 0.32) * 0.45)) 0%,
      transparent 72%
    ),
    radial-gradient(
      ellipse 90% 70% at 70% 38%,
      rgba(var(--spill-rgb, 212, 208, 200), calc(var(--spill-strength, 0.32) * 0.18)) 0%,
      transparent 75%
    );
  opacity: 0.55;
  filter: blur(28px);
  transition:
    opacity 0.7s ease,
    filter 0.7s ease,
    background 0.9s ease;
  will-change: opacity, filter;
}

.cinema-spill.is-lit {
  opacity: 1;
}

.cinema-hall {
  position: relative;
  z-index: 1;
  /* Room for ~35vw plates (16:10) + reflection */
  height: clamp(360px, 52vw, 640px);
  perspective: 1200px;
  perspective-origin: 50% 45%;
  transform-style: preserve-3d;
  overflow: visible; /* plate + local glow can rise under the nav */
  /* soft dissolve at hall sides only — keep top/bottom open for spill */
  mask-image: linear-gradient(90deg, transparent 0%, #000 5%, #000 94%, transparent 100%);
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 5%, #000 94%, transparent 100%);
}

/*
  Rest anchor = right side of hall, angled INWARD (toward copy).
  Enter: translateX far left + rotateY(0)  →  settle + rotateY(-18°)
  Exit:  translateX right + deepen inward skew
*/
.cinema-plate {
  position: absolute;
  top: 6%;
  right: 4%;
  left: auto;
  /* ~35vw (was ~25vw / 560px capped) */
  width: min(98%, 35vw);
  margin: 0;
  opacity: 0;
  transform-origin: center center;
  transform-style: preserve-3d;
  /* Start: beyond left edge, straight-on (flat) */
  transform: translate3d(-145%, 0, 0) rotateY(0deg) rotateX(0deg);
  filter: blur(0);
  transition:
    opacity 0.42s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.88s cubic-bezier(0.16, 1, 0.3, 1),
    filter 0.55s ease;
  pointer-events: none;
  z-index: 0;
  will-change: transform, opacity, filter;
}

.cinema-plate.is-active {
  /* Rest: in place, slight inward oblique — left edge toward center */
  opacity: 1;
  transform: translate3d(0, 0, 0) rotateY(-18deg) rotateX(2deg);
  filter: blur(0);
  z-index: 2;
  pointer-events: auto;
}

.cinema-plate.is-leaving {
  opacity: 0;
  transform: translate3d(62%, 0, 0) rotateY(-26deg) rotateX(2deg);
  filter: blur(10px);
  z-index: 1;
  transition:
    opacity 0.48s cubic-bezier(0.4, 0, 1, 1),
    transform 0.68s cubic-bezier(0.4, 0, 0.2, 1),
    filter 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Park flat + off-left before promoting to is-active */
.cinema-plate.is-entering {
  opacity: 0;
  transform: translate3d(-145%, 0, 0) rotateY(0deg) rotateX(0deg);
  filter: blur(0);
  z-index: 3;
  transition: none;
}

.cinema-plate-face {
  position: relative;
  aspect-ratio: 16 / 10;
  border-radius: 2px;
  overflow: hidden;
  background: #050505;
  backface-visibility: hidden;
  box-shadow:
    0 0 0 1px rgba(242, 240, 235, 0.1),
    0 28px 90px rgba(0, 0, 0, 0.7),
    0 0 60px rgba(var(--cinema-spill-rgb, 212, 208, 200), 0.22),
    0 0 120px rgba(var(--cinema-spill-rgb, 212, 208, 200), 0.1);
  transition: box-shadow 0.9s ease;
}

/* Soft edge kiss only — color spill lives on .cinema-spill */
.cinema-plate-face::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    160deg,
    rgba(255, 255, 255, 0.06) 0%,
    transparent 42%,
    rgba(0, 0, 0, 0.18) 100%
  );
  pointer-events: none;
  mix-blend-mode: soft-light;
  opacity: 0.85;
}

.cinema-plate-face img,
.cinema-plate-reflect img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}

.cinema-plate-face img {
  filter: contrast(1.04) saturate(1.05);
}

.cinema-plate-reflect {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  height: 48%;
  overflow: hidden;
  transform: scaleY(-1);
  transform-origin: top center;
  opacity: 0.36;
  pointer-events: none;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.75), transparent 78%);
  -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.75), transparent 78%);
  filter: blur(1.5px);
}

.cinema-plate-reflect img {
  aspect-ratio: 16 / 10;
  filter: brightness(0.85);
}

.cinema-caption {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.55rem 1rem;
  margin: 0.85rem 0 0;
  justify-content: flex-end;
  padding-right: 6%;
  font-family: var(--cond);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dimmer);
  transition: opacity 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  position: relative;
  z-index: 2;
}

.cinema-caption.is-swapping { opacity: 0.35; }

.cinema-caption-text { color: var(--text-dim); }
.cinema-caption-text [data-cinema-title] { color: var(--text); }

.cinema-caption-link {
  color: var(--gold);
  text-decoration: none;
  transition: color 0.2s ease;
}

.cinema-caption-link:hover { color: var(--gold-bright); }

.cinema-archive-grid { padding-top: 1.5rem; }

@media (max-width: 960px) {
  .cinema {
    grid-template-columns: 1fr;
    min-height: 0;
    padding: 6.5rem 1.5rem 1.5rem;
    gap: 1.75rem;
  }

  .cinema-hall {
    height: clamp(280px, 68vw, 460px);
  }

  .cinema-plate {
    right: 3%;
    /* Full-width hall on mobile — use hall %, not 35vw */
    width: min(92%, 720px);
  }

  .cinema-plate.is-active {
    transform: translate3d(0, 0, 0) rotateY(-14deg) rotateX(2deg);
  }

  .cinema-plate.is-leaving {
    transform: translate3d(62%, 0, 0) rotateY(-22deg) rotateX(2deg);
  }

  .cinema-caption {
    padding-right: 4%;
  }

  .cinema-spill {
    inset: -12% -8% -22% -8%;
    filter: blur(22px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .cinema-plate,
  .cinema-plate.is-leaving,
  .cinema-plate.is-entering,
  .cinema-caption,
  .cinema-spill {
    transition: none !important;
    filter: none !important;
  }

  .cinema-plate.is-active {
    transform: translate3d(0, 0, 0) rotateY(-14deg) rotateX(2deg);
  }
}

/* ── Archive pages ────────────────────────────────────────── */
.archive-hero { padding: 8rem 2.5rem 4rem; }

.archive-headline {
  font-family: var(--serif);
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 700;
  line-height: 1.1;
  color: var(--text);
  margin-bottom: 1rem;
}

.archive-headline em { font-style: italic; color: var(--gold); }

.archive-sub {
  font-size: 1rem;
  color: var(--text-dim);
  max-width: 520px;
  line-height: 1.8;
}

.archive-list {
  list-style: none;
  max-width: 820px;
  padding: 4rem 2.5rem 6rem;
}

.archive-item {
  padding: 2rem 0;
  border-bottom: 1px solid var(--rule);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 3rem;
  align-items: baseline;
}

.archive-item:first-child { border-top: 1px solid var(--rule); }

.archive-title {
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 400;
  color: var(--text);
  margin-bottom: 0.4rem;
  text-decoration: none;
  display: block;
  transition: color 0.2s;
}

.archive-title:hover { color: var(--gold); }

.archive-meta {
  font-family: var(--cond);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dimmer);
}

.archive-year {
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-dimmer);
  white-space: nowrap;
}

.empty-state {
  padding: 4rem 2.5rem 6rem;
  color: var(--text-dimmer);
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.1rem;
}

.tools-full {
  padding: 4rem clamp(1.25rem, 3vw, 2.5rem) 6rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 1.5rem;
  max-width: none;
  width: 100%;
  box-sizing: border-box;
}

.work-archive-grid {
  padding: 4rem clamp(1.25rem, 3vw, 2.5rem) 6rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 1.5rem;
  max-width: none;
  width: 100%;
  box-sizing: border-box;
}

.work-archive-card {
  background: var(--bg2);
  border: 1px solid var(--rule);
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  transition:
    border-color var(--dur-fast) var(--ease-out),
    transform var(--dur-med) var(--ease-out);
  overflow: hidden;
}

.work-archive-card:hover {
  border-color: var(--gold-dim);
  transform: var(--btn-lift);
}

.work-archive-card-link {
  display: block;
  text-decoration: none;
  color: inherit;
  flex: 1;
}

.work-archive-card .work-thumb { aspect-ratio: 16 / 9; }

.work-archive-card .work-item-body { padding: 1.5rem; }

.lab-live-row {
  padding: 0 1.5rem 1.5rem;
  margin-top: -0.35rem;
}

.lab-live-btn {
  width: 100%;
  font-weight: 600;
  letter-spacing: 0.14em;
  box-shadow: 0 0 0 1px rgba(212, 208, 200, 0.25), 0 10px 28px rgba(212, 208, 200, 0.12);
}

.lab-live-btn:hover {
  box-shadow: 0 0 0 1px rgba(235, 231, 224, 0.45), 0 12px 32px rgba(212, 208, 200, 0.2);
}

/* Live CTA — sits in the hero masthead under title/meta */
.cs-hero-masthead .cs-live-btn {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65em;
  margin-top: 1.35rem;
  min-width: min(22rem, 100%);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-shadow: none;
  box-shadow: 0 0 0 1px rgba(212, 208, 200, 0.28), 0 12px 36px rgba(212, 208, 200, 0.16);
}

.cs-hero-masthead .cs-live-btn:hover {
  box-shadow: 0 0 0 1px rgba(235, 231, 224, 0.5), 0 14px 40px rgba(212, 208, 200, 0.24);
}

.cs-live-play {
  font-size: 0.7em;
  line-height: 1;
  transform: translateY(0.02em);
}

.cs-hero-masthead--cta-only {
  /* Logo-only heroes: Launch sits under the wordmark (DoodleBug plate) */
  left: clamp(1.5rem, 5vw, 3.5rem);
  bottom: clamp(3.25rem, 7vh, 4.75rem);
  right: auto;
  top: auto;
  text-align: left;
}

.cs-hero-masthead--cta-only .cs-live-btn {
  margin-top: 0;
}

/* Lift the logo so it clears the Launch CTA underneath */
.cs-hero:has(.cs-hero-masthead--cta-only) .cs-hero-graphic {
  padding-bottom: clamp(7.5rem, 16vh, 10.5rem);
}

/* ── Post layout ──────────────────────────────────────────── */
.post-hero {
  padding: 8rem 2.5rem 4rem;
  max-width: 780px;
  margin: 0 auto;
}

.post-meta {
  font-family: var(--cond);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.5rem;
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.post-meta span { color: var(--text-dimmer); }

.post-title {
  font-family: var(--serif);
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: 700;
  line-height: 1.1;
  color: var(--text);
  margin-bottom: 1.5rem;
}

.post-subtitle {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.25rem;
  color: var(--text-dim);
  margin-bottom: 2rem;
  line-height: 1.5;
}

.post-excerpt {
  font-size: 1.05rem;
  color: var(--text-dim);
  line-height: 1.75;
  margin-bottom: 2rem;
  max-width: 560px;
}

.post-featured-image {
  margin-bottom: 2rem;
}

.post-featured-image img {
  width: 100%;
  height: auto;
  display: block;
}

.post-featured-image figcaption {
  font-family: "Barlow Condensed", sans-serif;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-dim);
  padding: 0.65rem 0.85rem;
  border-top: 1px solid var(--rule);
}

.post-rule {
  height: 1px;
  background: var(--rule);
  margin-bottom: 3rem;
}

.post-body {
  max-width: 680px;
  margin: 0 auto;
  padding: 0 2.5rem 6rem;
}

.post-body p {
  font-size: 1.05rem;
  color: var(--text-dim);
  line-height: 1.85;
  margin-bottom: 1.5rem;
}

.post-body h2 {
  font-family: var(--serif);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text);
  margin: 3rem 0 1rem;
}

.post-body h3 {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.2rem;
  color: var(--text);
  margin: 2rem 0 0.75rem;
}

.post-body a {
  color: var(--gold);
  text-decoration: none;
  border-bottom: 1px solid var(--gold-dim);
}

.post-body a:hover { border-color: var(--gold); }

.post-body em {
  color: var(--text);
  font-style: italic;
  padding-right: 0.18em;
}

.post-body figure {
  margin: 2.5rem 0;
  border: 1px solid var(--rule);
}

.post-body figure img {
  width: 100%;
  height: auto;
  display: block;
  margin: 0;
  border: 0;
}

.post-body figcaption {
  font-family: "Barlow Condensed", sans-serif;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-dim);
  padding: 0.65rem 0.85rem;
  border-top: 1px solid var(--rule);
}

.post-body img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 2rem 0;
  border: 1px solid var(--rule);
}

.post-body blockquote {
  border-left: 2px solid var(--gold);
  padding-left: 1.5rem;
  margin: 2rem 0;
}

.post-body blockquote p {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.15rem;
  color: var(--text);
}

.post-body ul,
.post-body ol {
  padding-left: 1.5rem;
  margin-bottom: 1.5rem;
}

.post-body li {
  color: var(--text-dim);
  font-size: 1.05rem;
  line-height: 1.85;
  margin-bottom: 0.4rem;
}

.post-back {
  padding: 0 2.5rem 3rem;
  max-width: 680px;
  margin: 0 auto;
}

.post-back a {
  font-family: var(--cond);
  font-size: 12px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-dimmer);
  text-decoration: none;
  transition: color 0.2s;
}

.post-back a:hover { color: var(--gold); }

/* ── Tool layout ──────────────────────────────────────────── */
.tool-hero {
  padding: 8rem 2.5rem 4rem;
  max-width: 780px;
  margin: 0 auto;
}

.tool-meta {
  font-family: var(--cond);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.5rem;
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.tool-meta span { color: var(--text-dimmer); }

.tool-title {
  font-family: var(--serif);
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: 700;
  line-height: 1.1;
  color: var(--text);
  margin-bottom: 1rem;
}

.tool-tagline {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.25rem;
  color: var(--text-dim);
  margin-bottom: 2rem;
}

.tool-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.tool-rule {
  height: 1px;
  background: var(--rule);
  margin-bottom: 3rem;
}

.tool-body {
  max-width: 680px;
  margin: 0 auto;
  padding: 0 2.5rem 6rem;
}

.tool-body p {
  font-size: 1.05rem;
  color: var(--text-dim);
  line-height: 1.85;
  margin-bottom: 1.5rem;
}

.tool-body h2 {
  font-family: var(--serif);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text);
  margin: 3rem 0 1rem;
}

.tool-body a { color: var(--gold); }

.tool-body ul {
  padding-left: 1.5rem;
  margin-bottom: 1.5rem;
}

.tool-body li {
  color: var(--text-dim);
  font-size: 1.05rem;
  line-height: 1.85;
  margin-bottom: 0.4rem;
}

.tool-back {
  padding: 0 2.5rem 3rem;
  max-width: 680px;
  margin: 0 auto;
}

.tool-back a {
  font-family: var(--cond);
  font-size: 12px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-dimmer);
  text-decoration: none;
}

.tool-back a:hover { color: var(--gold); }

/* ── Work detail layout ───────────────────────────────────── */
.work-detail-hero {
  padding: 8rem 2.5rem 3rem;
  max-width: 960px;
  margin: 0 auto;
}

.work-detail-meta {
  font-family: var(--cond);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
  align-items: center;
}

.work-detail-meta span { color: var(--text-dimmer); }

.work-detail-title {
  font-family: var(--serif);
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: 700;
  line-height: 1.1;
  color: var(--text);
  margin-bottom: 1rem;
}

.work-detail-summary {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.25rem;
  color: var(--text-dim);
  line-height: 1.55;
  max-width: 640px;
  margin-bottom: 2rem;
}

.work-detail-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.work-detail-media {
  max-width: 960px;
  margin: 0 auto 3rem;
  padding: 0 2.5rem;
}

.work-detail-thumb {
  border: 1px solid var(--rule);
  margin-bottom: 2rem;
}

.work-detail-thumb img {
  width: 100%;
  height: auto;
  display: block;
}

.work-video {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border: 1px solid var(--rule);
  background: var(--bg2);
}

.work-video iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.work-detail-body {
  max-width: 680px;
  margin: 0 auto;
  padding: 0 2.5rem 6rem;
}

.work-detail-body p {
  font-size: 1.05rem;
  color: var(--text-dim);
  line-height: 1.85;
  margin-bottom: 1.5rem;
}

.work-detail-body h2 {
  font-family: var(--serif);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text);
  margin: 3rem 0 1rem;
}

.work-detail-body h3 {
  font-family: var(--cond);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 2.5rem 0 0.5rem;
}

.work-detail-body ul {
  color: var(--text-dim);
  padding-left: 1.25rem;
  margin-bottom: 1.5rem;
  line-height: 1.85;
}

.work-detail-body ul li { margin-bottom: 0.35rem; }

.work-detail-body figure {
  margin: 2rem 0 2.5rem;
}

.work-detail-body figure img {
  width: 100%;
  height: auto;
  display: block;
}

.work-detail-body figcaption {
  font-family: "Barlow Condensed", sans-serif;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-dim);
  padding: 0.65rem 0;
}

.work-detail-body .inline-video {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border: 1px solid var(--rule);
  background: var(--bg2);
  margin: 1.5rem 0 2rem;
}

.work-detail-body .inline-video iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.work-detail-body a { color: var(--gold); }

.work-back {
  padding: 0 2.5rem 3rem;
  max-width: 680px;
  margin: 0 auto;
}

.work-back a {
  font-family: var(--cond);
  font-size: 12px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-dimmer);
  text-decoration: none;
  transition: color 0.2s;
}

.work-back a:hover { color: var(--gold); }

/* ── About Page ───────────────────────────────────────────── */
.about-page-hero {
  padding: 8rem 2.5rem 3rem;
  max-width: 900px;
}

.about-page-headline {
  font-family: var(--serif);
  font-size: clamp(2.8rem, 6vw, 5rem);
  font-weight: 700;
  line-height: 1.1;
  margin-top: 1rem;
  color: var(--text);
}

.about-page-headline em { font-style: italic; color: var(--gold); }

.about-page-body {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 2.5rem 6rem;
}

.about-chapter {
  padding: 3rem 0;
  border-top: 1px solid var(--rule);
}

.about-chapter:first-child { border-top: none; }

.about-chapter-label {
  font-family: var(--cond);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1rem;
}

.about-chapter-headline {
  font-family: var(--serif);
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1.5rem;
  color: var(--text);
}

.about-chapter p {
  font-size: 1.0625rem;
  line-height: 1.75;
  color: var(--text);
  margin-bottom: 1.1rem;
}

.about-chapter p:last-child { margin-bottom: 0; }

.about-chapter p strong { color: var(--text); font-weight: 600; }

.about-chapter a { color: var(--gold); text-decoration: none; }
.about-chapter a:hover { text-decoration: underline; }

.skills-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem 3rem;
  margin-top: 1.5rem;
}

.skill-block h3 {
  font-family: var(--cond);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 0.6rem;
}

.skill-block p {
  font-size: 0.9rem;
  line-height: 1.65;
  color: var(--text-dim);
  margin-bottom: 0 !important;
}

.awards-list {
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.award-item {
  font-family: var(--cond);
  font-size: 1rem;
  font-weight: 400;
  color: var(--text);
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--rule);
}

.award-item:first-child { border-top: 1px solid var(--rule); }

.about-cta {
  padding: 3rem 0 0;
  border-top: 1px solid var(--rule);
}

.about-cta p {
  font-size: 1.125rem;
  line-height: 1.7;
  margin-bottom: 0.75rem;
}

.about-cta p:last-child { margin-bottom: 0; }

.about-cta-sub {
  font-size: 0.9rem !important;
  color: var(--text-dim) !important;
}

.about-cta a { color: var(--gold); text-decoration: none; }
.about-cta a:hover { text-decoration: underline; }

/* ── Mobile Nav ───────────────────────────────────────────── */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0 8px;
  z-index: 200;
}

.nav-toggle span {
  display: block;
  width: 100%;
  height: 1px;
  background: #fff;
  mix-blend-mode: difference;
  filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.32));
  transition: transform 0.25s ease, opacity 0.25s ease;
  transform-origin: center;
}

.nav-toggle.open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 768px) {
  #nav { padding: 1rem 1.25rem; }
  .nav-toggle { display: flex; }

  .nav-links {
    display: flex;
    flex-direction: column;
    gap: 0;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg);
    justify-content: center;
    align-items: center;
    z-index: 10000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
    mix-blend-mode: normal;
  }

  .nav-links a,
  .nav-links.open a {
    mix-blend-mode: normal;
    color: var(--text-dim);
  }

  .nav-links a:hover,
  .nav-links a.active { color: var(--text); }

  .nav-links a::after { background: var(--gold); }

  .nav-links.open {
    opacity: 1;
    pointer-events: all;
  }

  .nav-links li { padding: 1rem 0; }

  .nav-links a {
    font-size: 1.5rem;
    letter-spacing: 0.15em;
  }
  section { padding: 3.25rem 1.25rem; }
  footer { flex-direction: column; align-items: flex-start; }

  /* Homepage hero — room under nav, smaller masthead, no competing chrome */
  .hero {
    grid-template-columns: 1fr;
    align-items: end;
    padding: 5.75rem 1.25rem 3rem;
    min-height: 100svh;
    max-height: none;
  }

  .hero h1 {
    font-size: clamp(2.6rem, 14vw, 3.35rem);
    line-height: 0.92;
    margin-bottom: 1.1rem;
  }

  .hero-eyebrow { margin-bottom: 0.85rem; }

  .hero-body {
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    max-width: none;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 0.65rem;
    width: 100%;
    max-width: 20rem;
  }

  .hero-actions .btn-primary,
  .hero-actions .btn-ghost {
    width: 100%;
  }

  .hero-right,
  .hero-scroll { display: none; }

  #now-playing {
    bottom: 1rem;
    right: 1.25rem;
    left: auto;
    max-width: min(11rem, 42vw);
    font-size: 9px;
    text-align: right;
  }

  .section-label { margin-bottom: 1.75rem; }

  .about-headline {
    font-size: clamp(2rem, 9vw, 2.6rem);
    margin-bottom: 1.35rem;
  }

  .about-body p {
    font-size: 1rem;
    margin-bottom: 1.15rem;
  }

  .about-page-hero { padding: 6rem 1.25rem 2rem; }
  .about-page-body { padding: 0 1.25rem 4rem; }
  .skills-grid { grid-template-columns: 1fr; gap: 1.5rem; }

  .work-grid { grid-template-columns: 1fr; gap: 1px; }
  .work-item-body { padding: 1.15rem 1.15rem 1.35rem; }
  .work-cta-row { margin-top: 1.75rem; }

  .tools-intro { margin-bottom: 1.5rem; }
  .tools-intro p { font-size: 0.95rem; line-height: 1.65; }

  .tools-grid { grid-template-columns: 1fr; }
  .tools-full,
  .work-archive-grid {
    grid-template-columns: 1fr;
    padding: 2.5rem 1.25rem 3.5rem;
    gap: 1rem;
  }

  .work-archive-card .work-item-body { padding: 1.1rem 1.15rem 1rem; }

  .lab-live-row {
    padding: 0 1.15rem 1.15rem;
    margin-top: 0;
  }

  .lab-live-btn {
    min-height: 40px;
    padding: 0.55rem 1rem;
    font-size: 12px;
    letter-spacing: 0.1em;
  }

  .post-hero,
  .post-body,
  .post-back,
  .tool-hero,
  .tool-body,
  .tool-back,
  .work-detail-hero,
  .work-detail-media,
  .work-detail-body,
  .work-back { padding-left: 1.25rem; padding-right: 1.25rem; }
}

@media (max-width: 420px) {
  .hero h1 {
    font-size: clamp(2.35rem, 13vw, 2.85rem);
  }

  .hero-actions { max-width: none; }
}

/* ── Case Study Layout ─────────────────────────────────────────
   layout: case-study  →  src/_includes/layouts/case-study.njk
   Full-height visual hero; containerised, scan-friendly body.
────────────────────────────────────────────────────────────── */

/* ── Hero ──────────────────────────────────────────────────── */
.cs-hero {
  position: relative;
  width: 100%;
  height: 100svh;
  min-height: 520px;
  max-height: 1080px;
  overflow: hidden;
  background: #000;
  /* Edge vignette only — local hero-scrim--* handles type zones */
  --hero-vignette: radial-gradient(ellipse at center,
      transparent 48%, rgba(0,0,0,0.4) 100%);
}

/* Case-study masthead over full-bleed plate */
.cs-hero-masthead {
  position: absolute;
  z-index: 4;
  max-width: min(42rem, 88vw);
  pointer-events: none;
  text-shadow: var(--type-shadow);
  opacity: 1;
  transition: opacity 0.7s ease;
}
.cs-hero-graphic {
  transition: opacity 0.7s ease;
}
.cs-hero.is-watching:not(.chrome-visible) .cs-slides::after {
  opacity: 0;
}
.cs-hero.hero-scrim--bottom::before,
.cs-hero.hero-scrim--left::before,
.cs-hero.hero-scrim--right::before {
  transition: opacity 0.7s ease;
}
/* While video plays, hide title/logo/scrim until mouse or scroll */
.cs-hero.is-watching:not(.chrome-visible) .cs-hero-masthead,
.cs-hero.is-watching:not(.chrome-visible) .cs-hero-graphic {
  opacity: 0;
}
.cs-hero.is-watching:not(.chrome-visible).hero-scrim--bottom::before,
.cs-hero.is-watching:not(.chrome-visible).hero-scrim--left::before,
.cs-hero.is-watching:not(.chrome-visible).hero-scrim--right::before {
  opacity: 0;
}
.cs-hero.is-watching:not(.chrome-visible) .cs-dots {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease;
}
.cs-hero.is-watching:not(.chrome-visible) .cs-skip.visible {
  opacity: 0;
  pointer-events: none;
}
@media (prefers-reduced-motion: reduce) {
  .cs-hero-masthead,
  .cs-hero-graphic,
  .cs-hero.hero-scrim--bottom::before,
  .cs-hero.hero-scrim--left::before,
  .cs-hero.hero-scrim--right::before,
  .cs-dots,
  .cs-slides::after {
    transition: none;
  }
  .cs-hero.is-watching:not(.chrome-visible) .cs-hero-masthead,
  .cs-hero.is-watching:not(.chrome-visible) .cs-hero-graphic,
  .cs-hero.is-watching:not(.chrome-visible).hero-scrim--bottom::before,
  .cs-hero.is-watching:not(.chrome-visible).hero-scrim--left::before,
  .cs-hero.is-watching:not(.chrome-visible).hero-scrim--right::before,
  .cs-hero.is-watching:not(.chrome-visible) .cs-dots,
  .cs-hero.is-watching:not(.chrome-visible) .cs-skip.visible,
  .cs-hero.is-watching:not(.chrome-visible) .cs-slides::after {
    opacity: 1;
    pointer-events: auto;
  }
}
.cs-hero.hero-text--bottom-left .cs-hero-masthead,
.cs-hero.hero-text--left .cs-hero-masthead {
  left: clamp(1.5rem, 5vw, 3.5rem);
  bottom: clamp(5rem, 12vh, 7.5rem);
  right: auto;
  top: auto;
  text-align: left;
}
.cs-hero.hero-text--bottom-left .cs-hero-masthead.has-live,
.cs-hero.hero-text--left .cs-hero-masthead.has-live,
.cs-hero.hero-text--bottom-right .cs-hero-masthead.has-live,
.cs-hero.hero-text--right .cs-hero-masthead.has-live,
.cs-hero.hero-text--bottom .cs-hero-masthead.has-live {
  bottom: clamp(6.5rem, 14vh, 9rem);
}
.cs-hero.hero-text--bottom-right .cs-hero-masthead,
.cs-hero.hero-text--right .cs-hero-masthead {
  right: clamp(1.5rem, 5vw, 3.5rem);
  bottom: clamp(5rem, 12vh, 7.5rem);
  left: auto;
  top: auto;
  text-align: right;
}
.cs-hero.hero-text--bottom .cs-hero-masthead {
  left: 50%;
  bottom: clamp(5rem, 12vh, 7.5rem);
  transform: translateX(-50%);
  text-align: center;
}
.cs-hero-kicker {
  font-family: var(--cond);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 0.85rem;
}
.cs-hero-title {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(2.75rem, 6.5vw, 5.5rem);
  line-height: 0.9;
  letter-spacing: -0.035em;
  color: var(--text);
  margin: 0 0 0.75rem;
  text-wrap: balance;
}
.cs-hero[data-display-voice="editorial"] .cs-hero-title {
  font-family: var(--display-editorial);
  font-weight: 600;
  letter-spacing: -0.02em;
}
.cs-hero-meta {
  font-family: var(--cond);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-dimmer);
}

.cs-slides {
  position: absolute;
  inset: 0;
}

.cs-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  /* scale-in microanimation on slide enter */
  transform: scale(1.025);
  transition: opacity 1s ease, transform 1s ease;
  pointer-events: none;
}

.cs-slide.active {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

.cs-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}

/* vignette overlay */
.cs-slides::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--hero-vignette);
  pointer-events: none;
  z-index: 1;
  transition: opacity 0.7s ease;
}

/* ── Video slides ────────────────────────────────────────── */
.cs-yt-wrap,
.cs-vimeo-wrap {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.cs-yt,
.cs-vimeo-iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

/* ── Campaign logo overlay ───────────────────────────────── */
/* Lower-left third — clears centrifugal photo subjects + bottom-center pie dots */
.cs-hero-graphic {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  padding: 0 0 clamp(5.5rem, 14vh, 8rem) clamp(1.5rem, 5.5vw, 3.75rem);
  pointer-events: none;
  z-index: 4;
  transition: opacity 0.9s ease;
}

.cs-hero-graphic img {
  max-width: min(380px, 42vw);
  width: 100%;
  height: auto;
  filter: drop-shadow(0 6px 40px rgba(0,0,0,0.8));
}

@media (max-width: 768px) {
  .cs-hero-graphic {
    padding: 0 0 clamp(4.5rem, 16vh, 6.5rem) 1.25rem;
  }
  .cs-hero-graphic img {
    max-width: min(260px, 58vw);
  }
}

/* ── Prev / Next arrow buttons ────────────────────────────── */
.cs-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,0.25);
  background: rgba(15,14,12,0.55);
  color: rgba(255,255,255,0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.35s var(--ease-out), background var(--dur-fast) var(--ease-out),
              border-color var(--dur-fast) var(--ease-out), transform var(--dur-med) var(--ease-out);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.cs-prev { left:  1.25rem; }
.cs-next { right: 1.25rem; }

/* appear on mousemove (class toggled by JS) */
.cs-hero.nav-visible .cs-arrow { opacity: 1; }

.cs-arrow:hover {
  background: rgba(212, 208, 200, 0.15);
  border-color: var(--gold);
  color: var(--gold);
  transform: translateY(-50%) scale(1.08);
}

.cs-arrow:active { transform: translateY(-50%) scale(0.96); }

/* ── Dot nav (pie timers) ────────────────────────────────── */
.cs-dots {
  position: absolute;
  bottom: 1.75rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.55rem;
  z-index: 5;
  transition: opacity 0.5s ease;
}

/* --p: 0–1. Inactive = solid dot; active = solid pie wedge (not a ring). */
.cs-dot {
  --p: 0;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  border: none;
  padding: 0;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.4);
  opacity: 0.85;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.cs-dot.active {
  opacity: 1;
  transform: scale(1.12);
  background: conic-gradient(
    from -90deg,
    var(--gold) calc(var(--p) * 1turn),
    rgba(255, 255, 255, 0.4) 0
  );
}

.cs-dot:hover {
  opacity: 1;
  transform: scale(1.2);
}

.cs-dot:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  .cs-dot.active {
    background: var(--gold);
    opacity: 1;
  }
}

/* ── Skip/escape pill (video slides only) ────────────────── */
.cs-skip {
  position: absolute;
  bottom: 2rem;
  right: 1.5rem;
  z-index: 6;
  font-family: var(--cond);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.75);
  background: rgba(0,0,0,0.45);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 2rem;
  padding: 0.45rem 1rem;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(0);
  transition:
    opacity 0.4s var(--ease-out),
    color var(--dur-fast) var(--ease-out),
    border-color var(--dur-fast) var(--ease-out),
    background var(--dur-fast) var(--ease-out),
    transform var(--dur-med) var(--ease-out);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.cs-skip.visible {
  opacity: 1;
  pointer-events: auto;
}

.cs-skip:hover {
  color: var(--gold);
  border-color: var(--gold);
  background: rgba(0,0,0,0.65);
  transform: var(--btn-lift);
}

.cs-skip:active {
  transform: var(--btn-press);
}

/* ── Interactive demo (Lab products) ─────────────────────── */
.cs-demo {
  background: #0a0a0c;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

.cs-demo-inner {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1.75rem 0 1.5rem;
}

.cs-demo-head {
  margin-bottom: 1rem;
}

.cs-demo-title {
  font-family: var(--sans-display, Syne, "Barlow Condensed", sans-serif);
  font-size: clamp(1.15rem, 2vw, 1.45rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  margin: 0 0 0.35rem;
}

.cs-demo-note {
  margin: 0;
  font-size: 0.92rem;
  color: var(--text-dim);
  max-width: 52ch;
}

.cs-demo-frame-wrap {
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  overflow: hidden;
  background: #0e0e10;
  box-shadow: 0 24px 60px rgba(0,0,0,0.45);
}

.cs-demo-frame {
  display: block;
  width: 100%;
  height: min(78vh, 820px);
  min-height: 560px;
  border: 0;
  background: #0e0e10;
}

.cs-demo-open {
  margin: 0.85rem 0 0;
  font-size: 0.85rem;
}

.cs-demo-open a {
  color: var(--gold);
  text-decoration: none;
  border-bottom: 1px solid var(--gold-dim);
}

.cs-demo-open a:hover {
  border-color: var(--gold);
}

@media (max-width: 720px) {
  .cs-demo-frame {
    min-height: 480px;
    height: 70vh;
  }
}

/* ── Body band (full-width dark bg) ──────────────────────── */
.cs-body-band {
  background: var(--bg);
  border-top: 1px solid var(--rule);
}

/* ── Body container — fluid; columns grow with viewport ─── */
.cs-body {
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 360px);
  gap: 0;
  padding-inline: clamp(0px, 2vw, 2rem);
  box-sizing: border-box;
}

.cs-body--solo {
  grid-template-columns: 1fr;
  justify-items: center;
  padding-inline: clamp(1.25rem, 4vw, 3rem);
}

.cs-body--solo .cs-narrative {
  width: 100%;
  max-width: 42rem;
  border-right: none;
  margin-inline: auto;
  text-align: left;
}

/* ── Narrative column ────────────────────────────────────── */
.cs-narrative {
  padding: 2.75rem clamp(1.5rem, 3vw, 3rem) 3rem;
  border-right: 1px solid var(--rule);
  min-width: 0;
}

.cs-lede {
  font-family: var(--serif);
  font-size: clamp(1.4rem, 2.4vw, 2rem);
  font-weight: 700;
  line-height: 1.3;
  color: var(--text);
  margin-bottom: 1.75rem;
  quotes: '\201C' '\201D';
}

.cs-lede::before { content: open-quote; }
.cs-lede::after  { content: close-quote; }

.cs-prose {
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.72;
  color: var(--text);
  max-width: 62ch;
}

.cs-prose p { margin-bottom: 1.1rem; }
.cs-prose p:last-child { margin-bottom: 0; }
.cs-prose strong { color: var(--text); font-weight: 600; }
.cs-prose em {
  color: var(--text);
  font-style: italic;
  /* Extra gap so the last italic glyph doesn’t collide with the next roman letter */
  padding-right: 0.18em;
}
.cs-prose a { color: var(--gold); text-decoration: none; border-bottom: 1px solid var(--gold-dim); transition: border-color 0.15s; }
.cs-prose a:hover { border-color: var(--gold); }

/* Pull-quote inside case-study prose */
.cs-prose blockquote {
  margin: 2.25rem 0;
  padding-left: 1.5rem;
  border-left: 2px solid var(--gold);
}
.cs-prose blockquote p {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.35rem;
  line-height: 1.5;
  color: var(--text);
  margin-bottom: 0;
}
.cs-prose blockquote p:last-child {
  font-family: var(--cond);
  font-style: normal;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-top: 0.7rem;
}

/* ── Case-study stills lightbox ──────────────────────────── */
.cs-gallery-cta {
  margin: 2rem 0 0;
}

.cs-gallery-open {
  gap: 0.45rem;
}

.cs-gallery-open span {
  font-size: 1.1em;
  line-height: 1;
  transform: translateY(-1px);
}

.cs-lightbox {
  border: none;
  padding: 0;
  max-width: none;
  max-height: none;
  width: 100vw;
  height: 100vh;
  background: rgba(6, 6, 6, 0.94);
  color: var(--text);
}

.cs-lightbox::backdrop {
  background: rgba(0, 0, 0, 0.88);
}

.cs-lightbox-inner {
  position: relative;
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  padding: 4.5rem 4rem 3.5rem;
  box-sizing: border-box;
}

.cs-lightbox-figure {
  margin: 0;
  max-width: min(92vw, 1200px);
  max-height: calc(100vh - 7rem);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
}

.cs-lightbox-img {
  display: block;
  max-width: 100%;
  max-height: calc(100vh - 9rem);
  width: auto;
  height: auto;
  object-fit: contain;
  border: 1px solid var(--rule);
}

.cs-lightbox-cap {
  font-family: var(--cond);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  text-align: center;
  max-width: 62ch;
}

.cs-lightbox-count {
  position: absolute;
  bottom: 1.25rem;
  left: 50%;
  transform: translateX(-50%);
  margin: 0;
  font-family: var(--cond);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-dimmer);
}

.cs-lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1.1rem;
  width: 44px;
  height: 44px;
  border: 1px solid var(--rule);
  background: transparent;
  color: var(--text);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  transition:
    color var(--dur-fast) var(--ease-out),
    border-color var(--dur-fast) var(--ease-out),
    transform var(--dur-med) var(--ease-out);
}

.cs-lightbox-close:hover {
  color: var(--gold);
  border-color: var(--gold-dim);
  transform: var(--btn-lift);
}

.cs-lightbox-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid var(--rule);
  background: transparent;
  color: var(--text-dim);
  cursor: pointer;
  transition:
    color var(--dur-fast) var(--ease-out),
    border-color var(--dur-fast) var(--ease-out),
    transform var(--dur-med) var(--ease-out);
}

.cs-lightbox-arrow:hover {
  color: var(--gold);
  border-color: var(--gold-dim);
}

.cs-lightbox-prev { left: 1rem; }
.cs-lightbox-next { right: 1rem; }

@media (max-width: 720px) {
  .cs-lightbox-inner {
    padding: 4rem 0.75rem 3rem;
  }
  .cs-lightbox-arrow {
    top: auto;
    bottom: 1rem;
    transform: none;
  }
  .cs-lightbox-prev { left: 1rem; }
  .cs-lightbox-next { right: 1rem; }
  .cs-lightbox-count { bottom: 3.6rem; }
}

/* ── Adjacent case studies (prev / next) ─────────────────── */
.cs-adjacent { border-top: 1px solid var(--rule); background: var(--bg); }
.cs-adjacent-inner {
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding-inline: clamp(0px, 2vw, 2rem);
  box-sizing: border-box;
}
.cs-adj {
  display: block;
  padding: 2.75rem clamp(1.5rem, 3vw, 3rem);
  text-decoration: none;
  color: var(--text);
  opacity: 0.8;
  transform: scale(1);
  transform-origin: center;
  transition: opacity 0.35s ease, transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
.cs-adj:hover,
.cs-adj:focus-visible { opacity: 1; transform: scale(1.02); outline: none; }
.cs-adj-next { text-align: right; border-left: 1px solid var(--rule); }
.cs-adj-label {
  display: block;
  font-family: var(--cond);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.1rem;
}
.cs-adj-thumb {
  display: block;
  overflow: hidden;
  border: 1px solid var(--rule);
  aspect-ratio: 16 / 9;
  margin-bottom: 1.1rem;
}
.cs-adj-thumb img {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
.cs-adj:hover .cs-adj-thumb img { transform: scale(1.04); }
.cs-adj-title {
  display: block;
  font-family: var(--serif);
  font-size: 1.4rem;
  line-height: 1.2;
  color: var(--text);
  margin-bottom: 0.4rem;
}
.cs-adj-sum {
  display: block;
  font-family: var(--body);
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--text-dim);
}
@media (max-width: 768px) {
  .cs-adjacent-inner { grid-template-columns: 1fr; padding-inline: 0; }
  .cs-adj { padding: 2rem 1.5rem; }
  .cs-adj-next { text-align: left; border-left: none; border-top: 1px solid var(--rule); }
}
@media (prefers-reduced-motion: reduce) {
  .cs-adj { transition: opacity 0.2s ease; opacity: 1; }
  .cs-adj:hover { transform: none; }
  .cs-adj:hover .cs-adj-thumb img { transform: none; }
}

/* ── Stats panel column ──────────────────────────────────── */
.cs-panel {
  padding: 2.75rem clamp(1.25rem, 2vw, 2rem) 3rem;
  display: flex;
  flex-direction: column;
  background: rgba(255,255,255,0.02);
  min-width: 0;
}

/* Tab bar */
.cs-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 2rem;
}

.cs-tab {
  font-family: var(--cond);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--text-dim);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 0.65rem 1.25rem 0.65rem 0;
  margin-bottom: -1px;
  cursor: pointer;
  transform: translateY(0);
  transition:
    color var(--dur-fast) var(--ease-out),
    border-color var(--dur-fast) var(--ease-out),
    transform var(--dur-fast) var(--ease-out);
}

.cs-tab:hover  {
  color: var(--text);
  transform: translateY(-1px);
}

.cs-tab:active { transform: translateY(0) scale(0.98); }

.cs-tab.active {
  color: var(--gold);
  border-bottom-color: var(--gold);
  transform: none;
}

/* Column titles — shown when tabs collapse into multi-col layout */
.cs-col-title {
  display: none;
  font-family: var(--cond);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 1.25rem;
}

/* Tab panels — fade in */
.cs-tab-panel {
  display: none;
  flex-direction: column;
  gap: 1.5rem;
  animation: cs-fade-in 0.25s ease;
}

.cs-tab-panel.active { display: flex; }

@keyframes cs-fade-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Numbers */
.cs-stat {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.cs-stat-value {
  font-family: var(--cond);
  font-size: clamp(2.75rem, 5.5vw, 4rem);
  font-weight: 700;
  line-height: 1;
  color: var(--gold);
  letter-spacing: -0.015em;
}

.cs-stat-label {
  font-family: var(--cond);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--text-dim);
}

/* Names */
.cs-name-group { margin-bottom: 1.5rem; }
.cs-name-group:last-child { margin-bottom: 0; }

.cs-name-head {
  font-family: var(--cond);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.6rem;
}

.cs-name-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.cs-name-list li {
  font-family: var(--body);
  font-size: 0.9375rem;
  color: var(--text);
  line-height: 1.5;
  padding: 0.3rem 0;
  border-bottom: 1px solid var(--rule);
}

.cs-name-list li:last-child { border-bottom: none; }

.cs-name-list a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid var(--gold-dim);
  transition: color 0.15s, border-color 0.15s;
}

.cs-name-list a:hover {
  color: var(--gold);
  border-color: var(--gold);
}

/* Fun Facts */
.cs-facts-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.cs-facts-list li {
  font-family: var(--body);
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--text);
  padding-left: 1rem;
  border-left: 2px solid var(--gold);
}

/* ── Back nav ─────────────────────────────────────────────── */
.cs-back {
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  padding: 1.5rem clamp(1.25rem, 3vw, 3rem) 2.5rem;
  border-top: 1px solid var(--rule);
  box-sizing: border-box;
}

/* ── Case Study — Tablet / narrow laptop ─────────────────── */
@media (max-width: 1023px) {
  .cs-body {
    grid-template-columns: 1fr;
    padding-inline: 0;
  }

  .cs-narrative {
    border-right: none;
    border-bottom: 1px solid var(--rule);
  }
}

/* ── Case Study — Wide: promote stats tabs into columns ──── */
@media (min-width: 1280px) {
  .cs-body:not(.cs-body--solo) {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    padding-inline: clamp(1.5rem, 4vw, 5rem);
  }

  .cs-body:not(.cs-body--solo) .cs-narrative {
    flex: 1.4 1 26rem;
    min-width: min(100%, 22rem);
    padding-right: clamp(1.75rem, 3vw, 3.25rem);
  }

  .cs-body:not(.cs-body--solo) .cs-panel {
    display: contents; /* lift Numbers / Names / Facts into the body row */
  }

  .cs-body:not(.cs-body--solo) .cs-tabs {
    display: none; /* all panels visible as columns */
  }

  .cs-col-title {
    display: block;
  }

  .cs-body:not(.cs-body--solo) .cs-tab-panel,
  .cs-body:not(.cs-body--solo) .cs-tab-panel.active,
  .cs-body:not(.cs-body--solo) .cs-tab-panel[hidden] {
    display: flex !important;
    flex: 1 1 200px;
    flex-direction: column;
    gap: 1.5rem;
    min-width: min(100%, 200px);
    max-width: 100%;
    padding: 2.75rem clamp(1rem, 1.5vw, 1.75rem) 3rem;
    border-left: 1px solid var(--rule);
    background: rgba(255, 255, 255, 0.02);
    animation: none;
  }

  .cs-body:not(.cs-body--solo) .cs-prose {
    max-width: none;
  }
}

/* ── Case Study — Mobile ──────────────────────────────────── */
@media (max-width: 767px) {
  .cs-hero {
    height: 58svh;
    min-height: 320px;
    max-height: 560px;
  }

  .cs-body {
    grid-template-columns: 1fr;
    padding-inline: 0;
  }

  .cs-narrative {
    padding: 2rem 1.25rem 1.75rem;
    border-right: none;
    border-bottom: 1px solid var(--rule);
  }

  .cs-body--solo .cs-narrative {
    border-bottom: none;
  }

  .cs-panel {
    display: flex;
    padding: 2rem 1.25rem 2.5rem;
  }

  .cs-tabs { display: flex; }

  .cs-tab-panel {
    display: none;
  }
  .cs-tab-panel.active {
    display: flex;
  }
  .cs-tab-panel[hidden] {
    display: none !important;
  }

  .cs-lede { font-size: 1.25rem; }

  .cs-hero-masthead .cs-live-btn {
    min-width: 0;
    width: auto;
    max-width: calc(100vw - 2.5rem);
    margin-top: 1rem;
    padding: 0.65rem 1.15rem;
    font-size: 12px;
  }

  .cs-hero-masthead--cta-only {
    bottom: clamp(2.5rem, 6vh, 3.5rem);
  }

  .cs-hero:has(.cs-hero-masthead--cta-only) .cs-hero-graphic {
    padding-bottom: clamp(6rem, 14vh, 8rem);
  }
}


/* ── Thank You — dark studio / gold write-on / tumbling foil ────
   Black room. One fixed tungsten spot from the ceiling rig.
   The script mark writes on under the beam, then foil flakes
   tumble down through the light — twisting and flipping so each
   catches the lamp at a different moment. Auto-returns home.
──────────────────────────────────────────────────────────────── */
.ty-scene {
  --redirect: 5s;
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(2rem, 5vh, 3.5rem);
  overflow: hidden;
  padding: clamp(4.5rem, 11vh, 7.5rem) 1.5rem clamp(3rem, 8vh, 5rem);
  background:
    radial-gradient(ellipse 62% 42% at 50% 14%, rgba(94, 66, 32, 0.16) 0%, transparent 72%),
    #070707;
}

/* The scene is the whole page; the footer is unreachable and unnecessary
   because this view hands back to the homepage on its own. */
html:has(.ty-scene),
body:has(.ty-scene) { overflow: hidden; }

/* ── Ceiling rig: hood + lamp spill ───────────────────────── */
.ty-lamp {
  position: absolute;
  top: 0;
  left: 50%;
  z-index: 1;
  width: clamp(150px, 24vw, 280px);
  height: 22vh;
  transform: translateX(-50%);
  pointer-events: none;
  background: radial-gradient(ellipse 44% 100% at 50% 0%,
    rgba(255, 216, 164, 0.26) 0%,
    rgba(255, 190, 122, 0.09) 38%,
    transparent 72%);
  filter: blur(2px);
  animation: ty-fade-in 1.5s ease-out 0.1s both;
}

.ty-rig {
  position: absolute;
  top: 0;
  left: 50%;
  z-index: 2;
  width: 30px;
  height: 22px;
  transform: translateX(-50%);
  pointer-events: none;
  background: linear-gradient(180deg, #262626 0%, #151515 62%, #0e0e0e 100%);
  border: 1px solid #2e2e2e;
  border-top: none;
  border-radius: 0 0 4px 4px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.7);
  animation: ty-fade-in 1.2s ease-out both;
}

/* ── Spotlight cone — widens downward from the rig ────────── */
.ty-cone {
  position: absolute;
  top: 0;
  left: 50%;
  z-index: 1;
  width: min(170vw, 1400px);
  height: 100%;
  transform: translateX(-50%);
  pointer-events: none;
  background: conic-gradient(from 180deg at 50% 0%,
    transparent 42%,
    rgba(255, 208, 152, 0.05) 46%,
    rgba(255, 226, 186, 0.115) 50%,
    rgba(255, 208, 152, 0.05) 54%,
    transparent 58%);
  animation: ty-fade-in 1.8s ease-out 0.2s both;
}

/* ── Stage + gold mark ────────────────────────────────────── */
.ty-stage {
  position: relative;
  z-index: 3;
  width: 100%;
  display: flex;
  justify-content: center;
}

.ty-mark {
  position: relative;
  width: min(72vw, 400px);
  perspective: 1000px;
  perspective-origin: 50% 45%;
  /* drop-shadow lives here so the clip-path on the SVG cannot eat it */
  filter: drop-shadow(0 14px 22px rgba(0, 0, 0, 0.72));
}

.ty-mark-svg {
  display: block;
  width: 100%;
  height: auto;
  transform-origin: 50% 55%;
  transform: rotateX(13deg) rotateY(-16deg);
  clip-path: inset(0 100% 0 0);
  animation: ty-write 2.1s cubic-bezier(0.36, 0.08, 0.35, 1) 0.35s forwards;
  will-change: clip-path;
}

@keyframes ty-write {
  from { clip-path: inset(0 100% 0 0); }
  to   { clip-path: inset(0 0 0 0); }
}

/* Metallic sheen sweeping the letterforms once the pen passes */
.ty-sheen {
  position: absolute;
  inset: 0;
  pointer-events: none;
  mix-blend-mode: screen;
  -webkit-mask: url("/assets/images/thanks.svg") center / 100% 100% no-repeat;
  mask: url("/assets/images/thanks.svg") center / 100% 100% no-repeat;
  -webkit-mask-mode: alpha;
  mask-mode: alpha;
  background: linear-gradient(100deg,
    transparent 34%,
    rgba(255, 255, 255, 0.55) 47%,
    rgba(255, 244, 220, 0.75) 50%,
    rgba(255, 255, 255, 0.55) 53%,
    transparent 66%);
  transform-origin: 50% 55%;
  transform: rotateX(13deg) rotateY(-16deg);
  opacity: 0;
  animation: ty-sheen 2.4s ease-in-out 1.5s forwards;
}

@keyframes ty-sheen {
  0%   { opacity: 0; background-position: -120% 0; }
  22%  { opacity: 0.9; }
  100% { opacity: 0; background-position: 220% 0; }
}

/* Pen point that rides the reveal edge, then lifts off */
.ty-pen {
  position: absolute;
  top: -12%;
  bottom: -12%;
  left: 0;
  width: 26px;
  margin-left: -13px;
  pointer-events: none;
  mix-blend-mode: screen;
  background: radial-gradient(ellipse 46% 52% at 50% 50%,
    rgba(255, 244, 214, 0.92) 0%,
    rgba(255, 200, 118, 0.55) 34%,
    rgba(255, 172, 72, 0.2) 58%,
    transparent 76%);
  filter: blur(3px) saturate(1.15);
  opacity: 0;
  animation: ty-pen 2.1s cubic-bezier(0.36, 0.08, 0.35, 1) 0.35s forwards;
}

@keyframes ty-pen {
  0%   { left: 0;    opacity: 0; }
  7%   { opacity: 1; }
  86%  { opacity: 0.85; }
  100% { left: 100%; opacity: 0; }
}

/* Floor: cast shadow + warm pool, both tight under the mark */
.ty-shadow {
  position: absolute;
  left: 5%;
  right: 5%;
  top: calc(100% + 3px);
  height: 24px;
  pointer-events: none;
  background: #000;
  -webkit-mask: url("/assets/images/thanks.svg") center / 100% 100% no-repeat;
  mask: url("/assets/images/thanks.svg") center / 100% 100% no-repeat;
  -webkit-mask-mode: alpha;
  mask-mode: alpha;
  filter: blur(9px);
  opacity: 0;
  animation: ty-shadow-in 1.6s ease-out 1s both;
}

@keyframes ty-shadow-in {
  from { opacity: 0; }
  to   { opacity: 0.62; }
}

.ty-pool {
  position: absolute;
  left: 8%;
  right: 8%;
  top: calc(100% + 2px);
  height: 42px;
  pointer-events: none;
  background: radial-gradient(ellipse 58% 74% at 50% 0%,
    rgba(255, 208, 142, 0.22) 0%,
    rgba(200, 140, 62, 0.08) 45%,
    transparent 74%);
  filter: blur(4px);
  opacity: 0;
  animation: ty-fade-in 1.8s ease-out 1.1s both;
}

/* ── Tumbling foil confetti ───────────────────────────────────
   Drawn by the Matter.js simulation in thank-you-confetti.js:
   real gravity, drag, flutter and a floor that actually stops
   them. This element is only the canvas they are painted onto. */
.ty-confetti {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
}


/* ── Outro: message, timer hairline, back home ────────────── */
.ty-outro {
  position: relative;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  opacity: 0;
  animation: ty-fade-in 0.9s ease-out 3.1s both;
}

.ty-message {
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.75;
  color: var(--text-dim);
  margin: 0;
}

.ty-message em {
  font-style: normal;
  color: var(--text);
}

.ty-back {
  margin-top: 1.5rem;
}

/* Hairline that fills over the redirect window */
.ty-timer {
  display: block;
  width: min(62vw, 240px);
  height: 1px;
  margin-top: 1.9rem;
  background: var(--rule);
  overflow: hidden;
}

.ty-timer i {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left center;
  animation: ty-timer-fill var(--redirect, 5s) linear forwards;
}

@keyframes ty-timer-fill {
  from { transform: scaleX(0); }
  to   { transform: scaleX(1); }
}

@keyframes ty-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ── Reduced motion — static, no tumble ───────────────────── */
@media (prefers-reduced-motion: reduce) {
  .ty-mark-svg { animation: none; clip-path: none; }
  .ty-sheen { display: none; }
  .ty-pen { display: none; }
  .ty-confetti { display: none; }
  .ty-lamp,
  .ty-rig,
  .ty-cone,
  .ty-pool,
  .ty-outro { animation: none; opacity: 1; }
  .ty-shadow { animation: none; opacity: 0.62; }
  .ty-timer { display: none; }
}

/* ── Narrow screens ───────────────────────────────────────── */
@media (max-width: 640px) {
  .ty-mark { width: min(84vw, 400px); }
  .ty-message { font-size: 1rem; }
  .ty-pen { width: 18px; margin-left: -9px; }
}
