/* ========== MOTION — soft fades (transitions, not hard keyframe snaps) ========== */

:root {
  --ease-fade: cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-soft: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --dur-fade: 2s;
  --dur-fade-move: 1.85s;
}

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 200;
  width: 100%;
  height: 3px;
  transform: scaleX(0);
  transform-origin: left center;
  background: linear-gradient(90deg, #3f8f2e, var(--green), #9ad67a);
  pointer-events: none;
  box-shadow: 0 0 10px rgba(95, 176, 71, 0.35);
  transition: transform 0.15s linear;
}

.site-header {
  transition: background-color 0.5s var(--ease-soft),
    box-shadow 0.5s var(--ease-soft), border-color 0.5s ease;
  border-bottom: 1px solid transparent;
}

.site-header.is-scrolled {
  background: rgba(7, 23, 44, 0.78);
  backdrop-filter: blur(14px) saturate(1.12);
  -webkit-backdrop-filter: blur(14px) saturate(1.12);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.22);
  border-bottom-color: rgba(255, 255, 255, 0.06);
}

/* ---------- HERO — soft fade up ---------- */
html.motion-ready:not(.motion-reduce) .hero:not(.is-hero-in) h1,
html.motion-ready:not(.motion-reduce) .hero:not(.is-hero-in) .hero-text,
html.motion-ready:not(.motion-reduce) .hero:not(.is-hero-in) .hero-actions .btn {
  opacity: 0;
  transform: translate3d(0, 14px, 0);
}

html.motion-ready:not(.motion-reduce) .hero h1,
html.motion-ready:not(.motion-reduce) .hero .hero-text,
html.motion-ready:not(.motion-reduce) .hero .hero-actions .btn {
  transition: opacity 1.8s var(--ease-fade), transform 1.7s var(--ease-fade);
}

html.motion-ready:not(.motion-reduce) .hero.is-hero-in h1 {
  opacity: 1;
  transform: none;
  transition-delay: 0.05s;
}

html.motion-ready:not(.motion-reduce) .hero.is-hero-in .hero-text {
  opacity: 1;
  transform: none;
  transition-delay: 0.18s;
}

html.motion-ready:not(.motion-reduce) .hero.is-hero-in .hero-actions .btn:nth-child(1) {
  opacity: 1;
  transform: none;
  transition-delay: 0.3s;
}

html.motion-ready:not(.motion-reduce) .hero.is-hero-in .hero-actions .btn:nth-child(2) {
  opacity: 1;
  transform: none;
  transition-delay: 0.42s;
}

/* ---------- SCROLL REVEALS — long soft fade + whisper of lift ---------- */
html.motion-ready:not(.motion-reduce) .reveal:not(.is-in) {
  opacity: 0;
  transform: translate3d(0, 12px, 0);
}

html.motion-ready:not(.motion-reduce) .reveal-left:not(.is-in) {
  transform: translate3d(-10px, 8px, 0);
}

html.motion-ready:not(.motion-reduce) .reveal-right:not(.is-in) {
  transform: translate3d(10px, 8px, 0);
}

html.motion-ready:not(.motion-reduce) .reveal-scale:not(.is-in) {
  transform: translate3d(0, 10px, 0) scale(0.992);
}

html.motion-ready:not(.motion-reduce) .reveal {
  transition:
    opacity var(--dur-fade) var(--ease-fade),
    transform var(--dur-fade-move) var(--ease-fade);
  transition-delay: var(--reveal-delay, 0ms);
}

html.motion-ready:not(.motion-reduce) .reveal.is-in {
  opacity: 1;
  transform: none;
}

/* ---------- SERVICE CARDS ---------- */
.services-grid .service-card {
  transition: transform 0.55s var(--ease-soft), box-shadow 0.55s var(--ease-soft);
}

.services-grid .service-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  background: linear-gradient(
    115deg,
    transparent 42%,
    rgba(255, 255, 255, 0.18) 50%,
    transparent 58%
  );
  transform: translate3d(-140%, 0, 0);
  opacity: 0;
  transition: transform 1s var(--ease-soft), opacity 0.35s ease;
}

.services-grid .service-card.is-shine::after {
  opacity: 1;
  transform: translate3d(140%, 0, 0);
}

.services-grid .service-card:hover {
  transform: translate3d(0, -6px, 0);
  box-shadow: 0 18px 40px rgba(10, 30, 49, 0.14);
}

.services-grid .service-card:hover .service-card-media img {
  transform: scale(1.05);
}

.services-grid .service-card:hover .service-arrow {
  transform: translate3d(4px, 0, 0);
}

.services-grid .service-card:hover .service-icon {
  transform: scale(1.04);
}

.service-card-media img {
  transition: transform 0.85s var(--ease-soft);
}

.service-icon,
.service-arrow {
  transition: transform 0.5s var(--ease-soft);
}

/* ---------- WHY ---------- */
.why-card {
  transition: transform 0.55s var(--ease-soft), box-shadow 0.55s var(--ease-soft);
}

.why-card:hover {
  transform: translate3d(0, -5px, 0);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.2);
}

.why-cta-garden.is-alive {
  animation: gardenDrift 22s ease-in-out infinite alternate;
}

@keyframes gardenDrift {
  from {
    transform: scale(1.03);
  }
  to {
    transform: scale(1.08) translate3d(-0.8%, -0.5%, 0);
  }
}

.btn,
.why-btn,
.header-cta {
  position: relative;
  overflow: hidden;
  transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease,
    box-shadow 0.45s var(--ease-soft), transform 0.45s var(--ease-soft);
}

.why-btn::after,
.btn::after,
.header-cta::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    120deg,
    transparent 40%,
    rgba(255, 255, 255, 0.16) 50%,
    transparent 60%
  );
  transform: translate3d(-120%, 0, 0);
  transition: transform 0.9s var(--ease-soft);
  pointer-events: none;
}

.why-btn:hover::after,
.btn:hover::after,
.header-cta:hover::after {
  transform: translate3d(120%, 0, 0);
}

.btn:hover,
.why-btn:hover,
.header-cta:hover {
  box-shadow: 0 10px 22px rgba(95, 176, 71, 0.25);
}

/* ---------- FOOTER MAP ---------- */
.footer-map.is-live .footer-map-island {
  animation: mapIslandBreathe 7s ease-in-out infinite;
}

.footer-map.is-live .footer-map-region {
  animation: mapRegionPulse 3.6s ease-in-out infinite;
}

.footer-map.is-live .footer-map-radar-a {
  animation: mapRadar 3.4s var(--ease-soft) infinite;
}

.footer-map.is-live .footer-map-radar-b {
  animation: mapRadar 3.4s var(--ease-soft) infinite 1.1s;
}

.footer-map.is-live .footer-map-radar-c {
  animation: mapRadar 3.4s var(--ease-soft) infinite 2.2s;
}

.footer-map.is-live .footer-map-pin {
  animation: mapPinBob 2.8s ease-in-out infinite;
}

.footer-map.is-live .footer-map-pin-body {
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.35));
}

@keyframes mapIslandBreathe {
  0%,
  100% {
    transform: translate3d(0, 0, 0);
  }
  50% {
    transform: translate3d(0, -2px, 0);
  }
}

@keyframes mapRegionPulse {
  0%,
  100% {
    opacity: 0.8;
    transform: scale(0.99);
  }
  50% {
    opacity: 1;
    transform: scale(1.02);
  }
}

@keyframes mapRadar {
  0% {
    transform: scale(0.55);
    opacity: 0.55;
  }
  100% {
    transform: scale(2.5);
    opacity: 0;
  }
}

@keyframes mapPinBob {
  0%,
  100% {
    transform: translate3d(0, 0, 0);
  }
  50% {
    transform: translate3d(0, -3px, 0);
  }
}

/* ---------- NAV / FOOTER ---------- */
.nav-link {
  position: relative;
  transition: color 0.35s ease;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -2px;
  width: 0;
  height: 2.5px;
  border-radius: 2px;
  background: var(--green);
  transform: translateX(-50%);
  transition: width 0.45s var(--ease-soft);
}

.nav-link:hover::after,
.nav-link.is-active::after {
  width: 22px;
}

.footer-contact-item {
  transition: transform 0.5s var(--ease-soft);
}

.footer-contact-item:hover {
  transform: translate3d(0, -2px, 0);
}

.footer-social-btn {
  transition: transform 0.45s var(--ease-soft), background-color 0.3s ease;
}

.footer-social-btn:hover {
  transform: translate3d(0, -2px, 0);
}

.logo img {
  transition: transform 0.6s var(--ease-soft);
}

.logo:hover img {
  transform: rotate(-5deg) scale(1.04);
}

@media (prefers-reduced-motion: reduce) {
  .footer-map.is-live .footer-map-island,
  .footer-map.is-live .footer-map-region,
  .footer-map.is-live .footer-map-radar-a,
  .footer-map.is-live .footer-map-radar-b,
  .footer-map.is-live .footer-map-radar-c,
  .footer-map.is-live .footer-map-pin,
  .why-cta-garden.is-alive,
  .scroll-progress {
    animation: none !important;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .scroll-progress {
    display: none !important;
  }

  .reveal,
  .reveal.is-in,
  .hero h1,
  .hero .hero-text,
  .hero .btn {
    opacity: 1 !important;
    transform: none !important;
  }
}
