/* ============================================================
   STACKFLOWSTUDIO — DESIGN TOKENS
   Aesthetic: Editorial Bold × Acid Tech
   ============================================================ */

:root {
  /* ---------- COLOR SYSTEM ---------- */
  --color-bg: #0a0a0f;
  --color-bg-deep: #050508;
  --color-surface: #14141b;
  --color-surface-2: #1d1d26;
  --color-surface-3: #262632;

  --color-ink: #f5f0e8;
  --color-ink-soft: #d8d3ca;
  --color-ink-mute: #8a8a94;
  --color-ink-faint: #55555f;

  --color-line: #2a2a35;
  --color-line-soft: #1f1f29;

  /* signature accents */
  --color-acid: #d4ff3a;
  --color-acid-deep: #9ccc12;
  --color-acid-dim: rgba(212, 255, 58, 0.12);

  --color-ember: #ff5b2e;
  --color-ember-deep: #d44216;

  --color-electric: #6b8afd;
  --color-electric-deep: #4361d0;

  --color-rose: #ff4466;
  --color-mint: #00d68f;

  /* semantic */
  --color-success: var(--color-mint);
  --color-danger: var(--color-rose);
  --color-warning: var(--color-ember);

  /* ---------- TYPOGRAPHY ---------- */
  --font-display: "Fraunces", "Playfair Display", Georgia, serif;
  --font-body: "Geist", "Inter", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", "Fira Code", "Courier New", monospace;

  --text-3xs: 0.625rem;   /* 10px */
  --text-2xs: 0.6875rem;  /* 11px */
  --text-xs: 0.75rem;     /* 12px */
  --text-sm: 0.875rem;    /* 14px */
  --text-base: 1rem;      /* 16px */
  --text-md: 1.125rem;    /* 18px */
  --text-lg: 1.375rem;    /* 22px */
  --text-xl: 1.75rem;     /* 28px */
  --text-2xl: 2.25rem;    /* 36px */
  --text-3xl: 3rem;       /* 48px */
  --text-4xl: 4rem;       /* 64px */
  --text-5xl: 5.5rem;     /* 88px */
  --text-6xl: 7.5rem;     /* 120px */
  --text-display: clamp(3rem, 10vw, 10rem);

  --leading-tight: 0.95;
  --leading-snug: 1.1;
  --leading-normal: 1.4;
  --leading-relaxed: 1.6;

  --tracking-tighter: -0.04em;
  --tracking-tight: -0.02em;
  --tracking-normal: 0;
  --tracking-wide: 0.04em;
  --tracking-wider: 0.12em;
  --tracking-widest: 0.24em;

  /* ---------- SPACING ---------- */
  --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-9: 4rem;
  --space-10: 5rem;
  --space-12: 6rem;
  --space-14: 8rem;
  --space-16: 10rem;
  --space-20: 14rem;

  /* ---------- LAYOUT ---------- */
  --container: 1400px;
  --container-narrow: 960px;
  --container-wide: 1600px;
  --gutter: clamp(1.25rem, 4vw, 3rem);

  /* ---------- RADII ---------- */
  --radius-none: 0;
  --radius-xs: 2px;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 14px;
  --radius-xl: 22px;
  --radius-2xl: 32px;
  --radius-full: 999px;

  /* ---------- SHADOWS ---------- */
  --shadow-sm: 0 2px 6px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.6);
  --shadow-acid: 0 0 0 1px var(--color-acid), 0 8px 40px rgba(212, 255, 58, 0.25);
  --shadow-inset: inset 0 1px 0 rgba(255, 255, 255, 0.04);

  /* ---------- MOTION ---------- */
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
  --ease-in-out-quart: cubic-bezier(0.76, 0, 0.24, 1);
  --ease-elastic: cubic-bezier(0.68, -0.55, 0.27, 1.55);

  --dur-fast: 160ms;
  --dur-base: 280ms;
  --dur-slow: 520ms;
  --dur-slower: 900ms;

  /* ---------- Z-INDEX ---------- */
  --z-base: 1;
  --z-dropdown: 100;
  --z-sticky: 200;
  --z-header: 500;
  --z-overlay: 800;
  --z-modal: 1000;
  --z-toast: 1500;
  --z-cursor: 9999;

  /* ---------- CHROME / FX ---------- */
  --grain-opacity: 0.05;
  --scroll-behavior: smooth;

  color-scheme: dark;
}

/* ---------- REDUCED MOTION ---------- */
@media (prefers-reduced-motion: reduce) {
  :root {
    --dur-fast: 0ms;
    --dur-base: 0ms;
    --dur-slow: 0ms;
    --dur-slower: 0ms;
    --scroll-behavior: auto;
  }
}

/* ---------- LIGHT MODE OPT-IN (future) ---------- */
[data-theme="light"] {
  --color-bg: #f5f0e8;
  --color-bg-deep: #ebe5d9;
  --color-surface: #ffffff;
  --color-surface-2: #f0ebe1;
  --color-surface-3: #e4ded1;
  --color-ink: #0a0a0f;
  --color-ink-soft: #1d1d26;
  --color-ink-mute: #55555f;
  --color-line: #d4cec0;
  --color-line-soft: #e4ded1;
  --grain-opacity: 0.035;
  color-scheme: light;
}
