/**
 * Animations & Micro-interactions
 * Dr. Godse's Dental Clinic And Implant Centre, Solapur
 */

/* -------------------------------------------------------------
 * Keyframes
 * ------------------------------------------------------------- */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(28px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

@keyframes floatSlow {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-8px);
  }
}

@keyframes pulseSoft {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(217, 189, 131, 0.5);
  }
  50% {
    transform: scale(1.02);
    box-shadow: 0 0 0 8px rgba(217, 189, 131, 0);
  }
}

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

/* -------------------------------------------------------------
 * Animation Helper Classes
 * ------------------------------------------------------------- */
.fade-in {
  animation: fadeIn 0.4s ease forwards;
}

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

.float-slow {
  animation: floatSlow 5s ease-in-out infinite;
}

.pulse-badge {
  animation: pulseSoft 3s infinite;
}

/* Scroll reveal trigger classes handled via IntersectionObserver in main.js */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.reveal-on-scroll.is-revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger Delays */
.delay-1 { transition-delay: 100ms; }
.delay-2 { transition-delay: 200ms; }
.delay-3 { transition-delay: 300ms; }
.delay-4 { transition-delay: 400ms; }
.delay-5 { transition-delay: 500ms; }

/* Micro-interaction Hover Classes */
.hover-lift {
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.hover-lift:hover {
  transform: translateY(-5px);
}

/* Form focus glow */
.input-focus-glow:focus {
  transition: all 0.2s ease-in-out;
}

/* -------------------------------------------------------------
 * Accessibility: Respect Prefers-Reduced-Motion
 * ------------------------------------------------------------- */
@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;
  }

  .reveal-on-scroll {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }

  .float-slow,
  .pulse-badge {
    animation: none !important;
  }
}
