.hero {
  --hero-video-top: clamp(0px, calc(50svh - 320px), 85px);
  --hero-video-height: max(56.25vw, clamp(218px, calc(60svh - 150px), 410px));
  --hero-video-bottom: calc(var(--hero-video-top) + var(--hero-video-height));
  --hero-video-fade: linear-gradient(180deg,
    #0B1215 var(--hero-video-top),
    rgba(11, 18, 21, .1) calc(var(--hero-video-top) + var(--hero-video-height) * .16),
    rgba(11, 18, 21, .1) calc(var(--hero-video-bottom) - 20px),
    #0B1215 var(--hero-video-bottom));
}

.hero-bg {
  inset: var(--hero-video-top) 0 auto;
  height: var(--hero-video-height);
  object-position: max(100%, calc(50% - var(--hero-video-height) * .267)) center;
}

.hero-shade {
  background: var(--hero-video-fade);
}

@media (max-width: 420px) and (max-height: 740px) {
  .hero {
    --hero-video-top: 88px;
    --hero-video-height: clamp(155px, 48vw, 200px);
    --hero-video-left: calc(100% - var(--hero-video-height) * 1.43 - 5px);
  }

  .hero-bg {
    inset-inline: var(--hero-video-left) auto;
    width: calc(var(--hero-video-height) * 16 / 9);
    object-position: center;
  }

  .hero-shade {
    background: linear-gradient(90deg,
      #0B1215 var(--hero-video-left),
      transparent calc(var(--hero-video-left) + var(--hero-video-height) * .65)),
      var(--hero-video-fade);
  }
}

@media (max-width: 365px) and (max-height: 740px) {
  .hero {
    --hero-video-top: 36px;
  }
}
