/* ============================================
   SI9NAL Design Tokens
   CSS Custom Properties for Dark/Light Themes
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300..700;1,9..40,300..700&family=Instrument+Serif:ital@0;1&family=Space+Mono:wght@400;700&display=swap');

/* ---- Dark Theme (Default) ---- */
:root {
  /* Backgrounds */
  --bg: #0a0a0c;
  --bg2: #111115;
  --bg3: #1a1a20;
  --bg4: #222230;

  /* Typography */
  --text: #e8e6e1;
  --text2: #a09d96;
  --text3: #6b6862;

  /* Brand Accent */
  --accent: #f04e23;
  --accent2: #ff6b47;
  --accent-glow: rgba(240, 78, 35, .15);

  /* Borders */
  --border: #2a2a35;
  --border2: #3a3a48;

  /* Surfaces */
  --card: #13131a;
  --card-hover: #1a1a24;
  --glass: rgba(10, 10, 12, .85);

  /* Tags */
  --tag-bg: rgba(240, 78, 35, .12);
  --tag-text: #ff6b47;

  /* Elevation */
  --shadow: 0 8px 32px rgba(0, 0, 0, .5);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, .3);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, .6);

  /* Motion */
  --transition: 0.35s cubic-bezier(.4, 0, .2, 1);
  --transition-fast: 0.2s cubic-bezier(.4, 0, .2, 1);
  --transition-slow: 0.5s cubic-bezier(.4, 0, .2, 1);

  /* Semantic Colors */
  --green: #22c55e;
  --green-bg: rgba(34, 197, 94, .12);
  --blue: #3b82f6;
  --blue-bg: rgba(59, 130, 246, .12);
  --gold: #eab308;
  --gold-bg: rgba(234, 179, 8, .12);
  --purple: #a855f7;
  --purple-bg: rgba(168, 85, 247, .12);
  --red: #ef4444;
  --red-bg: rgba(239, 68, 68, .12);

  /* Typography Scale */
  --font-body: 'DM Sans', system-ui, -apple-system, sans-serif;
  --font-heading: 'Instrument Serif', Georgia, serif;
  --font-mono: 'Space Mono', 'Fira Code', monospace;

  --fs-xs: 0.75rem;
  --fs-sm: 0.8125rem;
  --fs-base: 0.9375rem;
  --fs-md: 1.0625rem;
  --fs-lg: 1.25rem;
  --fs-xl: 1.5rem;
  --fs-2xl: 2rem;
  --fs-3xl: 2.75rem;
  --fs-4xl: 3.5rem;

  --lh-tight: 1.15;
  --lh-snug: 1.3;
  --lh-normal: 1.6;

  --fw-normal: 400;
  --fw-medium: 500;
  --fw-semibold: 600;
  --fw-bold: 700;

  /* Spacing Scale */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 64px;
  --space-4xl: 96px;

  /* Radii */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* Z-index Scale */
  --z-base: 1;
  --z-dropdown: 100;
  --z-sticky: 200;
  --z-modal-backdrop: 500;
  --z-modal: 600;
  --z-toast: 700;
  --z-ticker: 800;
}

/* ---- Light Theme ---- */
[data-theme="light"] {
  /* Backgrounds */
  --bg: #f5f2ed;
  --bg2: #ebe7e0;
  --bg3: #e0dbd3;
  --bg4: #d4cfc6;

  /* Typography */
  --text: #1a1815;
  --text2: #5a5650;
  --text3: #8a867f;

  /* Brand Accent */
  --accent: #d93a12;
  --accent2: #c43410;
  --accent-glow: rgba(217, 58, 18, .1);

  /* Borders */
  --border: #d4cfc6;
  --border2: #c4bfb6;

  /* Surfaces */
  --card: #faf8f5;
  --card-hover: #f0ede8;
  --glass: rgba(245, 242, 237, .92);

  /* Tags */
  --tag-bg: rgba(217, 58, 18, .08);
  --tag-text: #c43410;

  /* Elevation */
  --shadow: 0 8px 32px rgba(0, 0, 0, .08);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, .05);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, .1);

  /* Semantic Colors (adjusted for light bg) */
  --green: #16a34a;
  --green-bg: rgba(22, 163, 74, .1);
  --blue: #2563eb;
  --blue-bg: rgba(37, 99, 235, .1);
  --gold: #ca8a04;
  --gold-bg: rgba(202, 138, 4, .1);
  --purple: #9333ea;
  --purple-bg: rgba(147, 51, 234, .1);
  --red: #dc2626;
  --red-bg: rgba(220, 38, 38, .1);
}
