/* ==========================================================================
   Falcon Dive x FIFA World Cup 2026 — Main Styles
   Aeros Design System tokens + base reset + typography + utilities
   ========================================================================== */

:root {
  /* Falcon Dive brand tokens — spec §14 */
  --fd-primary: #3B72ED;
  --fd-secondary: #3B72ED;
  --fd-glow: rgba(59, 114, 237, 0.15);

  /* Semantic colours — spec §14 exact names and values */
  --live-red: #ff4444;
  --win-green: #22c55e;
  --loss-red: #ef4444;
  --draw-amber: #f59e0b;
  --value-gold: #ffd700;

  /* Team colour tokens — spec §14 */
  --france-blue: #002395;
  --france-red: #ED2939;
  --brazil-yellow: #FEDD00;
  --brazil-green: #009C3B;

  /* Layout colours — Aeros surface scale (tokens.css canonical) */
  --bg-base: #0B0E18;
  --bg-surface: #11162A;
  --bg-elevated: #161B30;
  --bg-border: rgba(255,255,255,0.06);
  --surface-0: #0B0E18;
  --surface-1: #11162A;
  --surface-2: #161B30;
  --surface-3: #1C2238;
  --surface-4: #232A45;
  --surface-5: #2A3252;

  /* Text colours — Aeros canonical */
  --text-primary: #FFFFFF;
  --text-secondary: #C7CDE0;
  --text-tertiary: #7B89B8;
  --text-muted: rgba(255,255,255,0.40);
  --text-disabled: rgba(255,255,255,0.32);
  --text-link: #7A9BFA;
  --text-link-hover: #A8BEFF;

  /* Border tokens — Aeros canonical */
  --border-subtle: rgba(255,255,255,0.06);
  --border-medium: rgba(255,255,255,0.10);
  --border-strong: rgba(255,255,255,0.16);
  --border-focus: #3B72ED;

  /* Oxygen Blue scale */
  --blue-50: #EBF1FF;
  --blue-100: #D6E2FF;
  --blue-200: #A8BEFF;
  --blue-300: #7A9BFA;
  --blue-400: #5685F4;
  --blue-500: #3B72ED;
  --blue-600: #2C5BD1;
  --blue-700: #2148A8;
  --blue-800: #173680;
  --blue-900: #0E2358;

  /* Warm Ether (Coral) scale */
  --coral-50: #FFF1ED;
  --coral-100: #FFE0D6;
  --coral-200: #FBC2B0;
  --coral-300: #F6A892;
  --coral-400: #F18D74;
  --coral-500: #E47860;
  --coral-600: #C9604A;
  --coral-700: #9F4837;

  /* Semantic state colours — Aeros canonical */
  --state-success: #4DD4AC;
  --state-warning: #F18D74;
  --state-error: #E5484D;
  --state-info: #3B72ED;

  /* Elevation tokens — Aeros canonical */
  --elevation-flat: none;
  --elevation-card: 0 0 0 1px var(--border-subtle), 0 1px 0 0 rgba(255,255,255,0.02) inset;
  --elevation-raised: 0 0 0 1px var(--border-medium), 0 8px 24px -12px rgba(0,0,0,0.6);
  --elevation-popover: 0 0 0 1px var(--border-strong), 0 16px 48px -16px rgba(0,0,0,0.8);
  --elevation-modal: 0 0 0 1px var(--border-strong), 0 24px 64px -16px rgba(0,0,0,0.9);

  /* Glow tokens */
  --glow-blue: 0 0 24px rgba(59, 114, 237, 0.35);
  --glow-coral: 0 0 24px rgba(241, 141, 116, 0.45);
  --glow-success: 0 0 16px rgba(77, 212, 172, 0.30);

  /* Motion tokens — Aeros canonical */
  --ease-standard: cubic-bezier(0.2, 0.8, 0.2, 1);
  --ease-out: cubic-bezier(0.0, 0.0, 0.2, 1);
  --ease-in: cubic-bezier(0.4, 0.0, 1.0, 1.0);
  --duration-fast: 120ms;
  --duration-base: 200ms;
  --duration-slow: 320ms;
  --duration-modal: 280ms;

  /* Chart palette — Aeros canonical */
  --chart-1: #3B72ED;
  --chart-2: #F18D74;
  --chart-3: #7A9BFA;
  --chart-4: #5685F4;
  --chart-5: #4DD4AC;
  --chart-6: #C9604A;
  --chart-7: #A8BEFF;
  --chart-8: #7B89B8;
  --chart-grid: rgba(255,255,255,0.04);
  --chart-grid-strong: rgba(255,255,255,0.08);
  --chart-axis: #7B89B8;
  --chart-area-fill: rgba(59,114,237,0.18);
  --chart-area-alert: rgba(241,141,116,0.20);
  --chart-line-width: 1.5px;
  --chart-tooltip-bg: #232A45;

  /* Typography */
  --font-display: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'DM Mono', 'Courier New', monospace;

  /* Radii & transitions — Aeros canonical */
  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-2xl: 24px;
  --radius-3xl: 32px;
  --radius-card: 8px;
  --radius-badge: 4px;
  --radius-pill: 9999px;
  --radius-full: 50%;
  --transition-section: opacity 150ms ease;

  /* Spacing */
  --gap-xs: 6px;
  --gap-sm: 12px;
  --gap-md: 20px;
  --gap-lg: 32px;

  /* Font sizes */
  --text-xs: 11px;
  --text-sm: 12px;
  --text-base: 14px;
  --text-md: 16px;
  --text-lg: 20px;
  --text-xl: 28px;
  --text-2xl: 36px;
  --text-hero: 52px;
}

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

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

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

a {
  color: var(--blue-500);
  text-decoration: none;
  transition: opacity 0.15s ease;
}
a:hover {
  opacity: 0.85;
}

img, svg {
  display: block;
  max-width: 100%;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  color: var(--text-primary);
  background: var(--bg-elevated);
  border: 1px solid var(--bg-border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  outline: none;
  transition: border-color 0.15s ease;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--blue-500);
  box-shadow: 0 0 0 2px rgba(59, 114, 237, 0.2);
}

ul, ol {
  list-style: none;
}

table {
  border-collapse: collapse;
  width: 100%;
}

/* ==========================================================================
   Typography
   ========================================================================== */
h1, h2, h3, h4, h5, h6 {
  font-weight: 500;
  line-height: 1.25;
  color: var(--text-primary);
}

h1 { font-size: var(--text-2xl); font-weight: 300; }
h2 { font-size: var(--text-xl); font-weight: 300; }
h3 { font-size: var(--text-lg); }
h4 { font-size: var(--text-md); }
h5 { font-size: var(--text-base); }

/* Tabular numerals on all numeric displays */
.mono, .odds, .score, .stat-value, .tabular-nums,
td[data-numeric], .numeric {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

/* Hero numbers — ultra-thin Aeros display weight */
.hero-number {
  font-family: var(--font-display);
  font-weight: 200;
  font-size: var(--text-hero);
  line-height: 1;
  letter-spacing: -0.02em;
}

.section-title {
  font-size: var(--text-lg);
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: var(--gap-md);
}

.section-subtitle {
  font-size: var(--text-base);
  color: var(--text-tertiary, #7B89B8);
  margin-bottom: var(--gap-sm);
}

.text-primary { color: var(--text-primary); }
.text-secondary { color: var(--text-secondary); }
.text-muted { color: var(--text-muted); }
.text-teal { color: var(--fd-primary); }
.text-blue { color: var(--fd-secondary); }
.text-red { color: var(--live-red); }
.text-green { color: var(--win-green); }
.text-amber { color: var(--draw-amber); }
.text-gold { color: var(--value-gold); }

/* ==========================================================================
   Utility Classes
   ========================================================================== */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.items-end { align-items: flex-end; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-end { justify-content: flex-end; }
.gap-xs { gap: var(--gap-xs); }
.gap-sm { gap: var(--gap-sm); }
.gap-md { gap: var(--gap-md); }
.gap-lg { gap: var(--gap-lg); }

.grid { display: grid; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.w-full { width: 100%; }
.h-full { height: 100%; }
.overflow-hidden { overflow: hidden; }
.overflow-x-auto { overflow-x: auto; }
.overflow-y-auto { overflow-y: auto; }
.relative { position: relative; }
.absolute { position: absolute; }
.hidden { display: none !important; }
.block { display: block; }
.inline-block { display: inline-block; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }
.uppercase { text-transform: uppercase; }
.tracking-wide { letter-spacing: 0.05em; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.mt-xs { margin-top: var(--gap-xs); }
.mt-sm { margin-top: var(--gap-sm); }
.mt-md { margin-top: var(--gap-md); }
.mt-lg { margin-top: var(--gap-lg); }
.mb-xs { margin-bottom: var(--gap-xs); }
.mb-sm { margin-bottom: var(--gap-sm); }
.mb-md { margin-bottom: var(--gap-md); }
.mb-lg { margin-bottom: var(--gap-lg); }
.p-sm { padding: var(--gap-sm); }
.p-md { padding: var(--gap-md); }
.p-lg { padding: var(--gap-lg); }

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--bg-border);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}
