/* ── DESIGN TOKENS ── */
@layer tokens {
  :root {
    /* Brand colors — constant across themes */
    --gold-dark: #E89900;
    --gold-mid: #F5B000;
    --gold-light: #FFBB33;
    --gold-pale: #FFE0A9;
    --gold-glow: rgba(245, 176, 0, 0.15);

    /* Accent green — actions, creation, "go" */
    --green: #2D8659;
    --green-light: #35A06A;
    --green-dark: #236B47;
    --green-pale: #E8F5EE;
    --green-glow: rgba(45, 134, 89, 0.15);

    /* Danger red — errors, destructive actions */
    --danger: #DC2626;
    --danger-light: #EF4444;
    --danger-dark: #B91C1C;
    --danger-pale: #FEE2E2;
    --danger-glow: rgba(220, 38, 38, 0.15);

    /* Typography */
    --font-main: 'Plus Jakarta Sans', system-ui, sans-serif;

    --text-xs: 0.75rem;
    --text-sm: 0.875rem;
    --text-base: 1rem;
    --text-lg: 1.125rem;
    --text-xl: 1.25rem;
    --text-2xl: 1.5rem;
    --text-3xl: 2rem;
    --text-4xl: 2.75rem;
    --text-5xl: 3.5rem;

    --weight-regular: 400;
    --weight-medium: 500;
    --weight-semibold: 600;
    --weight-bold: 700;
    --weight-extrabold: 800;

    --leading-tight: 1.1;
    --leading-snug: 1.25;
    --leading-normal: 1.5;
    --leading-relaxed: 1.65;

    --tracking-tight: -0.02em;
    --tracking-normal: 0;
    --tracking-wide: 0.02em;
    --tracking-wider: 0.06em;

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

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

    /* Transitions */
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
    --duration-fast: 150ms;
    --duration-normal: 300ms;
    --duration-slow: 500ms;

    /* ── LIGHT THEME (default) ── */
    --text-primary: #1a1a1a;
    --text-secondary: #5C5C5C;
    --text-muted: #767676;

    --surface-page: #F5F5F3;
    --surface-card: #FFFFFF;
    --surface-card-border: #E0DCD5;
    --surface-elevated: #FFFFFF;
    --surface-dark-card: #1a1a1a;

    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
    --shadow-xl: 0 16px 50px rgba(0,0,0,0.16);

    --btn-primary-bg: #1a1a1a;
    --btn-primary-text: #FFFFFF;
    --btn-primary-hover: #2c2c2c;

    --btn-gold-text: #1a1a1a;

    --compete-glow-top: rgba(245,176,0,0.08);
    --compete-glow-bottom: rgba(245,176,0,0.04);
    --compete-text: rgba(255,255,255,0.55);
    --compete-feature: rgba(255,255,255,0.7);
    --compete-line: rgba(245,176,0,0.4);

    --play-card-bg: #FFFFFF;
    --play-card-hover-glow: rgba(245,176,0,0.06);
  }

  /* ── DARK THEME ── */
  .dark {
    --text-primary: #F0EDE8;
    --text-secondary: #A8A49C;
    --text-muted: #918A84;

    --surface-page: #111111;
    --surface-card: #1E1E1E;
    --surface-card-border: #333333;
    --surface-elevated: #242424;
    --surface-dark-card: #0A0A0A;

    --shadow-sm: 0 1px 3px rgba(0,0,0,0.2);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.3);
    --shadow-lg: 0 8px 30px rgba(0,0,0,0.4);
    --shadow-xl: 0 16px 50px rgba(0,0,0,0.5);

    --btn-primary-bg: #FFFFFF;
    --btn-primary-text: #1a1a1a;
    --btn-primary-hover: #E0DCD5;

    --compete-glow-top: rgba(245,176,0,0.12);
    --compete-glow-bottom: rgba(245,176,0,0.06);
    --compete-text: rgba(255,255,255,0.5);
    --compete-feature: rgba(255,255,255,0.65);
    --compete-line: rgba(245,176,0,0.5);

    --play-card-bg: #1E1E1E;
    --play-card-hover-glow: rgba(245,176,0,0.08);

    --green-dark: #6EE7A0;
    --green-glow: rgba(45, 134, 89, 0.25);

    --gold-glow: rgba(245, 176, 0, 0.25);

    --danger: #FCA5A5;
    --danger-dark: #DC2626;
    --danger-pale: rgba(220, 38, 38, 0.15);
    --danger-glow: rgba(220, 38, 38, 0.25);
  }
}
