.hero__spectrum {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  background: var(--hero-spectrum-black);
}

.hero__spectrum-media {
  position: absolute;
  left: 50%;
  top: 0;
  width: var(--hero-display-w);
  aspect-ratio: var(--hero-aspect);
  transform: translateX(-50%);
  background: var(--hero-spectrum-black);
  isolation: isolate;
}

.hero__spectrum-media::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background: linear-gradient(
    90deg,
    var(--hero-spectrum-black) 0%,
    rgba(0, 0, 0, 0.92) 28%,
    rgba(0, 0, 0, 0.45) 48%,
    transparent 68%
  );
}

.hero__spectrum::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 30%;
  z-index: 5;
  pointer-events: none;
  background: linear-gradient(
    0deg,
    var(--hero-spectrum-black) 0%,
    var(--hero-spectrum-black) 38%,
    rgba(0, 0, 0, 0.92) 58%,
    rgba(0, 0, 0, 0.45) 78%,
    transparent 100%
  );
}

.hero__spectrum-video {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: fill;
  mix-blend-mode: screen;
  filter: brightness(var(--hero-video-brightness)) saturate(var(--hero-video-saturate))
    contrast(var(--hero-video-contrast));
  opacity: 0;
  transition: opacity 520ms var(--ease-out);
  pointer-events: none;
  -webkit-user-drag: none;
  user-select: none;
}

.hero__spectrum.is-video-ready .hero__spectrum-video {
  opacity: 1;
}

.hero__spectrum-tint {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: var(--hero-video-tint);
  mix-blend-mode: hue;
  opacity: var(--hero-video-tint-hue-opacity);
}

.hero__spectrum-tint::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--hero-video-tint-rich);
  mix-blend-mode: color;
  opacity: var(--hero-video-tint-color-opacity);
}

@media (max-width: 639px) {
  .hero__spectrum-media {
    inset: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 100%;
    aspect-ratio: unset;
    transform: none;
  }

  .hero__spectrum-video {
    object-fit: cover;
    object-position: center 40%;
    width: 118%;
    height: 118%;
    left: 50%;
    top: 46%;
    transform: translate(-50%, -50%);
  }

  .hero__spectrum-media::before {
    background: linear-gradient(
      0deg,
      var(--hero-spectrum-black) 0%,
      rgba(0, 0, 0, 0.9) 20%,
      rgba(0, 0, 0, 0.55) 40%,
      rgba(0, 0, 0, 0.18) 58%,
      transparent 76%
    );
  }

  .hero__spectrum::after {
    height: 100%;
    background: linear-gradient(
      0deg,
      var(--hero-spectrum-black) 0%,
      rgba(0, 0, 0, 0.94) 14%,
      rgba(0, 0, 0, 0.72) 28%,
      rgba(0, 0, 0, 0.42) 44%,
      rgba(0, 0, 0, 0.14) 58%,
      transparent 76%
    );
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero__spectrum-video {
    display: none;
  }
}
