/* ============================================
   Jai Bharat Engineers — Animations
   ============================================ */

/* Scroll reveal base */
[data-aos] {
  opacity: 0;
  transition-property: opacity, transform;
  transition-duration: 0.7s;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

[data-aos].aos-animate { opacity: 1; }

[data-aos="fade-up"] { transform: translateY(40px); }
[data-aos="fade-up"].aos-animate { transform: translateY(0); }

[data-aos="fade-down"] { transform: translateY(-40px); }
[data-aos="fade-down"].aos-animate { transform: translateY(0); }

[data-aos="fade-left"] { transform: translateX(40px); }
[data-aos="fade-left"].aos-animate { transform: translateX(0); }

[data-aos="fade-right"] { transform: translateX(-40px); }
[data-aos="fade-right"].aos-animate { transform: translateX(0); }

[data-aos="zoom-in"] { transform: scale(0.9); }
[data-aos="zoom-in"].aos-animate { transform: scale(1); }

[data-aos="zoom-out"] { transform: scale(1.1); }
[data-aos="zoom-out"].aos-animate { transform: scale(1); }

[data-aos-delay="100"] { transition-delay: 0.1s; }
[data-aos-delay="200"] { transition-delay: 0.2s; }
[data-aos-delay="300"] { transition-delay: 0.3s; }
[data-aos-delay="400"] { transition-delay: 0.4s; }
[data-aos-delay="500"] { transition-delay: 0.5s; }
[data-aos-delay="600"] { transition-delay: 0.6s; }

/* Floating cards bob */
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

@keyframes float-delay {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.floating-card { animation: float 4s ease-in-out infinite; }
.fc-2 { animation: float-delay 5s ease-in-out infinite; animation-delay: 0.5s; }
.fc-3 { animation: float 4.5s ease-in-out infinite; animation-delay: 1s; }
.fc-4 { animation: float-delay 5.5s ease-in-out infinite; animation-delay: 1.5s; }

/* Hero shapes pulse */
@keyframes pulse-ring {
  0%, 100% { transform: scale(1); opacity: 0.6; }
  50% { transform: scale(1.08); opacity: 1; }
}

.hero-shape { animation: pulse-ring 6s ease-in-out infinite; }
.hero-shape-2 { animation-delay: 2s; }

/* Gradient glow shimmer */
@keyframes glow-shift {
  0%, 100% { opacity: 0.2; transform: translate(0, 0); }
  50% { opacity: 0.35; transform: translate(20px, -15px); }
}

.hero-glow-1 { animation: glow-shift 8s ease-in-out infinite; }
.hero-glow-2 { animation: glow-shift 10s ease-in-out infinite reverse; }

/* Magnetic button feel via CSS */
.btn {
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1),
              box-shadow 0.35s ease,
              background 0.35s ease,
              color 0.35s ease;
}

/* Counter number tick */
.trust-number {
  transition: transform 0.3s ease;
}

/* Page load fade */
@keyframes page-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

body { animation: page-fade-in 0.4s ease; }

/* Skeleton shimmer for placeholders */
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.img-placeholder {
  background-size: 200% 100%;
}

/* Rotate gear icon */
@keyframes spin-slow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.spin-slow {
  animation: spin-slow 20s linear infinite;
}

/* Bounce arrow */
@keyframes bounce-y {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(8px); }
}

.scroll-hint {
  animation: bounce-y 2s ease-in-out infinite;
}

/* Gallery filter transition */
.gallery-item {
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.gallery-item.hidden {
  opacity: 0;
  transform: scale(0.9);
  pointer-events: none;
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

/* Process line fill when in view */
.process-timeline.in-view .process-line-fill {
  width: 100%;
}

@media (max-width: 992px) {
  .process-timeline.in-view .process-line-fill {
    width: 3px;
    height: 100%;
  }
}

/* Hover lift utility */
.hover-lift {
  transition: transform var(--transition), box-shadow var(--transition);
}
.hover-lift:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
}

/* Focus visible for a11y */
:focus-visible {
  outline: 2px solid var(--secondary);
  outline-offset: 3px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  [data-aos] {
    opacity: 1;
    transform: none;
  }
  html { scroll-behavior: auto; }
}
