.hero {
  --hero-curve: calc(100vw * 360 / 1728);
  --hero-curve-lift: clamp(120px, 10vw, 180px);
  position: relative;
  overflow: hidden;
  min-height: min(
    calc(max(820px, 68vw) + 48px - var(--hero-curve-lift)),
    calc(clamp(108px, 11vw, 190px) + 48px + 700px + var(--hero-curve) - var(--hero-curve-lift))
  );
  background: var(--color-blue);
  padding: var(--header-offset) var(--content-inset) calc(var(--hero-curve) - var(--hero-curve-lift));
}

.hero__stage {
  position: absolute;
  z-index: 1;
  top: calc(clamp(108px, 11vw, 190px) + 48px);
  right: 0;
  bottom: calc(var(--hero-curve) - var(--hero-curve-lift));
  left: calc(var(--content-inset) - 16vw);
  overflow: hidden;
}

.hero__track {
  display: flex;
  gap: clamp(16px, 2.7vw, 47px);
  align-items: flex-end;
  width: max-content;
  height: 100%;
  animation: hero-scroll 36s linear infinite;
  will-change: transform;
}

.hero__slide {
  position: relative;
  flex: none;
  width: auto;
  height: 100%;
  max-height: 700px;
  aspect-ratio: 9 / 16;
  overflow: hidden;
  border-radius: 12px;
  background: #0d1c4a;
}

.hero__still,
.hero__video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero__video {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.45s linear;
}

.hero__video.is-ready {
  opacity: 1;
}

.hero__veil {
  display: none;
}

.hero::before {
  content: "";
  position: absolute;
  z-index: 2;
  top: 0;
  bottom: calc(var(--hero-curve) - var(--hero-curve-lift));
  left: calc(var(--content-inset) - 40vw);
  width: calc(640px + 40vw + 28rem);
  background: linear-gradient(
    90deg,
    #223b86 0,
    #223b86 calc(100% - 28rem),
    rgba(34, 59, 134, 0.78) calc(100% - 18rem),
    rgba(34, 59, 134, 0.38) calc(100% - 10rem),
    rgba(34, 59, 134, 0.08) calc(100% - 4rem),
    rgba(34, 59, 134, 0) 100%
  );
  pointer-events: none;
}

.hero__content {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: clamp(18px, 2.4vw, 40px);
  max-width: 640px;
  padding-top: calc(clamp(28px, 5vw, 96px) + 48px);
}

.hero__title {
  color: var(--color-white);
  font-size: clamp(52px, 6.35vw, 110px);
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 0.96;
  text-transform: uppercase;
}

.hero__title-line {
  display: block;
  white-space: nowrap;
}

.hero__lead {
  font-size: clamp(28px, 3vw, 52px);
  font-weight: 300;
  line-height: 1.1;
}

.hero__curve {
  position: absolute;
  z-index: 0;
  right: 0;
  bottom: -1px;
  left: 0;
  width: 100%;
  height: var(--hero-curve);
  pointer-events: none;
}

@keyframes hero-scroll {
  from {
    transform: translate3d(0, 0, 0);
  }

  to {
    transform: translate3d(calc(var(--hero-shift, 50%) * -1), 0, 0);
  }
}

@media (max-width: 1024px) {
  .hero {
    display: flex;
    flex-direction: column;
    min-height: 0;
    padding-bottom: 160px;
  }

  .hero__content {
    order: 1;
    max-width: none;
    gap: 32px;
    padding-top: 40px;
  }

  .hero__stage {
    order: 2;
    position: relative;
    inset: auto;
    z-index: 1;
    width: 100vw;
    height: clamp(260px, 58vw, 420px);
    margin: 72px 0 40px calc(50% - 50vw);
  }

  .hero__veil,
  .hero::before {
    display: none;
  }

  .hero__curve {
    order: 3;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero__track {
    animation: none;
  }
}
