/* ==========================================================================
   PROJECTS Studio
   Brand source of truth: PROJECTS one-sheet (Figma "Visual Identity").
   Type: General Sans (headlines + body), OCR-B (labels). Palette: Void, Beam,
   Lava, Star, Corp.

   1. Fonts
   2. Tokens + theme
   3. Base
   4. Utilities
   5. Components (buttons, nav, menu, markwin, cursor, grain, player)
   6. Sections
   7. Motion + static fallbacks
   ========================================================================== */

/* 1. Fonts ---------------------------------------------------------------- */

@font-face {
  font-family: "General Sans";
  src: url("../assets/fonts/GeneralSans-Variable.woff2") format("woff2");
  font-weight: 200 700;
  font-style: normal;
  font-display: swap;
}

/* Open outline of OCR-B (the one-sheet specifies OCR B Std). A licensed
   OCR B Std webfont, if added, takes priority through the stack below. */
@font-face {
  font-family: "OCR-B";
  src: url("../assets/fonts/OCRB-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* 2. Tokens + theme ------------------------------------------------------- */

@property --bg { syntax: "<color>"; inherits: true; initial-value: #0b0b0a; }
@property --fg { syntax: "<color>"; inherits: true; initial-value: #f2efdf; }
@property --muted { syntax: "<color>"; inherits: true; initial-value: #9c9a90; }
@property --line { syntax: "<color>"; inherits: true; initial-value: #2e2d2a; }
@property --card { syntax: "<color>"; inherits: true; initial-value: #151513; }
@property --accent-ink { syntax: "<color>"; inherits: true; initial-value: #fb3605; }

:root {
  /* Palette (one-sheet) */
  --void: #0b0b0a;
  --beam: #f2efdf;
  --lava: #fb3605;
  --star: #ffc414;
  --corp: #4790f6;
  --ink: #181916;          /* logo ink */
  --lava-ink: #b32604;     /* Lava, darkened for small text: 5.7:1 on Beam, 5.0:1 on cards */

  /* Type */
  --font-sans: "General Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-mono: "OCR B Std", "OCR-B", "OCR B", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --step--1: clamp(0.8125rem, 0.78rem + 0.12vw, 0.875rem);
  --step-0: clamp(1rem, 0.96rem + 0.18vw, 1.125rem);
  --step-1: clamp(1.1875rem, 1.1rem + 0.4vw, 1.4375rem);
  --step-2: clamp(1.5rem, 1.3rem + 0.9vw, 2.125rem);
  --step-3: clamp(2.125rem, 1.6rem + 2.3vw, 3.75rem);
  --step-4: clamp(2.5rem, 1.7rem + 3.6vw, 5.25rem);
  --step-5: clamp(2.75rem, 1.6rem + 5.4vw, 7.25rem);

  /* Space + layout */
  --gutter: clamp(16px, 4vw, 64px);
  --max: 1600px;
  --nav-h: 72px;
  --section-y: clamp(96px, 12vw, 192px);
  --radius: 14px;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);

  /* Theme (dark by default; JS morphs these as sections pass) */
  --bg: var(--void);
  --fg: var(--beam);
  --muted: #9c9a90;               /* 6.8:1 on Void */
  --line: #2e2d2a;
  --card: #151513;
  --accent-ink: var(--lava);      /* 5.3:1 on Void */
  --focus: var(--corp);
}

/* Theme tokens live on the root while the page colour morphs, so text and
   background always change together. Without the morph, each section owns its theme. */
html[data-tone="light"],
html:not(.theme-morph) [data-tone="light"] {
  --bg: var(--beam);
  --fg: var(--void);
  --muted: #56554f;               /* 6.6:1 on Beam */
  --line: #cfcab3;
  --card: #e6e1cc;
  --accent-ink: var(--lava-ink);
  --focus: #1d5fc4;
}

html[data-tone="dark"],
html:not(.theme-morph) [data-tone="dark"] {
  --bg: var(--void);
  --fg: var(--beam);
  --muted: #9c9a90;
  --line: #2e2d2a;
  --card: #151513;
  --accent-ink: var(--lava);
  --focus: var(--corp);
}

html[data-tone="dark"] { color-scheme: dark; }
html[data-tone="light"] { color-scheme: light; }

html.theme-morph {
  transition: --bg 0.8s var(--ease), --fg 0.8s var(--ease), --muted 0.8s var(--ease),
    --line 0.8s var(--ease), --card 0.8s var(--ease), --accent-ink 0.8s var(--ease);
}

/* Without the morph (no JS, reduced motion) every section paints its own theme. */
html:not(.theme-morph) main > [data-tone],
html:not(.theme-morph) .footer {
  background: var(--bg);
  color: var(--fg);
}

/* 3. Base ----------------------------------------------------------------- */

*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: var(--nav-h);
}

html.lenis,
html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: var(--step-0);
  font-weight: 400;
  line-height: 1.55;
  font-kerning: normal;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

img,
video,
svg { display: block; max-width: 100%; }

img,
video { height: auto; }

h1, h2, h3, h4, p, ul, ol, figure, fieldset { margin: 0; padding: 0; }
ul, ol { list-style: none; }
fieldset { border: 0; min-width: 0; }

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }

button,
input,
textarea,
select { font: inherit; color: inherit; }

button { cursor: pointer; background: none; border: 0; padding: 0; }

::selection { background: var(--lava); color: var(--void); }

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

/* 4. Utilities ------------------------------------------------------------ */

.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  padding: 12px 18px;
  background: var(--lava);
  color: var(--void);
  font-weight: 500;
  text-decoration: none;
  transform: translateY(-160%);
  transition: transform 0.3s var(--ease);
}
.skip-link:focus-visible { transform: none; }

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

.section { padding-block: var(--section-y); }

.mono {
  font-family: var(--font-mono);
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--step--1);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-ink);
  margin-bottom: clamp(18px, 2vw, 28px);
}

.display {
  font-size: var(--step-5);
  font-weight: 500;
  line-height: 0.98;
  letter-spacing: -0.035em;
}

.lead {
  font-size: var(--step-2);
  line-height: 1.3;
  letter-spacing: -0.012em;
}

.section-head { margin-bottom: clamp(48px, 6vw, 88px); max-width: 1100px; }

.section-head--split {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px 64px;
  max-width: none;
}
.section-head--split .section-head__sub { max-width: 36ch; }

.section-head__title {
  font-size: var(--step-4);
  font-weight: 500;
  line-height: 1.02;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.section-head__sub {
  margin-top: 20px;
  color: var(--muted);
  font-size: var(--step-1);
  line-height: 1.45;
}

.section-head__note {
  margin-top: 18px;
  font-size: 0.75rem;
  color: var(--muted);
}

/* Split-text helper (JS wraps words for heading reveals) */
.w { display: inline-block; overflow: clip; vertical-align: top; padding-bottom: 0.08em; margin-bottom: -0.08em; }
.w > span { display: inline-block; will-change: transform; }

/* 5. Components ----------------------------------------------------------- */

/* Buttons */
.btn {
  --btn-bg: var(--fg);
  --btn-fg: var(--bg);
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6em;
  min-height: 44px;
  padding: 0 1.15em;
  border-radius: 6px;
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.005em;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.35s var(--ease), color 0.35s var(--ease), border-color 0.35s var(--ease);
}
.btn svg { width: 18px; height: 18px; flex: none; }

.btn--solid { background: var(--btn-bg); color: var(--btn-fg); }
.btn--solid:hover { background: var(--lava); color: var(--void); }

.btn--ghost {
  border: 1px solid color-mix(in srgb, var(--beam) 40%, transparent);
  color: var(--beam);
  background: color-mix(in srgb, var(--void) 35%, transparent);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
.btn--ghost:hover { background: var(--beam); color: var(--void); border-color: var(--beam); }

.btn--lg { min-height: 60px; padding: 0 1.6em; font-size: 1.0625rem; }

/* Nav */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 40;
  height: calc(var(--nav-h) + env(safe-area-inset-top, 0px));
  padding-top: env(safe-area-inset-top, 0px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-inline: var(--gutter);
  color: var(--fg);
  transition: transform 0.6s var(--ease), color 0.6s var(--ease);
}
.nav::before {
  content: "";
  position: absolute;
  inset: 0 0 -24px 0;
  z-index: -1;
  background: linear-gradient(to bottom, color-mix(in srgb, var(--bg) 88%, transparent), transparent);
  opacity: 0;
  transition: opacity 0.4s var(--ease);
  pointer-events: none;
}
.nav.is-scrolled::before { opacity: 1; }

.nav__brand {
  display: flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  fill: currentColor;
}
.nav__mark { width: 18px; height: 19px; flex: none; }
.nav__logotype { width: 68px; height: 17px; flex: none; }

.nav__list { display: flex; gap: clamp(16px, 2.4vw, 36px); }
.nav__link {
  position: relative;
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding-block: 10px;
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
}
.nav__num {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  color: var(--muted);
}
.nav__link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 4px;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.5s var(--ease);
}
.nav__link:hover::after,
.nav__link[aria-current="true"]::after { transform: scaleX(1); transform-origin: left; }

.nav__actions { display: flex; align-items: center; gap: 12px; }

.motion-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 6px;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 0.3s;
}
.motion-toggle:hover { color: var(--fg); }
.motion-toggle__icon { width: 14px; height: 14px; fill: currentColor; }
/* OCR-B caps sit ~0.12em above the centre of their line box, so flex centring leaves
   icons low against uppercase labels. Lift the icon (or dot) to the cap-height centre. */
.motion-toggle__icon,
.hud__cell--now .hud__k::before,
.formats__rec::before { position: relative; top: -0.12em; }

.nav__menu-btn {
  display: none;
  width: 44px;
  height: 44px;
  place-items: center;
}
.nav__menu-lines,
.nav__menu-lines::before {
  display: block;
  width: 22px;
  height: 1.5px;
  background: currentColor;
  transition: transform 0.4s var(--ease);
}
.nav__menu-lines { position: relative; transform: translateY(-4px); }
.nav__menu-lines::before { content: ""; position: absolute; top: 8px; left: 0; }
.nav__menu-btn[aria-expanded="true"] .nav__menu-lines { transform: translateY(0) rotate(45deg); }
.nav__menu-btn[aria-expanded="true"] .nav__menu-lines::before { transform: translateY(-8px) rotate(-90deg); }

/* The menu is always Void, so the nav above it switches to light-on-dark tokens. */
.menu-open .nav { --fg: var(--beam); --bg: var(--void); --muted: #9c9a90; }
.menu-open .nav::before { opacity: 0; }

/* Menu (mobile) */
.menu {
  position: fixed;
  inset: 0;
  z-index: 39;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: calc(var(--nav-h) + env(safe-area-inset-top, 0px) + 24px) var(--gutter) calc(32px + env(safe-area-inset-bottom, 0px));
  background: var(--void);
  color: var(--beam);
}
.menu[hidden] { display: none; }
.menu__list { counter-reset: menu; }
.menu__link {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding-block: 10px;
  font-size: clamp(2.25rem, 10vw, 3.5rem);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.05;
  text-decoration: none;
}
.menu__link::before {
  counter-increment: menu;
  content: "0" counter(menu);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  letter-spacing: 0.1em;
  color: var(--lava);
}
.menu__foot { font-size: 0.75rem; letter-spacing: 0.3em; color: #9c9a90; }

/* Mark window: the logomark with media living in its doorway */
.markwin {
  position: relative;
  width: 100%;
  aspect-ratio: 194.098 / 205.32;
}
.markwin__media {
  position: absolute;
  left: 13.243%;
  top: 18.527%;
  width: 54.69%;
  height: 62.945%;
  object-fit: cover;
  clip-path: polygon(0 13.53%, 100% 0, 100% 100%, 0 86.47%);
}
.markwin__mark {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  fill: var(--ink);
}

/* Cursor label (fine pointers only; the native cursor stays visible) */
.cursor {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 60;
  pointer-events: none;
  opacity: 0;
  transform: translate3d(-100px, -100px, 0);
}
.cursor span {
  display: block;
  padding: 9px 14px 8px;
  border-radius: 999px;
  background: var(--lava);
  color: var(--void);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  transform: translate(14px, 14px) scale(0.6);
  transition: transform 0.35s var(--ease);
}
.cursor.is-on { opacity: 1; }
.cursor.is-on span { transform: translate(14px, 14px) scale(1); }

/* Film grain */
.grain {
  position: fixed;
  inset: -50%;
  z-index: 55;
  pointer-events: none;
  opacity: 0.07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .5 0 0 0 0 .5 0 0 0 0 .5 0 0 0 1.6 -.3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 0.9s steps(6) infinite;
}
.motion-paused .grain { animation: none; }

@keyframes grain {
  0% { transform: translate(0, 0); }
  20% { transform: translate(-4%, 3%); }
  40% { transform: translate(3%, -5%); }
  60% { transform: translate(-6%, -2%); }
  80% { transform: translate(5%, 6%); }
  100% { transform: translate(0, 0); }
}

/* Player dialog */
.player {
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--beam);
}
.player::backdrop { background: rgba(11, 11, 10, 0.94); }
.player[open] { display: grid; animation: player-in 0.5s var(--ease); }
.player__inner {
  display: grid;
  grid-template-rows: auto 1fr;
  width: 100%;
  height: 100%;
  padding: 16px var(--gutter) var(--gutter);
}
.player__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 56px;
}
.player__title { font-size: 0.75rem; color: #b9b6a8; }
.player__close {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid #3a3935;
  border-radius: 50%;
  transition: background-color 0.3s, color 0.3s;
}
.player__close:hover { background: var(--beam); color: var(--void); }
.player__close svg { width: 20px; height: 20px; }
.player__screen {
  align-self: center;
  justify-self: center;
  width: min(100%, 1440px, calc((100svh - 140px) * 16 / 9));
  aspect-ratio: 16 / 9;
  background: #000;
}
.player__screen.is-vertical {
  width: auto;
  height: min(calc(100svh - 140px), 900px);
  aspect-ratio: 9 / 16;
}
.player__screen video,
.player__screen iframe { width: 100%; height: 100%; border: 0; display: block; }
.player__out { position: relative; display: block; width: 100%; height: 100%; color: var(--beam); }
.player__out img { width: 100%; height: 100%; object-fit: cover; opacity: 0.55; }
.player__out-label {
  position: absolute;
  left: 50%;
  top: 50%;
  padding: 16px 22px;
  border-radius: 6px;
  background: var(--lava);
  color: var(--void);
  font-weight: 500;
  transform: translate(-50%, -50%);
}
.player__out:hover .player__out-label { background: var(--beam); }

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

/* 6. Sections ------------------------------------------------------------- */

/* --- Opening ------------------------------------------------------------- */

.opening { position: relative; }
.opening__stage {
  position: relative;
  height: 100vh;
  height: 100svh;
  min-height: 560px;
  overflow: hidden;
  background: var(--ink);
  color: var(--beam);
}

.opening__media { position: absolute; inset: 0; transform-origin: 50% 50%; will-change: transform; }
.opening__video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: var(--void) center / cover no-repeat;
}
.opening__shade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(120% 80% at 50% 45%, rgba(11, 11, 10, 0.2) 0%, rgba(11, 11, 10, 0.72) 100%),
    linear-gradient(to bottom, rgba(11, 11, 10, 0.6), rgba(11, 11, 10, 0) 26%, rgba(11, 11, 10, 0) 62%, rgba(11, 11, 10, 0.85));
}
.opening__texture {
  position: absolute;
  inset: 0;
  background: url("../assets/img/brand/film-texture.jpg") center / cover;
  mix-blend-mode: screen;
  opacity: 0.4;
}

.portal {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
  visibility: hidden;
}
.portal.is-ready { visibility: visible; }
.portal__wall { fill: var(--beam); }
.portal__mark { fill: var(--ink); }

.opening__brand {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: clamp(20px, 3vh, 36px);
  padding-inline: var(--gutter);
  text-align: center;
  pointer-events: none;
}
.opening__title {
  display: grid;
  justify-items: center;
  gap: clamp(12px, 1.8vw, 26px);
  fill: var(--beam);
}
.opening__logotype { width: min(64vw, 900px, 108vh); height: auto; overflow: visible; }
.opening__logotype .lt { transform-box: fill-box; }
.opening__line {
  font-size: clamp(0.75rem, 0.6rem + 0.6vw, 1.125rem);
  letter-spacing: 0.42em;
  margin-right: -0.42em;
}

.opening__hud {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: end;
  gap: 24px;
  padding: 0 var(--gutter) clamp(20px, 3.4vh, 36px);
}
.hud__cell { display: grid; gap: 4px; }
.hud__cell--left { font-size: 0.6875rem; line-height: 1.6; color: #c9c6b6; }
.hud__cell--left .hud__v { color: var(--beam); }
.hud__cell--now { justify-items: center; text-align: center; min-width: min(420px, 40vw); }
.hud__cell--now .hud__k { font-size: 0.625rem; color: var(--lava); display: inline-flex; gap: 8px; align-items: center; }
.hud__cell--now .hud__k::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--lava);
  animation: blink 1.6s steps(2) infinite;
}
.hud__cell--now .hud__v { font-size: 1rem; font-weight: 500; letter-spacing: -0.005em; }
.hud__sep { color: #8a887e; padding-inline: 4px; }
.hud__studio { font-size: 0.625rem; color: #b9b6a8; }
.hud__ticks { display: flex; gap: 4px; margin-top: 10px; }
.hud__ticks button {
  position: relative;
  width: 22px;
  height: 24px;
  pointer-events: auto;
}
.hud__ticks button::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 2px;
  background: rgba(242, 239, 223, 0.25);
}
.hud__ticks button::after {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  height: 2px;
  width: calc(var(--p, 0) * 100%);
  background: var(--beam);
}
.hud__ticks button.is-done::after { width: 100%; }
.hud__cell--right { justify-items: end; gap: 12px; }
.hud__tc { font-size: 0.6875rem; color: #c9c6b6; font-variant-numeric: tabular-nums; }

.opening__cue {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(clamp(20px, 3.4vh, 36px) + 120px);
  display: none;
}

@keyframes blink { 50% { opacity: 0.15; } }
.motion-paused .hud__cell--now .hud__k::before { animation: none; }

/* Intro (01), sits on the Beam wall once the portal settles */
.intro {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  align-items: center;
  gap: clamp(32px, 6vw, 120px);
  padding: calc(var(--nav-h) + 4vh) var(--gutter) 7vh;
  max-width: var(--max);
  margin-inline: auto;
  color: var(--void);
  pointer-events: none;
  opacity: 0;
}
.intro .eyebrow { color: var(--lava-ink); }
.intro__title {
  font-size: clamp(2.5rem, 1.5rem + 3.6vw, 5.75rem);
  font-weight: 500;
  line-height: 0.98;
  letter-spacing: -0.035em;
  text-wrap: balance;
}
.intro__target {
  justify-self: center;
  width: min(100%, 50vh, 520px);
}
.intro__target .markwin { visibility: hidden; }

/* --- Why ----------------------------------------------------------------- */

.why { padding-top: clamp(72px, 9vw, 140px); }
.why__grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gutter);
}
.why__eyebrow { grid-column: 1 / -1; }
.why__title { grid-column: 1 / 11; text-wrap: balance; }
/* Lead and supporting paragraph sit side by side under the headline, sharing its width. */
.why__body {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 24px var(--gutter);
  margin-top: clamp(32px, 3.6vw, 56px);
}
.why__body p:not(.lead) { color: var(--muted); max-width: 58ch; font-size: var(--step-1); line-height: 1.55; padding-top: 0.2em; }

.equation {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  align-items: stretch;
  gap: clamp(12px, 2vw, 28px);
  margin-top: clamp(72px, 9vw, 140px);
  padding-top: 32px;
  border-top: 1px solid var(--line);
}
/* Blocks are centred in their columns so the × and = land midway between them. */
.equation__item { display: grid; align-content: start; justify-items: center; gap: 10px; padding-block: 8px; text-align: center; }
.equation__num { font-size: 0.75rem; color: var(--accent-ink); }
.equation__title { font-size: var(--step-2); font-weight: 500; letter-spacing: -0.02em; }
.equation__item p { color: var(--muted); max-width: 30ch; text-wrap: balance; }
.equation__op {
  align-self: center;
  justify-self: center;
  text-align: center;
  font-size: var(--step-3);
  font-weight: 300;
  color: var(--accent-ink);
  line-height: 1;
}

/* --- Problem ------------------------------------------------------------- */

.problem__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr);
  align-items: center;
  gap: clamp(40px, 6vw, 120px);
}
.problem__kicker { font-size: var(--step-1); font-weight: 500; margin-bottom: 16px; }
.problem__title { max-width: 12ch; }
.problem__lede { margin-top: clamp(24px, 3vw, 40px); max-width: 46ch; color: var(--muted); font-size: var(--step-1); }

.feed { justify-self: center; display: grid; justify-items: center; gap: 18px; }
.feed__phone {
  position: relative;
  width: min(300px, 74vw);
  aspect-ratio: 9 / 18.5;
  padding: 10px;
  border-radius: 46px;
  background: var(--void);
  box-shadow: 0 40px 80px -30px rgba(11, 11, 10, 0.55), inset 0 0 0 1px #2b2a27;
  color: var(--beam);
}
.feed__notch {
  position: absolute;
  top: 18px;
  left: 50%;
  z-index: 3;
  width: 84px;
  height: 22px;
  border-radius: 20px;
  background: #000;
  transform: translateX(-50%);
}
.feed__viewport {
  position: relative;
  height: calc(100% - 38px);
  overflow: hidden;
  border-radius: 36px 36px 10px 10px;
  background: #121210;
}
.feed__track { position: absolute; inset: 0 0 auto 0; will-change: transform; }
.feed__meter {
  display: flex;
  justify-content: space-between;
  padding: 12px 10px 0;
  font-size: 0.5625rem;
  letter-spacing: 0.12em;
  color: #9c9a90;
}
.feed__meter b { color: var(--lava); font-weight: 400; font-variant-numeric: tabular-nums; }

/* The thumb: presses, then flicks the post away */
.feed__touch {
  position: absolute;
  left: 58%;
  top: 0;
  z-index: 4;
  width: 38px;
  height: 38px;
  margin: -19px 0 0 -19px;
  border: 1.5px solid rgba(242, 239, 223, 0.75);
  border-radius: 50%;
  background: rgba(242, 239, 223, 0.2);
  opacity: 0;
  pointer-events: none;
}

/* One full-screen vertical post (reel / short / story ad) */
.post {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: var(--post-h, 100%);
  padding: 40px 14px 16px;
  overflow: hidden;
  isolation: isolate;
}
.post__bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(70% 45% at 50% 44%, rgba(242, 239, 223, 0.14), transparent 70%),
    linear-gradient(170deg, var(--c, #3b3a36) 0%, #151513 82%);
  transition: filter 0.3s;
}
.post__bg::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 30%;
  width: 30%;
  height: 30%;
  border-radius: 14px 14px 8px 8px;
  background: rgba(242, 239, 223, 0.18);
  transform: translateX(-50%);
}
.post__bar {
  position: absolute;
  left: 12px;
  right: 12px;
  top: 30px;
  height: 2px;
  border-radius: 2px;
  background: rgba(242, 239, 223, 0.22);
}
.post__bar i {
  display: block;
  width: calc(var(--watched, 0) * 100%);
  height: 100%;
  border-radius: inherit;
  background: var(--beam);
}
.post__head { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.post__avatar { width: 24px; height: 24px; border-radius: 50%; background: var(--c, #3b3a36); box-shadow: 0 0 0 1.5px rgba(242, 239, 223, 0.6); }
.post__who { display: grid; gap: 3px; }
.post__handle { width: 76px; height: 6px; border-radius: 4px; background: rgba(242, 239, 223, 0.55); }
.post__tag { font-family: var(--font-mono); font-size: 0.5rem; letter-spacing: 0.12em; text-transform: uppercase; color: rgba(242, 239, 223, 0.7); }
.post__skip {
  position: absolute;
  right: 12px;
  top: 44px;
  padding: 4px 8px;
  border-radius: 4px;
  background: rgba(11, 11, 10, 0.55);
  font-size: 0.5625rem;
  color: var(--beam);
}
.post__rail {
  position: absolute;
  right: 12px;
  bottom: 96px;
  display: grid;
  gap: 14px;
}
.post__rail i { display: block; width: 26px; height: 26px; border-radius: 50%; background: rgba(242, 239, 223, 0.22); }
.post__foot { display: grid; gap: 8px; padding-right: 44px; }
.post__lines { display: grid; gap: 6px; }
.post__lines i { display: block; height: 6px; border-radius: 3px; background: rgba(242, 239, 223, 0.35); }
.post__lines i:nth-child(2) { width: 64%; }
.post__cta {
  padding: 8px 10px;
  border-radius: 6px;
  background: rgba(242, 239, 223, 0.92);
  color: var(--void);
  font-size: 0.625rem;
  font-weight: 500;
  text-align: center;
}
.post__stamp {
  position: absolute;
  left: 50%;
  top: 46%;
  padding: 6px 12px;
  border: 2px solid var(--lava);
  border-radius: 4px;
  color: var(--lava);
  font-family: var(--font-mono);
  font-size: 0.875rem;
  letter-spacing: 0.2em;
  background: rgba(11, 11, 10, 0.55);
  transform: translate(-50%, -50%) rotate(-9deg) scale(1.6);
  opacity: 0;
  transition: opacity 0.18s, transform 0.28s var(--ease);
}
.post.is-skipped .post__stamp { opacity: 1; transform: translate(-50%, -50%) rotate(-9deg) scale(1); }
.post.is-skipped .post__bg { filter: grayscale(1) brightness(0.55); }
.post.is-fresh .post__stamp,
.post.is-fresh .post__bg { transition: none; }

.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-top: clamp(72px, 9vw, 140px);
}
.stat {
  display: grid;
  align-content: start;
  gap: 8px;
  padding: clamp(22px, 2.4vw, 32px);
  border-radius: 6px;
  background: var(--card);
}
.stat__label { font-size: 0.75rem; color: var(--accent-ink); }
.stat__value {
  font-size: clamp(3.5rem, 2rem + 4.6vw, 6.25rem);
  font-weight: 600;
  line-height: 0.95;
  letter-spacing: -0.055em;
  margin-block: 6px 12px;
  font-variant-numeric: tabular-nums;
}
.stat__title { font-size: var(--step-1); font-weight: 500; line-height: 1.25; letter-spacing: -0.01em; }
.stat__body { color: var(--muted); font-size: 0.9375rem; }

/* --- Manifesto ----------------------------------------------------------- */
/* The one-sheet's own application image: a lit red frame in a dark field.
   Headline sits in the sky above it, the stamp in the foreground below, as on the sheet. */

.manifesto {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: clamp(640px, 100svh, 1040px);
  display: grid;
  color: var(--beam);
  background: var(--void);
}
.manifesto__bg { position: absolute; inset: -8% 0; z-index: -1; }
.manifesto__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 45%;
}
.manifesto__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom,
    var(--void) 0%, rgba(11, 11, 10, 0.55) 17%, rgba(11, 11, 10, 0) 36%,
    rgba(11, 11, 10, 0) 64%, rgba(11, 11, 10, 0.6) 86%, var(--void) 100%);
}
.manifesto__inner {
  display: grid;
  grid-template-rows: auto 1fr auto;
  justify-items: center;
  text-align: center;
  padding-block: clamp(88px, 11vh, 132px) clamp(48px, 8vh, 96px);
}
.manifesto__title {
  max-width: 30ch;
  font-size: clamp(2rem, 1.2rem + 2.8vw, 3.75rem);
  font-weight: 500;
  line-height: 1.04;
  letter-spacing: -0.03em;
  text-wrap: balance;
}
.manifesto__title em { font-style: normal; color: var(--lava); }
.manifesto__title .word { transition: opacity 0.2s linear; }
.manifesto__stamp {
  grid-row: 3;
  display: grid;
  gap: 6px;
  font-size: clamp(0.6875rem, 0.55rem + 0.45vw, 1rem);
  letter-spacing: 0.5em;
  margin-right: -0.5em;
  color: var(--beam);
}

/* --- Formats ------------------------------------------------------------- */

.formats__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.7fr);
  gap: clamp(40px, 6vw, 120px);
  align-items: start;
}
.formats__list { border-top: 1px solid var(--line); }
.format { border-bottom: 1px solid var(--line); }
.format__row {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  align-items: center;
  gap: 16px;
  width: 100%;
  padding-block: clamp(20px, 2.4vw, 34px);
  text-align: left;
  color: var(--muted);
  transition: color 0.4s var(--ease);
}
.format__num { font-size: 0.75rem; color: var(--accent-ink); }
.format__title {
  font-size: var(--step-4);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.035em;
}
.format__icon { width: clamp(24px, 2.4vw, 36px); height: clamp(24px, 2.4vw, 36px); transition: transform 0.5s var(--ease); }
.format.is-active .format__row,
.format__row:hover { color: var(--fg); }
.format.is-active .format__icon { transform: rotate(90deg); }
.format__panel {
  display: grid;
  grid-template-rows: 0fr;
  padding-left: 72px;
  transition: grid-template-rows 0.6s var(--ease);
}
.format__inner {
  min-height: 0;
  overflow: hidden;
  visibility: hidden;
  transition: visibility 0s linear 0.6s;
}
.format.is-active .format__panel { grid-template-rows: 1fr; }
.format.is-active .format__inner { visibility: visible; transition-delay: 0s; }
.format__inner p:first-child { font-size: var(--step-1); line-height: 1.45; max-width: 40ch; }
.format__eg { margin-top: 10px; padding-bottom: clamp(20px, 2.4vw, 34px); font-size: 0.6875rem; color: var(--muted); }

.formats__stage {
  position: sticky;
  top: calc(var(--nav-h) + 6vh);
  display: grid;
  gap: 16px;
}
.formats__window {
  position: relative;
  aspect-ratio: 106.152 / 129.238;
  clip-path: polygon(0 13.53%, 100% 0, 100% 100%, 0 86.47%);
  background: var(--void);
}
.formats__window video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.7s var(--ease);
}
.formats__window video.is-active { opacity: 1; }
.formats__label { display: flex; gap: 10px; justify-content: flex-end; font-size: 0.6875rem; color: var(--muted); }
.formats__rec { display: inline-flex; align-items: center; gap: 6px; color: var(--accent-ink); }
.formats__rec::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; animation: blink 1.6s steps(2) infinite; }
.motion-paused .formats__rec::before { animation: none; }

/* --- Work ---------------------------------------------------------------- */

.work__grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(40px, 5vw, 72px) clamp(16px, 2vw, 32px);
}
.card { display: grid; align-content: start; gap: 18px; }
.card--a { grid-column: 1 / 8; }
.card--c { grid-column: 8 / 13; }
/* Work in development: Contrada beside the F1 panorama. The F1 still sets the row
   height and Contrada's frame fills the same height, so both captions line up. */
.card--g { grid-column: 1 / 5; grid-template-rows: 1fr auto; }
.card--b { grid-column: 5 / 13; }
.card--d { grid-column: 1 / 5; }
.card--e { grid-column: 5 / 9; }
.card--f { grid-column: 9 / 13; }

.card__media {
  position: relative;
  display: block;
  width: 100%;
  overflow: hidden;
  border-radius: 4px;
  background: var(--card);
  aspect-ratio: 16 / 9;
  text-decoration: none;
}
.card--c .card__media { aspect-ratio: 5 / 4; }
.card--g .card__media { aspect-ratio: auto; min-height: 120px; }
.card--b .card__media { aspect-ratio: 1074 / 300; }
.card--d .card__media,
.card--e .card__media,
.card--f .card__media { aspect-ratio: 4 / 3; }

.card__media img,
.card__media video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.2s var(--ease), opacity 0.5s var(--ease);
}
.card__media video { opacity: 0; }
.card__media.is-playing video { opacity: 1; }
.card__media:hover img,
.card__media:focus-visible img,
.card__media.is-playing video { transform: scale(1.03); }

.card__badge {
  position: absolute;
  left: 12px;
  top: 12px;
  padding: 6px 9px;
  border-radius: 3px;
  background: var(--star);
  color: var(--void);
  font-size: 0.625rem;
}
.card__meta { display: grid; gap: 6px; }
.card__client { font-size: 0.75rem; color: var(--star); }
.card__title { font-size: var(--step-2); font-weight: 500; line-height: 1.15; letter-spacing: -0.02em; max-width: 30ch; }
.card--a .card__title { font-size: var(--step-3); }
.card__metric { color: var(--muted); max-width: 44ch; }
.card__metric strong { color: var(--fg); font-weight: 500; }
.card__studio { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 0.9375rem; }
.card__out { width: 16px; height: 16px; }

/* Rail */
.rail { margin-top: clamp(96px, 10vw, 160px); }
.rail__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 20px;
  margin-bottom: 28px;
  border-bottom: 1px solid var(--line);
}
.rail__title { font-size: 0.8125rem; font-weight: 400; color: var(--muted); }
.rail__controls { display: flex; gap: 8px; }
.rail__btn {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 50%;
  transition: background-color 0.3s, color 0.3s, border-color 0.3s, opacity 0.3s;
}
.rail__btn:hover { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.rail__btn:disabled { opacity: 0.3; pointer-events: none; }
.rail__btn svg { width: 20px; height: 20px; }
.rail__btn[data-rail-prev] svg { transform: scaleX(-1); }
.rail__track {
  --h: clamp(260px, 28vw, 400px);
  display: flex;
  gap: clamp(16px, 1.6vw, 24px);
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: var(--gutter);
  margin-inline: calc(var(--gutter) * -1);
  padding: 6px var(--gutter) 12px;
  scrollbar-width: none;
}
.rail__track::-webkit-scrollbar { display: none; }
.tile { flex: none; display: grid; align-content: start; gap: 4px; width: calc(var(--h) * 4 / 3); scroll-snap-align: start; }
.tile--tall { width: calc(var(--h) * 3 / 4); }
.tile__media {
  position: relative;
  display: block;
  height: var(--h);
  overflow: hidden;
  border-radius: 4px;
  margin-bottom: 12px;
  background: var(--card);
}
.tile__media img,
.tile__media video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.2s var(--ease), opacity 0.5s var(--ease);
}
.tile__media video { opacity: 0; }
.tile__media.is-playing video { opacity: 1; }
.tile__media:hover img,
.tile__media.is-playing video { transform: scale(1.03); }
.tile__client { font-size: 0.6875rem; color: var(--star); }
.tile__title { font-size: 1.125rem; font-weight: 500; line-height: 1.25; }
.tile__studio { font-size: 0.875rem; color: var(--muted); }

/* --- Talent -------------------------------------------------------------- */

.talent__list {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  column-gap: 0.32em;
  row-gap: 0.06em;
  font-size: clamp(2.125rem, 1rem + 4.6vw, 6rem);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.035em;
}
.talent__list li { display: inline-flex; align-items: baseline; gap: 0.32em; }
.talent__list li:not(:last-child)::after {
  content: "";
  width: 0.3em;
  height: 0.32em;
  background: var(--lava);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 194.098 205.32'%3E%3Cpath d='M131.856 38.0371V38.04L25.7041 55.5283V149.791L131.856 167.278V167.283L0 205.32V0L131.856 38.0371ZM194.098 177.533L131.856 167.278V38.04L194.098 27.7871V177.533Z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 194.098 205.32'%3E%3Cpath d='M131.856 38.0371V38.04L25.7041 55.5283V149.791L131.856 167.278V167.283L0 205.32V0L131.856 38.0371ZM194.098 177.533L131.856 167.278V38.04L194.098 27.7871V177.533Z'/%3E%3C/svg%3E") center / contain no-repeat;
  transform: translateY(-0.06em);
}
.talent__name {
  color: var(--muted);
  cursor: default;
  transition: color 0.35s var(--ease);
  border-radius: 4px;
}
.talent__name:hover,
.talent__name:focus-visible,
.talent__name.is-active { color: var(--fg); }

.peek {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 30;
  width: clamp(200px, 18vw, 280px);
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s var(--ease), visibility 0s linear 0.35s;
}
.peek.is-on { opacity: 1; visibility: visible; transition: opacity 0.35s var(--ease); }
.peek__frame {
  aspect-ratio: 106.152 / 129.238;
  clip-path: polygon(0 13.53%, 100% 0, 100% 100%, 0 86.47%);
  background: var(--card);
}
.peek__frame img { width: 100%; height: 100%; object-fit: cover; }
.peek.no-img .peek__frame { display: none; }
.peek__note { margin-top: 10px; font-size: 0.625rem; color: var(--star); }

/* --- Team (split-flap board) -------------------------------------------- */

.team__grid {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(40px, 6vw, 120px);
  align-items: center;
}
.team__note { margin-top: 24px; color: var(--muted); font-size: var(--step-1); max-width: 34ch; }
.board {
  --cell: clamp(17px, 1.9vw, 32px);
  padding: clamp(18px, 2.2vw, 32px);
  border-radius: var(--radius);
  background: var(--void);
  color: var(--beam);
  box-shadow: 0 50px 90px -50px rgba(11, 11, 10, 0.6);
}
.board__head {
  display: flex;
  justify-content: space-between;
  padding-bottom: 14px;
  margin-bottom: 14px;
  border-bottom: 1px solid #2b2a27;
  font-size: 0.625rem;
  color: #8a887e;
}
.board__rows { display: grid; gap: calc(var(--cell) * 0.28); }
.board__row {
  display: flex;
  align-items: center;
  gap: 3px;
}
.flap {
  position: relative;
  display: grid;
  place-items: center;
  width: var(--cell);
  height: calc(var(--cell) * 1.36);
  border-radius: 3px;
  background: linear-gradient(to bottom, #20201d 0 49%, #181816 51% 100%);
  font-family: var(--font-mono);
  font-size: calc(var(--cell) * 0.72);
  line-height: 1;
  color: var(--beam);
}
.flap::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 1px;
  background: #0b0b0a;
}
.flap.is-flipping { color: #b9b6a8; }
.board__status {
  margin-left: auto;
  padding-left: 12px;
  font-family: var(--font-mono);
  font-size: calc(var(--cell) * 0.4);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--star);
  opacity: 0;
  transition: opacity 0.4s;
}
.board__row.is-landed .board__status { opacity: 1; }

/* --- Process ------------------------------------------------------------- */

.process__track { position: relative; }
.process__rule {
  position: relative;
  height: 1px;
  margin-bottom: clamp(32px, 4vw, 56px);
  background: var(--line);
}
.process__rule i {
  position: absolute;
  inset: 0;
  background: var(--lava);
  transform: scaleX(var(--p, 1));
  transform-origin: left;
}
.process__steps {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: clamp(20px, 2.4vw, 40px);
}
.step { display: grid; align-content: start; gap: 12px; }
/* Steps ahead of the rule show their number as an outline; text stays at full contrast. */
.step__num { transition: color 0.5s var(--ease); }
.js .process__track[data-progress] .step:not(.is-on) .step__num { color: transparent; -webkit-text-stroke: 1.5px var(--lava); }
.step__num {
  color: var(--lava);
  font-size: clamp(3rem, 2rem + 3vw, 5rem);
  font-weight: 600;
  line-height: 0.9;
  letter-spacing: -0.06em;
}
.step__title { font-size: var(--step-2); font-weight: 500; letter-spacing: -0.02em; }
.step p { color: var(--muted); max-width: 26ch; }

/* --- Family -------------------------------------------------------------- */

.family__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(40px, 6vw, 120px);
  align-items: start;
}
.family__lede { margin-top: 24px; font-size: var(--step-1); color: var(--muted); max-width: 44ch; }
.family__list { border-top: 1px solid var(--line); }
.agency {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 8px 32px;
  padding-block: clamp(24px, 2.6vw, 36px);
  border-bottom: 1px solid var(--line);
}
.agency__role { grid-column: 1 / -1; font-size: 0.6875rem; color: var(--accent-ink); }
.agency__name { font-size: var(--step-3); font-weight: 500; line-height: 1; letter-spacing: -0.03em; }
.agency p:last-child { color: var(--muted); }

/* --- Contact ------------------------------------------------------------- */

.contact { padding-bottom: clamp(120px, 14vw, 220px); }
.contact .eyebrow { text-align: center; }
.contact__form { display: grid; grid-template-columns: minmax(0, 1fr); justify-items: center; }

.lockup {
  /* Sizes the brand box, its type and the ×. It grows with the viewport, and on phones
     it is capped so mark + × + box (about 2.45 units plus two gaps) fill the column. */
  --unit: min(calc((100vw - 2 * var(--gutter) - 28px) / 2.45), calc(10.33vw + 87px), 236px);
  --mark: calc(var(--unit) * 0.6);    /* the logomark sits smaller beside the box */
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(14px, 3.4vw, 52px);
  width: 100%;
  margin-top: clamp(24px, 4vw, 56px);
}
.lockup__mark { flex: none; width: var(--mark); height: auto; fill: var(--ink); }
.lockup__x { flex: none; font-size: calc(var(--unit) * 0.2); font-weight: 300; line-height: 1; }
/* The brand box keeps the deck's 333 × 205 proportion. Its dashed edge is drawn with
   gradients so the dashes can "march" like a live selection, inviting a click. */
.lockup__box {
  --dash: var(--void);
  --dash-len: 10px;
  position: relative;
  flex: none;
  display: grid;
  width: calc(var(--unit) * 333 / 194);
  height: calc(var(--unit) * 205 / 194);
  cursor: text;
  background-image:
    linear-gradient(90deg, var(--dash) 50%, transparent 0),
    linear-gradient(90deg, var(--dash) 50%, transparent 0),
    linear-gradient(0deg, var(--dash) 50%, transparent 0),
    linear-gradient(0deg, var(--dash) 50%, transparent 0);
  background-repeat: repeat-x, repeat-x, repeat-y, repeat-y;
  background-size: var(--dash-len) 1.5px, var(--dash-len) 1.5px, 1.5px var(--dash-len), 1.5px var(--dash-len);
  background-position: 0 0, 0 100%, 0 0, 100% 0;
  animation: marching-ants 1.6s linear infinite;
  transition: background-color 0.4s var(--ease), box-shadow 0.3s var(--ease);
}
.lockup__box:hover { --dash: var(--lava-ink); animation-duration: 0.8s; }
.lockup__box:focus-within { --dash: var(--lava-ink); animation-duration: 0.8s; box-shadow: 0 0 0 6px color-mix(in srgb, var(--lava) 14%, transparent); }
.lockup.is-filled .lockup__box { animation: none; background: var(--void); box-shadow: none; }
.motion-paused .lockup__box { animation: none; }

@keyframes marching-ants {
  to { background-position: var(--dash-len) 0, calc(var(--dash-len) * -1) 100%, 0 calc(var(--dash-len) * -1), 100% var(--dash-len); }
}

.lockup__hint {
  position: absolute;
  top: calc(100% + 14px);
  left: 50%;
  translate: -50% 0;
  width: max-content;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  font-size: 0.6875rem;
  color: var(--lava-ink);
  pointer-events: none;
  transition: opacity 0.3s var(--ease);
}
.lockup__hint svg { flex: none; width: 14px; height: 14px; transform: rotate(-90deg); position: relative; top: -0.12em; }
.lockup.is-filled .lockup__hint,
.lockup__box:focus-within .lockup__hint { opacity: 0; }
/* Touch screens have nothing to click: the cue there is just "Type your brand". */
@media (hover: none) {
  .lockup__hint-verb { display: none; }
}

.lockup__input {
  width: 100%;
  height: 100%;
  padding: 0 16px;
  border: 0;
  background: transparent;
  color: var(--void);
  text-align: center;
  font-family: var(--font-mono);
  font-size: calc(var(--unit) * 0.12 * var(--fit, 1));
  letter-spacing: 0.12em;
  text-transform: uppercase;
  caret-color: var(--lava-ink);
}
.lockup.is-filled .lockup__input { color: var(--beam); }
.lockup__input::placeholder { color: var(--void); opacity: 1; }
.lockup__input:focus { outline: none; }
.lockup__input:focus::placeholder { color: #6b6a63; }

.contact__line {
  margin-top: clamp(64px, 7vw, 88px);
  font-size: clamp(0.6875rem, 0.55rem + 0.5vw, 1rem);
  letter-spacing: 0.3em;
  text-align: center;
  text-wrap: balance;
}

.contact__fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 32px clamp(24px, 3vw, 48px);
  width: min(100%, 960px);
  margin-top: clamp(56px, 7vw, 104px);
}
.field { display: grid; gap: 10px; }
.field--wide { grid-column: 1 / -1; }
.field__label { font-size: 0.6875rem; color: var(--muted); }
.field__opt { margin-left: 8px; color: var(--muted); letter-spacing: 0.08em; text-transform: none; font-family: var(--font-sans); }
.field__input {
  width: 100%;
  min-height: 52px;
  padding: 10px 0;
  border: 0;
  border-bottom: 1px solid color-mix(in srgb, var(--void) 45%, transparent);
  border-radius: 0;
  background: transparent;
  font-size: var(--step-1);
  transition: border-color 0.3s;
}
.field__input:hover { border-bottom-color: var(--void); }
.field__input:focus-visible { outline: none; border-bottom: 2px solid var(--lava-ink); padding-bottom: 9px; }
.field__input--area { resize: vertical; min-height: 120px; line-height: 1.5; }
.field__input[aria-invalid="true"] { border-bottom-color: var(--lava-ink); }
.field__error { min-height: 0; color: var(--lava-ink); font-size: 0.875rem; }
.field__error:empty { display: none; }
.contact__form > .field__error { margin-top: 14px; }

.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chips legend { margin-bottom: 14px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.chip span {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid color-mix(in srgb, var(--void) 35%, transparent);
  border-radius: 999px;
  font-size: 0.9375rem;
  transition: background-color 0.3s, color 0.3s, border-color 0.3s;
}
.chip:hover span { border-color: var(--void); }
.chip input:checked + span { background: var(--void); color: var(--beam); border-color: var(--void); }
.chip input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 3px; }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.turnstile:empty { display: none; }

.contact__submit {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-top: 8px;
}
.contact__alt { color: var(--muted); }
.contact__status { margin-top: 28px; min-height: 1.5em; font-size: var(--step-1); text-align: center; }
.contact__status.is-error { color: var(--lava-ink); }

/* --- Footer -------------------------------------------------------------- */

.footer {
  position: relative;
  overflow: hidden;
  padding-top: clamp(96px, 11vw, 176px);
  background: var(--void);
  color: var(--beam);
}
.poem {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  row-gap: 0.7em;
  font-family: var(--font-mono);
  font-size: clamp(0.6875rem, 0.55rem + 0.45vw, 1rem); /* decoration, set like the tee */
  letter-spacing: 0.24em;
  line-height: 1.2;
  text-transform: uppercase;
  color: var(--corp);
}
.poem span:nth-child(4n + 2) { text-align: center; }
.poem span:nth-child(4n + 3) { text-align: center; }
.poem span:nth-child(4n) { text-align: right; }

.footer__meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
  margin-top: clamp(56px, 7vw, 112px);
  padding-top: 28px;
  border-top: 1px solid #2b2a27;
}
.footer__col { display: grid; align-content: start; gap: 8px; }
.footer__k { font-size: 0.6875rem; color: #9c9a90; }
.footer__link { font-size: var(--step-1); font-weight: 500; text-decoration: none; width: fit-content; }
.footer__link:hover { text-decoration: underline; }
.footer__col--label { justify-items: end; font-size: 0.625rem; line-height: 1.8; color: #8a887e; text-align: right; }
.footer__rewind { width: 42px; height: 22px; margin-top: 6px; stroke: currentColor; color: var(--beam); }

.footer__mega {
  padding-inline: var(--gutter);
  margin-top: clamp(64px, 8vw, 128px);
  fill: var(--beam);
}
.footer__mega svg { width: 100%; height: auto; }

.footer__legal {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-block: 28px 32px;
  font-size: 0.625rem;
  color: #9c9a90;
}
.footer__top { text-decoration: none; }
.footer__top:hover { color: var(--beam); }

/* 7. Motion + static fallbacks ------------------------------------------- */

/* Reveal states are only applied when JS is running with motion. */
.js.motion-ok [data-reveal],
.js.motion-ok [data-reveal-stagger] > * {
  opacity: 0;
  transform: translate3d(0, 28px, 0);
}

/* Static opening: no JS, reduced motion, or a very short viewport. */
.no-js .opening__stage,
.reduced-motion .opening__stage,
.opening.is-static .opening__stage {
  height: auto;
  min-height: 0;
  overflow: visible;
  background: none;
}
.no-js .opening__media,
.reduced-motion .opening__media,
.opening.is-static .opening__media {
  position: relative;
  height: 100svh;
  min-height: 560px;
}
.no-js .portal,
.reduced-motion .portal,
.opening.is-static .portal { display: none; }
.no-js .opening__brand,
.reduced-motion .opening__brand,
.opening.is-static .opening__brand { height: 100svh; min-height: 560px; bottom: auto; }
.no-js .opening__hud,
.reduced-motion .opening__hud,
.opening.is-static .opening__hud { top: calc(100svh - 160px); bottom: auto; height: 160px; }
.no-js .intro,
.reduced-motion .intro,
.opening.is-static .intro {
  position: relative;
  opacity: 1;
  max-width: none;
  padding: var(--section-y) var(--gutter) 0;
  background: var(--beam);
}
.no-js .intro__target .markwin,
.reduced-motion .intro__target .markwin,
.opening.is-static .intro__target .markwin { visibility: visible; }

@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;
  }
}

/* Responsive -------------------------------------------------------------- */

@media (max-width: 1100px) {
  .nav__primary { display: none; }
  .nav__menu-btn { display: grid; }
  .motion-toggle__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .motion-toggle { width: 44px; justify-content: center; }

  .why__title { grid-column: 1 / -1; }
  .why__body { grid-template-columns: 1fr; max-width: 720px; }

  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .process__steps { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 48px; }
  .team__grid { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
  :root { --nav-h: 60px; }
  .nav { gap: 16px; }
  .nav__actions { gap: 8px; }
  .nav__cta { min-height: 40px; padding: 0 0.95em; font-size: 0.875rem; }
  .nav__logotype { width: 62px; height: 15.6px; }

  .opening__hud { grid-template-columns: 1fr auto; }
  .hud__cell--left { display: none; }
  .hud__cell--now { justify-items: start; text-align: left; min-width: 0; }
  .hud__ticks { display: none; }
  .opening__logotype { width: 86vw; }

  .intro {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
    align-content: center;
    gap: 28px;
    padding-top: calc(var(--nav-h) + 16px);
  }
  .intro__target { grid-row: 1; width: min(64vw, 36vh); }
  .intro__title { font-size: clamp(2.125rem, 8.6vw, 3.5rem); }
  
  .equation { grid-template-columns: 1fr; gap: 8px; }
  .equation__op { padding-block: 4px; font-size: var(--step-2); }

  .problem__grid { grid-template-columns: 1fr; }

  .formats__grid { grid-template-columns: 1fr; }
  .formats__stage { position: relative; top: auto; order: -1; width: min(62vw, 280px); justify-self: center; }
  .format__row { grid-template-columns: 40px 1fr auto; }
  .format__panel { padding-left: 56px; }

  .work__grid > .card { grid-column: 1 / -1; }
  .card--g { grid-template-rows: auto; }
  .card--g .card__media { aspect-ratio: 16 / 9; }
  .card--c .card__media,
  .card--d .card__media,
  .card--e .card__media,
  .card--f .card__media { aspect-ratio: 4 / 3; }
  .card--b .card__media { aspect-ratio: 16 / 7; }

  .family__grid { grid-template-columns: 1fr; }
  .agency { grid-template-columns: 1fr; }

  .contact__fields { grid-template-columns: 1fr; }

  .footer__meta { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer__col:first-child { grid-column: 1 / -1; }
  .footer__col--label { justify-items: start; text-align: left; }
}

@media (max-width: 560px) {
  .stats { grid-template-columns: 1fr; }
  .process__steps { grid-template-columns: 1fr; }
  .process__rule { display: none; }
  .step { grid-template-columns: 72px 1fr; column-gap: 16px; }
  .step__num { grid-row: span 2; font-size: 3rem; }
  .poem { font-size: 0.625rem; letter-spacing: 0.14em; }
  .footer__legal { flex-direction: column; }
  .rail__controls { display: none; }
  .board { --cell: calc((100vw - var(--gutter) * 2 - 36px - 15 * 3px) / 16); padding: 18px; }
  .board__status { display: none; }
}

/* The smallest phones keep the logomark and the CTA; the wordmark steps aside. */
@media (max-width: 359px) {
  .nav__logotype { display: none; }
}

@media (hover: none) {
  .cursor,
  .peek { display: none; }
  .talent__name { color: var(--fg); }
}
