/* ==========================================================================
   ANIMATIONS — keyframes & motion utility classes
   Respects prefers-reduced-motion via the global rule in style.css.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Reveal-on-scroll baseline (animated to visible by animations.js / AOS)
   -------------------------------------------------------------------------- */
[data-reveal] { opacity: 0; transform: translateY(28px); }
.no-motion [data-reveal] { opacity: 1 !important; transform: none !important; }

/* --------------------------------------------------------------------------
   Loader — seal stamp
   -------------------------------------------------------------------------- */
@keyframes seal-stamp {
  0%   { transform: scale(2.4) rotate(-8deg); opacity: 0; }
  55%  { transform: scale(0.92) rotate(2deg); opacity: 1; }
  75%  { transform: scale(1.05) rotate(-1deg); }
  100% { transform: scale(1) rotate(0deg); }
}
.loader__seal { animation: seal-stamp 1.1s var(--ease-royal) both; }

.loader.is-hidden {
  opacity: 0; visibility: hidden; transition: opacity 0.6s ease, visibility 0.6s ease;
}

/* --------------------------------------------------------------------------
   Nav music toggle glow
   -------------------------------------------------------------------------- */
@keyframes pulse-glow {
  0%, 100% { text-shadow: 0 0 0 rgba(217,184,118,0); }
  50% { text-shadow: 0 0 10px rgba(217,184,118,0.9); }
}

/* --------------------------------------------------------------------------
   Ambient particles — gold dust & marigold petals
   -------------------------------------------------------------------------- */
.ambient { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 1; }

.mote {
  position: absolute; border-radius: 50%;
  background: radial-gradient(circle, var(--color-copper-light), transparent 70%);
  opacity: 0; animation: drift-mote linear infinite;
}
@keyframes drift-mote {
  0%   { transform: translateY(0) translateX(0); opacity: 0; }
  10%  { opacity: 0.7; }
  90%  { opacity: 0.4; }
  100% { transform: translateY(-120vh) translateX(20px); opacity: 0; }
}

.petal {
  position: absolute; width: 10px; height: 10px; top: -20px;
  background: linear-gradient(135deg, #C1541F, var(--color-maroon));
  border-radius: 0 60% 0 60%;
  opacity: 0; animation: fall-petal linear infinite;
}
@keyframes fall-petal {
  0%   { transform: translateY(0) rotate(0deg); opacity: 0; }
  8%   { opacity: 0.85; }
  92%  { opacity: 0.6; }
  100% { transform: translateY(110vh) rotate(340deg); opacity: 0; }
}

/* --------------------------------------------------------------------------
   Card hover lift (generic)
   -------------------------------------------------------------------------- */
.lift-on-hover { transition: transform 0.35s var(--ease-royal), box-shadow 0.35s var(--ease-royal); }
.lift-on-hover:hover { transform: translateY(-6px); box-shadow: 0 14px 30px rgba(46,26,18,0.18); }

/* --------------------------------------------------------------------------
   RSVP submit micro-interaction
   -------------------------------------------------------------------------- */
@keyframes seal-drop {
  0%   { transform: translateY(-40px) scale(1.6); opacity: 0; }
  60%  { transform: translateY(0) scale(0.95); opacity: 1; }
  100% { transform: translateY(0) scale(1); }
}
.rsvp__success.is-visible .rsvp__success-seal { animation: seal-drop 0.8s var(--ease-royal) both; }

/* --------------------------------------------------------------------------
   Chapter card entrance stagger handled via GSAP inline delay;
   fallback CSS transition if JS unavailable
   -------------------------------------------------------------------------- */
.no-motion .chapter-card,
.no-motion .gallery__tile,
.no-motion .family__member { opacity: 1 !important; transform: none !important; }
