/* ─── Keyframes ─────────────────────────────────── */
@keyframes spin { to { transform: rotate(360deg); } }

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.85); }
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.7); }
  to   { opacity: 1; transform: scale(1); }
}

@keyframes slideRight {
  from { opacity: 0; transform: translateX(-24px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes gradientShift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes borderGlow {
  0%, 100% { box-shadow: 0 0 20px rgba(0,178,255,0.1); }
  50%       { box-shadow: 0 0 40px rgba(0,178,255,0.3); }
}

@keyframes shimmer {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-12px); }
}

@keyframes countUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ─── Entrance Animations (JS-triggered) ─────────── */
.anim-fade-up {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
}
.anim-fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

.anim-fade-in {
  opacity: 0;
  transition: opacity 0.6s var(--ease-out);
}
.anim-fade-in.visible { opacity: 1; }

.anim-scale-in {
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 0.5s var(--ease-out), transform 0.5s var(--ease-spring);
}
.anim-scale-in.visible { opacity: 1; transform: scale(1); }

/* Stagger children */
.stagger-children > * { opacity: 0; transform: translateY(20px); transition: opacity 0.5s var(--ease-out), transform 0.5s var(--ease-out); }
.stagger-children.visible > *:nth-child(1) { opacity: 1; transform: none; transition-delay: 0ms; }
.stagger-children.visible > *:nth-child(2) { opacity: 1; transform: none; transition-delay: 80ms; }
.stagger-children.visible > *:nth-child(3) { opacity: 1; transform: none; transition-delay: 160ms; }
.stagger-children.visible > *:nth-child(4) { opacity: 1; transform: none; transition-delay: 240ms; }
.stagger-children.visible > *:nth-child(5) { opacity: 1; transform: none; transition-delay: 320ms; }
.stagger-children.visible > *:nth-child(6) { opacity: 1; transform: none; transition-delay: 400ms; }

/* Hero specific */
.hero-content > * { animation: fadeUp 0.7s var(--ease-out) both; }
.hero-content > *:nth-child(1) { animation-delay: 0.1s; }
.hero-content > *:nth-child(2) { animation-delay: 0.2s; }
.hero-content > *:nth-child(3) { animation-delay: 0.3s; }
.hero-content > *:nth-child(4) { animation-delay: 0.4s; }
.hero-content > *:nth-child(5) { animation-delay: 0.5s; }

/* Gradient text animation */
.text-gradient-animate {
  background: linear-gradient(135deg, #00B2FF, #21E6FF, #7C3CFF, #00B2FF);
  background-size: 300% 300%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientShift 4s ease infinite;
}

/* Floating badge */
.badge-float { animation: float 4s ease-in-out infinite; }

/* Shimmer loading */
.skeleton {
  background: linear-gradient(90deg, var(--color-surface) 25%, rgba(255,255,255,0.04) 50%, var(--color-surface) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}

/* Glow pulse on active cards */
.card--active {
  animation: borderGlow 2.5s ease-in-out infinite;
  border-color: rgba(0,178,255,0.35);
}

/* Typewriter cursor */
.typewriter::after {
  content: '|';
  color: var(--color-cyber-blue);
  animation: pulse 1s step-end infinite;
}

/* Progress bar */
.progress-bar {
  height: 3px;
  background: var(--color-border);
  border-radius: 2px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: var(--gradient-brand);
  border-radius: 2px;
  transition: width 0.4s var(--ease-smooth);
}

/* Notification toast */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-input);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  animation: slideRight 0.4s var(--ease-spring) both;
  max-width: 360px;
}
.toast.exit { animation: fadeIn 0.3s var(--ease-smooth) reverse both; }
