/* ===========================================================
   THE SCENE · Missing Door Films
   Foundations: color, type, scale.
   Dark, kinetic, grainy. Not corporate. Not neon. Not bright.
   =========================================================== */

@import url('https://fonts.googleapis.com/css2?family=Anton&family=Instrument+Serif:ital@0;1&family=JetBrains+Mono:ital,wght@0,400;0,500;0,700;1,400&display=swap');

:root {
  /* ---------- COLOR · base ----------
     A nearly-black ground. Paper-warm text. A red that means strobe,
     not button-on-a-marketing-site. Use accents like punctuation: rarely. */

  --bg:        #0a0a0a;   /* persistent page ground */
  --bg-2:      #131110;   /* a half-step up — for slight layering */
  --bg-3:      #1a1612;   /* warm-leaning ink, for split panels */
  --ink:       #050505;   /* deeper than bg, for shadow wells */

  --fg:        #ededeb;   /* paper-white, faintly warm */
  --fg-2:      #b8b3ad;   /* secondary text (metadata, captions) */
  --fg-3:      #6f6a64;   /* tertiary / muted (rules, labels) */
  --fg-4:      #3a3733;   /* near-invisible (borders, scaffolding) */

  --rule:      #2a2724;   /* hairline borders */
  --rule-soft: #1e1c1a;   /* even softer dividers */

  /* ---------- COLOR · strobe ----------
     The film's only saturated colors. Treat as gels, not fills.
     Red is the dominant accent; amber is reserved for warmth flashes. */

  --red:       #cc2200;   /* primary strobe — calls to action, kinetic moments */
  --red-deep:  #8b0a05;   /* deep crimson — the Theyyam red, blood red */
  --red-burn:  #5a0a02;   /* near-black red for shadows under red light */
  --amber:     #d97c2a;   /* sodium-vapor street light, rare */

  /* ---------- SEMANTIC ---------- */
  --selection-bg: var(--red);
  --selection-fg: var(--fg);
  --link:         var(--fg);
  --link-hover:   var(--red);
  --underline:    var(--fg-3);

  /* ---------- TYPE FAMILIES ----------
     Three voices, no more.
       · Display — Anton: condensed, undeniable, all-caps kinetic
       · Serif   — Instrument Serif: editorial, italic for breath
       · Mono    — JetBrains Mono: metadata, numbers, labels, the system
  */
  --font-display: 'Anton', 'Bebas Neue', 'Oswald', 'Impact', sans-serif;
  --font-serif:   'Instrument Serif', 'Cormorant Garamond', 'EB Garamond', Georgia, serif;
  --font-mono:    'JetBrains Mono', 'IBM Plex Mono', 'Menlo', ui-monospace, monospace;

  /* ---------- TYPE SCALE ----------
     Clamp-driven, kinetic at the top end. Reads from a phone, screams at 1920. */
  --t-display-xl: clamp(64px, 14vw, 240px);   /* page-anchor titles, the WORD */
  --t-display-l:  clamp(48px, 9vw, 160px);    /* section openers */
  --t-display-m:  clamp(40px, 6vw, 96px);     /* sub-headers */
  --t-serif-xl:   clamp(28px, 4.2vw, 68px);   /* pull-quotes, statements */
  --t-serif-l:    clamp(22px, 2.4vw, 36px);   /* lead paragraphs, loglines */
  --t-body:       clamp(15px, 1.05vw, 17px);  /* body */
  --t-body-l:     clamp(17px, 1.25vw, 20px);  /* spaced body */
  --t-small:      clamp(12px, 0.85vw, 13px);  /* mono labels */
  --t-xs:         11px;                       /* fine print, numbers */

  /* ---------- WEIGHTS ---------- */
  --w-regular: 400;
  --w-medium:  500;
  --w-bold:    700;

  /* ---------- LINE / TRACKING ---------- */
  --lh-display: 0.92;
  --lh-tight:   1.1;
  --lh-snug:    1.3;
  --lh-body:    1.55;
  --lh-loose:   1.7;

  --ls-display: -0.02em;  /* slight crunch on big type */
  --ls-mono:    0.08em;
  --ls-mono-lg: 0.14em;   /* for ALL-CAPS mono labels */
  --ls-body:    0;

  /* ---------- SPACE ---------- */
  --s-0:  4px;
  --s-1:  8px;
  --s-2:  12px;
  --s-3:  16px;
  --s-4:  24px;
  --s-5:  32px;
  --s-6:  48px;
  --s-7:  64px;
  --s-8:  96px;
  --s-9:  144px;
  --s-10: 192px;

  /* ---------- LAYOUT ----------
     No cards. Full-bleed sections with generous edge gutters. */
  --gutter:      clamp(20px, 4vw, 80px);
  --section-pad: clamp(96px, 12vh, 200px);
  --col-max:     1440px;
  --reading-max: 68ch;

  /* ---------- LINES ---------- */
  --hair: 1px;
  --line: 2px;

  /* ---------- MOTION ----------
     No bounces. No spring. Restrained, decisive. */
  --ease:        cubic-bezier(0.2, 0.7, 0.2, 1);    /* default */
  --ease-out:    cubic-bezier(0.16, 1, 0.3, 1);     /* exits */
  --ease-strobe: steps(2, end);                     /* on-off strobe */
  --d-quick:  120ms;
  --d-med:    300ms;
  --d-slow:   600ms;
  --d-reveal: 900ms;
}

/* ===========================================================
   BASE
   =========================================================== */

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

html { background: var(--bg); color-scheme: dark; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-mono);
  font-size: var(--t-body);
  line-height: var(--lh-body);
  letter-spacing: var(--ls-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--selection-bg); color: var(--selection-fg); }

/* ===========================================================
   SEMANTIC TYPE STYLES
   The vocabulary every page draws from.
   =========================================================== */

/* Display — Anton, condensed, brutal, ALL CAPS */
.t-display-xl,
.t-display-l,
.t-display-m {
  font-family: var(--font-display);
  font-weight: var(--w-regular);
  line-height: var(--lh-display);
  letter-spacing: var(--ls-display);
  text-transform: uppercase;
  color: var(--fg);
  margin: 0;
}
.t-display-xl { font-size: var(--t-display-xl); }
.t-display-l  { font-size: var(--t-display-l); }
.t-display-m  { font-size: var(--t-display-m); }

/* Editorial — Instrument Serif. Italic is the voice of feeling. */
.t-serif-xl, .t-serif-l {
  font-family: var(--font-serif);
  font-weight: var(--w-regular);
  line-height: var(--lh-tight);
  color: var(--fg);
  margin: 0;
}
.t-serif-xl { font-size: var(--t-serif-xl); }
.t-serif-l  { font-size: var(--t-serif-l); line-height: var(--lh-snug); }

.t-quote {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: var(--t-serif-xl);
  line-height: var(--lh-snug);
  color: var(--fg);
}

/* Body */
.t-body {
  font-family: var(--font-mono);
  font-size: var(--t-body);
  line-height: var(--lh-body);
  color: var(--fg);
  max-width: var(--reading-max);
}
.t-body-serif {
  font-family: var(--font-serif);
  font-size: var(--t-body-l);
  line-height: var(--lh-loose);
  color: var(--fg);
  max-width: var(--reading-max);
}

/* Mono labels — the editorial overlay. Numbers, sections, metadata. */
.t-label {
  font-family: var(--font-mono);
  font-size: var(--t-small);
  letter-spacing: var(--ls-mono-lg);
  text-transform: uppercase;
  color: var(--fg-3);
  font-weight: var(--w-medium);
}
.t-label--red { color: var(--red); }
.t-label--fg  { color: var(--fg); }

.t-num {
  font-family: var(--font-mono);
  font-feature-settings: 'tnum' 1, 'lnum' 1;
  letter-spacing: var(--ls-mono);
  color: var(--fg);
}

/* Native element defaults — match the system */
h1 { font: var(--w-regular) var(--t-display-xl)/var(--lh-display) var(--font-display);
     letter-spacing: var(--ls-display); text-transform: uppercase; margin: 0; }
h2 { font: var(--w-regular) var(--t-display-l)/var(--lh-display) var(--font-display);
     letter-spacing: var(--ls-display); text-transform: uppercase; margin: 0; }
h3 { font: var(--w-regular) var(--t-display-m)/var(--lh-tight) var(--font-display);
     letter-spacing: var(--ls-display); text-transform: uppercase; margin: 0; }
h4 { font: var(--w-regular) var(--t-serif-l)/var(--lh-snug) var(--font-serif);
     margin: 0; color: var(--fg); }
h5 { font: var(--w-medium) var(--t-small)/1.3 var(--font-mono);
     letter-spacing: var(--ls-mono-lg); text-transform: uppercase;
     margin: 0; color: var(--fg-3); }

p { margin: 0 0 var(--s-4) 0; max-width: var(--reading-max); }
small { font-family: var(--font-mono); font-size: var(--t-xs); color: var(--fg-3);
        letter-spacing: var(--ls-mono); }

a {
  color: var(--link);
  text-decoration: underline;
  text-decoration-color: var(--underline);
  text-underline-offset: 4px;
  text-decoration-thickness: 1px;
  transition: color var(--d-quick) var(--ease),
              text-decoration-color var(--d-quick) var(--ease);
}
a:hover {
  color: var(--link-hover);
  text-decoration-color: var(--link-hover);
}

hr {
  border: 0;
  border-top: var(--hair) solid var(--rule);
  margin: var(--s-5) 0;
}

/* ===========================================================
   UTILITY · grain + scanline texture (subtle, not gaudy)
   =========================================================== */
.grain::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.06;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.6 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

/* The grid texture — barely there */
.bg-grid {
  background-image:
    linear-gradient(to right, rgba(255,255,255,0.018) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,0.018) 1px, transparent 1px);
  background-size: 80px 80px;
}
