:root {
  /* Theme */
  color-scheme: dark;
  /* Background colours */
  --ink: #070506;
  --ink-1: #100b0d;
  /* Reds */
  --ember: #ff2b2b;
  --ember-hot: #ff5b4a;
  --ember-deep: #8d0b12;
  /* Text */
  --bone: #f3eeee;
  --smoke: #b3a4a7;
  --smoke-dim: #9a8b8e;
  /* Light partner band */
  --band: #ece7e5;
  --band-ink: #14100f;
  --band-sub: #5d5553;
  --band-hair: rgba(20, 16, 15, 0.14);
  /* dividers */
  --hair: rgba(243, 238, 238, 0.12);
  --hair-soft: rgba(243, 238, 238, 0.06);
  /* Fonts */
  --sans: "Archivo", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --display: "Archivo Black", "Archivo", "Helvetica Neue", Arial, sans-serif;
  /* Layout */
  --gutter: clamp(20px, 5vw, 72px);
  --maxw: 1240px;
  /* Motion */
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --dur: 0.7s;
}

* {
  box-sizing: border-box;
}

body {
  /* setting up the basic colours and fonts */
  margin: 0;
  background: var(--ink);
  color: var(--bone);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  /* thinner, crisper light text on dark background on Macs */
  -webkit-font-smoothing: antialiased;
  /* creates better text for mainly iphones */
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  /* Stops sideways scroll on phones */
  overflow-x: hidden;
}

/* rules and values of the racing line */
.racing-line {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
}

/* the wide soft glow */
.rl-band {
  fill: none;
  stroke: var(--ember);
  stroke-opacity: 0.06;
  stroke-width: 48;
}

/* the thin sharp line. the script sets the dashoffset so it draws with the scroll */
.rl-core {
  fill: none;
  stroke: var(--ember);
  stroke-opacity: 0.7;
  stroke-width: 1.5;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
}

/* the whole route, faint, so the hero keeps its line before any scroll */
.rl-core-faint {
  stroke-opacity: 0.16;
  stroke-dashoffset: 0;
}

.rl-dot {
  opacity: 0;
}
.rl-dot.on {
  opacity: 1;
}
.rl-dot-ring {
  fill: var(--ember-hot);
  fill-opacity: 0.28;
}
.rl-dot-core {
  fill: #fff;
}

/* the content container */
.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
  --gap: clamp(64px, 8vw, 120px);
}

/* band section */
.band {
  padding-block: var(--gap);
}

.rule-top {
  position: relative;
}

/* the divider line */
.rule-top::before {
  content: "";
  position: absolute;
  top: 0;
  left: var(--gutter);
  right: var(--gutter);
  border-top: 1px solid var(--hair);
}

/* styling the headers */
h1,
h2,
h3 {
  margin: 0;
  font-family: var(--display);
  font-weight: 400;
  text-wrap: balance;
}

h1 {
  font-size: clamp(40px, 5.4vw, 72px);
  line-height: 1;
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(28px, 3.4vw, 44px);
  line-height: 1.05;
  letter-spacing: -0.015em;
}

h3 {
  font-size: 20px;
  line-height: 1.2;
}

/* styling for paragraphs */
p {
  margin: 0;
}

/* label style */
.label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--smoke-dim);
}

/* lede style */
.lede {
  font-size: 18px;
  line-height: 1.55;
  color: var(--smoke);
  max-width: 58ch;
}

/* head style */
.head {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: clamp(28px, 4vw, 48px);
}

/* styling the buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 22px;
  background: var(--ember);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: 3px;
  transition:
    background 0.15s ease,
    border-color 0.15s ease;
}

/* outline button example "see the plan" button */
.btn-ghost {
  background: transparent;
  border-color: rgba(243, 238, 238, 0.28);
  color: var(--bone);
}

/* white button example "sponsor email" */
.btn-light {
  background: #fff;
  color: var(--band-ink);
}

/* buttons for the partner band */
.btn-dark {
  background: var(--band-ink);
  color: #fff;
}

/* shows red ring when someone moves through the page with tab */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--ember-hot);
  outline-offset: 3px;
}

/* the nav bar. the script adds .nav-hidden on the way down */
.nav {
  transition: transform 0.35s var(--ease);
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 50;
  background: rgba(7, 5, 6, 0.94);
  border-bottom: 1px solid var(--hair);
}

.nav.nav-hidden {
  transform: translateY(-100%);
}

/* an if statment in css, asks the browser if it understands backdrop-filter? */
@supports (
  (backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))
) {
  .nav {
    background: rgba(7, 5, 6, 0.62);
    -webkit-backdrop-filter: blur(16px) saturate(140%);
    backdrop-filter: blur(16px) saturate(140%);
  }
}

/* layout inside the bar */
.nav-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 20px;
  height: 72px;
}

/* the wordmark, sized by height so the width follows */
.mark {
  justify-self: start;
  display: inline-flex;
  align-items: center;
}

.mark img {
  display: block;
  height: 20px;
  width: auto;
}

.nav-cta {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 18px;
}

/* instagram icon, padding makes it a decent tap target */
.nav-social {
  display: inline-flex;
  padding: 8px;
  margin: -8px;
  color: var(--smoke);
  transition: color 0.15s ease;
}

.nav-social svg {
  display: block;
  width: 20px;
  height: 20px;
}

.nav-cta .btn {
  padding: 11px 20px;
}

/* styling the links */
.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(12px, 2.4vw, 36px);
}

.nav-links a {
  color: var(--bone);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  padding: 8px 0;
  border-bottom: 2px solid transparent;
  transition: color 0.15s ease;
}

.nav-links a[aria-current="page"] {
  color: var(--ember);
  border-bottom-color: var(--ember);
}

.nav-links .btn,
.nav-links .nav-social-row {
  display: none;
}

.nav-toggle {
  display: none;
}

/* styling the Hero section */
.hero {
  padding-block: clamp(56px, 7vw, 96px) clamp(40px, 5vw, 72px);
}

@media (min-width: 861px) and (min-height: 640px) {
  .hero {
    min-height: calc(100svh - 72px);
    display: flex;
    align-items: center;
  }

  .hero-grid {
    width: 100%;
  }
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(300px, 0.8fr);
  gap: clamp(32px, 4vw, 64px);
  align-items: end;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

/* the two words that matter, in red */
.hero h1 .soft {
  color: var(--ember);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* styling the timer box */
.season {
  border: 1px solid var(--hair);
  border-radius: 3px;
  background: rgba(16, 11, 13, 0.72);
  padding: 24px 26px 22px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.season-count {
  display: flex;
  align-items: baseline;
  gap: 14px;
}

.season-count .num {
  font-family: var(--display);
  font-size: clamp(52px, 5vw, 72px);
  line-height: 0.9;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

.season-count .what {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 18px;
  line-height: 1.3;
  color: var(--bone);
}

/* the progress bar for the timer box */
.track {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px;
}

.seg {
  position: relative;
  height: 4px;
  border-radius: 2px;
  background: var(--hair);
}

/* red fill, eased in on load */
.seg::before {
  transition: width 1.2s var(--ease) 0.5s;
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: calc(var(--fill, 0) * 100%);
  border-radius: inherit;
  background: var(--ember);
}

/* the white dot */
.seg.now::after {
  transition: left 1.2s var(--ease) 0.5s;
  content: "";
  position: absolute;
  top: 50%;
  left: calc(var(--fill, 0) * 100%);
  width: 10px;
  height: 10px;
  margin: -5px 0 0 -5px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(255, 91, 74, 0.28);
}

/* styling the names for the phases */
.phase-names {
  list-style: none;
  margin: -12px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px;
}

.phase-names li {
  font-size: 12px;
  line-height: 1.35;
  color: var(--smoke-dim);
}

.phase-names li.now {
  color: var(--ember);
  font-weight: 600;
}

/* Styling the figures */
.figures {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--hair);
  padding-top: clamp(28px, 3vw, 40px);
  list-style: none;
  margin: 0;
  padding-left: 0;
}

.fig {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0 clamp(14px, 2vw, 28px);
  border-left: 1px solid var(--hair-soft);
}

.fig:first-child {
  border-left: 0;
  padding-left: 0;
}

.fig .n {
  font-variant-numeric: tabular-nums;
  font-family: var(--display);
  font-size: clamp(40px, 4.4vw, 60px);
  line-height: 0.95;
  letter-spacing: -0.03em;
}

/* the plus after the member count, smaller and lifted */
.fig .plus {
  font-size: 0.55em;
  vertical-align: top;
  line-height: 1.4;
  margin-left: 2px;
}

/* turns 2027 red */
.fig:last-child .n {
  color: var(--ember);
}

.fig .s {
  font-size: 14px;
  line-height: 1.5;
  color: var(--smoke);
  max-width: 26ch;
}

/* styling the Venue sections */

.venue-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.6fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
}

.venue-copy {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.venue-art {
  margin: 0;
  display: flex;
  justify-content: flex-end;
}

.venue-art svg {
  display: block;
  height: clamp(320px, 38vw, 520px);
  width: auto;
  max-width: 100%;
}

/* Faint full track */
.trace {
  fill: none;
  stroke: rgba(243, 238, 238, 0.18);
  stroke-width: 8;
  vector-effect: non-scaling-stroke;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* the red lap on top */
.trace-hot {
  fill: none;
  stroke: var(--ember);
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.car {
  fill: #fff;
}

/* The details list */

.spec {
  margin: 6px 0 0;
  border-top: 1px solid var(--hair);
}

.spec > div {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 16px;
  padding: 11px 0;
  border-bottom: 1px solid var(--hair-soft);
}

.spec dd {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--smoke);
}

/* What is formula student section */

/* Layout */
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: clamp(30px, 5vw, 72px);
  align-items: start;
}

.about-body {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.about-body .head {
  margin-bottom: 0;
}

/* text */
.about-body p {
  color: var(--smoke);
  line-height: 1.65;
  max-width: 62ch;
}

.about-body p.first {
  color: var(--bone);
  font-size: 20px;
  line-height: 1.45;
}

/* Event list */
.events {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.ev-group {
  display: flex;
  flex-direction: column;
}

.ev-group .label {
  padding-bottom: 8px;
  border-bottom: 1px solid var(--hair);
}

.ev-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) 44px;
  align-items: baseline;
  gap: 14px;
  padding: 9px 0;
  border-bottom: 1px solid var(--hair-soft);
  font-size: 14px;
  color: var(--smoke);
}

.ev-row b {
  color: var(--bone);
  font-weight: 600;
}

.ev-row .m {
  text-align: right;
}

.ev-row .pts {
  text-align: right;
  font-weight: 600;
  color: var(--bone);
  font-variant-numeric: tabular-nums;
}

.ev-row .pts.dynamic {
  color: var(--ember);
}

/* The scoring strip */

.scoring {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.score-head {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.score-split {
  display: flex;
  gap: clamp(24px, 4vw, 48px);
}

.score-fig {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.score-fig .n {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(34px, 3.4vw, 48px);
  line-height: 0.95;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

.score-fig .n.dynamic,
.pts-inline {
  color: var(--ember);
}

.pts-inline {
  font-weight: 700;
}

.score-fig .s {
  font-size: 13px;
  color: var(--smoke);
}

/* one strip, each segment as wide as its points */
.score-bar {
  display: flex;
  gap: 3px;
  height: 10px;
}

.score-seg {
  flex-grow: var(--pts);
  border-radius: 2px;
  background: var(--smoke-dim);
}

.score-seg.dynamic {
  background: var(--ember);
}

/* The plan section */

/* Layout */
.phases {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(16px, 2vw, 28px);
}

.phase {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 18px;
}

/* the top line is a pseudo element so the reveal can draw it */
.phase::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  border-top: 1px solid var(--hair);
}

.phase.now::before {
  border-top-color: var(--ember);
}

/* the plan pins while the four phases take turns. hidden below
   laptop size, where the plan just stacks as normal */
.plan-track {
  display: none;
}

@media (min-width: 861px) and (min-height: 640px) {
  .js-pin .pin-wrap {
    height: 300vh;
  }

  .js-pin #plan {
    position: sticky;
    top: 72px;
    min-height: calc(100svh - 72px);
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .js-pin .plan-track {
    display: grid;
    max-width: 420px;
    margin-top: 8px;
  }

  /* this bar follows the scroll, only the hero one eases in */
  .plan-track .seg::before {
    transition: none;
  }

  .js-pin .phase h3,
  .js-pin .phase p,
  .js-pin .phase .when {
    transition: color 0.4s var(--ease);
  }

  .js-pin .phase:not(.active) h3,
  .js-pin .phase:not(.active) p,
  .js-pin .phase:not(.active) .when {
    color: var(--smoke-dim);
  }

  .js-pin .phase.active .when {
    color: var(--bone);
  }

  .js-pin .phase.active::before {
    border-top-color: var(--ember);
  }
}

.phase .when {
  font-family: var(--display);
  font-size: clamp(22px, 2.2vw, 28px);
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--smoke-dim);
}

.phase.now .when {
  color: var(--bone);
}

.phase.last .when {
  color: var(--ember);
}

.phase .flag {
  color: var(--ember);
}

.phase p {
  font-size: 14px;
  line-height: 1.6;
  color: var(--smoke);
}

/* The partner band */

/* light strip across the full page width. the wrap inside keeps
   the text lined up with the rest of the site */
.partner-band {
  background: var(--band);
  color: var(--band-ink);
}

/* a bit tighter than the dark sections, a light block looks
   bigger than a dark one at the same size */
.partner-band-inner {
  padding-block: calc(var(--gap) * 0.8);
}

/* the dark greys swap in for the light background */
.partner-band .label,
.partner-band .lede {
  color: var(--band-sub);
}

/* heading on the left, button on the right */
.partner-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 40px;
  align-items: end;
  margin-bottom: clamp(28px, 4vw, 48px);
}

.partner-head .head {
  margin-bottom: 0;
}

/* one column per tier, split by thin lines like the figures */
.tier-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--band-hair);
}

.tier {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 24px clamp(14px, 2vw, 28px) 0;
  border-left: 1px solid var(--band-hair);
}

.tier:first-child {
  border-left: 0;
  padding-left: 0;
}

.tier-price {
  font-family: var(--display);
  font-size: clamp(26px, 2.6vw, 34px);
  line-height: 1;
  letter-spacing: -0.02em;
}

/* the founding tier gets the red price */
.tier.featured .tier-price {
  color: var(--ember-deep);
}

.tier-summary {
  font-size: 14px;
  line-height: 1.5;
  color: var(--band-sub);
  max-width: 28ch;
}

/* the closing section */

/* the photo pieces */
.ph {
  position: relative;
  margin: 0;
  overflow: hidden;
  border-radius: 3px;
  background: var(--ink-1);
}

.ph img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ph-title {
  position: absolute;
  left: clamp(16px, 2vw, 26px);
  bottom: clamp(14px, 1.8vw, 22px);
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-right: 16px;
}

.ph-title .label {
  color: rgba(243, 238, 238, 0.82);
}

.ph-h {
  font-family: var(--display);
  font-size: clamp(26px, 3vw, 42px);
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--bone);
}

/* space between the figures and the photo under them */
.photo-band {
  padding-top: calc(var(--gap) * 0.6);
}

/* the single wide photo */
.photo-grid.single {
  display: block;
  height: auto;
  margin-bottom: calc(var(--gap) * -0.45);
  position: relative;
  z-index: 0;
}

.photo-grid.single .ph {
  aspect-ratio: 21 / 9;
  border-radius: 0;
  background: none;
}

.photo-grid.single .ph img {
  --fade:
    linear-gradient(
      180deg,
      transparent 0,
      #000 14%,
      #000 62%,
      transparent 100%
    ),
    linear-gradient(90deg, transparent 0, #000 12%, #000 88%, transparent 100%);
  object-position: 50% 32%;
  -webkit-mask-image: var(--fade);
  -webkit-mask-composite: source-in;
  mask-image: var(--fade);
  mask-composite: intersect;
}

#fair .ph img {
  object-position: 50% 50%;
}

.photo-grid.single .ph::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(
    60% 70% at 18% 70%,
    rgba(7, 5, 6, 0.75),
    transparent 70%
  );
}

.photo-grid.single .ph::after {
  display: none;
}

.photo-grid.single .ph-title {
  bottom: 30%;
  left: 10%;
  text-shadow:
    0 2px 24px rgba(7, 5, 6, 0.9),
    0 1px 3px rgba(7, 5, 6, 0.8);
}

.photo-grid.single ~ .closing {
  position: relative;
  z-index: 1;
}

@media (max-width: 560px) {
  .photo-grid.single .ph {
    aspect-ratio: 4 / 3;
  }

  .photo-grid.single .ph-title {
    bottom: 26%;
    left: 6%;
  }

  /* keep the screen in frame on the narrow crop */
  #fair .ph img {
    object-position: 30% 50%;
  }
}

/* Layout */
.closing {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: start;
}

/* join card */
.join {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: flex-start;
}

.join p {
  color: var(--smoke);
  line-height: 1.6;
  max-width: 44ch;
}

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

.role {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--smoke);
  border: 1px solid var(--hair);
  border-radius: 3px;
  padding: 6px 10px;
}

.join-btn {
  margin-top: 8px;
}

/* pitch */
.pitch {
  border: 1px solid rgba(255, 90, 74, 0.3);
  border-radius: 3px;
  background: linear-gradient(158deg, var(--ember-deep), #45060b 80%);
  padding: clamp(28px, 3.4vw, 44px);
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: flex-start;
}

.pitch .label {
  color: rgba(255, 255, 255, 0.7);
}

.pitch p {
  color: rgba(255, 255, 255, 0.86);
  line-height: 1.6;
  max-width: 52ch;
}

/* Footer */

.foot {
  position: relative;
  padding-block: clamp(38px, 4.5vw, 62px) 34px;
}

.foot::before {
  content: "";
  position: absolute;
  top: 0;
  left: var(--gutter);
  right: var(--gutter);
  border-top: 1px solid var(--hair);
}

.foot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: clamp(24px, 3vw, 44px);
  margin-bottom: 34px;
}

.foot-brand {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: flex-start;
}

.foot .mark img {
  height: 18px;
}

.foot-blurb {
  color: var(--smoke);
  font-size: 14px;
  line-height: 1.6;
  max-width: 34ch;
}

.foot h4 {
  margin: 0 0 12px;
}

.foot ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.foot a {
  display: inline-block;
  padding-block: 6px;
  color: var(--smoke);
  text-decoration: none;
  font-size: 14px;
}

.foot-base {
  border-top: 1px solid var(--hair-soft);
  padding-top: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  justify-content: space-between;
  font-size: 12px;
  color: var(--smoke-dim);
}

/* tablets and small laptops: two column layouts stack */
@media (max-width: 1040px) {
  .hero-grid {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .season {
    max-width: 520px;
  }

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

  .venue-art {
    justify-content: flex-start;
  }

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

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

  .phases {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: 32px;
  }

  /* button drops under the heading, tiers go two across */
  .partner-head {
    grid-template-columns: 1fr;
    align-items: start;
    gap: 24px;
  }

  .partner-head .btn {
    justify-self: start;
  }

  .tier-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: 28px;
  }

  .tier:nth-child(3) {
    border-left: 0;
    padding-left: 0;
  }
}

/* small tablets and phones: phone menu, figures two across */
@media (max-width: 860px) {
  .nav-inner {
    grid-template-columns: 1fr auto;
    height: 60px;
  }

  .nav-cta {
    display: none;
  }

  .nav-links {
    display: none;
  }

  /* the menu panel, shown when the script adds .open */
  .nav-links.open {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    background: rgba(7, 5, 6, 0.98);
    border-bottom: 1px solid var(--hair);
    padding: 12px var(--gutter) 20px;
  }

  .nav-links.open a {
    padding: 14px 0;
    border-bottom: 1px solid var(--hair-soft);
    font-size: 16px;
  }

  .nav-links.open .nav-social-row {
    display: block;
  }

  .nav-links.open .btn {
    display: inline-flex;
    margin-top: 12px;
    justify-content: center;
    border-bottom: 0;
  }

  /* the three line menu button */
  .nav-toggle {
    grid-column: 2;
    justify-self: end;
    display: inline-flex;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: 1px solid var(--hair);
    border-radius: 3px;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    cursor: pointer;
  }

  .nav-toggle span {
    display: block;
    width: 16px;
    height: 1.5px;
    background: var(--bone);
  }

  .figures {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: 28px;
  }

  .fig:nth-child(3) {
    border-left: 0;
    padding-left: 0;
  }

  /* phones have no spare column: show only the right hand sweep
     of the racing line, fainter, with no dot */
  .racing-line {
    left: auto;
    right: 0;
    width: 1440px;
    transform: translateX(300px);
  }

  .rl-core {
    stroke-opacity: 0.22;
  }

  .rl-band {
    stroke-opacity: 0.04;
  }

  .rl-dot {
    display: none;
  }
}

/* phones */
@media (max-width: 560px) {
  .figures {
    row-gap: 26px;
  }

  .fig .s {
    font-size: 13px;
  }

  /* event rows stack the name over the description, points stay right */
  .ev-row {
    grid-template-columns: minmax(0, 1fr) 44px;
    gap: 2px 14px;
  }

  .ev-row .m {
    grid-column: 1 / -1;
    text-align: left;
  }

  .ev-row .pts {
    grid-row: 1;
    grid-column: 2;
  }

  .venue-art {
    justify-content: center;
  }

  .venue-art svg {
    height: 280px;
  }

  .hero {
    padding-block: 40px 36px;
  }

  .actions .btn {
    flex: 1 1 auto;
    justify-content: center;
  }

  .join-btn {
    align-self: stretch;
    justify-content: center;
  }

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

  /* the button goes full width like the hero buttons do */
  .partner-head .btn {
    justify-self: stretch;
    justify-content: center;
  }

  /* tiers stack, with a line above each one instead of beside */
  .tier-list {
    grid-template-columns: 1fr;
    row-gap: 0;
    border-top: 0;
  }

  .tier {
    padding: 18px 0;
    border-left: 0;
    border-top: 1px solid var(--band-hair);
  }

  .season {
    padding: 20px 20px 18px;
  }
}

/* ============================================================
   HOVER
   Only on devices that can hover. On a phone a tap counts as
   hover and the style sticks until you tap somewhere else.
   ============================================================ */
@media (hover: hover) {
  .btn:hover {
    background: var(--ember-hot);
  }

  .btn-ghost:hover {
    background: rgba(243, 238, 238, 0.06);
    border-color: rgba(243, 238, 238, 0.5);
  }

  .btn-light:hover {
    background: var(--band);
  }

  .btn-dark:hover {
    background: #000;
  }

  /* changed from the mockup: :not(.btn) stops the red Sponsor Us
     button in the phone menu turning red text on red */
  .nav-links a:not(.btn):hover {
    color: var(--ember);
  }

  .foot a:hover,
  .nav-social:hover {
    color: var(--ember);
  }
}

/* scroll reveals. the script adds .in, data-reveal says what happens */

/* rise: fade and lift, the default */
.js-reveal [data-reveal="rise"] {
  opacity: 0;
  transform: translateY(16px);
}

.js-reveal [data-reveal="rise"].in {
  opacity: 1;
  transform: none;
  transition:
    opacity var(--dur) var(--ease),
    transform var(--dur) var(--ease);
  transition-delay: calc(var(--i, 0) * 80ms);
}

/* slide: in from the left, for list rows */
.js-reveal [data-reveal="slide"] {
  opacity: 0;
  transform: translateX(-12px);
}

.js-reveal [data-reveal="slide"].in {
  opacity: 1;
  transform: none;
  transition:
    opacity 0.5s var(--ease),
    transform 0.5s var(--ease);
  transition-delay: calc(var(--i, 0) * 70ms);
}

/* grow: bars extend left to right, one after another */
.js-reveal [data-reveal="grow"] {
  transform: scaleX(0);
  transform-origin: left;
}

.js-reveal [data-reveal="grow"].in {
  transform: scaleX(1);
  transition: transform 0.6s var(--ease);
  transition-delay: calc(var(--i, 0) * 110ms);
}

/* line: the top rule draws left to right, then the text rises under it */
.js-reveal [data-reveal="line"]::before {
  transform: scaleX(0);
  transform-origin: left;
}

.js-reveal [data-reveal="line"].in::before {
  transform: scaleX(1);
  transition: transform 0.7s var(--ease);
  transition-delay: calc(var(--i, 0) * 180ms);
}

.js-reveal [data-reveal="line"] > * {
  opacity: 0;
  transform: translateY(12px);
}

.js-reveal [data-reveal="line"].in > * {
  opacity: 1;
  transform: none;
  transition:
    opacity 0.6s var(--ease),
    transform 0.6s var(--ease);
  transition-delay: calc(var(--i, 0) * 180ms + 250ms);
}

/* rule: a section divider draws itself as the section arrives */
.js-reveal [data-reveal="rule"]::before {
  transform: scaleX(0);
  transform-origin: left;
}

.js-reveal [data-reveal="rule"].in::before {
  transform: scaleX(1);
  transition: transform 0.9s var(--ease);
}

/* the red lap draws itself when the venue comes into view */
.js-reveal .venue-art.reveal .trace-hot {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  transition: stroke-dashoffset 1.8s var(--ease) 0.25s;
}

.js-reveal .venue-art.reveal.in .trace-hot {
  stroke-dashoffset: 0;
}

/* the partner band starts the same dark as the page and the light
   switches on underneath as it scrolls in. no fade or rise, a full
   width block sliding would leave a dark gap along its top */
.js-reveal .partner-band.reveal {
  opacity: 1;
  transform: none;
  background: var(--ink);
  transition: background 0.6s var(--ease);
}

.js-reveal .partner-band.reveal.in {
  background: var(--band);
}

/* photos wipe open from the bottom while the picture settles
   from a slight zoom, then the title rises into place */
.js-reveal .photo-grid.reveal {
  opacity: 1;
  transform: none;
}

.photo-grid .ph:nth-child(2) {
  --d: 1;
}

.photo-grid .ph:nth-child(3) {
  --d: 2;
}

.photo-grid .ph:nth-child(4) {
  --d: 3;
}

.js-reveal .photo-grid.reveal .ph {
  clip-path: inset(100% 0 0 0 round 3px);
  transition: clip-path 1.1s var(--ease);
  transition-delay: calc(var(--d, 0) * 140ms);
}

.js-reveal .photo-grid.reveal.in .ph {
  clip-path: inset(0 0 0 0 round 3px);
}

.js-reveal .photo-grid.reveal img {
  transform: scale(1.14);
  transition: transform 1.8s var(--ease);
  transition-delay: calc(var(--d, 0) * 140ms);
}

.js-reveal .photo-grid.reveal.in img {
  transform: none;
}

.js-reveal .photo-grid.reveal .ph-title {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity var(--dur) var(--ease),
    transform var(--dur) var(--ease);
  transition-delay: calc(var(--d, 0) * 140ms + 0.6s);
}

.js-reveal .photo-grid.reveal.in .ph-title {
  opacity: 1;
  transform: none;
}

/* the caption comes up after the wipe, label first then the heading,
   slow enough to be noticed */
.js-reveal .photo-grid.reveal .ph-title {
  opacity: 1;
  transform: none;
  transition: none;
}

.js-reveal .photo-grid.reveal .ph-title > * {
  opacity: 0;
  transform: translateY(26px);
}

.js-reveal .photo-grid.reveal.in .ph-title > * {
  opacity: 1;
  transform: none;
  transition:
    opacity 1.1s var(--ease),
    transform 1.1s var(--ease);
}

.js-reveal .photo-grid.reveal.in .ph-title .label {
  transition-delay: calc(var(--d, 0) * 140ms + 0.8s);
}

.js-reveal .photo-grid.reveal.in .ph-title .ph-h {
  transition-delay: calc(var(--d, 0) * 140ms + 1.05s);
}

/* while a photo is on screen it keeps drifting in slowly, tied
   to the scroll. Browsers without scroll timelines skip it. */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .ph img {
      animation: ph-drift linear both;
      animation-timeline: view();
      animation-range: cover 0% cover 100%;
    }

    @keyframes ph-drift {
      from {
        scale: 1;
      }
      to {
        scale: 1.1;
      }
    }
  }
}

@media (prefers-reduced-motion: no-preference) {
  /* in page links glide rather than jump; the padding keeps
     headings clear of the sticky nav */
  html {
    scroll-behavior: smooth;
    scroll-padding-top: 88px;
  }

  /* page to page transitions. The nav has its own name, so it
     stays still while the page cross fades underneath it */
  @view-transition {
    navigation: auto;
  }

  .nav {
    view-transition-name: site-nav;
  }

  ::view-transition-old(root),
  ::view-transition-new(root) {
    animation-duration: 0.35s;
    animation-timing-function: var(--ease);
  }
}

/* anyone who has asked their device for less motion gets none */
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    animation: none !important;
  }
}

/* race day countdown, same red as sponsor card */
.race {
  border: 1px solid rgba(255, 90, 74, 0.3);
  border-radius: 3px;
  background: linear-gradient(158deg, var(--ember-deep), #45060b 80%);
  padding: 24px 26px 22px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.race-top,
.race-foot {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.race-foot {
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
}

.race .label {
  color: rgba(255, 255, 255, 0.78);
}

.race-units {
  display: grid;
  grid-template-columns: auto repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.race-units > div {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* tubular so the digits don't shuffle every second */

.race-n {
  font-family: var(--display);
  font-size: clamp(32px, 3.1vw, 44px);
  line-height: 0.9;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

.race-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 8px;
  border-radius: 50%;
  background: #fff;
  animation: race-pulse 1.6s ease-in-out infinite;
}

@keyframes race-pulse {
  50% {
    opacity: 0.25;
  }
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}
