/* tokens.css — Pomby: Monster Sort design system
   Palette: warm "candy playground" — cream daylight / deep night-purple dark mode,
   vivid coral-orange primary accent (from the app icon + Blaze), violet & blue
   secondary accents echoing the wider monster roster. */

:root {
  /* ---- Type scale (fluid) ---- */
  --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  --text-sm: clamp(0.875rem, 0.8rem + 0.35vw, 1rem);
  --text-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --text-lg: clamp(1.125rem, 1rem + 0.75vw, 1.5rem);
  --text-xl: clamp(1.5rem, 1.2rem + 1.25vw, 2.25rem);
  --text-2xl: clamp(2rem, 1.2rem + 2.5vw, 3.5rem);
  --text-3xl: clamp(2.5rem, 1rem + 4vw, 5rem);
  --text-hero: clamp(2.75rem, 0.5rem + 6.5vw, 6.75rem);

  /* ---- Spacing (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;
  --space-32: 8rem;

  /* ---- Radius (bubbly) ---- */
  --radius-sm: 0.5rem;
  --radius-md: 0.875rem;
  --radius-lg: 1.25rem;
  --radius-xl: 2rem;
  --radius-full: 9999px;

  /* ---- Transitions ---- */
  --transition-interactive: 180ms cubic-bezier(0.16, 1, 0.3, 1);

  /* ---- Content widths ---- */
  --content-narrow: 640px;
  --content-default: 960px;
  --content-wide: 1200px;
  --content-full: 100%;

  /* ---- Fonts ---- */
  --font-display: 'Baloo 2', system-ui, sans-serif;
  --font-body: 'Nunito', system-ui, sans-serif;
}

:root,
[data-theme='light'] {
  /* Surfaces — warm cream daylight */
  --color-bg: #fff6ea;
  --color-surface: #ffffff;
  --color-surface-2: #fffcf6;
  --color-surface-offset: #ffeeda;
  --color-surface-offset-2: #ffe3c2;
  --color-surface-dynamic: #ffd9ae;
  --color-divider: #f0dfc4;
  --color-border: #e8d2ae;

  /* Text */
  --color-text: #2b1b3d;
  --color-text-muted: #6e5d7e;
  --color-text-faint: #b6a8c4;
  --color-text-inverse: #fff8ee;

  /* Primary accent — coral (Blaze fire) */
  --color-primary: #ff5a3c;
  --color-primary-hover: #e8432a;
  --color-primary-active: #c93419;
  --color-primary-highlight: #ffe0d4;

  /* Warning */
  --color-warning: #c97a1e;
  --color-warning-hover: #a6620f;
  --color-warning-active: #7d480a;
  --color-warning-highlight: #f5dfc0;

  /* Error */
  --color-error: #d6336c;
  --color-error-hover: #b32357;
  --color-error-active: #8e1a44;
  --color-error-highlight: #f6d3e1;

  /* Notification */
  --color-notification: #d6336c;
  --color-notification-hover: #b32357;
  --color-notification-active: #8e1a44;
  --color-notification-highlight: #f6d3e1;

  /* Success */
  --color-success: #3fa34d;
  --color-success-hover: #2e7f3a;
  --color-success-active: #235f2b;
  --color-success-highlight: #d3ecd7;

  /* Blue — Frost accent */
  --color-blue: #3e7bfa;
  --color-blue-hover: #2c63d6;
  --color-blue-active: #204caa;
  --color-blue-highlight: #d6e4ff;

  /* Purple — Berry accent */
  --color-purple: #8b5cf6;
  --color-purple-hover: #7440e0;
  --color-purple-active: #5c2fc0;
  --color-purple-highlight: #e7dbff;

  /* Gold */
  --color-gold: #e8a33d;
  --color-gold-hover: #c8841f;
  --color-gold-active: #9e6712;
  --color-gold-highlight: #f7e6c4;

  --color-orange: var(--color-primary);
  --color-orange-hover: var(--color-primary-hover);
  --color-orange-active: var(--color-primary-active);
  --color-orange-highlight: var(--color-primary-highlight);

  --color-yellow: var(--color-gold);
  --color-yellow-hover: var(--color-gold-hover);
  --color-yellow-active: var(--color-gold-active);
  --color-yellow-highlight: var(--color-gold-highlight);

  --shadow-sm: 0 1px 2px oklch(0.3 0.05 320 / 0.08);
  --shadow-md: 0 6px 16px oklch(0.3 0.05 320 / 0.12);
  --shadow-lg: 0 16px 40px oklch(0.3 0.05 320 / 0.18);
}

[data-theme='dark'] {
  /* Surfaces — deep night-purple (matches video outro sky) */
  --color-bg: #180f2c;
  --color-surface: #221537;
  --color-surface-2: #2a1a42;
  --color-surface-offset: #2e1b49;
  --color-surface-offset-2: #3a2259;
  --color-surface-dynamic: #472c6b;
  --color-divider: #3a2757;
  --color-border: #4a3268;

  --color-text: #f3eaff;
  --color-text-muted: #b7a6d6;
  --color-text-faint: #7c6b9c;
  --color-text-inverse: #2b1b3d;

  --color-primary: #ff8a68;
  --color-primary-hover: #ffa082;
  --color-primary-active: #ffb69c;
  --color-primary-highlight: #4a2a24;

  --color-warning: #f0b352;
  --color-warning-hover: #f5c476;
  --color-warning-active: #f8d49a;
  --color-warning-highlight: #4d3a20;

  --color-error: #ec6fa0;
  --color-error-hover: #f086b0;
  --color-error-active: #f4a1c1;
  --color-error-highlight: #4a2836;

  --color-notification: #ec6fa0;
  --color-notification-hover: #f086b0;
  --color-notification-active: #f4a1c1;
  --color-notification-highlight: #4a2836;

  --color-success: #6fcb7f;
  --color-success-hover: #8ad696;
  --color-success-active: #a6e0ac;
  --color-success-highlight: #234a2b;

  --color-blue: #7aa2ff;
  --color-blue-hover: #93b4ff;
  --color-blue-active: #acc6ff;
  --color-blue-highlight: #253458;

  --color-purple: #b794ff;
  --color-purple-hover: #c6a9ff;
  --color-purple-active: #d5beff;
  --color-purple-highlight: #362a5c;

  --color-gold: #f0b352;
  --color-gold-hover: #f5c476;
  --color-gold-active: #f8d49a;
  --color-gold-highlight: #4d3a20;

  --color-orange: var(--color-primary);
  --color-orange-hover: var(--color-primary-hover);
  --color-orange-active: var(--color-primary-active);
  --color-orange-highlight: var(--color-primary-highlight);

  --color-yellow: var(--color-gold);
  --color-yellow-hover: var(--color-gold-hover);
  --color-yellow-active: var(--color-gold-active);
  --color-yellow-highlight: var(--color-gold-highlight);

  --shadow-sm: 0 1px 2px oklch(0 0 0 / 0.3);
  --shadow-md: 0 6px 16px oklch(0 0 0 / 0.4);
  --shadow-lg: 0 16px 40px oklch(0 0 0 / 0.5);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --color-bg: #180f2c;
    --color-surface: #221537;
    --color-surface-2: #2a1a42;
    --color-surface-offset: #2e1b49;
    --color-surface-offset-2: #3a2259;
    --color-surface-dynamic: #472c6b;
    --color-divider: #3a2757;
    --color-border: #4a3268;
    --color-text: #f3eaff;
    --color-text-muted: #b7a6d6;
    --color-text-faint: #7c6b9c;
    --color-text-inverse: #2b1b3d;
    --color-primary: #ff8a68;
    --color-primary-hover: #ffa082;
    --color-primary-active: #ffb69c;
    --color-primary-highlight: #4a2a24;
    --color-blue: #7aa2ff;
    --color-purple: #b794ff;
    --color-gold: #f0b352;
    --shadow-sm: 0 1px 2px oklch(0 0 0 / 0.3);
    --shadow-md: 0 6px 16px oklch(0 0 0 / 0.4);
    --shadow-lg: 0 16px 40px oklch(0 0 0 / 0.5);
  }
}
