/* Premium Cinematic / Typographic elements */

.name-glow {
  font-size: clamp(2rem, 6vw, 3.5rem);
  font-weight: 800;
  background: linear-gradient(135deg, #000, #444);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin: 0;
  letter-spacing: -0.04em;
}

.intro-scene {
  position: relative;
  overflow: hidden;
  padding-inline: 0.8rem;
}

.intro-scene::before {
  content: "";
  position: absolute;
  inset: -22% -20% auto -20%;
  height: 72%;
  background: radial-gradient(circle at center, rgba(255, 95, 174, 0.18), rgba(156, 107, 255, 0.1) 44%, rgba(255, 255, 255, 0) 72%);
  filter: blur(10px);
  pointer-events: none;
  animation: introGlowShift 4.2s ease-in-out infinite;
}

.intro-kicker {
  margin: 0;
  font-size: 0.82rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 700;
  color: #8a8a93;
}

.intro-title {
  max-width: 900px;
}

.intro-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
}

.intro-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.06);
  color: #4d4d55;
  font-size: 0.92rem;
  font-weight: 700;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.big-birthday {
  font-size: clamp(2.5rem, 8vw, 4.5rem);
  font-weight: 800;
  color: #1d1d1f;
  margin: 0;
  letter-spacing: -0.04em;
  line-height: 1;
}

.name-reveal {
  font-size: clamp(3rem, 10vw, 5.5rem);
  font-weight: 800;
  background: linear-gradient(135deg, #ff2d55, #5e5ce6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin: 0;
  letter-spacing: -0.05em;
  line-height: 1;
}

.name-reveal.pulse {
  animation: subtlePulse 2s ease-in-out infinite;
}

.name-reveal-stage {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 10rem;
  padding: 0.5rem 1rem;
}

.reveal-halo {
  position: absolute;
  width: min(70vw, 420px);
  aspect-ratio: 1;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(255, 95, 174, 0.2) 0%, rgba(156, 107, 255, 0.14) 40%, rgba(255, 255, 255, 0) 72%);
  filter: blur(8px);
  transform: scale(0.88);
  opacity: 0.75;
  animation: revealHaloPulse 2.4s ease-in-out infinite;
  pointer-events: none;
}

.reveal-lead {
  max-width: 680px;
}

.reveal-subtitle {
  min-height: 2rem;
  color: #6f6f75;
}

.name-reveal.revealed {
  animation: revealPop 620ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.birthday-scene {
  position: relative;
  overflow: hidden;
}

.birthday-scene::before {
  content: "";
  position: absolute;
  inset: auto -14% 6% -14%;
  height: 42%;
  background: radial-gradient(circle at center, rgba(255, 95, 174, 0.11), rgba(156, 107, 255, 0.08) 45%, rgba(255, 255, 255, 0) 72%);
  filter: blur(8px);
  pointer-events: none;
  animation: birthdayGlow 3.2s ease-in-out infinite;
}

.birthday-kicker {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #7a7a82;
}

.birthday-caption {
  max-width: 680px;
}

.birthday-stage {
  width: 100%;
  max-width: 560px;
  padding: 1.2rem;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.06);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  animation: birthdayCardIn 700ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.birthday-note {
  margin-bottom: 0.9rem;
  font-weight: 600;
}

.birthday-actions {
  width: 100%;
  max-width: 560px;
  display: grid;
  gap: 0.8rem;
}

.birthday-photo-btn,
.birthday-next-btn {
  width: 100%;
}

.birthday-photo-btn::after {
  display: none;
}

@keyframes subtlePulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.02); }
}

@keyframes revealPop {
  0% {
    opacity: 0;
    transform: scale(0.78) translateY(12px);
    filter: blur(6px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
    filter: blur(0);
  }
}

@keyframes revealHaloPulse {
  0%, 100% {
    transform: scale(0.9);
    opacity: 0.65;
  }
  50% {
    transform: scale(1.02);
    opacity: 0.9;
  }
}

@keyframes birthdayCardIn {
  0% {
    opacity: 0;
    transform: translateY(16px) scale(0.98);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes birthdayGlow {
  0%, 100% {
    opacity: 0.7;
    transform: scale(0.96);
  }
  50% {
    opacity: 1;
    transform: scale(1.03);
  }
}

@keyframes introGlowShift {
  0%, 100% {
    opacity: 0.75;
    transform: scale(0.97) translateY(0);
  }
  50% {
    opacity: 1;
    transform: scale(1.03) translateY(6px);
  }
}

.fade-in {
  animation: fadeIn 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Confetti override for a cleaner look */
.confetti-piece {
  position: fixed;
  width: 6px;
  height: 12px;
  border-radius: 6px;
  z-index: 90;
  animation: fall linear forwards;
}

@keyframes fall {
  to {
    transform: translateY(105vh) rotate(720deg);
    opacity: 0;
  }
}

/* Scene 9 glitch effect */
.glitch {
  position: relative;
}

.glitch::before,
.glitch::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: var(--radius-xl);
  background: repeating-linear-gradient(
    0deg,
    rgba(95, 126, 248, 0.1),
    rgba(95, 126, 248, 0.1) 2px,
    transparent 2px,
    transparent 5px
  );
  opacity: 0;
  pointer-events: none;
}

.glitch.active::before {
  animation: glitchA 180ms infinite;
  opacity: 0.32;
}

.glitch.active::after {
  animation: glitchB 220ms infinite;
  opacity: 0.18;
}

@keyframes glitchA {
  0% { transform: translate(0, 0); }
  25% { transform: translate(4px, -2px); }
  50% { transform: translate(-3px, 2px); }
  75% { transform: translate(2px, 3px); }
  100% { transform: translate(0, 0); }
}

@keyframes glitchB {
  0% { transform: translate(0, 0); }
  20% { transform: translate(-4px, 2px); }
  40% { transform: translate(3px, -1px); }
  80% { transform: translate(-2px, -2px); }
  100% { transform: translate(0, 0); }
}
