:root {
  --bg: #090909;
  --bg-soft: #121212;
  --panel: rgba(17, 17, 17, 0.88);
  --panel-strong: rgba(24, 24, 24, 0.95);
  --line: rgba(255, 255, 255, 0.12);
  --line-strong: rgba(255, 255, 255, 0.22);
  --text: #f7f1e8;
  --muted: #cfbfab;
  --accent: #ff5a1f;
  --accent-2: #ffc247;
  --shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --container: 1220px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  font-family: "Manrope", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top, rgba(255, 90, 31, 0.24), transparent 25%),
    radial-gradient(circle at 80% 10%, rgba(255, 194, 71, 0.16), transparent 18%),
    linear-gradient(180deg, #0f0c0b 0%, #090909 35%, #14110f 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.85), transparent);
}

.page-shell {
  width: min(calc(100% - 32px), var(--container));
  margin: 0 auto;
  padding-bottom: 64px;
}

.topbar {
  position: sticky;
  top: 14px;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin: 18px 0 26px;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(8, 8, 8, 0.72);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #111;
  font-family: "Bebas Neue", sans-serif;
  font-size: 2rem;
  letter-spacing: 0.08em;
}

.brand-copy {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.brand-copy strong,
.topnav a,
.eyebrow,
.panel-label,
.track-pill {
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.brand-copy strong {
  font-size: 0.96rem;
}

.brand-copy span {
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.76rem;
}

.topnav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 16px;
}

.topnav a {
  color: var(--muted);
  font-size: 0.78rem;
  text-decoration: none;
}

.topnav a:hover,
.topnav a:focus-visible {
  color: var(--text);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: 28px;
  align-items: center;
  min-height: calc(100vh - 140px);
  padding: 20px 0 40px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--accent-2);
  font-size: 0.76rem;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 0.94;
}

h1,
h2 {
  font-family: "Bebas Neue", sans-serif;
  letter-spacing: 0.03em;
}

h1 {
  max-width: 10ch;
  font-size: clamp(4rem, 13vw, 8.5rem);
}

h1 span {
  color: var(--accent);
}

.hero-text,
.support-card p,
.sponsor-copy p,
.achievement-meta,
.event-meta,
.loading {
  color: var(--muted);
  line-height: 1.65;
}

.hero-text {
  max-width: 58ch;
  margin: 24px 0 0;
  font-size: 1.04rem;
}

.hero-panels,
.hero-stats,
.achievement-layout,
.calendar-layout {
  display: grid;
  gap: 18px;
}

.hero-panels {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 28px;
}

.panel,
.section-card {
  position: relative;
  overflow: hidden;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(20, 20, 20, 0.92), rgba(12, 12, 12, 0.96));
  box-shadow: var(--shadow);
}

.panel::before,
.section-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 90, 31, 0.12), transparent 35%);
  pointer-events: none;
}

.panel-label {
  display: inline-block;
  margin-bottom: 16px;
  color: var(--accent-2);
  font-size: 0.7rem;
}

.quote-panel blockquote {
  margin: 0;
  max-width: 28ch;
  font-size: 1.45rem;
  font-weight: 800;
  line-height: 1.2;
}

#next-race {
  display: grid;
  gap: 6px;
}

#next-race strong {
  font-size: 1.3rem;
}

#next-race span {
  color: var(--muted);
}

.hero-stats {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 18px;
}

.hero-stats article {
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.03);
}

.stat-value {
  display: block;
  font-family: "Bebas Neue", sans-serif;
  font-size: clamp(2.3rem, 5vw, 3.6rem);
  line-height: 0.95;
  color: var(--accent-2);
}

.stat-label {
  color: var(--muted);
  font-size: 0.88rem;
}

.hero-visual {
  position: relative;
  min-height: 680px;
}

.number-stack {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-end;
  font-family: "Bebas Neue", sans-serif;
  font-size: clamp(6rem, 15vw, 11rem);
  color: rgba(255, 255, 255, 0.08);
  line-height: 0.75;
  letter-spacing: 0.06em;
}

.hero-card {
  position: absolute;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
}

.hero-card img,
.gallery-card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-card-main {
  inset: 36px 120px 120px 0;
  transform: rotate(-4deg);
}

.hero-card-action {
  right: 0;
  bottom: 18px;
  width: min(62%, 360px);
  aspect-ratio: 0.92;
  transform: rotate(6deg);
}

.story-ribbon {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 16px 0 44px;
  padding: 20px 24px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.8rem;
}

.story-ribbon p:nth-child(2) {
  text-align: center;
  color: var(--accent-2);
}

.story-ribbon p:last-child {
  text-align: right;
}

.section-grid {
  margin-top: 72px;
}

.section-heading {
  display: grid;
  gap: 12px;
  margin-bottom: 22px;
}

.section-heading h2 {
  max-width: 10ch;
  font-size: clamp(2.8rem, 8vw, 5rem);
}

.achievement-layout {
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
}

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

.card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
}

.card-head h3 {
  font-size: clamp(1.5rem, 4vw, 2rem);
}

.track-pill {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 194, 71, 0.1);
  color: var(--accent-2);
  font-size: 0.64rem;
}

.achievement-list,
.event-list {
  display: grid;
  gap: 14px;
}

.achievement-item,
.event-item {
  display: grid;
  gap: 8px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.025);
}

.achievement-top,
.event-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
}

.achievement-badge,
.event-tag {
  flex: none;
  padding: 8px 10px;
  border-radius: 14px;
  font-weight: 800;
  font-size: 0.84rem;
}

.achievement-badge.gold {
  background: rgba(255, 194, 71, 0.14);
  color: #ffd98d;
}

.achievement-badge.silver {
  background: rgba(209, 220, 230, 0.12);
  color: #e9f1f7;
}

.achievement-title,
.event-title {
  font-weight: 800;
  font-size: 1.05rem;
}

.support-card {
  display: grid;
  align-content: start;
  gap: 16px;
}

.support-points {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.8;
}

.calendar-card.subdued {
  opacity: 0.96;
}

.event-item.upcoming {
  border-color: rgba(255, 194, 71, 0.24);
}

.event-item.past {
  border-color: rgba(255, 255, 255, 0.08);
}

.event-tag {
  background: rgba(255, 90, 31, 0.12);
  color: #ffb08c;
}

.event-item.upcoming .event-tag {
  background: rgba(255, 194, 71, 0.14);
  color: var(--accent-2);
}

.sponsor-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 320px);
  gap: 24px;
  align-items: center;
}

.sponsor-copy h3 {
  margin: 0 0 14px;
  font-size: clamp(2rem, 5vw, 3rem);
}

.sponsor-logos {
  display: grid;
  place-items: center;
  min-height: 220px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.06), transparent),
    rgba(0, 0, 0, 0.24);
}

.sponsor-logos img {
  max-width: 100%;
  max-height: 120px;
  object-fit: contain;
}

.gallery-strip {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 16px;
}

.gallery-card {
  grid-column: span 3;
  min-height: 260px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 26px;
  box-shadow: var(--shadow);
}

.gallery-card.tall {
  grid-column: span 4;
  min-height: 460px;
}

.gallery-card.wide {
  grid-column: span 5;
}

.gallery-card img {
  transition: transform 400ms ease;
}

.gallery-card:hover img {
  transform: scale(1.04);
}

.reveal {
  opacity: 0;
  transform: translateY(22px);
  animation: reveal 700ms ease forwards;
}

@keyframes reveal {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1024px) {
  .hero,
  .achievement-layout,
  .calendar-layout,
  .sponsor-card {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .hero-visual {
    min-height: 540px;
  }

  .gallery-card,
  .gallery-card.tall,
  .gallery-card.wide {
    grid-column: span 6;
  }
}

@media (max-width: 760px) {
  .page-shell {
    width: min(calc(100% - 20px), var(--container));
  }

  .topbar {
    position: static;
    flex-direction: column;
    align-items: flex-start;
    border-radius: 26px;
  }

  .topnav {
    justify-content: flex-start;
  }

  .hero {
    padding-top: 8px;
  }

  .hero-panels,
  .hero-stats,
  .story-ribbon {
    grid-template-columns: 1fr;
  }

  .story-ribbon p,
  .story-ribbon p:last-child,
  .story-ribbon p:nth-child(2) {
    text-align: left;
  }

  .hero-visual {
    min-height: 400px;
  }

  .hero-card-main {
    inset: 20px 48px 88px 0;
  }

  .hero-card-action {
    width: 58%;
  }

  .card-head,
  .achievement-top,
  .event-top {
    flex-direction: column;
    align-items: flex-start;
  }

  .gallery-strip {
    grid-template-columns: 1fr;
  }

  .gallery-card,
  .gallery-card.tall,
  .gallery-card.wide {
    grid-column: auto;
    min-height: 240px;
  }
}
