/* MicroHub - Animations CSS */

/* Hero typewriter cursor */
.typewriter-cursor {
  display: inline-block;
  width: 3px;
  background: var(--primary-light);
  animation: blink 0.75s step-end infinite;
  margin-left: 2px;
  vertical-align: middle;
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* Fade in up */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(40px); }
  to { opacity: 1; transform: translateY(0); }
}
.fade-in-up { animation: fadeInUp 0.8s ease forwards; }
.fade-in-up-1 { animation: fadeInUp 0.8s ease 0.1s both; }
.fade-in-up-2 { animation: fadeInUp 0.8s ease 0.25s both; }
.fade-in-up-3 { animation: fadeInUp 0.8s ease 0.4s both; }
.fade-in-up-4 { animation: fadeInUp 0.8s ease 0.55s both; }

/* Fade in */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
.fade-in { animation: fadeIn 1s ease both; }

/* Scale in */
@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.85); }
  to { opacity: 1; transform: scale(1); }
}
.scale-in { animation: scaleIn 0.7s ease both; }

/* Slide in left */
@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-40px); }
  to { opacity: 1; transform: translateX(0); }
}
.slide-in-left { animation: slideInLeft 0.8s ease both; }

/* Slide in right */
@keyframes slideInRight {
  from { opacity: 0; transform: translateX(40px); }
  to { opacity: 1; transform: translateX(0); }
}
.slide-in-right { animation: slideInRight 0.8s ease both; }

/* Glow pulse */
@keyframes glow-pulse {
  0%, 100% { box-shadow: 0 0 20px rgba(99,102,241,0.2); }
  50% { box-shadow: 0 0 40px rgba(99,102,241,0.5); }
}
.glow-pulse { animation: glow-pulse 3s ease-in-out infinite; }

/* Rotate */
@keyframes rotate-slow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
.rotate-slow { animation: rotate-slow 20s linear infinite; }
.rotate-reverse { animation: rotate-slow 16s linear infinite reverse; }

/* Orbit */
@keyframes orbit {
  from { transform: rotate(0deg) translateX(110px) rotate(0deg); }
  to { transform: rotate(360deg) translateX(110px) rotate(-360deg); }
}
@keyframes orbit-reverse {
  from { transform: rotate(360deg) translateX(80px) rotate(-360deg); }
  to { transform: rotate(0deg) translateX(80px) rotate(0deg); }
}

/* Number count animation (JS-driven, but prepped with class) */
.counting { display: inline-block; }

/* Hover lift */
.hover-lift {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.hover-lift:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

/* Hover grow icon */
.hover-icon {
  transition: transform 0.3s ease;
}
.hover-icon:hover { transform: scale(1.15); }

/* Underline draw */
.underline-draw {
  position: relative;
}
.underline-draw::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: width 0.3s ease;
}
.underline-draw:hover::after { width: 100%; }

/* Page transition */
.page-transition {
  animation: fadeIn 0.5s ease;
}

/* Loading skeleton */
@keyframes skeleton-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}
.skeleton {
  background: var(--border);
  border-radius: 4px;
  animation: skeleton-pulse 1.5s ease-in-out infinite;
}

/* Globe badge float */
@keyframes globe-badge-float {
  0%, 100% { transform: translateY(0) translateX(0); }
  25% { transform: translateY(-8px) translateX(2px); }
  75% { transform: translateY(4px) translateX(-2px); }
}
.globe-badge { animation: globe-badge-float 5s ease-in-out infinite; }
.globe-badge-2 { animation: globe-badge-float 6s ease-in-out 1s infinite; }
.globe-badge-3 { animation: globe-badge-float 7s ease-in-out 2s infinite; }

/* Notification pop */
@keyframes notif-pop {
  0% { transform: scale(0) translateY(10px); opacity: 0; }
  70% { transform: scale(1.08) translateY(-2px); opacity: 1; }
  100% { transform: scale(1) translateY(0); opacity: 1; }
}
.notif-pop { animation: notif-pop 0.5s ease 1s both; }
.notif-pop-2 { animation: notif-pop 0.5s ease 1.5s both; }

/* Wave animation for hero */
@keyframes wave {
  0%, 100% { transform: scaleY(1); }
  50% { transform: scaleY(0.6); }
}
.wave-bar {
  display: inline-block;
  width: 3px;
  height: 20px;
  background: var(--primary-light);
  border-radius: 2px;
  margin: 0 1px;
  animation: wave 1.2s ease-in-out infinite;
}
.wave-bar:nth-child(2) { animation-delay: 0.15s; }
.wave-bar:nth-child(3) { animation-delay: 0.3s; }
.wave-bar:nth-child(4) { animation-delay: 0.45s; }
.wave-bar:nth-child(5) { animation-delay: 0.6s; }

/* Star twinkle */
@keyframes twinkle {
  0%, 100% { opacity: 0.2; transform: scale(0.8); }
  50% { opacity: 1; transform: scale(1); }
}
