/* ==========================================================================
   JESSYNAYS ANIMATIONS & MICRO-INTERACTIONS
   Rotating Seal • Botanical Sway • Shimmer • Night Atmosphere
   ========================================================================== */

/* Rotating Circular Seal Badge */
@keyframes spinClockwise {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

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

.rotating-seal-svg {
  animation: spinClockwise 22s linear infinite;
  transform-origin: center center;
  will-change: transform;
}

.rotating-seal-container:hover .rotating-seal-svg {
  animation-duration: 12s;
}

/* Gentle Botanical Frame Sway */
@keyframes bloomDrift {
  0%, 100% {
    transform: rotate(0deg) scale(1);
  }
  50% {
    transform: rotate(1.6deg) scale(1.025);
  }
}

/* The wrapper's transform carries the bloom's position, so the drift goes on
   the inner SVG — animating the wrapper would knock it off its anchor. */
.bloom-svg {
  animation: bloomDrift 46s ease-in-out infinite;
  transform-origin: center;
}

.bloom-backdrop--left .bloom-svg {
  animation: bloomDrift 54s ease-in-out infinite reverse;
  animation-delay: -16s;
}

.bloom-backdrop--far-left .bloom-svg {
  animation: bloomDrift 62s ease-in-out infinite;
  animation-delay: -30s;
}

/* Gentle Ambient Star / Shimmer Floating */
@keyframes subtlePulseGlow {
  0%, 100% {
    opacity: 0.6;
    transform: scale(1);
  }
  50% {
    opacity: 0.95;
    transform: scale(1.04);
  }
}

.ambient-glow {
  animation: subtlePulseGlow 6s ease-in-out infinite;
}

/* Smooth Fade and Slide In */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

/* Modal Pop In */
@keyframes modalPopIn {
  0% {
    opacity: 0;
    transform: scale(0.94) translateY(18px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.modal-content-animated {
  animation: modalPopIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Drawer Slide In */
@keyframes drawerSlideIn {
  from {
    transform: translateX(100%);
  }
  to {
    transform: translateX(0);
  }
}

.drawer-animated {
  animation: drawerSlideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Badge Heartbeat / Subtle Pop */
@keyframes badgePop {
  0% { transform: scale(1); }
  50% { transform: scale(1.22); }
  100% { transform: scale(1); }
}

.badge-pop {
  animation: badgePop 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Shimmer Highlight Effect for Featured Cards */
@keyframes subtleGleam {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

.gleam-effect {
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0%,
    var(--border-highlight) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  background-size: 200% 100%;
  animation: subtleGleam 8s infinite;
}

/* Reduced Motion Override for Accessibility */
@media (prefers-reduced-motion: reduce) {
  .rotating-seal-svg,
  .bloom-svg,
  .ambient-glow,
  .gleam-effect,
  .footer-contact.contact-pulse {
    animation: none !important;
  }
}

/* Contact Card Focus Pulse */
@keyframes contactPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(212, 168, 83, 0.6);
    border-color: var(--text-gold);
  }
  40% {
    box-shadow: 0 0 24px 6px rgba(212, 168, 83, 0.45);
    border-color: var(--text-gold);
  }
  100% {
    box-shadow: none;
  }
}

.footer-contact.contact-pulse {
  animation: contactPulse 1.6s ease-out;
}
