/* 
 * 
 * 
 * 
 */

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

/* ===== SPACING SYSTEM (from spacing.json) ===== */
:root {
  /* Base Spacing Scale */
  --tc-space-0: 0;
  --tc-space-px: 1px;
  --tc-space-1: 0.25rem;    /* 4px */
  --tc-space-2: 0.5rem;     /* 8px */
  --tc-space-3: 0.75rem;    /* 12px */
  --tc-space-4: 1rem;       /* 16px */
  --tc-space-5: 1.25rem;    /* 20px */
  --tc-space-6: 1.5rem;     /* 24px */
  --tc-space-8: 2rem;       /* 32px */
  --tc-space-10: 2.5rem;    /* 40px */
  --tc-space-12: 3rem;      /* 48px */
  --tc-space-16: 4rem;      /* 64px */
  --tc-space-20: 5rem;      /* 80px */
  --tc-space-24: 6rem;      /* 96px */
  --tc-space-32: 8rem;      /* 128px */
  
  /* Semantic Spacing */
  --tc-space-xs: 0.5rem;
  --tc-space-sm: 1rem;
  --tc-space-md: 1.5rem;
  --tc-space-lg: 2rem;
  --tc-space-xl: 3rem;
  --tc-space-2xl: 4rem;
  --tc-space-3xl: 6rem;
  --tc-space-4xl: 8rem;
  
  /* Section Spacing - Responsive */
  --tc-section-y-mobile: 3rem;
  --tc-section-y-tablet: 4rem;
  --tc-section-y-desktop: 5rem;
  --tc-section-y-hero: clamp(4rem, 10vw, 8rem);
  --tc-section-x: clamp(1rem, 3vw, 2rem);
  --tc-section-gap: clamp(1.5rem, 3vw, 2.5rem);
  
  /* Component Spacing */
  --tc-card-padding: 1.5rem;
  --tc-card-gap: 1rem;
  --tc-button-padding-x: 1.5rem;
  --tc-button-padding-y: 0.75rem;
  --tc-form-gap: 1rem;
}

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

/* ===== EFFECTS & ELEVATION ===== */
:root {
  /* Shadows */
  --tc-shadow-none: none;
  --tc-shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --tc-shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  --tc-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --tc-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --tc-shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --tc-shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  --tc-shadow-inner: inset 0 2px 4px 0 rgba(0, 0, 0, 0.06);
  --tc-shadow-colored: 0 10px 15px -3px rgba(232, 84, 255, 0.15), 0 4px 6px -2px rgba(232, 84, 255, 0.1);
  
  /* Border Radius */
  --tc-radius-none: 0;
  --tc-radius-xs: 0.125rem;
  --tc-radius-sm: 0.25rem;
  --tc-radius-md: 0.375rem;
  --tc-radius-lg: 0.5rem;
  --tc-radius-xl: 0.75rem;
  --tc-radius-2xl: 1rem;
  --tc-radius-3xl: 1.5rem;
  --tc-radius-full: 9999px;
  
  /* Transitions */
  --tc-transition-fast: 0.15s ease;
  --tc-transition-normal: 0.3s ease;
  --tc-transition-slow: 0.5s ease;
  --tc-transition-all: all 0.3s ease;
  
  /* Opacity */
  --tc-opacity-disabled: 0.5;
  --tc-opacity-loading: 0.7;
  --tc-opacity-overlay: 0.8;
}

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

/* ===== BASE STYLES - ADDITIVE TO BOOTSTRAP ===== */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 6rem;
}

body {
  font-family: var(--tc-font-primary);
  line-height: var(--tc-leading-relaxed);
  color: var(--tc-text-primary);
  background-color: var(--tc-bg-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ===== SECTION BASE STYLES ===== */
section {
  padding-top: var(--tc-section-y-mobile);
  padding-bottom: var(--tc-section-y-mobile);
  padding-left: var(--tc-section-x);
  padding-right: var(--tc-section-x);
}

@media (min-width: 768px) {
  section {
    padding-top: var(--tc-section-y-tablet);
    padding-bottom: var(--tc-section-y-tablet);
  }
}

@media (min-width: 1024px) {
  section {
    padding-top: var(--tc-section-y-desktop);
    padding-bottom: var(--tc-section-y-desktop);
  }
}

/* Hero section special spacing */
section[id="hero"] {
  padding-top: var(--tc-section-y-hero);
  padding-bottom: var(--tc-section-y-hero);
}

/* ===== ACCESSIBILITY ENHANCEMENTS ===== */
*:focus {
  outline: 2px solid var(--tc-border-interactive);
  outline-offset: 2px;
  border-radius: var(--tc-radius-sm);
}

*:focus:not(:focus-visible) {
  outline: none;
}

*:focus-visible {
  outline: 2px solid var(--tc-border-interactive);
  outline-offset: 2px;
}

/* ===== RESPONSIVE BEHAVIOR ===== */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media (prefers-contrast: high) {
  :root {
    --tc-shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.3);
    --tc-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
    --tc-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
    --tc-border-light: #999999;
    --tc-border-medium: #666666;
  }
}

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

/* ===== PRINT STYLES ===== */
@media print {
  :root {
    --tc-shadow-sm: none;
    --tc-shadow-md: none;
    --tc-shadow-lg: none;
    --tc-shadow-xl: none;
  }
  
  section {
    padding-top: 1rem;
    padding-bottom: 1rem;
    break-inside: avoid;
  }
}