/* ==========================================================================
   SOMEWHERE BETWEEN US — Animations & Keyframes
   Celestial Sun & Moon Effects
   Stylesheet (css/animations.css)
   ========================================================================== */

/* Twinkling Star */
@keyframes twinkle {
  0%, 100% {
    opacity: 0.25;
    transform: scale(0.85);
  }
  50% {
    opacity: 1;
    transform: scale(1.15);
    filter: drop-shadow(0 0 6px rgba(203, 230, 242, 0.9));
  }
}

/* Sun Radiance (Warm Golden-Pink Pulse) */
@keyframes sunRadiance {
  0% {
    transform: scale(1);
    box-shadow: 0 0 25px rgba(247, 178, 201, 0.7), 0 0 50px rgba(254, 240, 138, 0.2);
  }
  100% {
    transform: scale(1.08);
    box-shadow: 0 0 35px rgba(247, 178, 201, 0.9), 0 0 70px rgba(254, 240, 138, 0.4);
  }
}

/* Moon Float (Gentle Silver-Blue Orbit) */
@keyframes moonFloat {
  0% {
    transform: translateY(0px) rotate(0deg);
    filter: drop-shadow(0 0 16px rgba(168, 213, 229, 0.8));
  }
  100% {
    transform: translateY(-6px) rotate(4deg);
    filter: drop-shadow(0 0 24px rgba(203, 230, 242, 1));
  }
}

/* Ambient Sun & Moon Floating Orbs */
@keyframes sunGlowFloat {
  0% {
    transform: translate(0, 0) scale(1);
  }
  50% {
    transform: translate(30px, -20px) scale(1.06);
  }
  100% {
    transform: translate(-15px, 25px) scale(0.96);
  }
}

@keyframes moonGlowFloat {
  0% {
    transform: translate(0, 0) scale(1);
  }
  50% {
    transform: translate(-25px, 25px) scale(1.08);
  }
  100% {
    transform: translate(20px, -20px) scale(0.95);
  }
}

/* Celestial Breathe in Navigation Brand */
@keyframes celestialBreathe {
  0%, 100% {
    transform: scale(1);
    filter: drop-shadow(0 0 8px rgba(168, 213, 229, 0.5));
  }
  50% {
    transform: scale(1.06);
    filter: drop-shadow(0 0 12px rgba(247, 178, 201, 0.7));
  }
}

/* Letter Paper Unfold */
@keyframes letterUnfold {
  0% {
    opacity: 0;
    transform: translateY(40px) scale(0.92);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Fade In */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Fade Up */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Heart & Celestial Sparkle (Click Effect) */
@keyframes heartFloatUp {
  0% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(0.6) rotate(0deg);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -120px) scale(1.25) rotate(15deg);
  }
}

/* Utility Classes */
.animate-fade-in {
  animation: fadeIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.animate-fade-up {
  animation: fadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Interactive Click Sparkle */
.floating-click-heart {
  position: fixed;
  pointer-events: none;
  font-size: 1.25rem;
  z-index: 9999;
  animation: heartFloatUp 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  filter: drop-shadow(0 0 8px rgba(168, 213, 229, 0.8));
}

/* Reduced Motion Accessibility */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  
  .envelope-flap {
    transition: none !important;
  }
}
