:root {
  --cute-gold: #d8ad64;
  --cute-pink: #e9a4b3;
  --cute-cyan: #8edbd8;
  --cute-ink: #050405;
}

.cute-nightmare {
  position: relative;
  min-height: clamp(780px, 70vw, 1240px);
  overflow: hidden;
  background: var(--cute-ink);
  border-block: 1px solid rgba(216, 173, 100, .24);
  isolation: isolate;
  perspective: 1800px;
}

.cute-worldboards,
.cute-worldboard,
.cute-worldboard img {
  position: absolute;
  inset: 0;
}

.cute-worldboards {
  z-index: 0;
  overflow: hidden;
  background: #000;
  perspective: 1500px;
}

.cute-worldboard {
  margin: 0;
  opacity: 0;
  transform: translate3d(104%, 0, 0) rotateY(-12deg);
  transform-origin: left center;
  transition:
    transform 1450ms cubic-bezier(.62, 0, .18, 1),
    opacity 620ms ease;
  will-change: transform, opacity;
}

.cute-worldboard::after {
  content: "";
  position: absolute;
  top: 0;
  right: -18px;
  bottom: 0;
  width: 36px;
  background: linear-gradient(90deg, rgba(0, 0, 0, .72), rgba(255, 235, 214, .42), rgba(0, 0, 0, .72));
  box-shadow: 0 0 34px rgba(0, 0, 0, .68);
}

.cute-worldboard img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  object-position: center;
  filter: none;
}

.cute-worldboard.is-active {
  z-index: 2;
  opacity: 1;
  transform: translate3d(0, 0, 0) rotateY(0deg);
}

.cute-worldboard.is-leaving {
  z-index: 3;
  opacity: .18;
  transform: translate3d(-104%, 0, 0) rotateY(12deg);
  transform-origin: right center;
}

.cute-video-theatre {
  position: absolute;
  z-index: 7;
  top: 58%;
  left: 50%;
  width: min(70vw, 1180px);
  aspect-ratio: 16 / 9;
  transform: translate(-50%, -50%);
  filter: drop-shadow(0 30px 36px rgba(0, 0, 0, .72));
}

.cute-video-reel {
  position: absolute;
  z-index: 2;
  inset: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 242, 209, .86);
  border-radius: 3px;
  background: #000;
  box-shadow:
    0 0 0 5px rgba(4, 4, 5, .88),
    0 0 0 6px rgba(216, 173, 100, .72),
    inset 0 0 38px rgba(0, 0, 0, .7),
    0 0 32px rgba(142, 219, 216, .2);
}

.cute-video-reel::before,
.cute-video-reel::after {
  content: "";
  position: absolute;
  z-index: 5;
  inset: 0;
  pointer-events: none;
}

.cute-video-reel::before {
  background: linear-gradient(120deg, rgba(255, 255, 255, .16), transparent 18% 76%, rgba(142, 219, 216, .08));
  mix-blend-mode: screen;
}

.cute-video-reel::after {
  box-shadow: inset 0 0 42px rgba(0, 0, 0, .54);
}

.cute-video-panel {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  transform: translate3d(105%, 0, 0) rotateY(-11deg);
  transform-origin: left center;
  transition:
    transform 1050ms cubic-bezier(.62, 0, .18, 1),
    opacity 520ms ease;
  will-change: transform, opacity;
}

.cute-video-panel video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  background: #000;
  filter: none;
}

.cute-video-panel.is-active {
  z-index: 2;
  opacity: 1;
  transform: translate3d(0, 0, 0) rotateY(0deg);
}

.cute-video-panel.is-leaving {
  z-index: 3;
  opacity: .12;
  transform: translate3d(-105%, 0, 0) rotateY(11deg);
  transform-origin: right center;
}

.cute-nightmare-frame {
  position: absolute;
  z-index: 8;
  inset: -8.5% -7.5%;
  width: 115%;
  height: 117%;
  display: block;
  object-fit: fill;
  pointer-events: none;
  filter:
    drop-shadow(-10px 12px 18px rgba(233, 164, 179, .2))
    drop-shadow(10px 12px 22px rgba(0, 0, 0, .9))
    drop-shadow(0 0 12px rgba(216, 173, 100, .34));
  animation: cute-frame-breathe 5.8s ease-in-out infinite alternate;
  will-change: filter;
}

.cute-reel-index {
  position: absolute;
  z-index: 10;
  right: 0;
  bottom: -54px;
  color: rgba(255, 238, 205, .78);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .18em;
  text-shadow: 0 2px 8px #000;
}

.cute-video-theatre:hover .cute-nightmare-frame {
  filter:
    drop-shadow(-12px 14px 24px rgba(248, 184, 204, .32))
    drop-shadow(12px 14px 28px rgba(0, 0, 0, .95))
    drop-shadow(0 0 20px rgba(231, 189, 107, .52));
}

@keyframes cute-frame-breathe {
  0% {
    filter:
      drop-shadow(-8px 10px 16px rgba(233, 164, 179, .17))
      drop-shadow(9px 11px 20px rgba(0, 0, 0, .88))
      drop-shadow(0 0 9px rgba(216, 173, 100, .28));
  }
  100% {
    filter:
      drop-shadow(-12px 14px 23px rgba(233, 164, 179, .27))
      drop-shadow(12px 15px 27px rgba(0, 0, 0, .95))
      drop-shadow(0 0 18px rgba(216, 173, 100, .44));
  }
}

@media (max-width: 820px) {
  .cute-nightmare {
    min-height: 720px;
  }

  .cute-video-theatre {
    top: 58%;
    width: min(94vw, 720px);
  }

  .cute-nightmare-frame {
    inset: -7% -6%;
    width: 112%;
    height: 114%;
  }

  .cute-reel-index {
    bottom: -38px;
  }
}

@media (max-width: 520px) {
  .cute-nightmare {
    min-height: 520px;
  }

  .cute-video-theatre {
    top: 58%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cute-nightmare *,
  .cute-nightmare *::before,
  .cute-nightmare *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}
