/* ============================================
   INSULA BIOMEDICAL — Animation Styles
   CSS Keyframes + GSAP Animation Classes
   ============================================ */

/* ---------- GSAP ANIMATION BASE STATES ---------- */
.animate-in {
  opacity: 0;
  transform: translateY(40px);
  will-change: transform, opacity;
}

.animate-in-left {
  opacity: 0;
  transform: translateX(-40px);
  will-change: transform, opacity;
}

.animate-in-right {
  opacity: 0;
  transform: translateX(40px);
  will-change: transform, opacity;
}

.animate-in-scale {
  opacity: 0;
  transform: scale(0.95);
  will-change: transform, opacity;
}

.stagger-item {
  opacity: 0;
  transform: translateY(30px);
  will-change: transform, opacity;
}

/* ---------- HERO ORB FLOATING ---------- */
@keyframes orb-float-1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  25% { transform: translate(30px, -20px) scale(1.05); }
  50% { transform: translate(-20px, 20px) scale(0.95); }
  75% { transform: translate(15px, 10px) scale(1.02); }
}

@keyframes orb-float-2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  25% { transform: translate(-25px, 15px) scale(0.98); }
  50% { transform: translate(20px, -25px) scale(1.05); }
  75% { transform: translate(-10px, -15px) scale(1); }
}

@keyframes orb-float-3 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(20px, 20px) scale(1.03); }
  66% { transform: translate(-15px, -10px) scale(0.97); }
}

.hero-orb-1 {
  animation: orb-float-1 12s ease-in-out infinite;
}

.hero-orb-2 {
  animation: orb-float-2 15s ease-in-out infinite;
}

.hero-orb-3 {
  animation: orb-float-3 10s ease-in-out infinite;
}

/* ---------- SCROLL INDICATOR BOUNCE ---------- */
@keyframes scroll-bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(8px); }
}

.hero-scroll {
  animation: scroll-bounce 2s ease-in-out infinite;
}

@keyframes scroll-dot {
  0% { top: 6px; opacity: 1; }
  100% { top: 18px; opacity: 0; }
}

.hero-scroll-icon::after {
  animation: scroll-dot 1.5s ease-in-out infinite;
}

/* ---------- MARQUEE SCROLL ---------- */
@keyframes marquee-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

@keyframes marquee-scroll-reverse {
  0% { transform: translateX(-50%); }
  100% { transform: translateX(0); }
}

.marquee-track {
  animation: marquee-scroll 40s linear infinite;
}

.marquee-track-reverse {
  animation: marquee-scroll-reverse 40s linear infinite;
}

/* ---------- PARTNER BADGE FLOAT ---------- */
@keyframes badge-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.partner-badge:nth-child(1) { animation: badge-float 3s ease-in-out infinite; }
.partner-badge:nth-child(2) { animation: badge-float 3.5s ease-in-out 0.2s infinite; }
.partner-badge:nth-child(3) { animation: badge-float 2.8s ease-in-out 0.4s infinite; }
.partner-badge:nth-child(4) { animation: badge-float 3.2s ease-in-out 0.6s infinite; }
.partner-badge:nth-child(5) { animation: badge-float 3.8s ease-in-out 0.8s infinite; }

/* ---------- FADE IN KEYFRAME (used by tabs) ---------- */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- PULSE GLOW (CTA buttons) ---------- */
@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(14, 90, 130, 0.25); }
  50% { box-shadow: 0 0 20px 4px rgba(14, 90, 130, 0.12); }
}

.btn-primary {
  animation: pulse-glow 3s ease-in-out infinite;
}

.btn-primary:hover {
  animation: none;
}

/* ---------- LOADING / SKELETON ---------- */
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* ---------- COUNTER FLASH ---------- */
@keyframes counter-flash {
  0% { color: var(--accent-primary); }
  100% { color: var(--text-primary); }
}

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

  .animate-in,
  .animate-in-left,
  .animate-in-right,
  .animate-in-scale,
  .stagger-item {
    opacity: 1;
    transform: none;
  }

  .marquee-track,
  .marquee-track-reverse {
    animation: none;
  }

  .hero-orb-1,
  .hero-orb-2,
  .hero-orb-3 {
    animation: none;
  }
}
