/* =====================================================
   ANIMATIONS.CSS — Keyframes, Scroll Reveal
   Insight Futures Institutional Site
   ===================================================== */

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

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

@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-24px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(24px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.5; transform: scale(0.85); }
}

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

@keyframes glow-pulse {
  0%, 100% { box-shadow: 0 0 24px rgba(14, 165, 233, 0.12); }
  50%       { box-shadow: 0 0 48px rgba(14, 165, 233, 0.28); }
}

@keyframes pipeline-flow {
  0%   { opacity: 0.3; }
  50%  { opacity: 1; }
  100% { opacity: 0.3; }
}

/* ── Scroll Reveal — initial hidden state ── */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal.reveal--left {
  transform: translateX(-24px);
}

.reveal.reveal--right {
  transform: translateX(24px);
}

.reveal.is-visible {
  opacity: 1;
  transform: translate(0);
}

/* Stagger children delay */
.stagger > *:nth-child(1) { transition-delay: 0ms; }
.stagger > *:nth-child(2) { transition-delay: 80ms; }
.stagger > *:nth-child(3) { transition-delay: 160ms; }
.stagger > *:nth-child(4) { transition-delay: 240ms; }
.stagger > *:nth-child(5) { transition-delay: 320ms; }
.stagger > *:nth-child(6) { transition-delay: 400ms; }

/* ── Live dot ── */
.live-dot {
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--success);
  animation: pulse-dot 2s ease-in-out infinite;
}

/* ── Pipeline flow animation ── */
.pipeline-arrow--animated {
  animation: pipeline-flow 2.5s ease-in-out infinite;
}

/* ── Glow card animation ── */
.card--glow-hover:hover {
  animation: glow-pulse 2s ease-in-out infinite;
}

/* ── Number counter ── */
.counter { display: inline-block; }

/* ── Page load fade ── */
body.loaded main {
  animation: fadeIn 0.5s ease forwards;
}

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}
