/* Base */
*, *::before, *::after {
  box-sizing: border-box;
}

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

body {
  overflow-x: hidden;
}

::selection {
  background: #064E3B;
  color: #FAF8F5;
}

/* Nav */
#nav {
  background: rgba(250, 248, 245, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(6, 78, 59, 0.08);
}

#nav.scrolled {
  box-shadow: 0 1px 0 rgba(6, 78, 59, 0.06);
}

.nav-link {
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: #064E3B;
  transition: width 0.3s ease;
}

.nav-link:hover::after {
  width: 100%;
}

/* Mobile menu */
#mobileMenu.open {
  opacity: 1;
  pointer-events: all;
}

.mobile-link {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.4s ease, transform 0.4s ease, color 0.3s ease;
}

#mobileMenu.open .mobile-link {
  opacity: 1;
  transform: translateY(0);
}

#mobileMenu.open .mobile-link:nth-child(1) { transition-delay: 0.1s; }
#mobileMenu.open .mobile-link:nth-child(2) { transition-delay: 0.15s; }
#mobileMenu.open .mobile-link:nth-child(3) { transition-delay: 0.2s; }
#mobileMenu.open .mobile-link:nth-child(4) { transition-delay: 0.25s; }

/* Reveal animations */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94), transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.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; }

/* Service cards */
.service-card {
  border-bottom: none !important;
  border-right: none !important;
}

/* Form */
select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23064E3B' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline x1='6' y1='9' x2='12' y2='15' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpolyline x1='18' y1='15' x2='12' y2='9' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

/* Smooth scroll offset for fixed nav */
section[id] {
  scroll-margin-top: 80px;
}

/* Mobile menu backdrop */
#mobileMenu {
  background: rgba(250, 248, 245, 0.98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

/* Hover underline for all anchor links */
a:not(.nav-link):not(button):not([class*="bg-emerald"]) {
  text-decoration: none;
}

/* Subtle image hover */
img {
  display: block;
  max-width: 100%;
}

/* Focus styles */
:focus-visible {
  outline: 2px solid #064E3B;
  outline-offset: 2px;
}

/* Print */
@media print {
  #nav, #mobileMenu { display: none; }
  body { background: white; color: black; }
}
