/* =====================================================================
   animations.css — movimento contido. A única animação ambiente contínua
   é a aurora da tela de login (a "assinatura" do app); no resto, o
   movimento existe só para dar continuidade entre estados.
   ===================================================================== */

/* Aurora da tela de autenticação: deriva lenta e assimétrica, longa o
   bastante pra nunca parecer um loop óbvio. */
@keyframes auroraDrift {
  0%   { transform: translate3d(0, 0, 0) scale(1); }
  50%  { transform: translate3d(3%, -4%, 0) scale(1.09); }
  100% { transform: translate3d(-3%, 3%, 0) scale(1.04); }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fade-in-up { animation: fadeInUp 340ms cubic-bezier(.32, .72, 0, 1) both; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.fade-in { animation: fadeIn 220ms ease both; }

/* Modais entram com um leve avanço em profundidade, não só deslizando */
@keyframes modalIn {
  from { opacity: 0; transform: translateY(14px) scale(.975); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.modal.fade-in-up { animation: modalIn 280ms cubic-bezier(.32, .72, 0, 1) both; }

@keyframes typingBounce {
  0%, 60%, 100% { transform: translateY(0); opacity: .45; }
  30%           { transform: translateY(-4px); opacity: 1; }
}
.typing-dots span { display: inline-block; animation: typingBounce 1.1s infinite; }
.typing-dots span:nth-child(2) { animation-delay: .16s; }
.typing-dots span:nth-child(3) { animation-delay: .32s; }

@keyframes spin { to { transform: rotate(360deg); } }
.spinner {
  width: 17px; height: 17px; border: 2px solid rgba(255,255,255,.28);
  border-top-color: #fff; border-radius: 50%;
  animation: spin .65s linear infinite; display: inline-block;
}

/* Anel pulsante para a chamada recebida / participante falando */
@keyframes ringPulse {
  0%   { box-shadow: 0 0 0 0 var(--accent-glow); }
  100% { box-shadow: 0 0 0 16px rgba(97, 80, 214, 0); }
}

.toast { animation: fadeInUp 260ms cubic-bezier(.32, .72, 0, 1) both; }

/* Respeita quem pediu menos movimento no sistema operacional. A aurora é
   desligada por completo, não só acelerada. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  .auth-bg { animation: none; }
}
