@keyframes auroraDrift {
  0%, 100% {
    transform: translate(0, 0) scale(1);
  }
  40% {
    transform: translate(5%, 10%) scale(1.06);
  }
  70% {
    transform: translate(-4%, 6%) scale(0.96);
  }
}

@keyframes auroraCurtain {
  0%, 100% {
    transform: skewY(-7deg) translateX(0);
    opacity: 0.55;
  }
  50% {
    transform: skewY(-5deg) translateX(4%);
    opacity: 0.85;
  }
}

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

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

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

@keyframes float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  33% { transform: translateY(-12px) rotate(1deg); }
  66% { transform: translateY(-6px) rotate(-1deg); }
}

@keyframes floatSlow {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(20px, -30px) scale(1.05); }
}

@keyframes pulseGlow {
  0%, 100% { opacity: 0.4; transform: scale(1); }
  50% { opacity: 0.7; transform: scale(1.08); }
}

@keyframes shimmer {
  0% { background-position: -200% center; }
  100% { background-position: 200% center; }
}

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

@keyframes iconPop {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.12); }
}

@keyframes drawLine {
  from { width: 0; }
  to { width: 100%; }
}

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

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

.animate-fade-in-up {
  animation: fadeInUp 0.6s ease forwards;
}

.animate-fade-in {
  animation: fadeIn 0.5s ease forwards;
}

.animate-delay-1 { animation-delay: 0.1s; opacity: 0; }
.animate-delay-2 { animation-delay: 0.2s; opacity: 0; }
.animate-delay-3 { animation-delay: 0.3s; opacity: 0; }
.animate-delay-4 { animation-delay: 0.4s; opacity: 0; }
.animate-delay-5 { animation-delay: 0.5s; opacity: 0; }

/* Floating orbs */
.hero__orbs {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: -1;
}

.hero__orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  animation: floatSlow 8s ease-in-out infinite;
}

.hero__orb--1 {
  width: 400px;
  height: 400px;
  background: rgba(31, 125, 184, 0.18);
  top: -10%;
  right: -5%;
  animation-delay: 0s;
}

.hero__orb--2 {
  width: 300px;
  height: 300px;
  background: rgba(56, 189, 248, 0.14);
  bottom: 10%;
  left: -8%;
  animation-delay: -3s;
  animation-duration: 10s;
}

.hero__orb--3 {
  width: 200px;
  height: 200px;
  background: rgba(31, 125, 184, 0.1);
  top: 40%;
  right: 30%;
  animation-delay: -5s;
  animation-duration: 12s;
}

/* Hero card float */
.hero__card {
  animation: float 6s ease-in-out infinite;
}

/* Gradient text shimmer */
.hero__title span {
  background: linear-gradient(
    135deg,
    var(--color-primary) 0%,
    var(--color-accent) 40%,
    var(--color-primary) 80%,
    var(--color-accent) 100%
  );
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientShift 4s ease infinite;
}

/* Badge shimmer */
.badge--shimmer {
  position: relative;
  overflow: hidden;
}

.badge--shimmer::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.3) 50%,
    transparent 100%
  );
  background-size: 200% 100%;
  animation: shimmer 3s ease infinite;
}

/* Card icon hover pop */
.card:hover .card__icon {
  animation: iconPop 0.5s ease;
}

/* CTA pulse ring */
.cta {
  position: relative;
}

.cta::after {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  background: linear-gradient(135deg, var(--color-accent), var(--color-primary));
  opacity: 0;
  z-index: -1;
  animation: pulseGlow 3s ease-in-out infinite;
  border-radius: var(--radius-2xl);
}

/* Reveal animations */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.65s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-scale {
  opacity: 0;
  transform: scale(0.94);
  transition: opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal-scale.is-visible {
  opacity: 1;
  transform: scale(1);
}

.reveal-left {
  opacity: 0;
  transform: translateX(-32px);
  transition: opacity 0.65s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal-left.is-visible {
  opacity: 1;
  transform: translateX(0);
}

.reveal-right {
  opacity: 0;
  transform: translateX(32px);
  transition: opacity 0.65s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal-right.is-visible {
  opacity: 1;
  transform: translateX(0);
}

/* Stagger children */
.stagger-children .reveal:nth-child(1) { transition-delay: 0s; }
.stagger-children .reveal:nth-child(2) { transition-delay: 0.08s; }
.stagger-children .reveal:nth-child(3) { transition-delay: 0.16s; }
.stagger-children .reveal:nth-child(4) { transition-delay: 0.24s; }
.stagger-children .reveal:nth-child(5) { transition-delay: 0.32s; }
.stagger-children .reveal:nth-child(6) { transition-delay: 0.4s; }

/* Stat counter glow */
.stat__value {
  transition: transform 0.3s ease;
}

.stat:hover .stat__value {
  transform: scale(1.05);
  text-shadow: 0 0 24px rgba(31, 125, 184, 0.3);
}

/* Logo icon subtle pulse */
.header__logo-mark {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.header__logo:hover .header__logo-mark {
  transform: scale(1.04);
}

/* Button ripple feel */
.btn--primary {
  position: relative;
  overflow: hidden;
}

.btn--primary::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent, rgba(255,255,255,0.15), transparent);
  transform: translateX(-100%);
  transition: transform 0.5s ease;
}

.btn--primary:hover::after {
  transform: translateX(100%);
}

/* Section header underline draw */
.section-header__label {
  position: relative;
  display: inline-block;
}

.section-header__label::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%);
  height: 2px;
  width: 0;
  background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
  border-radius: 2px;
  transition: width 0.6s cubic-bezier(0.22, 1, 0.36, 1) 0.2s;
}

.section-header.is-visible .section-header__label::after {
  width: 100%;
}

/* Card 3D tilt on hover (desktop only) */
@media (hover: hover) and (pointer: fine) {
  .card--tilt {
    transform-style: preserve-3d;
    perspective: 800px;
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.4s ease;
  }

  .card--tilt:hover {
    transform: translateY(-6px) rotateX(2deg) rotateY(-2deg);
    box-shadow: 0 24px 48px -12px rgba(31, 125, 184, 0.2);
  }
}

/* Particle dots in hero */
.hero__particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  overflow: hidden;
}

.hero__particle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: var(--color-accent);
  border-radius: 50%;
  opacity: 0;
  animation: particleFloat 6s ease-in-out infinite;
}

.hero__particle:nth-child(1) { left: 10%; top: 20%; animation-delay: 0s; }
.hero__particle:nth-child(2) { left: 25%; top: 60%; animation-delay: 1s; }
.hero__particle:nth-child(3) { left: 60%; top: 15%; animation-delay: 2s; }
.hero__particle:nth-child(4) { left: 80%; top: 45%; animation-delay: 0.5s; }
.hero__particle:nth-child(5) { left: 45%; top: 75%; animation-delay: 1.5s; }
.hero__particle:nth-child(6) { left: 70%; top: 80%; animation-delay: 2.5s; }

@keyframes particleFloat {
  0%, 100% { opacity: 0; transform: translateY(0) scale(0.5); }
  20% { opacity: 0.6; }
  50% { opacity: 0.3; transform: translateY(-40px) scale(1); }
  80% { opacity: 0; }
}

/* Glow ring on hero CTA button */
.hero .btn--primary.btn--lg {
  animation: btnPulse 3s ease-in-out infinite;
}

@keyframes btnPulse {
  0%, 100% { box-shadow: var(--shadow-md), 0 0 0 0 rgba(31, 125, 184, 0); }
  50% { box-shadow: var(--shadow-lg), 0 0 0 6px rgba(31, 125, 184, 0.12); }
}

/* Testimonial slide-in stagger */
.testimonial {
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.4s ease;
}

@media (hover: hover) {
  .testimonial:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
  }
}

/* Page hero entrance */
.page-hero__title {
  animation: fadeInUp 0.7s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.page-hero__desc {
  animation: fadeInUp 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.15s forwards;
  opacity: 0;
}

/* Mobile menu slide */
.mobile-menu {
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.mobile-menu.is-open .mobile-menu__link {
  animation: slideUpStagger 0.4s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  opacity: 0;
}

.mobile-menu.is-open .mobile-menu__link:nth-child(1) { animation-delay: 0.05s; }
.mobile-menu.is-open .mobile-menu__link:nth-child(2) { animation-delay: 0.1s; }
.mobile-menu.is-open .mobile-menu__link:nth-child(3) { animation-delay: 0.15s; }
.mobile-menu.is-open .mobile-menu__link:nth-child(4) { animation-delay: 0.2s; }

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

  .hero__card {
    animation: none;
  }
}
