/* ============================================================================
   ANIMATIONS
   Keyframes and animation classes — pulse, float, reveal-on-scroll, flow divider.
   ============================================================================ */

/* ---------- Reveal on scroll (used by <Reveal> component) ---------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .8s cubic-bezier(.22,1,.36,1),
              transform .8s cubic-bezier(.22,1,.36,1);
  will-change: opacity, transform;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Keyframes ---------- */
@keyframes pulse-ring {
  0%   { transform: scale(1);   opacity: .6; }
  100% { transform: scale(1.6); opacity: 0;  }
}
.pulse-ring { animation: pulse-ring 2.2s cubic-bezier(.22,1,.36,1) infinite; }

@keyframes float-slow {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-8px); }
}
.float-slow { animation: float-slow 6s ease-in-out infinite; }

@keyframes soft-pulse {
  0%, 100% { opacity: .4; }
  50%      { opacity: 1;  }
}
.soft-pulse { animation: soft-pulse 2s ease-in-out infinite; }

/* ============================================================================
   FLOW DIVIDER — the "thread" between sections
   Multiple stacked layers create a luminous, traveling beacon effect.
   ============================================================================ */

.flow-divider {
  position: relative;
  height: 140px;
  width: 100%;
  max-width: 80rem;
  margin: 0 auto;
  overflow: visible;
  pointer-events: none;
}

/* Vertical pulsing gradient line */
.flow-divider::before {
  content: "";
  position: absolute;
  left: 50%; top: 0;
  height: 100%;
  width: 2px;
  transform: translateX(-50%);
  background: linear-gradient(to bottom,
    transparent 0%,
    rgba(79,143,255,.15) 15%,
    rgba(79,143,255,.6)  50%,
    rgba(122,92,255,.4)  75%,
    transparent 100%);
  box-shadow: 0 0 20px rgba(79,143,255,.25);
}

/* Ambient glow halo behind the line */
.flow-divider::after {
  content: "";
  position: absolute;
  left: 50%; top: 50%;
  width: 140px; height: 140px;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(79,143,255,.15), transparent 70%);
  filter: blur(20px);
}

/* Animated pulse on the line itself */
@keyframes flow-sweep {
  0%, 100% { opacity: .3; }
  50%      { opacity: .9; }
}
.flow-glow-line {
  position: absolute;
  left: 50%; top: 20%;
  height: 60%; width: 1px;
  transform: translateX(-50%);
  background: linear-gradient(to bottom, transparent, #4F8FFF, #7A5CFF, transparent);
  filter: blur(2px);
  animation: flow-sweep 3s ease-in-out infinite;
}

/* Traveling beads */
@keyframes flow-travel {
  0%   { top: 0%;   opacity: 0; transform: translate(-50%, -50%) scale(.6); }
  10%  {            opacity: 1; transform: translate(-50%, -50%) scale(1);  }
  90%  {            opacity: 1; transform: translate(-50%, -50%) scale(1);  }
  100% { top: 100%; opacity: 0; transform: translate(-50%, -50%) scale(.6); }
}
.flow-bead {
  position: absolute;
  left: 50%;
  width: 14px; height: 14px;
  border-radius: 9999px;
  background: radial-gradient(circle, #fff 0%, #4F8FFF 40%, rgba(79,143,255,0) 70%);
  box-shadow:
    0 0 20px #4F8FFF,
    0 0 40px rgba(79,143,255,.6),
    0 0 60px rgba(122,92,255,.4);
  animation: flow-travel 3s cubic-bezier(.22,1,.36,1) infinite;
}
.flow-bead-2 { animation-delay: 1.5s; }

/* Horizontal accent ticks */
.flow-tick {
  position: absolute;
  top: 50%;
  width: 24px;
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(79,143,255,.6), transparent);
  transform: translateY(-50%);
}
.flow-tick-left  { left: calc(50% - 40px); }
.flow-tick-right { right: calc(50% - 40px); transform: translateY(-50%) scaleX(-1); }

/* ---------- 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;
  }
}
