:root {
  --rosso: #c8102e;
  --rosso-deep: #8f0d22;
  --ink: #0b0b0c;
  --ink-2: #121214;
  --panel: #171719;
  --line: rgba(244, 239, 232, 0.1);
  --line-strong: rgba(244, 239, 232, 0.18);
  --paper: #f4efe8;
  --paper-dim: rgba(244, 239, 232, 0.72);
  --muted: #9b958c;
  --gold: #c4a574;
  --shadow: 0 30px 60px rgba(0, 0, 0, 0.45);
  --font-serif: "Cormorant Garamond", "Times New Roman", serif;
  --font-sans: "Source Sans 3", "Segoe UI", sans-serif;
  --header-h: 4.25rem;
  --wrap: 1120px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-sans);
  font-size: 1.05rem;
  line-height: 1.6;
  min-height: 100vh;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--paper); text-underline-offset: 0.18em; }
a:hover { color: #fff; }
:focus-visible {
  outline: 2px solid var(--rosso);
  outline-offset: 3px;
}

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  background: var(--rosso);
  color: #fff;
  padding: 0.5rem 0.8rem;
  z-index: 100;
}
.skip:focus { top: 0.75rem; }

.wrap {
  width: min(var(--wrap), calc(100% - 2.5rem));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--header-h);
  background: rgba(11, 11, 12, 0.72);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}
.site-header::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: var(--rosso);
}
.header-inner {
  height: 100%;
  width: min(var(--wrap), calc(100% - 2.5rem));
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.wordmark {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 1.55rem;
  letter-spacing: 0.16em;
  text-transform: lowercase;
  text-decoration: none;
  color: var(--paper);
}
.site-header nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.7rem 1.15rem;
}
.site-header nav a {
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.site-header nav a:hover { color: var(--paper); }
.site-header nav a.nav-contest { color: var(--gold); }
.site-header nav a.nav-contest:hover { color: #e8d5b5; }

.hero {
  position: relative;
  min-height: calc(100svh - var(--header-h));
  display: grid;
  align-items: end;
  overflow: hidden;
  background: #000;
}
.hero-media {
  position: absolute;
  inset: 0;
}
.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transform: scale(1.04);
  animation: heroIn 1.4s ease-out both;
}
.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(11,11,12,0.15) 0%, rgba(11,11,12,0.15) 40%, rgba(11,11,12,0.88) 100%),
    linear-gradient(90deg, rgba(11,11,12,0.45) 0%, rgba(11,11,12,0.05) 50%, rgba(11,11,12,0.2) 100%);
}
.hero-copy {
  position: relative;
  z-index: 1;
  width: min(var(--wrap), calc(100% - 2.5rem));
  margin: 0 auto 5.5rem;
  margin-left: max(1.25rem, calc((100% - var(--wrap)) / 2));
}
#hero-name, .hero-sub { max-width: 14em; }
.eyebrow {
  margin: 0 0 0.65rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
}
h1, h2, h3 {
  font-family: var(--font-serif);
  font-weight: 600;
  line-height: 0.95;
  letter-spacing: -0.02em;
  margin: 0;
}
#hero-name {
  font-size: clamp(3rem, 8vw, 6.4rem);
  font-weight: 600;
}
.hero-sub {
  margin: 1rem 0 0;
  color: var(--paper-dim);
  font-size: 1.05rem;
  max-width: 28rem;
}
.hero-credit {
  position: absolute;
  right: 1.25rem;
  bottom: 1rem;
  z-index: 1;
  margin: 0;
  max-width: min(36rem, 70vw);
  text-align: right;
  font-size: 0.72rem;
  line-height: 1.4;
  color: rgba(244, 239, 232, 0.72);
}
.hero-credit a { color: inherit; }

.fact-panel {
  margin: -3.25rem auto 0;
  position: relative;
  z-index: 2;
  background: var(--panel);
  border: 1px solid var(--line-strong);
  padding: clamp(1.5rem, 3vw, 2.4rem) clamp(1.25rem, 3vw, 2.5rem);
  box-shadow: var(--shadow);
}
.fact-kicker {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--rosso);
  margin-bottom: 0.4rem;
}
.fact-panel h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: 0.9rem;
}
.fact-body {
  margin: 0;
  max-width: 46rem;
  color: var(--paper-dim);
  font-size: 1.12rem;
}

.section {
  padding: 4.5rem 0 0;
}
.section-head { margin-bottom: 1.6rem; }
.section-head h2 {
  font-size: clamp(2.4rem, 5vw, 4rem);
}
.section-note {
  margin: 0.65rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.race-grid,
.standings-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 1.25rem;
}

.contest-card {
  display: block;
  text-decoration: none;
  color: inherit;
  margin-bottom: 1.25rem;
  background:
    linear-gradient(135deg, rgba(200, 16, 46, 0.14), rgba(23, 23, 25, 0.2) 45%),
    var(--ink-2);
  border-color: var(--line-strong);
}
.contest-card:hover {
  border-color: rgba(196, 165, 116, 0.45);
}
.contest-card h3 { margin-bottom: 0.35rem; }
.contest-card .card-meta {
  max-width: 42rem;
  color: var(--paper-dim);
}
.contest-cta {
  margin: 1rem 0 0;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
}

.card {
  background: var(--ink-2);
  border: 1px solid var(--line);
  padding: 1.4rem 1.4rem 1.5rem;
  min-height: 100%;
}
.card-label {
  margin: 0 0 0.7rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
}
.card h3 {
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  line-height: 1.05;
}
.card-meta, .winner-line {
  margin: 0.55rem 0 0;
  color: var(--muted);
}
.winner-line { color: var(--paper-dim); }
.countdown {
  margin: 1.1rem 0 0;
  font-family: var(--font-serif);
  font-size: 2rem;
  color: var(--paper);
}

.driver-results {
  display: grid;
  gap: 0.75rem;
  margin-top: 1.25rem;
}
.driver-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.9rem;
  align-items: center;
  padding: 0.85rem 0.95rem;
  background: rgba(200, 16, 46, 0.08);
  border-left: 3px solid var(--rosso);
}
.pos {
  font-family: var(--font-serif);
  font-size: 2rem;
  line-height: 1;
  min-width: 2.2rem;
}
.driver-row strong { display: block; font-weight: 650; }
.driver-row span { color: var(--muted); font-size: 0.9rem; }
.pts {
  font-variant-numeric: tabular-nums;
  font-weight: 650;
  text-align: right;
}

.table-wrap { overflow-x: auto; }
table {
  width: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}
th, td {
  text-align: left;
  padding: 0.65rem 0.4rem;
  border-bottom: 1px solid var(--line);
  font-size: 0.98rem;
}
th {
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 650;
}
td:first-child, th:first-child { width: 3rem; }
tr.is-ferrari {
  background: rgba(200, 16, 46, 0.1);
}
tr.is-ferrari td { font-weight: 650; }

.news-list {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--line);
}
.news-item {
  display: grid;
  grid-template-columns: 8.5rem 1fr;
  gap: 1.25rem;
  padding: 1.15rem 0;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  color: inherit;
}
.news-item:hover h3 { color: #fff; }
.news-item h3 {
  font-size: 1.45rem;
  line-height: 1.2;
  font-weight: 600;
}
.news-meta {
  margin: 0;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.site-footer {
  margin-top: 5rem;
  padding: 3rem 0 3.5rem;
  border-top: 1px solid var(--line);
  background: #080809;
}
.footer-brand {
  font-family: var(--font-serif);
  letter-spacing: 0.16em;
  font-size: 1.4rem;
  margin: 0 0 1rem;
}
.disclaimer, .footer-meta {
  margin: 0 0 0.9rem;
  color: var(--muted);
  font-size: 0.92rem;
  max-width: 52rem;
}
.disclaimer a { color: var(--paper-dim); }

.status-error, .status-empty {
  color: var(--muted);
  margin: 0.5rem 0 0;
}

@media (max-width: 800px) {
  .site-header nav { gap: 0.55rem 0.85rem; }
  .site-header nav a { font-size: 0.72rem; letter-spacing: 0.08em; }
  .race-grid, .standings-grid { grid-template-columns: 1fr; }
  .news-item { grid-template-columns: 1fr; gap: 0.3rem; }
  .hero-copy { margin-bottom: 6.5rem; }
  .hero-credit { text-align: left; left: 1.25rem; right: 1.25rem; max-width: none; }
  #hero-name { font-size: clamp(2.6rem, 12vw, 4.2rem); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-media img { animation: none; transform: none; }
}

@keyframes heroIn {
  from { transform: scale(1.1); opacity: 0.6; }
  to { transform: scale(1.04); opacity: 1; }
}

.schumacher-section { padding-top: 3.25rem; }
.schumacher-card {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.2fr);
  gap: 0;
  padding: 0;
  overflow: hidden;
}
.schumacher-visual { min-height: 16rem; background: #000; }
.schumacher-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
}
.schumacher-copy { padding: 1.4rem 1.45rem 1.55rem; }
.schumacher-stat {
  margin: 0;
  font-family: var(--font-serif);
  font-size: clamp(2.6rem, 6vw, 4.2rem);
  line-height: 0.9;
  color: var(--paper);
}
.schumacher-stat-label {
  margin: 0.4rem 0 1rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--rosso);
}
.schumacher-copy h3 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  margin-bottom: 0.7rem;
}
.schumacher-news-wrap {
  margin-bottom: 1.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--line);
}
.news-item.is-schumacher h3::before {
  content: "Schumacher";
  display: inline-block;
  margin-right: 0.55rem;
  padding: 0.12rem 0.4rem;
  border: 1px solid var(--gold);
  color: var(--gold);
  font-family: var(--font-sans);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  vertical-align: 0.2em;
}
@media (max-width: 800px) {
  .schumacher-card { grid-template-columns: 1fr; }
  .schumacher-visual { min-height: 12.5rem; }
}
