/* ─── Animations ─────────────────────────────────────── */

/* ── Reveal on scroll ── */
.reveal {
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}
.js-ready .reveal {
  opacity: 0;
  transform: translateY(28px);
}
.js-ready .reveal.visible { opacity: 1; transform: translateY(0); }

.reveal--delay-1 { transition-delay: 0.1s; }
.reveal--delay-2 { transition-delay: 0.2s; }
.reveal--delay-3 { transition-delay: 0.3s; }
.reveal--delay-4 { transition-delay: 0.4s; }

/* ── Typing indicator ── */
.typing-dots { display: flex; gap: 4px; align-items: center; padding: 4px 0; }
.typing-dots span {
  width: 6px; height: 6px;
  background: var(--color-text-3);
  border-radius: 50%;
  animation: typingDot 1.2s ease-in-out infinite;
}
.typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.typing-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes typingDot {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30%            { transform: translateY(-4px); opacity: 1; }
}

/* ── Spin ── */
@keyframes spin { to { transform: rotate(360deg); } }
.spin { animation: spin 0.8s linear infinite; }

/* ── Pulse ring ── */
@keyframes pulseRing {
  0%   { transform: scale(0.85); box-shadow: 0 0 0 0 rgba(59,130,246,0.5); }
  70%  { transform: scale(1);    box-shadow: 0 0 0 10px rgba(59,130,246,0); }
  100% { transform: scale(0.85); box-shadow: 0 0 0 0 rgba(59,130,246,0); }
}

/* ── Page load ── */
@keyframes slideUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Stagger children ── */
.stagger > * { opacity: 0; animation: slideUp 0.5s var(--ease) forwards; }
.stagger > *:nth-child(1) { animation-delay: 0.05s; }
.stagger > *:nth-child(2) { animation-delay: 0.1s; }
.stagger > *:nth-child(3) { animation-delay: 0.15s; }
.stagger > *:nth-child(4) { animation-delay: 0.2s; }
.stagger > *:nth-child(5) { animation-delay: 0.25s; }
.stagger > *:nth-child(6) { animation-delay: 0.3s; }
.stagger > *:nth-child(7) { animation-delay: 0.35s; }
.stagger > *:nth-child(8) { animation-delay: 0.4s; }

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  .reveal, .stagger > *, * { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}
