/* assets/css/animations.css
   Motion layer: fade-up entries, pulse dot, caret, radar rings, log lines. */

@keyframes fade-up {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fade-up { animation: fade-up 500ms cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.fade-up.delay-1 { animation-delay: 80ms; }
.fade-up.delay-2 { animation-delay: 160ms; }
.fade-up.delay-3 { animation-delay: 240ms; }

@keyframes dot-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.6; transform: scale(0.85); }
}

@keyframes caret-blink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}
.type-caret::after {
  content: '▍';
  display: inline-block;
  margin-left: 2px;
  color: var(--accent);
  animation: caret-blink 900ms steps(1) infinite;
}

/* Radar (dashboard waiting screen) */
@keyframes radar-ring {
  0%   { transform: scale(0.35); opacity: 0.9; }
  70%  { opacity: 0.15; }
  100% { transform: scale(1.6); opacity: 0; }
}
.radar {
  position: relative;
  width: 300px; height: 300px;
  display: grid; place-items: center;
  margin: 0 auto;
}
.radar__ring {
  position: absolute; inset: 0;
  border-radius: 50%;
  border: 1px solid rgba(34, 197, 94, 0.5);
  animation: radar-ring 2.6s ease-out infinite;
}
.radar__ring:nth-child(2) { animation-delay: 0.9s; }
.radar__ring:nth-child(3) { animation-delay: 1.8s; }

.radar__sweep {
  position: absolute; inset: 0;
  border-radius: 50%;
  background: conic-gradient(from 0deg, rgba(34, 197, 94, 0.35), transparent 30%);
  animation: radar-sweep 3.4s linear infinite;
}
@keyframes radar-sweep {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

.radar__core {
  width: 88px; height: 88px;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  display: grid; place-items: center;
  font-family: var(--mono); font-size: 13px;
  letter-spacing: 0.08em;
  box-shadow: 0 12px 32px -12px rgba(17, 17, 17, 0.5);
  z-index: 1;
}

@keyframes log-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.log-line { animation: log-in 350ms ease both; }

/* Thinking bubble in chat */
@keyframes thinking-pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.4; }
}
.thinking-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
  animation: thinking-pulse 1.2s ease-in-out infinite;
}
.thinking-dot:nth-child(2) { animation-delay: 0.2s; }
.thinking-dot:nth-child(3) { animation-delay: 0.4s; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
