/**
 * ═══════════════════════════════════════════════════════════════════════════
 * BLAZE SPORTS INTEL - COMPREHENSIVE DESIGN SYSTEM
 * ═══════════════════════════════════════════════════════════════════════════
 *
 * Production-grade design system for blazesportsintel.com
 * Version: 2.0.0
 * Last Updated: 2025-10-16
 *
 * Architecture:
 * - CSS Custom Properties for theming
 * - Semantic color tokens
 * - Typography scale
 * - Spacing system
 * - Animation library
 * - Accessibility-first design
 *
 * Performance:
 * - Minimal CSS (~15KB gzipped)
 * - GPU-accelerated animations
 * - Prefers-reduced-motion support
 * - Dark mode optimized
 * ═══════════════════════════════════════════════════════════════════════════
 */

/* ========================================================================== */
/* 1. DESIGN TOKENS - Foundation                                              */
/* ========================================================================== */

:root {
  /* ===== Brand Colors ===== */
  --blaze-burnt-orange-50: #fff5ed;
  --blaze-burnt-orange-100: #ffead5;
  --blaze-burnt-orange-200: #ffd0aa;
  --blaze-burnt-orange-300: #ffad74;
  --blaze-burnt-orange-400: #ff7d3c;
  --blaze-burnt-orange-500: #bf5700; /* Primary Brand */
  --blaze-burnt-orange-600: #9c4500;
  --blaze-burnt-orange-700: #7d3700;
  --blaze-burnt-orange-800: #5e2900;
  --blaze-burnt-orange-900: #3f1c00;

  /* Semantic Brand Aliases */
  --color-brand-primary: var(--blaze-burnt-orange-500);
  --color-brand-secondary: var(--blaze-burnt-orange-600);
  --color-brand-tertiary: var(--blaze-burnt-orange-400);
  --color-brand-light: var(--blaze-burnt-orange-300);
  --color-brand-dark: var(--blaze-burnt-orange-700);

  /* ===== Neutral Colors ===== */
  --color-charcoal-50: #f9fafb;
  --color-charcoal-100: #f3f4f6;
  --color-charcoal-200: #e5e7eb;
  --color-charcoal-300: #d1d5db;
  --color-charcoal-400: #9ca3af;
  --color-charcoal-500: #6b7280;
  --color-charcoal-600: #4b5563;
  --color-charcoal-700: #374151;
  --color-charcoal-800: #1f2937;
  --color-charcoal-900: #111827;
  --color-charcoal-950: #0a0a0f;

  /* Dark Theme Base (Default) */
  --color-background-primary: #0d0d12;
  --color-background-secondary: #161620;
  --color-background-tertiary: #1f1f2e;
  --color-background-elevated: #28283c;

  --color-surface-primary: rgba(255, 255, 255, 0.08);
  --color-surface-secondary: rgba(255, 255, 255, 0.12);
  --color-surface-tertiary: rgba(255, 255, 255, 0.16);

  /* ===== Semantic Colors ===== */
  --color-success: #10b981;
  --color-success-light: #34d399;
  --color-success-dark: #059669;

  --color-warning: #f59e0b;
  --color-warning-light: #fbbf24;
  --color-warning-dark: #d97706;

  --color-error: #ef4444;
  --color-error-light: #f87171;
  --color-error-dark: #dc2626;

  --color-info: #3b82f6;
  --color-info-light: #60a5fa;
  --color-info-dark: #2563eb;

  /* ===== Typography ===== */
  --font-family-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-family-display: 'Bebas Neue', 'Impact', 'Arial Black', sans-serif;
  --font-family-mono: 'SF Mono', 'Consolas', 'Monaco', 'Courier New', monospace;

  /* Font Sizes - Fluid Typography */
  --font-size-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  --font-size-sm: clamp(0.875rem, 0.825rem + 0.25vw, 1rem);
  --font-size-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --font-size-lg: clamp(1.125rem, 1.05rem + 0.375vw, 1.25rem);
  --font-size-xl: clamp(1.25rem, 1.15rem + 0.5vw, 1.5rem);
  --font-size-2xl: clamp(1.5rem, 1.35rem + 0.75vw, 1.875rem);
  --font-size-3xl: clamp(1.875rem, 1.65rem + 1.125vw, 2.25rem);
  --font-size-4xl: clamp(2.25rem, 1.95rem + 1.5vw, 3rem);
  --font-size-5xl: clamp(3rem, 2.5rem + 2.5vw, 3.75rem);
  --font-size-6xl: clamp(3.75rem, 3rem + 3.75vw, 4.5rem);

  /* Font Weights */
  --font-weight-light: 300;
  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
  --font-weight-extrabold: 800;
  --font-weight-black: 900;

  /* Line Heights */
  --line-height-tight: 1.25;
  --line-height-snug: 1.375;
  --line-height-normal: 1.5;
  --line-height-relaxed: 1.625;
  --line-height-loose: 2;

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

  /* ===== Spacing Scale ===== */
  --space-0: 0;
  --space-px: 1px;
  --space-0-5: 0.125rem; /* 2px */
  --space-1: 0.25rem;    /* 4px */
  --space-1-5: 0.375rem; /* 6px */
  --space-2: 0.5rem;     /* 8px */
  --space-2-5: 0.625rem; /* 10px */
  --space-3: 0.75rem;    /* 12px */
  --space-3-5: 0.875rem; /* 14px */
  --space-4: 1rem;       /* 16px */
  --space-5: 1.25rem;    /* 20px */
  --space-6: 1.5rem;     /* 24px */
  --space-7: 1.75rem;    /* 28px */
  --space-8: 2rem;       /* 32px */
  --space-9: 2.25rem;    /* 36px */
  --space-10: 2.5rem;    /* 40px */
  --space-12: 3rem;      /* 48px */
  --space-14: 3.5rem;    /* 56px */
  --space-16: 4rem;      /* 64px */
  --space-20: 5rem;      /* 80px */
  --space-24: 6rem;      /* 96px */
  --space-28: 7rem;      /* 112px */
  --space-32: 8rem;      /* 128px */

  /* ===== Border Radius ===== */
  --radius-none: 0;
  --radius-sm: 0.25rem;    /* 4px */
  --radius-md: 0.5rem;     /* 8px */
  --radius-lg: 0.75rem;    /* 12px */
  --radius-xl: 1rem;       /* 16px */
  --radius-2xl: 1.25rem;   /* 20px */
  --radius-3xl: 1.5rem;    /* 24px */
  --radius-4xl: 2rem;      /* 32px */
  --radius-full: 9999px;

  /* ===== Shadows ===== */
  --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  --shadow-inner: inset 0 2px 4px 0 rgba(0, 0, 0, 0.05);

  /* Brand Glow Shadows */
  --shadow-glow-sm: 0 0 20px rgba(191, 87, 0, 0.3);
  --shadow-glow-md: 0 0 40px rgba(191, 87, 0, 0.4), 0 0 60px rgba(191, 87, 0, 0.2);
  --shadow-glow-lg: 0 0 60px rgba(204, 102, 0, 0.5), 0 0 100px rgba(191, 87, 0, 0.3), 0 0 140px rgba(217, 123, 56, 0.2);

  /* ===== Transitions ===== */
  --transition-duration-instant: 75ms;
  --transition-duration-fast: 150ms;
  --transition-duration-base: 300ms;
  --transition-duration-slow: 500ms;
  --transition-duration-slower: 700ms;

  --transition-timing-linear: linear;
  --transition-timing-ease-in: cubic-bezier(0.4, 0, 1, 1);
  --transition-timing-ease-out: cubic-bezier(0, 0, 0.2, 1);
  --transition-timing-ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
  --transition-timing-elastic: cubic-bezier(0.34, 1.56, 0.64, 1);
  --transition-timing-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);

  /* ===== Z-Index Scale ===== */
  --z-index-dropdown: 1000;
  --z-index-sticky: 1020;
  --z-index-fixed: 1030;
  --z-index-modal-backdrop: 1040;
  --z-index-modal: 1050;
  --z-index-popover: 1060;
  --z-index-tooltip: 1070;
  --z-index-notification: 1080;

  /* ===== Glassmorphism ===== */
  --glass-blur: 12px;
  --glass-blur-heavy: 24px;
  --glass-bg-light: rgba(255, 255, 255, 0.08);
  --glass-bg-medium: rgba(255, 255, 255, 0.12);
  --glass-bg-heavy: rgba(255, 255, 255, 0.16);
  --glass-border: rgba(255, 255, 255, 0.15);
  --glass-border-brand: rgba(191, 87, 0, 0.25);

  /* ===== Text Colors ===== */
  --text-primary: rgba(255, 255, 255, 1);
  --text-secondary: rgba(255, 255, 255, 0.92);
  --text-tertiary: rgba(255, 255, 255, 0.75);
  --text-quaternary: rgba(255, 255, 255, 0.55);
  --text-disabled: rgba(255, 255, 255, 0.38);
  --text-brand: var(--color-brand-primary);

  /* ===== Gradients ===== */
  --gradient-brand-primary: linear-gradient(135deg, #bf5700 0%, #cc6600 50%, #d97b38 100%);
  --gradient-brand-secondary: linear-gradient(135deg, #cc6600 0%, #e69551 100%);
  --gradient-brand-deep: linear-gradient(135deg, #8b4513 0%, #bf5700 50%, #cc6600 100%);
  --gradient-brand-radial: radial-gradient(circle at center, rgba(191, 87, 0, 0.3) 0%, transparent 70%);

  /* ===== Breakpoints (for JavaScript) ===== */
  --breakpoint-sm: 640px;
  --breakpoint-md: 768px;
  --breakpoint-lg: 1024px;
  --breakpoint-xl: 1280px;
  --breakpoint-2xl: 1536px;
}

/* ========================================================================== */
/* 2. REDUCED MOTION SUPPORT                                                  */
/* ========================================================================== */

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

/* ========================================================================== */
/* 3. BASE RESET                                                              */
/* ========================================================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family-sans);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-normal);
  line-height: var(--line-height-normal);
  color: var(--text-primary);
  background: var(--color-background-primary);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ========================================================================== */
/* 4. TYPOGRAPHY UTILITIES                                                    */
/* ========================================================================== */

.text-xs { font-size: var(--font-size-xs); }
.text-sm { font-size: var(--font-size-sm); }
.text-base { font-size: var(--font-size-base); }
.text-lg { font-size: var(--font-size-lg); }
.text-xl { font-size: var(--font-size-xl); }
.text-2xl { font-size: var(--font-size-2xl); }
.text-3xl { font-size: var(--font-size-3xl); }
.text-4xl { font-size: var(--font-size-4xl); }
.text-5xl { font-size: var(--font-size-5xl); }
.text-6xl { font-size: var(--font-size-6xl); }

.font-light { font-weight: var(--font-weight-light); }
.font-normal { font-weight: var(--font-weight-normal); }
.font-medium { font-weight: var(--font-weight-medium); }
.font-semibold { font-weight: var(--font-weight-semibold); }
.font-bold { font-weight: var(--font-weight-bold); }
.font-extrabold { font-weight: var(--font-weight-extrabold); }
.font-black { font-weight: var(--font-weight-black); }

.font-sans { font-family: var(--font-family-sans); }
.font-display { font-family: var(--font-family-display); }
.font-mono { font-family: var(--font-family-mono); }

.leading-tight { line-height: var(--line-height-tight); }
.leading-snug { line-height: var(--line-height-snug); }
.leading-normal { line-height: var(--line-height-normal); }
.leading-relaxed { line-height: var(--line-height-relaxed); }
.leading-loose { line-height: var(--line-height-loose); }

.tracking-tighter { letter-spacing: var(--letter-spacing-tighter); }
.tracking-tight { letter-spacing: var(--letter-spacing-tight); }
.tracking-normal { letter-spacing: var(--letter-spacing-normal); }
.tracking-wide { letter-spacing: var(--letter-spacing-wide); }
.tracking-wider { letter-spacing: var(--letter-spacing-wider); }
.tracking-widest { letter-spacing: var(--letter-spacing-widest); }

.text-primary { color: var(--text-primary); }
.text-secondary { color: var(--text-secondary); }
.text-tertiary { color: var(--text-tertiary); }
.text-quaternary { color: var(--text-quaternary); }
.text-disabled { color: var(--text-disabled); }
.text-brand { color: var(--text-brand); }

.text-gradient-brand {
  background: var(--gradient-brand-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ========================================================================== */
/* 5. SELECTION STYLING                                                       */
/* ========================================================================== */

::selection {
  background: var(--color-brand-primary);
  color: var(--text-primary);
  text-shadow: none;
}

::-moz-selection {
  background: var(--color-brand-primary);
  color: var(--text-primary);
  text-shadow: none;
}

/* ========================================================================== */
/* 6. SCROLLBAR STYLING                                                       */
/* ========================================================================== */

::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}

::-webkit-scrollbar-track {
  background: var(--color-background-secondary);
  border-left: 1px solid rgba(255, 255, 255, 0.1);
}

::-webkit-scrollbar-thumb {
  background: var(--gradient-brand-primary);
  border-radius: var(--radius-md);
  border: 2px solid var(--color-background-secondary);
  transition: background var(--transition-duration-fast) var(--transition-timing-ease-out);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--gradient-brand-secondary);
  box-shadow: var(--shadow-glow-sm);
}

::-webkit-scrollbar-thumb:active {
  background: var(--color-brand-dark);
}

/* Firefox */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--color-brand-primary) var(--color-background-secondary);
}

/* ========================================================================== */
/* 7. FOCUS STATES (Accessibility)                                            */
/* ========================================================================== */

:focus {
  outline: 2px solid var(--color-brand-primary);
  outline-offset: 2px;
}

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

:focus-visible {
  outline: 2px solid var(--color-brand-primary);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* ========================================================================== */
/* 8. SKIP LINK (Accessibility)                                               */
/* ========================================================================== */

.skip-link {
  position: absolute;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  z-index: calc(var(--z-index-notification) + 1);
  padding: var(--space-4) var(--space-8);
  background: var(--color-brand-primary);
  color: var(--text-primary);
  font-weight: var(--font-weight-bold);
  text-decoration: none;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  box-shadow: var(--shadow-2xl);
  transition: top var(--transition-duration-base) var(--transition-timing-ease-out);
}

.skip-link:focus {
  top: 0;
  outline: 3px solid var(--text-primary);
  outline-offset: 2px;
}

/* ========================================================================== */
/* 9. SCREEN READER ONLY                                                      */
/* ========================================================================== */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* ========================================================================== */
/* 10. UTILITY CLASSES                                                        */
/* ========================================================================== */

/* Spacing */
.m-0 { margin: var(--space-0); }
.m-1 { margin: var(--space-1); }
.m-2 { margin: var(--space-2); }
.m-3 { margin: var(--space-3); }
.m-4 { margin: var(--space-4); }
.m-5 { margin: var(--space-5); }
.m-6 { margin: var(--space-6); }
.m-8 { margin: var(--space-8); }
.m-10 { margin: var(--space-10); }
.m-12 { margin: var(--space-12); }
.m-16 { margin: var(--space-16); }

.p-0 { padding: var(--space-0); }
.p-1 { padding: var(--space-1); }
.p-2 { padding: var(--space-2); }
.p-3 { padding: var(--space-3); }
.p-4 { padding: var(--space-4); }
.p-5 { padding: var(--space-5); }
.p-6 { padding: var(--space-6); }
.p-8 { padding: var(--space-8); }
.p-10 { padding: var(--space-10); }
.p-12 { padding: var(--space-12); }
.p-16 { padding: var(--space-16); }

/* Display */
.hidden { display: none; }
.block { display: block; }
.inline-block { display: inline-block; }
.inline { display: inline; }
.flex { display: flex; }
.inline-flex { display: inline-flex; }
.grid { display: grid; }
.inline-grid { display: inline-grid; }

/* Flexbox */
.flex-row { flex-direction: row; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-start { align-items: flex-start; }
.items-center { align-items: center; }
.items-end { align-items: flex-end; }
.justify-start { justify-content: flex-start; }
.justify-center { justify-content: center; }
.justify-end { justify-content: flex-end; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: var(--space-1); }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }
.gap-6 { gap: var(--space-6); }
.gap-8 { gap: var(--space-8); }

/* Borders */
.rounded-none { border-radius: var(--radius-none); }
.rounded-sm { border-radius: var(--radius-sm); }
.rounded-md { border-radius: var(--radius-md); }
.rounded-lg { border-radius: var(--radius-lg); }
.rounded-xl { border-radius: var(--radius-xl); }
.rounded-2xl { border-radius: var(--radius-2xl); }
.rounded-3xl { border-radius: var(--radius-3xl); }
.rounded-full { border-radius: var(--radius-full); }

/* Shadows */
.shadow-xs { box-shadow: var(--shadow-xs); }
.shadow-sm { box-shadow: var(--shadow-sm); }
.shadow-md { box-shadow: var(--shadow-md); }
.shadow-lg { box-shadow: var(--shadow-lg); }
.shadow-xl { box-shadow: var(--shadow-xl); }
.shadow-2xl { box-shadow: var(--shadow-2xl); }
.shadow-glow-sm { box-shadow: var(--shadow-glow-sm); }
.shadow-glow-md { box-shadow: var(--shadow-glow-md); }
.shadow-glow-lg { box-shadow: var(--shadow-glow-lg); }

/* Transitions */
.transition-fast { transition: all var(--transition-duration-fast) var(--transition-timing-ease-out); }
.transition-base { transition: all var(--transition-duration-base) var(--transition-timing-ease-out); }
.transition-slow { transition: all var(--transition-duration-slow) var(--transition-timing-ease-out); }

/* ========================================================================== */
/* 11. GLASSMORPHISM COMPONENTS                                               */
/* ========================================================================== */

.glass {
  background: var(--glass-bg-light);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
}

.glass-medium {
  background: var(--glass-bg-medium);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
}

.glass-heavy {
  background: var(--glass-bg-heavy);
  backdrop-filter: blur(var(--glass-blur-heavy));
  -webkit-backdrop-filter: blur(var(--glass-blur-heavy));
  border: 1px solid var(--glass-border);
}

/* ========================================================================== */
/* END OF DESIGN SYSTEM                                                       */
/* ========================================================================== */
