/* ==========================================================================
   VINTAGE ROYAL ELEGANCE - ANIMATION KEYFRAMES & UTILITIES
   Khalillah Adelia Luvy - 17th Birthday Invitation
   Enhanced with Parallax & 3D Interactive Motion
   ========================================================================== */

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

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

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

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

@keyframes pulseGoldGlow {
  0%, 100% {
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.2), 0 0 35px rgba(200, 200, 200, 0.1);
  }
  50% {
    box-shadow: 0 0 25px rgba(255, 255, 255, 0.4), 0 0 50px rgba(255, 255, 255, 0.2);
  }
}

@keyframes spinSlow {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@keyframes floatGentle {
  0%, 100% {
    transform: translateY(0px) rotate(0deg);
  }
  50% {
    transform: translateY(-8px) rotate(1deg);
  }
}

@keyframes shimmerEffect {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

@keyframes sealPress {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(0.92);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes rippleWave {
  0% {
    transform: scale(0.9);
    opacity: 0.8;
  }
  100% {
    transform: scale(1.6);
    opacity: 0;
  }
}

@keyframes scrollBounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(8px);
  }
  60% {
    transform: translateY(4px);
  }
}

@keyframes goldAuraGlow {
  0%, 100% {
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.3));
  }
  50% {
    filter: drop-shadow(0 0 18px rgba(255, 255, 255, 0.65));
  }
}

/* ==========================================================================
   PARALLAX UTILITIES
   ========================================================================== */

/* Top Scroll Progress Bar */
#scroll-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, #FFFFFF 0%, #888888 50%, #FFFFFF 100%);
  z-index: 100001;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
  transition: width 0.1s ease-out;
  pointer-events: none;
}

/* Floating Gold Particle Canvas */
#parallax-particles {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 2;
  opacity: 0.75;
}

/* Parallax Elements */
.parallax-elem {
  will-change: transform;
  transition: transform 0.12s cubic-bezier(0.1, 0.1, 0.25, 1);
}

/* 3D Interactive Card Tilt */
.card-3d-tilt {
  transform-style: preserve-3d;
  perspective: 1000px;
  transition: transform 0.25s cubic-bezier(0.2, 0.85, 0.4, 1.2), box-shadow 0.25s ease;
  will-change: transform;
}

.card-3d-tilt > * {
  transform: translateZ(12px);
}

/* Scroll Down Prompt Indicator */
.scroll-down-indicator {
  position: absolute;
  bottom: 25px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: var(--color-gold-light);
  font-family: var(--font-sans);
  font-size: 0.7rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  opacity: 0.75;
  cursor: pointer;
  z-index: 5;
  transition: opacity 0.3s ease;
}

.scroll-down-indicator:hover {
  opacity: 1;
}

.scroll-down-arrow {
  animation: scrollBounce 2s infinite ease-in-out;
  font-size: 1rem;
  color: var(--color-gold);
}

/* Scroll reveal helper classes */
.reveal-init {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity 0.95s cubic-bezier(0.16, 1, 0.3, 1), transform 0.95s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.reveal-active {
  opacity: 1 !important;
  transform: translateY(0) !important;
}

.reveal-delay-1 { transition-delay: 0.15s; }
.reveal-delay-2 { transition-delay: 0.3s; }
.reveal-delay-3 { transition-delay: 0.45s; }
.reveal-delay-4 { transition-delay: 0.6s; }

/* Golden Shimmer text */
.text-shimmer {
  background: linear-gradient(
    90deg,
    #C5A059 0%,
    #FFF2CC 25%,
    #DFBF7D 50%,
    #C5A059 75%,
    #F3D68A 100%
  );
  background-size: 200% auto;
  color: transparent;
  -webkit-background-clip: text;
  background-clip: text;
  animation: shimmerEffect 6s linear infinite;
}

/* Vinyl Rotate for Floating Music Player */
.is-playing {
  animation: spinSlow 8s linear infinite !important;
}

.music-paused {
  animation-play-state: paused !important;
}
