/* A0DASH — Animations
 * All keyframes, transitions, and motion effects.
 */

/* ── Pulse Glow (status indicators) ── */

@keyframes pulse-glow {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.6; transform: scale(1.15); }
}

@keyframes pulse-ring {
  0%   { transform: scale(1); opacity: 0.5; }
  100% { transform: scale(2); opacity: 0; }
}

/* ── Cursor Blink (logo) ── */

@keyframes cursor-blink {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0; }
}

.cursor {
  display: inline-block;
  width: 2px;
  height: 1em;
  background: var(--cyan);
  margin-left: 2px;
  vertical-align: text-bottom;
  animation: cursor-blink 1s step-end infinite;
}

/* ── Boot Sequence (staggered card entry) ── */

@keyframes boot-in {
  0% {
    opacity: 0;
    transform: translateY(8px);
    filter: brightness(0.5);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
    filter: brightness(1);
  }
}

.boot-stagger > .card:nth-child(1)  { animation: boot-in var(--t-slow) var(--ease-out) 0.05s both; }
.boot-stagger > .card:nth-child(2)  { animation: boot-in var(--t-slow) var(--ease-out) 0.1s both; }
.boot-stagger > .card:nth-child(3)  { animation: boot-in var(--t-slow) var(--ease-out) 0.15s both; }
.boot-stagger > .card:nth-child(4)  { animation: boot-in var(--t-slow) var(--ease-out) 0.2s both; }
.boot-stagger > .card:nth-child(5)  { animation: boot-in var(--t-slow) var(--ease-out) 0.25s both; }
.boot-stagger > .card:nth-child(6)  { animation: boot-in var(--t-slow) var(--ease-out) 0.3s both; }
.boot-stagger > .card:nth-child(7)  { animation: boot-in var(--t-slow) var(--ease-out) 0.35s both; }
.boot-stagger > .card:nth-child(8)  { animation: boot-in var(--t-slow) var(--ease-out) 0.4s both; }
.boot-stagger > .card:nth-child(9)  { animation: boot-in var(--t-slow) var(--ease-out) 0.45s both; }
.boot-stagger > .card:nth-child(10) { animation: boot-in var(--t-slow) var(--ease-out) 0.5s both; }
.boot-stagger > .banner             { animation: boot-in var(--t-slow) var(--ease-out) 0.02s both; }

/* ── Scanline (progress bar sweep) ── */
/* defined in components.css — referenced here for completeness */

/* ── Data Flash (value update highlight) ── */
/* defined in components.css — referenced here for completeness */

/* ── Glow Pulse (hero numbers) ── */

@keyframes glow-pulse {
  0%, 100% { text-shadow: 0 0 12px var(--cyan-glow); }
  50%      { text-shadow: 0 0 24px var(--cyan-glow), 0 0 40px rgba(0, 240, 255, 0.1); }
}

.glow-pulse {
  animation: glow-pulse 4s ease-in-out infinite;
}

/* ── Slide In (tab underline) ── */

@keyframes slide-in-left {
  from { transform: translateX(-20px); opacity: 0; }
  to   { transform: translateX(0); opacity: 1; }
}

@keyframes slide-in-right {
  from { transform: translateX(20px); opacity: 0; }
  to   { transform: translateX(0); opacity: 1; }
}

/* ── Fade In (generic) ── */

@keyframes fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.fade-in {
  animation: fade-in var(--t-normal) var(--ease-out);
}

/* ── Status Bar Sweep (command bar) ── */

@keyframes bar-sweep {
  0%   { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.bar-sweep {
  background: linear-gradient(
    90deg,
    transparent 0%,
    var(--cyan-subtle) 50%,
    transparent 100%
  );
  background-size: 200% 100%;
  animation: bar-sweep 3s linear infinite;
}

/* ── Heartbeat Line (EKG effect for chart leading edge) ── */

@keyframes heartbeat-edge {
  0%, 100% { box-shadow: 2px 0 8px var(--green-glow); }
  50%      { box-shadow: 2px 0 16px var(--green-glow), 4px 0 24px rgba(0, 255, 136, 0.15); }
}

/* ── Reduced Motion ── */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
