:root {
  --color-primary: #2c3e7b;
  --color-accent: #d6fd00;
  --color-accent-soft: rgba(214, 253, 0, 0.2);
  --color-accent-strong: #eeff7a;
  --color-surface: #f4f7fb;
  --color-surface-strong: #ffffff;
  --color-text: #111826;
  --color-text-soft: #52607a;
  --color-border: rgba(44, 62, 123, 0.12);
  --color-border-strong: rgba(44, 62, 123, 0.24);
  --shadow-lg: 0 24px 60px rgba(7, 17, 45, 0.16);
  --shadow-sm: 0 12px 24px rgba(9, 17, 31, 0.08);
  --shadow-accent: 0 20px 46px rgba(214, 253, 0, 0.18);
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --container: min(1180px, calc(100vw - 32px));
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  color: var(--color-text);
  font-family: "Manrope", "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(214, 253, 0, 0.26), transparent 34%),
    radial-gradient(circle at top right, rgba(44, 62, 123, 0.16), transparent 26%),
    linear-gradient(180deg, #eff3fa 0%, #f8fafc 42%, #eef3f9 100%);
}

body.is-lightbox-open {
  overflow: hidden;
}

body::before,
body::after {
  content: "";
  position: fixed;
  z-index: 0;
  pointer-events: none;
  filter: blur(18px);
  opacity: 0.72;
}

body::before {
  top: 8%;
  left: -60px;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(214, 253, 0, 0.48), transparent 72%);
  animation: drift 16s ease-in-out infinite;
}

body::after {
  right: -40px;
  bottom: 12%;
  width: 260px;
  height: 260px;
  border-radius: 38% 62% 58% 42% / 42% 43% 57% 58%;
  background: radial-gradient(circle, rgba(44, 62, 123, 0.22), transparent 72%);
  animation: drift 20s ease-in-out infinite reverse;
}

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

button {
  border: 0;
  background: transparent;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
}

.page-shell {
  position: relative;
  z-index: 1;
  width: var(--container);
  margin: 0 auto;
  padding: calc(24px + env(safe-area-inset-top, 0px)) env(safe-area-inset-right, 0px)
    calc(40px + env(safe-area-inset-bottom, 0px)) env(safe-area-inset-left, 0px);
}

.site-header {
  position: sticky;
  top: 12px;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 20px;
  margin-bottom: 28px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow-sm);
  transition: transform 220ms ease, box-shadow 220ms ease, background 220ms ease;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-primary), #4156a1);
  color: var(--color-accent);
  font-family: "Barlow Condensed", sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

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

.brand-copy strong,
.site-nav a,
.section-heading h2,
.hero h1,
.hero-stats dt,
.slider-control,
.chip {
  font-family: "Barlow Condensed", sans-serif;
}

.brand-copy strong {
  font-size: 1.18rem;
  letter-spacing: 0.02em;
}

.brand-copy small {
  color: var(--color-text-soft);
  font-size: 0.85rem;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.site-nav::-webkit-scrollbar {
  display: none;
}

.site-nav a {
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--color-primary);
  font-size: 1.05rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: background 180ms ease, color 180ms ease, transform 180ms ease;
}

.site-nav a:hover,
.site-nav a:focus-visible,
.chip:hover,
.chip:focus-visible,
.button:hover,
.button:focus-visible,
.slider-control:hover,
.slider-control:focus-visible {
  outline: none;
  transform: translateY(-1px);
}

.hero,
.content-section,
.site-footer {
  content-visibility: auto;
  contain-intrinsic-size: 1px 720px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  gap: 24px;
  align-items: stretch;
  margin-bottom: 28px;
}

.hero-copy,
.hero-visual,
.content-section,
.site-footer {
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow-lg);
}

.hero-copy {
  position: relative;
  overflow: hidden;
  padding: clamp(28px, 4vw, 44px);
}

.hero-copy::before {
  content: "";
  position: absolute;
  inset: -20% auto auto -10%;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(214, 253, 0, 0.3), transparent 72%);
  animation: pulseGlow 8s ease-in-out infinite;
}

.hero-copy::after {
  content: "";
  position: absolute;
  inset: auto -60px -80px auto;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  border: 1px solid rgba(44, 62, 123, 0.12);
  box-shadow: inset 0 0 0 18px rgba(44, 62, 123, 0.03);
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--color-primary);
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero h1,
.section-heading h2 {
  margin: 0;
  color: var(--color-primary);
  line-height: 0.95;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.hero h1 {
  font-size: clamp(3.4rem, 8vw, 6.8rem);
}

.hero-description,
.section-heading p,
.team-card p,
.race-caption p,
.race-meta p,
.sponsor-card p,
.footer-note {
  color: var(--color-text-soft);
  line-height: 1.7;
}

.hero-description {
  margin: 20px 0 0;
  max-width: 58ch;
  font-size: 1.03rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.button {
  position: relative;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  min-width: min(100%, 220px);
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 700;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.button::after {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: inherit;
  background: linear-gradient(120deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.38), rgba(255, 255, 255, 0));
  transform: translateX(-120%);
  transition: transform 260ms ease;
  z-index: -1;
}

.button-primary {
  background: var(--color-accent);
  color: #15203b;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.04);
}

.button-secondary {
  background: rgba(44, 62, 123, 0.08);
  color: var(--color-primary);
}

.button-tertiary {
  border: 1px solid rgba(44, 62, 123, 0.16);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(214, 253, 0, 0.18)),
    rgba(255, 255, 255, 0.82);
  color: var(--color-primary);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.42), 0 16px 30px rgba(44, 62, 123, 0.08);
}

.button-tertiary::before {
  content: "Sponsor";
  display: inline-block;
  margin-right: 10px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(44, 62, 123, 0.08);
  color: var(--color-primary);
  font-family: "Barlow Condensed", sans-serif;
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 36px 0 0;
}

.hero-stats div {
  position: relative;
  padding: 18px;
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, rgba(44, 62, 123, 0.05), rgba(44, 62, 123, 0.02));
  border: 1px solid var(--color-border);
  overflow: hidden;
}

.hero-stats div::after {
  content: "";
  position: absolute;
  inset: auto 16px 0 16px;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--color-accent), rgba(214, 253, 0, 0.12));
}

.hero-stats dt {
  margin: 0 0 4px;
  color: var(--color-primary);
  font-size: 2rem;
  line-height: 1;
}

.hero-stats dd {
  margin: 0;
  color: var(--color-text-soft);
  font-size: 0.92rem;
}

.hero-visual {
  overflow: hidden;
  padding: 14px;
}

.hero-frame {
  position: relative;
  height: 100%;
  min-height: 460px;
  overflow: hidden;
  border-radius: calc(var(--radius-xl) - 10px);
  background:
    linear-gradient(180deg, rgba(44, 62, 123, 0.2), rgba(44, 62, 123, 0.55)),
    linear-gradient(135deg, rgba(214, 253, 0, 0.12), rgba(44, 62, 123, 0.22));
}

.hero-frame::before {
  content: "";
  position: absolute;
  inset: 18px;
  border-radius: calc(var(--radius-xl) - 14px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  z-index: 1;
  pointer-events: none;
}

.hero-frame::after {
  content: "RUN TOGETHER";
  position: absolute;
  right: -16px;
  bottom: 28px;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--color-accent);
  color: var(--color-primary);
  font-family: "Barlow Condensed", sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  transform: rotate(-90deg);
  transform-origin: bottom right;
}

.hero-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.content-section,
.site-footer {
  padding: clamp(24px, 3vw, 34px);
  margin-bottom: 28px;
}

.content-section {
  position: relative;
  overflow: hidden;
}

.content-section::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(140deg, rgba(214, 253, 0, 0.06), transparent 22%, transparent 70%, rgba(44, 62, 123, 0.04));
  pointer-events: none;
}

.section-heading {
  display: grid;
  gap: 10px;
  margin-bottom: 24px;
}

.section-heading::after {
  content: "";
  width: 86px;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--color-accent), var(--color-primary));
}

.section-heading h2 {
  font-size: clamp(2.2rem, 4vw, 4rem);
}

.section-heading p {
  margin: 0;
  max-width: 64ch;
}

.team-grid,
.sponsor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
}

.team-card,
.sponsor-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface-strong);
  box-shadow: var(--shadow-sm);
  transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
}

.sponsor-card {
  scroll-snap-align: start;
}

.team-card::before,
.sponsor-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 0%, transparent 48%, rgba(17, 24, 38, 0.05) 100%);
  pointer-events: none;
}

.team-card img,
.sponsor-card img,
.sponsor-card video {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: linear-gradient(135deg, rgba(44, 62, 123, 0.1), rgba(214, 253, 0, 0.14));
}

.team-card-copy,
.sponsor-card-copy {
  padding: 18px;
}

.team-card h3,
.race-caption h3,
.sponsor-card h3,
.race-meta strong {
  margin: 0;
  color: var(--color-primary);
  font-size: 1.35rem;
}

.team-card p,
.sponsor-card p,
.race-caption p,
.race-meta p {
  margin: 10px 0 0;
}

.races-section {
  overflow: hidden;
}

.race-slider {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
}

.race-slider-viewport {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl);
  touch-action: pan-y pinch-zoom;
}

.race-slider-viewport::before,
.race-slider-viewport::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 36px;
  z-index: 2;
  pointer-events: none;
}

.race-slider-viewport::before {
  left: 0;
  background: linear-gradient(90deg, rgba(244, 247, 251, 0.88), transparent);
}

.race-slider-viewport::after {
  right: 0;
  background: linear-gradient(270deg, rgba(244, 247, 251, 0.88), transparent);
}

.race-slider-track {
  display: flex;
  transition: transform 280ms ease;
  will-change: transform;
}

.race-slider-track.is-dragging {
  transition: none;
}

.race-slide {
  min-width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(244, 247, 251, 0.98));
  overflow: hidden;
}

.race-media-button {
  position: relative;
  padding: 0;
  overflow: hidden;
  background: #dfe6f4;
  cursor: pointer;
}

.race-slide img,
.race-slide video,
.race-slide-media {
  width: 100%;
  height: 100%;
  min-height: 360px;
  object-fit: cover;
}

.race-media-badge {
  position: absolute;
  left: 18px;
  bottom: 18px;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(17, 24, 38, 0.68);
  color: #ffffff;
  font-family: "Barlow Condensed", sans-serif;
  font-size: 1rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.race-gallery-button {
  width: fit-content;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 999px;
  background: rgba(44, 62, 123, 0.08);
  color: var(--color-primary);
  font-family: "Barlow Condensed", sans-serif;
  font-size: 1rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
}

.media-placeholder {
  display: grid;
  place-items: center;
  min-height: 360px;
  padding: 24px;
  color: var(--color-primary);
  font-family: "Barlow Condensed", sans-serif;
  font-size: 1.4rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: linear-gradient(135deg, rgba(44, 62, 123, 0.12), rgba(214, 253, 0, 0.22));
}

.race-caption {
  padding: clamp(24px, 4vw, 34px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
}

.race-caption-meta {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--color-accent-soft);
  color: var(--color-primary);
  font-size: 0.88rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.slider-control {
  width: 56px;
  height: 56px;
  border: 0;
  border-radius: 50%;
  background: linear-gradient(180deg, var(--color-primary), #22305e);
  color: var(--color-accent);
  font-size: 1.8rem;
  cursor: pointer;
  box-shadow: 0 18px 32px rgba(44, 62, 123, 0.18);
  transition: transform 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.race-slider-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 20px;
}

.race-progress {
  position: relative;
  flex: 1 1 180px;
  min-width: 140px;
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  background: linear-gradient(90deg, rgba(44, 62, 123, 0.09), rgba(44, 62, 123, 0.02));
  border: 1px solid rgba(44, 62, 123, 0.08);
}

.race-progress-bar {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--color-accent), var(--color-accent-strong));
  transform: scaleX(0);
  transform-origin: left center;
  box-shadow: var(--shadow-accent);
}

.race-counter {
  min-width: 74px;
  color: var(--color-primary);
  font-family: "Barlow Condensed", sans-serif;
  font-size: 1.2rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.slider-dots {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.slider-dot {
  width: 14px;
  height: 14px;
  border: 0;
  border-radius: 50%;
  background: rgba(44, 62, 123, 0.18);
  cursor: pointer;
  transition: transform 180ms ease, width 180ms ease, background 180ms ease;
}

.slider-dot.is-active {
  width: 34px;
  background: var(--color-accent);
  box-shadow: inset 0 0 0 2px var(--color-primary);
}

.race-meta {
  display: grid;
  gap: 4px;
  min-height: 52px;
}

.sponsor-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.sponsor-grid {
  position: relative;
}

.sponsor-grid.is-carousel::before,
.sponsor-grid.is-carousel::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 20px;
  z-index: 2;
  pointer-events: none;
}

.sponsor-grid.is-carousel::before {
  left: 0;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.96), transparent);
}

.sponsor-grid.is-carousel::after {
  right: 0;
  background: linear-gradient(270deg, rgba(255, 255, 255, 0.96), transparent);
}

.chip {
  padding: 11px 16px;
  border: 0;
  border-radius: 999px;
  background: rgba(44, 62, 123, 0.08);
  color: var(--color-primary);
  font-size: 1rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.chip.is-active {
  background: var(--color-accent);
  box-shadow: var(--shadow-accent);
}

.sponsor-card-copy {
  display: grid;
  gap: 12px;
}

.sponsor-preview {
  position: relative;
  padding: 0;
  overflow: hidden;
  cursor: pointer;
  background: #edf2fa;
}

.sponsor-preview-media {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.sponsor-preview-badge {
  position: absolute;
  right: 14px;
  bottom: 14px;
  z-index: 1;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(17, 24, 38, 0.7);
  color: #ffffff;
  font-family: "Barlow Condensed", sans-serif;
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sponsor-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.sponsor-type-badge,
.thumb-type-badge,
.thumb-overflow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(44, 62, 123, 0.08);
  color: var(--color-primary);
  font-family: "Barlow Condensed", sans-serif;
  font-size: 0.88rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sponsor-media-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.sponsor-thumb {
  position: relative;
  width: 72px;
  height: 72px;
  padding: 0;
  overflow: hidden;
  border-radius: 18px;
  cursor: pointer;
  background: rgba(44, 62, 123, 0.06);
}

.sponsor-thumb-media {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.thumb-type-badge {
  position: absolute;
  right: 6px;
  bottom: 6px;
  min-height: 22px;
  padding: 2px 8px;
  background: rgba(17, 24, 38, 0.74);
  color: #ffffff;
  font-size: 0.72rem;
}

.sponsor-link {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 8px;
  color: var(--color-primary);
  font-weight: 700;
}

.sponsor-indicators {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 18px;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 24px;
}

.lightbox[hidden] {
  display: none;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 12, 24, 0.76);
  backdrop-filter: blur(14px);
}

.lightbox-dialog {
  position: relative;
  z-index: 1;
  width: min(1120px, 100%);
  max-height: min(92vh, 980px);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 28px;
  background: rgba(13, 19, 34, 0.92);
  color: #f5f7fb;
  box-shadow: 0 34px 80px rgba(0, 0, 0, 0.34);
}

.lightbox-toolbar,
.lightbox-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 22px;
}

.lightbox-toolbar {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.lightbox-toolbar-copy {
  display: grid;
  gap: 6px;
}

.lightbox-toolbar-copy .eyebrow,
.lightbox-toolbar-copy h2,
.lightbox-toolbar-copy p,
.lightbox-counter,
.lightbox-caption {
  margin: 0;
}

.lightbox-toolbar-copy .eyebrow {
  color: var(--color-accent);
}

.lightbox-toolbar-copy h2 {
  color: #ffffff;
  font-family: "Barlow Condensed", sans-serif;
  font-size: clamp(2rem, 4vw, 3.2rem);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.lightbox-toolbar-copy p,
.lightbox-caption {
  color: rgba(245, 247, 251, 0.78);
}

.lightbox-close,
.lightbox-nav {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  padding: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  cursor: pointer;
}

.lightbox-close span,
.lightbox-nav span {
  font-size: 1.8rem;
}

.lightbox-body {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 18px 22px;
}

.lightbox-stage {
  display: grid;
  place-items: center;
  min-height: min(62vh, 720px);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.04);
  overflow: hidden;
}

.lightbox-media {
  width: 100%;
  max-height: min(62vh, 720px);
  object-fit: contain;
}

.lightbox-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  flex-wrap: wrap;
}

.lightbox-meta {
  display: grid;
  gap: 6px;
}

.lightbox-counter {
  color: var(--color-accent);
  font-family: "Barlow Condensed", sans-serif;
  font-size: 1.2rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.lightbox-thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.lightbox-thumb {
  width: 64px;
  height: 64px;
  padding: 0;
  overflow: hidden;
  border: 1px solid transparent;
  border-radius: 16px;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.08);
}

.lightbox-thumb.is-active {
  border-color: var(--color-accent);
}

.lightbox-thumb-media {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.carousel-hint {
  margin: 0;
  color: var(--color-primary);
  font-family: "Barlow Condensed", sans-serif;
  font-size: 1rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sponsor-dots {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sponsor-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(44, 62, 123, 0.18);
  cursor: pointer;
  transition: width 180ms ease, transform 180ms ease, background 180ms ease;
}

.sponsor-dot.is-active {
  width: 28px;
  background: var(--color-accent);
  box-shadow: inset 0 0 0 2px var(--color-primary);
}

.reveal {
  opacity: 0;
  transform: translateY(28px) scale(0.985);
  transition:
    opacity 620ms ease,
    transform 620ms ease;
  transition-delay: var(--reveal-delay, 0ms);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.button:hover::after,
.button:focus-visible::after {
  transform: translateX(0);
}

.team-card:hover,
.team-card:focus-within,
.sponsor-card:hover,
.sponsor-card:focus-within {
  transform: translateY(-6px);
  border-color: var(--color-border-strong);
  box-shadow: 0 22px 46px rgba(15, 24, 41, 0.12);
}

.slider-control:hover,
.slider-control:focus-visible {
  box-shadow: 0 24px 40px rgba(44, 62, 123, 0.24);
}

.site-nav a:hover,
.site-nav a:focus-visible {
  background: rgba(44, 62, 123, 0.08);
}

@keyframes drift {
  0%,
  100% {
    transform: translate3d(0, 0, 0) scale(1);
  }

  50% {
    transform: translate3d(10px, -18px, 0) scale(1.06);
  }
}

@keyframes pulseGlow {
  0%,
  100% {
    transform: scale(0.96);
    opacity: 0.56;
  }

  50% {
    transform: scale(1.08);
    opacity: 0.9;
  }
}

@keyframes raceProgress {
  from {
    transform: scaleX(0);
  }

  to {
    transform: scaleX(1);
  }
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.site-footer p {
  margin: 0;
}

@media (max-width: 980px) {
  .site-header,
  .hero,
  .race-slide,
  .race-slider-footer,
  .site-footer {
    grid-template-columns: 1fr;
  }

  .site-header {
    border-radius: 28px;
  }

  .hero-frame {
    min-height: 320px;
  }

  .race-slider-viewport {
    margin-inline: -4px;
  }

  .hero-stats {
    grid-template-columns: 1fr;
  }

  .race-slider {
    grid-template-columns: 1fr;
  }

  .slider-control {
    display: none;
  }

  .lightbox-body {
    grid-template-columns: 1fr;
  }

  .lightbox-nav {
    display: none;
  }
}

@media (max-width: 640px) {
  .page-shell {
    width: min(100vw - 20px, 1180px);
    padding-top: calc(12px + env(safe-area-inset-top, 0px));
  }

  .site-header {
    position: static;
    padding: 16px;
    gap: 14px;
  }

  .site-nav {
    width: 100%;
    flex-wrap: nowrap;
    gap: 18px;
    justify-content: flex-start;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .site-nav a {
    flex: 0 0 auto;
    padding: 6px 0;
  }

  .hero h1 {
    font-size: clamp(2.8rem, 16vw, 4.4rem);
  }

  .hero-copy,
  .hero-visual,
  .content-section,
  .site-footer {
    border-radius: 24px;
  }

  .hero-actions {
    flex-direction: column;
  }

  .hero-actions .button {
    width: 100%;
    min-width: 0;
  }

  .section-heading {
    gap: 8px;
    margin-bottom: 18px;
  }

  .race-slide {
    border-radius: 24px;
  }

  .race-media-button,
  .sponsor-preview {
    border-radius: 22px 22px 0 0;
  }

  .race-caption {
    padding: 22px 18px 24px;
  }

  .race-slider-footer {
    gap: 14px;
    align-items: flex-start;
  }

  .slider-dots {
    order: 2;
  }

  .race-progress {
    order: 3;
    width: 100%;
  }

  .race-counter {
    order: 1;
  }

  .race-meta {
    min-height: auto;
  }

  .sponsor-toolbar {
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .sponsor-toolbar::-webkit-scrollbar,
  .sponsor-grid::-webkit-scrollbar {
    display: none;
  }

  .sponsor-grid.is-carousel {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: min(84vw, 320px);
    overflow-x: auto;
    padding-bottom: 6px;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: 2px;
    overscroll-behavior-x: contain;
    touch-action: pan-x pinch-zoom;
  }

  .sponsor-indicators {
    align-items: flex-start;
    flex-direction: column;
  }

  .sponsor-media-strip {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .lightbox {
    padding: 12px;
  }

  .lightbox-dialog {
    max-height: 96vh;
  }

  .lightbox-toolbar,
  .lightbox-footer,
  .lightbox-body {
    padding-inline: 14px;
  }

  .lightbox-thumbs {
    width: 100%;
    justify-content: flex-start;
    overflow-x: auto;
    flex-wrap: nowrap;
  }

  .chip {
    flex: 0 0 auto;
  }

  .race-slide img,
  .team-card img,
  .sponsor-card img,
  .sponsor-card video {
    aspect-ratio: 16 / 11;
    min-height: auto;
  }
}

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

  .reveal {
    opacity: 1;
    transform: none;
  }
}