/* ==========================================================================
   AUBREY SINGER — DIRECTOR
   Monochrome "Light & Dark" system. Tokens swap via body[data-mode].
   ========================================================================== */

@property --bg { syntax: '<color>'; inherits: true; initial-value: #0A0A0A; }
@property --fg { syntax: '<color>'; inherits: true; initial-value: #F2F0EC; }
@property --mute { syntax: '<color>'; inherits: true; initial-value: #8A8A8A; }

:root {
  --ink: #0A0A0A;
  --paper: #F2F0EC;
  --bg: var(--ink);
  --fg: var(--paper);
  --mute: #8A8A8A;
  --line: color-mix(in srgb, var(--fg) 14%, transparent);

  --f-display: 'Poppins', 'Helvetica Neue', Arial, sans-serif;
  --f-serif: 'Instrument Serif', Georgia, serif;
  --f-body: 'Inter', 'Helvetica Neue', Arial, sans-serif;
  --f-mono: 'JetBrains Mono', ui-monospace, Menlo, monospace;

  --gutter: clamp(16px, 2.5vw, 40px);
  --section: clamp(96px, 16vh, 200px);
  --cine: cubic-bezier(.7, 0, .2, 1);
  --out: cubic-bezier(.16, 1, .3, 1);
}

body[data-mode="light"] {
  --bg: var(--paper);
  --fg: var(--ink);
  --mute: #6B6B6B;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 400 clamp(16px, 1.1vw, 19px)/1.55 var(--f-body);
  -webkit-font-smoothing: antialiased;
  transition: --bg .6s var(--cine), --fg .6s var(--cine), --mute .6s var(--cine);
  overflow-x: clip;
}
img, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
ul, ol { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, p, figure { margin: 0; }
::selection { background: var(--fg); color: var(--bg); }
:focus-visible { outline: 2px solid var(--fg); outline-offset: 4px; }

.display {
  font-family: var(--f-display);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: -0.04em;
  line-height: .86;
}
.serif { font-family: var(--f-serif); font-style: italic; font-weight: 400; letter-spacing: -0.01em; }
.mono { font-family: var(--f-mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.eyebrow { color: var(--mute); margin-bottom: clamp(24px, 4vh, 48px); }
.eyebrow span { color: var(--fg); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: fixed; left: 16px; top: -60px; z-index: 10001; background: var(--fg); color: var(--bg); padding: 10px 14px; }
.skip:focus { top: 16px; }

/* Split text helpers (created by script.js) */
.w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .08em; margin-bottom: -.08em; }
.wi { display: inline-block; will-change: transform; }

/* ---------- Grain / cursor / splice / progress ---------- */
.grain {
  position: fixed; inset: 0; width: 100%; height: 100%;
  pointer-events: none; z-index: 9999;
  opacity: .07; mix-blend-mode: overlay;
  transition: opacity .6s;
}
body.is-clean .grain { opacity: 0; }
body::after { /* vignette */
  content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 9998;
  background: radial-gradient(ellipse at center, transparent 55%, rgba(0,0,0,.35) 100%);
}

.cursor { position: fixed; left: 0; top: 0; z-index: 10000; pointer-events: none; mix-blend-mode: difference; display: none; }
.cursor__dot, .cursor__ring { position: absolute; left: 0; top: 0; border-radius: 50%; }
.cursor__dot { width: 8px; height: 8px; margin: -4px 0 0 -4px; background: #fff; }
.cursor__ring {
  width: 40px; height: 40px; margin: -20px 0 0 -20px;
  border: 1px solid #fff;
  display: grid; place-items: center;
  transition: width .4s var(--out), height .4s var(--out), margin .4s var(--out), background-color .3s, opacity .3s;
}
.cursor__label { font: 600 11px/1 var(--f-mono); letter-spacing: .1em; color: #000; opacity: 0; transition: opacity .2s; }
.cursor[data-state="view"] .cursor__ring { width: 64px; height: 64px; margin: -32px 0 0 -32px; }
.cursor[data-state="play"] .cursor__ring,
.cursor[data-state="drag"] .cursor__ring { width: 96px; height: 96px; margin: -48px 0 0 -48px; background: #fff; }
.cursor[data-state="play"] .cursor__label,
.cursor[data-state="drag"] .cursor__label { opacity: 1; }
.cursor[data-state="play"] .cursor__dot,
.cursor[data-state="drag"] .cursor__dot { opacity: 0; }
.cursor[data-state="hide"] { opacity: 0; }
@media (hover: hover) and (pointer: fine) {
  .cursor { display: block; }
  html.js, html.js a, html.js button { cursor: none; }
  html.js .player video { cursor: pointer; }
}

.splice {
  position: fixed; top: 0; bottom: 0; left: 0; width: 1px; z-index: 9997;
  background: var(--fg); transform: scaleY(0); transform-origin: top; pointer-events: none;
}

.progress { position: fixed; top: 0; left: 0; right: 0; height: 1px; z-index: 600; pointer-events: none; }
.progress span { display: block; height: 100%; background: var(--fg); transform-origin: left; transform: scaleX(0); }

/* ---------- Preloader ---------- */
.loader {
  position: fixed; inset: 0; z-index: 10002;
  background: var(--ink); color: var(--paper);
  display: grid; place-items: center;
}
html:not(.js) .loader { display: none; }
.loader__leader { position: relative; width: min(46vmin, 320px); aspect-ratio: 1; display: grid; place-items: center; }
.loader__ring { position: absolute; inset: 0; width: 100%; height: 100%; }
.loader__ring circle, .loader__ring line { fill: none; stroke: rgba(242,240,236,.55); stroke-width: 1; }
.loader__sweep {
  position: absolute; inset: 4%; border-radius: 50%;
  background: conic-gradient(rgba(242,240,236,.18) var(--sweep, 0deg), transparent 0);
}
.loader__num { position: relative; font: 300 clamp(80px, 18vmin, 150px)/1 var(--f-display); }
.loader__meta {
  position: absolute; left: var(--gutter); right: var(--gutter); bottom: var(--gutter);
  display: flex; justify-content: space-between; color: #8A8A8A;
}

/* ---------- Nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 500;
  display: flex; align-items: center; gap: 24px;
  padding: 20px var(--gutter);
  color: var(--paper);
  mix-blend-mode: difference;
}
.nav__mark { font: 400 15px/1 var(--f-display); letter-spacing: .02em; white-space: nowrap; }
.nav__mark span { color: #8A8A8A; }
.nav__tc { color: #8A8A8A; margin-right: auto; }
.nav__links { display: flex; gap: clamp(16px, 2.4vw, 36px); }
.nav__links a { display: inline-block; font: 500 14px/1 var(--f-body); position: relative; padding: 6px 0; }
.nav__links a::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: currentColor;
  transform: scaleX(0); transform-origin: right; transition: transform .5s var(--out);
}
.nav__links a:hover::after { transform: scaleX(1); transform-origin: left; }
.nav__reel {
  font: 500 13px/1 var(--f-body); padding: 10px 16px; border: 1px solid currentColor; border-radius: 999px;
  transition: background-color .3s, color .3s;
}
.nav__reel:hover { background: var(--paper); color: var(--ink); }

/* ---------- Hero ---------- */
.hero { position: relative; height: 100vh; height: 100svh; background: var(--ink); color: var(--paper); }
.hero__stage { position: relative; height: 100vh; height: 100svh; overflow: hidden; }
.hero__video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero__video--seq { opacity: 0; transition: opacity .6s; }
.hero__video--seq.is-on { opacity: 1; }
.hero.is-seq .hero__video--scrub { display: none; }
.hero:not(.is-seq) .hero__video--seq { display: none; }
.hero__shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.45), rgba(0,0,0,.1) 40%, rgba(0,0,0,.55)); }

.letterbox { position: absolute; left: 0; right: 0; height: 50%; background: var(--ink); z-index: 2; }
.letterbox--top { top: 0; transform-origin: top; }
.letterbox--bottom { bottom: 0; transform-origin: bottom; }
html:not(.js) .letterbox { height: calc((100% - 100vw / 2.39) / 2); }

.hero__intro {
  position: absolute; inset: 0; z-index: 3;
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  padding: 0 var(--gutter);
}
.hero__mark {
  font: 600 clamp(28px, 5.6vw, 120px)/.95 var(--f-display); white-space: nowrap;
  text-transform: uppercase; letter-spacing: -0.03em;
}
.hero__mark { color: #F2F0EC; text-shadow: 0 2px 30px rgba(0,0,0,.35); }
.hero__sep {
  display: inline-block; width: max(2px, .06em); height: .78em; margin: 0 .32em;
  background: currentColor; vertical-align: -.04em;
}
@media (max-width: 640px) {
  .hero__mark { font-size: 11vw; white-space: normal; }
  .hero__sep { display: block; width: 1.2em; height: max(2px, .06em); margin: .28em auto; }
}


.hero__hud {
  position: absolute; left: var(--gutter); right: var(--gutter); bottom: calc(var(--gutter) + 6px); z-index: 4;
  display: flex; gap: 24px; color: rgba(242,240,236,.75);
}
.hud__rec { color: #F2F0EC; animation: blink 1.6s steps(1) infinite; }
.hud__title { margin-left: auto; }
@keyframes blink { 50% { opacity: .2; } }
.hero__cue {
  position: absolute; left: 50%; bottom: calc(var(--gutter) + 40px); z-index: 4; transform: translateX(-50%);
  display: flex; gap: 8px; color: rgba(242,240,236,.8);
}
.hero__cue span { display: inline-block; animation: cue 1.8s var(--cine) infinite; }
@keyframes cue { 0%, 100% { transform: translateY(-3px); } 50% { transform: translateY(4px); } }

/* ---------- Mission ---------- */
.mission { padding: var(--section) var(--gutter); max-width: 1600px; margin: 0 auto; }
.mission__text { display: grid; gap: .9em; }
.mission__text p {
  font: 300 clamp(28px, 3.9vw, 68px)/1.12 var(--f-display);
  letter-spacing: -0.025em; max-width: 24ch;
}
.mission__text p:first-child { max-width: 30ch; }
.mission__text strong { font-weight: 600; }
.mission__turn { font-family: var(--f-serif) !important; font-style: italic; font-size: clamp(40px, 6vw, 110px) !important; }
html.js .mission__text .word { opacity: .14; }

/* ---------- Work ---------- */
.work { border-top: 1px solid var(--line); }

.acts {
  position: sticky; top: 72px; z-index: 50;
  display: flex; gap: 6px; width: max-content; margin: clamp(32px, 6vh, 64px) var(--gutter) 0 auto;
  padding: 5px; border: 1px solid var(--line); border-radius: 999px;
  background: color-mix(in srgb, var(--bg) 70%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.acts__link { padding: 9px 16px; border-radius: 999px; transition: background-color .3s, color .3s; }
.acts__link sup { font-size: .8em; color: var(--mute); }
.acts__link.is-on { background: var(--fg); color: var(--bg); }
.acts__link.is-on sup { color: inherit; opacity: .6; }

.act { padding: clamp(64px, 12vh, 140px) var(--gutter) var(--section); }
.act__head { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: clamp(40px, 8vh, 96px); flex-wrap: wrap; }
.act__title { font-size: clamp(96px, 22vw, 420px); }

.grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: clamp(32px, 5vh, 64px) var(--gutter); }
.card { grid-column: span 3; text-align: left; display: block; width: 100%; }
.card--1 { grid-column: span 6; }
.card--3 { grid-column: span 2; }
.card__media { display: block; position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: #111; }
.card--1 .card__media { aspect-ratio: 2.39 / 1; }
.card__media img, .card__media video {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  transition: filter .6s var(--cine), transform 1.2s var(--out), opacity .4s;
}
.card__media img { filter: grayscale(1) contrast(1.1); transform: scale(1.04); }
.card__media video { opacity: 0; }
.card:hover .card__media img, .card:focus-visible .card__media img { filter: grayscale(0) contrast(1); transform: scale(1); }
.card.is-previewing .card__media video { opacity: 1; }
.card__info { display: grid; grid-template-columns: 1fr auto; gap: 8px 24px; padding-top: 16px; border-top: 1px solid transparent; }
.card__title { font: 600 clamp(18px, 1.7vw, 30px)/1.05 var(--f-display); text-transform: uppercase; letter-spacing: -0.02em; }
.card__title q { quotes: '“' '”'; }
.card--1 .card__title { font-size: clamp(22px, 2.6vw, 46px); }
.card__arrow { font: 400 22px/1 var(--f-body); transition: transform .5s var(--out); }
.card:hover .card__arrow { transform: translate(4px, -4px); }

.credits { display: grid; gap: 6px; grid-column: 1 / -1; }
.credits__wd { font: 600 11px/1.3 var(--f-mono); letter-spacing: .1em; text-transform: uppercase; }
.credits__agency { font: 400 11px/1.3 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--mute); }
.credits__note { font-family: var(--f-serif); font-style: italic; font-size: clamp(17px, 1.3vw, 21px); line-height: 1.2; }

/* ---------- CTA ---------- */
.cta {
  position: relative; min-height: 100vh; min-height: 100svh; overflow: hidden;
  display: flex; flex-direction: column; justify-content: center;
  padding: var(--section) var(--gutter);
  border-top: 1px solid var(--line);
}
.cta__slate {
  position: absolute; left: 0; right: 0; top: 0; height: clamp(28px, 5vh, 54px);
  display: grid; grid-template-columns: repeat(6, 1fr); transform: skewX(-24deg) translateX(-2%); width: 104%;
  opacity: .9;
}
.cta__slate span:nth-child(odd) { background: var(--fg); }
.cta__title { font-size: clamp(64px, 13.5vw, 260px); max-width: 9ch; }
.cta__sub { font-size: clamp(22px, 2.6vw, 44px); margin: 28px 0 48px; max-width: 26ch; line-height: 1.1; }
.cta__btn {
  display: inline-flex; align-items: center; gap: 14px;
  padding: clamp(18px, 2.4vw, 30px) clamp(26px, 3.4vw, 48px);
  border-radius: 999px; background: var(--fg); color: var(--bg);
  font: 500 clamp(17px, 1.7vw, 28px)/1 var(--f-body); letter-spacing: -0.01em;
  transition: transform .5s var(--out);
  max-width: 100%; overflow-wrap: anywhere;
}
.cta__btn:disabled { opacity: .5; cursor: progress; }

.form { display: grid; gap: clamp(24px, 4vh, 40px); max-width: 1100px; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 4vh, 40px) var(--gutter); }
.field { display: grid; gap: 10px; }
.field__label { color: var(--mute); }
.field input, .field textarea {
  width: 100%; padding: 6px 0 14px; border: 0; border-bottom: 1px solid var(--line); border-radius: 0;
  background: transparent; color: var(--fg); resize: vertical;
  font: 400 clamp(20px, 2vw, 32px)/1.25 var(--f-body); letter-spacing: -0.01em;
  transition: border-color .3s;
}
.field input:focus, .field textarea:focus { outline: none; border-bottom-color: var(--fg); }
.field.is-bad input, .field.is-bad textarea { border-bottom-color: #E5484D; }
.form__trap { position: absolute; left: -9999px; }
.form__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; margin-top: 8px; }
.form__status { color: var(--mute); }
@media (max-width: 640px) { .form__row { grid-template-columns: 1fr; } }

/* ---------- Footer ---------- */
.footer { padding: 48px var(--gutter) 28px; border-top: 1px solid var(--line); }
.footer__row { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; color: var(--mute); }
.footer__links { display: flex; gap: 24px; }
.footer__links a { color: var(--fg); }
.footer__links a:hover { text-decoration: underline; text-underline-offset: 4px; }
.footer__mark {
  font-size: 7.7vw; letter-spacing: -0.05em; white-space: nowrap; line-height: .8;
  margin: clamp(48px, 10vh, 120px) 0 24px; font-weight: 600;
}
.footer__mark span { color: var(--mute); }

/* ---------- Player ---------- */
.player {
  width: 100vw; height: 100vh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0;
  background: var(--ink); color: var(--paper);
}
.player::backdrop { background: var(--ink); }
.player[open] { display: block; animation: playerIn .6s var(--cine); }
@keyframes playerIn { from { clip-path: inset(50% 0 50% 0); } to { clip-path: inset(0 0 0 0); } }
.player__inner { height: 100%; display: grid; grid-template-rows: auto 1fr auto; padding: 18px var(--gutter) 24px; gap: 16px; }
.player__close { justify-self: end; padding: 8px 0; color: #F2F0EC; }
.player__frame { position: relative; min-height: 0; display: grid; place-items: center; }
.player__video { width: 100%; height: 100%; max-height: 100%; object-fit: contain; background: #000; }
/* Custom controls sit under the picture, so nothing ever dims the footage */
.player__frame { grid-template-rows: minmax(0, 1fr) auto; place-items: stretch; }
.player__video { cursor: pointer; }
.player__frame:fullscreen { background: #000; padding: 0 var(--gutter) 16px; }
.pc { display: flex; align-items: center; gap: 24px; padding-top: 12px; color: #F2F0EC; }
.pc button { padding: 6px 0; color: inherit; }
.pc button:hover { text-decoration: underline; text-underline-offset: 4px; }
.pc__play { min-width: 5ch; text-align: left; }
.pc__time { color: #8A8A8A; white-space: nowrap; font-variant-numeric: tabular-nums; }
.pc__seek {
  flex: 1; min-width: 60px; height: 20px; margin: 0; background: none; cursor: pointer;
  -webkit-appearance: none; appearance: none; --p: 0%;
}
.pc__seek::-webkit-slider-runnable-track { height: 2px; background: linear-gradient(90deg, #F2F0EC var(--p), rgba(242,240,236,.25) var(--p)); }
.pc__seek::-moz-range-track { height: 2px; background: linear-gradient(90deg, #F2F0EC var(--p), rgba(242,240,236,.25) var(--p)); }
.pc__seek::-webkit-slider-thumb { -webkit-appearance: none; width: 12px; height: 12px; margin-top: -5px; border-radius: 50%; background: #F2F0EC; }
.pc__seek::-moz-range-thumb { width: 12px; height: 12px; border: 0; border-radius: 50%; background: #F2F0EC; }
@media (max-width: 640px) { .pc { gap: 14px; } .pc__time { display: none; } }
.player__meta { display: grid; grid-template-columns: 1fr auto auto; align-items: end; gap: 16px 40px; }
.player__index { color: #8A8A8A; margin-bottom: 8px; }
.player__title { font-size: clamp(24px, 3.2vw, 56px); line-height: .95; letter-spacing: -0.03em; }
.player .credits { grid-column: auto; --mute: #8A8A8A; }
.player__nav { display: flex; gap: 24px; }
.player__nav button { padding: 8px 0; color: #F2F0EC; }
.player__nav button:hover, .player__close:hover { text-decoration: underline; text-underline-offset: 4px; }

/* ---------- Reveal defaults (only when JS runs) ---------- */
html.js [data-reveal] { opacity: 0; transform: translateY(40px); }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1024px) {
  .nav__tc { display: none; }
  .nav { justify-content: space-between; }
  .card--3 { grid-column: span 3; }
  .card--3:last-child:nth-child(odd) { grid-column: span 6; }
}

@media (max-width: 600px) {
  .nav { padding: 16px var(--gutter); gap: 12px; }
  .nav__mark { font-size: 13px; }
  .nav__links { display: none; }
  .nav__reel { padding: 9px 14px; }
  .hero__hud .hud__title { display: none; }
  .acts { top: 64px; margin-right: auto; margin-left: var(--gutter); }
  .grid { grid-template-columns: 1fr; }
  .card, .card--1, .card--3, .card--3:last-child:nth-child(odd) { grid-column: auto; }
  .card--1 .card__media { aspect-ratio: 16 / 9; }
  .player__meta { grid-template-columns: 1fr; }
}

/* Touch devices: color at rest, no hover previews */
@media (hover: none) {
  .card__media img { filter: none; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .grain { display: none; }
  html.js [data-reveal] { opacity: 1; transform: none; }
  html.js .mission__text .word { opacity: 1; }
}
