/* Ramsey Racing — dark race theme (aligned with Data at Speed, unique lockup) */
:root {
  --black: #0d0d0f;
  --dark: #131316;
  --dark-2: #1a1a1e;
  --red: #b01822;
  --red-bright: #d21f2b;
  --white: #ffffff;
  --grey: #a7a7ad;
  --grey-light: #d6d6db;
  --gold: #d4a84b;
  --heading: "Oswald", system-ui, sans-serif;
  --body: "Inter", system-ui, sans-serif;
  --max: 1140px;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--body);
  background: var(--black);
  color: var(--grey-light);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--red-bright); text-decoration: none; }
a:hover { color: #ff3d49; }
h1, h2, h3, h4 {
  font-family: var(--heading);
  color: var(--white);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  line-height: 1.15;
}
h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); margin-bottom: 1rem; }
.container { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.section { padding: 88px 0; }
.section-dark { background: var(--dark); }
.eyebrow {
  font-family: var(--heading);
  color: var(--red-bright);
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}
.lede { max-width: 640px; color: var(--grey); margin-bottom: 2rem; }

.btn {
  display: inline-block;
  font-family: var(--heading);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 14px 28px;
  border: 2px solid transparent;
  transition: 0.2s ease;
  cursor: pointer;
  text-align: center;
}
.btn:disabled, .btn.is-disabled {
  opacity: 0.45;
  pointer-events: none;
}
.btn-red { background: var(--red); color: #fff; }
.btn-red:hover { background: var(--red-bright); color: #fff; transform: translateY(-2px); }
.btn-ghost { border-color: rgba(255,255,255,0.45); color: #fff; background: transparent; }
.btn-ghost:hover { border-color: #fff; background: rgba(255,255,255,0.06); color: #fff; }
.btn-gold { background: var(--gold); color: #111; }
.btn-gold:hover { filter: brightness(1.08); color: #111; }

/* Nav */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  padding: 16px 0;
  transition: background 0.25s;
}
.nav.scrolled {
  background: rgba(13,13,15,0.94);
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 20px rgba(0,0,0,0.45);
}
.nav-inner {
  max-width: 1240px; margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.nav-logo {
  font-family: var(--heading);
  color: #fff;
  font-size: 1.15rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
}
.nav-logo span { color: var(--red-bright); }
.nav-links { display: flex; gap: 1.25rem; align-items: center; flex-wrap: wrap; }
.nav-links a { color: var(--grey-light); font-size: 0.9rem; font-weight: 500; }
.nav-links a:hover { color: #fff; }
.nav-toggle {
  display: none; background: none; border: 0; color: #fff; font-size: 1.4rem; cursor: pointer;
}

/* Hero */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: flex-end;
  padding: 120px 0 80px;
  overflow: hidden;
}
.hero-media {
  position: absolute; inset: 0;
  z-index: 0;
}
.hero-media video, .hero-media img {
  width: 100%; height: 100%; object-fit: cover;
}
.hero-overlay {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(13,13,15,0.35) 0%, rgba(13,13,15,0.55) 40%, rgba(13,13,15,0.96) 100%),
    radial-gradient(ellipse at 20% 30%, rgba(176,24,34,0.25), transparent 50%);
  z-index: 1;
}
.hero-content { position: relative; z-index: 2; max-width: 720px; }
.hero h1 {
  font-size: clamp(2.6rem, 8vw, 4.6rem);
  margin-bottom: 0.75rem;
}
.hero h1 .car { color: var(--red-bright); }
.hero-badges { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 1rem 0 1.5rem; }
.badge {
  display: inline-block;
  font-family: var(--heading);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.4rem 0.75rem;
  border: 1px solid rgba(212,168,75,0.55);
  color: var(--gold);
  background: rgba(0,0,0,0.35);
}
.badge-live {
  border-color: var(--red-bright);
  color: #fff;
  background: var(--red);
  animation: pulse 1.4s ease infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(210,31,43,0.5); }
  50% { box-shadow: 0 0 0 8px rgba(210,31,43,0); }
}
.hero-ctas { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.25rem; }
.hero-sub { color: var(--grey); font-size: 1.05rem; max-width: 34rem; }

/* Cards / grid */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.card {
  background: var(--dark-2);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px;
  padding: 1.5rem;
}
.card h3 { margin-bottom: 0.5rem; font-size: 1.2rem; }
.champ-card {
  background: linear-gradient(145deg, #1c1410, #131316 60%);
  border-color: rgba(212,168,75,0.25);
}
.champ-card .season { color: var(--gold); font-family: var(--heading); letter-spacing: 0.15em; font-size: 0.8rem; }

/* Events */
.series-block { margin-bottom: 1.5rem; }
.series-head {
  width: 100%;
  text-align: left;
  background: var(--dark-2);
  border: 1px solid rgba(255,255,255,0.08);
  color: #fff;
  padding: 1rem 1.25rem;
  border-radius: 10px;
  cursor: pointer;
  font-family: var(--heading);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.series-head:hover { border-color: rgba(210,31,43,0.4); }
.event-list { padding: 0.5rem 0 0.5rem 0.5rem; }
.event-item {
  border-left: 3px solid var(--red);
  padding: 1rem 1rem 1rem 1.25rem;
  margin: 0.75rem 0;
  background: rgba(255,255,255,0.02);
  border-radius: 0 10px 10px 0;
}
.event-item h4 { margin-bottom: 0.35rem; }
.event-meta { color: var(--grey); font-size: 0.9rem; margin-bottom: 0.5rem; }
.session-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(255,255,255,0.06);
}
.session-row .name { font-weight: 600; color: #fff; min-width: 120px; }
.session-row .time { color: var(--grey); font-size: 0.9rem; flex: 1; }
.countdown-chip {
  font-family: var(--heading);
  letter-spacing: 0.08em;
  color: var(--gold);
  font-size: 0.95rem;
}

/* Gallery */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 0.75rem;
}
.gallery-grid a {
  display: block;
  overflow: hidden;
  border-radius: 10px;
  aspect-ratio: 4/3;
}
.gallery-grid img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.35s;
}
.gallery-grid a:hover img { transform: scale(1.05); }

/* Book */
.book-section {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 2rem;
  align-items: center;
}
.book-cover {
  border-radius: 8px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.5);
}

/* Alerts form */
.alerts-form {
  display: grid;
  gap: 0.75rem;
  max-width: 480px;
}
.alerts-form input[type="text"],
.alerts-form input[type="email"] {
  width: 100%;
  padding: 0.85rem 1rem;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.12);
  background: #0a0a0c;
  color: #fff;
}
.hp-field { position: absolute; left: -9999px; opacity: 0; height: 0; width: 0; }
.form-msg { min-height: 1.4em; font-size: 0.9rem; }
.form-msg.ok { color: #3ecf8e; }
.form-msg.err { color: #ff6b6b; }

/* Footer */
.footer {
  border-top: 1px solid rgba(255,255,255,0.06);
  padding: 2.5rem 0;
  color: var(--grey);
  font-size: 0.9rem;
}
.footer-inner {
  display: flex; flex-wrap: wrap; gap: 1rem;
  justify-content: space-between; align-items: center;
}
.footer a { color: var(--grey-light); margin-right: 1rem; }
.footer a:hover { color: #fff; }

/* Today bar */
.today-bar {
  position: sticky;
  top: 64px;
  z-index: 90;
  background: linear-gradient(90deg, #5a0e14, #b01822);
  color: #fff;
  padding: 0.65rem 0;
  display: none;
}
.today-bar.show { display: block; }
.today-bar .container {
  display: flex; flex-wrap: wrap; gap: 0.75rem;
  align-items: center; justify-content: space-between;
}
.today-bar a.btn { padding: 8px 16px; font-size: 0.8rem; }

/* Watch page */
.watch-page { background: #000; min-height: 100vh; color: #fff; }
.watch-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  min-height: 100vh;
}
.watch-stage {
  position: relative;
  background: #050505;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  min-height: 50vh;
}
.watch-hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  background: #000;
}
.watch-hero-bg.is-hidden { display: none; }
.watch-stage .watch-live-player,
.watch-stage iframe {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  max-height: 100vh;
  object-fit: contain;
  background: #000;
}
.watch-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  background: linear-gradient(180deg, rgba(0,0,0,0.45), rgba(0,0,0,0.72));
  text-align: center;
  padding: 2rem;
  pointer-events: none;
}
.watch-overlay h1 { font-size: clamp(1.6rem, 4vw, 2.4rem); }
.watch-overlay .big-count {
  font-family: var(--heading);
  font-size: clamp(2.5rem, 8vw, 4rem);
  color: var(--gold);
  letter-spacing: 0.08em;
  line-height: 1.05;
  margin: 0.25rem 0;
}
.watch-overlay .overlay-status {
  font-size: 1rem;
  color: var(--grey-light);
  max-width: 28rem;
  margin: 0;
}
.watch-sidebar {
  border-left: 1px solid #222;
  background: #0e0e12;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.watch-sidebar h2 { font-size: 1rem; margin: 0; }
.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--heading);
  letter-spacing: 0.12em;
  font-size: 0.8rem;
  color: #fff;
}
.live-pill .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--red-bright);
  box-shadow: 0 0 8px var(--red-bright);
}
.stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
}
.stat {
  background: #16161c;
  border-radius: 10px;
  padding: 0.75rem;
}
.stat .label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--grey);
}
.stat .value {
  font-family: var(--heading);
  font-size: 1.5rem;
  color: #fff;
  line-height: 1.2;
}
.stat.wide { grid-column: 1 / -1; }
.watch-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}
.watch-top a { color: var(--grey); font-size: 0.85rem; }
.unmute-btn {
  position: absolute;
  bottom: 1.25rem;
  left: 1.25rem;
  z-index: 5;
  display: none;
}

@media (max-width: 900px) {
  .grid-2, .grid-3, .book-section, .watch-layout { grid-template-columns: 1fr; }
  .nav-links { display: none; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: rgba(13,13,15,0.98);
    padding: 1rem 1.5rem 1.5rem;
  }
  .nav-toggle { display: block; }
  .watch-sidebar { border-left: 0; border-top: 1px solid #222; }
  .watch-stage { min-height: 50vh; }
}
