/* ============================================================
   VEVOR Truck Hauling — Motion & Polish Layer
   Loaded after style.css. Purely additive; no overrides of
   existing layout. Respects prefers-reduced-motion.
   ============================================================ */

/* ---------- 1. Scroll progress bar ---------- */
#scrollProgress {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  z-index: 1200;
  pointer-events: none;
  transform-origin: 0 50%;
  transform: scaleX(0);
  background: linear-gradient(90deg, var(--navy-600), var(--orange-500));
  box-shadow: 0 0 8px rgba(22, 163, 74, 0.45);
}

/* ---------- 2. Header elevation on scroll ---------- */
.site-header {
  transition: box-shadow 0.3s var(--ease), background 0.3s var(--ease);
}
.site-header.is-scrolled {
  box-shadow: 0 10px 30px -12px rgba(5, 46, 27, 0.35);
}

/* ---------- 3. Nav link underline grow ---------- */
.nav a {
  position: relative;
}
.nav a::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -6px;
  width: 0;
  height: 2px;
  border-radius: 2px;
  background: var(--orange-500);
  transform: translateX(-50%);
  transition: width 0.28s var(--ease);
}
.nav a:hover::before {
  width: 100%;
}

/* ---------- 4. Hero entrance choreography ---------- */
@keyframes heroRise {
  from {
    opacity: 0;
    transform: translateY(26px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.hero .container > *,
.hero .hero-grid > * {
  animation: heroRise 0.75s var(--ease) both;
}
.hero .hero-grid > *:nth-child(1) { animation-delay: 0.05s; }
.hero .hero-grid > *:nth-child(2) { animation-delay: 0.18s; }
.hero .hero-badge { animation-delay: 0.1s; }
.hero h1 { animation-delay: 0.16s; }
.hero .lead { animation-delay: 0.28s; }
.hero .btn-row { animation-delay: 0.4s; }
.hero .hero-stats { animation-delay: 0.52s; }
.hero .hero-card { animation-delay: 0.34s; }

/* live dot pulse */
@keyframes dotPulse {
  0%   { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.55); }
  70%  { box-shadow: 0 0 0 8px rgba(74, 222, 128, 0); }
  100% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0); }
}
.hero-badge .dot {
  animation: dotPulse 2.2s ease-out infinite;
}

/* ---------- 5. Button shine sweep + lift ---------- */
.btn--primary {
  position: relative;
  overflow: hidden;
}
.btn--primary::after {
  content: "";
  position: absolute;
  top: 0;
  left: -80%;
  width: 50%;
  height: 100%;
  background: linear-gradient(
    105deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.35) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  transform: skewX(-20deg);
  transition: left 0.55s var(--ease);
  pointer-events: none;
}
.btn--primary:hover::after {
  left: 130%;
}
.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px -10px rgba(18, 138, 72, 0.6);
}

/* ---------- 6. Card hover micro-interactions ---------- */
.card--hover,
.service-card,
.quote-card {
  transition: transform 0.28s var(--ease), box-shadow 0.28s var(--ease);
}
.card--hover:hover,
.service-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 22px 44px -18px rgba(5, 46, 27, 0.38);
}
.card-icon,
.service-card .card-icon {
  transition: transform 0.28s var(--ease);
}
.card--hover:hover .card-icon,
.service-card:hover .card-icon {
  transform: scale(1.1) rotate(-4deg);
}
.quote-card:hover {
  transform: translateY(-4px);
}

/* ---------- 7. Link arrow nudge ---------- */
.link-arrow {
  transition: color 0.2s var(--ease);
}
.link-arrow::after {
  transition: transform 0.25s var(--ease);
}
.link-arrow:hover::after {
  transform: translateX(5px);
}

/* ---------- 8. Staggered reveal helpers ---------- */
.reveal {
  transition-delay: var(--d, 0s);
}

/* ---------- 9. Back to top ---------- */
#toTop {
  position: fixed;
  right: 22px;
  bottom: 22px;
  width: 46px;
  height: 46px;
  border: none;
  border-radius: 50%;
  background: var(--navy-800);
  color: #fff;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  z-index: 1100;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease),
    visibility 0.3s, background 0.2s var(--ease);
  box-shadow: 0 10px 24px -8px rgba(5, 46, 27, 0.5);
}
#toTop.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
#toTop:hover {
  background: var(--navy-600);
  transform: translateY(-3px);
}

/* ---------- 10. Footer link hover slide ---------- */
.footer-links a {
  transition: color 0.18s var(--ease), padding-left 0.22s var(--ease);
}
.footer-links a:hover {
  padding-left: 5px;
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  #scrollProgress,
  .hero .container > *,
  .hero .hero-grid > *,
  .hero-badge .dot {
    animation: none !important;
  }
  .reveal {
    transition-delay: 0s !important;
  }
}
