/**
 * GCC Bridge Console — Animations
 * Purposeful, restrained motion. Nothing gratuitous.
 */

/* ==========================================
   KEYFRAMES
   ========================================== */

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

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

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

@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

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

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

@keyframes scanline {
  0% { transform: translateY(-100%); }
  100% { transform: translateY(100vh); }
}

@keyframes shimmer {
  0% { background-position: -400px 0; }
  100% { background-position: 400px 0; }
}

@keyframes blinkCursor {
  0%, 100% { border-color: transparent; }
  50% { border-color: var(--accent, #3b9ece); }
}

@keyframes gridPulse {
  0%, 100% { opacity: 0.03; }
  50% { opacity: 0.06; }
}

/* ==========================================
   ANIMATION CLASSES
   ========================================== */

.animate-fadeIn { animation: fadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1); }
.animate-fadeInUp { animation: fadeInUp 0.4s cubic-bezier(0.16, 1, 0.3, 1); }
.animate-fadeInDown { animation: fadeInDown 0.4s cubic-bezier(0.16, 1, 0.3, 1); }
.animate-scaleIn { animation: scaleIn 0.3s cubic-bezier(0.16, 1, 0.3, 1); }
.animate-pulse { animation: pulse 2.5s ease-in-out infinite; }

/* ==========================================
   DELAY UTILITIES
   ========================================== */

.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }
.delay-400 { animation-delay: 0.4s; }
.delay-500 { animation-delay: 0.5s; }
.delay-600 { animation-delay: 0.6s; }
.delay-800 { animation-delay: 0.8s; }
.delay-1000 { animation-delay: 1s; }

/* ==========================================
   SCROLL REVEAL — subtle upward fade
   ========================================== */

.scroll-fade-in,
.js-enabled .scroll-fade-in,
.js-enabled .scroll-fade-in.visible {
  opacity: 1;
  transform: none;
  transition: none;
}

/* Staggered children */
.js-enabled .scroll-fade-in.delay-200,
.js-enabled .scroll-fade-in.delay-400,
.js-enabled .scroll-fade-in.delay-600,
.js-enabled .scroll-fade-in.delay-800,
.js-enabled .scroll-fade-in.delay-1000 { transition-delay: 0s; }

/* ==========================================
   LOADING
   ========================================== */

.loading-spinner {
  display: inline-block;
  width: 24px;
  height: 24px;
  border: 2px solid var(--accent-dim, #1a4560);
  border-top-color: var(--accent, #3b9ece);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ==========================================
   CURSOR BLINK — for typewriter elements
   ========================================== */

.cursor-blink::after {
  content: '';
  display: inline-block;
  width: 2px;
  height: 1em;
  background: var(--accent, #3b9ece);
  margin-left: 2px;
  vertical-align: text-bottom;
  animation: pulse 1s step-end infinite;
}

/* ==========================================
   HOVER STATES — functional, not decorative
   ========================================== */

.hover-lift {
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.hover-lift:hover { transform: translateY(-2px); }

/* ==========================================
   REDUCED MOTION
   ========================================== */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .scroll-fade-in { opacity: 1 !important; transform: none !important; }
}
