/* ── Animate.css – Scroll-driven reveal animations ── */

/* Base reveal */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children (via CSS custom property) */
.stagger > * {
  transition-delay: calc(var(--i, 0) * 80ms);
}

/* Hero particle float */
@keyframes particleFloat {
  0%, 100% { transform: translateY(0) rotate(0deg); opacity: 0.6; }
  50% { transform: translateY(-20px) rotate(180deg); opacity: 1; }
}
.particle {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  animation: particleFloat var(--dur, 6s) ease-in-out infinite;
  animation-delay: var(--delay, 0s);
}

/* Stamp pop on fill */
@keyframes stampPop {
  0% { transform: scale(0); }
  70% { transform: scale(1.2); }
  100% { transform: scale(1); }
}
.stamp.filled {
  animation: stampPop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Counter count-up flash */
@keyframes countFlash {
  0% { opacity: 0; transform: translateY(8px); }
  30% { opacity: 1; transform: translateY(0); }
  100% { opacity: 1; transform: translateY(0); }
}
.stat-number.counting {
  animation: countFlash 0.3s ease-out;
}

/* Magnetic button hover drift handled via JS */

/* Card hover lift (CSS only) */
.info-card,
.location-card,
.article-card {
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1),
              box-shadow 0.25s cubic-bezier(0.4, 0, 0.2, 1),
              border-color 0.25s ease;
}
.info-card:hover,
.location-card:hover,
.article-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--sh-lg);
  border-color: var(--primary);
}

/* Gallery image zoom on hover */
.gallery-item:hover .gallery-img,
.gallery-item:hover .gallery-visual {
  transform: scale(1.05);
}
.gallery-img,
.gallery-visual {
  transition: transform 0.4s ease;
}

/* Navbar shadow on scroll */
#navbar { transition: box-shadow 0.25s ease, background 0.25s ease; }
#navbar.scrolled { box-shadow: var(--sh-md); }

/* Partners infinite scroll — handled via CSS animation in style.css */

/* Article accordion expand */
.article-expand {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1),
              opacity 0.3s ease;
  opacity: 0;
}
.article-expand.open {
  max-height: 800px;
  opacity: 1;
}

/* Mobile drawer slide */
#mobile-nav { transition: opacity 0.3s ease; }

/* Focus states */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .particle {
    animation: none;
    opacity: 0.4;
  }
  .stamp.filled {
    animation: none;
  }
  .info-card:hover,
  .location-card:hover,
  .article-card:hover {
    transform: none;
  }
  .gallery-item:hover .gallery-img,
  .gallery-item:hover .gallery-visual {
    transform: none;
  }
}