/* 
 * 
 * 
 * 
 */

/* ===== COLOR SYSTEM (from themes/pastel-01.json) ===== */
:root {
  /* Brand Colors */
  --brand-primary: #e854ff;
  --brand-secondary: #0ea5e9;
  --brand-accent: #eab308;
  --brand-surface: #ffffff;
  
  /* Primary Color Scale */
  --primary-50: #fef7ff;
  --primary-100: #fdeeff;
  --primary-200: #fbddff;
  --primary-300: #f7bbff;
  --primary-400: #f188ff;
  --primary-500: #e854ff;
  --primary-600: #d32af0;
  --primary-700: #b618d3;
  --primary-800: #9515ad;
  --primary-900: #7a178a;
  --primary-950: #4c0e54;
  
  /* Secondary Color Scale */
  --secondary-50: #f0f9ff;
  --secondary-100: #e0f2fe;
  --secondary-200: #bae6fd;
  --secondary-300: #7dd3fc;
  --secondary-400: #38bdf8;
  --secondary-500: #0ea5e9;
  --secondary-600: #0284c7;
  --secondary-700: #0369a1;
  --secondary-800: #075985;
  --secondary-900: #0c4a6e;
  --secondary-950: #082f49;
  
  /* Neutral Color Scale */
  --neutral-50: #fafafa;
  --neutral-100: #f5f5f5;
  --neutral-200: #e5e5e5;
  --neutral-300: #d4d4d4;
  --neutral-400: #a3a3a3;
  --neutral-500: #737373;
  --neutral-600: #525252;
  --neutral-700: #404040;
  --neutral-800: #262626;
  --neutral-900: #171717;
  --neutral-950: #0a0a0a;
  
  /* Semantic Colors - WCAG AA Compliant */
  --bg-primary: #ffffff;        /* WCAG AAA with text-primary (21:1) */
  --bg-secondary: #fafafa;      /* WCAG AAA with text-primary (19.8:1) */
  --bg-muted: #f5f5f5;          /* WCAG AAA with text-primary (18.2:1) */
  --bg-inverse: #171717;        /* WCAG AAA with text-inverse (21:1) */
  --bg-overlay: rgba(23, 23, 23, 0.8);
  --bg-glass: rgba(255, 255, 255, 0.1);
  
  --text-primary: #171717;      /* WCAG AAA on white background (21:1) */
  --text-secondary: #525252;    /* WCAG AAA on white background (7.5:1) */
  --text-muted: #737373;        /* WCAG AA on white background (4.8:1) */
  --text-inverse: #ffffff;      /* WCAG AAA on dark background (21:1) */
  --text-link: #0ea5e9;         /* WCAG AA on white background (4.5:1) */
  --text-link-hover: #0284c7;   /* WCAG AA on white background (5.8:1) */
  
  --border-light: #e5e5e5;
  --border-medium: #d4d4d4;
  --border-strong: #a3a3a3;
  --border-interactive: #0ea5e9;
  
  /* State Colors */
  --state-hover: rgba(232, 84, 255, 0.08);
  --state-focus: rgba(14, 165, 233, 0.12);
  --state-active: rgba(232, 84, 255, 0.15);
  --state-disabled: rgba(115, 115, 115, 0.5);
  
  /* Status Colors */
  --success: #22c55e;
  --success-bg: #f0fdf4;
  --warning: #f59e0b;
  --warning-bg: #fffbeb;
  --error: #ef4444;
  --error-bg: #fef2f2;
}

/* ===== SPACING SYSTEM (from spacing.json) ===== */
:root {
  /* Base Spacing Scale */
  --space-0: 0;
  --space-px: 1px;
  --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 */
  --space-32: 8rem;      /* 128px */
  
  /* Semantic Spacing */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2rem;
  --space-xl: 3rem;
  --space-2xl: 4rem;
  --space-3xl: 6rem;
  --space-4xl: 8rem;
  
  /* Section Spacing - Responsive */
  --section-y-mobile: 3rem;
  --section-y-tablet: 4rem;
  --section-y-desktop: 5rem;
  --section-y-hero: clamp(4rem, 10vw, 8rem);
  --section-x: clamp(1rem, 3vw, 2rem);
  --section-gap: clamp(1.5rem, 3vw, 2.5rem);
  
  /* Component Spacing */
  --card-padding: 1.5rem;
  --card-gap: 1rem;
  --button-padding-x: 1.5rem;
  --button-padding-y: 0.75rem;
  --form-gap: 1rem;
}

/* ===== TYPOGRAPHY SYSTEM (from typography.json) ===== */
:root {
  /* Font Families */
  --font-primary: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-secondary: 'Poppins', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', Monaco, 'Cascadia Code', monospace;
  
  /* Font Weights */
  --font-light: 300;
  --font-normal: 400;
  --font-medium: 500;
  --font-semibold: 600;
  --font-bold: 700;
  --font-extrabold: 800;
  
  /* Fluid Font Sizes */
  --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  --text-sm: clamp(0.875rem, 0.8rem + 0.375vw, 1rem);
  --text-base: clamp(1rem, 0.9rem + 0.5vw, 1.125rem);
  --text-lg: clamp(1.125rem, 1rem + 0.625vw, 1.25rem);
  --text-xl: clamp(1.25rem, 1.1rem + 0.75vw, 1.5rem);
  --text-2xl: clamp(1.5rem, 1.3rem + 1vw, 1.875rem);
  --text-3xl: clamp(1.875rem, 1.6rem + 1.375vw, 2.25rem);
  --text-4xl: clamp(2.25rem, 1.9rem + 1.75vw, 3rem);
  --text-5xl: clamp(3rem, 2.5rem + 2.5vw, 3.75rem);
  --text-6xl: clamp(3.75rem, 3rem + 3.75vw, 4.5rem);
  
  /* Line Heights */
  --leading-none: 1;
  --leading-tight: 1.25;
  --leading-snug: 1.375;
  --leading-normal: 1.5;
  --leading-relaxed: 1.625;
  --leading-loose: 2;
  
  /* Letter Spacing */
  --tracking-tighter: -0.05em;
  --tracking-tight: -0.025em;
  --tracking-normal: 0;
  --tracking-wide: 0.025em;
  --tracking-wider: 0.05em;
}

/* ===== EFFECTS & ELEVATION (Theme-specific colored shadows) ===== */
:root {
  /* Theme-specific colored shadow - dynamically generated per theme */
  --shadow-colored: 0 10px 15px -3px rgba(232, 84, 255, 0.15), 0 4px 6px -2px rgba(232, 84, 255, 0.1);
  
  /* Note: Base shadows, radius, transitions moved to effects.css */
}

/* ===== GRADIENTS ===== */
:root {
  --gradient-primary: linear-gradient(135deg, #e854ff 0%, #0ea5e9 100%);
  --gradient-secondary: linear-gradient(135deg, #0ea5e9 0%, #eab308 100%);
  --gradient-hero: linear-gradient(135deg, #fef7ff 0%, #f0f9ff 50%, #fefce8 100%);
  --gradient-card: linear-gradient(145deg, #ffffff 0%, #fafafa 100%);
  --gradient-overlay-light: linear-gradient(to bottom, rgba(255,255,255,0.95), rgba(255,255,255,0.8));
  --gradient-overlay-dark: linear-gradient(to bottom, rgba(0,0,0,0.7), rgba(0,0,0,0.4));
}

/* ===== BASE STYLES - ADDITIVE TO BOOTSTRAP ===== */
body {
  font-family: var(--font-primary);
  line-height: var(--leading-relaxed);
  color: var(--text-primary);
  background-color: var(--bg-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ===== RESPONSIVE BEHAVIOR (Theme-specific overrides) ===== */
@media (prefers-contrast: high) {
  :root {
    --border-light: #999999;
    --border-medium: #666666;
  }
}

@media (prefers-color-scheme: dark) {
  /* Dark mode variables can be added here in future versions */
}