/* ============================================
   MR Commerce Design System v3.1
   Enterprise SaaS — Premium Polish
   ============================================ */

:root {
  /* Brand */
  --color-primary: #2563eb;
  --color-primary-dark: #1d4ed8;
  --color-primary-light: #3b82f6;
  --color-primary-50: #eff6ff;
  --color-primary-100: #dbeafe;
  --color-primary-200: #bfdbfe;
  --color-primary-500: #3b82f6;
  --color-primary-600: #2563eb;
  --color-primary-700: #1d4ed8;
  --color-primary-800: #1e40af;
  --color-primary-900: #1e3a8a;

  /* Neutrals */
  --color-white: #ffffff;
  --color-black: #000000;
  --color-gray-50: #fafafa;
  --color-gray-100: #f4f4f5;
  --color-gray-200: #e4e4e7;
  --color-gray-300: #d4d4d8;
  --color-gray-400: #a1a1aa;
  --color-gray-500: #71717a;
  --color-gray-600: #52525b;
  --color-gray-700: #3f3f46;
  --color-gray-800: #27272a;
  --color-gray-900: #18181b;
  --color-gray-950: #09090b;

  /* Accents */
  --color-success: #10b981;
  --color-success-light: #d1fae5;
  --color-warning: #f59e0b;
  --color-error: #ef4444;
  --color-info: #06b6d4;
  --color-purple: #8b5cf6;
  --color-purple-light: #a78bfa;

  /* Gradients */
  --gradient-primary: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
  --gradient-mesh: 
    radial-gradient(at 27% 37%, rgba(37,99,235,0.05) 0px, transparent 50%),
    radial-gradient(at 97% 21%, rgba(139,92,246,0.04) 0px, transparent 50%),
    radial-gradient(at 52% 99%, rgba(6,182,212,0.03) 0px, transparent 50%),
    radial-gradient(at 10% 90%, rgba(16,185,129,0.03) 0px, transparent 50%);
  --gradient-card-border: linear-gradient(135deg, rgba(255,255,255,0.15) 0%, rgba(255,255,255,0.05) 100%);
  --gradient-dark: linear-gradient(180deg, #09090b 0%, #111114 100%);

  /* Typography */
  --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'SF Mono', 'JetBrains Mono', monospace;

  --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: 1.875rem;
  --text-4xl: 2.25rem;
  --text-5xl: 3rem;
  --text-6xl: 3.75rem;
  --text-hero: clamp(3.2rem, 6.5vw, 5.5rem);
  --text-display: clamp(2.5rem, 5vw, 4rem);

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

  --leading-none: 1;
  --leading-tight: 1.08;
  --leading-snug: 1.25;
  --leading-normal: 1.5;
  --leading-relaxed: 1.65;

  --tracking-tighter: -0.04em;
  --tracking-tight: -0.02em;
  --tracking-normal: 0;
  --tracking-wide: 0.02em;
  --tracking-wider: 0.05em;
  --tracking-widest: 0.1em;

  /* Spacing */
  --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;
  --space-40: 10rem;
  --space-section: clamp(6rem, 12vw, 10rem);

  /* Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-2xl: 1.25rem;
  --radius-3xl: 1.5rem;
  --radius-4xl: 2rem;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-xs: 0 1px 2px rgba(0,0,0,0.03);
  --shadow-sm: 0 2px 4px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.03);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.06), 0 2px 4px rgba(0,0,0,0.03);
  --shadow-lg: 0 12px 32px rgba(0,0,0,0.08), 0 4px 8px rgba(0,0,0,0.04);
  --shadow-xl: 0 20px 48px rgba(0,0,0,0.1), 0 8px 16px rgba(0,0,0,0.05);
  --shadow-2xl: 0 32px 64px rgba(0,0,0,0.14);
  --shadow-glow: 0 0 48px rgba(37,99,235,0.12);
  --shadow-glow-lg: 0 0 80px rgba(37,99,235,0.18);
  --shadow-card: 0 1px 3px rgba(0,0,0,0.03), 0 4px 16px rgba(0,0,0,0.04);
  --shadow-card-hover: 0 12px 40px rgba(0,0,0,0.1);

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

  /* Motion */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --duration-fast: 150ms;
  --duration-base: 250ms;
  --duration-slow: 450ms;
  --duration-slower: 650ms;

  /* Z-Index */
  --z-base: 0;
  --z-dropdown: 100;
  --z-sticky: 200;
  --z-overlay: 300;
  --z-modal: 400;
  --z-toast: 500;

  /* Layout */
  --container-max: 1200px;
  --container-wide: 1400px;
  --container-narrow: 720px;
  --navbar-height: 64px;

  /* Surfaces (Light) */
  --surface-0: #ffffff;
  --surface-1: #fafafa;
  --surface-2: #f4f4f5;
  --surface-3: #e4e4e7;
  --surface-elevated: #ffffff;

  /* Text (Light) */
  --text-primary: #09090b;
  --text-secondary: #52525b;
  --text-tertiary: #a1a1aa;
  --text-inverse: #ffffff;

  /* Borders (Light) */
  --border-default: #e4e4e7;
  --border-subtle: #f4f4f5;
  --border-strong: #d4d4d8;
}

/* Dark Mode */
[data-theme="dark"] {
  --surface-0: #09090b;
  --surface-1: #0f0f12;
  --surface-2: #18181b;
  --surface-3: #27272a;
  --surface-elevated: #111114;
  --text-primary: #fafafa;
  --text-secondary: #a1a1aa;
  --text-tertiary: #52525b;
  --text-inverse: #09090b;
  --border-default: #27272a;
  --border-subtle: #1a1a1e;
  --border-strong: #3f3f46;
  --glass-bg: rgba(9,9,11,0.82);
  --glass-border: rgba(255,255,255,0.06);
  --gradient-mesh: 
    radial-gradient(at 27% 37%, rgba(37,99,235,0.08) 0px, transparent 50%),
    radial-gradient(at 97% 21%, rgba(139,92,246,0.06) 0px, transparent 50%),
    radial-gradient(at 52% 99%, rgba(6,182,212,0.04) 0px, transparent 50%);
  --shadow-card: 0 1px 3px rgba(0,0,0,0.2), 0 4px 16px rgba(0,0,0,0.12);
  --shadow-card-hover: 0 12px 40px rgba(0,0,0,0.3);
  --shadow-glow: 0 0 48px rgba(37,99,235,0.2);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --surface-0: #09090b;
    --surface-1: #0f0f12;
    --surface-2: #18181b;
    --surface-3: #27272a;
    --surface-elevated: #111114;
    --text-primary: #fafafa;
    --text-secondary: #a1a1aa;
    --text-tertiary: #52525b;
    --border-default: #27272a;
    --border-subtle: #1a1a1e;
    --border-strong: #3f3f46;
    --glass-bg: rgba(9,9,11,0.82);
    --glass-border: rgba(255,255,255,0.06);
    --shadow-card: 0 1px 3px rgba(0,0,0,0.2), 0 4px 16px rgba(0,0,0,0.12);
    --shadow-card-hover: 0 12px 40px rgba(0,0,0,0.3);
    --shadow-glow: 0 0 48px rgba(37,99,235,0.2);
  }
}
