.ambient {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.ambient .ambient-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  pointer-events: none;
}

.ambient::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 1) 0%,
    rgba(255, 255, 255, 0) 100%
  );
}

.feature-screen {
  transition: filter 0.25s ease;
}

[data-theme="dark"] .feature-screen {
  filter: invert(1) hue-rotate(180deg);
}

[data-theme="dark"] .no-dark-filter {
  filter: none !important;
}

[data-theme="dark"] .ambient::before {
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 1) 0%,
    rgba(0, 0, 0, 0) 100%
  );
}

.ambient .ambient-video--dark {
  display: none;
}
[data-theme="dark"] .ambient .ambient-video--light {
  display: none;
}
[data-theme="dark"] .ambient .ambient-video--dark {
  display: block;
}

.ambient > *:not(video) {
  position: relative;
  z-index: 2;
}

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