﻿:root {
  --carbon: #060708;
  --carbon-2: #0d0f12;
  --carbon-3: #15191e;
  --line: rgba(255, 255, 255, 0.12);
  --text: #f5f5f5;
  --muted: #b7bcc4;
  --red: #e21e2d;
  --red-dark: #8f111b;
  --silver: #d8dde4;
  --steel: #7d8792;
  --shadow: 0 22px 60px rgba(0, 0, 0, 0.42);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background: var(--carbon-2);
  font-family: Helvetica, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.55;
  letter-spacing: 0;
}

body.home-page {
  background: var(--carbon);
}

body:not(.home-page) main {
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 60px);
  background: var(--carbon-2);
}

body.home-page::before {
  content: none;
}

.home-page main {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: var(--carbon);
}

.home-page main::before,
.home-page main::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  pointer-events: none;
}

.home-page main::before {
  bottom: auto;
  height: 100vh;
  background: url("../images/racetrack-hero.jpg") center center / cover no-repeat;
  transform: scale(1.02);
  transform-origin: center;
  animation: hero-drift 18s ease-in-out infinite alternate;
}

.home-page main::after {
  z-index: -1;
  background: linear-gradient(
    180deg,
    rgba(6, 7, 8, 0.24) 0,
    rgba(6, 7, 8, 0.48) 36vh,
    rgba(6, 7, 8, 0.84) 66vh,
    rgba(6, 7, 8, 0.96) 100%
  );
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

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

h1 {
  font-size: 2.45rem;
}

h2 {
  font-size: 1.55rem;
}

h3 {
  font-size: 1rem;
}

.home-hero {
  position: relative;
  z-index: 2;
  display: grid;
  min-height: min(72vh, 720px);
  place-items: center;
  padding: 54px 5vw 42px;
  isolation: isolate;
  background: transparent;
}

.home-hero::after {
  content: "";
  position: absolute;
  right: 5vw;
  bottom: 0;
  left: 5vw;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(226, 30, 45, 0.95),
    rgba(216, 221, 228, 0.72),
    transparent
  );
  transform: scaleX(0.72);
  animation: line-sweep 900ms ease-out 250ms both;
}

.home-hero-inner {
  display: grid;
  justify-items: center;
  gap: 14px;
  width: min(820px, 100%);
  text-align: center;
}

.home-hero-inner > * {
  animation: rise-in 700ms ease-out both;
}

.home-hero-inner > :nth-child(2) {
  animation-delay: 80ms;
}

.home-hero-inner > :nth-child(3) {
  animation-delay: 140ms;
}

.home-hero-inner > :nth-child(4) {
  animation-delay: 200ms;
}

.home-hero-inner > :nth-child(5) {
  animation-delay: 260ms;
}

.home-logo {
  width: min(390px, 76vw);
  max-height: 220px;
  object-fit: contain;
  filter: drop-shadow(0 22px 60px rgba(0, 0, 0, 0.42));
}

.hero-title {
  max-width: 760px;
  color: #ffffff;
  font-size: 3.65rem;
  text-transform: uppercase;
  text-shadow: 0 18px 46px rgba(0, 0, 0, 0.52);
}

.hero-copy {
  max-width: 660px;
  margin: 0;
  color: var(--silver);
  font-size: 1.04rem;
  font-weight: 700;
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  width: min(760px, 100%);
  margin-top: 14px;
}

.hero-stats span {
  display: grid;
  min-width: 154px;
  padding: 10px 14px;
  border-left: 3px solid var(--red);
  color: var(--muted);
  background: linear-gradient(90deg, rgba(226, 30, 45, 0.16), rgba(6, 7, 8, 0.28));
  font-size: 0.72rem;
  font-weight: 900;
  text-align: left;
  text-transform: uppercase;
}

.hero-stats strong {
  color: #ffffff;
  font-size: 1.3rem;
  line-height: 1;
}

.contact-icon {
  display: block;
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  color: #ffffff;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.9;
}

.home-buttons,
.site-nav,
.hero-actions,
.page-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 118px;
  min-height: 42px;
  padding: 9px 16px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 6px;
  color: #ffffff;
  background: rgba(6, 7, 8, 0.62);
  font-weight: 800;
  font-size: 0.82rem;
  text-decoration: none;
  text-transform: uppercase;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background 180ms ease,
    box-shadow 180ms ease;
}

.button:hover,
.button:focus-visible,
.button[aria-current="page"] {
  border-color: var(--red);
  background: var(--red);
  box-shadow: 0 12px 32px rgba(226, 30, 45, 0.24);
  outline: none;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-2px);
}

.section {
  padding: 50px 5vw;
}

.description-section {
  background: var(--carbon);
  border-top: 1px solid rgba(226, 30, 45, 0.42);
}

.home-page .description-section {
  position: relative;
  z-index: 1;
  margin-top: -84px;
  padding-top: 112px;
  background: linear-gradient(
    180deg,
    rgba(6, 7, 8, 0) 0,
    rgba(6, 7, 8, 0.2) 24%,
    rgba(6, 7, 8, 0.62) 58%,
    rgba(6, 7, 8, 0.86) 100%
  );
  border-top: 0;
}

.home-page .sponsors-section {
  position: relative;
  z-index: 1;
  background: rgba(6, 7, 8, 0.92);
}

.intro-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(260px, 0.65fr);
  gap: 34px;
  align-items: center;
  width: min(1040px, 100%);
  margin: 0 auto;
}

.intro-copy {
  text-align: left;
}

.intro-copy h2 {
  max-width: 720px;
  font-size: 2.35rem;
  text-transform: uppercase;
}

.intro-copy .lead {
  margin-left: 0;
}

.backed-by {
  display: grid;
  gap: 14px;
  align-items: center;
  justify-items: center;
  min-height: 172px;
  padding: 20px 24px;
  border-top: 1px solid rgba(216, 221, 228, 0.18);
  border-right: 1px solid rgba(216, 221, 228, 0.1);
  border-bottom: 1px solid rgba(216, 221, 228, 0.18);
  border-left: 4px solid var(--red);
  background: linear-gradient(90deg, rgba(226, 30, 45, 0.12), rgba(216, 221, 228, 0.04));
}

.backed-by span {
  color: var(--steel);
  font-size: 0.7rem;
  font-weight: 900;
  text-transform: uppercase;
}

.backed-by img {
  width: min(300px, 100%);
  max-height: 106px;
  object-fit: contain;
}

.narrow {
  width: min(680px, 100%);
  margin: 0 auto;
  text-align: center;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--red);
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
}

.lead {
  margin: 16px auto 0;
  max-width: 640px;
  color: var(--muted);
  font-size: 1rem;
}

.sponsors-section,
.page-section:nth-of-type(even) {
  background: var(--carbon-2);
}

.section-heading {
  width: min(900px, 100%);
  margin: 0 auto 24px;
  text-align: center;
}

.sponsors-section .section-heading h2 {
  font-size: 3.2rem;
}

.sponsor-grid {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: clamp(18px, 2.2vw, 34px) clamp(24px, 3.2vw, 54px);
  width: min(1180px, 100%);
  margin: 0 auto;
}

.sponsor-logo {
  --sponsor-basis: clamp(124px, 14vw, 190px);
  --sponsor-img-width: clamp(118px, 13vw, 180px);
  --sponsor-img-height: clamp(44px, 4.2vw, 64px);

  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 1 var(--sponsor-basis);
  min-height: calc(var(--sponsor-img-height) + clamp(8px, 1vw, 18px));
  padding: clamp(5px, 0.8vw, 10px);
  transition:
    transform 180ms ease,
    opacity 180ms ease;
}

.sponsor-logo img {
  width: 100%;
  height: var(--sponsor-img-height);
  max-width: var(--sponsor-img-width);
  object-fit: contain;
  transition: filter 180ms ease;
}

.sponsor-logo:hover,
.sponsor-logo:focus-within {
  transform: translateY(-3px);
  opacity: 1;
}

.sponsor-logo.sponsor-mono:hover img,
.sponsor-logo.sponsor-mono:focus-within img {
  filter:
    brightness(0) invert(1)
    drop-shadow(0 9px 18px rgba(226, 30, 45, 0.42));
}

.sponsor-mono img,
img.sponsor-mono {
  filter: brightness(0) invert(1);
}

.home-logo.sponsor-mono {
  filter: brightness(0) invert(1) drop-shadow(0 22px 60px rgba(0, 0, 0, 0.42));
}

.sponsor-large {
  --sponsor-basis: clamp(240px, 29vw, 420px);
  --sponsor-img-width: clamp(260px, 28vw, 420px);
  --sponsor-img-height: clamp(96px, 10vw, 140px);
}

.sponsor-medium {
  --sponsor-basis: clamp(164px, 18vw, 250px);
  --sponsor-img-width: clamp(170px, 17vw, 250px);
  --sponsor-img-height: clamp(62px, 6vw, 88px);
}

.contact-footer {
  padding: 24px 5vw 30px;
  border-top: 1px solid rgba(226, 30, 45, 0.38);
  background: var(--carbon);
}

.contact-footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  width: min(780px, 100%);
  margin: 0 auto;
}

.contact-link {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: center;
  gap: 11px;
  flex: 1 1 270px;
  max-width: 370px;
  min-height: 58px;
  padding: 12px 14px;
  border-top: 1px solid rgba(216, 221, 228, 0.16);
  border-right: 1px solid rgba(216, 221, 228, 0.1);
  border-bottom: 1px solid rgba(216, 221, 228, 0.16);
  border-left: 4px solid var(--red);
  color: rgba(255, 255, 255, 0.92);
  background: linear-gradient(90deg, rgba(226, 30, 45, 0.14), rgba(216, 221, 228, 0.04));
  font-size: 0.82rem;
  font-weight: 800;
  text-decoration: none;
  transition:
    background 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease;
}

.contact-link:hover,
.contact-link:focus-visible {
  background: linear-gradient(90deg, rgba(226, 30, 45, 0.22), rgba(216, 221, 228, 0.07));
  border-color: rgba(226, 30, 45, 0.58);
  box-shadow: 0 14px 34px rgba(226, 30, 45, 0.16);
  outline: none;
  transform: translateY(-2px);
}

.contact-link-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.contact-link-copy span {
  color: var(--steel);
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
}

.contact-link-copy strong {
  color: #ffffff;
  font-size: 0.9rem;
  overflow-wrap: anywhere;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 60px;
  padding: 8px 5vw;
  background: rgba(6, 7, 8, 0.94);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  font-weight: 900;
  text-decoration: none;
}

.brand-mark {
  width: 46px;
  height: 32px;
  object-fit: contain;
}

.brand span {
  white-space: nowrap;
}

.site-nav {
  justify-content: flex-end;
  gap: 8px;
}

.site-nav a {
  min-height: 32px;
  padding: 5px 10px;
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a:focus-visible,
.site-nav a[aria-current="page"] {
  color: #ffffff;
  border-color: rgba(226, 30, 45, 0.55);
  background: rgba(226, 30, 45, 0.16);
  outline: none;
}

.page-hero {
  padding: 26px 5vw 24px;
  background:
    linear-gradient(rgba(6, 7, 8, 0.78), rgba(6, 7, 8, 0.92)),
    url("../images/racetrack-hero.jpg") center / cover no-repeat;
  border-bottom: 1px solid rgba(226, 30, 45, 0.42);
}

.page-hero-inner {
  width: min(900px, 100%);
  margin: 0 auto;
}

.page-hero p {
  max-width: 600px;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  width: min(900px, 100%);
  margin: 0 auto;
}

.feature {
  min-height: 160px;
  padding: 18px;
  border-top: 4px solid var(--red);
}

.feature-number {
  display: block;
  margin-bottom: 28px;
  color: var(--red);
  font-size: 0.82rem;
  font-weight: 900;
}

.feature p,
.text-item p,
.project-row-copy span {
  margin: 12px 0 0;
  color: var(--muted);
}

.project-list,
.text-list {
  display: grid;
  gap: 24px;
  width: min(860px, 100%);
  margin: 0 auto;
}

.project-row {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  padding: 0 0 22px;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
}

.project-thumb {
  width: 140px;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--line);
  border-radius: 6px;
  object-fit: cover;
  opacity: 0.84;
}

.project-row:nth-child(2) .project-thumb {
  object-position: 35% center;
}

.project-row:nth-child(3) .project-thumb {
  object-position: 78% center;
}

.project-row-copy {
  display: grid;
  gap: 4px;
}

.project-row-copy strong {
  font-size: 1rem;
}

.project-row:hover,
.project-row:focus-visible {
  color: #ffffff;
  outline: none;
}

.project-row:hover .project-thumb,
.project-row:focus-visible .project-thumb {
  border-color: rgba(226, 30, 45, 0.72);
  opacity: 1;
}

.text-item {
  display: grid;
  gap: 10px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.empty-section {
  min-height: 34vh;
}

.page-section:last-child {
  flex: 1;
}

.plain-text {
  width: min(760px, 100%);
  margin: 0 auto;
}

.plain-text p {
  margin: 18px 0 0;
  color: var(--muted);
}

.plain-text a {
  color: var(--red);
  font-weight: 800;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.plain-text + .project-media {
  margin-top: 32px;
}

.plain-text .asset-figure {
  margin-top: 22px;
}

.plain-text .asset-grid {
  margin-top: 22px;
}

.plain-text .pcb-viewer {
  margin-top: 22px;
}

.project-media {
  width: min(760px, 100%);
  margin: 0 auto;
}

.project-media-wide {
  width: min(1040px, 100%);
}

.asset-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.asset-figure {
  margin: 0;
}

.asset-figure img {
  width: 100%;
  aspect-ratio: 1920 / 1030;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--carbon);
  object-fit: contain;
}

.interface-figure {
  width: min(300px, 100%);
  margin-right: auto;
  margin-left: auto;
}

.interface-figure img {
  aspect-ratio: 1080 / 1837;
}

.asset-figure figcaption {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.assembly-figure {
  margin: 0;
}

.assembly-stack {
  display: grid;
  gap: 28px;
}

.assembly-viewer {
  display: block;
  width: 100%;
  height: min(62vh, 620px);
  min-height: 400px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: transparent;
  --poster-color: transparent;
}

.model-fallback-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: transparent;
}

.assembly-figure figcaption {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.pcb-viewer-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.pcb-viewer {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--carbon);
}

.pcb-viewer iframe {
  display: block;
  width: 100%;
  height: clamp(320px, 56.25vw, 520px);
  border: 0;
}

.info-contact {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.info-contact .contact-link {
  max-width: none;
}

@keyframes hero-drift {
  from {
    transform: scale(1.02) translate3d(0, 0, 0);
  }

  to {
    transform: scale(1.06) translate3d(0, -10px, 0);
  }
}

@keyframes line-sweep {
  from {
    opacity: 0;
    transform: scaleX(0);
  }

  to {
    opacity: 1;
    transform: scaleX(0.72);
  }
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(14px);
  }

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

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .home-page main::before {
    transform: none;
  }
}

@media (max-width: 900px) {
  .home-hero {
    min-height: min(68vh, 660px);
  }

  .hero-title {
    font-size: 2.85rem;
  }

  .sponsors-section .section-heading h2 {
    font-size: 2.6rem;
  }

  .intro-layout {
    grid-template-columns: 1fr;
  }

  .backed-by {
    justify-self: center;
    width: min(440px, 100%);
  }

  .feature-grid {
    grid-template-columns: 1fr;
  }

  .asset-grid {
    grid-template-columns: 1fr;
  }

  .pcb-viewer-grid {
    grid-template-columns: 1fr;
  }

  .sponsor-grid {
    gap: 22px 32px;
  }

}

@media (max-width: 640px) {
  h1 {
    font-size: 1.9rem;
  }

  h2 {
    font-size: 1.25rem;
  }

  .home-hero {
    min-height: auto;
    padding: 34px 5vw 28px;
  }

  .home-page main::after {
    background: linear-gradient(
      180deg,
      rgba(6, 7, 8, 0.14) 0,
      rgba(6, 7, 8, 0.34) 36vh,
      rgba(6, 7, 8, 0.82) 66vh,
      rgba(6, 7, 8, 0.96) 100%
    );
  }

  .home-logo {
    width: min(250px, 78vw);
    max-height: 150px;
  }

  .hero-title {
    font-size: 2.05rem;
  }

  .sponsors-section .section-heading h2 {
    font-size: 2rem;
  }

  .hero-copy {
    font-size: 0.94rem;
  }

  .hero-stats {
    display: grid;
    grid-template-columns: 1fr;
    width: min(320px, 100%);
  }

  .hero-stats span {
    min-width: 0;
  }

  .button {
    width: 100%;
  }

  .home-buttons {
    width: min(300px, 100%);
  }

  .section,
  .page-hero {
    padding: 38px 5vw;
  }

  .home-page .description-section {
    margin-top: -64px;
    padding-top: 64px;
  }

  .intro-copy {
    text-align: center;
  }

  .intro-copy h2 {
    font-size: 1.65rem;
  }

  .intro-copy .lead {
    margin-right: auto;
    margin-left: auto;
  }

  .backed-by {
    min-height: 140px;
  }

  .page-hero {
    padding: 28px 5vw;
  }

  .site-header {
    position: static;
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .site-nav {
    justify-content: flex-start;
  }

  .sponsor-grid {
    gap: 18px 24px;
  }

  .contact-footer-inner {
    width: min(320px, 100%);
  }

  .contact-link {
    max-width: none;
  }

  .project-row {
    grid-template-columns: 96px minmax(0, 1fr);
    gap: 12px;
  }

  .project-thumb {
    width: 96px;
  }

  .assembly-viewer {
    height: 340px;
    min-height: 300px;
  }

  .pcb-viewer iframe {
    height: min(72vw, 420px);
  }
}

@media (max-width: 360px) {
  .hero-title {
    font-size: 1.78rem;
  }

  .sponsor-grid {
    gap: 16px 18px;
  }
}

