/* ============================================================
   Racing Hub — TheFour11 Design System
   ============================================================ */

:root {
  --bg: #050a14;
  --bg-card: #0d1726;
  --bg-card-hover: #152033;
  --border: #1e3050;
  --border-light: #2a4070;
  --text: #d8e8f4;
  --text-muted: #5a7a9a;
  --text-bright: #ffffff;

  --accent: #e63012;
  --accent-dark: #b82510;

  --gold: #f5a623;
  --blue: #3b9eff;
  --yellow: #f5c800;

  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, sans-serif;
  --font-mono: 'Courier New', Courier, monospace;
  --radius: 8px;
  --radius-lg: 14px;
  --shadow: 0 4px 24px rgba(0,0,0,0.5);
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.65;
  min-height: 100vh;
}

a { color: inherit; }
img { max-width: 100%; }

/* ============================================================
   NAVIGATION
   ============================================================ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
}

nav {
  background: rgba(5, 10, 20, 0.97);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(12px);
}

.nav-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 1.25rem;
  display: flex;
  align-items: center;
  height: 62px;
}

.nav-brand {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-bright);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-right: auto;
  letter-spacing: -0.01em;
}

.nav-brand .flag { font-size: 1.2rem; }
.nav-brand .accent { color: var(--accent); }

.nav-links {
  display: flex;
  list-style: none;
  align-items: center;
  gap: 0;
}

.nav-links li { list-style: none; }

.nav-links a {
  display: block;
  padding: 0 0.875rem;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  line-height: 62px;
  transition: color 0.15s;
  white-space: nowrap;
}

.nav-links a:hover { color: var(--text-bright); }
.nav-links a.active { color: var(--accent); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 10px;
  background: none;
  border: none;
  margin-left: 1rem;
}
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--text); border-radius: 2px; }

/* ============================================================
   CONTAINER / LAYOUT
   ============================================================ */

.container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.section { padding: 3.5rem 0; }

.section-header { margin-bottom: 2rem; }

.section-title {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-bright);
  margin-bottom: 0.4rem;
  letter-spacing: -0.02em;
}

.section-subtitle {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* ============================================================
   HERO
   ============================================================ */

.hero {
  background: linear-gradient(160deg, #050a14 0%, #0f0804 40%, #1a0a06 100%);
  border-bottom: 1px solid var(--border);
  padding: 5rem 1.25rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(45deg, transparent, transparent 24px, rgba(255,255,255,0.012) 24px, rgba(255,255,255,0.012) 48px);
  pointer-events: none;
}

.hero-badge {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 4px 14px;
  border-radius: 20px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}

.hero h1 {
  font-size: clamp(2.25rem, 6vw, 4.5rem);
  font-weight: 900;
  color: var(--text-bright);
  line-height: 1.05;
  margin-bottom: 1rem;
  letter-spacing: -0.03em;
}

.hero h1 .hl { color: var(--accent); }

.hero .subtitle {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 580px;
  margin: 0 auto 2.5rem;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}

/* ============================================================
   BUTTONS
   ============================================================ */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0.625rem 1.375rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: all 0.18s;
}

.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); transform: translateY(-1px); }
.btn-outline { background: transparent; color: var(--text); border: 1px solid var(--border-light); }
.btn-outline:hover { background: var(--bg-card); border-color: var(--text-muted); }

/* ============================================================
   CARDS
   ============================================================ */

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  transition: border-color 0.18s, background 0.18s;
}

.card:hover {
  border-color: var(--border-light);
  background: var(--bg-card-hover);
}

.card-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

/* Series cards */
.series-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  text-decoration: none;
  color: inherit;
  display: block;
  transition: all 0.2s;
  position: relative;
  overflow: hidden;
}

.series-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: var(--series-color, var(--accent));
}

.series-card:hover {
  border-color: var(--border-light);
  background: var(--bg-card-hover);
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.series-card .series-label {
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--series-color, var(--accent));
  margin-bottom: 0.5rem;
}

.series-card .series-name {
  font-size: 1.4rem;
  font-weight: 900;
  color: var(--text-bright);
  margin-bottom: 0.25rem;
  letter-spacing: -0.02em;
}

.series-card .series-tagline {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.series-card .series-event {
  font-size: 0.85rem;
  color: var(--text-muted);
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.6rem 0.875rem;
  margin-bottom: 0.75rem;
}

.series-card .series-event strong { color: var(--text-bright); }

.series-card .series-link {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--series-color, var(--accent));
}

/* ============================================================
   BADGES
   ============================================================ */

.badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.badge-live { background: #c0392b; color: #fff; }
.badge-soon { background: rgba(245,166,35,0.15); color: var(--gold); border: 1px solid rgba(245,166,35,0.3); }

/* ============================================================
   GRIDS
   ============================================================ */

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.25rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.25rem; }

/* ============================================================
   UTILITY
   ============================================================ */

.text-muted  { color: var(--text-muted); }
.text-bright { color: var(--text-bright); }
.text-accent { color: var(--accent); }

.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-2 { margin-bottom: 1rem; }

.divider { border: none; border-top: 1px solid var(--border); margin: 0; }

/* ============================================================
   FOOTER
   ============================================================ */

footer {
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  padding: 2.5rem 1.25rem;
  margin-top: 5rem;
  text-align: center;
}

footer p { color: var(--text-muted); font-size: 0.85rem; line-height: 1.8; }
footer a { color: var(--accent); text-decoration: none; }
footer a:hover { text-decoration: underline; }

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 900px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 62px;
    left: 0;
    right: 0;
    background: rgba(5,10,20,0.98);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 0.5rem 0;
  }

  .nav-links.open { display: flex; }

  .nav-links a {
    line-height: 1;
    padding: 0.8rem 1.25rem;
    border-bottom: 1px solid var(--border);
  }

  .nav-toggle { display: flex; }

  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .grid-auto { grid-template-columns: 1fr; }

  .hero { padding: 3rem 1.25rem; }
}

/* ============================================================
   TheFour11 parent site bar
   ============================================================ */

.the411-bar {
  background: #050810;
  border-bottom: 1px solid #1a2840;
  padding: 0.45rem 1.25rem;
  font-size: 0.78rem;
  color: #4a6a8a;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.the411-bar a {
  color: #ff6b35;
  font-weight: 700;
  text-decoration: none;
  transition: color 0.15s;
}

.the411-bar a:hover { color: #ff8a5a; }

.the411-bar .sep { color: #2a3f5f; }

/* ============================================================
   Sports Navigation Strip
   ============================================================ */

.sports-strip {
  background: #ff6b35;
  padding: 0.38rem 0 0.38rem 1.25rem;
  font-size: 0.74rem;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0;
  border-bottom: 1px solid rgba(0,0,0,0.15);
}

.sports-strip a {
  color: rgba(0,0,0,0.65);
  font-weight: 600;
  text-decoration: none;
  padding: 0 0.45rem;
  transition: color 0.15s;
  white-space: nowrap;
}

.sports-strip a:first-child { padding-left: 0; }

.sports-strip a:hover { color: #000; }

.sports-strip a.active {
  color: #fff;
  font-weight: 800;
  text-shadow: 0 1px 2px rgba(0,0,0,0.25);
}

.sports-strip .ss-sep {
  color: rgba(0,0,0,0.28);
  flex-shrink: 0;
  user-select: none;
}

/* Scroll lock when mobile nav is open */
body:has(#navlinks.open) { overflow: hidden; }
