:root {
  --ink: #07140c;
  --lime: #b6e600;
  --fade: 1100ms;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  height: 100%;
}

body {
  background: var(--ink);
  overflow: hidden;
  font-family: "Segoe UI", sans-serif;
}

.stage {
  position: relative;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  display: grid;
  place-items: center;
  background:
    radial-gradient(ellipse at 18% 80%, rgba(182, 230, 0, 0.14), transparent 42%),
    radial-gradient(ellipse at 82% 12%, rgba(0, 196, 255, 0.1), transparent 38%),
    #07140c;
}

.stage__glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='.045'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}

.viewport {
  position: relative;
  width: min(100vw, calc(100vh * 16 / 9));
  height: min(100vh, calc(100vw * 9 / 16));
  width: min(100vw, calc(100dvh * 16 / 9));
  height: min(100dvh, calc(100vw * 9 / 16));
  overflow: hidden;
  background: #050a07;
}

.brand {
  position: absolute;
  top: clamp(12px, 2.2vw, 28px);
  left: clamp(12px, 2.2vw, 28px);
  z-index: 20;
  display: block;
  line-height: 0;
}

.brand img {
  display: block;
  height: clamp(28px, 4.2vw, 44px);
  width: auto;
  max-width: min(38vw, 260px);
  object-fit: contain;
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.35));
}

.deck {
  position: relative;
  width: 100%;
  height: 100%;
}

.slide {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  z-index: 1;
  transform: translateX(8%);
  transition: none;
  pointer-events: none;
}

.slide.is-active {
  opacity: 1;
  z-index: 3;
  transform: translateX(0);
  transition:
    opacity var(--fade) ease,
    transform var(--fade) cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: auto;
}

.slide.is-leaving {
  opacity: 0;
  z-index: 2;
  transform: translateX(-8%);
  transition:
    opacity var(--fade) ease,
    transform var(--fade) cubic-bezier(0.22, 1, 0.36, 1);
}

.slide.is-prepare {
  opacity: 0;
  z-index: 3;
  transform: translateX(8%);
  transition: none;
}

.slide img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  background: #050a07;
  user-select: none;
  pointer-events: none;
}

.slide__wash {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(7, 20, 12, 0.22) 0%, rgba(7, 20, 12, 0.04) 28%, rgba(7, 20, 12, 0.04) 72%, rgba(7, 20, 12, 0.38) 100%),
    linear-gradient(90deg, rgba(7, 20, 12, 0.18), transparent 18%, transparent 82%, rgba(7, 20, 12, 0.18));
  mix-blend-mode: multiply;
}

.film {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  background:
    radial-gradient(ellipse at center, transparent 42%, rgba(5, 10, 7, 0.45) 100%),
    linear-gradient(180deg, rgba(182, 230, 0, 0.08), transparent 18%, transparent 82%, rgba(0, 0, 0, 0.28));
  box-shadow: inset 0 0 80px rgba(0, 0, 0, 0.35);
}

.controls {
  position: absolute;
  bottom: max(18px, env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  z-index: 10;
}

.dot {
  width: 44px;
  height: 44px;
  border: 0;
  background: transparent;
  cursor: pointer;
  display: grid;
  place-items: center;
}

.dot::after {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.38);
  transition: background-color 200ms ease, width 200ms ease;
}

.dot.is-active::after {
  width: 22px;
  background: var(--lime);
}

.dot:focus-visible {
  outline: 2px solid var(--lime);
  outline-offset: 2px;
  border-radius: 8px;
}

@media (prefers-reduced-motion: reduce) {
  .slide.is-active,
  .slide.is-leaving {
    transition-duration: 1ms;
  }
}
