/* ==============================
   Design Tokens - gameengines.io
   Apple-inspired premium design system
   ============================== */

:root {
  /* ---- Brand ---- */
  --color-primary: #6c63ff;
  --color-primary-rgb: 108, 99, 255;
  --color-primary-hover: #5a52d5;
  --color-accent: #00d4aa;
  --color-accent-rgb: 0, 212, 170;

  /* ---- Semantic ---- */
  --color-success: #30d158;
  --color-success-rgb: 48, 209, 88;
  --color-warning: #ffd60a;
  --color-warning-rgb: 255, 214, 10;
  --color-danger: #ff453a;
  --color-info: #64d2ff;

  /* ---- Dark neutral scale (Apple-style) ---- */
  --surface-0: #000000;
  --surface-1: #0a0a0a;
  --surface-2: #111111;
  --surface-3: #1a1a1a;
  --surface-4: #242424;
  --surface-5: #2e2e2e;
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-default: rgba(255, 255, 255, 0.12);
  --border-strong: rgba(255, 255, 255, 0.2);
  --text-primary: #f5f5f7;
  --text-secondary: rgba(245, 245, 247, 0.7);
  --text-tertiary: rgba(245, 245, 247, 0.45);

  /* ---- Spacing (8px base) ---- */
  --space-2xs: 0.2rem;
  --space-xs: 0.4rem;
  --space-sm: 0.6rem;
  --space-md: 0.75rem;
  --space-lg: 1rem;
  --space-xl: 1.5rem;
  --space-2xl: 2rem;
  --space-3xl: 2.5rem;
  --space-4xl: 3rem;
  --space-5xl: 4rem;

  /* ---- Typography ---- */
  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: "SF Mono", "JetBrains Mono", "Fira Code", "Cascadia Code", ui-monospace, monospace;
  --font-size-xs: 0.75rem;
  --font-size-sm: 0.875rem;
  --font-size-base: 1rem;
  --font-size-lg: 1.125rem;
  --font-size-xl: 1.25rem;
  --font-size-2xl: 1.5rem;
  --font-size-3xl: 2rem;
  --font-size-4xl: 2.5rem;
  --font-size-5xl: 3.5rem;
  --font-size-hero: clamp(2.5rem, 6vw, 5rem);
  --line-height-tight: 1.1;
  --line-height-snug: 1.25;
  --line-height-normal: 1.5;
  --letter-spacing-tight: -0.03em;
  --letter-spacing-normal: -0.01em;

  /* ---- Border radius ---- */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-2xl: 24px;
  --radius-full: 9999px;

  /* ---- Shadows ---- */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3), 0 1px 3px rgba(0, 0, 0, 0.15);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.3), 0 2px 4px rgba(0, 0, 0, 0.2);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.4), 0 4px 12px rgba(0, 0, 0, 0.2);
  --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.5), 0 8px 24px rgba(0, 0, 0, 0.3);
  --shadow-glow: 0 0 20px rgba(var(--color-primary-rgb), 0.3);

  /* ---- Transitions ---- */
  --ease-out: cubic-bezier(0, 0, 0.2, 1);
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --duration-fast: 150ms;
  --duration-base: 250ms;
  --duration-slow: 400ms;

  /* ---- Glass ---- */
  --glass-bg: rgba(20, 20, 20, 0.72);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-blur: 20px;
}

/* ---- Light mode tokens ---- */
[data-theme="light"] {
  --surface-0: #ffffff;
  --surface-1: #fafafa;
  --surface-2: #f5f5f7;
  --surface-3: #eeeeef;
  --surface-4: #e5e5e7;
  --surface-5: #d1d1d6;
  --border-subtle: rgba(0, 0, 0, 0.06);
  --border-default: rgba(0, 0, 0, 0.1);
  --border-strong: rgba(0, 0, 0, 0.2);
  --text-primary: #1d1d1f;
  --text-secondary: rgba(29, 29, 31, 0.65);
  --text-tertiary: rgba(29, 29, 31, 0.4);
  --glass-bg: rgba(255, 255, 255, 0.72);
  --glass-border: rgba(0, 0, 0, 0.06);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1), 0 2px 4px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.12), 0 4px 12px rgba(0, 0, 0, 0.06);
  --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.15), 0 8px 24px rgba(0, 0, 0, 0.08);
  --shadow-glow: 0 0 20px rgba(var(--color-primary-rgb), 0.15);
}
