:root {
  --black: #05080b;
  --navy: #07121c;
  --panel: #09141f;
  --panel-2: #0c1925;
  --white: #f7f8fa;
  --muted: #aeb8c2;
  --line: #344657;
  --red: #ff1734;
  --red-dark: #d90e27;
  --max: 1180px;
  --radius: 8px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--black);
  color: var(--white);
  font-family: Inter, system-ui, sans-serif;
  line-height: 1.5;
}
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
.container { width: min(calc(100% - 48px), var(--max)); margin-inline: auto; }

.skip-link {
  position: fixed; left: 12px; top: -100px; z-index: 100;
  padding: 10px 14px; background: var(--red); color: #fff;
}
.skip-link:focus { top: 12px; }

.site-header {
  position: relative; z-index: 20;
  background: rgba(4, 9, 13, .97);
  border-bottom: 1px solid #1d2a34;
}
.header-inner {
  min-height: 76px; display: flex; align-items: center; gap: 40px;
}
.brand { display: block; width: 190px; height: 64px; overflow: hidden; }
.brand img {
  width: 100%; height: 100%; object-fit: contain;
  /* The supplied logo has a white background. Screen it into the dark header. */
  mix-blend-mode: screen;
}
.desktop-nav { display: flex; gap: 42px; margin-left: auto; }
.desktop-nav a, .header-search {
  font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em;
}
.desktop-nav a:hover, .header-search:hover { color: var(--red); }
.header-actions { display: flex; align-items: center; gap: 26px; }
.header-search { display: flex; gap: 11px; align-items: center; }
.search-icon {
  display: inline-block; width: 17px; height: 17px;
  border: 2px solid currentColor; border-radius: 50%; position: relative;
}
.search-icon::after {
  content: ""; position: absolute; width: 7px; height: 2px;
  background: currentColor; right: -5px; bottom: -2px; transform: rotate(45deg);
}
.menu-toggle {
  display: none; border: 0; background: transparent; padding: 10px; cursor: pointer;
}
.menu-toggle span { display: block; width: 27px; height: 2px; margin: 5px 0; background: #fff; }

.mobile-menu { display: none; }

.hero {
  min-height: 570px; position: relative; overflow: hidden;
  display: flex; align-items: center;
}
.hero-image {
  position: absolute; inset: 0;
  background:
    url("assets/hero-racing.jpg")
    center 58% / cover no-repeat;
  transform: scale(1.02);
}
.hero-overlay {
  position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(3,7,10,.96) 0%, rgba(3,7,10,.83) 39%, rgba(3,7,10,.16) 76%),
    linear-gradient(0deg, rgba(3,7,10,.78), transparent 35%);
}
.hero-content { position: relative; z-index: 1; padding-block: 90px; }
.eyebrow {
  margin: 0 0 6px; font-size: 12px; font-weight: 800;
  letter-spacing: .16em; color: #d4dbe1;
}
.hero h1 {
  max-width: 700px; margin: 4px 0 18px;
  font: 900 clamp(54px, 7vw, 94px)/.88 "Barlow Condensed", sans-serif;
  letter-spacing: -.02em; font-style: italic;
}
.hero h1 em { color: var(--red); font-style: italic; }
.hero-copy { max-width: 480px; color: #e2e7eb; font-size: 18px; margin: 0 0 28px; }
.hero-buttons { display: flex; gap: 14px; flex-wrap: wrap; }

.btn {
  min-height: 50px; display: inline-flex; align-items: center; justify-content: center;
  gap: 18px; padding: 0 28px; border-radius: 5px;
  font-weight: 800; text-transform: uppercase; letter-spacing: .04em;
  transition: transform .18s ease, background .18s ease, border-color .18s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--red); color: #fff; }
.btn-primary:hover { background: #ff2944; }
.btn-outline { border: 1px solid #d7dfe5; background: rgba(0,0,0,.22); }
.btn-outline:hover { border-color: var(--red); color: var(--red); }

.search-wrap { position: relative; z-index: 3; margin-top: -48px; }
.search-panel {
  background: linear-gradient(145deg, rgba(7,18,28,.98), rgba(4,10,16,.98));
  border: 1px solid #405263; border-radius: var(--radius); padding: 26px;
  box-shadow: 0 22px 55px rgba(0,0,0,.4);
}
.section-title { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; }
.slash { width: 13px; height: 31px; background: var(--red); transform: skew(-20deg); }
.section-title .eyebrow { margin: 0; }
.section-title h2 {
  margin: 0; font: 800 29px/1 "Barlow Condensed", sans-serif; font-style: italic;
}
.search-grid {
  display: grid; grid-template-columns: 1.2fr 1.2fr 1fr 1fr auto; gap: 12px; align-items: end;
}
.search-grid label { min-width: 0; }
.search-grid label > span {
  display: block; margin: 0 0 7px; font-size: 11px; font-weight: 800;
  text-transform: uppercase; letter-spacing: .12em; color: #d1d8df;
}
.search-grid input, .search-grid select {
  width: 100%; height: 48px; border: 1px solid #526577; border-radius: 5px;
  background: #08121c; color: #eaf0f4; padding: 0 14px; outline: none;
}
.search-grid input::placeholder { color: #7f8d99; }
.search-grid input:focus, .search-grid select:focus {
  border-color: var(--red); box-shadow: 0 0 0 2px rgba(255,23,52,.16);
}
.search-button { height: 48px; min-width: 120px; padding-inline: 20px; border: 0; cursor: pointer; }

.stats {
  display: grid; grid-template-columns: repeat(4, 1fr);
  margin-top: 42px; margin-bottom: 44px;
}
.stat {
  text-align: center; padding: 8px 24px; border-right: 1px solid #31404d;
}
.stat:last-child { border-right: 0; }
.stat strong {
  display: block; font: 900 47px/.95 "Barlow Condensed", sans-serif; margin-bottom: 6px;
}
.stat span {
  display: block; color: #fff; font-size: 13px; font-weight: 800;
  text-transform: uppercase; letter-spacing: .08em;
}
.stat small { display: block; margin-top: 7px; color: var(--muted); font-size: 12px; }

.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; padding-bottom: 54px; }
.feature-card {
  position: relative; min-height: 300px; overflow: hidden;
  border: 1px solid #405263; border-radius: 5px;
  background-color: var(--panel);
  background-position: center; background-size: cover;
  isolation: isolate;
  transition: transform .2s ease, border-color .2s ease;
}
.feature-card::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(90deg, rgba(4,10,15,.97) 0%, rgba(4,10,15,.75) 52%, rgba(4,10,15,.08) 100%);
}
.feature-card::after {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--red);
}
.feature-card:hover { transform: translateY(-4px); border-color: var(--red); }
.feature-results { background-image: url("assets/race-results.jpg"); }
.feature-riders { background-image: url("assets/rider-profile.jpg"); }
.feature-championships { background-image: url("assets/championship-history.jpg"); }
.feature-content { position: relative; z-index: 1; padding: 34px 28px; max-width: 75%; }
.feature-icon { display: block; color: var(--red); font-size: 34px; line-height: 1; margin-bottom: 18px; }
.feature-card h2 { margin: 0 0 9px; font: 800 29px/1 "Barlow Condensed", sans-serif; font-style: italic; }
.feature-card p { margin: 0 0 23px; color: #dce3e8; font-size: 14px; }
.learn { font-size: 11px; text-transform: uppercase; font-weight: 800; letter-spacing: .1em; }
.learn b { color: var(--red); font-size: 19px; margin-left: 8px; }
.card-arrow { position: absolute; right: 18px; bottom: 18px; font-size: 32px; }

.history-banner {
  background:
    linear-gradient(rgba(4,9,13,.7), rgba(4,9,13,.7)),
    url("assets/history-racing.jpg")
    center / cover;
  border-top: 1px solid #1f2c37; border-bottom: 1px solid #1f2c37;
}
.history-inner {
  min-height: 145px; display: flex; align-items: center; justify-content: center;
  gap: 26px; text-align: center;
}
.history-inner .line { width: 90px; height: 2px; background: var(--red); }
.history-inner h2 { margin: 0; font: 800 30px/1 "Barlow Condensed", sans-serif; font-style: italic; }
.history-inner p { margin: 8px 0 0; font-size: 11px; letter-spacing: .35em; }

.site-footer { background: #030608; }
.footer-inner {
  min-height: 130px; display: flex; align-items: center; gap: 22px;
}
.footer-inner img { width: 100px; height: 70px; object-fit: contain; mix-blend-mode: screen; }
.footer-inner p { color: var(--muted); font-size: 12px; }
.footer-links { margin-left: auto; display: flex; gap: 20px; font-size: 12px; font-weight: 700; }
.footer-links a:hover { color: var(--red); }

@media (max-width: 900px) {
  .desktop-nav { display: none; }
  .menu-toggle { display: block; }
  .header-search span:last-child { display: none; }
  .mobile-menu {
    display: grid; grid-template-rows: 0fr; overflow: hidden;
    transition: grid-template-rows .2s ease; background: #050b10;
  }
  .mobile-menu.is-open { grid-template-rows: 1fr; }
  .mobile-menu a { min-height: 48px; padding: 14px 24px; border-top: 1px solid #17232d; text-transform: uppercase; font-size: 12px; font-weight: 800; }
  .search-grid { grid-template-columns: repeat(2, 1fr); }
  .search-button { width: 100%; }
  .features { grid-template-columns: 1fr; }
  .feature-card { min-height: 250px; }
}

@media (max-width: 620px) {
  .container { width: min(calc(100% - 28px), var(--max)); }
  .header-inner { min-height: 66px; gap: 12px; }
  .brand { width: 150px; height: 55px; }
  .header-actions { margin-left: auto; gap: 9px; }
  .hero { min-height: 590px; align-items: flex-end; }
  .hero-image { background-position: 63% center; }
  .hero-overlay {
    background:
      linear-gradient(180deg, rgba(3,7,10,.08) 0%, rgba(3,7,10,.28) 30%, rgba(3,7,10,.96) 74%),
      linear-gradient(90deg, rgba(3,7,10,.86), rgba(3,7,10,.12));
  }
  .hero-content { padding: 40px 0 60px; }
  .eyebrow { font-size: 10px; }
  .hero h1 { font-size: clamp(50px, 15vw, 72px); }
  .hero-copy { font-size: 15px; max-width: 370px; }
  .hero-buttons { display: grid; grid-template-columns: 1fr; }
  .btn { width: 100%; }
  .search-wrap { margin-top: -30px; }
  .search-panel { padding: 20px 16px; }
  .search-grid { grid-template-columns: 1fr; }
  .section-title h2 { font-size: 26px; }
  .stats { grid-template-columns: repeat(2, 1fr); margin-top: 30px; }
  .stat { padding: 17px 8px; border-right: 1px solid #31404d; border-bottom: 1px solid #31404d; }
  .stat:nth-child(2n) { border-right: 0; }
  .stat:nth-last-child(-n+2) { border-bottom: 0; }
  .stat strong { font-size: 39px; }
  .stat span { font-size: 11px; }
  .stat small { font-size: 10px; }
  .feature-content { max-width: 86%; padding: 28px 22px; }
  .feature-card h2 { font-size: 26px; }
  .history-inner { min-height: 125px; gap: 12px; }
  .history-inner .line { width: 35px; }
  .history-inner h2 { font-size: 23px; }
  .history-inner p { font-size: 9px; letter-spacing: .22em; }
  .footer-inner { flex-wrap: wrap; padding-block: 24px; }
  .footer-links { width: 100%; margin-left: 0; flex-wrap: wrap; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
