/* ===== BASE ===== */
html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  overflow-x: hidden;
}

::selection {
  background-color: #a7f3d0;
  color: #064e3b;
}

/* ===== NAV ===== */
#nav {
  transition: background-color 0.3s ease, box-shadow 0.3s ease, backdrop-filter 0.3s ease;
}

#nav.scrolled {
  background-color: rgba(254, 253, 248, 0.9);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 20px rgba(5, 150, 105, 0.08);
}

/* ===== MOBILE MENU ===== */
.mobile-link {
  transition: color 0.2s ease;
}

.menu-line {
  transition: all 0.3s ease;
}

#menuBtn.active .menu-line:nth-child(1) {
  transform: rotate(45deg) translate(4px, 4px);
}

#menuBtn.active .menu-line:nth-child(2) {
  opacity: 0;
}

#menuBtn.active .menu-line:nth-child(3) {
  width: 24px;
  transform: rotate(-45deg) translate(4px, -4px);
}

/* ===== FLOATING CARDS ===== */
.floating-card {
  animation: float 3s ease-in-out infinite;
}

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

/* ===== SERVICE CARDS ===== */
.service-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-card:hover {
  transform: translateY(-4px);
}

/* ===== TESTIMONIAL CARDS ===== */
.testimonial-card {
  transition: transform 0.3s ease, background-color 0.3s ease;
}

.testimonial-card:hover {
  transform: translateY(-4px);
}

/* ===== SCROLL ANIMATIONS ===== */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

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

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }
.reveal-delay-5 { transition-delay: 0.5s; }

/* ===== COUNTER ANIMATION ===== */
.counter {
  display: inline-block;
}

/* ===== FOCUS STYLES ===== */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid #10b981;
  outline-offset: 2px;
  border-radius: 4px;
}

/* ===== RESPONSIVE TWEAKS ===== */
@media (max-width: 640px) {
  .floating-card {
    animation: none;
  }
}

/* ===== IMAGE LAZY LOAD FADE ===== */
img[loading="lazy"] {
  transition: opacity 0.5s ease;
}

img[loading="lazy"]:not([src]) {
  opacity: 0;
}
