/*
 * Design tokens
 *
 * The public site uses a light, high contrast surface by default. The same
 * indigo, violet and cyan accents are available in the opt-in dark theme via
 * [data-theme="dark"], so a browser's colour preference never changes the
 * product branding unexpectedly.
 */

:root {
  /* Enhanced Surface Colors - Better Depth Perception */
  --color-surface-primary: #F8FAFC;
  --color-surface-raised: #FFFFFF;
  --color-surface-accent: #0B1020;
  --color-surface-elevated: #EEF2FF;
  --color-surface-hover: #F1F5F9;
  --color-surface-pressed: #E2E8F0;

  /* Enhanced Text Colors - Better Hierarchy */
  --color-text-primary: #0B1020;
  --color-text-secondary: #334155;
  --color-text-tertiary: #64748B;
  --color-text-muted: #94A3B8;
  --color-text-on-accent: #F8FAFC;

  /* Enhanced Accent Colors - Modern Gradient-Ready Palette */
  --color-accent-primary: #4F46E5;
  --color-accent-primary-hover: #4338CA;
  --color-accent-primary-active: #3730A3;
  --color-accent-secondary: #7C3AED;
  --color-accent-secondary-hover: #6D28D9;
  --color-accent-tertiary: #EC4899;
  --color-accent-highlight: #0891B2;
  --color-accent-glow: rgba(99, 102, 241, 0.22);
  --color-accent-glow-strong: rgba(99, 102, 241, 0.35);

  /* Backwards-compatible aliases used by older templates. */
  --color-accent-gold: var(--color-accent-primary);
  --color-accent-gold-bright: #6366F1;
  --color-accent-gold-hover: var(--color-accent-primary-hover);

  /* Enhanced Semantic Colors - Better Feedback */
  --color-success: #047857;
  --color-success-light: #D1FAE5;
  --color-warning: #B45309;
  --color-warning-light: #FEF3C7;
  --color-error: #B91C1C;
  --color-error-light: #FEE2E2;
  --color-info: #0369A1;
  --color-info-light: #E0F2FE;

  /* Enhanced Border & Shadow System */
  --color-border: rgba(15, 23, 42, 0.12);
  --color-border-strong: rgba(79, 70, 229, 0.32);
  --color-border-hover: rgba(15, 23, 42, 0.20);
  --color-shadow: rgba(15, 23, 42, 0.1);
  --color-shadow-strong: rgba(15, 23, 42, 0.18);
  --color-focus: #0891B2;

  --font-serif: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-system: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  /* Enhanced Type Scale - Professional Hierarchy */
  --text-display: clamp(3rem, 6vw, 5rem);
  --text-hero: clamp(2.5rem, 5vw, 4rem);
  --text-h1: clamp(2rem, 4vw, 2.5rem);
  --text-h2: clamp(1.5rem, 3vw, 2rem);
  --text-h3: clamp(1.25rem, 2.5vw, 1.75rem);
  --text-h4: 1.125rem;
  --text-body-large: 1.125rem;
  --text-body: 1rem;
  --text-small: 0.875rem;
  --text-xs: 0.75rem;

  --line-height-tight: 1.2;
  --line-height-normal: 1.5;
  --line-height-relaxed: 1.65;
  --line-height-loose: 1.8;

  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;

  /* Enhanced Spacing Scale - Consistent Rhythm */
  --space-0: 0;
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-7: 1.75rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;
  --section-padding-y: clamp(4rem, 10vh, 8rem);
  --section-padding-x: clamp(1rem, 4vw, 2rem);

  --content-max-width: 68rem;
  --prose-max-width: 42rem;
  --container-padding: 2rem;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 22px;
  --radius-2xl: 28px;
  --radius-full: 9999px;

  /* Enhanced Shadow System - Professional Elevation */
  --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.05);
  --shadow-sm: 0 2px 10px rgba(15, 23, 42, 0.08);
  --shadow-md: 0 10px 28px rgba(15, 23, 42, 0.12);
  --shadow-lg: 0 18px 46px rgba(15, 23, 42, 0.16);
  --shadow-xl: 0 24px 70px rgba(15, 23, 42, 0.2);
  --shadow-2xl: 0 40px 100px rgba(15, 23, 42, 0.25);
  --shadow-inner: inset 0 2px 4px rgba(15, 23, 42, 0.06);

  /* Glow Effects for Premium Elements */
  --glow-sm: 0 0 10px var(--color-accent-glow);
  --glow-md: 0 0 20px var(--color-accent-glow-strong);
  --glow-lg: 0 0 40px var(--color-accent-glow-strong);

  --transition-fast: 0.15s ease;
  --transition-base: 0.2s ease;
  --transition-slow: 0.3s ease;
}

/* Opt in with <html data-theme="dark"> when a host wants a dark surface. */
:root[data-theme="dark"] {
  --color-surface-primary: #0B1020;
  --color-surface-raised: #121A2F;
  --color-surface-accent: #18233D;
  --color-surface-elevated: #1E2A48;
  --color-text-primary: #F8FAFC;
  --color-text-secondary: #A9B5CC;
  --color-text-tertiary: #8290AA;
  --color-text-on-accent: #F8FAFC;
  --color-accent-primary: #818CF8;
  --color-accent-primary-hover: #A5B4FC;
  --color-accent-secondary: #A78BFA;
  --color-accent-highlight: #22D3EE;
  --color-accent-gold: var(--color-accent-primary);
  --color-accent-gold-bright: #818CF8;
  --color-accent-gold-hover: var(--color-accent-primary-hover);
  --color-success: #34D399;
  --color-warning: #FBBF24;
  --color-error: #F87171;
  --color-info: #38BDF8;
  --color-border: rgba(226, 232, 240, 0.16);
  --color-border-strong: rgba(129, 140, 248, 0.45);
  --color-shadow: rgba(0, 0, 0, 0.42);
  --color-focus: #22D3EE;
  --shadow-lg: 0 18px 46px rgba(0, 0, 0, 0.38);
  --shadow-xl: 0 24px 70px rgba(0, 0, 0, 0.5);
}

