/* ==================================================================
   CHAD INGRAHAM — cinematic portfolio
   Design system: dark, editorial, two type voices, one accent per view
=================================================================== */

:root {
  --bg: #0a0a0a;
  --bg-2: #111110;
  --ink: #f2f0eb;
  --ink-dim: #8a8880;
  --line: rgba(242, 240, 235, 0.14);
  --accent: #ff3b00;
  --font-display: "Anton", Impact, sans-serif;
  --font-mono: "IBM Plex Mono", "SFMono-Regular", monospace;
  --font-body: "Space Grotesk", "Helvetica Neue", sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --pad: clamp(20px, 4vw, 64px);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
::selection { background: var(--accent); color: var(--bg); }

h1, h2, h3, .display {
  font-family: var(--font-display);
  font-weight: 400;
  text-transform: uppercase;
  line-height: 0.88;
  letter-spacing: -0.02em;
}

.label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-dim);
}

.section { padding: clamp(80px, 12vh, 160px) var(--pad); position: relative; }
.section + .section { border-top: 1px solid var(--line); }

/* ---------- film grain ---------- */
.grain {
  position: fixed; inset: -100px; z-index: 999; pointer-events: none;
  opacity: 0.05;
  mix-blend-mode: overlay; /* texture without lifting the blacks */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 0.9s steps(4) infinite;
}
@keyframes grain {
  0% { transform: translate(0, 0); }
  25% { transform: translate(-40px, 30px); }
  50% { transform: translate(30px, -50px); }
  75% { transform: translate(-30px, -20px); }
  100% { transform: translate(0, 0); }
}

/* ---------- header / menu ---------- */
.site-head {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; justify-content: space-between; align-items: center;
  padding: 20px var(--pad);
  mix-blend-mode: difference;
}
.site-head .wordmark { font-family: var(--font-display); font-size: 20px; letter-spacing: 0.02em; }
.site-head .head-right { display: flex; align-items: center; gap: 28px; }
.head-nav { display: flex; gap: 22px; }
.head-nav a {
  font-family: var(--font-mono); font-size: 11px;
  letter-spacing: 0.1em; text-transform: uppercase;
}
.head-nav a:hover { color: var(--accent); }
.menu-btn { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em; }
.menu-btn:hover { color: var(--accent); }
@media (max-width: 760px) { .head-nav { display: none; } }

.menu-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: var(--bg);
  display: flex; flex-direction: column; justify-content: center;
  padding: 0 var(--pad);
  clip-path: inset(0 0 100% 0);
  transition: clip-path 0.7s var(--ease);
  visibility: hidden;
}
.menu-overlay.open { clip-path: inset(0 0 0 0); visibility: visible; }
.menu-overlay nav a {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(44px, 9vw, 110px);
  line-height: 1.04;
  text-transform: uppercase;
  transition: color 0.3s, transform 0.4s var(--ease);
}
.menu-overlay nav a:hover { color: var(--accent); transform: translateX(1.5vw); }
.menu-overlay .menu-meta { margin-top: 6vh; display: flex; gap: 32px; }
.menu-close { position: absolute; top: 24px; right: var(--pad); font-size: 11px; letter-spacing: 0.25em; }
.menu-close:hover { color: var(--accent); }

/* ---------- hero ---------- */
.hero { height: 100svh; position: relative; overflow: hidden; display: flex; }
.hero-media { position: absolute; inset: 0; }
.hero-media .slide {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  opacity: 0;
  transform: scale(1);
  filter: saturate(0.85) contrast(1.02) brightness(0.9);
  transition: opacity 1.4s var(--ease);
  will-change: transform, opacity;
}
/* Slides only appear once .show-slides is set (the 4s slow-connection
   fallback in initHero). First slide then stays statically visible so the
   hero is never black — even in a background tab with frozen animations. */
.hero-media.show-slides .slide:first-child { opacity: 1; }
/* True crossfade: opacity rides a transition; the zoom is a separate
   animation that keeps running while a slide fades out (.fading). */
.hero-media .slide.active { opacity: 1; animation: kbzoom 8.5s linear forwards; }
.hero-media .slide.active.fading { opacity: 0; }
@keyframes kbzoom {
  from { transform: scale(1); }
  to   { transform: scale(1.12); }
}
.hero-media video { width: 100%; height: 100%; object-fit: cover; filter: saturate(0.85) brightness(0.75); }
.hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(10,10,10,0.88), rgba(10,10,10,0.08) 45%, rgba(10,10,10,0.25));
}
.hero-inner {
  position: relative; z-index: 2;
  align-self: flex-end;
  width: 100%;
  padding: 0 var(--pad) clamp(84px, 12vh, 130px);
}
.hero-proof a:hover { color: var(--accent); }
.hero-chip { display: flex; gap: 16px; margin-bottom: 3vh; }
.hero h1 { font-size: clamp(64px, 13vw, 200px); margin: 0 0 3vh -4px; }
.hero-sub {
  max-width: 540px;
  font-family: var(--font-body);
  font-size: 16px; line-height: 1.55;
  color: #d9d7d0;
}
.reel-cta {
  display: inline-block; margin-top: 3vh;
  font-family: var(--font-display); font-size: clamp(18px, 2vw, 26px);
  text-transform: uppercase; letter-spacing: 0.01em;
  border-bottom: 2px solid var(--accent);
  padding-bottom: 3px;
  transition: color 0.3s;
}
.reel-cta:hover { color: var(--accent); }

/* barely-there proof strip pinned to the hero's bottom edge,
   sitting on a fine white hairline */
.hero-proof {
  position: absolute; left: var(--pad); right: var(--pad); bottom: 0;
  z-index: 3;
  display: flex; justify-content: space-between; gap: 24px;
  border-top: 1px solid rgba(242, 240, 235, 0.22);
  padding: 14px 0 16px;
  font-family: var(--font-mono); font-size: 10px;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: rgba(242, 240, 235, 0.45);
}
@media (max-width: 700px) { .hero-proof span:nth-child(2) { display: none; } }

/* ---------- background video (YouTube iframe or local mp4) ----------
   Uses container-query units so the 16:9 frame always covers its host,
   whatever the host's shape. pointer-events off = pure background. */
.video-bg {
  position: absolute; inset: 0; z-index: 1;
  overflow: hidden; pointer-events: none;
  container-type: size;
}
.video-bg iframe, .video-bg video {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: max(100cqw, 177.78cqh);
  height: max(100cqh, 56.25cqw);
  border: 0;
  opacity: 0;
  transition: opacity 1.2s var(--ease);
}
.video-bg.ready iframe, .video-bg.ready video { opacity: 1; }
.video-bg video { object-fit: cover; }
/* YouTube: overscan 35% so the title/logo chrome sits outside the frame */
.video-bg.is-yt iframe {
  width: calc(max(100cqw, 177.78cqh) * 1.35);
  height: calc(max(100cqh, 56.25cqw) * 1.35);
}
/* Hero video sits under .hero-media directly, so it needs its own grade;
   .proj-hero .bg and .onair-bg already filter their children. */
.hero > .hero-media > .video-bg { filter: saturate(0.95) contrast(1.06) brightness(0.92); }
/* rotating hero layers crossfade at the wrap level */
.hero-media .video-bg.hero-rot { opacity: 0; transition: opacity 1.5s var(--ease); }
.hero-media .video-bg.hero-rot.on { opacity: 1; }
/* keep overlays and content above the video layer */
.hero::after, .proj-hero::after { z-index: 2; }
.hero-inner, .proj-hero-inner, .onair-inner { z-index: 3; }

/* ---------- trailers grid ---------- */
.trailers-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: clamp(16px, 2vw, 32px); margin-top: 48px;
}
.trailer .trailer-poster, .trailer .trailer-live {
  position: relative; display: block; width: 100%;
  aspect-ratio: 16 / 9; overflow: hidden;
  background-size: cover; background-position: center;
  background-color: var(--bg-2);
}
.trailer .trailer-poster { filter: saturate(0.8); transition: filter 0.4s; }
.trailer .trailer-poster:hover { filter: saturate(1); }
.trailer .play {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 64px; height: 64px; border-radius: 50%;
  display: grid; place-items: center;
  border: 1px solid var(--ink);
  background: rgba(10, 10, 10, 0.5);
  font-size: 18px; color: var(--ink);
  transition: background 0.3s, border-color 0.3s, color 0.3s;
}
.trailer .trailer-poster:hover .play { background: var(--accent); border-color: var(--accent); }
.trailer .trailer-live iframe, .trailer .trailer-live video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; object-fit: cover; background: var(--bg-2); }
.trailer .meta { display: flex; justify-content: space-between; gap: 12px; padding: 12px 2px 0; }
.trailer .meta .t { font-family: var(--font-display); font-size: clamp(15px, 1.6vw, 22px); text-transform: uppercase; }
.trailer .show-info { display: grid; gap: 8px; padding: 14px 2px 0; }
.trailer .show-info .t { font-family: var(--font-display); font-size: clamp(18px, 2vw, 26px); text-transform: uppercase; }
.trailer .badge { font-size: 10px; letter-spacing: 0.18em; color: var(--accent); text-transform: uppercase; }
.trailer .desc { font-family: var(--font-body); font-size: 14px; line-height: 1.55; color: var(--ink-dim); }
.trailer a.t:hover { color: var(--accent); }
.trailer .case-link { justify-self: start; }
.trailer .case-link:hover { color: var(--accent); }

/* ---------- press & media ---------- */
.press-rows { margin-top: 32px; border-top: 1px solid var(--line); }
.press-row {
  display: grid; grid-template-columns: 280px 1fr auto;
  gap: 24px; align-items: baseline;
  padding: 22px 0; border-bottom: 1px solid var(--line);
}
.press-row .outlet { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.2em; color: var(--ink-dim); }
.press-row .headline { font-family: var(--font-display); font-size: clamp(16px, 2.2vw, 30px); text-transform: uppercase; line-height: 1.15; transition: color 0.3s, transform 0.4s var(--ease); }
.press-row:hover .headline { color: var(--accent); transform: translateX(0.5vw); }
.press-row .year { font-size: 11px; letter-spacing: 0.2em; color: var(--ink-dim); }

/* ---------- recommendations ---------- */
.recs { margin-top: 40px; display: grid; gap: 1px; background: var(--line); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.rec { background: var(--bg); padding: clamp(32px, 5vw, 64px) 0; }
.rec p {
  font-family: var(--font-display);
  font-size: clamp(20px, 3.4vw, 44px);
  line-height: 1.15; text-transform: uppercase;
  max-width: 1150px;
}
.rec footer { margin-top: 24px; display: flex; align-items: baseline; gap: 20px; flex-wrap: wrap; }
.rec .who { font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.2em; color: var(--accent); }


/* ---------- stats ---------- */
.stats-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 1px; background: var(--line);
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  margin-top: 48px;
}
.stat { background: var(--bg); padding: clamp(28px, 4vw, 56px) 24px; }
.stat .num { font-family: var(--font-display); font-size: clamp(56px, 7vw, 110px); line-height: 1; }
.stat .num sup { font-size: 0.4em; color: var(--accent); }
.stat .label { margin-top: 12px; }

/* ---------- marquee ---------- */
.marquee { overflow: hidden; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 28px 0; }
.marquee-track { display: flex; width: max-content; animation: marquee 36s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-item { display: flex; align-items: baseline; gap: 14px; padding: 0 40px; white-space: nowrap; }
.marquee-item .name { font-family: var(--font-display); font-size: clamp(24px, 3vw, 44px); text-transform: uppercase; }
.marquee-item .role { font-size: 10px; letter-spacing: 0.2em; color: var(--ink-dim); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- networks / on-air ---------- */
.onair { position: relative; overflow: hidden; }
.onair-bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  filter: saturate(0.6) brightness(0.3);
}
.onair-inner { position: relative; z-index: 2; }
.onair-rows { margin-top: 40px; border-top: 1px solid var(--line); }
.onair-row {
  display: grid; grid-template-columns: 160px 1fr;
  gap: 24px; padding: 22px 0;
  border-bottom: 1px solid var(--line);
  align-items: baseline;
}
.onair-row .year { font-family: var(--font-display); font-size: 28px; color: var(--accent); }
.onair-row .names { font-family: var(--font-display); font-size: clamp(24px, 4vw, 52px); text-transform: uppercase; line-height: 1.1; }

/* ---------- approach ---------- */
.approach h2 { font-size: clamp(44px, 8vw, 130px); margin: 16px 0 10px; }
/* tiny service annotations riding the baseline of each LOCATION,
   like a footnote index — noticeable on the second read, not the first */
.loc-heading .loc-sub {
  font-family: var(--font-mono);
  font-size: clamp(9px, 0.9vw, 14px);
  letter-spacing: 0.22em;
  color: var(--ink-dim);
  vertical-align: baseline;
  padding-left: 0.25em;
  padding-right: 0.1em;
}
.approach .sub { color: var(--ink-dim); margin-top: 28px; margin-bottom: 56px; }
.principles { border-top: 1px solid var(--line); }
.principle {
  display: grid; grid-template-columns: 80px 1fr; gap: 24px;
  padding: 28px 0; border-bottom: 1px solid var(--line);
  font-size: clamp(15px, 1.9vw, 24px);
  font-family: var(--font-mono); text-transform: uppercase; line-height: 1.4;
}
.principle .n { color: var(--accent); font-size: 12px; letter-spacing: 0.2em; padding-top: 6px; }

/* ---------- work cards ---------- */
.work-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 48px; }
.work-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: clamp(16px, 2vw, 32px); }
.card { position: relative; overflow: hidden; display: block; }
.card:nth-child(1) { grid-column: 1 / 8; }
.card:nth-child(2) { grid-column: 8 / 13; margin-top: 12vh; }
.card:nth-child(3) { grid-column: 1 / 6; margin-top: -6vh; }
.card:nth-child(4) { grid-column: 6 / 13; margin-top: 8vh; }
.card .frame { aspect-ratio: 4 / 3; overflow: hidden; background: var(--bg-2); }
.card:nth-child(2) .frame, .card:nth-child(3) .frame { aspect-ratio: 3 / 4; }
.card img {
  width: 100%; height: 100%; object-fit: cover;
  filter: saturate(0.8) contrast(1.02);
  transform: scale(1.02);
  transition: transform 1.2s var(--ease), filter 0.6s;
}
.card:hover img { transform: scale(1.09); filter: saturate(1) contrast(1.05); }
.card .meta { display: flex; justify-content: space-between; padding: 14px 2px 0; }
.card .meta .t { font-family: var(--font-display); font-size: clamp(20px, 2.4vw, 34px); text-transform: uppercase; }
.card:hover .meta .t { color: var(--accent); }

/* ---------- capabilities ---------- */
.caps { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); margin-top: 48px; }
.cap { background: var(--bg); padding: 28px; }
.cap h3 { font-size: clamp(20px, 2.4vw, 32px); margin-bottom: 10px; }
.cap p { font-family: var(--font-body); font-size: 14px; line-height: 1.55; color: var(--ink-dim); }

/* ---------- services accordion ---------- */
.svc { border-top: 1px solid var(--line); }
.svc-head {
  width: 100%; display: grid; grid-template-columns: 80px 1fr auto;
  align-items: baseline; gap: 24px; text-align: left;
  padding: 26px 0; border-bottom: 1px solid var(--line);
}
.svc-head .n { font-size: 11px; letter-spacing: 0.2em; color: var(--ink-dim); }
.svc-head .t { font-family: var(--font-display); font-size: clamp(36px, 6vw, 84px); text-transform: uppercase; transition: color 0.3s; }
.svc.open .svc-head .t, .svc-head:hover .t { color: var(--accent); }
.svc-head .plus { font-size: 22px; transition: transform 0.4s var(--ease); }
.svc.open .plus { transform: rotate(45deg); }
.svc-body { max-height: 0; overflow: hidden; transition: max-height 0.6s var(--ease); }
.svc-body-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; padding: 8px 0 36px 104px; border-bottom: 1px solid var(--line); }
.svc-body p { font-family: var(--font-body); font-size: 15px; line-height: 1.55; }
.svc-body .tags { font-family: var(--font-mono); color: var(--ink-dim); font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; }

/* ---------- FAQ ---------- */
.faq-item { border-bottom: 1px solid var(--line); }
.faq-q {
  width: 100%; display: flex; justify-content: space-between; align-items: center;
  text-align: left; padding: 22px 0;
  font-size: 13px; letter-spacing: 0.16em; text-transform: uppercase;
}
.faq-q:hover, .faq-item.open .faq-q { color: var(--accent); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height 0.5s var(--ease); }
.faq-a p { padding-bottom: 24px; max-width: 640px; color: var(--ink-dim); }

/* ---------- contact ---------- */
.contact h2 { font-size: clamp(40px, 8vw, 120px); margin: 12px 0 48px; }
.contact form { max-width: 640px; display: grid; gap: 36px; }
.field { display: grid; gap: 8px; }
.field input, .field textarea {
  background: none; border: 0; border-bottom: 1px solid var(--line);
  padding: 10px 0; color: var(--ink);
  font-family: var(--font-mono); font-size: 15px;
  transition: border-color 0.3s;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--accent); }
.send-btn {
  justify-self: start;
  font-family: var(--font-display); font-size: 28px; text-transform: uppercase;
  border-bottom: 2px solid var(--ink);
  padding-bottom: 4px;
  transition: color 0.3s, border-color 0.3s;
}
.send-btn:hover { color: var(--accent); border-color: var(--accent); }
.contact .alt-mail { display: inline-block; margin-top: 40px; }
.contact .alt-mail:hover { color: var(--accent); }
.form-note { font-size: 11px; color: var(--accent); letter-spacing: 0.15em; text-transform: uppercase; }
.form-alt { margin-top: 28px; font-family: var(--font-mono); font-size: 13px; color: var(--ink-dim); letter-spacing: 0.2em; text-transform: uppercase; }
.form-alt a { color: var(--ink-dim); text-decoration: none; border-bottom: 1px solid var(--line); transition: color 0.3s var(--ease), border-color 0.3s var(--ease); }
.form-alt a:hover { color: var(--accent); border-color: var(--accent); }

/* ---------- footer ---------- */
footer { border-top: 1px solid var(--line); padding: 48px var(--pad) 0; }
.foot-grid { display: flex; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.foot-grid a:hover { color: var(--accent); }
.foot-grid .clock { font-size: 12px; letter-spacing: 0.2em; }
.foot-legal { margin-top: 40px; display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; color: var(--ink-dim); font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; }
.foot-mark {
  font-family: var(--font-display);
  font-size: clamp(60px, 15.5vw, 260px);
  line-height: 0.8;
  text-transform: uppercase;
  text-align: center;
  margin-top: 40px;
  transform: translateY(0.14em);
  color: transparent; -webkit-text-stroke: 1px rgba(242,240,235,0.3);
}

/* ---------- work page ---------- */
.page-hero { padding: 22vh var(--pad) 8vh; }
.page-hero h1 { font-size: clamp(70px, 16vw, 260px); }
.page-hero .count { color: var(--accent); }
.page-hero p { max-width: 520px; margin-top: 24px; text-transform: uppercase; letter-spacing: 0.14em; font-size: 12px; }
.work-tools { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 20px; padding: 0 var(--pad) 32px; border-bottom: 1px solid var(--line); }
.filters { display: flex; gap: 22px; flex-wrap: wrap; }
.filters button, .viewtoggle button { font-size: 11px; letter-spacing: 0.2em; color: var(--ink-dim); }
.filters button.active, .viewtoggle button.active,
.filters button:hover, .viewtoggle button:hover { color: var(--accent); }
.viewtoggle { display: flex; gap: 18px; }

/* ---------- work page: editorial index rows ---------- */
.works-list { padding: 24px var(--pad) 64px; }
.work-row {
  display: grid;
  grid-template-columns: 56px 200px 1fr auto 110px;
  gap: clamp(16px, 2.5vw, 40px);
  align-items: center;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}
.work-row .n { font-family: var(--font-mono); font-size: 11px; color: var(--ink-dim); }
.work-row .thumb {
  display: block; aspect-ratio: 16 / 9; overflow: hidden; background: var(--bg-2);
}
.work-row .thumb img {
  width: 100%; height: 100%; object-fit: cover;
  filter: saturate(0.85);
  transform: scale(1.01);
  transition: transform 0.8s var(--ease), filter 0.4s;
}
.work-row:hover .thumb img { transform: scale(1.07); filter: saturate(1); }
.work-row .t {
  font-family: var(--font-display); font-size: clamp(24px, 3.6vw, 54px);
  text-transform: uppercase; line-height: 1;
  transition: color 0.3s, transform 0.4s var(--ease);
}
.work-row:hover .t { color: var(--accent); transform: translateX(0.5vw); }
.work-row .y { text-align: right; }

.works-index { padding: 24px var(--pad) 64px; }
.index-row {
  display: grid; grid-template-columns: 70px 1fr auto auto;
  gap: 24px; align-items: baseline;
  padding: 20px 0; border-bottom: 1px solid var(--line);
}
.index-row .n { font-size: 11px; color: var(--ink-dim); }
.index-row .t { font-family: var(--font-display); font-size: clamp(28px, 5vw, 64px); text-transform: uppercase; transition: color 0.3s, transform 0.4s var(--ease); }
.index-row:hover .t { color: var(--accent); transform: translateX(1vw); }
.index-row .c, .index-row .y { font-size: 11px; letter-spacing: 0.2em; color: var(--ink-dim); }

/* ---------- project page ---------- */
.proj-hero { min-height: 88svh; position: relative; display: flex; overflow: hidden; }
.proj-hero .bg { position: absolute; inset: 0; background-size: cover; background-position: center; filter: saturate(0.8) brightness(0.55); }
.proj-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, var(--bg), transparent 60%); }
.proj-hero-inner { position: relative; z-index: 2; align-self: flex-end; padding: 0 var(--pad) 8vh; width: 100%; }
.proj-hero h1 { font-size: clamp(56px, 13vw, 200px); margin-top: 12px; }
.proj-meta { display: grid; grid-template-columns: repeat(3, minmax(140px, 220px)); gap: 24px; padding: 40px var(--pad); border-bottom: 1px solid var(--line); }
.proj-meta .v { margin-top: 6px; font-size: 13px; text-transform: uppercase; letter-spacing: 0.1em; }
.proj-players {
  padding: 8vh var(--pad);
  display: grid; gap: clamp(24px, 3vw, 48px);
  grid-template-columns: repeat(auto-fit, minmax(min(480px, 100%), 1fr));
}
.proj-player .label { display: block; margin-bottom: 12px; }
.proj-player .frame { position: relative; aspect-ratio: 16 / 9; background: var(--bg-2); }
.proj-player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.proj-tagline { padding: 10vh var(--pad); font-family: var(--font-mono); font-size: clamp(18px, 3vw, 34px); text-transform: uppercase; line-height: 1.35; max-width: 1100px; }
.proj-blocks { padding: 0 var(--pad) 8vh; display: grid; gap: 1px; background: var(--line); border-top: 1px solid var(--line); }
.proj-block { background: var(--bg); display: grid; grid-template-columns: 90px 220px 1fr; gap: 24px; padding: 40px 0; border-bottom: 1px solid var(--line); }
.proj-block .n { color: var(--accent); font-size: 12px; letter-spacing: 0.2em; }
.proj-block h3 { font-size: 22px; }
.proj-block p { color: var(--ink-dim); max-width: 620px; }
.proj-quote { padding: 12vh var(--pad); text-align: center; }
.proj-quote .mark { font-family: var(--font-display); font-size: 80px; color: var(--accent); line-height: 0.4; }
.proj-quote blockquote { font-family: var(--font-display); font-size: clamp(28px, 5vw, 64px); text-transform: uppercase; max-width: 1000px; margin: 24px auto 16px; }
.proj-outcome { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; padding: 8vh var(--pad); border-top: 1px solid var(--line); }
.proj-outcome ul { list-style: none; margin-top: 16px; }
.proj-outcome li { font-family: var(--font-display); font-size: clamp(20px, 2.6vw, 36px); text-transform: uppercase; padding: 10px 0; border-bottom: 1px solid var(--line); }
.proj-credits li { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-dim); padding: 10px 0; border-bottom: 1px solid var(--line); list-style: none; }
.watch-btn { display: inline-block; margin: 0 var(--pad) 10vh; font-family: var(--font-display); font-size: 30px; text-transform: uppercase; border-bottom: 2px solid var(--accent); }
.watch-btn:hover { color: var(--accent); }
.proj-reel { display: flex; gap: 8px; flex-wrap: wrap; padding: 0 var(--pad) 8vh; }
.proj-reel a { color: var(--accent); }
.proj-reel a:hover { color: var(--ink); }
.proj-next { display: block; padding: 12vh var(--pad); border-top: 1px solid var(--line); }
.proj-next .t { font-family: var(--font-display); font-size: clamp(44px, 9vw, 140px); text-transform: uppercase; transition: color 0.3s; }
.proj-next:hover .t { color: var(--accent); }

/* ---------- stills gallery ---------- */
.sub-tools {
  padding: 28px var(--pad) 0;
}
.sub-tools .filters { border-top: 1px solid var(--line); padding-top: 20px; }
.sub-tools .filters button.active { color: var(--accent); }
.essay-intro {
  font-family: var(--font-body);
  font-size: 16px; line-height: 1.6;
  color: #d9d7d0;
  max-width: 640px;
  margin-top: 18px;
}
.stills-grid {
  padding: 48px var(--pad) 64px;
  columns: 3;
  column-gap: clamp(16px, 2vw, 28px);
}
.still {
  break-inside: avoid;
  margin: 0 0 clamp(16px, 2vw, 28px);
  cursor: zoom-in;
}
/* Each tile carries its image's TRUE aspect ratio (measured once, baked
   into stills-data.js), so layout is final before images arrive — natural
   proportions, zero shifting, no cropping. */
.still .ph {
  overflow: hidden;
  background: var(--bg-2);
}
.still .ph img {
  width: 100%; height: 100%; object-fit: cover; /* exact-ratio box: no visible crop */
  filter: saturate(0.9);
  opacity: 0;
  transition: opacity 0.6s var(--ease), filter 0.4s;
}
.still .ph img.ok { opacity: 1; }
.still:hover .ph img { filter: saturate(1); }
.still figcaption { margin-top: 8px; }

.lightbox {
  position: fixed; inset: 0; z-index: 300;
  background: rgba(8, 8, 8, 0.96);
  display: flex; align-items: center; justify-content: center;
}
.lightbox[hidden] { display: none; } /* display:flex would otherwise defeat the hidden attribute */
.lightbox figure { max-width: 88vw; max-height: 88vh; text-align: center; }
.lightbox img { max-width: 88vw; max-height: 82vh; object-fit: contain; margin: 0 auto; }
.lightbox figcaption { margin-top: 14px; }
.lb-close { position: absolute; top: 24px; right: var(--pad); font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.15em; }
.lb-prev, .lb-next {
  position: absolute; top: 50%; transform: translateY(-50%);
  font-family: var(--font-display); font-size: 32px; padding: 20px;
}
.lb-prev { left: clamp(8px, 2vw, 32px); }
.lb-next { right: clamp(8px, 2vw, 32px); }
.lb-close:hover, .lb-prev:hover, .lb-next:hover { color: var(--accent); }

/* homepage stills teaser strip */
.stills-strip .marquee-track { animation-duration: 60s; }
.stills-strip .strip-item { padding: 0 8px; }
.stills-strip img { height: clamp(140px, 22vh, 220px); width: auto; display: block; filter: saturate(0.9); }
.stills-strip:hover img { filter: saturate(1); }

/* ---------- reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(40px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }
.reveal.in-view { opacity: 1; transform: none; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .stats-grid, .caps, .proj-outcome { grid-template-columns: 1fr 1fr; }
  .trailers-grid { grid-template-columns: 1fr 1fr; }
  .work-row { grid-template-columns: 40px 140px 1fr; }
  .stills-grid { columns: 2; }
  .work-row .c, .work-row .y { display: none; }
  .card:nth-child(n) { grid-column: 1 / 13; margin-top: 0; }
  .work-grid { gap: 40px; }
  .svc-body-inner { grid-template-columns: 1fr; padding-left: 0; }
  .proj-block { grid-template-columns: 60px 1fr; }
  .proj-block p { grid-column: 2; }
}
@media (max-width: 600px) {
  .stats-grid, .caps, .trailers-grid, .proj-outcome, .proj-meta { grid-template-columns: 1fr; }
  .work-row { grid-template-columns: 110px 1fr; }
  .stills-grid { columns: 1; }
  .work-row .n { display: none; }
  .onair-row, .index-row, .press-row { grid-template-columns: 1fr; gap: 8px; }
  .principle { grid-template-columns: 48px 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
