/* ============================================================
   RIDGE & REVOLVER — CELLULOID NOIR
   One accent. Deep shadow. Everything else is restraint.

   DESIGN LAW LIVES HERE. Edit these tokens; the site follows.
   ============================================================ */

/* -- Animatable custom properties (the world engine) -------- */
@property --accent    { syntax: '<color>'; inherits: true; initial-value: #8E2430; }
@property --accent-hi { syntax: '<color>'; inherits: true; initial-value: #D2545F; }
@property --glow      { syntax: '<color>'; inherits: true; initial-value: rgba(142,36,48,.55); }

:root {
  /* THE ACCENT — oxblood. The only saturated thing on screen. */
  --accent:    #8E2430;   /* deep blood red, hue 352° */
  --accent-hi: #D2545F;   /* same hue, lifted — small text & buttons only */
  --glow:      rgba(142,36,48,.55);

  /* SURFACES — warm near-black. True black reserved for letterbox. */
  --black:   #000000;
  --bg:      #0C0A09;
  --surface: #141110;
  --line:    #292423;

  /* INK */
  --bone:    #EDE7DC;
  --grey:    #969087;
  --dim:     #575149;

  /* TYPE */
  --sans:  'Archivo', system-ui, sans-serif;
  --serif: 'Bodoni Moda', serif;          /* the scalpel — 3 uses, total */
  --mono:  'IBM Plex Mono', monospace;    /* instrumentation only */

  /* MOTION — editing, not animation */
  --ease:   cubic-bezier(.22, 1, .36, 1);
  --hold:   .9s;
  --cut:    .35s;

  /* LETTERBOX */
  --lb: clamp(10px, 1.6vh, 16px);
}

/* -- THE WORLDS ---------------------------------------------
   Each Original redefines the single accent. Hover a title and
   the whole room re-lights. Never two accents at once. */
html[data-world="velvet-static"] { --accent:#B87220; --accent-hi:#E8A54B; --glow:rgba(201,127,43,.55); }
html[data-world="cold-open"]     { --accent:#3F708D; --accent-hi:#7FB3CF; --glow:rgba(78,126,155,.55); }
html[data-world="paper-saints"]  { --accent:#35735A; --accent-hi:#67AE8F; --glow:rgba(63,125,100,.55); }
html[data-world="understudy"]    { --accent:#B32431; --accent-hi:#E0525E; --glow:rgba(179,36,49,.55); }
html[data-world="night-swim"]    { --accent:#5E4390; --accent-hi:#9C7BD1; --glow:rgba(110,78,158,.55); }

html {
  transition: --accent var(--hold) var(--ease),
              --accent-hi var(--hold) var(--ease),
              --glow var(--hold) var(--ease),
              --lb var(--hold) var(--ease);
}
html.world-focus { --lb: clamp(18px, 3.4vh, 34px); } /* the letterbox tightens */

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--bone);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, video { max-width: 100%; display: block; }
a { color: inherit; }

::selection { background: var(--accent); color: var(--bone); }

:focus-visible {
  outline: 2px solid var(--accent-hi);
  outline-offset: 3px;
}

/* -- Letterbox ---------------------------------------------- */
.letterbox::before, .letterbox::after {
  content: '';
  position: fixed; left: 0; right: 0;
  height: var(--lb);
  background: var(--black);
  z-index: 90;
  pointer-events: none;
  transition: height var(--hold) var(--ease);
}
.letterbox::before { top: 0; }
.letterbox::after  { bottom: 0; }

/* -- Ambient light (the room) ------------------------------- */
.ambient {
  position: fixed; inset: 0;
  z-index: 0; pointer-events: none;
}
.ambient::before {
  content: '';
  position: absolute;
  left: 50%; bottom: -30vh;
  width: 130vw; height: 90vh;
  transform: translateX(-50%);
  background: var(--glow);
  filter: blur(140px);
  opacity: .16;
  border-radius: 50%;
  transition: background var(--hold) var(--ease);
}
html.world-focus .ambient::before { opacity: .26; }

/* -- Grain --------------------------------------------------- */
.grain {
  position: fixed; inset: -60px;
  z-index: 95; pointer-events: none;
  opacity: .06;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 1.4s steps(6) infinite;
}
@keyframes grain {
  0%   { transform: translate(0,0); }
  25%  { transform: translate(-24px, 18px); }
  50%  { transform: translate(16px, -28px); }
  75%  { transform: translate(-12px, -10px); }
  100% { transform: translate(0,0); }
}

/* ============================================================
   TYPE SCALE
   ============================================================ */
h1, h2, h3 { margin: 0; font-weight: 800; letter-spacing: -.02em; line-height: 1.02; }

.display {
  font-weight: 900;
  font-size: clamp(2.6rem, 9.5vw, 6.5rem);
  text-transform: uppercase;
  letter-spacing: -.015em;
}
.display .serif-cut {          /* SERIF MOMENT — used once per page, max */
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
  color: var(--accent-hi);
  transition: color var(--hold) var(--ease);
}

.h2 {
  font-size: clamp(1.8rem, 5.4vw, 3.4rem);
  text-transform: uppercase;
  font-weight: 900;
}

.lede {
  font-size: clamp(1.02rem, 2.6vw, 1.25rem);
  color: var(--grey);
  max-width: 34em;
  font-weight: 400;
}

/* Mono = the studio's instrumentation voice. Nothing else. */
.meta {
  font-family: var(--mono);
  font-size: .72rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--grey);
}
.meta--accent { color: var(--accent-hi); transition: color var(--hold) var(--ease); }

.rule {
  border: 0; height: 1px;
  background: var(--line);
  margin: 0;
}

/* ============================================================
   LAYOUT
   ============================================================ */
.wrap {
  width: min(1200px, 100% - 2.5rem);
  margin-inline: auto;
}
main { position: relative; z-index: 1; }
section { padding: clamp(4rem, 12vh, 8rem) 0; }

/* -- Reveal (a hold, then a cut in) -------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .9s var(--ease), transform .9s var(--ease);
}
.reveal.in { opacity: 1; transform: none; }

/* ============================================================
   NAV
   ============================================================ */
.nav {
  position: fixed;
  top: var(--lb); left: 0; right: 0;
  z-index: 80;
  display: flex; align-items: center; justify-content: space-between;
  padding: .9rem 1.25rem;
  transition: top var(--hold) var(--ease), background var(--cut) var(--ease);
}
.nav.scrolled { background: linear-gradient(rgba(0,0,0,.82), transparent); }

.wordmark {
  font-weight: 900;
  font-size: .95rem;
  letter-spacing: .26em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
}
.wordmark .amp { color: var(--accent-hi); transition: color var(--hold) var(--ease); }

.nav-toggle {
  appearance: none; border: 0; background: transparent;
  width: 48px; height: 48px;
  display: grid; place-items: center;
  cursor: pointer;
  z-index: 86;
}
.nav-toggle span, .nav-toggle::before, .nav-toggle::after {
  content: '';
  display: block;
  width: 26px; height: 2px;
  background: var(--bone);
  margin: 3.5px 0;
  transition: transform var(--cut) var(--ease), opacity var(--cut) var(--ease);
}
.nav-open .nav-toggle::before { transform: translateY(5.5px) rotate(45deg); }
.nav-open .nav-toggle::after  { transform: translateY(-5.5px) rotate(-45deg); }
.nav-open .nav-toggle span    { opacity: 0; }

.menu {
  position: fixed; inset: 0;
  z-index: 84;
  background: rgba(5,4,4,.96);
  display: grid; place-items: center;
  opacity: 0; visibility: hidden;
  transition: opacity var(--cut) var(--ease), visibility 0s linear var(--cut);
}
.nav-open .menu { opacity: 1; visibility: visible; transition-delay: 0s; }
.menu ol {
  list-style: none; margin: 0; padding: 0;
  text-align: center;
  counter-reset: reel;
}
.menu a {
  display: block;
  padding: .55rem 1rem;
  font-weight: 900;
  font-size: clamp(1.9rem, 7vw, 3.2rem);
  text-transform: uppercase;
  letter-spacing: -.01em;
  text-decoration: none;
  color: var(--bone);
  transition: color var(--cut) var(--ease);
}
.menu a::before {
  counter-increment: reel;
  content: counter(reel, decimal-leading-zero);
  display: block;
  font-family: var(--mono);
  font-size: .68rem;
  letter-spacing: .3em;
  color: var(--dim);
}
.menu a:hover, .menu a[aria-current="page"] { color: var(--accent-hi); }

/* ============================================================
   BUTTONS / CTA
   ============================================================ */
.btn {
  display: inline-block;
  font-family: var(--mono);
  font-size: .78rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--bone);
  background: var(--accent);
  padding: 1.05rem 1.9rem;
  border: 0;
  cursor: pointer;
  transition: background var(--hold) var(--ease), transform var(--cut) var(--ease);
}
.btn:hover { transform: translateY(-2px); }
.btn--ghost {
  background: transparent;
  box-shadow: inset 0 0 0 1px var(--line);
  color: var(--grey);
}
.btn--ghost:hover { color: var(--bone); box-shadow: inset 0 0 0 1px var(--grey); }

.sticky-cta {
  position: fixed;
  left: 1rem; right: 1rem;
  bottom: calc(var(--lb) + .9rem);
  z-index: 70;
  text-align: center;
  transform: translateY(150%);
  transition: transform .5s var(--ease), bottom var(--hold) var(--ease);
}
.sticky-cta.show { transform: none; }
.sticky-cta .btn { width: 100%; max-width: 420px; box-shadow: 0 10px 40px rgba(0,0,0,.6); }
@media (min-width: 800px) { .sticky-cta { display: none; } }

/* ============================================================
   HERO — the title sequence
   ============================================================ */
.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  align-content: end;
  padding: 0 0 clamp(4rem, 12vh, 7rem);
  isolation: isolate;
}
.hero-media {
  position: absolute; inset: 0; z-index: -2;
  overflow: hidden;
}
.hero-media img, .hero-media video {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 30%;
}
.hero::after {
  content: '';
  position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg,
    rgba(12,10,9,.55) 0%,
    rgba(12,10,9,.15) 40%,
    rgba(12,10,9,.88) 82%,
    var(--bg) 100%);
}
.hero .meta { margin-bottom: 1.1rem; }
.hero .lede { margin: 1.4rem 0 2.2rem; }

/* ============================================================
   THE SLATE — the world-building engine
   ============================================================ */
.slate-grid {
  display: grid;
  gap: 1.1rem;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  margin-top: 2.5rem;
}

.slate-card {
  position: relative;
  display: block;
  width: 100%;
  padding: 0; border: 0;
  background: var(--surface);
  text-align: left;
  color: inherit;
  cursor: pointer;
  aspect-ratio: 9 / 16;
  overflow: hidden;
  transition: opacity var(--hold) var(--ease),
              filter var(--hold) var(--ease),
              box-shadow var(--hold) var(--ease);
}
.slate-card img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 1.6s var(--ease);
}
.slate-card::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(0,0,0,.88) 92%);
}
.slate-card .card-ink {
  position: absolute; left: 0; right: 0; bottom: 0;
  z-index: 1;
  padding: 1.1rem 1.1rem 1.2rem;
}
.slate-card .meta { font-size: .62rem; }
.slate-card h3 {
  font-size: clamp(1.15rem, 2.2vw, 1.5rem);
  text-transform: uppercase;
  font-weight: 900;
  margin: .35rem 0 .3rem;
}
.slate-card p {
  margin: 0;
  font-size: .82rem;
  color: var(--grey);
  line-height: 1.45;
  opacity: 0;
  max-height: 0;
  transition: opacity var(--hold) var(--ease), max-height var(--hold) var(--ease);
}

/* Focus pull: the room dims around the one show you're watching */
.slate-card.is-world {
  box-shadow: 0 0 0 1px var(--accent), 0 24px 80px -20px var(--glow);
}
.slate-card.is-world img { transform: scale(1.045); }
.slate-card.is-world p { opacity: 1; max-height: 8em; }
.slate-card.is-world .meta { color: var(--accent-hi); }

.engine.world-active .slate-card:not(.is-world) {
  opacity: .3;
  filter: saturate(.15) brightness(.55);
}

/* ============================================================
   SCREENER — full-bleed episode overlay
   ============================================================ */
.screener {
  position: fixed; inset: 0;
  z-index: 100;
  background: rgba(2,2,2,.96);
  display: grid; place-items: center;
  opacity: 0; visibility: hidden;
  transition: opacity var(--cut) var(--ease), visibility 0s linear var(--cut);
}
.screener.open { opacity: 1; visibility: visible; transition-delay: 0s; }
.screener figure {
  margin: 0;
  width: min(92vw, 52svh);
}
.screener .frame {
  position: relative;
  aspect-ratio: 9 / 16;
  background: var(--black);
  box-shadow: 0 0 0 1px var(--line), 0 40px 120px -30px var(--glow);
}
.screener .frame img, .screener .frame video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
.screener figcaption {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 1rem;
  padding-top: .9rem;
}
.screener .credit {                 /* SERIF MOMENT — the signature */
  font-family: var(--serif);
  font-style: italic;
  font-size: .95rem;
  color: var(--grey);
}
.screener .credit em { font-style: italic; color: var(--accent-hi); }
.screener-close {
  position: absolute;
  top: calc(var(--lb) + .8rem); right: 1rem;
  appearance: none; border: 0;
  background: transparent;
  color: var(--bone);
  font-family: var(--mono);
  font-size: .72rem;
  letter-spacing: .22em;
  padding: .8rem;
  cursor: pointer;
}
.screener .note {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  background: rgba(0,0,0,.35);
}
.screener .note span {
  font-family: var(--mono);
  font-size: .66rem;
  letter-spacing: .26em;
  text-transform: uppercase;
  color: var(--bone);
  border: 1px solid var(--line);
  padding: .8rem 1.2rem;
  background: rgba(0,0,0,.55);
}

/* ============================================================
   CALL SHEET — process rows (Development / Home)
   ============================================================ */
.callsheet { margin-top: 2.5rem; border-top: 1px solid var(--line); }
.act {
  display: grid;
  grid-template-columns: 5.5rem 1fr;
  gap: 1.2rem;
  padding: 1.8rem 0;
  border-bottom: 1px solid var(--line);
  align-items: start;
}
.act .meta { padding-top: .4rem; }
.act h3 {
  font-size: clamp(1.25rem, 3.4vw, 1.9rem);
  text-transform: uppercase;
  font-weight: 900;
  margin-bottom: .5rem;
}
.act p { margin: 0; color: var(--grey); max-width: 46em; }
@media (min-width: 800px) {
  .act { grid-template-columns: 9rem 22rem 1fr; }
}

/* ============================================================
   NUMBERS — instrumentation
   ============================================================ */
.numbers {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2.5rem 1.5rem;
  margin-top: 2.5rem;
}
@media (min-width: 800px) { .numbers { grid-template-columns: repeat(4, 1fr); } }
.num strong {
  display: block;
  font-weight: 900;
  font-size: clamp(2.2rem, 6vw, 3.6rem);
  letter-spacing: -.03em;
  line-height: 1;
}
.num strong sup { font-size: .45em; color: var(--accent-hi); transition: color var(--hold) var(--ease); }
.num .meta { margin-top: .55rem; display: block; }

/* ============================================================
   STUDIO — portraits & pull quote
   ============================================================ */
.crew {
  display: grid;
  gap: 1.1rem;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  margin-top: 2.5rem;
}
.crew figure { margin: 0; }
.crew .frame {
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: var(--surface);
}
.crew img {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.05);
}
.crew figcaption { padding-top: .8rem; }
.crew figcaption strong { display: block; font-weight: 800; letter-spacing: .02em; }

.pullquote {                        /* SERIF MOMENT — the philosophy */
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(1.5rem, 4.6vw, 2.6rem);
  line-height: 1.25;
  max-width: 22em;
  margin: 0;
}
.pullquote mark {
  background: none;
  color: var(--accent-hi);
  transition: color var(--hold) var(--ease);
}

/* ============================================================
   GREENLIGHT — the pitch
   ============================================================ */
.pitch-form { margin-top: 2.5rem; max-width: 640px; }
.field { margin-bottom: 1.8rem; }
.field label {
  display: block;
  font-family: var(--mono);
  font-size: .68rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--grey);
  margin-bottom: .6rem;
}
.field input, .field select, .field textarea {
  width: 100%;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  color: var(--bone);
  font-family: var(--sans);
  font-size: 1.05rem;
  padding: .7rem 0;
  border-radius: 0;
  transition: border-color var(--cut) var(--ease);
}
.field select { appearance: none; }
.field select option { background: var(--surface); }
.field textarea { min-height: 9em; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-bottom-color: var(--accent-hi);
}

/* ============================================================
   FOOTER
   ============================================================ */
footer {
  border-top: 1px solid var(--line);
  padding: 2.4rem 0 calc(var(--lb) + 5.5rem);
  position: relative; z-index: 1;
}
@media (min-width: 800px) { footer { padding-bottom: calc(var(--lb) + 2.4rem); } }
.foot {
  display: flex; flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  align-items: baseline;
}
.foot nav { display: flex; gap: 1.4rem; flex-wrap: wrap; }
.foot a { text-decoration: none; }
.foot a:hover { color: var(--accent-hi); }

/* ============================================================
   FINALE — end-of-page CTA
   ============================================================ */
.finale { text-align: left; }
.finale .display { font-size: clamp(2.2rem, 8vw, 5rem); }
.finale .btn { margin-top: 2.2rem; }

/* ============================================================
   ACCESSIBILITY / MOTION
   ============================================================ */
.skip {
  position: absolute; left: -999px; top: 0;
  z-index: 200;
  background: var(--accent); color: var(--bone);
  padding: .8rem 1.2rem;
  font-family: var(--mono); font-size: .75rem;
}
.skip:focus { left: 0; top: 0; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001s !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001s !important;
  }
  .grain { animation: none; }
  .reveal { opacity: 1; transform: none; }
}
