/* =============================================
   PREMIUM HIGH-END ANIMATIONS - Awwwards Inspired
   Smooth, elegant, subtle & sophisticated
   Works perfectly on desktop + mobile + Android
   ============================================= */

/* --- CSS Variables for Animations --- */
:root {
  --ease-premium: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out-expo: cubic-bezier(0.19, 1, 0.22, 1);
  --ease-smooth: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
  --duration-fast: 0.4s;
  --duration-normal: 0.7s;
  --duration-slow: 1.1s;
  --duration-premium: 1.4s;
}

/* --- Base Reveal System (Scroll Triggered) --- */
.reveal {
  opacity: 0;
  transform: translateY(50px);
  transition:
    opacity var(--duration-slow) var(--ease-premium),
    transform var(--duration-slow) var(--ease-premium);
  will-change: opacity, transform;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered Delays - Very Premium Feel */
.reveal-delay-1 {
  transition-delay: 120ms;
}
.reveal-delay-2 {
  transition-delay: 260ms;
}
.reveal-delay-3 {
  transition-delay: 390ms;
}
.reveal-delay-4 {
  transition-delay: 520ms;
}
.reveal-delay-5 {
  transition-delay: 650ms;
}

/* Advanced Reveal Variants (Awwwards-level) */
.reveal-up {
  opacity: 0;
  transform: translateY(60px);
  transition:
    opacity var(--duration-slow) var(--ease-premium),
    transform var(--duration-slow) var(--ease-premium);
}

.reveal-up.active {
  opacity: 1;
  transform: translateY(0);
}

.reveal-down {
  opacity: 0;
  transform: translateY(-40px);
  transition: all var(--duration-slow) var(--ease-premium);
}

.reveal-down.active {
  opacity: 1;
  transform: translateY(0);
}

.reveal-left {
  opacity: 0;
  transform: translateX(-70px);
  transition: all var(--duration-slow) var(--ease-premium);
}

.reveal-left.active {
  opacity: 1;
  transform: translateX(0);
}

.reveal-right {
  opacity: 0;
  transform: translateX(70px);
  transition: all var(--duration-slow) var(--ease-premium);
}

.reveal-right.active {
  opacity: 1;
  transform: translateX(0);
}

.reveal-scale {
  opacity: 0;
  transform: scale(0.92) translateY(30px);
  transition:
    opacity var(--duration-premium) var(--ease-premium),
    transform var(--duration-premium) var(--ease-premium);
}

.reveal-scale.active {
  opacity: 1;
  transform: scale(1) translateY(0);
}

.reveal-blur {
  opacity: 0;
  filter: blur(12px);
  transform: translateY(25px);
  transition: all var(--duration-slow) var(--ease-premium);
}

.reveal-blur.active {
  opacity: 1;
  filter: blur(0);
  transform: translateY(0);
}

/* Text Reveal - Premium Character-like (via CSS) */
.text-reveal {
  overflow: hidden;
  display: inline-block;
}

.text-reveal span {
  display: inline-block;
  opacity: 0;
  transform: translateY(100%);
  transition:
    transform 0.9s var(--ease-premium),
    opacity 0.8s var(--ease-premium);
}

.text-reveal.active span {
  opacity: 1;
  transform: translateY(0);
}

/* --- Premium Hover Animations (High-End) --- */

/* 1. Image Premium Hover - Zoom + Subtle Pan */
.premium-hover,
.product-card,
.hover-zoom {
  overflow: hidden;
  position: relative;
}

.premium-hover img,
.product-image {
  transition:
    transform var(--duration-premium) var(--ease-premium),
    filter 1s var(--ease-smooth);
  will-change: transform;
}

.premium-hover:hover img,
.product-card:hover .product-image {
  transform: scale(1.085) translateY(-4px);
  filter: brightness(1.02) saturate(1.05);
}

/* Subtle image pan on hover (premium) */
.premium-hover:hover img {
  transform: scale(1.085) translateY(-4px) translateX(6px);
}

/* 2. Card Premium Lift + Shadow (Awwwards signature) */
.premium-card,
.stat-item,
.product-card {
  transition:
    transform var(--duration-normal) var(--ease-premium),
    box-shadow var(--duration-normal) var(--ease-premium);
  will-change: transform, box-shadow;
}

.premium-card:hover,
.product-card:hover {
  transform: translateY(-14px);
  box-shadow:
    0 30px 70px -15px rgba(0, 0, 0, 0.18),
    0 10px 25px -8px rgba(0, 0, 0, 0.1);
}

.stat-item:hover {
  transform: translateY(-6px);
}

/* 3. Overlay Premium Fade & Slide */
.product-overlay {
  transition:
    transform var(--duration-normal) var(--ease-premium),
    background var(--duration-normal) var(--ease-smooth) !important;
}

.product-card:hover .product-overlay {
  transform: translateY(-4px);
  background: linear-gradient(to top, rgba(0, 0, 0, 0.88), transparent);
}

/* 4. Premium Button Hovers */
.btn {
  position: relative;
  overflow: hidden;
  transition: all var(--duration-normal) var(--ease-premium);
  z-index: 1;
}

.btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 40%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.35),
    transparent
  );
  transition: left 0.7s var(--ease-premium);
  z-index: -1;
}

.btn:hover::before {
  left: 250%;
}

.btn-primary {
  transition: all var(--duration-normal) var(--ease-premium);
}

.btn-primary:hover {
  background-color: var(--white);
  color: var(--primary-color);
  border-color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 12px 28px -6px rgba(0, 0, 0, 0.25);
}

.btn-outline-white:hover {
  background-color: var(--white);
  color: var(--primary-color);
  border-color: var(--white);
  transform: translateY(-1px);
}

/* 5. Text & Link Premium Underline */
.nav-link,
a {
  position: relative;
}

.nav-link::after,
a:not(.btn):not(.dropdown-link):not(.nav-link)::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1.5px;
  background: currentColor;
  transition: width 0.45s var(--ease-premium);
}

.nav-link:hover::after,
a:not(.btn):not(.dropdown-link):not(.nav-link):hover::after {
  width: 100%;
}

/* Keep the navbar Request a Quote pill clean: no underline on hover, focus, active, or selected states. */
.nav-btn-quote::after,
.nav-btn-quote:hover::after,
.nav-btn-quote:focus::after,
.nav-btn-quote:focus-visible::after,
.nav-btn-quote:active::after,
.nav-btn-quote.active::after,
.nav-btn-quote[aria-current="page"]::after {
  content: none !important;
  display: none !important;
  width: 0 !important;
}

/* Logo and footer logo are image containers — suppress the text-link underline animation */
.logo::after,
.logo:hover::after,
.footer-logo::after,
.footer-logo:hover::after {
  content: none !important;
  display: none !important;
  width: 0 !important;
}

/* Dropdown submenu text underline: keep the animation under the text, not through its middle. */
.dropdown-link::after {
  content: "";
  position: absolute;
  left: 18px;
  right: auto;
  bottom: 8px;
  top: auto;
  width: 0;
  height: 1.5px;
  background: currentColor;
  opacity: 1;
  transform: none;
  transition: width 0.45s var(--ease-premium);
}

.dropdown-link:hover::after {
  width: calc(100% - 36px);
  transform: none;
}

/* 6. Stats Premium Hover + Counter Accent */
.stat-item {
  transition: all var(--duration-normal) var(--ease-premium);
  padding: 22px 14px;
  border-radius: 4px;
}

.stat-item:hover {
  background: rgba(255, 255, 255, 0.03);
}

.stat-number {
  transition: transform 0.6s var(--ease-premium);
}

.stat-item:hover .stat-number {
  transform: scale(1.03);
}

/* 7. Feature Image Premium */
.feature-image-wrapper {
  overflow: hidden;
  border-radius: 4px;
  transition: box-shadow 0.6s var(--ease-premium);
  -webkit-mask-image: -webkit-radial-gradient(white, black);
}

.feature-image-wrapper img {
  transition: transform var(--duration-premium) var(--ease-premium);
}

.feature-image-wrapper:hover img {
  transform: scale(1.065);
}

.feature-image-wrapper:hover {
  box-shadow: 0 40px 80px -15px rgba(0, 0, 0, 0.35);
}

/* 8. Hero Content Premium */
.hero-content > * {
  transition: all var(--duration-slow) var(--ease-premium);
}

/* --- Parallax & Smooth Backgrounds --- */
.parallax-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 120%;
  object-fit: cover;
  z-index: -1;
  transition: transform 0.1s linear;
  will-change: transform;
}

/* Subtle parallax on hero scroll */
.hero .parallax-bg {
  transition: transform 0.15s linear;
}

/* --- Page Transition Premium --- */
.page-transition-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--primary-color);
  z-index: 9999;
  transform: translateY(0);
  transition: transform 1.05s var(--ease-premium);
  pointer-events: none;
}

.page-transition-overlay.hidden {
  transform: translateY(-100%);
}

/* --- Advanced Smooth Scroll Indicators --- */
.scroll-indicator {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  width: 1px;
  height: 60px;
  background: rgba(255, 255, 255, 0.5);
  animation: scrollDown 2.4s infinite var(--ease-premium);
}

.scroll-indicator::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 6px;
  height: 6px;
  background: #fff;
  transform: translateX(-50%);
  border-radius: 50%;
}

/* --- Smooth Mobile Animations (Android Friendly) --- */
@media (max-width: 768px) {
  .reveal,
  .reveal-up,
  .reveal-scale,
  .reveal-blur,
  .reveal-left,
  .reveal-right {
    transition-duration: 0.65s !important;
  }

  .premium-card:hover,
  .product-card:hover {
    transform: translateY(-8px);
  }

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

  .stat-item:hover {
    transform: none;
  }
}

/* --- Reduced Motion Support (Accessibility) --- */
@media (prefers-reduced-motion: reduce) {
  .reveal,
  .reveal-up,
  .reveal-down,
  .reveal-left,
  .reveal-right,
  .reveal-scale,
  .reveal-blur,
  .premium-hover img,
  .premium-card,
  .product-card,
  .btn,
  .text-reveal span {
    transition: none !important;
    animation: none !important;
    transform: none !important;
    opacity: 1 !important;
  }
}

/* --- Keyframes for Extra Premium Effects --- */
@keyframes scrollDown {
  0%,
  100% {
    transform: translateX(-50%) translateY(0);
    opacity: 0.6;
  }
  50% {
    transform: translateX(-50%) translateY(22px);
    opacity: 1;
  }
}

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

@keyframes premiumScaleIn {
  from {
    opacity: 0;
    transform: scale(0.86);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Extra: Line Divider Animation */
.divider {
  height: 1px;
  background: linear-gradient(
    to right,
    transparent,
    var(--accent-color),
    transparent
  );
  transition: width 1.2s var(--ease-premium);
  width: 0;
}

.divider.active {
  width: 100%;
}

/* Elegant Title Emphasis */
.section-title {
  position: relative;
}

/* Product Card Extra Premium (UNIFORM SIZE — controlled in main.css) */
.product-card {
  border-radius: 4px;
  box-shadow: 0 8px 25px -10px rgba(0, 0, 0, 0.1);
}

.product-card .product-overlay {
  padding: 32px 30px;
}

/* Footer Premium Links */
.footer-links a {
  transition: all 0.35s var(--ease-premium);
  display: inline-block;
  position: relative;
}

.footer-links a:hover {
  transform: translateX(6px);
  color: var(--white);
}

/* Hero Subtitle Elegant Animation */
.hero-subtitle {
  letter-spacing: 4.5px;
  font-weight: 500;
  transition: all 0.9s var(--ease-premium);
}

.hero-subtitle.active {
  letter-spacing: 3px;
}
