/* ── Base & Reset ─────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body { margin: 0; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font: inherit; color: inherit; }
ul, ol { padding: 0; list-style: none; }

/* ── Reduced motion ───────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .service-card { transform: none !important; }
  .service-card:hover { transform: none !important; }
}

/* ── Navbar scroll state ──────────────────────────── */
#navbar.scrolled {
  background: rgba(11, 26, 15, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 1px 0 rgba(255,255,255,0.06);
}
#navbar.scrolled .nav-link { color: rgba(255,255,255,0.85); }

/* ── Mobile menu ──────────────────────────────────── */
#mobile-menu.open { transform: translateX(0); }
#menu-overlay.open { opacity: 1; pointer-events: auto; }

/* ── Service cards ────────────────────────────────── */
.service-card {
  will-change: transform;
}
@media (prefers-reduced-motion: no-preference) {
  .service-card:hover { transform: translateY(-4px); }
}

/* ── Scroll reveal (progressive enhancement) ──────── */
.reveal {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
  }
  .reveal.revealed {
    opacity: 1;
    transform: none;
  }
  .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; }
}

/* ── Focus styles ─────────────────────────────────── */
a:focus-visible, button:focus-visible {
  outline: 2px solid #5fa36e;
  outline-offset: 3px;
  border-radius: 4px;
}

/* ── Selection ────────────────────────────────────── */
::selection {
  background: rgba(45, 106, 64, 0.2);
  color: #1c4128;
}
