.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 120px 0 0;
  overflow: hidden;
  isolation: isolate;
}

.hero__media {
  position: absolute;
  inset: 0;
  z-index: -2;
}

.hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 62% 60%;
  transform: scale(1.15);
  filter: saturate(1.1) contrast(1.05);
}

.hero__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(5, 9, 22, 0.92) 0%, rgba(5, 9, 22, 0.55) 45%, rgba(5, 9, 22, 0.1) 75%),
    linear-gradient(0deg, var(--ink) 0%, rgba(5, 9, 22, 0) 45%),
    linear-gradient(180deg, rgba(5, 9, 22, 0.6) 0%, rgba(5, 9, 22, 0) 25%);
}

.hero__lanes {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.5;
}

.hero__lanes span {
  position: absolute;
  left: 0;
  right: 0;
  height: 1px;
  background: repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.28) 0 14px, transparent 14px 28px);
  animation: lane 6s linear infinite;
}

.hero__lanes span:nth-child(1) { top: 30%; animation-duration: 9s; }
.hero__lanes span:nth-child(2) { top: 52%; animation-duration: 6s; opacity: 0.5; }
.hero__lanes span:nth-child(3) { top: 74%; animation-duration: 12s; }

@keyframes lane {
  to {
    background-position: 280px 0;
  }
}

.hero__content {
  position: relative;
  padding-bottom: clamp(32px, 6vh, 72px);
}

.hero__title {
  margin: 22px 0 0;
  font-size: clamp(64px, min(11vw, 17.5vh), 200px);
}

.hero__title .line {
  display: block;
  overflow: hidden;
  padding: 0.14em 0.06em 0.02em 0;
  margin-top: -0.07em;
}

.hero__title .word {
  display: inline-flex;
  align-items: flex-start;
  gap: 0.12em;
}

.hero__title sup {
  font-family: var(--mono);
  font-style: normal;
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 0.1em;
  line-height: 1;
  margin-top: 1.4em;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid currentColor;
  white-space: nowrap;
}

.hero__title .line--swim .word { color: var(--white); }
.hero__title .line--swim sup { color: var(--swim); }
.hero__title .line--bike sup { color: #8fa0ff; }
.hero__title .line--run sup { color: var(--run); }

.hero__title .line--bike .word {
  color: transparent;
  -webkit-text-stroke: 2px rgba(255, 255, 255, 0.9);
}

.hero__smile {
  display: inline-flex;
  flex-direction: column;
  margin-top: 18px;
  font-size: clamp(26px, 3vw, 44px);
  font-weight: 800;
  font-style: italic;
  font-stretch: 85%;
  color: var(--white);
}

.hero__smile em {
  color: var(--red);
}

.hero__smile svg {
  width: 100%;
  height: 22px;
  margin-top: -4px;
  overflow: visible;
}

.hero__smile path {
  fill: none;
  stroke: var(--red);
  stroke-width: 5;
  stroke-linecap: round;
  stroke-dasharray: 400;
  stroke-dashoffset: 400;
}

.hero__row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  margin-top: 28px;
}

.hero__row .lead {
  margin: 0;
  max-width: 46ch;
}

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

.hero__foot {
  position: relative;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(5, 9, 22, 0) 0%, var(--ink) 100%);
}

.hero__stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr) auto;
  align-items: center;
}

.stat {
  padding: 22px 24px 22px 0;
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.stat + .stat {
  padding-left: 24px;
  border-left: 1px solid var(--line);
}

.stat b {
  font-size: clamp(34px, 3.4vw, 52px);
  font-weight: 900;
  font-style: italic;
  font-stretch: 70%;
  line-height: 1;
}

.stat span {
  font-size: 14px;
  line-height: 1.3;
  color: var(--text-muted);
}

.scroll-cue {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-left: 24px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.scroll-cue i {
  position: relative;
  width: 26px;
  height: 42px;
  border-radius: 999px;
  border: 1.5px solid rgba(255, 255, 255, 0.4);
}

.scroll-cue i::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 8px;
  width: 4px;
  height: 8px;
  margin-left: -2px;
  border-radius: 4px;
  background: var(--white);
  animation: cue 1.8s var(--ease) infinite;
}

@keyframes cue {
  0% { transform: translateY(0); opacity: 1; }
  80% { transform: translateY(16px); opacity: 0; }
  100% { opacity: 0; }
}

@media (max-width: 900px) {
  .hero__stats {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .stat:nth-child(n + 3) {
    border-top: 1px solid var(--line);
  }

  .scroll-cue {
    display: none;
  }

  .hero__title sup {
    display: none;
  }
}

@media (max-width: 560px) {
  .hero__media img {
    object-position: 70% 50%;
  }

  .hero__media::after {
    background:
      linear-gradient(0deg, var(--ink) 8%, rgba(5, 9, 22, 0.55) 60%, rgba(5, 9, 22, 0.75) 100%);
  }

  .hero__title {
    font-size: 21vw;
  }

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

  .stat {
    flex-direction: column;
    gap: 4px;
    padding: 16px 12px 16px 0;
  }

  .stat + .stat {
    padding-left: 14px;
  }
}
