/* ============================================================
   Happy Birthday, My Queen — shared design system
   Royal purple + black, glassmorphism, glow, cinematic motion
   ============================================================ */

:root{
  --royal-purple: #7B2CBF;
  --royal-purple-light: #9D4EDD;
  --deep-black: #050005;
  --panel-black: #0D0410;
  --soft-pink: #FF9EDB;
  --white-glow: #F6EEFF;
  --gold: #FFD9A0;

  --glass-bg: rgba(123, 44, 191, 0.10);
  --glass-border: rgba(255, 255, 255, 0.14);
  --shadow-glow: 0 0 40px rgba(123, 44, 191, 0.45);

  --font-display: 'Cormorant Garamond', 'Playfair Display', serif;
  --font-script: 'Great Vibes', cursive;
  --font-body: 'Marcellus', 'Cormorant Garamond', serif;

  --ease-out: cubic-bezier(.16,1,.3,1);
}

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

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

html{ scroll-behavior: smooth; }

body{
  background: var(--deep-black);
  color: var(--white-glow);
  font-family: var(--font-body);
  overflow-x: hidden;
  min-height: 100vh;
  position: relative;
}

/* -------------------- Background layers -------------------- */

#bg-canvas{
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.bg-vignette{
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(123,44,191,0.28), transparent 60%),
    radial-gradient(ellipse 60% 50% at 90% 100%, rgba(123,44,191,0.18), transparent 60%),
    radial-gradient(ellipse 100% 100% at 50% 50%, transparent 40%, var(--deep-black) 100%);
}

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

/* -------------------- Floating emoji layer -------------------- */

.float-layer{
  position: fixed;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  overflow: hidden;
}

.floatie{
  position: absolute;
  bottom: -10%;
  font-size: clamp(14px, 2.2vw, 26px);
  opacity: 0;
  filter: drop-shadow(0 0 6px rgba(255, 158, 219, 0.6));
  animation: float-up linear infinite;
}

@keyframes float-up{
  0%{ transform: translateY(0) translateX(0) rotate(0deg); opacity: 0; }
  8%{ opacity: 0.9; }
  50%{ transform: translateY(-55vh) translateX(var(--drift, 20px)) rotate(180deg); }
  92%{ opacity: 0.7; }
  100%{ transform: translateY(-110vh) translateX(calc(var(--drift, 20px) * -1)) rotate(360deg); opacity: 0; }
}

/* -------------------- Layout shell -------------------- */

.page{
  position: relative;
  z-index: 5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.section{
  width: 100%;
  max-width: 1100px;
  padding: 6rem 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

/* -------------------- Glass panels -------------------- */

.glass{
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-radius: 24px;
  box-shadow: var(--shadow-glow), inset 0 1px 0 rgba(255,255,255,0.06);
}

/* -------------------- Typography -------------------- */

.eyebrow{
  font-family: var(--font-body);
  letter-spacing: 0.35em;
  text-transform: uppercase;
  font-size: 0.72rem;
  color: var(--soft-pink);
  opacity: 0.85;
}

h1, h2, h3{
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--white-glow);
  text-shadow: 0 0 24px rgba(157, 78, 221, 0.55);
}

.script{
  font-family: var(--font-script);
  color: var(--soft-pink);
  text-shadow: 0 0 18px rgba(255,158,219,0.6);
}

p{
  font-family: var(--font-body);
  line-height: 1.7;
  color: rgba(246, 238, 255, 0.86);
}

a{ color: inherit; }

/* -------------------- Buttons -------------------- */

.glow-btn{
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  padding: 1rem 2.4rem;
  font-family: var(--font-body);
  font-size: 1rem;
  letter-spacing: 0.06em;
  color: var(--white-glow);
  background: linear-gradient(135deg, rgba(123,44,191,0.9), rgba(157,78,221,0.7));
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 999px;
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.4s var(--ease-out), box-shadow 0.4s var(--ease-out);
  box-shadow: 0 0 20px rgba(123,44,191,0.55), 0 0 0 rgba(255,158,219,0);
  animation: pulse-btn 2.8s ease-in-out infinite;
}

.glow-btn:hover{
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 8px 30px rgba(157,78,221,0.65), 0 0 40px rgba(255,158,219,0.35);
}

.glow-btn:focus-visible{
  outline: 2px solid var(--soft-pink);
  outline-offset: 4px;
}

@keyframes pulse-btn{
  0%, 100%{ box-shadow: 0 0 18px rgba(123,44,191,0.5); }
  50%{ box-shadow: 0 0 34px rgba(157,78,221,0.75); }
}

/* -------------------- Scroll reveal -------------------- */

.reveal{
  opacity: 0;
  transform: translateY(36px);
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
}
.reveal.is-visible{
  opacity: 1;
  transform: translateY(0);
}

/* -------------------- Divider -------------------- */

.divider{
  width: 1px;
  height: 60px;
  background: linear-gradient(to bottom, transparent, var(--royal-purple-light), transparent);
  margin: 0 auto;
}

/* -------------------- Music toggle -------------------- */

.music-toggle{
  position: fixed;
  top: 1.2rem;
  right: 1.2rem;
  z-index: 50;
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-radius: 50%;
  color: var(--white-glow);
  box-shadow: var(--shadow-glow);
  transition: transform 0.35s var(--ease-out), box-shadow 0.35s var(--ease-out);
}
.music-toggle:hover{
  transform: scale(1.08);
  box-shadow: 0 8px 26px rgba(157,78,221,0.55);
}
.music-toggle:focus-visible{
  outline: 2px solid var(--soft-pink);
  outline-offset: 3px;
}

/* -------------------- Skip link (a11y) -------------------- */

.skip-link{
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--panel-black);
  color: var(--white-glow);
  padding: 0.75rem 1.25rem;
  z-index: 100;
  border-radius: 0 0 10px 0;
}
.skip-link:focus{ left: 0; }

/* -------------------- Visually hidden -------------------- */

.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;
}
