/* ============================================================
   STUDIO
   Light, editorial base. Video panels are the one dark element —
   and they carry the most detail: gradient rims, player chrome,
   grain, vignette, and floor glow. Everything else stays quiet.
   ============================================================ */

:root {
  /* Base */
  --color-bg: #FFFFFF;
  --color-bg-alt: #F7F7F8;

  /* Text */
  --color-text-primary: #0A0A0A;
  --color-text-muted: #6B7280;

  /* Accents */
  --color-accent-blue: #2563EB;
  --color-accent-green: #16A34A;

  /* Video / dark panels */
  --color-panel-dark: #0A0A0A;
  --color-panel-dark-alt: #111214;

  /* Borders */
  --color-border: #E5E7EB;
  --color-border-soft: #EEEFF1;

  /* Type */
  --font-display: "Geist", "Inter Tight", -apple-system, "Inter", "Helvetica Neue", sans-serif;
  --font-body: "Inter", -apple-system, "Helvetica Neue", sans-serif;

  /* Layout */
  --gutter: clamp(20px, 5.5vw, 80px);
  --max-w: 1440px;
  --nav-h: 74px;
  --radius: 16px;

  /* Motion */
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  /* `clip` (not `hidden`) — no scroll container, so position: fixed nav still works */
  overflow-x: clip;
}

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text-primary);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.62;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.028em;
  line-height: 1.03;
  margin: 0;
}

p { margin: 0; }
ol, ul { margin: 0; padding: 0; list-style: none; }
dl, dd { margin: 0; }
img, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; }

:focus-visible {
  outline: 2px solid var(--color-accent-blue);
  outline-offset: 4px;
  border-radius: 6px;
}

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

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 300;
  background: #fff;
  padding: 12px 18px;
  border: 1px solid var(--color-border);
}
.skip-link:focus { left: var(--gutter); top: 12px; }

/* ============================================================
   TOPOGRAPHY
   "Parvat" is a mountain, so the page sits on an elevation map.
   Real contours, generated by scripts/make-contours.js.

   Held at very low opacity and behind everything — it should register
   as texture you notice on the second look, never as a pattern competing
   with the footage. Sections that want it opt in with .has-contours.
   ============================================================ */
.has-contours { position: relative; isolation: isolate; }

.has-contours::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: url("assets/contours.svg");
  background-repeat: no-repeat;
  background-position: center var(--contour-shift, 0px);
  background-size: cover;
  color: var(--color-accent-blue);
  opacity: var(--contour-strength, 0.055);
  pointer-events: none;
  /* Fade at the edges so it never collides with a section boundary */
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 18%, #000 82%, transparent);
  mask-image: linear-gradient(to bottom, transparent, #000 18%, #000 82%, transparent);
}

/* The studio section is dense with text, so the terrain steps well back
   there — it was reading as noise behind the copy. */
.about.has-contours { --contour-strength: 0.022; }
.testimonials.has-contours { --contour-strength: 0.035; }

/* Ridge line: a single contour that draws itself in as the page scrolls,
   pinned under the nav. The "leading line" that tracks progress. */
.ridge {
  position: fixed;
  top: var(--nav-h);
  left: 0;
  right: 0;
  height: 2px;
  z-index: 199;
  pointer-events: none;
  background: linear-gradient(90deg, var(--color-accent-blue), var(--color-accent-green));
  transform: scaleX(var(--scroll-progress, 0));
  transform-origin: left center;
  opacity: 0.9;
}

/* ---------- small caps label ---------- */
.micro {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-text-primary);
  display: flex;
  align-items: center;
  gap: 12px;
}
.micro--muted { color: var(--color-text-muted); }

.micro__num {
  font-variant-numeric: tabular-nums;
  color: var(--color-accent-blue);
}

/* ============================== NAV ============================== */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 200;
  height: var(--nav-h);
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background 300ms var(--ease), border-color 300ms var(--ease),
              backdrop-filter 300ms var(--ease);
}

.nav.is-scrolled,
.nav--solid {
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom-color: var(--color-border);
}

.nav__inner {
  max-width: var(--max-w);
  height: 100%;
  margin-inline: auto;
  padding-inline: var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

/* PLACEHOLDER WORDMARK — text stand-in until the identity exists */
.wordmark {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.2em;
}

/* A peak, not a square — the studio is named after a mountain.
   Drawn as a clipped triangle so it stays crisp at any size. */
/* Logo is a plain image (works even when the page is opened straight from
   disk, where CSS masks are blocked). Over the dark hero it is flipped to
   white with a filter. */
.wordmark__logo {
  display: block;
  height: 30px;
  width: auto;
  transition: filter 300ms var(--ease);
}
.page-home .nav:not(.is-scrolled) .wordmark__logo { filter: brightness(0) invert(1); }

/* Home: nav hidden while the hero film is on screen, slides in after it */
.nav { transition: background 300ms var(--ease), border-color 300ms var(--ease),
                   backdrop-filter 300ms var(--ease), transform 450ms var(--ease-out),
                   opacity 450ms var(--ease-out); }
.page-home .nav.is-hero {
  opacity: 0;
  transform: translateY(-100%);
  pointer-events: none;
}
.wordmark { color: var(--color-text-primary); transition: color 300ms var(--ease); }
@media (max-width: 760px) { .wordmark__logo { height: 24px; } }

.wordmark__mark {
  width: 14px;
  height: 11px;
  background: linear-gradient(135deg, var(--color-accent-blue), var(--color-accent-green));
  clip-path: polygon(50% 0%, 100% 100%, 72% 100%, 50% 52%, 28% 100%, 0% 100%);
}

.nav__links { display: flex; align-items: center; gap: clamp(20px, 3vw, 38px); }

.nav__link {
  position: relative;
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text-muted);
  transition: color 180ms var(--ease);
}
.nav__link::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -6px;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 300ms var(--ease);
}
.nav__link:hover { color: var(--color-text-primary); }
.nav__link:hover::after { transform: scaleX(1); }
.nav__link.is-active { color: var(--color-accent-blue); }
.nav__link--cta { color: var(--color-accent-blue); }

/* ============================================================
   VIDEO PANELS — the detailed part of the page
   Structure everywhere:
     [host]  .reel / .tile / .case__panel / .still__panel
       video
       .panel-fallback   (dark gradient, shows if source is missing)
       .grain            (film grain + vignette + scanline)
       ::before          (gradient rim, blue -> green)
       ::after           (top sheen)
   ============================================================ */

.reel, .tile, .case__panel, .still__panel {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--color-panel-dark);
  isolation: isolate;
}

/* Gradient rim — sits above the footage as a 1px inner hairline */
.reel::before, .tile::before, .case__panel::before, .still__panel::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 4;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(140deg,
    rgba(37, 99, 235, 0.55) 0%,
    rgba(255, 255, 255, 0.14) 32%,
    rgba(255, 255, 255, 0.04) 58%,
    rgba(22, 163, 74, 0.45) 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  pointer-events: none;
  opacity: 0.85;
  transition: opacity 400ms var(--ease);
}

.tile:hover::before,
.tile.is-active::before,
.case__panel:hover::before { opacity: 1; }

/* Top sheen — a soft light source across the upper edge */
.reel::after, .tile::after, .case__panel::after {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 45%;
  z-index: 3;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.09), transparent);
  pointer-events: none;
  mix-blend-mode: soft-light;
}

.reel__video, .tile__video, .panel__video {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/*
  PLACEHOLDER PANEL — under every <video>. If a source is missing or slow this
  is what shows, so the layout never breaks. It also animates, so an empty
  panel still reads as a video container rather than a dead box.
*/
.panel-fallback {
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(120% 80% at 25% 15%, rgba(37, 99, 235, 0.22), transparent 60%),
    radial-gradient(110% 90% at 80% 85%, rgba(22, 163, 74, 0.16), transparent 62%),
    linear-gradient(135deg, var(--color-panel-dark) 0%, var(--color-panel-dark-alt) 50%, var(--color-panel-dark) 100%);
  background-size: 200% 200%, 200% 200%, 100% 100%;
  animation: drift 18s var(--ease) infinite alternate;
}

@keyframes drift {
  from { background-position: 0% 50%, 100% 50%, 0 0; }
  to   { background-position: 100% 50%, 0% 50%, 0 0; }
}

/* Grain + vignette + faint scanline — gives the footage weight */
.grain {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background-image:
    radial-gradient(130% 105% at 50% 50%, transparent 52%, rgba(0, 0, 0, 0.5) 100%),
    repeating-linear-gradient(to bottom, rgba(255, 255, 255, 0.022) 0 1px, transparent 1px 3px),
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='140' height='140'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/><feColorMatrix type='saturate' values='0'/></filter><rect width='140' height='140' filter='url(%23n)' opacity='0.5'/></svg>");
  opacity: 0.5;
  mix-blend-mode: overlay;
}

/* ---------- player chrome (Runway-ish precision, Linear-ish restraint) ---------- */
/* Above .tile__meta (z 6) so the scrub line stays readable over the gradient */
.chrome {
  position: absolute;
  inset: 0;
  z-index: 7;
  pointer-events: none;
  padding: clamp(14px, 1.6vw, 22px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.62);
  font-variant-numeric: tabular-nums;
}

.reel .chrome { justify-content: flex-end; }

.chrome__row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }

/* No backdrop-filter here on purpose. Each one forces its own compositing
   layer plus a backdrop snapshot, and there are three per panel — eighteen
   on the work index alone. A slightly more opaque background reads the same
   and costs nothing. */
.chrome__tag {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 9px;
  border-radius: 6px;
  background: rgba(10, 10, 10, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.11);
}

/* Live dot — the one place a pulse earns its keep */
.chrome__dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--color-accent-green);
  box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.55);
  animation: pulse 2.4s var(--ease) infinite;
}

@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.5); }
  70%  { box-shadow: 0 0 0 7px rgba(22, 163, 74, 0); }
  100% { box-shadow: 0 0 0 0 rgba(22, 163, 74, 0); }
}

/* Corner brackets — framing marks, not decoration */
.chrome__corner {
  position: absolute;
  width: 16px;
  height: 16px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  opacity: 0;
  transition: opacity 400ms var(--ease);
}
.chrome__corner--tl { top: 12px; left: 12px; border-right: 0; border-bottom: 0; }
.chrome__corner--tr { top: 12px; right: 12px; border-left: 0; border-bottom: 0; }
.chrome__corner--bl { bottom: 12px; left: 12px; border-right: 0; border-top: 0; }
.chrome__corner--br { bottom: 12px; right: 12px; border-left: 0; border-top: 0; }

.reel .chrome__corner,
.case__panel .chrome__corner,
.tile:hover .chrome__corner,
.tile.is-active .chrome__corner { opacity: 1; }

/* Thin scrub line at the base of the panel */
.chrome__scrub {
  position: relative;
  height: 2px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.14);
  overflow: hidden;
  margin-top: 10px;
}

.chrome__scrub-fill {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--color-accent-blue), var(--color-accent-green));
  transform-origin: left;
  transform: scaleX(0);
  animation: scrub 9s linear infinite;
}

@keyframes scrub {
  from { transform: scaleX(0); }
  to   { transform: scaleX(1); }
}

/* ============================== HERO ============================== */
.hero {
  position: relative;
  padding: calc(var(--nav-h) + clamp(18px, 3vw, 34px)) var(--gutter) clamp(60px, 8vw, 110px);
}

/* Ambient blue→green glow bleeding out from behind the reel */
.hero__glow {
  position: absolute;
  left: 50%;
  top: calc(var(--nav-h) - 20px);
  transform: translateX(-50%);
  width: min(100%, 1700px);
  aspect-ratio: 16 / 8;
  background:
    radial-gradient(52% 60% at 22% 34%, rgba(37, 99, 235, 0.34), transparent 70%),
    radial-gradient(52% 60% at 80% 66%, rgba(22, 163, 74, 0.26), transparent 70%);
  filter: blur(80px);
  opacity: 0.85;
  pointer-events: none;
  animation: breathe 14s var(--ease) infinite alternate;
}

@keyframes breathe {
  from { opacity: 0.62; transform: translateX(-50%) scale(1); }
  to   { opacity: 0.95; transform: translateX(-50%) scale(1.06); }
}

.hero__top {
  max-width: var(--max-w);
  margin: 0 auto clamp(16px, 2vw, 24px);
  display: flex;
  justify-content: space-between;
  gap: 20px;
  position: relative;
  z-index: 2;
}

/* Full-bleed reel: escapes the hero gutters, runs edge to edge, sits under the nav. */
.reel {
  position: relative;
  z-index: 1;
  width: 100vw;
  max-width: none;
  margin-inline: calc(50% - 50vw);
  margin-top: calc(-1 * (var(--nav-h) + clamp(18px, 3vw, 34px)));
  /* Fills the whole first screen; the rest of the page starts below the fold. */
  aspect-ratio: auto;
  height: 100vh;
  height: 100svh;
  min-height: 480px;
  border-radius: 0;
  box-shadow: none;
}
.reel::before { display: none; }
/* Blurred copy of the final frame behind the film. Only shows on tall,
   narrow screens (phones) where the film is letterboxed to keep the logo whole. */
.reel::after {
  content: "";
  position: absolute;
  inset: -40px;
  height: auto;
  z-index: 0;
  background: url("assets/video/hero-reel-end.jpg") center / cover no-repeat;
  filter: blur(28px) brightness(0.7);
  mix-blend-mode: normal;
  display: none;
}
/* Scroll cue at the foot of the hero */
.reel__cue {
  position: absolute;
  left: 50%;
  bottom: clamp(18px, 3vh, 32px);
  z-index: 5;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.85);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}
.reel__cue::after {
  content: "";
  width: 1px;
  height: 28px;
  background: linear-gradient(to bottom, rgba(255,255,255,0.9), transparent);
  animation: cue 2.2s var(--ease) infinite;
  transform-origin: top;
}
@keyframes cue {
  0% { transform: scaleY(0); opacity: 1; }
  60% { transform: scaleY(1); opacity: 1; }
  100% { transform: scaleY(1); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) { .reel__cue::after { animation: none; } }

/* Sound toggle, bottom right of the hero */
.reel__sound {
  position: absolute;
  right: var(--gutter);
  bottom: clamp(18px, 3vh, 32px);
  z-index: 5;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px 9px 11px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  background: rgba(10, 10, 10, 0.28);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  color: #fff;
  font: inherit;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 200ms var(--ease), border-color 200ms var(--ease);
}
.reel__sound:hover { background: rgba(10, 10, 10, 0.45); border-color: rgba(255, 255, 255, 0.6); }
.reel__sound:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.reel__sound-icon { width: 16px; height: 16px; }
.reel__sound-icon--on { display: none; }
.reel__sound[aria-pressed="true"] .reel__sound-icon--on { display: block; }
.reel__sound[aria-pressed="true"] .reel__sound-icon--off { display: none; }
@media (max-width: 760px) { .reel__sound-label { display: none; } .reel__sound { padding: 10px; } }
.hero__top, .reel .chrome { display: none; }
/* soft top scrim so the light nav stays legible over any footage */
.reel .grain::after { content: ""; position: absolute; inset: 0 0 auto 0; height: 140px;
  background: linear-gradient(to bottom, rgba(0,0,0,0.45), transparent); pointer-events: none; }

/* Over the dark reel the nav reads light until the page scrolls */
.page-home .nav:not(.is-scrolled) .wordmark,
.page-home .nav:not(.is-scrolled) .nav__link { color: #fff; }
.page-home .nav:not(.is-scrolled) .nav__link--cta { color: #fff; }

/* Floor glow — the reel reads as lit, sitting above the page */
.hero::after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: clamp(30px, 5vw, 70px);
  width: min(70%, 900px);
  height: 120px;
  background: radial-gradient(60% 100% at 50% 0%, rgba(37, 99, 235, 0.16), transparent 70%);
  filter: blur(40px);
  pointer-events: none;
}

.hero__caption {
  position: relative;
  z-index: 2;
  max-width: var(--max-w);
  margin: clamp(36px, 5vw, 68px) auto 0;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: clamp(24px, 5vw, 80px);
  align-items: end;
}

.hero__line {
  font-size: clamp(40px, 7vw, 96px);
  letter-spacing: -0.035em;
  line-height: 0.98;
  font-weight: 600;
}

.hero__aside { padding-bottom: 8px; }

.hero__sub {
  font-size: 17px;
  color: var(--color-text-muted);
  max-width: 38ch;
}

.arrow-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 22px;
  font-size: 15px;
  font-weight: 500;
  color: var(--color-accent-blue);
}
.arrow-link__arrow { transition: transform 300ms var(--ease); }
.arrow-link:hover .arrow-link__arrow { transform: translateX(5px); }

/* ---------- masked line reveal ---------- */
/* `overflow: hidden` clips to the line box, and the display headings run a
   line-height below 1 — so descenders (g, y, p) fall outside it and get cut.
   Grow the clip box downwards, then pull the next line back up by the same
   amount: the descender shows and the line spacing is untouched. The start
   offset has to clear the extra padding too, or the hidden line peeks out of
   the bottom of its own mask before it is revealed. */
.mask {
  display: block;
  overflow: hidden;
  padding-bottom: 0.18em;
  margin-bottom: -0.18em;
}
.mask__i { display: block; }

.js .mask__i {
  transform: translateY(calc(105% + 0.18em));
  opacity: 0;
  transition: transform 900ms var(--ease-out), opacity 700ms var(--ease-out);
}
.js .mask__i.is-visible { transform: none; opacity: 1; }

/* ============================== TICKER ============================== */
.ticker {
  border-block: 1px solid var(--color-border);
  padding: 16px 0;
  overflow: hidden;
  background: var(--color-bg);
}

.ticker__track {
  display: flex;
  width: max-content;
  animation: marquee 76s linear infinite;
}
.ticker:hover .ticker__track { animation-play-state: paused; }

@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

.ticker__group {
  display: flex;
  align-items: center;
  gap: 42px;
  padding-right: 42px;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  white-space: nowrap;
}

.ticker__dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--color-accent-green);
  flex: none;
}

/* ============================== SECTION HEADS ============================== */
.section-head { max-width: 900px; }

.section-title {
  margin-top: 26px;
  font-size: clamp(30px, 4.2vw, 56px);
  letter-spacing: -0.03em;
  line-height: 1.04;
}

.section-note {
  margin-top: 20px;
  max-width: 52ch;
  color: var(--color-text-muted);
  font-size: 16px;
}

/* ============================== WORK CAROUSEL ============================== */
.work { padding: clamp(70px, 10vw, 150px) 0 clamp(60px, 9vw, 120px); }

.carousel { margin-top: clamp(40px, 6vw, 76px); }

.carousel__viewport {
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -ms-overflow-style: none;
  cursor: grab;
}
.carousel__viewport::-webkit-scrollbar { display: none; }
.carousel__viewport.is-dragging { cursor: grabbing; scroll-snap-type: none; }

.carousel__track {
  display: flex;
  gap: clamp(18px, 2.4vw, 34px);
  padding-inline: var(--gutter);
  padding-block: 8px 4px;
}

.slide {
  flex: 0 0 min(70vw, 1000px);
  scroll-snap-align: start;
}

.tile {
  display: block;
  aspect-ratio: 16 / 9;
  box-shadow: 0 24px 60px -34px rgba(10, 10, 10, 0.42);
  transform: translateZ(0);
  transition: transform 600ms var(--ease-out), box-shadow 600ms var(--ease-out);
}

/* Non-centred slides sit back — the active one is the subject */
.slide:not(.is-active) .tile { opacity: 0.55; }
.slide .tile { transition: transform 600ms var(--ease-out), box-shadow 600ms var(--ease-out), opacity 600ms var(--ease); }

.tile:hover,
.tile:focus-visible {
  transform: translateY(-6px);
  box-shadow:
    0 50px 100px -40px rgba(10, 10, 10, 0.55),
    0 60px 120px -70px rgba(37, 99, 235, 0.5);
  opacity: 1;
}

.tile__video {
  transform: scale(1.02);
  transition: transform 1200ms var(--ease-out), filter 600ms var(--ease);
  filter: saturate(0.86) contrast(1.02);
}

.tile:hover .tile__video,
.tile.is-active .tile__video {
  transform: scale(1.055);
  filter: saturate(1) contrast(1.04);
}

/* Meta appears on hover / focus / when centred — footage stays clear at rest */
.tile__meta {
  position: absolute;
  z-index: 6;
  left: 0; right: 0; bottom: 0;
  padding: clamp(22px, 3vw, 40px);
  padding-bottom: clamp(48px, 5vw, 66px);
  background: linear-gradient(to top, rgba(10, 10, 10, 0.92) 8%, rgba(10, 10, 10, 0.4) 55%, transparent);
  color: #fff;
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 420ms var(--ease), transform 520ms var(--ease-out);
}

.tile:hover .tile__meta,
.tile:focus-visible .tile__meta,
.tile.is-active .tile__meta { opacity: 1; transform: none; }

.tile__title {
  font-size: clamp(24px, 2.8vw, 40px);
  color: #fff;
  letter-spacing: -0.03em;
}

.tile__desc {
  margin-top: 10px;
  font-size: 15px;
  color: rgba(255, 255, 255, 0.7);
  max-width: 46ch;
}

.tile__view {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #fff;
  padding-bottom: 4px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.28);
}

/* Tags — green as a secondary accent only */
.tags {
  position: absolute;
  z-index: 6;
  top: clamp(16px, 2vw, 24px);
  right: clamp(16px, 2vw, 24px);
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 420ms var(--ease), transform 420ms var(--ease);
}

.tile:hover .tags,
.tile:focus-visible .tags,
.tile.is-active .tags { opacity: 1; transform: none; }

.tag {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 6px 11px;
  border-radius: 999px;
  color: #86EFAC;
  border: 1px solid rgba(22, 163, 74, 0.45);
  background: rgba(22, 163, 74, 0.22);
}

/* Light variant for use on white (case study masthead) */
.tags--static { position: static; opacity: 1; transform: none; margin-top: 28px; }
.tag--light {
  color: var(--color-accent-green);
  background: rgba(22, 163, 74, 0.07);
  border-color: rgba(22, 163, 74, 0.28);
}

.slide__foot {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-top: 18px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  font-variant-numeric: tabular-nums;
}
.slide.is-active .slide__num { color: var(--color-accent-blue); }

/* ---------- carousel bar ---------- */
.carousel__bar {
  display: flex;
  align-items: center;
  gap: clamp(20px, 4vw, 44px);
  margin-top: clamp(30px, 4vw, 48px);
}

.carousel__count {
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.1em;
  font-variant-numeric: tabular-nums;
  flex: none;
}
.carousel__count-sep { color: var(--color-border); }
[data-carousel-total] { color: var(--color-text-muted); }

.carousel__progress {
  flex: 1;
  height: 1px;
  background: var(--color-border);
  position: relative;
  overflow: hidden;
}

.carousel__progress-fill {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, var(--color-accent-blue), var(--color-accent-green));
  transform-origin: left;
  transform: scaleX(0.12);
  transition: transform 400ms var(--ease-out);
}

.carousel__nav { display: flex; gap: 10px; flex: none; }

.cbtn {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid var(--color-border);
  background: var(--color-bg);
  color: var(--color-text-primary);
  font-size: 15px;
  cursor: pointer;
  transition: background 240ms var(--ease), border-color 240ms var(--ease),
              color 240ms var(--ease), transform 240ms var(--ease);
}
.cbtn:hover:not(:disabled) {
  background: var(--color-text-primary);
  border-color: var(--color-text-primary);
  color: #fff;
}
.cbtn:active:not(:disabled) { transform: scale(0.94); }
.cbtn:disabled { opacity: 0.3; cursor: default; }

/* ---------- custom cursor over the carousel ---------- */
.cursor {
  position: fixed;
  top: 0; left: 0;
  z-index: 250;
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: rgba(10, 10, 10, 0.82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  display: grid;
  place-items: center;
  pointer-events: none;
  opacity: 0;
  scale: 0.6;
  transition: opacity 260ms var(--ease), scale 260ms var(--ease-out);
}
.cursor.is-on { opacity: 1; scale: 1; }

.cursor__label {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #fff;
}

/* ============================== ABOUT ============================== */
.about {
  background: var(--color-bg-alt);
  border-block: 1px solid var(--color-border);
  padding: clamp(80px, 12vw, 180px) 0;
}

.statement {
  margin-top: clamp(30px, 4vw, 52px);
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(20px, 2.5vw, 34px);
  line-height: 1.28;
  letter-spacing: -0.022em;
  max-width: 32ch;
}

.about__cols {
  margin-top: clamp(48px, 7vw, 96px);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: clamp(28px, 4vw, 64px);
  max-width: 1000px;
}

.about__body {
  margin-top: 16px;
  color: var(--color-text-muted);
  font-size: 16px;
}

/* PLACEHOLDER FIGURES */
.stats {
  margin-top: clamp(56px, 8vw, 110px);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: clamp(20px, 3vw, 40px);
  border-top: 1px solid var(--color-border);
  padding-top: clamp(28px, 4vw, 44px);
}

.stat__num {
  margin-top: 10px;
  font-family: var(--font-display);
  font-size: clamp(38px, 5vw, 68px);
  font-weight: 600;
  letter-spacing: -0.045em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.stat__plus {
  font-size: 0.4em;
  vertical-align: super;
  color: var(--color-accent-blue);
  letter-spacing: 0;
  margin-left: 2px;
}

/* ---------- client logos ----------
   Trimmed, background-removed and height-normalised at build time, then
   boxed here so a long wordmark and a stacked mark occupy comparable space.

   Interaction is a spotlight: the hovered tile lifts and goes full colour
   while the rest of the row recedes. Restrained enough not to fight the
   reels, but the row is no longer inert. */
.clients-block { margin-top: clamp(56px, 8vw, 110px); }

/* Always one row. Eight fixed columns rather than auto-fit, which was
   wrapping the last two. Below the width where eight still read clearly it
   becomes a horizontal scroller, and the spotlight scrolls the lit logo
   into view — so the row moves on its own rather than hiding anything. */
.clients {
  margin-top: 26px;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(112px, 1fr);
  gap: clamp(6px, 0.9vw, 14px);
  border-top: 1px solid var(--color-border);
  padding-top: clamp(26px, 3.4vw, 40px);
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  scroll-behavior: smooth;
}
.clients::-webkit-scrollbar { display: none; }

/* Rows rather than free-flowing children, so the tile row and the name row
   each share one baseline right across the strip. */
.client {
  display: grid;
  grid-template-rows: auto auto;
  justify-items: center;
  align-content: start;
  gap: 12px;
  scroll-snap-align: center;
}

/* Staggered entrance runs through the shared [data-reveal] system rather
   than a keyframe animation. An animation that never fires leaves the whole
   row invisible; the reveal path has an IntersectionObserver plus a timed
   fallback, so the logos always end up on screen. --i sets the delay. */
.js .client[data-reveal] { transition-delay: calc(var(--i, 0) * 55ms) !important; }

/* Fixed height, logo centred inside it. Without this the tile grows to fit
   each logo — NYU is a tall stacked mark, Monique Rhodes is a flat wordmark —
   so the names underneath ended up on five different baselines. */
.client__tile {
  display: grid;
  place-items: center;
  width: 100%;
  height: 76px;
  padding: 8px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  transition: transform 420ms var(--ease-out), border-color 320ms var(--ease),
              background 320ms var(--ease), box-shadow 420ms var(--ease-out);
}

.client__tile img {
  height: auto;
  width: auto;
  max-height: 38px;
  max-width: 96px;
  object-fit: contain;
  /* Full colour at rest — no greyscale, nothing to "activate" */
  opacity: 0.92;
  transition: opacity 380ms var(--ease);
}
.client__tile:hover img { opacity: 1; }

/* All of them lit, all the time. The walking spotlight highlighted one and
   left seven dimmed, which undersold the list — these are the credential,
   so they all read at once. Hover just lifts the one you point at. */
.client__tile:hover,
.client__tile:focus-visible {
  transform: translateY(-5px);
  border-color: var(--color-border);
  background: var(--color-bg);
  box-shadow: 0 18px 34px -22px rgba(10, 10, 10, 0.4);
}

/* Names always shown — they are part of the credential, not a reward
   for hovering. Muted so the logos stay the thing you read. */
.client__name {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  text-align: center;
  transition: color 320ms var(--ease);
}
.client:hover .client__name { color: var(--color-text-primary); }

@media (prefers-reduced-motion: reduce) {
  .js .client { opacity: 1; transform: none; }
  .client__tile:hover { transform: none; }
}

/* Capabilities — a plain list, not icon cards.
   Tightened: the old 120px top margin left the logo row stranded. */
.caps-block { margin-top: clamp(38px, 4.5vw, 64px); }

.caps { margin-top: 24px; border-top: 1px solid var(--color-border); }

.caps__item {
  display: grid;
  grid-template-columns: 60px minmax(0, 1fr) minmax(0, 1.1fr);
  align-items: baseline;
  gap: 16px;
  padding: clamp(20px, 2.4vw, 30px) 0;
  border-bottom: 1px solid var(--color-border);
  transition: padding-left 400ms var(--ease), border-color 400ms var(--ease);
}
.caps__item:hover { padding-left: 14px; border-bottom-color: var(--color-accent-green); }

.caps__num {
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--color-text-muted);
  font-variant-numeric: tabular-nums;
}

.caps__name {
  font-family: var(--font-display);
  font-size: clamp(19px, 2.2vw, 28px);
  font-weight: 500;
  letter-spacing: -0.02em;
}

.caps__note { font-size: 15px; color: var(--color-text-muted); }

/* ============================================================
   TESTIMONIALS
   One featured quote leading, four alongside it. The lead carries the
   strongest line at display scale; the rest sit as a quieter row so the
   section has a clear entry point instead of five equal blocks.
   ============================================================ */
.testimonials {
  padding: clamp(80px, 12vw, 170px) 0;
  background: var(--color-bg-alt);
  border-block: 1px solid var(--color-border);
}

.tstm__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.testimonials .section-title { margin-top: 26px; max-width: 14ch; }

.tcards {
  margin-top: clamp(44px, 6vw, 76px);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(14px, 1.6vw, 22px);
}

.tcard {
  display: flex;
  flex-direction: column;
  padding: clamp(22px, 2.2vw, 30px);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 14px;
  transition: transform 420ms var(--ease-out), box-shadow 420ms var(--ease-out),
              border-color 320ms var(--ease);
}

.tcard:hover {
  transform: translateY(-4px);
  border-color: #D8DCE2;
  box-shadow: 0 22px 44px -28px rgba(10, 10, 10, 0.34);
}

/* The lead: full width, display scale, and a hairline of accent down
   the left edge so it reads as the pulled quote. */
.tcard--feature {
  grid-column: 1 / -1;
  padding: clamp(30px, 3.4vw, 48px);
  border-left: 3px solid transparent;
  border-image: linear-gradient(180deg, var(--color-accent-blue), var(--color-accent-green)) 1;
  border-radius: 0 14px 14px 0;
}

.tcard__stars {
  font-size: 13px;
  letter-spacing: 0.18em;
  color: var(--color-accent-green);
}
.tcard--feature .tcard__stars { font-size: 16px; }

.tcard__quote {
  margin: 16px 0 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(15px, 1.05vw, 16px);
  line-height: 1.58;
  letter-spacing: -0.008em;
  flex: 1;
}

.tcard--feature .tcard__quote {
  margin-top: 20px;
  font-weight: 500;
  font-size: clamp(21px, 2.5vw, 34px);
  line-height: 1.28;
  letter-spacing: -0.025em;
  max-width: 30ch;
}

/* The highlighted phrase — the line a skimmer should catch. A tinted
   underline rather than a block of colour, so it stays quiet on the page. */
.hl {
  background: linear-gradient(180deg, transparent 62%, rgba(22, 163, 74, 0.24) 62%);
  color: inherit;
  padding: 0 1px;
}
.tcard--feature .hl {
  background: linear-gradient(180deg, transparent 66%, rgba(22, 163, 74, 0.3) 66%);
}

.tcard__foot {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: clamp(20px, 2.4vw, 30px);
  padding-top: 18px;
  border-top: 1px solid var(--color-border);
}
.tcard--feature .tcard__foot { border-top-color: #DDE1E6; }

/* PLACEHOLDER AVATAR — dark disc matching the video treatment */
.tcard__avatar {
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background:
    radial-gradient(120% 120% at 30% 20%, rgba(37, 99, 235, 0.3), transparent 60%),
    linear-gradient(140deg, var(--color-panel-dark), var(--color-panel-dark-alt));
}
.tcard--feature .tcard__avatar { width: 52px; height: 52px; }
.tcard__photo { object-fit: cover; background: var(--color-panel-dark); }

.tcard__silhouette { position: relative; width: 46%; height: 46%; }
.tcard__silhouette::before {
  content: "";
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 42%; aspect-ratio: 1;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.34);
}
.tcard__silhouette::after {
  content: "";
  position: absolute;
  bottom: 0; left: 50%;
  transform: translateX(-50%);
  width: 82%; height: 44%;
  border-radius: 999px 999px 0 0;
  background: rgba(255, 255, 255, 0.34);
}

.tcard__who {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.01em;
}
.tcard--feature .tcard__who { font-size: 17px; }

.tcard__project {
  margin-top: 2px;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

/* ---- Video testimonial card: same card as the others, with the film
   where the quote would be ---- */
.tvideo {
  position: relative;
  display: block;
  width: 100%;
  margin: 18px 0 0;
  aspect-ratio: 4 / 5;
  padding: 0;
  border: 0;
  border-radius: 10px;
  overflow: hidden;
  background: var(--color-panel-dark);
  cursor: pointer;
  color: #fff;
}
.tvideo__poster, .tvideo video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: 50% 30%;
  display: block;
}
.tvideo video { object-fit: contain; background: #000; }
.tvideo__play {
  position: absolute; left: 50%; top: 50%;
  z-index: 2;
  width: 56px; height: 56px;
  margin: -28px 0 0 -28px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: #0a0a0a;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
  transition: transform 300ms var(--ease-out);
}
.tvideo__play svg { width: 22px; height: 22px; margin-left: 3px; }
.tvideo:hover .tvideo__play, .tvideo:focus-visible .tvideo__play { transform: scale(1.08); }
.tvideo:focus-visible { outline: 2px solid var(--color-accent-blue); outline-offset: 3px; }
.tvideo__len {
  position: absolute; right: 10px; bottom: 10px; z-index: 2;
  padding: 3px 8px; border-radius: 999px;
  background: rgba(0,0,0,0.55);
  font-size: 11px; letter-spacing: 0.08em;
}
.tvideo.is-playing { cursor: default; }
.tvideo.is-playing .tvideo__play, .tvideo.is-playing .tvideo__len,
.tvideo.is-playing .tvideo__poster { display: none; }
/* Featured video testimonial: film on the side, quote beside it */
.tcard--feature-video {
  display: grid;
  grid-template-columns: minmax(200px, 300px) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 56px);
  align-items: center;
}
.tcard--feature-video .tvideo { margin: 0; aspect-ratio: 9 / 16; }
.tcard--feature-video .tvideo video { object-fit: cover; }
.tcard__body { display: flex; flex-direction: column; min-width: 0; }
@media (max-width: 760px) {
  .tcard--feature-video { grid-template-columns: minmax(0, 1fr); }
  .tcard--feature-video .tvideo { max-width: 320px; width: 100%; justify-self: center; }
}

@media (max-width: 1100px) { .tcards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px)  { .tcards { grid-template-columns: minmax(0, 1fr); } }

@media (prefers-reduced-motion: reduce) {
  .tcard:hover { transform: none; }
}

/* ============================== CONTACT ============================== */
.contact { padding: clamp(80px, 12vw, 180px) 0; }

.contact__title {
  margin-top: clamp(26px, 3vw, 40px);
  font-size: clamp(38px, 6.4vw, 92px);
  letter-spacing: -0.035em;
  line-height: 0.98;
}

.contact__grid {
  margin-top: clamp(48px, 7vw, 90px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: clamp(40px, 6vw, 90px);
  align-items: start;
}

.contact__sub { color: var(--color-text-muted); max-width: 40ch; }

.contact__email {
  display: inline-block;
  margin-top: 28px;
  font-family: var(--font-display);
  font-size: clamp(20px, 2.4vw, 30px);
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--color-accent-blue);
  border-bottom: 1px solid transparent;
  transition: border-color 260ms var(--ease);
}
.contact__email:hover { border-bottom-color: currentColor; }

.contact__meta {
  margin-top: clamp(40px, 5vw, 64px);
  display: grid;
  gap: 18px;
  border-top: 1px solid var(--color-border);
  padding-top: 26px;
}
.contact__meta div { display: flex; justify-content: space-between; gap: 16px; }
.contact__meta dd { font-size: 15px; }

/* PLACEHOLDER FORM */
.form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.form__row { display: grid; gap: 9px; }
.form__row--full { grid-column: 1 / -1; }

.form__label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.form__input {
  font: inherit;
  font-size: 16px;
  color: var(--color-text-primary);
  background: var(--color-bg);
  padding: 14px 16px;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  transition: border-color 200ms var(--ease), box-shadow 200ms var(--ease);
  resize: vertical;
  width: 100%;
}
.form__input::placeholder { color: #9CA3AF; }
.form__input:focus {
  outline: none;
  border-color: var(--color-accent-blue);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.form__actions { grid-column: 1 / -1; display: flex; gap: 20px; flex-wrap: wrap; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 500;
  font-size: 15px;
  color: #fff;
  background: var(--color-accent-blue);
  border: 1px solid var(--color-accent-blue);
  border-radius: 10px;
  padding: 15px 28px;
  cursor: pointer;
  transition: background 220ms var(--ease), transform 220ms var(--ease),
              box-shadow 220ms var(--ease);
}
.btn:hover {
  background: #1D4ED8;
  box-shadow: 0 14px 30px -14px rgba(37, 99, 235, 0.7);
}
.btn:active { transform: translateY(1px); }

.form__note { grid-column: 1 / -1; font-size: 14px; color: var(--color-accent-green); }

/* ============================== FOOTER ============================== */
.footer { border-top: 1px solid var(--color-border); padding: clamp(48px, 6vw, 80px) 0 40px; }

.footer__top {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 20px;
  padding-bottom: clamp(40px, 5vw, 64px);
  border-bottom: 1px solid var(--color-border);
}

.footer__wordmark { display: block; line-height: 0; }
.footer__wordmark img {
  display: block;
  width: clamp(180px, 30vw, 380px);
  height: auto;
}


.footer__bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 18px;
  padding-top: 26px;
}

.footer__links { display: flex; gap: 26px; }
.footer__links a {
  font-size: 14px;
  color: var(--color-text-muted);
  transition: color 200ms var(--ease);
}
.footer__links a:hover { color: var(--color-text-primary); }

/* ============================================================
   CASE STUDY PAGE
   ============================================================ */
.case__loading { padding: 200px var(--gutter); color: var(--color-text-muted); }

.case__head { padding: calc(var(--nav-h) + clamp(50px, 7vw, 100px)) 0 clamp(36px, 5vw, 60px); }

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-bottom: clamp(36px, 5vw, 60px);
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text-muted);
  transition: color 220ms var(--ease), gap 220ms var(--ease);
}
.back-link:hover { color: var(--color-text-primary); gap: 14px; }

.case__title {
  margin-top: 26px;
  font-size: clamp(44px, 8vw, 118px);
  letter-spacing: -0.04em;
  line-height: 0.94;
}

.case__meta-line {
  margin-top: 24px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.case__descriptor {
  margin-top: 18px;
  max-width: 48ch;
  font-size: clamp(17px, 1.4vw, 21px);
  color: var(--color-text-muted);
}

/* Unwritten copy, marked so it cannot ship unnoticed. Dashed rule only —
   deliberately not alarming, just impossible to skim past. */
.is-placeholder {
  border-left: 2px dashed var(--color-accent-green);
  padding-left: 14px;
  font-style: italic;
}

.case__hero {
  position: relative;
  padding: 0 var(--gutter) clamp(40px, 5vw, 70px);
}

.case__glow {
  position: absolute;
  left: 50%;
  top: -6%;
  transform: translateX(-50%);
  width: min(100%, 1600px);
  aspect-ratio: 16 / 8;
  background:
    radial-gradient(50% 60% at 25% 40%, rgba(37, 99, 235, 0.3), transparent 70%),
    radial-gradient(50% 60% at 78% 60%, rgba(22, 163, 74, 0.22), transparent 70%);
  filter: blur(80px);
  pointer-events: none;
  animation: breathe 14s var(--ease) infinite alternate;
}

.case__panel {
  position: relative;
  z-index: 1;
  max-width: var(--max-w);
  margin-inline: auto;
  aspect-ratio: 16 / 9;
  box-shadow:
    0 40px 90px -34px rgba(10, 10, 10, 0.45),
    0 90px 160px -80px rgba(37, 99, 235, 0.3);
}

/* ---------- spec bar ---------- */
.specs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: clamp(20px, 3vw, 40px);
  padding: clamp(28px, 3.5vw, 44px) 0;
  border-block: 1px solid var(--color-border);
}

.spec__value {
  margin-top: 10px;
  font-family: var(--font-display);
  font-size: clamp(16px, 1.5vw, 20px);
  font-weight: 500;
  letter-spacing: -0.015em;
}

/* ---------- body ---------- */
.case__section { padding: clamp(70px, 10vw, 140px) var(--gutter); }

.case__cols {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: clamp(24px, 4vw, 60px);
}
.case__cols + .case__cols { margin-top: clamp(60px, 8vw, 110px); }

.case__col-body { max-width: 66ch; }

.case__body {
  font-size: clamp(17px, 1.35vw, 20px);
  color: var(--color-text-muted);
}
.case__body + .case__body { margin-top: 22px; }

.case__approach {
  margin-top: clamp(32px, 4vw, 48px);
  padding-left: 22px;
  border-left: 2px solid var(--color-accent-green);
  font-family: var(--font-display);
  font-size: clamp(18px, 1.8vw, 24px);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.35;
}

.deliverables { border-top: 1px solid var(--color-border); }

.deliverable {
  display: flex;
  align-items: baseline;
  gap: 20px;
  padding: 18px 0;
  border-bottom: 1px solid var(--color-border);
  font-family: var(--font-display);
  font-size: clamp(16px, 1.5vw, 20px);
  font-weight: 500;
  letter-spacing: -0.015em;
  transition: padding-left 400ms var(--ease);
}
.deliverable:hover { padding-left: 12px; }

.deliverable__num {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
  color: var(--color-text-muted);
  font-variant-numeric: tabular-nums;
}

/* ---------- stills ---------- */
.case__stills {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: clamp(20px, 3vw, 40px);
  padding-bottom: clamp(70px, 10vw, 140px);
}

.still__panel { aspect-ratio: 4 / 3; box-shadow: 0 24px 60px -36px rgba(10, 10, 10, 0.4); }
.still__caption { margin-top: 16px; display: block; }

/* ---------- quote ---------- */
.case__quote-wrap { padding-bottom: clamp(70px, 10vw, 150px); }

.case__quote {
  margin: 0;
  max-width: 22ch;
  font-family: var(--font-display);
  font-size: clamp(24px, 3.6vw, 48px);
  font-weight: 500;
  line-height: 1.14;
  letter-spacing: -0.03em;
  max-width: 24ch;
}

.case__quote-attrib { margin-top: 28px; }

/* ---------- next project ---------- */
.next { border-top: 1px solid var(--color-border); }

.next__link { display: block; transition: background 400ms var(--ease); }
.next__link:hover { background: var(--color-bg-alt); }

.next__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-block: clamp(40px, 6vw, 76px);
}

.next__title {
  margin-top: 12px;
  font-family: var(--font-display);
  font-size: clamp(30px, 5vw, 68px);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1;
}

.next__arrow {
  font-size: clamp(24px, 3vw, 38px);
  color: var(--color-accent-blue);
  transition: transform 400ms var(--ease-out);
}
.next__link:hover .next__arrow { transform: translateX(14px); }

/* ---------- case CTA ---------- */
.case__cta {
  padding-block: clamp(70px, 10vw, 140px);
  border-top: 1px solid var(--color-border);
}

.case__cta-title {
  font-size: clamp(28px, 4vw, 52px);
  letter-spacing: -0.03em;
  margin-bottom: 34px;
  max-width: 18ch;
}

/* ============================================================
   WORK INDEX (work.html)
   ============================================================ */
.work-index__head { padding: calc(var(--nav-h) + clamp(50px, 7vw, 100px)) 0 clamp(40px, 5vw, 66px); }

.work-index__title {
  margin-top: 26px;
  font-size: clamp(40px, 7vw, 100px);
  letter-spacing: -0.04em;
  line-height: 0.96;
}

.work-index__note {
  margin-top: 26px;
  max-width: 46ch;
  color: var(--color-text-muted);
  font-size: clamp(16px, 1.3vw, 19px);
}

.work-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr));
  gap: clamp(30px, 4vw, 60px) clamp(20px, 2.6vw, 36px);
  padding-bottom: clamp(60px, 9vw, 120px);
}

/* Every other card drops a little — an editorial stagger, not a masonry grid */
@media (min-width: 900px) {
  .work-card:nth-child(even) { transform: translateY(clamp(28px, 4vw, 64px)); }
}

.work-card .tile { aspect-ratio: 16 / 10; }

/* Off-screen cards skip rendering, so their cover bitmaps can be dropped */
.work-card {
  content-visibility: auto;
  contain-intrinsic-size: auto 420px;
}

.work-card__foot {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  margin-top: 16px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  font-variant-numeric: tabular-nums;
}
.work-card__client { color: var(--color-text-primary); }

/* ============================================================
   CASE STUDY — CMS additions
   ============================================================ */

/* Cover image sits in the same dark panel as footage */
.case__panel--image, .case__panel--embed { aspect-ratio: 16 / 9; }

.panel__image {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.case__panel--embed { max-width: var(--max-w); margin-inline: auto; }

.panel__embed {
  position: absolute;
  inset: 0;
  z-index: 8;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ---------- click-to-load facade ----------
   Nothing loads until the button is pressed. Once live, the overlays get
   out of the way so the player's own controls stay clickable. */
.facade { position: relative; }

.facade__btn {
  position: absolute;
  inset: 0;
  z-index: 7;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  width: 100%;
  height: 100%;
  border: 0;
  background: rgba(10, 10, 10, 0.28);
  color: #fff;
  cursor: pointer;
  transition: background 300ms var(--ease);
}
.facade__btn:hover { background: rgba(10, 10, 10, 0.14); }

.facade__icon {
  width: 74px;
  height: 74px;
  border-radius: 50%;
  background: rgba(10, 10, 10, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.28);
  display: grid;
  place-items: center;
  transition: transform 300ms var(--ease-out), background 300ms var(--ease);
}
/* Play triangle, drawn rather than imported */
.facade__icon::after {
  content: "";
  border-left: 17px solid #fff;
  border-top: 11px solid transparent;
  border-bottom: 11px solid transparent;
  margin-left: 5px;
}
.facade__btn:hover .facade__icon {
  transform: scale(1.08);
  background: var(--color-accent-blue);
}

.facade__label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.5);
}

/* Local film too large to decode safely — poster only, no play control */
.film__blocked {
  position: absolute;
  z-index: 7;
  left: 0; right: 0; bottom: 0;
  padding: clamp(20px, 3vw, 34px);
  padding-bottom: clamp(46px, 5vw, 62px);
  background: linear-gradient(to top, rgba(10, 10, 10, 0.9) 10%, transparent);
  display: grid;
  gap: 6px;
  color: #fff;
}

.film__blocked-title {
  font-family: var(--font-display);
  font-size: clamp(17px, 1.8vw, 22px);
  font-weight: 500;
  letter-spacing: -0.02em;
}

.film__blocked-note {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
}

/* Once playing, hand the panel over to the player */
.facade.is-live .facade__btn,
.facade.is-live .grain,
.facade.is-live .chrome,
.facade.is-live .panel__image { display: none; }
.facade.is-live::after { display: none; }

.case__link { margin-top: 30px; }

/* ---------- gallery ---------- */
.case__gallery-wrap { padding-bottom: clamp(60px, 9vw, 120px); }

.gallery {
  margin-top: 24px;
  display: grid;
  gap: clamp(16px, 2vw, 28px);
}

/* Stills are finished frames — give them room */
.gallery--stills { grid-template-columns: repeat(auto-fit, minmax(min(100%, 400px), 1fr)); }

/* Storyboards are working drawings — smaller, more of them per row */
.gallery--storyboards { grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }

.gallery__frame {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  background: var(--color-panel-dark);
  aspect-ratio: 16 / 9;
  border: 1px solid var(--color-border);
}

.gallery--storyboards .gallery__frame {
  background: var(--color-bg-alt);
  aspect-ratio: 4 / 3;
}

.gallery__frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 800ms var(--ease-out);
}
.gallery__item:hover .gallery__frame img { transform: scale(1.03); }

/* Lets the browser skip rendering — and drop decoded bitmaps for —
   gallery items that are off screen. contain-intrinsic-size keeps the
   scrollbar honest while they're skipped. */
.gallery__item {
  content-visibility: auto;
  contain-intrinsic-size: auto 320px;
}

.gallery--storyboards .gallery__frame img { object-fit: contain; }

/* ---------- films ---------- */
.case__films { padding-bottom: clamp(70px, 10vw, 140px); }

.films {
  margin-top: 24px;
  display: grid;
  gap: clamp(20px, 3vw, 40px);
}

.film__panel {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--color-panel-dark);
  isolation: isolate;
  aspect-ratio: 16 / 9;
  box-shadow: 0 24px 60px -36px rgba(10, 10, 10, 0.42);
}

/* Films inherit the same rim / sheen treatment as every other panel */
.film__panel::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 4;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(140deg,
    rgba(37, 99, 235, 0.55) 0%,
    rgba(255, 255, 255, 0.14) 32%,
    rgba(255, 255, 255, 0.04) 58%,
    rgba(22, 163, 74, 0.45) 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  pointer-events: none;
  opacity: 0.85;
}

@media (min-width: 900px) {
  .films { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  /* First film runs full width — it's usually the main deliverable */
  .film:first-child { grid-column: 1 / -1; }
}

/* ============================== MOTION ============================== */
/* Only hide-then-reveal when JS is running — without it, content stays visible. */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 700ms var(--ease-out), transform 700ms var(--ease-out);
}
.js [data-reveal].is-visible { opacity: 1; transform: none; }

/* ============================== RESPONSIVE ============================== */
@media (max-width: 1000px) {
  .hero__caption { grid-template-columns: minmax(0, 1fr); align-items: start; }
  .contact__grid { grid-template-columns: minmax(0, 1fr); }
  .case__cols { grid-template-columns: minmax(0, 1fr); }
  .caps__item { grid-template-columns: 44px minmax(0, 1fr); }
  .caps__note { grid-column: 2; }
  .slide { flex-basis: min(84vw, 900px); }
}

@media (max-width: 760px) {
  body { font-size: 16px; }

  /* Phones play the vertical cut of the logo film (hero-reel-mobile-v.mp4),
     made for portrait screens, so it simply fills the screen. */
  .reel .reel__video { object-fit: cover; }
  .tile { aspect-ratio: 4 / 3; }
  .case__panel { aspect-ratio: 4 / 3; }
  .slide { flex-basis: calc(100vw - (var(--gutter) * 2)); }

  .hero__top { display: none; }

  /* No hover on touch — the in-view tile plays and keeps its meta visible */
  .tile__meta, .tags { opacity: 1; transform: none; }
  .tile { opacity: 1 !important; }
  .slide:not(.is-active) .tile { opacity: 0.9; }

  .chrome { font-size: 9px; }
  .chrome__corner { display: none; }

  .form { grid-template-columns: minmax(0, 1fr); }
  .footer__top { flex-direction: column; align-items: flex-start; }
  .footer__bottom { flex-direction: column; align-items: flex-start; }
  .contact__meta div { flex-direction: column; gap: 4px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .js [data-reveal],
  .js .mask__i { opacity: 1; transform: none; }
  .ticker__track { animation: none; }
}

/* Disclosure under the testimonials heading: quotes are edited for names/pronouns */
.tstm__note {
  margin-top: 14px;
  font-size: 13px;
  color: var(--color-text-muted);
}

/* ---------- Performance and page-specific motion ---------- */
/* The full-screen hero film plays without the grain overlay or the blurred
   glows behind it: blending a noise texture over a playing video every frame
   was making playback stutter on slower machines. */
.reel .grain, .page-home .hero__glow, .page-home .hero::after { display: none; }

/* Work and case study pages: titles and text appear immediately, no
   slide-in or fade animation. */
.page-work .mask__i, .page-project .mask__i,
.page-work [data-reveal], .page-project [data-reveal] {
  opacity: 1 !important;
  transform: none !important;
  transition: none !important;
}

/* Contact form spam trap: invisible to people */
.form__trap { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* Pre-loaded Vimeo player: present but invisible and unclickable until play */
.panel__embed--warm { opacity: 0; pointer-events: none; }

/* Phones: the Selected work thumbnails show the picture only, with no
   overlaid title, client, labels or hover gradient. */
@media (max-width: 760px) {
  .slide .tile__meta,
  .slide .tags,
  .slide .chrome { display: none; }
  .slide .tile::after { display: none; }
}

/* Phones: a plain, centred carousel. Each slide snaps to the middle with an
   equal margin either side, and tapping no longer lifts, zooms or fades the
   thumbnail (touch screens treat a tap as a sticky "hover"). */
@media (max-width: 760px) {
  .carousel__viewport { scroll-padding-inline: var(--gutter); }
  /* Let the track be as wide as its slides, so its right padding counts and
     the last slide can centre too. */
  .carousel__track { width: max-content; }
  .slide { scroll-snap-align: center; }
  .slide .tile,
  .slide .tile:hover,
  .slide .tile:focus-visible,
  .slide .tile:active {
    transform: none;
    box-shadow: 0 18px 40px -28px rgba(10, 10, 10, 0.4);
    transition: none;
    opacity: 1 !important;
  }
  .slide .tile__video,
  .slide .tile:hover .tile__video,
  .slide .tile.is-active .tile__video { transform: none; }
  .slide .tile { -webkit-tap-highlight-color: transparent; }
}

/* Phones: case study videos show the picture and the play button only, with
   no overlaid labels (film number, client, title, frame corners, scrub line). */
@media (max-width: 760px) {
  .page-project .chrome,
  .page-project .facade__label { display: none; }
}

/* ---------- Hover spotlight on the work index (mouse only) ----------
   The hovered project stays full colour, the rest dim. (The home carousel
   does the same in main.js by moving its active state to the hovered slide.) */
@media (hover: hover) and (pointer: fine) {
  .work-grid .tile { transition: transform 600ms var(--ease-out), box-shadow 600ms var(--ease-out), opacity 500ms var(--ease); }
  .work-grid:has(.tile:hover) .tile:not(:hover) { opacity: 0.4; }
}

/* ---------- Hero playback: keep the compositor's work per frame minimal ----------
   The placeholder under the film animated its background every frame, and the
   sound button blurred the moving footage behind it — both repainted on top of
   each video frame. Neither is visible once the film is playing. */
.reel .panel-fallback { animation: none; }
.reel__sound { -webkit-backdrop-filter: none; backdrop-filter: none; background: rgba(10, 10, 10, 0.42); }
.reel__sound:hover { background: rgba(10, 10, 10, 0.6); }
.reel .reel__video { transform: translateZ(0); backface-visibility: hidden; }

/* ---------- Carousel: two whole projects side by side ----------
   From 900px up each slide is exactly half the space between the page
   margins, so two sit fully in view, lined up with the rest of the page,
   with nothing cut off at the edge. */
@media (min-width: 900px) {
  .carousel__track { --carousel-gap: clamp(18px, 2.4vw, 34px); gap: var(--carousel-gap); }
  .slide { flex: 0 0 calc((100% - var(--gutter) - var(--carousel-gap)) / 2); }
  .carousel__viewport { scroll-padding-inline: var(--gutter); }
  /* Browsers drop a scroller's end padding, which let the last slide run to
     the screen edge. A spacer the width of the page margin replaces it. */
  .carousel__track { padding-right: 0; }
  .carousel__track::after { content: ""; flex: 0 0 var(--gutter); margin-left: calc(-1 * var(--carousel-gap)); }
  .tile__title { font-size: clamp(22px, 2vw, 32px); }
  /* Slides scrolled past (or still to come) don't peek into the margins. */
  .carousel__viewport { clip-path: inset(-80px var(--gutter)); }
}
