/* 1. BRAND TOKENS. Edit the palette here; components use semantic colors. */
:root {
  --tape-white: #f3f2ec;
  --dusty-beige: #dbd2c4;
  --concrete-gray: #b9bcbf;
  --muted-olive: #6e7354;
  --dark-charcoal: #1c1c1e;
  --signal-purple: #8b7bae;
  --signal-green: #b6d36a;
  --font-body: "Segoe UI", Arial, sans-serif;
  --font-mono: "Courier New", Courier, monospace;
  --font-size: 1rem;
  --container-width: 34rem;
  --page-gutter: 1.25rem;
  --space-1: .5rem;
  --space-2: .75rem;
  --space-3: 1rem;
  --space-4: 1.5rem;
  --space-5: 2rem;
  --space-6: 3rem;
  --button-height: 4.25rem;
  --button-padding: 1rem;
  --button-radius: .25rem;
  --panel-radius: .375rem;
  --corner-size: .65rem;
  --texture-image: url("../images/textures/paper-grain.png");
  --texture-size: 256px;
  --texture-opacity: .045;
  --logo-width: 26.375rem;
  --duration-fast: 180ms;
  --duration-theme: 280ms;
  --duration-enter: 500ms;
  --duration-scan: 650ms;
  --duration-float: 7s;
  --duration-pulse: 4s;
  --ufo-travel: -.3rem;
  --arrow-travel: 2px;
  --scan-opacity: .12;
}

/* 2. LIGHT / DEFAULT. Darker accent text preserves contrast on paper. */
:root, :root[data-theme="light"] {
  color-scheme: light;
  --color-bg: var(--tape-white);
  --color-surface: #eeece4;
  --color-card: #f7f6f1;
  --color-hover: #e9e4ef;
  --color-text: var(--dark-charcoal);
  --color-muted: #626257;
  --color-border: #b4b0a6;
  --color-rule: #cfccc2;
  --color-accent: #695787;
  --color-focus: #695787;
  --color-olive: #5b6043;
  --color-signal: var(--signal-purple);
  --icon-filter: brightness(0);
}

/* 3. NIGHT ARCHIVE. Same layout with independently tuned contrasts. */
:root[data-theme="dark"] {
  color-scheme: dark;
  --color-bg: var(--dark-charcoal);
  --color-surface: #252527;
  --color-card: #222224;
  --color-hover: #302c38;
  --color-text: var(--tape-white);
  --color-muted: var(--concrete-gray);
  --color-border: #68666e;
  --color-rule: #424147;
  --color-accent: #b7a7d8;
  --color-focus: #c4b3e5;
  --color-olive: #b0b59a;
  --color-signal: var(--signal-green);
  --icon-filter: brightness(0) invert(.94);
  --texture-opacity: .025;
}
