:root {
  color-scheme: dark;
  --bg: #101014;
  --bg-soft: #17171d;
  --panel: rgba(255, 255, 255, 0.08);
  --panel-strong: rgba(255, 255, 255, 0.13);
  --text: #f7f2ea;
  --muted: #bdb6aa;
  --gold: #e8be61;
  --rose: #ff7a90;
  --mint: #60d6b1;
  --ink: #121216;
  --border: rgba(255, 255, 255, 0.18);
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 20% 10%, rgba(232, 190, 97, 0.16), transparent 36rem),
    radial-gradient(circle at 80% 20%, rgba(96, 214, 177, 0.12), transparent 34rem),
    linear-gradient(135deg, #101014 0%, #171419 42%, #131821 100%);
}

button,
input,
textarea,
select {
  font: inherit;
}

.ambient {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  opacity: 0.9;
}

.ambient::before {
  position: absolute;
  inset: -30%;
  content: "";
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(circle at center, black 0%, transparent 68%);
  animation: grid-drift 18s linear infinite;
}

.ambient__beam {
  position: absolute;
  width: 40vw;
  height: 130vh;
  top: -15vh;
  border-radius: 999px;
  filter: blur(50px);
  opacity: 0.22;
  transform: rotate(24deg);
  animation: beam 12s ease-in-out infinite alternate;
}

.ambient__beam--one {
  left: -12vw;
  background: var(--gold);
}

.ambient__beam--two {
  right: -14vw;
  background: var(--mint);
  animation-delay: -4s;
}

.ambient__beam--three {
  left: 34vw;
  background: var(--rose);
  opacity: 0.12;
  animation-delay: -8s;
}

.particle {
  position: absolute;
  display: block;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 0 22px rgba(232, 190, 97, 0.8);
  animation: float 8s ease-in-out infinite;
}

.particle--one {
  top: 20%;
  left: 18%;
}

.particle--two {
  top: 70%;
  right: 18%;
  animation-delay: -3s;
}

.particle--three {
  bottom: 18%;
  left: 52%;
  animation-delay: -5s;
}

.app {
  position: relative;
  z-index: 1;
  min-height: 100vh;
}

.screen {
  display: none;
  min-height: 100vh;
  padding: clamp(24px, 4vw, 56px);
}

.screen.is-active {
  display: flex;
  animation: screen-in 680ms cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.screen--center {
  align-items: center;
  justify-content: center;
  flex-direction: column;
  text-align: center;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1,
h2,
p {
  overflow-wrap: anywhere;
}

h1 {
  max-width: 940px;
  margin: 0;
  font-size: clamp(2.5rem, 8vw, 6.9rem);
  line-height: 0.92;
  letter-spacing: 0;
}

h2 {
  margin: 0;
  font-size: clamp(1.7rem, 4vw, 3.4rem);
  line-height: 1;
  letter-spacing: 0;
}

.screen__copy {
  max-width: 720px;
  margin: 20px 0 0;
  color: var(--muted);
  font-size: clamp(1.02rem, 2vw, 1.22rem);
  line-height: 1.7;
}

.loader {
  width: 54px;
  height: 54px;
  margin-bottom: 28px;
  border: 2px solid rgba(255, 255, 255, 0.16);
  border-top-color: var(--gold);
  border-radius: 999px;
  animation: spin 1s linear infinite;
}

.countdown {
  align-items: center;
  justify-content: center;
  text-align: center;
}

.countdown__content {
  display: flex;
  align-items: center;
  flex-direction: column;
  width: min(1080px, 100%);
  margin: auto;
  transform: translateY(-1vh);
}

.countdown h1,
.countdown .screen__copy {
  margin-right: auto;
  margin-left: auto;
}

.timer {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(10px, 2vw, 18px);
  width: min(920px, 100%);
  margin: clamp(34px, 6vw, 70px) auto 0;
}

.timer__unit {
  min-width: 0;
  padding: clamp(16px, 3vw, 28px);
  border: 1px solid var(--border);
  border-radius: 8px;
  background: linear-gradient(180deg, var(--panel-strong), rgba(255, 255, 255, 0.045));
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
}

.timer__unit strong {
  display: block;
  font-size: clamp(2.1rem, 8vw, 5rem);
  line-height: 0.95;
  font-variant-numeric: tabular-nums;
}

.timer__unit span {
  display: block;
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 700;
  text-transform: uppercase;
}

.experience {
  flex-direction: column;
  justify-content: center;
  gap: clamp(28px, 5vw, 56px);
}

.experience__hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 28px;
  align-items: end;
  width: min(1180px, 100%);
  margin: 0 auto;
}

.hero-copy h1 {
  max-width: 820px;
  font-size: clamp(2.35rem, 6vw, 5.4rem);
  line-height: 0.95;
}

.hero-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.button {
  min-height: 48px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  color: var(--text);
  font-weight: 800;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background 180ms ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button--primary {
  color: var(--ink);
  background: linear-gradient(135deg, var(--gold), #fff0b0);
  box-shadow: 0 14px 34px rgba(232, 190, 97, 0.22);
}

.button--ghost {
  border-color: var(--border);
  background: rgba(255, 255, 255, 0.08);
}

.reveal {
  display: grid;
  grid-template-columns: minmax(280px, 1.15fr) minmax(280px, 0.85fr);
  gap: clamp(18px, 3vw, 28px);
  width: min(1180px, 100%);
  margin: 0 auto;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transform: translateY(24px);
  pointer-events: none;
}

.reveal.is-visible {
  max-height: 1200px;
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
  transition:
    max-height 720ms ease,
    opacity 720ms ease,
    transform 720ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

.video-frame,
.invite {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.11), rgba(255, 255, 255, 0.055));
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px);
}

.video-frame {
  position: relative;
  overflow: hidden;
  min-height: 320px;
  aspect-ratio: 16 / 9;
}

.video-frame video,
.video-placeholder {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.video-frame video {
  display: none;
  object-fit: cover;
}

.video-frame.has-video video {
  display: block;
}

.video-placeholder {
  display: flex;
  justify-content: center;
  flex-direction: column;
  padding: 32px;
  background:
    linear-gradient(135deg, rgba(232, 190, 97, 0.14), transparent),
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03));
}

.video-placeholder span {
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.video-placeholder strong {
  display: block;
  max-width: 420px;
  margin-top: 12px;
  font-size: clamp(1.6rem, 4vw, 3.3rem);
  line-height: 1;
}

.video-frame.has-video .video-placeholder {
  display: none;
}

.invite {
  display: flex;
  min-height: 320px;
  padding: clamp(22px, 3vw, 34px);
  flex-direction: column;
  justify-content: space-between;
}

.riddle {
  position: relative;
  margin: 34px 0;
  padding-left: 54px;
}

.riddle__mark {
  position: absolute;
  top: 2px;
  left: 0;
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 999px;
  color: var(--ink);
  background: var(--mint);
  font-weight: 900;
}

.riddle p {
  margin: 0;
  color: var(--text);
  font-size: clamp(1.1rem, 2vw, 1.45rem);
  line-height: 1.55;
}

.details {
  display: grid;
  gap: 12px;
  margin: 0;
}

.details div {
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.16);
}

.details dt {
  margin-bottom: 6px;
  color: var(--gold);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.details dd {
  margin: 0;
  color: var(--text);
  line-height: 1.5;
}

@keyframes screen-in {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes grid-drift {
  to {
    transform: translate3d(72px, 72px, 0);
  }
}

@keyframes beam {
  from {
    transform: translate3d(-2vw, 0, 0) rotate(22deg);
  }
  to {
    transform: translate3d(2vw, 3vh, 0) rotate(30deg);
  }
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
    opacity: 0.35;
  }
  50% {
    transform: translateY(-26px);
    opacity: 0.95;
  }
}

@media (max-width: 820px) {
  .screen {
    padding: 22px;
  }

  .timer {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .experience {
    justify-content: flex-start;
  }

  .experience__hero {
    grid-template-columns: 1fr;
    padding-top: 32px;
  }

  .hero-actions {
    justify-content: flex-start;
  }

  .reveal {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  h1 {
    font-size: clamp(2.15rem, 16vw, 4rem);
  }

  .timer {
    gap: 8px;
  }

  .timer__unit {
    padding: 14px 10px;
  }

  .timer__unit span {
    font-size: 0.72rem;
  }

  .button {
    width: 100%;
  }

  .video-frame {
    min-height: 240px;
  }

  .riddle {
    padding-left: 0;
  }

  .riddle__mark {
    position: static;
    margin-bottom: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
  }
}
