/* main.css — layout, typography, background, controls */

:root {
  --bg-deep:    #06060e;
  --bg-mid:     #0d0a1a;
  --bg-soft:    #16112a;
  --ink:        #f6f4ff;
  --ink-dim:    rgba(246, 244, 255, 0.62);
  --gold:       #ffd166;
  --pink:       #ff5d8f;
  --violet:     #8b5cf6;
  --teal:       #34d399;
  --blue:       #60a5fa;
  --orange:     #fb923c;
}

.stage {
  position: relative;
  z-index: 3;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: clamp(1.5rem, 5vw, 4rem);
  text-align: center;
}

.hero {
  max-width: 920px;
}

.kicker {
  font-size: clamp(0.75rem, 1.4vw, 0.95rem);
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 1.2rem;
  opacity: 0;
  animation: rise 700ms ease 200ms forwards;
}

.title {
  font-family: "Fraunces", "Inter", serif;
  font-weight: 900;
  font-size: clamp(2.6rem, 9vw, 7rem);
  line-height: 0.98;
  letter-spacing: -0.02em;
  margin: 0 0 1.2rem;
  color: transparent;
  background: linear-gradient(
    100deg,
    var(--gold) 0%,
    var(--pink) 30%,
    var(--violet) 55%,
    var(--blue) 80%,
    var(--teal) 100%
  );
  background-size: 220% 220%;
  -webkit-background-clip: text;
          background-clip: text;
  /* letters positioned individually by text-reveal.js */
}

.title .letter {
  display: inline-block;
  position: relative;
  transform: translateY(120%) rotate(-8deg);
  opacity: 0;
  will-change: transform, opacity;
}

.title .space {
  display: inline-block;
  width: 0.35em;
}

.subtitle {
  font-size: clamp(1.05rem, 2.4vw, 1.6rem);
  font-weight: 500;
  color: var(--ink);
  margin: 0 0 1rem;
  opacity: 0;
  animation: rise 700ms ease 1400ms forwards;
}

.lede {
  font-size: clamp(0.95rem, 1.6vw, 1.1rem);
  color: var(--ink-dim);
  line-height: 1.65;
  max-width: 640px;
  margin: 0 auto 2.2rem;
  opacity: 0;
  animation: rise 700ms ease 1700ms forwards;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  justify-content: center;
  opacity: 0;
  animation: rise 700ms ease 2000ms forwards;
}

.cta {
  --pad-y: 0.85rem;
  --pad-x: 1.6rem;
  padding: var(--pad-y) var(--pad-x);
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  transition: transform 180ms ease, box-shadow 180ms ease, background 200ms ease;
  background: linear-gradient(120deg, var(--gold), var(--pink) 60%, var(--violet));
  color: #1a1024;
  box-shadow: 0 6px 24px rgba(255, 93, 143, 0.35);
}

.cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(255, 93, 143, 0.55);
}

.cta:active {
  transform: translateY(0);
  box-shadow: 0 4px 14px rgba(255, 93, 143, 0.4);
}

.cta--ghost {
  background: rgba(255, 255, 255, 0.06);
  color: var(--ink);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: none;
}

.cta--ghost:hover {
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
}

.footer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 4;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  justify-content: center;
  align-items: center;
  padding: 0.8rem 1.2rem;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  color: rgba(246, 244, 255, 0.45);
  background: linear-gradient(to top, rgba(6, 6, 14, 0.7), transparent);
  pointer-events: none;
}

.footer a {
  pointer-events: auto;
}

/* Background canvases — stacked, never interactive */
#bg-canvas,
#confetti-canvas,
#fireworks-canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
}

#bg-canvas {
  z-index: 0;
}

#confetti-canvas {
  z-index: 1;
}

#fireworks-canvas {
  z-index: 2;
}

/* Big rotating gradient halo behind the title */
.halo {
  position: fixed;
  z-index: 0;
  width: 90vmin;
  height: 90vmin;
  border-radius: 50%;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(
    circle at 50% 50%,
    rgba(139, 92, 246, 0.35) 0%,
    rgba(255, 93, 143, 0.18) 35%,
    rgba(6, 6, 14, 0) 70%
  );
  filter: blur(8px);
  animation: haloSpin 24s linear infinite, haloPulse 8s ease-in-out infinite;
  pointer-events: none;
}

@media (max-width: 560px) {
  .footer {
    position: static;
    margin-top: 2rem;
    background: none;
  }
}
