:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #05070a;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 20%, rgba(0, 218, 255, 0.12), transparent 36rem),
    #05070a;
}

body {
  min-height: 100svh;
}

.stage {
  display: grid;
  width: 100%;
  min-height: 100svh;
  place-items: center;
}

.reveal {
  position: relative;
  width: min(100vw, calc(100svh * 9 / 16));
  height: min(100svh, calc(100vw * 16 / 9));
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  color: inherit;
  background: transparent;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.reveal:focus-visible {
  outline: 3px solid #00d7f2;
  outline-offset: -5px;
}

.poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  user-select: none;
  pointer-events: none;
  -webkit-user-drag: none;
  transition:
    opacity 420ms cubic-bezier(0.22, 1, 0.36, 1),
    transform 620ms cubic-bezier(0.22, 1, 0.36, 1),
    filter 420ms ease;
}

.poster--locked {
  z-index: 2;
  opacity: 1;
  transform: scale(1);
}

.poster--reveal {
  z-index: 1;
  opacity: 0;
  transform: scale(1.035);
  filter: blur(10px);
}

.flash {
  position: absolute;
  z-index: 3;
  inset: 0;
  opacity: 0;
  background: #00d7f2;
  mix-blend-mode: screen;
  pointer-events: none;
}

.cta {
  position: absolute;
  z-index: 4;
  left: 50%;
  bottom: clamp(1.25rem, 2.7%, 2.25rem);
  display: inline-flex;
  min-width: min(78%, 21rem);
  min-height: 3.25rem;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  padding: 0.85rem 1.35rem;
  border: 2px solid #00d7f2;
  border-radius: 999px;
  color: #fff;
  background: #05070a;
  box-shadow:
    0 0 0 4px rgba(255, 255, 255, 0.78),
    0 0 28px rgba(0, 215, 242, 0.82);
  font-size: clamp(1rem, 4.2vw, 1.2rem);
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0.035em;
  white-space: nowrap;
  transform: translateX(-50%);
  transition:
    opacity 220ms ease,
    transform 220ms ease;
  animation: cta-pulse 1.8s ease-in-out infinite;
  pointer-events: none;
}

.cta__lock {
  position: relative;
  width: 0.9em;
  height: 0.72em;
  border: 2px solid #00d7f2;
  border-radius: 0.15em;
}

.cta__lock::before {
  position: absolute;
  left: 50%;
  bottom: calc(100% - 1px);
  width: 0.52em;
  height: 0.45em;
  border: 2px solid #00d7f2;
  border-bottom: 0;
  border-radius: 0.4em 0.4em 0 0;
  content: "";
  transform: translateX(-50%);
}

.reveal.is-unlocking .poster--locked {
  filter: blur(12px) saturate(1.2);
  transform: scale(1.045);
}

.reveal.is-unlocking .flash {
  animation: flash 520ms ease-out both;
}

.reveal.is-unlocking .cta,
.reveal.is-revealed .cta {
  opacity: 0;
  transform: translate(-50%, 0.75rem) scale(0.96);
  animation: none;
}

.reveal.is-revealed {
  cursor: default;
}

.reveal.is-revealed .poster--locked {
  opacity: 0;
  transform: scale(1.08);
}

.reveal.is-revealed .poster--reveal {
  opacity: 1;
  transform: scale(1);
  filter: blur(0);
}

@keyframes flash {
  0% { opacity: 0; }
  38% { opacity: 0.48; }
  100% { opacity: 0; }
}

@keyframes cta-pulse {
  0%, 100% {
    box-shadow:
      0 0 0 4px rgba(255, 255, 255, 0.78),
      0 0 20px rgba(0, 215, 242, 0.58);
  }
  50% {
    box-shadow:
      0 0 0 5px rgba(255, 255, 255, 0.9),
      0 0 38px rgba(0, 215, 242, 0.95);
  }
}

noscript {
  position: fixed;
  z-index: 5;
  inset: auto 1rem 1rem;
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  color: #fff;
  background: #111820;
  text-align: center;
}

@media (min-width: 700px) {
  .reveal {
    box-shadow: 0 0 80px rgba(0, 215, 242, 0.12);
  }
}

@media (prefers-reduced-motion: reduce) {
  .poster {
    transition-duration: 1ms;
  }

  .reveal.is-unlocking .flash {
    animation: none;
  }

  .cta {
    animation: none;
  }
}
