.gateway-hero {
  --hero-glow: rgba(227, 77, 23, .3);
  align-items: center;
  background: #17080b;
}

.gateway-hero::before {
  content: "";
  position: absolute;
  z-index: 0;
  right: -8%;
  bottom: -32%;
  width: min(78vw, 1180px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, var(--hero-glow) 0%, transparent 68%);
  pointer-events: none;
}

.gateway-hero .home-hero__image {
  opacity: .22;
  filter: saturate(.7) contrast(1.1);
  transform: scale(1.035);
}

.gateway-hero .home-hero__content {
  z-index: 3;
  align-self: center;
  padding-bottom: 22px;
}

.gateway-hero .home-hero__kicker {
  color: var(--signal);
}

.gateway-helmet {
  --mx: 0px;
  --my: 0px;
  --helmet-art-scale: 1;
  --helmet-art-offset-y: 0px;
  position: absolute;
  z-index: 1;
  right: max(-28px, -1.6vw);
  bottom: clamp(-84px, -6vw, -34px);
  width: min(55vw, 820px);
  aspect-ratio: 1;
  margin: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
  perspective: 1200px;
  transform: translate3d(var(--mx), var(--my), 0);
  transition: transform .22s ease-out;
}

.gateway-helmet .gateway-helmet__video,
.gateway-helmet .gateway-helmet__fallback {
  position: relative;
  z-index: 1;
  max-width: none;
  filter: drop-shadow(0 44px 54px rgba(0, 0, 0, .5));
}

.gateway-helmet .gateway-helmet__video {
  display: block;
  width: 170%;
  height: auto;
}

.gateway-helmet .gateway-helmet__fallback {
  display: none;
  top: var(--helmet-art-offset-y);
  width: calc(100% * var(--helmet-art-scale));
  height: calc(100% * var(--helmet-art-scale));
  object-fit: contain;
  object-position: center;
  transform-origin: 54% 54%;
  animation: gateway-helmet-arrive 2.2s cubic-bezier(.18, .76, .24, 1) both;
  will-change: transform, opacity;
}

.gateway-helmet.fallback-active .gateway-helmet__video {
  display: none;
}

.gateway-helmet.fallback-active .gateway-helmet__fallback {
  display: block;
}

.gateway-helmet--motion {
  right: max(-28px, -1.6vw);
  bottom: clamp(-84px, -6vw, -34px);
  width: min(55vw, 820px);
}

@keyframes gateway-helmet-arrive {
  0% {
    opacity: .82;
    transform: translate3d(7%, 0, 0) rotateY(-6deg) scale(.955);
  }
  58% {
    opacity: 1;
    transform: translate3d(1.4%, 0, 0) rotateY(-1.25deg) scale(.993);
  }
  100% {
    opacity: 1;
    transform: translate3d(0, 0, 0) rotateY(0) scale(1);
  }
}

.gateway-helmet-label {
  position: absolute;
  z-index: 4;
  right: 30px;
  bottom: 32px;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 12px;
  max-width: min(520px, calc(100% - 60px));
  padding: 13px 17px;
  color: var(--white);
  background: rgba(18, 7, 10, .84);
  border-left: 3px solid var(--signal);
  backdrop-filter: blur(12px);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .1em;
  line-height: 1.35;
  text-transform: uppercase;
}

.gateway-helmet-label::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--signal);
  box-shadow: 0 0 0 5px rgba(199, 227, 75, .16);
}

.ride-door--dirt .gateway-hero {
  --hero-glow: rgba(242, 65, 19, .34);
  background: #27070a;
}

.ride-door--dirt .gateway-helmet {
  --helmet-art-scale: 1.17;
  bottom: clamp(-58px, -3.8vw, -28px);
}

.ride-door--dirt .gateway-hero .home-hero__overlay {
  background:
    linear-gradient(90deg, rgba(18, 5, 8, .98) 0%, rgba(22, 5, 8, .93) 34%, rgba(68, 8, 8, .62) 58%, rgba(68, 8, 8, .18) 100%),
    linear-gradient(0deg, rgba(13, 7, 9, .62), transparent 55%);
}

.ride-door--street .gateway-hero {
  --hero-glow: rgba(39, 92, 175, .3);
  background: #071119;
}

.ride-door--street .gateway-helmet {
  --helmet-art-scale: 1.06;
  --helmet-art-offset-y: clamp(52px, 4.6vw, 70px);
  right: max(32px, 2.7vw);
  bottom: clamp(-58px, -3.8vw, -28px);
}

.ride-door--street .gateway-helmet .gateway-helmet__video {
  width: 150%;
}

@media (min-width: 641px) {
  .ride-door--street .gateway-helmet .gateway-helmet__video {
    -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 7%, #000 100%);
    mask-image: linear-gradient(to bottom, transparent 0, #000 7%, #000 100%);
  }
}

.ride-door--street .gateway-hero .home-hero__overlay {
  background:
    linear-gradient(90deg, rgba(7, 12, 18, .98) 0%, rgba(7, 12, 18, .92) 36%, rgba(9, 24, 42, .58) 61%, rgba(9, 24, 42, .22) 100%),
    linear-gradient(0deg, rgba(8, 9, 13, .64), transparent 58%);
}

.ride-door--racing .gateway-hero {
  --hero-glow: rgba(142, 20, 31, .24);
  background: #070508;
}

.ride-door--racing .gateway-hero .home-hero__image {
  opacity: .1;
  filter: saturate(.42) contrast(1.18) brightness(.52);
}

.ride-door--racing .gateway-helmet {
  --helmet-art-scale: .92;
  right: clamp(24px, 3vw, 46px);
}

.ride-door--racing .gateway-helmet .gateway-helmet__video {
  width: 170%;
  transition: opacity .2s ease-out;
  filter:
    drop-shadow(0 44px 54px rgba(0, 0, 0, .62))
    drop-shadow(0 0 20px rgba(180, 34, 40, .14));
}

.ride-door--racing .gateway-helmet .gateway-helmet__fallback {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 170%;
  height: auto;
  display: block;
  margin: 0;
  opacity: 0;
  visibility: hidden;
  animation: none;
  transform: translate(-50%, -50%);
  transition: opacity .2s ease-out, visibility 0s linear .2s;
}

.ride-door--racing .gateway-helmet.fallback-active .gateway-helmet__fallback {
  opacity: 1;
  visibility: visible;
  transition-delay: 0s;
}

.ride-door--racing .gateway-hero .home-hero__overlay {
  background:
    radial-gradient(circle at 73% 48%, rgba(142, 20, 31, .24) 0%, rgba(61, 7, 15, .15) 32%, transparent 60%),
    linear-gradient(90deg, rgba(6, 4, 6, .99) 0%, rgba(8, 4, 7, .96) 38%, rgba(24, 5, 10, .79) 68%, rgba(8, 4, 7, .7) 100%),
    linear-gradient(0deg, rgba(5, 5, 7, .78), transparent 54%);
}

@media (max-width: 1100px) {
  .gateway-hero .home-hero__content {
    max-width: 94%;
  }

  .gateway-helmet--motion {
    right: -12%;
    width: 68vw;
  }

  .ride-door--street .gateway-helmet {
    right: -7%;
  }
}

@media (max-width: 860px) {
  .gateway-hero {
    min-height: 640px;
    height: 76svh;
    max-height: 680px;
    align-items: start;
    padding-top: 88px;
    padding-bottom: 24px;
  }

  .gateway-hero::before {
    right: -45%;
    bottom: -17%;
    width: 130vw;
  }

  .gateway-hero .home-hero__content {
    align-self: start;
    width: 100%;
    max-width: none;
    padding-top: 14px;
    padding-bottom: 0;
  }

  .gateway-hero .home-hero__image {
    opacity: .17;
  }

  .gateway-hero .home-hero__overlay,
  .ride-door--dirt .gateway-hero .home-hero__overlay,
  .ride-door--street .gateway-hero .home-hero__overlay {
    background:
      linear-gradient(180deg, rgba(11, 7, 10, .98) 0%, rgba(11, 7, 10, .91) 48%, rgba(11, 7, 10, .42) 74%, rgba(11, 7, 10, .7) 100%),
      linear-gradient(90deg, rgba(11, 7, 10, .92), rgba(11, 7, 10, .18));
  }

  .ride-door--racing .gateway-hero .home-hero__overlay {
    background:
      radial-gradient(circle at 66% 43%, rgba(151, 22, 32, .26) 0%, rgba(54, 6, 13, .15) 34%, transparent 62%),
      linear-gradient(180deg, rgba(6, 4, 6, .99) 0%, rgba(8, 4, 7, .94) 45%, rgba(13, 5, 8, .52) 72%, rgba(7, 4, 6, .82) 100%),
      linear-gradient(90deg, rgba(6, 4, 6, .96), rgba(12, 4, 7, .25));
  }

  .gateway-hero .home-hero__kicker {
    margin-bottom: 14px;
  }

  .gateway-hero .home-hero__actions {
    margin-top: 22px;
  }

  .gateway-hero .home-hero__actions .btn-secondary {
    display: none;
  }

  .gateway-helmet,
  .ride-door--dirt .gateway-helmet,
  .ride-door--street .gateway-helmet,
  .ride-door--racing .gateway-helmet {
    right: -16%;
    bottom: -10%;
    width: min(82vw, 650px);
    height: auto;
    opacity: .92;
  }

  .gateway-helmet-label {
    display: none;
  }

  .ride-door--dirt .gateway-helmet {
    bottom: -6%;
  }

  .ride-door--street .gateway-helmet {
    right: -8%;
    bottom: -6%;
  }
}

@media (max-width: 640px) {
  .gateway-hero {
    min-height: 620px;
    height: 76svh;
    max-height: 660px;
    padding-top: 88px;
    padding-bottom: 0;
  }

  .gateway-hero .home-hero__content {
    position: absolute;
    inset: 88px 0 0;
    width: min(calc(100% - 32px), var(--max));
    height: calc(100% - 88px);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-end;
    padding: 10px 0 16px;
  }

  .gateway-hero .home-hero__kicker {
    max-width: 28ch;
    font-size: 10px;
  }

  .gateway-hero h1 {
    max-width: 7ch;
    font-size: clamp(3.65rem, 17vw, 4.15rem);
  }

  .gateway-hero .home-hero__actions {
    display: block;
    z-index: 4;
    width: 100%;
    margin-top: 20px;
  }

  .gateway-hero .home-hero__actions .btn {
    width: 100%;
    min-height: 52px;
  }

  .gateway-helmet,
  .ride-door--dirt .gateway-helmet,
  .ride-door--street .gateway-helmet,
  .ride-door--racing .gateway-helmet {
    right: -18%;
    bottom: 0;
    width: 96vw;
    height: auto;
  }

  .ride-door--street .gateway-helmet {
    --helmet-art-scale: 1;
    --helmet-art-offset-y: 58px;
    right: -10%;
    bottom: 26%;
  }

  .ride-door--dirt .gateway-helmet {
    --helmet-art-scale: 1;
    right: -14%;
    bottom: 28%;
  }

  .ride-door--racing .gateway-helmet {
    --helmet-art-scale: .92;
    right: -4%;
    bottom: 26%;
  }
}

@media (max-height: 560px) and (orientation: landscape) {
  .gateway-hero {
    min-height: 560px;
    height: auto;
    max-height: none;
  }

  .gateway-helmet {
    right: max(-28px, -1.6vw);
    bottom: clamp(-84px, -6vw, -34px);
    width: min(55vw, 820px);
    height: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .gateway-hero .home-hero__image {
    transform: none;
  }

  .gateway-helmet {
    transform: none !important;
    transition: none;
  }

  .gateway-helmet .gateway-helmet__fallback {
    animation: none;
  }

  .gateway-helmet .gateway-helmet__video {
    display: none;
  }

  .gateway-helmet .gateway-helmet__fallback {
    display: block;
  }
}
