/* ==========================================================================
   DESIGN TOKENS — PASTEL EDITORIAL MINIMALISM x REFINED LIQUID GLASS
   ========================================================================== */

:root {
  color-scheme: light;

  /* Core Canvas & Editorial Pastels */
  --bg-canvas: #FAF8F5;
  --surface-paper: #FFFFFF;
  --surface-muted: #F3EFE8;
  --surface-tint: #F7F4EE;

  --pastel-lavender: #E3DDF8;
  --pastel-mint: #D5EEE3;
  --pastel-peach: #F8DFD1;
  --pastel-blue: #DCEAF8;
  --pastel-butter: #F9EBC4;

  /* Refined Liquid Glass (Nav, Controls, Overlays only) */
  --surface-glass: rgba(250, 248, 245, 0.72);
  --surface-glass-strong: rgba(255, 254, 251, 0.86);
  --surface-glass-fallback: rgba(250, 248, 245, 0.96);

  /* Typography Ink */
  --text-primary: #302D3B;
  --text-secondary: #625D70;
  --text-muted: #7B7589;
  --text-on-accent: #FFFFFF;

  /* Selective Interactive Accent */
  --accent: #6752A3;
  --accent-hover: #564290;
  --accent-soft: #E3DDF8;
  --accent-ink: #47357D;
  --accent-ring: rgba(103, 82, 163, 0.30);

  /* Hairlines & Whisper-Light Elevation */
  --border-hairline: rgba(48, 45, 59, 0.09);
  --border-strong: rgba(48, 45, 59, 0.18);
  --border-glass: rgba(48, 45, 59, 0.10);
  --glass-highlight: inset 0 1px 0 rgba(255, 255, 255, 0.85);

  /* Semantic Status */
  --success-bg: #D5EEE3;
  --success-text: #15553D;
  --success-border: rgba(21, 85, 61, 0.22);

  --warning-bg: #F9EBC4;
  --warning-text: #6B4908;
  --warning-border: rgba(107, 73, 8, 0.24);

  --danger-bg: #F8DFD1;
  --danger-text: #862D20;
  --danger-border: rgba(134, 45, 32, 0.22);

  --info-bg: #DCEAF8;
  --info-text: #1E4974;
  --info-border: rgba(30, 73, 116, 0.20);

  /* Ultra-diffuse low-opacity shadows */
  --shadow-xs: 0 1px 2px rgba(48, 45, 59, 0.04);
  --shadow-glass: 0 8px 28px rgba(48, 45, 59, 0.06), 0 1px 2px rgba(48, 45, 59, 0.04);
  --shadow-sheet: 0 18px 48px rgba(48, 45, 59, 0.12);

  /* Radii (crisp, intentional hierarchy) */
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-pill: 999px;

  /* Spacing & Layout */
  --max-width: 1080px;
  --reading-width: 700px;
  --tap-min: 44px;

  /* Editorial Font Pairing (System-only, zero external license friction) */
  --font-display: "New York", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Segoe UI", Roboto, sans-serif;
  --font-mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;

  /* Motion */
  --ease-fluid: cubic-bezier(0.22, 1, 0.36, 1);
  --duration-fast: 140ms;
  --duration-base: 220ms;

  /* Z-index */
  --z-nav: 30;
  --z-modal: 70;
  --z-toast: 90;
}

[data-theme="dark"] {
  color-scheme: dark;

  --bg-canvas: #16141C;
  --surface-paper: #1D1A26;
  --surface-muted: #24202F;
  --surface-tint: #201C2A;

  --pastel-lavender: rgba(185, 166, 242, 0.14);
  --pastel-mint: rgba(147, 214, 185, 0.13);
  --pastel-peach: rgba(240, 179, 152, 0.14);
  --pastel-blue: rgba(158, 198, 240, 0.14);
  --pastel-butter: rgba(235, 206, 134, 0.14);

  --surface-glass: rgba(26, 23, 35, 0.74);
  --surface-glass-strong: rgba(30, 27, 40, 0.90);
  --surface-glass-fallback: rgba(29, 26, 38, 0.97);

  --text-primary: #F2EFFA;
  --text-secondary: #C1B9D0;
  --text-muted: #9890AA;
  --text-on-accent: #181422;

  --accent: #B9A6F2;
  --accent-hover: #CCBDF7;
  --accent-soft: rgba(185, 166, 242, 0.18);
  --accent-ink: #DDD4FA;
  --accent-ring: rgba(185, 166, 242, 0.38);

  --border-hairline: rgba(242, 239, 250, 0.09);
  --border-strong: rgba(242, 239, 250, 0.20);
  --border-glass: rgba(242, 239, 250, 0.12);
  --glass-highlight: inset 0 1px 0 rgba(255, 255, 255, 0.06);

  --success-bg: rgba(147, 214, 185, 0.16);
  --success-text: #9DE4C4;
  --success-border: rgba(157, 228, 196, 0.28);

  --warning-bg: rgba(235, 206, 134, 0.16);
  --warning-text: #F5D78E;
  --warning-border: rgba(245, 215, 142, 0.28);

  --danger-bg: rgba(240, 179, 152, 0.16);
  --danger-text: #F7BAA5;
  --danger-border: rgba(247, 186, 165, 0.28);

  --info-bg: rgba(158, 198, 240, 0.16);
  --info-text: #B8DAFC;
  --info-border: rgba(184, 218, 252, 0.26);

  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.22);
  --shadow-glass: 0 10px 30px rgba(0, 0, 0, 0.38), 0 1px 0 rgba(255, 255, 255, 0.04);
  --shadow-sheet: 0 20px 56px rgba(0, 0, 0, 0.55);
}
