/* ============================================
   BRAVIX - Animations & Keyframes
   ============================================ */

@keyframes auroraShift {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(2%, -2%) scale(1.05); }
  100% { transform: translate(-1%, 1%) scale(1); }
}

@keyframes neonFlow {
  0% { opacity: 0; transform: translateX(-100%); }
  50% { opacity: 0.5; }
  100% { opacity: 0; transform: translateX(100%); }
}

@keyframes scrollPulse {
  0%, 100% { opacity: 0.3; transform: scaleY(0.6); }
  50% { opacity: 1; transform: scaleY(1); }
}

@keyframes drawLine {
  to { stroke-dashoffset: 0; }
}

@keyframes barGrow {
  to { transform: scaleY(1); }
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: scale(0.9) translateY(20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

@keyframes floatSpace {
  0%, 100% {
    transform: translate(0, 0) rotate(0deg);
  }
  25% {
    transform: translate(4px, -10px) rotate(0.4deg);
  }
  50% {
    transform: translate(-3px, -16px) rotate(-0.3deg);
  }
  75% {
    transform: translate(-5px, -8px) rotate(0.25deg);
  }
}

@keyframes floatSpaceAlt {
  0%, 100% {
    transform: translate(0, 0) rotate(0deg);
  }
  33% {
    transform: translate(-5px, -12px) rotate(-0.35deg);
  }
  66% {
    transform: translate(4px, -14px) rotate(0.3deg);
  }
}

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 20px rgba(0, 212, 255, 0.2); }
  50% { box-shadow: 0 0 40px rgba(0, 212, 255, 0.4); }
}

@keyframes shimmer {
  0% { background-position: -200% center; }
  100% { background-position: 200% center; }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes rotateGlow {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes orbitFloat {
  0%, 100% {
    transform: translate(-50%, -50%) scale(var(--orbit-scale, 1)) translateY(0);
  }
  50% {
    transform: translate(-50%, -50%) scale(var(--orbit-scale, 1)) translateY(-8px);
  }
}

.hero__badge i {
  animation: pulse-glow 2s ease infinite;
}

.service-card__icon {
  animation: float 4s ease-in-out infinite;
}

.service-card:nth-child(2) .service-card__icon { animation-delay: 0.5s; }
.service-card:nth-child(3) .service-card__icon { animation-delay: 1s; }
.service-card:nth-child(4) .service-card__icon { animation-delay: 1.5s; }
.service-card:nth-child(5) .service-card__icon { animation-delay: 2s; }
.service-card:nth-child(6) .service-card__icon { animation-delay: 2.5s; }

.service-card:hover .service-card__icon {
  animation: none;
}

.nav__logo-dot {
  animation: pulse-glow 3s ease infinite;
}

.about__float {
  animation: floatSpace var(--float-duration, 7s) ease-in-out infinite;
  animation-delay: var(--float-delay, 0s);
  will-change: transform;
}

.about__float--1 {
  --float-duration: 9s;
  --float-delay: 0s;
}

.about__float--2 {
  --float-duration: 6.5s;
  --float-delay: 1.2s;
}

.about__float--3 {
  --float-duration: 7.8s;
  --float-delay: 2.4s;
}

.about__float--4 {
  --float-duration: 6s;
  --float-delay: 0.6s;
}

.about__float:hover,
.about__float:active {
  animation-play-state: paused;
}

.service-float {
  animation: floatSpace var(--float-duration, 7s) ease-in-out infinite;
  animation-delay: var(--float-delay, 0s);
  will-change: transform;
  height: 100%;
}

.service-float--1 { --float-duration: 7s;   --float-delay: 0s; }
.service-float--2 { --float-duration: 8.5s; --float-delay: 1s;   animation-name: floatSpaceAlt; }
.service-float--3 { --float-duration: 6.2s; --float-delay: 2.2s; }
.service-float--4 { --float-duration: 9s;   --float-delay: 0.5s; animation-name: floatSpaceAlt; }
.service-float--5 { --float-duration: 7.5s; --float-delay: 1.6s; }
.service-float--6 { --float-duration: 6.8s; --float-delay: 2.8s; animation-name: floatSpaceAlt; }

.service-float:hover,
.service-float:active {
  animation-play-state: paused;
}

.service-float .service-card__icon {
  animation: none;
}

.portfolio-float {
  animation: floatSpace var(--float-duration, 7s) ease-in-out infinite;
  animation-delay: var(--float-delay, 0s);
  will-change: transform;
  height: 100%;
}

.portfolio-float--1 { --float-duration: 7.2s; --float-delay: 0s; }
.portfolio-float--2 { --float-duration: 8s;   --float-delay: 1.4s; animation-name: floatSpaceAlt; }
.portfolio-float--3 { --float-duration: 6.5s; --float-delay: 0.8s; }
.portfolio-float--4 { --float-duration: 9.2s; --float-delay: 2s;   animation-name: floatSpaceAlt; }
.portfolio-float--5 { --float-duration: 7s;   --float-delay: 2.6s; }

.portfolio-float:hover,
.portfolio-float:active {
  animation-play-state: paused;
}

.expertise-hub {
  animation: pulse-glow 4s ease infinite;
}

.expertise-node__icon {
  animation: float 5s ease-in-out infinite;
}

.expertise-node:nth-child(2) .expertise-node__icon { animation-delay: 0.5s; }
.expertise-node:nth-child(3) .expertise-node__icon { animation-delay: 1s; }
.expertise-node:nth-child(4) .expertise-node__icon { animation-delay: 1.5s; }
.expertise-node:nth-child(5) .expertise-node__icon { animation-delay: 2s; }
.expertise-node:nth-child(6) .expertise-node__icon { animation-delay: 2.5s; }

@keyframes processSpiralFloat {
  0%, 100% {
    transform: translateX(-50%) translateY(0);
  }
  50% {
    transform: translateX(-50%) translateY(-5px);
  }
}

@keyframes processDotPulse {
  0%, 100% {
    box-shadow: 0 0 12px var(--neon-glow);
  }
  50% {
    box-shadow: 0 0 22px rgba(0, 212, 255, 0.65);
  }
}

@media (min-width: 769px) {
  .fab__toggle {
    animation: pulse-glow 3s ease infinite;
  }
}

.fab__toggle.active,
.fab__toggle:hover {
  animation: none;
}

/* Text reveal clip */
.text-reveal {
  overflow: hidden;
}

.text-reveal__inner {
  display: inline-block;
  transform: translateY(100%);
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-snap-type: none;
  }

  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .reveal-up {
    opacity: 1;
    transform: none;
  }

  .process-step {
    animation: none !important;
  }

  .process-step.active .process-step__dot {
    animation: none !important;
  }

  .process__spiral-progress {
    stroke-dashoffset: 0 !important;
    transition: none !important;
  }

  .orbit-card.is-front .orbit-card__inner {
    animation: none !important;
  }

  .orbit-card,
  .service-card__icon,
  .fab__toggle,
  .nav__logo-dot,
  .about__float,
  .service-float,
  .portfolio-float,
  .expertise-hub,
  .expertise-node__icon {
    animation: none;
  }
}
