:root {
  --bg0: #070913;
  --bg1: #0c1230;
  --plum: #2a1638;
  --champagne: #f3e7d3;
  --brass: #c8a46a;
  --ember: #ffb38a;

  --ink: rgba(243, 231, 211, 0.92);
  --ink-dim: rgba(243, 231, 211, 0.72);
  --ink-faint: rgba(243, 231, 211, 0.52);

  --shadow: rgba(0, 0, 0, 0.55);
  --look: 0;
  --mx: 0.5;
  --my: 0.5;
}

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

[hidden] {
  display: none !important;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  background: radial-gradient(
      1200px 900px at 50% 60%,
      rgba(42, 22, 56, 0.55),
      rgba(12, 18, 48, 0.35) 45%,
      rgba(7, 9, 19, 1) 75%
    ),
    linear-gradient(180deg, var(--bg1), var(--bg0));
  color: var(--ink);
  overflow: hidden;
  font-family: "Space Grotesk", system-ui, -apple-system, Segoe UI, sans-serif;
}

::selection {
  background: rgba(200, 164, 106, 0.35);
  color: var(--champagne);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

#stage {
  position: relative;
  width: 100%;
  height: 100%;
  isolation: isolate;
  cursor: none;
}

#sky {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  background: transparent;
}

#fx {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 5;
}

#grain {
  position: absolute;
  inset: -30%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E");
  opacity: 0.055;
  mix-blend-mode: overlay;
  transform: translate3d(0, 0, 0) rotate(0.0001deg);
  animation: grainShift 10s steps(10) infinite;
}

@keyframes grainShift {
  0% {
    transform: translate3d(-2%, -2%, 0) rotate(0.0001deg);
  }
  25% {
    transform: translate3d(2%, -1%, 0) rotate(0.0001deg);
  }
  50% {
    transform: translate3d(1%, 2%, 0) rotate(0.0001deg);
  }
  75% {
    transform: translate3d(-1%, 1%, 0) rotate(0.0001deg);
  }
  100% {
    transform: translate3d(-2%, -2%, 0) rotate(0.0001deg);
  }
}

#vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(
    1200px 800px at 50% 50%,
    rgba(0, 0, 0, 0) 40%,
    rgba(0, 0, 0, 0.22) 68%,
    rgba(0, 0, 0, 0.45) 100%
  );
  opacity: 0.95;
}

#letterbox {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 900ms cubic-bezier(0.2, 0.9, 0.2, 1);
  background: linear-gradient(
      to bottom,
      rgba(0, 0, 0, 0.65),
      rgba(0, 0, 0, 0) 22%
    ),
    linear-gradient(
      to top,
      rgba(0, 0, 0, 0.75),
      rgba(0, 0, 0, 0) 28%
    );
}

#stage.is-cinematic #letterbox {
  opacity: 1;
}

#hud {
  position: absolute;
  inset: 0;
  z-index: 10;
  pointer-events: none;
}

.intro {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: end center;
  padding: 7vh 4vw;
  pointer-events: none;
  opacity: calc(1 - var(--look) * 1.15);
  transform: translate3d(0, calc(var(--look) * 28px), 0);
  transition: opacity 600ms ease;
}

.intro__inner {
  width: min(720px, 92vw);
  padding: 22px 20px 18px;
  border-radius: 18px;
  background: radial-gradient(
      900px 300px at 60% 0%,
      rgba(200, 164, 106, 0.12),
      rgba(42, 22, 56, 0.14) 40%,
      rgba(12, 18, 48, 0.26) 80%
    ),
    rgba(7, 9, 19, 0.35);
  border: 1px solid rgba(243, 231, 211, 0.08);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  overflow: hidden;
  position: relative;
}

.intro__inner::after {
  content: "";
  position: absolute;
  inset: -2px;
  background: radial-gradient(
    700px 240px at 12% 0%,
    rgba(255, 179, 138, 0.18),
    rgba(255, 179, 138, 0) 60%
  );
  opacity: 0.75;
  pointer-events: none;
}

.intro__kicker {
  margin: 0 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 12px;
  color: var(--ink-faint);
}

.intro__title {
  margin: 0;
  font-family: "Fraunces", serif;
  font-weight: 520;
  font-size: clamp(28px, 4.2vw, 46px);
  line-height: 1.04;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.intro__sub {
  margin: 10px 0 0;
  font-size: 14px;
  color: var(--ink-dim);
  letter-spacing: 0.02em;
}

.intro__gesture {
  margin-top: 16px;
  height: 18px;
  position: relative;
  opacity: 0.95;
}

.intro__gestureDot {
  position: absolute;
  left: 12px;
  top: 50%;
  width: 8px;
  height: 8px;
  transform: translateY(-50%);
  border-radius: 99px;
  background: radial-gradient(
    circle at 35% 35%,
    rgba(243, 231, 211, 1),
    rgba(200, 164, 106, 0.85) 55%,
    rgba(200, 164, 106, 0) 72%
  );
  filter: drop-shadow(0 0 10px rgba(200, 164, 106, 0.45));
  animation: nudgeUp 1400ms cubic-bezier(0.2, 0.9, 0.2, 1) infinite;
}

.intro__gestureTrail {
  position: absolute;
  left: 12px;
  top: 50%;
  width: 120px;
  height: 1px;
  transform: translateY(-50%);
  background: linear-gradient(
    90deg,
    rgba(200, 164, 106, 0.75),
    rgba(243, 231, 211, 0.02)
  );
  opacity: 0.75;
}

@keyframes nudgeUp {
  0%,
  15% {
    transform: translate3d(0, -50%, 0);
    opacity: 0.7;
  }
  60% {
    transform: translate3d(0, calc(-50% - 14px), 0);
    opacity: 1;
  }
  100% {
    transform: translate3d(0, -50%, 0);
    opacity: 0.7;
  }
}

.hint {
  position: absolute;
  left: 22px;
  bottom: 18px;
  max-width: min(520px, 86vw);
  font-size: 13px;
  color: var(--ink-dim);
  letter-spacing: 0.02em;
  opacity: 0;
  transform: translate3d(0, 8px, 0);
  transition:
    opacity 600ms ease,
    transform 600ms ease;
  text-shadow: 0 10px 30px rgba(0, 0, 0, 0.55);
}

.hint.is-visible {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

.nav {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 700ms cubic-bezier(0.2, 0.9, 0.2, 1);
}

#stage[data-mode="intro"] .nav {
  opacity: 0.45;
}

#stage[data-mode="explore"] .nav {
  opacity: 1;
}

#stage[data-mode="finale"] .nav,
#stage[data-mode="ask"] .nav,
#stage[data-mode="celebrate"] .nav,
#stage[data-mode="epilogue"] .nav {
  opacity: 0;
}

.nav__btn {
  pointer-events: auto;
  position: absolute;
  border: none;
  background: none;
  opacity: 1;
  cursor: none;
  transition: none;
}

.nav__btn::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 14px;
  height: 14px;
  border-right: 1.5px solid rgba(243, 231, 211, 0.28);
  border-bottom: 1.5px solid rgba(243, 231, 211, 0.28);
  transform: translate(-50%, -50%) rotate(45deg);
  transition:
    border-color 280ms ease,
    filter 280ms ease;
  filter: drop-shadow(0 0 0px transparent);
}

.nav__btn:hover::after {
  border-right-color: rgba(243, 231, 211, 0.92);
  border-bottom-color: rgba(243, 231, 211, 0.92);
  filter: drop-shadow(0 0 8px rgba(200, 164, 106, 0.35));
}

.nav__btn:focus-visible {
  outline: none;
}

.nav__btn:focus-visible::after {
  border-right-color: rgba(243, 231, 211, 0.92);
  border-bottom-color: rgba(243, 231, 211, 0.92);
  filter: drop-shadow(0 0 8px rgba(200, 164, 106, 0.35));
}

.nav__btn--up {
  top: 0;
  left: 0;
  right: 0;
  height: 80px;
}

.nav__btn--up::after {
  transform: translate(-50%, -56%) rotate(225deg);
}

#stage[data-mode="intro"] .nav__btn--up {
  animation: navBobBtn 1.6s ease-in-out infinite;
}

#stage[data-mode="intro"] .nav__btn--up::after {
  border-right-color: rgba(243, 231, 211, 0.85);
  border-bottom-color: rgba(243, 231, 211, 0.85);
  width: 18px;
  height: 18px;
  border-right-width: 2px;
  border-bottom-width: 2px;
  animation: navGlow 1.6s ease-in-out infinite;
}

@keyframes navBobBtn {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-6px); }
}

@keyframes navGlow {
  0%, 100% { filter: drop-shadow(0 0 6px rgba(200, 164, 106, 0.3)); opacity: 0.65; }
  50%      { filter: drop-shadow(0 0 18px rgba(200, 164, 106, 0.7)); opacity: 1; }
}

.nav__btn--down {
  bottom: 0;
  left: 0;
  right: 0;
  height: 80px;
}

.nav__btn--down::after {
  transform: translate(-50%, -44%) rotate(45deg);
}

.nav__btn--left {
  left: 0;
  top: 0;
  bottom: 0;
  width: 80px;
}

.nav__btn--left::after {
  transform: translate(-56%, -50%) rotate(135deg);
}

.nav__btn--right {
  right: 0;
  top: 0;
  bottom: 0;
  width: 80px;
}

.nav__btn--right::after {
  transform: translate(-44%, -50%) rotate(-45deg);
}

.card {
  position: absolute;
  width: min(420px, 92vw);
  pointer-events: auto;
  transform: translate3d(-50%, -50%, 0) scale(0.92);
  opacity: 0;
  transition:
    opacity 420ms cubic-bezier(0.16, 1.11, 0.36, 1),
    transform 420ms cubic-bezier(0.16, 1.11, 0.36, 1);
  filter: drop-shadow(0 26px 60px rgba(0, 0, 0, 0.55));
}

.card.is-open {
  opacity: 1;
  transform: translate3d(-50%, -50%, 0) scale(1);
}

.card__close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 1px solid rgba(243, 231, 211, 0.12);
  background: rgba(7, 9, 19, 0.35);
  color: rgba(243, 231, 211, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 24px;
  line-height: 1;
}

.card__paper {
  border-radius: 22px;
  padding: 22px 22px 18px;
  background: radial-gradient(
      900px 400px at 15% 0%,
      rgba(200, 164, 106, 0.16),
      rgba(255, 179, 138, 0.04) 40%,
      rgba(42, 22, 56, 0.1) 75%
    ),
    rgba(12, 18, 48, 0.26);
  border: 1px solid rgba(243, 231, 211, 0.1);
  position: relative;
  overflow: hidden;
}

.card__paper::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(
      1px 1px at 20% 30%,
      rgba(243, 231, 211, 0.18),
      transparent 40%
    ),
    radial-gradient(
      1px 1px at 70% 60%,
      rgba(243, 231, 211, 0.14),
      transparent 40%
    );
  opacity: 0.55;
  pointer-events: none;
}

.card__glow {
  position: absolute;
  inset: -2px;
  background: radial-gradient(
    280px 180px at 12% 0%,
    rgba(255, 179, 138, 0.2),
    rgba(255, 179, 138, 0) 62%
  );
  opacity: 0.85;
  pointer-events: none;
}

.card__content {
  position: relative;
}

.card__title {
  margin: 0;
  font-family: "Fraunces", serif;
  font-size: 22px;
  font-weight: 520;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.card__body {
  margin: 10px 0 0;
  color: var(--ink-dim);
  font-size: 14px;
  line-height: 1.65;
}

.card__figure {
  margin: 14px 0 0;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(243, 231, 211, 0.08);
}

.card__figure img {
  display: block;
  width: 100%;
  height: auto;
  filter: saturate(0.9) contrast(1.03);
}

.ask {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.ask__yes {
  position: absolute;
  pointer-events: auto;
  padding: 12px 18px;
  border-radius: 999px;
  border: 1px solid rgba(243, 231, 211, 0.14);
  background: rgba(7, 9, 19, 0.22);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  cursor: pointer;
  color: rgba(243, 231, 211, 0.92);
  font-family: "Fraunces", serif;
  font-weight: 520;
  letter-spacing: -0.02em;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.55);
  --magx: 0px;
  --magy: 0px;
  --glow: 0.4;
  transform: translate3d(calc(-50% + var(--magx)), calc(-50% + var(--magy)), 0);
  transition:
    box-shadow 300ms ease,
    transform 300ms ease;
}

.ask__yesInner {
  display: inline-block;
  transform-origin: 50% 60%;
}

#stage[data-mode="ask"] .ask__yesInner {
  animation: askYesIn 900ms cubic-bezier(0.16, 1.12, 0.36, 1) both;
}

@keyframes askYesIn {
  0% {
    opacity: 0;
    transform: translate3d(0, 10px, 0) scale(0.96);
    filter: blur(2px);
  }
  60% {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1.02);
    filter: blur(0px);
  }
  100% {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
    filter: blur(0px);
  }
}

.ask__yes::before {
  content: "";
  position: absolute;
  inset: -10px;
  border-radius: inherit;
  background: radial-gradient(
    120px 60px at 40% 20%,
    rgba(255, 179, 138, calc(0.18 * var(--glow))),
    rgba(200, 164, 106, calc(0.12 * var(--glow))) 40%,
    rgba(200, 164, 106, 0) 70%
  );
  filter: blur(8px);
  opacity: 1;
  pointer-events: none;
}

.ask__yes::after {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: inherit;
  background: radial-gradient(
      120px 80px at 30% 0%,
      rgba(243, 231, 211, 0.18),
      rgba(243, 231, 211, 0) 60%
    ),
    radial-gradient(
      160px 100px at 70% 100%,
      rgba(200, 164, 106, 0.14),
      rgba(200, 164, 106, 0) 55%
    );
  opacity: calc(0.4 + var(--glow) * 0.45);
  pointer-events: none;
}

.ask__yes:hover {
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.65);
  transform: translate3d(calc(-50% + var(--magx)), calc(-50% + var(--magy)), 0)
    scale(1.03);
}

.ask__yes:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 3px rgba(200, 164, 106, 0.3),
    0 22px 70px rgba(0, 0, 0, 0.65);
}

.ask__no {
  position: absolute;
  left: 0;
  top: 0;
  pointer-events: auto;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid rgba(243, 231, 211, 0.2);
  background: radial-gradient(
      160px 90px at 35% 0%,
      rgba(200, 164, 106, 0.2),
      rgba(42, 22, 56, 0.05) 45%,
      rgba(7, 9, 19, 0) 70%
    ),
    rgba(7, 9, 19, 0.32);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: rgba(243, 231, 211, 0.88);
  font-family: "Space Grotesk", sans-serif;
  font-size: 13px;
  letter-spacing: 0.02em;
  cursor: none;
  box-shadow:
    0 18px 58px rgba(0, 0, 0, 0.62),
    0 0 0 1px rgba(126, 110, 214, 0.09) inset;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.45);
  transition:
    opacity 260ms ease,
    filter 260ms ease;
  will-change: transform;
  transform: translate(-50%, -50%);
}

.ask__no::before {
  content: "";
  position: absolute;
  inset: -9px;
  border-radius: inherit;
  background: radial-gradient(
    120px 60px at 50% 30%,
    rgba(126, 110, 214, 0.22),
    rgba(126, 110, 214, 0) 70%
  );
  filter: blur(10px);
  opacity: 0.7;
  pointer-events: none;
}

.ask__no:hover {
  filter: brightness(1.12);
}

.ask__no:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 3px rgba(126, 110, 214, 0.22),
    0 18px 58px rgba(0, 0, 0, 0.62),
    0 0 0 1px rgba(126, 110, 214, 0.09) inset;
}

.epilogue {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 4vh 4vw;
  pointer-events: auto;
}

.epilogue__paper {
  width: min(520px, 92vw);
  border-radius: 26px;
  padding: 26px 24px;
  background: radial-gradient(
      900px 360px at 14% 0%,
      rgba(200, 164, 106, 0.16),
      rgba(42, 22, 56, 0.12) 45%,
      rgba(12, 18, 48, 0.24) 100%
    ),
    rgba(7, 9, 19, 0.38);
  border: 1px solid rgba(243, 231, 211, 0.11);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.6);
}

.epilogue__title {
  margin: 0;
  font-family: "Fraunces", serif;
  font-weight: 560;
  font-size: 28px;
  letter-spacing: -0.03em;
}

.epilogue__body {
  margin: 10px 0 0;
  color: var(--ink-dim);
  line-height: 1.7;
  font-size: 15px;
}

.epilogue__sig {
  font-family: "La Belle Aurore", cursive;
  font-size: 24px;
  letter-spacing: 0.01em;
  color: rgba(243, 231, 211, 0.9);
}

.epilogue__actions {
  margin-top: 18px;
  display: flex;
  gap: 12px;
}

.epilogue__btn {
  border: 1px solid rgba(243, 231, 211, 0.14);
  background: rgba(200, 164, 106, 0.12);
  color: rgba(243, 231, 211, 0.92);
  border-radius: 999px;
  padding: 11px 14px;
  cursor: pointer;
  font-weight: 520;
  letter-spacing: 0.01em;
}

.epilogue__btn:hover {
  background: rgba(200, 164, 106, 0.18);
}

.epilogue__btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(200, 164, 106, 0.3);
}

.mobile {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 6vh 6vw;
  pointer-events: auto;
}

.mobile__inner {
  width: min(520px, 92vw);
  border-radius: 24px;
  padding: 24px 22px;
  background: rgba(7, 9, 19, 0.5);
  border: 1px solid rgba(243, 231, 211, 0.1);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.mobile__title {
  margin: 0;
  font-family: "Fraunces", serif;
  font-weight: 560;
  font-size: 24px;
  letter-spacing: -0.03em;
}

.mobile__body {
  margin: 10px 0 0;
  color: var(--ink-dim);
  line-height: 1.7;
}

.mute {
  position: absolute;
  bottom: 18px;
  right: 18px;
  z-index: 15;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid rgba(243, 231, 211, 0.08);
  background: rgba(7, 9, 19, 0.25);
  color: rgba(243, 231, 211, 0.45);
  display: grid;
  place-items: center;
  cursor: none;
  pointer-events: auto;
  transition: color 280ms ease, border-color 280ms ease;
}

.mute:hover {
  color: rgba(243, 231, 211, 0.8);
  border-color: rgba(243, 231, 211, 0.18);
}

.mute:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px rgba(200, 164, 106, 0.3);
}

.mute.is-muted .mute__wave1,
.mute.is-muted .mute__wave2 {
  display: none;
}

.mute.is-muted .mute__x1 {
  display: inline !important;
}

#cursor {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 20;
}

.cursor__dot,
.cursor__ring {
  position: absolute;
  left: 0;
  top: 0;
  transform: translate3d(-50%, -50%, 0);
  border-radius: 999px;
  will-change: transform;
}

.cursor__dot {
  width: 6px;
  height: 6px;
  background: radial-gradient(
    circle at 35% 35%,
    rgba(243, 231, 211, 1),
    rgba(200, 164, 106, 0.9) 60%,
    rgba(200, 164, 106, 0) 75%
  );
  opacity: 0.9;
  filter: drop-shadow(0 0 12px rgba(200, 164, 106, 0.35));
}

.cursor__ring {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(243, 231, 211, 0.18);
  background: radial-gradient(
    22px 22px at 35% 35%,
    rgba(243, 231, 211, 0.04),
    rgba(243, 231, 211, 0) 70%
  );
  opacity: 0.75;
  backdrop-filter: blur(2px);
  transition: box-shadow 300ms ease;
}

@media (prefers-reduced-motion: reduce) {
  #grain {
    animation: none;
  }
  .intro__gestureDot {
    animation: none;
  }
  #stage[data-mode="intro"] .nav__btn--up {
    animation: none;
  }
  #stage[data-mode="intro"] .nav__btn--up::after {
    animation: none;
  }
}
