/* ——————————————————————————————————————————————
   the extremist and me — COVERAGE
   ten fixed 4:3 shots · the only navigation is the cut
   type: Futura (system, Apple) with self-hosted Jost fallback
   —————————————————————————————————————————————— */

/* The film's identity face is Futura (the poster/EPK use PF Futura).
   Apple devices render true system Futura; everyone else gets the
   self-hosted OFL revival Jost. TODO before launch: license PF Futura
   webfonts (Parachute) and swap them in here. */
@font-face {
  font-family: "Jost";
  src: url("assets/fonts/jost-var.woff2") format("woff2");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Jost";
  src: url("assets/fonts/jost-italic-var.woff2") format("woff2");
  font-weight: 300 700;
  font-style: italic;
  font-display: swap;
}

:root {
  --black: #060606;
  --frame-black: #0a0a0a;
  --ink: #ece9e2;
  --ink-dim: #a9a49a;
  --hairline: rgba(236, 233, 226, 0.14);
  --grot: "Futura", "Jost", "Century Gothic", sans-serif;
  --serif: "Futura", "Jost", "Century Gothic", sans-serif;  /* all-Futura, as in the EPK */
  /* the 4:3 frame, letterboxed: limited by height on wide screens, width on tall */
  --frame-w: min(100vw, calc((100vh - 7rem) * 4 / 3));
}

* { box-sizing: border-box; }

html { background: var(--black); color-scheme: dark; }
body {
  margin: 0;
  background: var(--black);
  color: var(--ink);
  font-family: var(--serif);
  font-size: clamp(1rem, 0.95rem + 0.3vw, 1.125rem);
  line-height: 1.6;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;            /* the cut replaces scrolling */
}
html:not(.js) body { overflow: auto; }  /* no JS: plain scrolling document */

::selection { background: var(--ink); color: var(--black); }

.vh {
  position: absolute; width: 1px; height: 1px;
  clip-path: inset(50%); overflow: hidden; white-space: nowrap;
}
.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  font-family: var(--grot); background: var(--ink); color: var(--black);
  padding: 0.7rem 1.2rem; text-decoration: none;
}
.skip:focus { left: 0; }

.ph { color: var(--ink-dim); }

/* ——— chrome (persistent, in the letterbox black) ————— */
.chrome {
  position: fixed; left: 0; right: 0; z-index: 30;
  display: flex; justify-content: space-between; align-items: center;
  padding: 0.9rem clamp(1rem, 3vw, 2rem);
  pointer-events: none;
}
.chrome-bottom {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
}
.chrome-legal {
  margin: 0;
  font-family: var(--grot);
  font-weight: 500;
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  color: var(--ink-dim);
  white-space: nowrap;
}
.chrome-legal a { color: var(--ink-dim); text-underline-offset: 0.2em; }
.chrome-legal a:hover { color: var(--ink); }
.chrome-top { top: 0; }
.chrome-bottom { bottom: 0; }
.chrome * { pointer-events: auto; }
html:not(.js) .chrome { position: static; }

.chrome-link {
  font-family: var(--grot);
  font-weight: 500;
  font-size: 0.87rem;
  letter-spacing: 0.18em;
  color: var(--ink-dim);
  background: none; border: 0; padding: 0.4rem 0;
  text-decoration: none;
  cursor: pointer;
}
.chrome-link:hover, .chrome-link:focus-visible { color: var(--ink); }
.chrome-link:focus-visible { outline: 1px solid var(--ink); outline-offset: 4px; }
.chrome-nav { display: flex; gap: 2.2rem; }
.chrome-title { letter-spacing: 0.18em; }

.slate {
  font-family: var(--grot);
  font-weight: 500;
  font-size: 0.87rem;
  letter-spacing: 0.18em;
  color: var(--ink-dim);
  margin: 0;
}
.cue { font-size: 1.15rem; line-height: 1; justify-self: end; }

/* ——— shots: stacked fixed layers, instant swap ————————— */
.shot { background: var(--black); }
html.js .shot {
  position: fixed; inset: 0;
  visibility: hidden;
  display: grid; place-items: center;
  padding: 3.5rem 0;            /* breathing room for the chrome bars */
}
html.js .shot.active { visibility: visible; }
html:not(.js) .shot { min-height: 100vh; display: grid; place-items: center; padding: 4rem 0; }
/* each cut moves focus to the section heading for AT / scroll-position sync;
   those headings are not interactive, so hide the browser focus ring on them
   (Brave/Safari draw it on programmatic focus) */
.shot :is(h1, h2):focus { outline: none; }

.frame-box {
  position: relative;
  width: var(--frame-w);
  aspect-ratio: 4 / 3;
  background: var(--frame-black);
  overflow: hidden;
}
.frame-box > img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.frame-black { background: var(--frame-black); }

/* shot 07 grade — bake into the asset for production */
img.crush { filter: contrast(1.05) brightness(0.98); }
img.graded {
  filter: brightness(0.74) contrast(0.88) saturate(0.42);  /* lifted, faded blacks */
  object-position: 38% 50%;
}

/* film grain + slow push-in, motion-gated */
@media (prefers-reduced-motion: no-preference) {
  html.js .shot.active .frame-box > img {
    animation: push 60s linear forwards;
  }
  @keyframes push {
    from { transform: scale(1); }
    to { transform: scale(1.02); }
  }
}

/* the 300ms cut-through-black for index jumps */
.blackout {
  position: fixed; inset: 0; z-index: 40;
  background: var(--black);
  opacity: 0; pointer-events: none;
}
.blackout.on { opacity: 1; }

/* ——— captions: live HTML inside the frame's dark zones —— */
.cap { position: absolute; z-index: 2; }

.cap-title {
  inset: 22% 6% auto;
  text-align: center;
}
.title {
  font-family: var(--grot);
  font-weight: 700;
  font-size: clamp(1.7rem, calc(var(--frame-w) * 0.046), 3.5rem);
  letter-spacing: 0.005em;
  line-height: 1;
  margin: 0;
  text-wrap: balance;
}
.tagline {
  font-family: var(--grot);
  font-weight: 400;
  font-size: clamp(0.85rem, calc(var(--frame-w) * 0.019), 1.4rem);
  letter-spacing: 0.1em;
  margin: 0.3em 0 0;
  color: var(--ink);
  opacity: 0.85;
}
.facts {
  inset: auto 0 4.5%;
  text-align: center;
  font-family: var(--grot);
  font-weight: 500;
  font-size: 0.92rem;
  letter-spacing: 0.26em;
  color: var(--ink);
  margin: 0;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.95), 0 0 24px rgba(0, 0, 0, 0.7);
}

.cap-left  { left: 6.5%; top: 50%; transform: translateY(-50%); width: min(44%, 30rem); }
.cap-right { right: 6%; top: 50%; transform: translateY(-50%); width: min(36%, 26rem); }
.cap-upperleft { left: 6.5%; top: 9%; width: min(46%, 30rem); }
.cap-upperright { right: 6%; top: 9%; width: min(42%, 28rem); }
.veil-r {
  background: linear-gradient(270deg, rgba(6,6,6,0.88) 0%, rgba(6,6,6,0.66) 72%, rgba(6,6,6,0) 100%);
  padding: 2rem 2rem 2rem 3.5rem;
  margin-right: -2rem;
}
.big-name {
  font-family: var(--grot);
  font-weight: 700;
  font-size: clamp(1.6rem, calc(var(--frame-w) * 0.034), 2.4rem);
  letter-spacing: 0.01em;
  line-height: 1.05;
  margin: 0 0 0.4rem;
}
.bio-open .lt-role { margin: 0 0 1.2rem; }
.bio-open .body { font-size: 0.95em; }

.lead {
  font-weight: 600;
  font-size: clamp(1.05rem, calc(var(--frame-w) * 0.022), 1.45rem);
  line-height: 1.45;
  margin: 0 0 1.1em;
}
.body { font-weight: 400; color: #c7c3ba; margin: 0 0 1.2em; }
.body:last-child { margin-bottom: 0; }
.smallcaps {
  font-family: var(--grot);
  font-weight: 500;
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  line-height: 2;
  color: var(--ink-dim);
  margin: 1.6em 0 0;
}

.cap-quote { margin: 0; }
.quote {
  font-style: italic;
  font-weight: 450;
  font-size: clamp(1.3rem, calc(var(--frame-w) * 0.03), 2.1rem);
  line-height: 1.34;
  margin: 0;
}
.cap-quote cite {
  display: block;
  margin-top: 1.4em;
  font-family: var(--grot);
  font-style: normal;
  font-weight: 500;
  font-size: 0.95rem;
  letter-spacing: 0.3em;
  color: var(--ink);
  opacity: 0.85;
}

/* documentary lower-third — stays above the bio panel so "close" remains reachable */
.lowerthird {
  z-index: 4;
  left: 6.5%; bottom: 7%;
  display: flex; align-items: baseline; gap: 1.4rem;
  flex-wrap: wrap;
  background: rgba(6, 6, 6, 0.78);
  padding: 0.85rem 1.3rem;
}
.lt-name {
  font-family: var(--grot);
  font-weight: 700;
  font-size: clamp(1.2rem, calc(var(--frame-w) * 0.024), 1.7rem);
  letter-spacing: 0.01em;
  margin: 0;
}
.lt-role {
  font-family: var(--grot);
  font-weight: 400;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  color: var(--ink-dim);
  margin: 0;
}
.lt-read {
  font-family: var(--grot);
  font-weight: 500;
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  color: var(--ink);
  background: none;
  border: 1px solid rgba(236, 233, 226, 0.4);
  padding: 0.45rem 1rem;
  cursor: pointer;
}
.lt-read:hover, .lt-read:focus-visible { border-color: var(--ink); }
.lt-read:focus-visible { outline: none; background: rgba(236,233,226,0.08); }
.lt-read[aria-expanded="true"] { background: var(--ink); color: var(--black); }

.bio-panel {
  position: absolute; z-index: 3;
  left: 0; right: 0; bottom: 0;
  background: rgba(8, 8, 8, 0.94);
  border-top: 1px solid var(--hairline);
  padding: 2rem clamp(1.5rem, 6.5%, 4rem) 5.5rem;
}
.bio-panel .body { max-width: 38em; }

/* veil for captions over busier frames */
.veil {
  background: linear-gradient(90deg, rgba(6,6,6,0.88) 0%, rgba(6,6,6,0.66) 72%, rgba(6,6,6,0) 100%);
  padding: 2rem 3.5rem 2rem 2rem;
  margin-left: -2rem;
}
.h2 {
  font-family: var(--grot);
  font-weight: 700;
  font-size: clamp(1.5rem, calc(var(--frame-w) * 0.03), 2.3rem);
  letter-spacing: 0.01em;
  line-height: 1.1;
  margin: 0 0 1rem;
}
.actions { display: flex; flex-wrap: wrap; gap: 0.9rem; margin: 1.6rem 0 0; }
.btn {
  display: inline-block;
  font-family: var(--grot);
  font-weight: 500;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  color: var(--ink);
  text-decoration: none;
  border: 1px solid rgba(236, 233, 226, 0.45);
  padding: 0.75rem 1.4rem;
}
.btn:hover, .btn:focus-visible { border-color: var(--ink); }
.btn-solid { background: var(--ink); color: #0c0c0c; border-color: var(--ink); }
.partners { margin-top: 2rem; }

/* ——— shot 08: contact sheet ————————————————————— */
.sheet {
  inset: 0;
  display: flex; flex-direction: column;
  justify-content: center;
  padding: 5% 7%;
}
.sheet-title {
  font-family: var(--grot);
  font-weight: 500;
  font-size: 1.1rem;
  letter-spacing: 0.32em;
  color: var(--ink-dim);
  margin: 0 0 1.6rem;
}
.contact-sheet {
  list-style: none; margin: 0; padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(0.6rem, 1.5vw, 1.2rem);
}
.cs-item {
  position: relative;
  display: block; width: 100%;
  aspect-ratio: 4 / 3;
  padding: 0; border: 0; background: #000;
  cursor: zoom-in;
}
.cs-item img {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
  opacity: 0.88;
}
.cs-item:hover img, .cs-item:focus-visible img { opacity: 1; }
.cs-item:focus-visible { outline: 1px solid var(--ink); outline-offset: 3px; }
.cs-num {
  position: absolute; left: 0.5rem; bottom: 0.35rem;
  font-family: var(--grot);
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  color: var(--ink-dim);
}

/* ——— shot 10: slate ———————————————————————————— */
.slate-card { inset: 0; display: grid; place-items: center; }
.slate-inner { display: grid; gap: 2.2rem; justify-items: center; }
.slate-type {
  font-family: var(--grot);
  font-weight: 500;
  font-size: clamp(1rem, calc(var(--frame-w) * 0.022), 1.5rem);
  letter-spacing: 0.3em;
  color: var(--ink-dim);
  margin: 0;
}

/* ——— shot 09: produced by ————————————————————————— */
img.graded-day { filter: brightness(0.66) saturate(0.42) contrast(0.84); }  /* lifted, faded blacks — matches the director shot */
.producers-cap {
  inset: auto 0 0 0;
  padding: 2.2rem 5.5% 5%;
  background: linear-gradient(to top, rgba(6,6,6,0.94) 60%, rgba(6,6,6,0.78) 82%, rgba(6,6,6,0) 100%);
}
.producers-cap .big-name { margin-bottom: 1.4rem; }
.producers-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}
.prod-name {
  font-family: var(--grot);
  font-weight: 600;
  font-size: 0.92rem;
  letter-spacing: 0.03em;
  margin: 0 0 0.5rem;
}
.prod-bio {
  font-weight: 400;
  font-size: 0.74rem;
  line-height: 1.6;
  color: #c7c3ba;
  margin: 0;
}

/* ——— shot 10: self-hosted trailer, full screen ——————————— */
html.js .shot-video { padding: 0; }
.shot-video video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;            /* bursts the letterbox on 16:9 screens */
  background: #000;
  cursor: pointer;
}
.video-toggle {
  position: absolute; left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--grot);
  font-weight: 500;
  font-size: 1rem;
  letter-spacing: 0.3em;
  text-indent: 0.3em;
  color: var(--ink);
  background: rgba(6, 6, 6, 0.55);
  border: 1px solid rgba(236, 233, 226, 0.55);
  padding: 1.1rem 2.6rem;
  cursor: pointer;
  transition: opacity 0.3s ease;
}
.video-toggle:hover, .video-toggle:focus-visible { border-color: var(--ink); }
.shot-video.playing .video-toggle { opacity: 0; pointer-events: none; }
/* captions: custom-rendered single box (native ::cue draws a box per line).
   JS syncs #cc-box text to the video; one box hugs the wider line. */
.shot-video video::cue { color: transparent; background: transparent; }  /* never show native captions */
.cc-box {
  position: absolute;
  left: 50%;
  bottom: 11%;
  transform: translateX(-50%);
  display: inline-block;
  max-width: 84%;
  z-index: 3;
  pointer-events: none;
  text-align: center;
  white-space: pre-line;          /* keep the cue's own line breaks */
  font-family: var(--grot);
  font-weight: 500;
  font-size: clamp(15px, 2.75vh, 30px);   /* bound the swing on short/tall phone viewports */
  line-height: 1.35;
  color: #fff;
  background: rgba(6, 6, 6, 0.6);
  padding: 0.1em 0.55em;
}
.cc-box[hidden] { display: none; }
.chrome-link[aria-pressed="true"] { color: var(--ink); }

/* ——— credits — the last card, inside the 4:3 frame ————— */
.credits-card {
  inset: 0;
  overflow-y: auto;
  display: grid;
  place-items: center;
  padding: clamp(1.8rem, 6%, 3.5rem) clamp(1.5rem, 8%, 4.5rem);
  font-family: var(--grot);
}
.credits-inner { width: min(100%, 36rem); text-align: left; }
.kicker {
  font-weight: 500; font-size: 1.1rem; letter-spacing: 0.32em;
  color: var(--ink-dim); margin: 0 0 1.8rem;
}
.credits-list { margin: 0; }
.credits-list > div {
  display: grid;
  grid-template-columns: 13rem 1fr;
  gap: 1.2rem;
  padding: 0.42rem 0;
  border-bottom: 1px solid rgba(236, 233, 226, 0.07);
}
.credits-list dt {
  font-size: 0.62rem; letter-spacing: 0.18em; color: var(--ink-dim);
  padding-top: 0.18rem;
}
.credits-list dd { margin: 0; font-size: 0.85rem; font-weight: 500; }
.credits-note {
  font-weight: 400;
  font-size: 0.8rem;
  color: var(--ink-dim);
  max-width: 38em;
  margin: 1.6rem 0 0;
}
.credits-contact { margin: 2rem 0 0; font-size: 1.05rem; }
.credits-contact a { color: var(--ink); text-underline-offset: 0.2em; }
.credits-legal { margin: 1.4rem 0 0; font-size: 0.7rem; letter-spacing: 0.12em; color: var(--ink-dim); }
.credits-legal a { color: var(--ink-dim); }

/* ——— overlays ——————————————————————————————————— */
.rushes, .index {
  border: 0; padding: 0; background: transparent;
  max-width: none; max-height: none;
}
.rushes::backdrop, .index::backdrop { background: rgba(4, 4, 4, 0.96); }

.rushes-fig { margin: 0; }
.rushes-fig img {
  display: block;
  max-width: min(94vw, calc(86vh * 4 / 3));
  max-height: 86vh;
}
.rushes-fig figcaption {
  font-family: var(--grot);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  color: var(--ink-dim);
  text-align: center;
  padding-top: 0.9rem;
}
.lb-btn {
  position: fixed; z-index: 2;
  font-family: var(--grot);
  font-size: 1.4rem; line-height: 1;
  color: var(--ink);
  background: transparent; border: 0;
  padding: 1rem 1.1rem;
  cursor: pointer;
  opacity: 0.75;
}
.lb-btn:hover, .lb-btn:focus-visible { opacity: 1; }
.lb-close { top: 0.5rem; right: 0.75rem; font-size: 1.9rem; }
.lb-prev { left: 0.5rem; top: 50%; transform: translateY(-50%); }
.lb-next { right: 0.5rem; top: 50%; transform: translateY(-50%); }

.index { display: none; inset: 0; place-items: center; width: 100%; height: 100%; background: rgba(4, 4, 4, 0.93); }
.index[open] { display: grid; }
.index-list { list-style: none; margin: 0; padding: 2rem; max-height: 100vh; max-height: 100dvh; overflow-y: auto; }
.index-list button {
  display: flex; gap: 1.6rem; align-items: baseline;
  width: 100%;
  font-family: var(--grot);
  font-weight: 450;
  font-size: clamp(1rem, 2.4vh, 1.3rem);
  letter-spacing: 0.04em;
  color: var(--ink-dim);
  background: none; border: 0;
  padding: 0.45rem 0.5rem;
  cursor: pointer;
  text-align: left;
}
.index-list button span {
  font-size: 0.68rem; letter-spacing: 0.18em;
  width: 2.2rem; flex: none;
}
.index-list button:hover, .index-list button:focus-visible { color: var(--ink); }
.index-list button:focus-visible { outline: 1px solid var(--hairline); }

/* ——— portrait / narrow screens ————————————————————— */
@media (max-aspect-ratio: 5/6), (max-width: 640px) {
  :root { --frame-w: 100vw; }
  html.js .shot {
    display: flex; flex-direction: column;
    place-items: initial;
    justify-content: flex-start;
    padding: 3.2rem 0 4.5rem;   /* clear the bottom chrome at scroll end */
    overflow-y: auto;
  }
  /* the frame grows around image + caption: image static, box unlocked */
  .frame-box { flex: none; margin-top: auto; aspect-ratio: auto; overflow: visible; }
  .frame-box > img { position: static; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; }
  .frame-black { aspect-ratio: 4 / 3; }   /* shots without an image keep the frame */
  .frame-box::after { display: none; }    /* no grain over flowed captions */
  html.js .shot > :last-child { margin-bottom: auto; }  /* center the group when content is short */
  /* captions move out of the frame into the black below */
  .cap-left, .cap-right, .cap-upperleft, .cap-upperright {
    position: static; transform: none;
    width: auto;
    padding: 1.6rem 1.4rem 0.4rem;
  }
  .veil, .veil-r { background: none; margin: 0; padding: 1.6rem 1.4rem 0.4rem; }
  .chrome { background: rgba(6, 6, 6, 0.94); }   /* solid bars: content scrolls beneath */
  .chrome-link, .slate { font-size: 0.62rem; }
  .slate { white-space: nowrap; }
  .chrome-legal { font-size: 0.56rem; letter-spacing: 0.06em; }
  .hide-sm { display: none; }
  .facts { font-size: 0.66rem; letter-spacing: 0.18em; padding: 0 0.8rem; }
  #credits .frame-black { aspect-ratio: auto; }
  .shot-video video { object-fit: contain; }
  .producers-cap { position: static; background: none; padding: 1.6rem 1.4rem 0.4rem; }
  .producers-grid { grid-template-columns: 1fr; gap: 1.4rem; }
  .credits-card { position: static; overflow: visible; }
  .credits-list > div { grid-template-columns: 1fr; gap: 0.15rem; }
  .cap-title { inset: 6% 5% auto; }   /* title sits high on the wall band */
  .title { font-size: clamp(1.7rem, 8vw, 2.4rem); }
  .tagline { letter-spacing: 0.24em; font-size: 0.85rem; }
  .lowerthird { position: static; padding: 1.6rem 1.4rem 0; }
  .bio-panel {
    position: static;
    background: none; border: 0;
    padding: 0.8rem 1.4rem 0.4rem;
  }
  .sheet { position: static; padding: 1.2rem 1rem; }
  .contact-sheet { grid-template-columns: 1fr 1fr; }
  .credits-list > div { grid-template-columns: 1fr; gap: 0.2rem; }
}
