/* ==========================================================================
   Cardsite Showcase — Design Tokens
   Production-ready OKLCH color system with light/dark theme support
   ========================================================================== */

:root {
  /* ========== Neutral Scale (Light) ========== */
  --neutral-0: oklch(100% 0 0);
  --neutral-50: oklch(98% 0.003 270);
  --neutral-100: oklch(95.5% 0.005 270);
  --neutral-200: oklch(91% 0.007 270);
  --neutral-300: oklch(84% 0.009 270);
  --neutral-400: oklch(66% 0.01 270);
  --neutral-500: oklch(50% 0.012 270);
  --neutral-600: oklch(40% 0.012 270);
  --neutral-700: oklch(30% 0.014 270);
  --neutral-800: oklch(20% 0.014 270);
  --neutral-900: oklch(13% 0.016 270);
  --neutral-950: oklch(8% 0.016 270);

  /* ========== Brand Scale (Violet) ========== */
  --brand-50: oklch(97% 0.02 280);
  --brand-100: oklch(93% 0.04 280);
  --brand-200: oklch(87% 0.08 280);
  --brand-300: oklch(76% 0.12 280);
  --brand-400: oklch(65% 0.16 280);
  --brand-500: oklch(55% 0.18 280);
  --brand-600: oklch(47% 0.18 280);
  --brand-700: oklch(40% 0.16 280);
  --brand-800: oklch(32% 0.12 280);
  --brand-900: oklch(24% 0.08 280);

  /* ========== Semantic Surfaces ========== */
  --surface-page: var(--neutral-0);
  --surface-raised: var(--neutral-0);
  --surface-sunken: var(--neutral-50);
  --surface-overlay: oklch(100% 0 0 / 0.85);

  /* ========== Semantic Borders ========== */
  --border-subtle: var(--neutral-100);
  --border-default: var(--neutral-200);
  --border-strong: var(--neutral-300);
  --border-focus: var(--brand-400);

  /* ========== Semantic Text ========== */
  --text-primary: var(--neutral-900);
  --text-secondary: var(--neutral-600);
  --text-tertiary: var(--neutral-500);
  --text-muted: var(--neutral-400);
  --text-inverse: var(--neutral-0);
  --text-brand: var(--brand-600);

  /* ========== Semantic Interactive ========== */
  --interactive-default: var(--brand-500);
  --interactive-hover: var(--brand-600);
  --interactive-active: var(--brand-700);
  --interactive-muted: var(--brand-50);

  /* ========== Typography ========== */
  --font-display: 'Newsreader', Georgia, 'Times New Roman', serif;
  --font-body: 'Instrument Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'SF Mono', 'Fira Code', 'Consolas', monospace;

  /* Font Sizes */
  --text-xs: 0.75rem;    /* 12px */
  --text-sm: 0.875rem;   /* 14px */
  --text-base: 1rem;     /* 16px */
  --text-lg: 1.125rem;   /* 18px */
  --text-xl: 1.25rem;    /* 20px */
  --text-2xl: 1.5rem;    /* 24px */
  --text-3xl: 2rem;      /* 32px */
  --text-4xl: 2.5rem;    /* 40px */
  --text-5xl: 3.25rem;   /* 52px */

  /* Line Heights */
  --leading-none: 1;
  --leading-tight: 1.15;
  --leading-snug: 1.35;
  --leading-normal: 1.55;
  --leading-relaxed: 1.7;

  /* Letter Spacing */
  --tracking-tight: -0.025em;
  --tracking-normal: 0;
  --tracking-wide: 0.025em;
  --tracking-wider: 0.05em;
  --tracking-widest: 0.1em;

  /* ========== Spacing Scale (4px base) ========== */
  --space-0: 0;
  --space-1: 0.25rem;    /* 4px */
  --space-2: 0.5rem;     /* 8px */
  --space-3: 0.75rem;    /* 12px */
  --space-4: 1rem;       /* 16px */
  --space-5: 1.25rem;    /* 20px */
  --space-6: 1.5rem;     /* 24px */
  --space-8: 2rem;       /* 32px */
  --space-10: 2.5rem;    /* 40px */
  --space-12: 3rem;      /* 48px */
  --space-16: 4rem;      /* 64px */
  --space-20: 5rem;      /* 80px */
  --space-24: 6rem;      /* 96px */

  /* ========== Border Radius ========== */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-2xl: 24px;
  --radius-full: 9999px;

  /* ========== Shadows ========== */
  --shadow-xs: 0 1px 2px oklch(0% 0 0 / 0.04);
  --shadow-sm: 0 2px 4px oklch(0% 0 0 / 0.05), 0 1px 2px oklch(0% 0 0 / 0.03);
  --shadow-md: 0 4px 12px oklch(0% 0 0 / 0.07), 0 2px 4px oklch(0% 0 0 / 0.04);
  --shadow-lg: 0 8px 24px oklch(0% 0 0 / 0.09), 0 4px 8px oklch(0% 0 0 / 0.05);
  --shadow-xl: 0 16px 48px oklch(0% 0 0 / 0.12), 0 8px 16px oklch(0% 0 0 / 0.06);

  /* ========== Transitions ========== */
  --ease-default: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --duration-instant: 100ms;
  --duration-fast: 150ms;
  --duration-normal: 250ms;
  --duration-slow: 400ms;

  /* ========== Z-Index Scale ========== */
  --z-below: -1;
  --z-base: 0;
  --z-raised: 10;
  --z-dropdown: 100;
  --z-sticky: 200;
  --z-fixed: 500;
  --z-modal: 1000;
  --z-toast: 1500;

  /* ========== Layout ========== */
  --container-max: 1400px;
  --container-content: 720px;
  --nav-height: 64px;
  --nav-height-compact: 52px;

  /* ========== Safe Areas ========== */
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);

  color-scheme: light dark;
}

/* ==========================================================================
   Dark Theme
   ========================================================================== */
[data-theme="dark"] {
  /* Neutral Scale (Dark) */
  --neutral-0: oklch(10% 0.015 270);
  --neutral-50: oklch(13% 0.015 270);
  --neutral-100: oklch(17% 0.013 270);
  --neutral-200: oklch(22% 0.012 270);
  --neutral-300: oklch(28% 0.01 270);
  --neutral-400: oklch(42% 0.008 270);
  --neutral-500: oklch(55% 0.008 270);
  --neutral-600: oklch(68% 0.006 270);
  --neutral-700: oklch(78% 0.005 270);
  --neutral-800: oklch(88% 0.004 270);
  --neutral-900: oklch(94% 0.003 270);
  --neutral-950: oklch(98% 0.002 270);

  /* Brand Scale (Dark adjusted) */
  --brand-50: oklch(18% 0.04 280);
  --brand-100: oklch(23% 0.06 280);
  --brand-200: oklch(30% 0.1 280);
  --brand-300: oklch(40% 0.14 280);
  --brand-400: oklch(52% 0.17 280);
  --brand-500: oklch(62% 0.18 280);
  --brand-600: oklch(70% 0.16 280);
  --brand-700: oklch(78% 0.12 280);
  --brand-800: oklch(86% 0.08 280);
  --brand-900: oklch(93% 0.04 280);

  /* Surfaces */
  --surface-page: oklch(10% 0.015 270);
  --surface-raised: oklch(14% 0.015 270);
  --surface-sunken: oklch(8% 0.016 270);
  --surface-overlay: oklch(14% 0.015 270 / 0.9);

  /* Borders */
  --border-subtle: oklch(18% 0.013 270);
  --border-default: oklch(24% 0.012 270);
  --border-strong: oklch(32% 0.01 270);

  /* Text */
  --text-primary: oklch(95% 0.003 270);
  --text-secondary: oklch(72% 0.006 270);
  --text-tertiary: oklch(58% 0.008 270);
  --text-muted: oklch(45% 0.008 270);
  --text-inverse: oklch(10% 0.015 270);
  --text-brand: var(--brand-400);

  /* Interactive */
  --interactive-default: var(--brand-500);
  --interactive-hover: var(--brand-400);
  --interactive-active: var(--brand-300);
  --interactive-muted: var(--brand-100);

  /* Shadows (darker/stronger for dark mode) */
  --shadow-xs: 0 1px 2px oklch(0% 0 0 / 0.2);
  --shadow-sm: 0 2px 4px oklch(0% 0 0 / 0.25), 0 1px 2px oklch(0% 0 0 / 0.15);
  --shadow-md: 0 4px 12px oklch(0% 0 0 / 0.35), 0 2px 4px oklch(0% 0 0 / 0.2);
  --shadow-lg: 0 8px 24px oklch(0% 0 0 / 0.4), 0 4px 8px oklch(0% 0 0 / 0.25);
  --shadow-xl: 0 16px 48px oklch(0% 0 0 / 0.5), 0 8px 16px oklch(0% 0 0 / 0.3);
}
