div.mainbkg,
div.riotracing {
  position: absolute;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
}

div.mainbkg:nth-of-type(1) {
  background: url(../images/bajacar.png) no-repeat center center fixed;
  background-size: cover;
  z-index: 0;
}

div.mainbkg:nth-of-type(3) {
  background: url(../images/bajacartop.png) no-repeat center center fixed;
  background-size: cover;
  z-index: 5;
}

div.riotracing {
  top: calc(var(--header-height) + 10px);
  left: 50%;
  width: min(90vw, 1178px);
  height: auto;
  aspect-ratio: 1178 / 292;
  transform: translateX(-50%);
  background: url(../images/riotracing.png) no-repeat center center;
  background-size: contain;
  z-index: 1;
}

.site-header.is-home {
  margin-bottom: calc(-1 * var(--header-height));
}

.site-header.is-home + main .hero {
  min-height: min(820px, 100svh);
}

.hero {
  position: relative;
  display: flex;
  min-height: min(820px, calc(100svh - var(--header-height)));
  align-items: center;
  overflow: hidden;
  padding: 7rem clamp(1.5rem, 10vw, 10rem);
  background-position: center 54%;
  background-size: cover;
  color: #fff;
}

.hero > .button-primary {
  position: absolute;
  bottom: 2rem;
  border-radius: 10px;
  left: 50%;
  z-index: 6;
  flex-direction: column;
  gap: 0.45rem;
  opacity: 0.75;
  transform: translateX(-50%);
  animation: hero-bob 3s ease-in-out infinite;
}

.hero > .button-primary:hover,
.hero > .button-primary:focus-visible {
  opacity: 1;
}

.hero-chevron {
  width: 0.6rem;
  height: 0.6rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
}

@keyframes hero-bob {
  0%,
  100% {
    transform: translate(-50%, 0);
    opacity: .6;
  }

  50% {
    transform: translate(-50%, -5px);
    opacity: .9;
  }
}

.hero-caption {
  position: absolute;
  right: clamp(1rem, 3vw, 2.5rem);
  bottom: 1rem;
  z-index: 6;
  margin: 0;
  color: rgba(255, 255, 255, 0.85);
  font-size: 1rem;
  text-align: right;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background-position: center;
  background-size: cover;
  background:
    linear-gradient(90deg, rgba(10, 15, 23, 0.9), rgba(10, 15, 23, 0.4) 60%, rgba(10, 15, 23, 0.1)),
    linear-gradient(0deg, rgba(10, 15, 23, 0.28), transparent 55%);
}

.hero-content {
  position: static;
  width: min(760px, 100%);
  padding-bottom: 1rem;
}

.hero h1 {
  max-width: 780px;
  font-size: clamp(4.5rem, 10vw, 9.5rem);
  letter-spacing: 0.015em;
  line-height: 0.86;
  text-transform: uppercase;
}

.hero-content > p:not(.eyebrow) {
  max-width: 480px;
  margin: 1.5rem 0 2rem;
  color: rgba(255, 255, 255, 0.84);
  font-size: clamp(1rem, 1.7vw, 1.2rem);
}

.hero-scroll {
  position: absolute;
  right: clamp(1.5rem, 5vw, 5rem);
  bottom: 2rem;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-decoration: none;
  text-transform: uppercase;
}

.about-layout {
  display: grid;
  align-items: center;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.9fr);
  gap: clamp(2rem, 6vw, 6rem);
}

.about-image {
  width: 100%;
  max-height: 570px;
  border-radius: 5px;
  background: var(--surface-raised);
  object-fit: cover;
}

.about-copy {
  max-width: 650px;
  color: var(--muted);
  font-size: 1.02rem;
}

.about-copy p {
  margin-bottom: 1.25rem;
}

.team-callout {
  position: relative;
  display: flex;
  min-height: 710px;
  align-items: flex-start;
  overflow: hidden;
  padding: 4rem clamp(1.5rem, 10vw, 10rem);
  background-color: #111827;
  background-position: center 48%;
  background-size: cover;
  color: #fff;
}

.team-callout > div {
  max-width: 650px;
}

.team-callout h2 {
  margin-bottom: 1rem;
  font-size: clamp(3rem, 6vw, 5rem);
  text-transform: uppercase;
}

.team-callout p:not(.eyebrow) {
  max-width: 520px;
  margin-bottom: 1.5rem;
  color: rgba(255, 255, 255, 0.8);
}

.donation-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  margin-top: 4rem;
  padding: clamp(1.5rem, 4vw, 3rem);
  border-radius: 5px;
  background: var(--surface-raised);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.2);
}

.donation-card h3 {
  margin-bottom: 0.5rem;
  font-size: 2rem;
}

.donation-card p:not(.eyebrow) {
  max-width: 550px;
  margin-bottom: 0;
  color: var(--muted);
}

.donation-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.7rem;
}

.section-results {
  background: var(--page);
}

.results-content {
  display: grid;
  grid-template-columns: minmax(240px, 0.75fr) minmax(0, 1.25fr);
  gap: 2rem;
}

.results-car {
  align-self: start;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface);
}

.results-car > img {
  width: 100%;
  height: 265px;
  object-fit: cover;
}

.results-car > div {
  padding: 1.1rem 1.2rem 0.5rem;
}

.results-car h3 {
  font-size: 2rem;
}

.results-car .eyebrow {
  margin-bottom: 0.3rem;
}

.award {
  margin: 0;
  padding: 0.6rem 1.2rem 1.1rem;
  color: var(--orange-dark);
  font-size: 0.86rem;
  font-weight: 700;
}

.race-list {
  display: grid;
  align-content: start;
  gap: 0.7rem;
}

.race-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface-raised);
}

.race-card summary {
  display: flex;
  min-height: 58px;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.8rem 1rem;
  font-weight: 800;
  list-style: none;
  cursor: pointer;
}

.race-card summary::-webkit-details-marker {
  display: none;
}

.race-card summary::after {
  content: "+";
  color: var(--orange);
  font-size: 1.35rem;
}

.race-card[open] summary::after {
  content: "−";
}

.race-overall {
  margin-left: auto;
  color: var(--orange-dark);
  font-size: 0.82rem;
  white-space: nowrap;
}

.race-card dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.15rem 1rem;
  margin: 0;
  padding: 0.6rem 1rem 1rem;
  border-top: 1px solid var(--line);
}

.race-card dl > div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.45rem 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.86rem;
}

.race-card dt {
  color: var(--muted);
}

.race-card dd {
  margin: 0;
  font-weight: 800;
}

.section-gallery {
  background: var(--surface);
}

.season-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.9rem;
}

.season-card {
  position: relative;
  display: flex;
  min-height: clamp(150px, 20vw, 245px);
  align-items: flex-end;
  justify-content: space-between;
  overflow: hidden;
  padding: 1.2rem;
  border-radius: 4px;
  background-position: center;
  background-size: cover;
  color: #fff;
  text-decoration: none;
  transition: transform 160ms ease;
}

.season-card:hover {
  transform: translateY(-3px);
}

.season-card > span:first-child {
  font-family: Bebas-neue, Impact, sans-serif;
  font-size: 2rem;
  font-weight: 700;
}

.season-arrow {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: 50%;
}

.section-gallery > .text-link {
  margin-top: 1.5rem;
}
