:root {
  color-scheme: dark;
  --bg: #050506;
  --bg-soft: #111114;
  --panel: rgba(255, 255, 255, 0.055);
  --panel-strong: rgba(255, 255, 255, 0.09);
  --line: rgba(255, 255, 255, 0.11);
  --text: #f7f7f8;
  --muted: #a2a2aa;
  --dim: #66666f;
  --red: #e10600;
  --red-soft: rgba(225, 6, 0, 0.16);
  --yellow: #ffd166;
  --green: #3ddc97;
  --shadow: 0 28px 90px rgba(0, 0, 0, 0.42);
  --radius: 22px;
  --max: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(at 0% 0%, rgba(77, 0, 0, 0.28) 0, transparent 50%),
    radial-gradient(at 50% 0%, #0d0d0d 0, transparent 50%),
    radial-gradient(at 100% 0%, rgba(88, 14, 14, 0.18) 0, transparent 50%),
    #000;
  color: var(--text);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  min-height: 100vh;
  background-attachment: fixed;
}

a {
  color: inherit;
  text-decoration: none;
}

.loading-screen {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 18px;
  background: #050506;
  transition: opacity 420ms ease, visibility 420ms ease;
}

.loading-screen.is-hidden {
  opacity: 0;
  visibility: hidden;
}

.loader-mark {
  display: grid;
  width: 74px;
  height: 74px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--red);
  color: white;
  font-size: 26px;
  font-weight: 950;
  font-style: italic;
  letter-spacing: -0.07em;
  box-shadow: 0 20px 70px rgba(225, 6, 0, 0.35);
}

.loader-track {
  width: min(320px, 78vw);
  height: 4px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
}

.loader-track span {
  display: block;
  width: 44%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, transparent, var(--red), white);
  animation: loadbar 1.1s ease-in-out infinite;
}

.loading-screen p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.site-header {
  position: fixed;
  top: 0;
  left: 50%;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: min(var(--max), calc(100% - 32px));
  padding: 18px 0 14px;
  transform: translateX(-50%);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 18px;
  font-weight: 950;
  letter-spacing: -0.04em;
}

.brand span {
  display: inline-grid;
  place-items: center;
  min-width: 42px;
  border-radius: 10px;
  background: var(--red);
  color: white;
  font-style: italic;
}

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(8, 8, 10, 0.82);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.28);
}

.nav a {
  border-radius: 999px;
  padding: 10px 14px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  transition: background 180ms ease, color 180ms ease;
}

.nav a:hover {
  background: var(--panel-strong);
  color: white;
}

main {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
}

.hero {
  position: relative;
  min-height: 700px;
  margin-top: 104px;
  overflow: hidden;
  border-radius: 48px;
  box-shadow: 0 35px 100px rgba(127, 0, 0, 0.14);
}

.hero > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1600ms ease;
}

.hero:hover > img {
  transform: scale(1.05);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.92) 0%, rgba(0, 0, 0, 0.56) 44%, transparent 100%),
    linear-gradient(0deg, #000 0%, transparent 48%);
}

.section-heading span,
.card-label {
  color: var(--red);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  width: fit-content;
  margin-bottom: 24px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  padding: 8px 14px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(14px);
}

.live-pill > span {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--red);
  box-shadow: 0 0 10px rgba(225, 6, 0, 0.9);
  animation: pulse 1.5s ease-in-out infinite;
}

.live-pill strong {
  color: white;
  font-size: 10px;
  font-weight: 950;
  letter-spacing: 0.28em;
  text-transform: uppercase;
}

.hero-copy {
  position: relative;
  z-index: 2;
  display: flex;
  min-height: 700px;
  max-width: 870px;
  flex-direction: column;
  justify-content: center;
  padding: 70px 64px;
}

.hero h1 {
  max-width: 820px;
  margin: 0 0 28px;
  font-family: Outfit, Inter, sans-serif;
  font-size: clamp(54px, 8vw, 118px);
  font-weight: 950;
  line-height: 0.88;
  letter-spacing: -0.065em;
  font-style: italic;
  text-transform: uppercase;
  text-shadow: 0 18px 55px rgba(0, 0, 0, 0.6);
}

.hero h1 span {
  display: block;
  color: var(--red);
  text-shadow: 0 0 16px rgba(225, 6, 0, 0.34);
}

.hero-copy > p:last-of-type {
  max-width: 600px;
  margin: 0;
  color: #d1d5db;
  font-size: 19px;
  line-height: 1.7;
  font-weight: 600;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 34px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  border: 1px solid transparent;
  border-radius: 18px;
  padding: 0 28px;
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.button.primary {
  background: var(--red);
  color: white;
  box-shadow: 0 18px 48px rgba(225, 6, 0, 0.34);
}

.button.secondary {
  border-color: var(--line);
  background: var(--panel);
}

.hero-panel,
.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.04));
  box-shadow: var(--shadow);
}

.hero-panel {
  position: absolute;
  right: 32px;
  bottom: 32px;
  z-index: 3;
  width: min(390px, calc(100% - 64px));
  padding: 16px;
  backdrop-filter: blur(20px);
}

.track-visual {
  position: relative;
  min-height: 300px;
  border-radius: 18px;
  background:
    linear-gradient(135deg, transparent 0 47%, rgba(255, 255, 255, 0.16) 47% 48%, transparent 48%),
    radial-gradient(ellipse at center, transparent 38%, rgba(255, 255, 255, 0.12) 39%, transparent 41%),
    linear-gradient(145deg, #18181d, #08080a);
  overflow: hidden;
}

.garage-banner {
  position: relative;
  min-height: 320px;
  margin: 26px 0 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 40px;
  background: #08080a;
  box-shadow: var(--shadow);
}

.garage-banner img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 900ms ease;
}

.garage-banner:hover img {
  transform: scale(1.06);
}

.garage-banner::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.88), rgba(0, 0, 0, 0.08));
}

.garage-banner figcaption {
  position: absolute;
  right: 32px;
  bottom: 28px;
  left: 32px;
  z-index: 2;
  display: grid;
  gap: 8px;
}

.garage-banner strong {
  font-family: Outfit, Inter, sans-serif;
  font-size: clamp(28px, 5vw, 58px);
  font-weight: 950;
  letter-spacing: -0.055em;
  text-transform: uppercase;
}

.garage-banner span {
  max-width: 520px;
  color: #d1d5db;
  font-size: 16px;
  font-style: italic;
}

.track-visual::before {
  content: "";
  position: absolute;
  inset: 34px;
  border: 18px solid rgba(255, 255, 255, 0.12);
  border-left-color: var(--red);
  border-radius: 46% 54% 48% 52%;
  transform: rotate(-14deg);
}

.car-dot {
  position: absolute;
  top: 72px;
  left: 52%;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: var(--red);
  box-shadow: 0 0 0 8px rgba(225, 6, 0, 0.2), 0 0 28px rgba(225, 6, 0, 0.8);
  animation: pulse 1.8s ease-in-out infinite;
}

.race-card {
  display: grid;
  gap: 8px;
  margin-top: 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.24);
}

.race-card strong {
  font-size: 24px;
  line-height: 1.05;
}

.race-card span:last-child,
.metric-row span,
.focus-stats span {
  color: var(--muted);
  font-size: 12px;
}

.metric-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 12px;
}

.metric-row div,
.focus-stats div {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.04);
}

.metric-row strong,
.focus-stats strong {
  display: block;
  margin-top: 8px;
  font-size: 22px;
}

.section {
  padding: 74px 0;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.section-heading h2 {
  margin: 4px 0 0;
  font-size: clamp(34px, 5vw, 62px);
  font-weight: 950;
  letter-spacing: -0.055em;
  font-family: Outfit, Inter, sans-serif;
  font-style: italic;
  text-transform: uppercase;
}

.grid {
  display: grid;
  gap: 20px;
}

.grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.race-grid {
  grid-template-columns: 1.25fr 0.75fr;
}

.panel {
  overflow: hidden;
  padding: 24px;
  backdrop-filter: blur(22px);
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}

.panel h3 {
  margin: 0;
  font-family: Outfit, Inter, sans-serif;
  font-size: 24px;
  font-weight: 950;
  letter-spacing: -0.045em;
  text-transform: uppercase;
}

.panel-head span {
  border: 1px solid rgba(61, 220, 151, 0.28);
  border-radius: 999px;
  padding: 6px 10px;
  background: rgba(61, 220, 151, 0.08);
  color: #b7ffdc;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.panel-head span.is-fallback {
  border-color: rgba(255, 209, 102, 0.28);
  background: rgba(255, 209, 102, 0.08);
  color: var(--yellow);
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  min-width: 520px;
  border-collapse: collapse;
}

th,
td {
  padding: 15px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  text-align: left;
}

.table-toggle {
  width: 100%;
  margin-top: 18px;
  border: 1px solid rgba(225, 6, 0, 0.28);
  border-radius: 18px;
  padding: 15px 18px;
  background: rgba(225, 6, 0, 0.12);
  color: white;
  cursor: pointer;
  font: inherit;
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  transition: border-color 180ms ease, background 180ms ease, transform 180ms ease;
}

.table-toggle:hover {
  border-color: rgba(225, 6, 0, 0.55);
  background: rgba(225, 6, 0, 0.18);
  transform: translateY(-1px);
}

.table-toggle[hidden] {
  display: none;
}

th {
  color: var(--dim);
  font-size: 10px;
  font-weight: 950;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

td {
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
}

td:last-child,
th:last-child {
  text-align: right;
}

.muted {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.calendar-list {
  display: grid;
  gap: 12px;
}

.calendar-item {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.045);
}

.round {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 18px;
  background: var(--red);
  color: white;
  font-size: 20px;
  font-weight: 950;
}

.calendar-item h3 {
  margin: 0;
  font-size: 20px;
}

.calendar-item p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.date-chip {
  white-space: nowrap;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 9px 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.focus-panel {
  min-height: 330px;
  background:
    radial-gradient(circle at 78% 22%, rgba(225, 6, 0, 0.24), transparent 18rem),
    linear-gradient(135deg, rgba(24, 24, 27, 0.98), rgba(0, 0, 0, 0.92));
}

.focus-panel h3 {
  max-width: 760px;
  margin-top: 14px;
  font-size: clamp(34px, 5vw, 70px);
  line-height: 0.95;
  color: white;
}

.focus-panel p {
  max-width: 760px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.65;
}

.focus-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 28px;
}

.result-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.result-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 15px;
  padding: 14px;
  background: rgba(0, 0, 0, 0.2);
  color: var(--muted);
  font-size: 14px;
}

.result-list strong {
  color: white;
}

.empty-state {
  border: 1px dashed var(--line);
  border-radius: 18px;
  padding: 28px;
  color: var(--muted);
  text-align: center;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  width: min(var(--max), calc(100% - 32px));
  margin: 30px auto 0;
  padding: 36px 0 46px;
  border-top: 1px solid var(--line);
  color: var(--dim);
  font-size: 12px;
}

@keyframes loadbar {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(240%);
  }
}

@keyframes pulse {
  50% {
    transform: scale(1.22);
  }
}

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

  .hero {
    min-height: auto;
    margin-top: 126px;
  }

  .hero-copy {
    min-height: 620px;
    padding: 52px 28px 230px;
  }

  .hero-panel {
    right: 20px;
    bottom: 20px;
    left: 20px;
    width: auto;
  }

  .site-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .nav {
    width: 100%;
    justify-content: space-between;
  }

  .calendar-item {
    grid-template-columns: 64px minmax(0, 1fr);
  }

  .date-chip {
    grid-column: 2;
    width: fit-content;
  }

  .focus-stats {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  main,
  .site-header,
  .site-footer {
    width: min(100% - 22px, var(--max));
  }

  .nav a {
    padding-inline: 9px;
    font-size: 11px;
  }

  .hero h1 {
    font-size: 46px;
  }

  .hero-copy > p:last-of-type {
    font-size: 16px;
  }

  .hero-actions,
  .metric-row,
  .site-footer {
    display: grid;
    grid-template-columns: 1fr;
  }

  .button {
    width: 100%;
  }
}
