/* Night Library — design tokens
   Brief: private catalog under a single amber lamp; deep teal bookshelves,
   parchment pages, oxidized-brass bookmarks. Anti-AI-default: deliberately
   not "near-black + neon accent"; the warm parchment + oxidized teal pair
   comes from folio edge oxidation, not from the modern dark-mode playbook.
*/

:root {
  /* Backgrounds — three surfaces, lifted in 5% steps */
  --bg-base: #0E1F26;
  --bg-surface: #142832;
  --bg-surface-hover: #1B3340;
  --bg-input: #0A1A21;
  --bg-overlay: rgba(10, 26, 33, 0.78);

  /* Text — three weights of faded parchment */
  --text-primary: #E8DDB5;
  --text-secondary: #B8AE92;
  --text-tertiary: #7A7868;
  --text-quaternary: #4E5048;
  --text-on-accent: #0E1F26;

  /* Accents — amber lamp + oxidized teal */
  --accent: #D49A3E;
  --accent-hover: #E5AE52;
  --accent-dim: #8E6829;
  --accent-faint: rgba(212, 154, 62, 0.12);
  --hover-vignette: #2A4858;

  /* Semantic */
  --success: #8FAE6B;
  --success-bg: #2A3D2A;
  --warning: #D4A45E;
  --warning-bg: #3D3520;
  --danger: #C76B5A;
  --danger-bg: #3D2A28;
  --info: #6B8FA8;
  --info-bg: #1F3340;
  --neutral-bg: #2A2E2E;

  /* Type families */
  --font-display: 'Fraunces', 'EB Garamond', 'Times New Roman', serif;
  --font-body: 'IBM Plex Sans', system-ui, -apple-system, sans-serif;
  --font-mono: 'IBM Plex Mono', 'Courier New', monospace;

  /* Type scale (15px base — slightly larger for night reading) */
  --text-xs: 0.6875rem;
  --text-sm: 0.8125rem;
  --text-base: 0.9375rem;
  --text-md: 1.0625rem;
  --text-lg: 1.25rem;
  --text-xl: 1.625rem;
  --text-2xl: 2.125rem;
  --text-3xl: 2.875rem;

  /* Spacing (4px base) */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 2.5rem;
  --space-8: 3rem;
  --space-10: 4rem;
  --space-12: 5rem;

  /* Radii — sharp with one hint of softness */
  --radius-xs: 1px;
  --radius-sm: 2px;
  --radius-md: 4px;
  --radius-lg: 6px;
  --radius-xl: 10px;

  /* Borders — three opacities of parchment */
  --border-faint: rgba(232, 221, 181, 0.06);
  --border-subtle: rgba(232, 221, 181, 0.1);
  --border-default: rgba(232, 221, 181, 0.16);
  --border-strong: rgba(232, 221, 181, 0.32);

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.45), 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 12px 28px rgba(0, 0, 0, 0.55), 0 4px 8px rgba(0, 0, 0, 0.35);
  --shadow-book: 0 2px 4px rgba(0, 0, 0, 0.5), 0 8px 16px rgba(0, 0, 0, 0.35);
  --shadow-amber: 0 0 0 1px var(--accent), 0 4px 14px rgba(212, 154, 62, 0.22);

  /* Motion */
  --motion-fast: 120ms cubic-bezier(0.4, 0, 0.2, 1);
  --motion-default: 200ms cubic-bezier(0.4, 0, 0.2, 1);
  --motion-slow: 320ms cubic-bezier(0.16, 1, 0.3, 1);

  /* Layout */
  --max-w-content: 1200px;
  --nav-height: 64px;
}