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

:root {
  --bg-deep: #080a0f;
  --bg-mid: #12151e;
  --gold: #d4a853;
  --gold-soft: #e8c878;
  --purple-glow: rgba(120, 80, 180, 0.45);
  --purple-soft: rgba(140, 100, 200, 0.12);
  --text: #e8e4dc;
  --text-muted: #9a958a;
  --card-bg: rgba(18, 21, 30, 0.72);
  --radius: 20px;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-soft: cubic-bezier(0.45, 0, 0.55, 1);
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100dvh;
  font-family: "Outfit", system-ui, sans-serif;
  background: var(--bg-deep);
  color: var(--text);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ambient background */
.bg-layer {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, var(--purple-soft), transparent 60%),
    radial-gradient(ellipse 60% 40% at 80% 100%, rgba(212, 168, 83, 0.06), transparent 50%),
    var(--bg-deep);
}

.grain {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 180px;
}

/* floating embers */
.embers {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}

.ember {
  position: absolute;
  bottom: -10px;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--gold-soft);
  opacity: 0;
  animation: rise var(--dur, 12s) var(--delay, 0s) infinite var(--ease-soft);
  box-shadow: 0 0 6px 1px rgba(212, 168, 83, 0.35);
}

.ember:nth-child(odd) {
  background: rgba(160, 120, 220, 0.8);
  box-shadow: 0 0 6px 1px rgba(140, 100, 200, 0.3);
}

@keyframes rise {
  0% {
    opacity: 0;
    transform: translateY(0) translateX(0) scale(0.5);
  }
  10% {
    opacity: 0.7;
  }
  90% {
    opacity: 0.3;
  }
  100% {
    opacity: 0;
    transform: translateY(-100vh) translateX(var(--drift, 20px)) scale(0.2);
  }
}

.page {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
}

/* hero banner */
.hero {
  position: relative;
  display: flex;
  justify-content: center;
  width: 100%;
  padding: 1rem 1.25rem 0;
  line-height: 0;
  animation: heroReveal 1.4s var(--ease-out) both;
}

.hero::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: min(100% - 2.5rem, 720px);
  height: 40%;
  transform: translateX(-50%);
  background: linear-gradient(
    to bottom,
    transparent 40%,
    rgba(8, 10, 15, 0.35) 85%,
    var(--bg-deep) 100%
  );
  pointer-events: none;
}

.hero img {
  display: block;
  width: 100%;
  max-width: 720px;
  max-height: min(32vh, 280px);
  height: auto;
  object-fit: contain;
  object-position: center bottom;
  animation: bannerDrift 18s var(--ease-soft) infinite alternate;
  transform-origin: center center;
}

@keyframes heroReveal {
  from {
    opacity: 0;
    transform: translateY(-12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes bannerDrift {
  from {
    transform: scale(1);
  }
  to {
    transform: scale(1.015);
  }
}

/* main content */
.main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.25rem 3rem;
}

.card {
  position: relative;
  max-width: 560px;
  width: 100%;
  padding: 2.75rem 2rem 2.5rem;
  text-align: center;
  background: var(--card-bg);
  border: 1px solid rgba(212, 168, 83, 0.12);
  border-radius: var(--radius);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow:
    0 24px 64px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  animation: cardUp 1s var(--ease-out) 0.35s both;
}

.card::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: calc(var(--radius) + 1px);
  background: linear-gradient(
    135deg,
    rgba(212, 168, 83, 0.18),
    transparent 40%,
    rgba(140, 100, 200, 0.12)
  );
  z-index: -1;
  opacity: 0.6;
  animation: borderGlow 4s var(--ease-soft) infinite alternate;
}

@keyframes cardUp {
  from {
    opacity: 0;
    transform: translateY(28px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes borderGlow {
  from {
    opacity: 0.4;
  }
  to {
    opacity: 0.75;
  }
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1rem 0.4rem 0.75rem;
  margin-bottom: 1.5rem;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gold-soft);
  background: rgba(212, 168, 83, 0.08);
  border: 1px solid rgba(212, 168, 83, 0.18);
  border-radius: 999px;
  animation: statusIn 0.8s var(--ease-out) 0.6s both;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 10px 2px rgba(212, 168, 83, 0.5);
  animation: pulse 2.4s var(--ease-soft) infinite;
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.35);
    opacity: 0.65;
  }
}

@keyframes statusIn {
  from {
    opacity: 0;
    transform: scale(0.92);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.headline {
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(1.65rem, 5vw, 2.25rem);
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: -0.01em;
  color: var(--text);
  animation: textReveal 1s var(--ease-out) 0.7s both;
}

.headline em {
  font-style: normal;
  background: linear-gradient(120deg, var(--gold-soft), var(--gold), #b8923a);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

@keyframes textReveal {
  from {
    opacity: 0;
    transform: translateY(14px);
    filter: blur(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

.subtext {
  margin-top: 1rem;
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text-muted);
  animation: textReveal 1s var(--ease-out) 0.85s both;
}

.divider {
  width: 48px;
  height: 2px;
  margin: 1.75rem auto;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  border-radius: 2px;
  animation: dividerGrow 0.8s var(--ease-out) 1s both;
}

@keyframes dividerGrow {
  from {
    width: 0;
    opacity: 0;
  }
  to {
    width: 48px;
    opacity: 1;
  }
}

.hint {
  font-size: 0.875rem;
  color: var(--text-muted);
  animation: textReveal 1s var(--ease-out) 1.05s both;
}

.hint strong {
  color: var(--gold-soft);
  font-weight: 500;
}

/* footer */
.footer {
  padding: 1.25rem;
  text-align: center;
  font-size: 0.8rem;
  color: rgba(154, 149, 138, 0.6);
  animation: fadeIn 1s var(--ease-out) 1.2s both;
}

.footer a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.25s;
}

.footer a:hover {
  color: var(--gold-soft);
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* audio toggle */
.audio-toggle {
  position: fixed;
  bottom: 1.25rem;
  right: 1.25rem;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 0.9rem;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--gold-soft);
  background: rgba(18, 21, 30, 0.85);
  border: 1px solid rgba(212, 168, 83, 0.22);
  border-radius: 999px;
  cursor: pointer;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: background 0.25s, border-color 0.25s, transform 0.25s;
  animation: fadeIn 0.6s var(--ease-out) 1.4s both;
}

.audio-toggle:hover {
  background: rgba(28, 32, 44, 0.92);
  border-color: rgba(212, 168, 83, 0.4);
  transform: scale(1.04);
}

.audio-toggle.is-hidden {
  display: none;
}

.audio-toggle svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

/* responsive */
@media (max-width: 480px) {
  .card {
    padding: 2rem 1.35rem 1.75rem;
  }

  .hero img {
    max-height: min(28vh, 200px);
  }

  .main {
    padding-bottom: 2rem;
  }
}

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

  .hero img {
    animation: none;
    transform: none;
  }
}
