/* ===================================================
   Animations & Micro-interactions
   =================================================== */

/* --- Fade In Animations --- */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-in-left {
  opacity: 0;
  transform: translateX(-40px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.fade-in-left.visible {
  opacity: 1;
  transform: translateX(0);
}

.fade-in-right {
  opacity: 0;
  transform: translateX(40px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.fade-in-right.visible {
  opacity: 1;
  transform: translateX(0);
}

.fade-in-scale {
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in-scale.visible {
  opacity: 1;
  transform: scale(1);
}

/* Stagger delays for grid items */
.stagger-1 { transition-delay: 0.1s; }
.stagger-2 { transition-delay: 0.2s; }
.stagger-3 { transition-delay: 0.3s; }
.stagger-4 { transition-delay: 0.4s; }

/* --- Floating Particles (CSS fallback) --- */
.particles-css {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 1;
}

.particle {
  position: absolute;
  width: 3px;
  height: 3px;
  background: var(--color-gold);
  border-radius: 50%;
  opacity: 0;
  animation: particleFloat linear infinite;
}

.particle:nth-child(1) { left: 10%; animation-duration: 12s; animation-delay: 0s; }
.particle:nth-child(2) { left: 20%; animation-duration: 15s; animation-delay: 2s; width: 2px; height: 2px; }
.particle:nth-child(3) { left: 30%; animation-duration: 10s; animation-delay: 4s; }
.particle:nth-child(4) { left: 40%; animation-duration: 14s; animation-delay: 1s; width: 4px; height: 4px; }
.particle:nth-child(5) { left: 50%; animation-duration: 11s; animation-delay: 3s; }
.particle:nth-child(6) { left: 60%; animation-duration: 13s; animation-delay: 5s; width: 2px; height: 2px; }
.particle:nth-child(7) { left: 70%; animation-duration: 16s; animation-delay: 0.5s; }
.particle:nth-child(8) { left: 80%; animation-duration: 9s; animation-delay: 2.5s; width: 4px; height: 4px; }
.particle:nth-child(9) { left: 90%; animation-duration: 12s; animation-delay: 4.5s; }
.particle:nth-child(10) { left: 15%; animation-duration: 14s; animation-delay: 1.5s; width: 2px; height: 2px; }
.particle:nth-child(11) { left: 35%; animation-duration: 11s; animation-delay: 3.5s; }
.particle:nth-child(12) { left: 55%; animation-duration: 15s; animation-delay: 0.8s; width: 3px; height: 3px; }
.particle:nth-child(13) { left: 75%; animation-duration: 10s; animation-delay: 2.2s; }
.particle:nth-child(14) { left: 85%; animation-duration: 13s; animation-delay: 4.2s; width: 2px; height: 2px; }
.particle:nth-child(15) { left: 45%; animation-duration: 16s; animation-delay: 1.8s; }
.particle:nth-child(16) { left: 25%; animation-duration: 12s; animation-delay: 3.8s; width: 4px; height: 4px; }
.particle:nth-child(17) { left: 65%; animation-duration: 14s; animation-delay: 0.3s; }
.particle:nth-child(18) { left: 5%; animation-duration: 11s; animation-delay: 2.8s; width: 2px; height: 2px; }
.particle:nth-child(19) { left: 95%; animation-duration: 13s; animation-delay: 4.8s; }
.particle:nth-child(20) { left: 50%; animation-duration: 15s; animation-delay: 1.3s; width: 3px; height: 3px; }

@keyframes particleFloat {
  0% {
    transform: translateY(100vh) rotate(0deg);
    opacity: 0;
  }
  10% {
    opacity: 0.8;
  }
  90% {
    opacity: 0.6;
  }
  100% {
    transform: translateY(-100px) rotate(720deg);
    opacity: 0;
  }
}

/* --- Glow Pulse --- */
.glow-pulse {
  animation: glowPulse 3s ease-in-out infinite;
}

@keyframes glowPulse {
  0%, 100% {
    box-shadow: 0 0 20px rgba(212, 165, 116, 0.1);
  }
  50% {
    box-shadow: 0 0 40px rgba(212, 165, 116, 0.25);
  }
}

/* --- Shimmer Text --- */
.shimmer-text {
  background: linear-gradient(
    90deg,
    var(--color-gold) 0%,
    var(--color-gold-light) 25%,
    #fff 50%,
    var(--color-gold-light) 75%,
    var(--color-gold) 100%
  );
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 4s linear infinite;
}

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

/* --- Mystical Orb Glow (background decoration) --- */
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  pointer-events: none;
  opacity: 0.15;
  animation: orbFloat 8s ease-in-out infinite;
}

.orb-1 {
  width: 300px;
  height: 300px;
  background: var(--color-purple);
  top: 20%;
  left: -5%;
  animation-delay: 0s;
}

.orb-2 {
  width: 200px;
  height: 200px;
  background: var(--color-gold);
  top: 60%;
  right: -3%;
  animation-delay: 3s;
}

.orb-3 {
  width: 250px;
  height: 250px;
  background: var(--color-indigo);
  bottom: 10%;
  left: 30%;
  animation-delay: 5s;
}

@keyframes orbFloat {
  0%, 100% {
    transform: translate(0, 0);
  }
  33% {
    transform: translate(20px, -30px);
  }
  66% {
    transform: translate(-20px, 20px);
  }
}

/* --- Card Hover Glow Border --- */
.service-card::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(212, 165, 116, 0) 0%, rgba(212, 165, 116, 0.3) 50%, rgba(212, 165, 116, 0) 100%);
  z-index: -1;
  opacity: 0;
  transition: opacity var(--transition-smooth);
}

.service-card:hover::before {
  opacity: 1;
}

/* --- Mystical Divider Animation --- */
.divider-animated {
  position: relative;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--color-gold), transparent);
  margin: var(--space-3xl) auto;
  max-width: 300px;
  overflow: hidden;
}

.divider-animated::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent);
  animation: dividerShine 3s ease-in-out infinite;
}

@keyframes dividerShine {
  0% { left: -50%; }
  100% { left: 150%; }
}

/* --- Mystic Symbol Rotation (for decorative elements) --- */
.mystic-rotate {
  animation: mysticRotate 20s linear infinite;
}

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

/* --- Breathing Glow for buttons --- */
.btn-primary {
  animation: breathe 3s ease-in-out infinite;
}

.btn-primary:hover {
  animation: none;
}

@keyframes breathe {
  0%, 100% {
    box-shadow: 0 4px 20px rgba(212, 165, 116, 0.15);
  }
  50% {
    box-shadow: 0 4px 30px rgba(212, 165, 116, 0.3);
  }
}

/* --- Page Transition --- */
.page-transition {
  animation: pageIn 0.5s ease-out;
}

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

/* --- Scroll Down Indicator --- */
.scroll-indicator {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
  animation: scrollBounce 2s ease-in-out infinite;
  cursor: pointer;
}

.scroll-indicator span {
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.scroll-indicator-arrow {
  width: 24px;
  height: 24px;
  border-right: 2px solid var(--color-gold);
  border-bottom: 2px solid var(--color-gold);
  transform: rotate(45deg);
  opacity: 0.6;
}

@keyframes scrollBounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(10px); }
}

/* --- Confirmation Check Animation --- */
.check-animation {
  animation: checkPop 0.5s ease-out;
}

@keyframes checkPop {
  0% {
    transform: scale(0);
    opacity: 0;
  }
  50% {
    transform: scale(1.2);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}
