/* Animations — scroll reveals, hero entrance, micro-interactions.
   Respects prefers-reduced-motion. */

/* Reveal on scroll */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .65s ease-out, transform .65s ease-out;
  will-change: opacity, transform;
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }
.reveal-delay-1 { transition-delay: .1s; }
.reveal-delay-2 { transition-delay: .2s; }
.reveal-delay-3 { transition-delay: .3s; }
.reveal-delay-4 { transition-delay: .4s; }

/* Hero entrance */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}
.hero__content { animation: fadeInUp .8s ease-out both; }
.hero__card    { animation: fadeInUp .8s ease-out .25s both; }

/* Subtle scale on hero image overlay */
@keyframes slowZoom {
  from { transform: scale(1.0); }
  to   { transform: scale(1.06); }
}
.hero {
  position: relative;
}
.hero::before {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background: inherit;
  animation: slowZoom 12s ease-in-out infinite alternate;
}

/* Card lift on hover */
.doctor-card, .product-card, .service-card, .article-card, .stat-card, .yoga-card {
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}

/* Button micro-interactions */
.btn { transition: background .2s, transform .15s, box-shadow .25s, color .2s; }
.btn:active { transform: translateY(1px) scale(.99); }

/* Stat counter hint */
.stat-card__value[data-count] {
  background: linear-gradient(135deg, var(--pragya-blue), var(--pragya-cyan));
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* Cart badge pulse on add */
@keyframes pulseBadge {
  0% { transform: scale(1); }
  40% { transform: scale(1.35); }
  100% { transform: scale(1); }
}
.cart-badge.is-pulsing { animation: pulseBadge .5s ease-out; }

/* Mobile menu transition */
.mobile-menu { transition: transform .3s ease; }

/* Loading shimmer */
.shimmer {
  background: linear-gradient(90deg, #f3f4f6 25%, #e5e7eb 50%, #f3f4f6 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
}
@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Toast notifications */
.toast-container {
  position: fixed; bottom: 1.5rem; left: 50%; transform: translateX(-50%);
  z-index: 60; display: flex; flex-direction: column; gap: .5rem;
  pointer-events: none;
}
.toast {
  background: var(--pragya-dark); color: #fff;
  padding: .85rem 1.5rem; border-radius: var(--radius-md);
  font-size: .9rem; box-shadow: var(--shadow-lg);
  opacity: 0; transform: translateY(20px);
  transition: opacity .3s, transform .3s;
  pointer-events: auto; max-width: 90vw;
}
.toast.is-visible { opacity: 1; transform: translateY(0); }
.toast--success { background: #10b981; }
.toast--error { background: var(--pragya-red); }
.toast--info { background: var(--pragya-blue); }

/* Progress bar */
.progress { height: 6px; background: #eef0f5; border-radius: 999px; overflow: hidden; }
.progress__bar { height: 100%; background: linear-gradient(90deg, var(--pragya-blue), var(--pragya-cyan)); transition: width .4s ease; }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
  .hero__content, .hero__card { animation: none; opacity: 1; }
}
