/* ==========================================
   ARAVAA GLOBAL - GSAP MOTION DESIGN SYSTEM
   Award-winning micro-interactions, parallax, 
   split-text masks, and smooth elevation
   ========================================== */

/* ------------------------------------------
   1. Page Load & Preloader Curtain System
   ------------------------------------------ */
#page-loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  background-color: var(--dark-navy);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.5s ease;
  will-change: opacity, transform;
}

#page-loader.loaded {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader-spinner {
  width: 48px;
  height: 48px;
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-top-color: var(--primary-blue);
  border-right-color: var(--accent-orange);
  border-radius: 50%;
  animation: loaderSpin 0.9s linear infinite;
}

@keyframes loaderSpin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

/* Page load curtain state */
body.is-animating {
  overflow: hidden;
}

/* ------------------------------------------
   2. Header Scroll Animation States
   ------------------------------------------ */
.site-header {
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.4s ease, padding 0.4s ease, box-shadow 0.4s ease;
  will-change: transform, background-color;
}

.site-header.scrolled {
  background-color: rgba(3, 12, 26, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.35);
  padding: 12px 0;
}

.site-header.header-hidden {
  transform: translateY(-100%);
}

/* Nav Link Underline Motion */
.nav-link {
  position: relative;
  transition: color 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--primary-blue), #60A5FA);
  border-radius: 2px;
  transition: width 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

/* ------------------------------------------
   3. Split-Text & Typography Reveal Masks
   ------------------------------------------ */
.gsap-split-line {
  overflow: hidden;
  /*display: block;*/
  padding-bottom: 0.08em;
  margin-bottom: -0.08em;
}

.gsap-split-word {
  display: inline-block;
  will-change: transform, opacity;
}

/* Text Mask Wrapper */
.text-mask-wrapper {
  overflow: hidden;
  display: block;
}

/* ------------------------------------------
   4. Desktop Custom Cursor & Magnetic Helpers
   ------------------------------------------ */
@media (hover: hover) and (pointer: fine) {
  .custom-cursor-dot {
    position: fixed;
    top: 0;
    left: 0;
    width: 8px;
    height: 8px;
    background-color: var(--accent-orange);
    border-radius: 50%;
    pointer-events: none;
    z-index: 999999;
    transform: translate(-50%, -50%);
    transition: opacity 0.3s ease;
    will-change: transform;
  }

  .custom-cursor-follower {
    position: fixed;
    top: 0;
    left: 0;
    width: 40px;
    height: 40px;
    border: 1.5px solid rgba(29, 97, 231, 0.5);
    background-color: rgba(29, 97, 231, 0.04);
    border-radius: 50%;
    pointer-events: none;
    z-index: 999998;
    transform: translate(-50%, -50%);
    transition: width 0.3s ease, height 0.3s ease, background-color 0.3s ease, border-color 0.3s ease;
    will-change: transform;
  }

  .custom-cursor-follower.is-hovering {
    width: 64px;
    height: 64px;
    background-color: rgba(242, 101, 34, 0.12);
    border-color: var(--accent-orange);
  }

  .custom-cursor-follower.is-clicking {
    transform: translate(-50%, -50%) scale(0.85);
  }
}

/* ------------------------------------------
   5. Card 3D Perspective & Motion Elevation
   ------------------------------------------ */
.product-card,
.industry-card,
.why-card,
.pipeline-card,
.trust-card,
.mv-card,
.lab-card,
.qc-card,
.legacy-image-wrap,
.form-card,
.contact-info-card {
  transition: box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.4s ease;
  will-change: transform, opacity;
  transform-style: preserve-3d;
}

.product-card-media,
.industry-card-media,
.lab-card,
.legacy-image-wrap,
.industries-hero-media {
  overflow: hidden;
  position: relative;
}

.product-card-media img,
.industry-card-media img,
.why-card img,
.lab-card img,
.legacy-image-wrap img,
.industries-hero-media img {
  transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform;
}

.product-card:hover .product-card-media img,
.industry-card:hover .industry-card-media img,
.lab-card:hover img,
.legacy-image-wrap:hover img,
.industries-hero-media:hover img {
  transform: scale(1.06);
}

/* ------------------------------------------
   6. Export Process Pipeline Motion Line
   ------------------------------------------ */



/* ------------------------------------------
   7. Button Motion Physics
   ------------------------------------------ */
.btn {
  position: relative;
  overflow: hidden;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.3s ease;
  will-change: transform;
}

.btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 120%;
  height: 0;
  padding-bottom: 120%;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  transform: translate(-50%, -50%) scale(0);
  opacity: 0;
  transition: transform 0.5s ease, opacity 0.3s ease;
  pointer-events: none;
}

.btn:active::before {
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
  transition: 0s;
}

.btn:hover {
  transform: translateY(-3px) scale(1.015);
}

.btn:active {
  transform: translateY(0) scale(0.985);
}

/* ------------------------------------------
   8. Reduced Motion Accessibility
   ------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
  body {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }

  .site-header,
  .custom-cursor-dot,
  .custom-cursor-follower {
    display: none !important;
  }

  *,
  ::before,
  ::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}