/* Aufilm design tokens — radical redesign 2026-10-14. One sheet shared by every
   screen: Login, Projects, Script Editor, Workbench. Theme = light (default) /
   dark via <html data-theme="dark">, persisted under localStorage "aria_theme".

   MASTER MARK: the Aufilm crescent-profile emblem (static/brand/
   aria_mark_source.png). Three derived files, never redrawn:
     aria_mark.png       cream, for the always-dark rail and dark surfaces
     aria_mark_ink.png   ink, for light paper surfaces
     aria_mark_disc.png  cream on a night disc: favicon, app icons, anywhere
   The palette is sampled from that emblem: its cream (#EFE7D2) and its night
   ground, plus ONE constructivist signal red that carries meaning (active
   navigation, primary actions, warnings). No orange, no gradients-as-decor.

   TYPE: self-hosted Hanken Grotesk (OFL) for every UI surface; Courier Prime
   for the screenplay page. Headings use 700/800 uppercase with tight tracking —
   poster typography, not dashboard typography. */

/* Self-hosted brand fonts (OFL) — the product runs local-first and must not
   depend on Google Fonts being reachable. Latin subsets. */
@font-face {
  font-family: 'Hanken Grotesk';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('fonts/hanken-grotesk-latin-var.woff2') format('woff2');
}
@font-face {
  font-family: 'Courier Prime';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/courier-prime-latin-400.woff2') format('woff2');
}
@font-face {
  font-family: 'Courier Prime';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('fonts/courier-prime-latin-700.woff2') format('woff2');
}

:root {
  /* ---- brand (fixed in both themes) ---- */
  --night: #0E0D0B;
  --night-2: #17150F;
  --cream: #EFE7D2;
  --ink-brand: #16140F;
  --paper-brand: #EFE7D2;
  --oxblood: #16140F;           /* legacy name: the hero band is now night ink */
  --oxblood-border: #000000;
  /* Signal red. 5.9:1 on the light paper — it carries information. */
  --red: #B3261E;
  --red-hover: #8F1D17;
  /* Legacy token NAMES kept (~80 call sites). --gold resolves to the signal
     red, --gold-dark to a warm graphite for quiet labels. */
  --gold: #B3261E;
  --gold-dark: #5E574B;
  --green: #2F6B3A;
  --error-text: #E2726B;
  --near-black: #0E0D0B;
  --auth-card: #17150F;
  --input-border-dark: #3A352B;
  --dark-muted: #A79F8E;

  /* ---- light theme: warm print paper ---- */
  --bg: #EFEAE0;
  --card: #F8F5EE;
  --card2: #E9E3D6;
  --edit: #FBF8F1;
  --sel: #E2DACA;
  --ink: #16140F;
  --title: #16140F;
  --muted: #5E574B;
  --faint: #847C6E;
  --line: #D3CBBA;
  --line2: #E1DACB;
  --grain-opacity: 0;
  --grain-blend: multiply;
  --halftone-ink: rgba(22, 20, 15, .30);
  --shadow: 0 1px 0 rgba(22,20,15,.04), 0 10px 30px rgba(22,20,15,.06);

  /* ---- type ---- */
  --font-ui: 'Hanken Grotesk', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: ui-monospace, 'SF Mono', Menlo, monospace;
  --font-screenplay: 'Courier Prime', 'Courier New', monospace;

  /* ---- layout ---- */
  --rail-w: 264px;
  --radius: 3px;
}

[data-theme="dark"] {
  /* The night room: a dark maroon-black field (the light-leak atmosphere
     itself is painted in film-surface.css §16) with near-solid warm slabs
     above it. Lines are stronger than a dashboard's so panels read as
     printed matter, not floating glass. */
  --bg: #0D0A08;
  --card: #171310;
  --card2: #1F1A15;
  --edit: #262019;
  --sel: #2E2820;
  --ink: #EFE7D2;
  --title: #EFE7D2;
  --muted: #A79F8E;
  --faint: #7A7365;
  --line: #3B342A;
  --line2: #29241E;
  --grain-opacity: 0;
  --grain-blend: screen;
  --halftone-ink: rgba(239, 231, 210, .22);
  /* print shadow: a hard offset step, then restrained depth — never the
     soft all-round SaaS float */
  --shadow: 0 2px 0 rgba(0,0,0,.5), 0 16px 32px rgba(0,0,0,.30);
  /* lifted tint of the same red so it reads on night (4.9:1) */
  --red: #E2553F;
  --red-hover: #EE6F5B;
  --gold: #E2553F;
  --gold-dark: #A79F8E;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-ui);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-variant-numeric: tabular-nums;
}
::selection { background: var(--red); color: var(--paper-brand); }

/* ---- motion language (no bouncy easing) ---- */
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes popIn { from { opacity: 0; transform: scale(.98) translateY(-4px); } to { opacity: 1; transform: none; } }
@keyframes markBreath { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.05); } }
@keyframes sweep { 0% { transform: translateX(-260%); } 100% { transform: translateX(640%); } }
@keyframes barGrow { from { transform: scaleX(0); } to { transform: scaleX(1); } }

.fade-up { animation: fadeUp .45s cubic-bezier(.2,.7,.3,1) both; }

/* ---- surface texture (fixed, per-theme blend/opacity) ----
   Dialled far down from the previous film-grain wash: at this opacity it reads
   as the tooth of the material, not as an effect laid over the product. */
.grain {
  position: fixed; inset: 0; pointer-events: none; z-index: 60;
  opacity: var(--grain-opacity); mix-blend-mode: var(--grain-blend);
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="160" height="160"><filter id="n"><feTurbulence type="fractalNoise" baseFrequency="0.8" numOctaves="2"/></filter><rect width="100%25" height="100%25" filter="url(%23n)"/></svg>');
}

/* ---- Ben-Day halftone, for TINY portions of a divider only ----
   A print-shop dot screen that fades out within ~110px. Applied to a handful
   of rules so the eye finds it on the second pass, never the first. */
.halftone-rule {
  position: relative;
}
.halftone-rule::after {
  content: ""; position: absolute; left: 0; bottom: -1px; width: 108px; height: 3px;
  pointer-events: none; opacity: .5;
  background-image: radial-gradient(var(--halftone-ink) 34%, transparent 36%);
  background-size: 3px 3px;
  -webkit-mask-image: linear-gradient(90deg, #000, transparent);
  mask-image: linear-gradient(90deg, #000, transparent);
}

/* ---- iridescent focus edge (restrained micro-detail) ----
   Interaction lines only: a 1px sheen that shifts hue across its length so a
   focused edge feels like light catching acetate. Never a glow, never a halo.
   Honors reduced-motion by simply being static (it already is). */
.irid-edge {
  position: relative;
}
.irid-edge::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  opacity: 0; transition: opacity .18s ease; pointer-events: none;
  background: linear-gradient(90deg,
    rgba(140,10,11,.85) 0%, rgba(120,60,90,.55) 28%,
    rgba(70,95,120,.45) 52%, rgba(120,110,70,.5) 76%, rgba(140,10,11,.8) 100%);
}
.irid-edge:focus-within::after { opacity: 1; }

/* ---- brand area ----
   The emblem stays small and calm; AUF WASSEN is the house identity and Aufilm
   is the product wordmark beside it, never competing. */
.brand-header {
  flex: none; background: var(--oxblood); border-bottom: 2px solid var(--oxblood-border);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 26px; height: 64px; position: relative;
}
.brand-header::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -3px; height: 1px;
  background: rgba(140,10,11,.4);
}
.brand-header .brand-lockup { display: flex; align-items: center; gap: 11px; }
.brand-header .brand-lockup img { height: 34px; width: 34px; object-fit: contain; flex: none; }
.brand-header .brand-lockup .wordmark {
  font: 700 15px/1 var(--font-ui); letter-spacing: .16em; color: var(--paper-brand); white-space: nowrap;
}

/* ---- shared monospace kicker/label ---- */
.mono-label {
  font: 700 9px/1 var(--font-mono); letter-spacing: .14em; text-transform: uppercase;
}

/* ---- legal footer (every public page; Terms, Privacy, Subscription, Copyright, Contact) ----
   Same markup on the product screens and the legal pages. Quiet by design: it
   must be there on every screen without competing with the work. */
.site-legal {
  flex: none; width: 100%; padding: 16px 20px 20px; text-align: center;
  border-top: 1px solid var(--line); background: transparent;
  font: 500 12px/1.55 var(--font-ui); color: var(--muted);
}
.site-legal nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 18px; margin: 0 0 8px; }
.site-legal a { color: var(--muted); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; padding: 3px 0; }
.site-legal a:hover { color: var(--red); }
.site-legal .site-legal-note { margin: 0 auto; max-width: 74ch; color: var(--muted); }
.site-legal .site-legal-note span:first-child { font-weight: 700; letter-spacing: .02em; }
.site-legal .site-legal-note span:first-child::after { content: " ·"; font-weight: 400; }

/* standing estimates notice under the executive summary + pricing terms block */
.exec-disclaimer { margin: 12px 0 0; font: 500 12px/1.5 var(--font-ui); color: var(--muted); }
.legal-pricing { margin-top: 12px; }
.legal-pricing p { margin: 0 0 8px; }
