/* =============================================
   AARMAN AUTOMATION - ANIMATIONS
   ============================================= */

/* ---- Keyframes ---- */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

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

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

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

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

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

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.05); opacity: 0.85; }
}

@keyframes rotateGear {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

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

@keyframes borderGlow {
  0%, 100% { border-color: rgba(26, 86, 219, 0.3); }
  50% { border-color: rgba(26, 86, 219, 0.8); }
}

@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ---- Scroll-triggered animation classes ---- */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-on-scroll.from-left {
  transform: translateX(-30px);
}

.animate-on-scroll.from-right {
  transform: translateX(30px);
}

.animate-on-scroll.scale-up {
  transform: scale(0.9);
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0) translateX(0) scale(1);
}

/* Stagger delays */
.animate-delay-1 { transition-delay: 0.1s; }
.animate-delay-2 { transition-delay: 0.2s; }
.animate-delay-3 { transition-delay: 0.3s; }
.animate-delay-4 { transition-delay: 0.4s; }
.animate-delay-5 { transition-delay: 0.5s; }
.animate-delay-6 { transition-delay: 0.6s; }

/* ---- Hero animations ---- */
.hero-content .container-left > * {
  animation: fadeInLeft 0.7s ease forwards;
  opacity: 0;
}

.hero-content .container-left > *:nth-child(1) { animation-delay: 0.1s; }
.hero-content .container-left > *:nth-child(2) { animation-delay: 0.25s; }
.hero-content .container-left > *:nth-child(3) { animation-delay: 0.4s; }
.hero-content .container-left > *:nth-child(4) { animation-delay: 0.55s; }

.hero-image-side {
  animation: fadeInRight 0.8s ease 0.3s forwards;
  opacity: 0;
}

/* ---- Navbar slide in ---- */
.top-bar,
.navbar {
  animation: slideInDown 0.4s ease forwards;
}

/* ---- Gear rotation for logo ---- */
.logo-gear-outer {
  transform-origin: center;
  animation: rotateGear 12s linear infinite;
  transform-box: fill-box;
}

.logo-gear-inner {
  transform-origin: center;
  animation: rotateGear 8s linear infinite reverse;
  transform-box: fill-box;
}

/* ---- Stat card count animation ---- */
.stat-number.counting {
  animation: countUp 0.3s ease forwards;
}

/* ---- Card hover lift ---- */
.hover-lift {
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.hover-lift:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 36px rgba(13, 45, 110, 0.15);
}

/* ---- Shimmer button effect ---- */
.btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(
    to right,
    transparent,
    rgba(255,255,255,0.15),
    transparent
  );
  transform: skewX(-20deg);
  transition: left 0.5s ease;
}

.btn-primary:hover::before {
  left: 160%;
}

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

/* ---- Marquee / infinite scroll ---- */
.marquee-wrapper {
  overflow: hidden;
  white-space: nowrap;
}

.marquee-track {
  display: inline-flex;
  animation: marquee 20s linear infinite;
}

.marquee-track:hover {
  animation-play-state: paused;
}

/* ---- Number counter rolling ---- */
@keyframes rollNumber {
  0% { opacity: 0; transform: translateY(100%); }
  20% { opacity: 1; }
  80% { opacity: 1; }
  100% { opacity: 1; transform: translateY(0); }
}

/* ---- Process step entrance ---- */
.process-step {
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

/* ---- Service card entrance ---- */
.service-card {
  transition: background 0.2s ease;
}

/* ---- Quality step highlight ---- */
.quality-step-num {
  transition: background 0.3s ease, transform 0.3s ease;
}

.quality-step:hover .quality-step-num {
  background: var(--color-accent);
  transform: scale(1.1);
}

/* ---- Typing cursor ---- */
.typed-cursor {
  display: inline-block;
  width: 3px;
  height: 1em;
  background: var(--color-accent);
  margin-left: 2px;
  vertical-align: text-bottom;
  animation: pulse 0.8s ease infinite;
}

/* ---- Image reveal ---- */
.img-reveal {
  overflow: hidden;
  border-radius: var(--radius-xl);
}

.img-reveal img {
  transition: transform 0.5s ease;
}

.img-reveal:hover img {
  transform: scale(1.04);
}

/* ---- Underline animation ---- */
.animated-underline {
  position: relative;
  display: inline-block;
}

.animated-underline::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-accent);
  transition: width 0.3s ease;
}

.animated-underline:hover::after {
  width: 100%;
}

/* ---- Scroll indicator ---- */
.scroll-indicator {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  margin-top: var(--space-12);
  opacity: 0.6;
  animation: float 2s ease infinite;
}

.scroll-indicator span {
  font-size: var(--text-xs);
  color: rgba(255,255,255,0.6);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.scroll-indicator-bar {
  width: 1px;
  height: 48px;
  background: linear-gradient(to bottom, transparent, rgba(255,255,255,0.5));
}

/* ---- Active nav indicator ---- */
.nav-link.active {
  position: relative;
}

/* ---- Mobile menu animation ---- */
.mobile-menu {
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-menu.open {
  transform: translateX(0);
}
