/* Scene hosts: a still poster with the live scene fading in on top of it once its first frame is drawn. */
.scene-host {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.scene-poster,
.scene-poster img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}

.scene-poster img {
  object-fit: cover;
  object-position: center;
}

.scene-host > iframe {
  position: relative;
  z-index: 1;
  opacity: 0;
  transition: opacity 600ms ease;
}

.scene-host.is-live > iframe { opacity: 1; }
.scene-host.is-live > .scene-poster { visibility: hidden; transition: visibility 0s 650ms; }

/* A thin gold line along the bottom while a scene that is already on screen is still getting ready. */
.scene-host::after {
  content: "";
  position: absolute;
  z-index: 2;
  left: 0;
  bottom: 0;
  width: 34%;
  height: 2px;
  background: linear-gradient(90deg, transparent, #e9bc64, transparent);
  opacity: 0;
  pointer-events: none;
}

.scene-host.is-loading::after {
  opacity: .9;
  animation: scene-loading 1.5s ease-in-out 500ms infinite backwards;
}

@keyframes scene-loading {
  from { transform: translateX(-100%); }
  to { transform: translateX(295%); }
}

@media (prefers-reduced-motion: reduce) {
  .scene-host > iframe { transition: none; }
  .scene-host.is-loading::after { animation: none; width: 100%; opacity: .5; }
}
