/* ==========================================================================
   Pramukh Engineering Works - Level 1 Industrial Animation System
   ========================================================================== */

:root {
  --animation-fast: 400ms cubic-bezier(0.16, 1, 0.3, 1);
  --animation-medium: 650ms cubic-bezier(0.16, 1, 0.3, 1);
  --animation-slow: 850ms cubic-bezier(0.16, 1, 0.3, 1);
}

html {
  scroll-behavior: smooth;
}

body {
  overflow-x: hidden;
}

img {
  will-change: transform;
}

/* ==========================================================================
   1. SCROLL REVEAL ANIMATIONS
   ========================================================================== */

.reveal,
.fade-up,
.fade-left,
.fade-right,
.fade-scale,
.zoom-in,
.scale-in,
.slide-up {
  opacity: 0;
  transition: opacity var(--animation-medium), transform var(--animation-medium);
  will-change: transform, opacity;
  backface-visibility: hidden;
}

.reveal.is-visible,
.fade-up.is-visible,
.fade-left.is-visible,
.fade-right.is-visible,
.fade-scale.is-visible,
.zoom-in.is-visible,
.scale-in.is-visible,
.slide-up.is-visible {
  opacity: 1;
  transform: translate3d(0, 0, 0) scale(1);
}

/* Smooth Controlled Translation Distances */
.fade-up {
  transform: translate3d(0, 20px, 0);
}

.slide-up {
  transform: translate3d(0, 14px, 0);
}

.scale-in {
  transform: scale(0.95);
}

.fade-left {
  transform: translate3d(-20px, 0, 0);
}

.fade-right {
  transform: translate3d(20px, 0, 0);
}

.fade-scale {
  transform: scale(0.96) translate3d(0, 10px, 0);
}

.zoom-in {
  transform: scale(0.97);
}

/* ==========================================================================
   2. STAGGERED REVEALS
   ========================================================================== */

.stagger > *,
.stagger-grid > * {
  opacity: 0;
  transform: translate3d(0, 18px, 0);
  transition: opacity var(--animation-medium), transform var(--animation-medium);
  transition-delay: var(--delay, 0ms);
  will-change: transform, opacity;
}

.stagger > *.is-visible,
.stagger-grid > *.is-visible,
.stagger-item.is-visible {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

/* ==========================================================================
   3. NAVBAR & NAVIGATION MICRO-INTERACTIONS
   ========================================================================== */

.navbar {
  transition: background-color 0.4s ease, box-shadow 0.4s ease, padding 0.4s ease;
}

.navbar.scrolled {
  background: rgba(255, 255, 255, 0.96) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 8px 28px rgba(7, 27, 59, 0.08);
}

.nav-link {
  position: relative;
  transition: color 0.3s ease;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 0;
  height: 2px;
  background: var(--secondary, #D89A2B);
  transition: width 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  border-radius: 1px;
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

/* Navbar Toggler Animation */
.navbar-toggler {
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.navbar-toggler:focus {
  box-shadow: 0 0 0 0.2rem rgba(216, 154, 43, 0.2);
}

/* ==========================================================================
   4. BUTTON INTERACTION SYSTEM
   ========================================================================== */

.quote-btn,
.btn-primary-custom,
.btn-outline-custom,
.about-btn,
.cta-btn,
.contact-submit-btn,
.filter-btn,
.view-details-btn {
  position: relative;
  overflow: hidden;
  transform: translateY(0);
  transition: transform var(--animation-fast),
              background-color var(--animation-fast),
              color var(--animation-fast),
              box-shadow var(--animation-fast),
              border-color var(--animation-fast);
  will-change: transform, box-shadow;
}

/* Subtle Shimmer/Light Sweep on Button Hover */
.quote-btn::before,
.btn-primary-custom::before,
.btn-outline-custom::before,
.about-btn::before,
.cta-btn::before,
.contact-submit-btn::before,
.view-details-btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(120deg, transparent 0%, rgba(255, 255, 255, 0.22) 50%, transparent 100%);
  transform: translateX(-100%);
  transition: transform 0.65s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
  z-index: 1;
}

.quote-btn:hover,
.btn-primary-custom:hover,
.btn-outline-custom:hover,
.about-btn:hover,
.cta-btn:hover,
.contact-submit-btn:hover,
.view-details-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(7, 27, 59, 0.15);
}

.quote-btn:hover::before,
.btn-primary-custom:hover::before,
.btn-outline-custom:hover::before,
.about-btn:hover::before,
.cta-btn:hover::before,
.contact-submit-btn:hover::before,
.view-details-btn:hover::before {
  transform: translateX(100%);
}

.quote-btn i,
.about-btn i,
.cta-btn i,
.contact-submit-btn i,
.view-details-btn i {
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: inline-block;
}

.quote-btn:hover i,
.about-btn:hover i,
.cta-btn:hover i,
.contact-submit-btn:hover i,
.view-details-btn:hover i {
  transform: translateX(4px);
}

/* Active Button State */
.quote-btn:active,
.btn-primary-custom:active,
.btn-outline-custom:active,
.about-btn:active,
.cta-btn:active,
.contact-submit-btn:active {
  transform: translateY(0);
  box-shadow: 0 4px 12px rgba(7, 27, 59, 0.1);
}

/* ==========================================================================
   5. CARD HOVER & INTERACTION SYSTEM
   ========================================================================== */

/* Universal Industrial Card Hover Base */
.capability-item,
.industry-card,
.client-item,
.stat-item,
.purpose-card,
.why-card,
.leader-card,
.infra-card,
.product-card,
.certification-item,
.trust-item {
  position: relative;
  transition: transform var(--animation-medium),
              box-shadow var(--animation-medium),
              border-color var(--animation-medium),
              background-color var(--animation-medium);
  will-change: transform, box-shadow;
}

/* Card Subtle Lift & Shadow Enhancement */
.capability-item:hover,
.industry-card:hover,
.purpose-card:hover,
.why-card:hover,
.leader-card:hover,
.infra-card:hover,
.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(7, 27, 59, 0.11);
}

/* Card Accent Border Highlight on Hover */
.capability-item::after,
.industry-card::after,
.product-card::after,
.why-card::after,
.infra-card::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--secondary, #D89A2B);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform var(--animation-fast);
  border-radius: 2px 2px 0 0;
  pointer-events: none;
}

.capability-item:hover::after,
.industry-card:hover::after,
.product-card:hover::after,
.why-card:hover::after,
.infra-card:hover::after {
  transform: scaleX(1);
}

/* Card Image Subtly Zoom */
.about-image img,
.industry-image img,
.product-card img,
.product-image img,
.infra-image img,
.leader-image img,
.manufacturing-image img,
.overview-image img {
  transition: transform var(--animation-medium), filter var(--animation-medium);
  will-change: transform;
}

.about-image:hover img,
.industry-card:hover .industry-image img,
.product-card:hover img,
.product-card:hover .product-image img,
.infra-card:hover .infra-image img,
.leader-card:hover .leader-image img {
  transform: scale(1.04);
}

/* Product Card Specific Interactions */
.product-card {
  overflow: hidden;
}

.product-card .product-title,
.product-card .btn,
.product-card .product-link {
  transition: color var(--animation-fast), transform var(--animation-fast);
}

.product-card:hover .product-link i,
.product-card:hover .arrow-icon {
  transform: translateX(4px);
}

/* Client Logo Grayscale Transition */
.client-item {
  transition: transform var(--animation-medium), box-shadow var(--animation-medium);
}

.client-item img {
  filter: grayscale(1) opacity(0.8);
  transition: filter var(--animation-medium), transform var(--animation-medium);
}

.client-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(7, 27, 59, 0.08);
}

.client-item:hover img {
  filter: grayscale(0) opacity(1);
  transform: scale(1.04);
}

/* Infrastructure Flip Card & Process Icon Hovers */
.infra-card:hover .infra-card-icon,
.process-item:hover .process-icon,
.purpose-card:hover .purpose-icon,
.why-card:hover .why-icon {
  transform: scale(1.06);
  transition: transform var(--animation-medium);
}

.process-item,
.certification-item {
  transition: transform var(--animation-medium), box-shadow var(--animation-medium);
}

.process-item:hover,
.certification-item:hover {
  transform: translateY(-3px);
}

/* ==========================================================================
   6. HERO MOTION & CINEMATIC SLIDER POLISH
   ========================================================================== */

.hero,
.about-hero,
.page-hero {
  position: relative;
  overflow: hidden;
}

.about-hero::before {
  content: "";
  position: absolute;
  inset: -12px;
  background: url("../assets/images/about/hero.png") center center/cover no-repeat;
  transform: scale(1.04);
  animation: heroKenBurns 18s ease-in-out infinite alternate;
  z-index: 0;
  will-change: transform;
}

.about-hero > * {
  position: relative;
  z-index: 2;
}

.hero::before {
  content: "";
  position: absolute;
  inset: -10px;
  background: linear-gradient(to right, rgba(255,255,255,.97) 0%, rgba(255,255,255,.92) 28%, rgba(255,255,255,.55) 48%, rgba(255,255,255,.08) 65%, rgba(255,255,255,0) 100%), url("../assets/images/hero/home-hero.png");
  background-size: cover;
  background-position: center right;
  transform: scale(1.04);
  animation: heroZoom 20s ease-in-out infinite alternate;
  z-index: 0;
  will-change: transform;
}

.hero > * {
  position: relative;
  z-index: 1;
}

.hero-slider {
  animation: floatSoft 6s ease-in-out infinite;
}

.hero-bg-1,
.hero-bg-2 {
  transition: opacity 1.2s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity;
}

/* ==========================================================================
   7. STATISTICS COUNTER POLISH
   ========================================================================== */

.stat-number {
  font-variant-numeric: tabular-nums;
  display: inline-block;
}

.stat-item {
  transition: transform var(--animation-medium), box-shadow var(--animation-medium);
}

.stat-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 25px rgba(7, 27, 59, 0.08);
}

.overview-stat:hover i {
  transform: scale(1.08);
  transition: transform 0.3s ease;
}

/* ==========================================================================
   8. FOOTER INTERACTION POLISH
   ========================================================================== */

.footer-social a {
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1),
              background-color 0.35s ease,
              border-color 0.35s ease,
              color 0.35s ease;
}

.footer-social a:hover {
  background: var(--secondary, #D89A2B);
  border-color: var(--secondary, #D89A2B);
  color: #fff;
  transform: translateY(-4px);
}

.footer-links a {
  position: relative;
  transition: color 0.3s ease, padding-left 0.3s ease;
}

.footer-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0;
  height: 2px;
  background: var(--secondary, #D89A2B);
  transition: width 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.footer-links a:hover::after,
.footer-links a:focus-visible::after {
  width: 100%;
}

.leader-social a {
  transition: transform 0.35s ease, color 0.35s ease;
}

.leader-social a:hover {
  transform: translateY(-4px);
  color: var(--secondary, #D89A2B);
}

/* ==========================================================================
   9. FORM CONTROL MICRO-INTERACTIONS
   ========================================================================== */

.custom-input,
.form-control,
.form-select {
  transition: border-color var(--animation-fast),
              box-shadow var(--animation-fast),
              transform var(--animation-fast);
}

.custom-input:focus,
.form-control:focus,
.form-select:focus {
  border-color: var(--secondary, #D89A2B) !important;
  box-shadow: 0 0 0 0.2rem rgba(216, 154, 43, 0.15) !important;
  transform: translateY(-1px);
}

.is-loading {
  position: relative;
  pointer-events: none;
  color: transparent !important;
}

.is-loading::after {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
}

/* ==========================================================================
   10. BACK TO TOP BUTTON
   ========================================================================== */

.back-to-top {
  position: fixed;
  right: 24px;
  bottom: 90px;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  background: var(--primary, #071B3B);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 25px rgba(7, 27, 59, 0.2);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px) scale(0.9);
  transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1),
              visibility 0.35s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.35s cubic-bezier(0.16, 1, 0.3, 1),
              background-color 0.3s ease,
              box-shadow 0.3s ease;
  z-index: 1000;
  cursor: pointer;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.back-to-top:hover {
  background: var(--secondary, #D89A2B);
  color: #ffffff;
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 14px 28px rgba(216, 154, 43, 0.3);
}

.back-to-top i {
  font-size: 18px;
  transition: transform 0.3s ease;
}

.back-to-top:hover i {
  transform: translateY(-2px);
}

/* ==========================================================================
   11. SECTION TITLE LINE ANIMATION
   ========================================================================== */

.section-title-line {
  position: relative;
  display: inline-block;
}

.section-title-line::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -10px;
  width: 0;
  height: 3px;
  background: var(--secondary, #D89A2B);
  transition: width 0.75s cubic-bezier(0.16, 1, 0.3, 1);
  border-radius: 2px;
}

.section-title-line.is-visible::after {
  width: 100%;
}

/* ==========================================================================
   12. KEYFRAMES
   ========================================================================== */

@keyframes heroZoom {
  from {
    transform: scale(1.04);
  }
  to {
    transform: scale(1.09);
  }
}

@keyframes heroKenBurns {
  from {
    transform: scale(1.04) translate3d(0, 0, 0);
  }
  to {
    transform: scale(1.1) translate3d(-1.5%, -1.5%, 0);
  }
}

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

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ==========================================================================
   13. RESPONSIVE TOUCH & MOBILE OPTIMIZATIONS
   ========================================================================== */

@media (max-width: 767px) {
  .fade-up {
    transform: translate3d(0, 12px, 0);
  }

  .fade-left,
  .fade-right {
    transform: translate3d(0, 10px, 0);
  }

  .stagger > *,
  .stagger-grid > * {
    transform: translate3d(0, 10px, 0);
  }

/* ==========================================================================
   LEVEL 3 - 3D CARD TILT, MAGNETIC BUTTONS & COUNTER HIGHLIGHTS
   ========================================================================== */

.tilt-card-3d {
  perspective: 1000px;
  transform-style: preserve-3d;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease;
  will-change: transform;
}

.tilt-card-3d .product-image img,
.tilt-card-3d .infra-image img,
.tilt-card-3d .leader-image img {
  transform: translateZ(10px);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.tilt-card-3d h3,
.tilt-card-3d .product-title,
.tilt-card-3d .infra-card-title {
  transform: translateZ(8px);
}

.tilt-card-3d .btn,
.tilt-card-3d .product-btn,
.tilt-card-3d .view-details-btn {
  transform: translateZ(12px);
}

.magnetic-btn {
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease;
  will-change: transform;
}

.count-completed {
  animation: countPulse 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes countPulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.04);
    box-shadow: 0 0 16px rgba(216, 154, 43, 0.3);
  }
  100% {
    transform: scale(1);
  }
}

  /* Disable sticky hover effects on touch screens */
  .capability-item:hover,
  .industry-card:hover,
  .product-card:hover,
  .why-card:hover,
  .infra-card:hover,
  .leader-card:hover {
    transform: none;
    box-shadow: none;
  }

  .quote-btn:hover,
  .btn-primary-custom:hover,
  .btn-outline-custom:hover,
  .about-btn:hover,
  .cta-btn:hover,
  .contact-submit-btn:hover {
    transform: none;
  }

  .back-to-top {
    right: 16px;
    bottom: 78px;
    width: 44px;
    height: 44px;
  }
}

/* ==========================================================================
   14. ACCESSIBILITY - REDUCED MOTION OVERRIDE
   ========================================================================== */

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

  .reveal,
  .fade-up,
  .fade-left,
  .fade-right,
  .fade-scale,
  .zoom-in,
  .scale-in,
  .slide-up,
  .stagger > *,
  .stagger-grid > * {
    opacity: 1 !important;
    transform: none !important;
  }

  .section-title-line::after {
    width: 100% !important;
  }

  .about-hero::before,
  .hero::before,
  .hero-slider {
    animation: none !important;
  }
}
