/* Base */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body { margin: 0; }

/* Header scroll state */
#header {
    background: rgba(250, 249, 246, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid transparent;
    transition: border-color 0.4s ease, box-shadow 0.4s ease;
}
#header.scrolled {
    border-bottom-color: rgba(6, 95, 70, 0.08);
    box-shadow: 0 1px 20px rgba(6, 95, 70, 0.06);
}

/* Nav link underline animation */
.nav-link {
    position: relative;
}
.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: #065f46;
    transition: width 0.3s ease;
}
.nav-link:hover::after {
    width: 100%;
}

/* Mobile menu */
#mobileMenu.open {
    opacity: 1;
    pointer-events: all;
}
#mobileMenu.closed {
    opacity: 0;
    pointer-events: none;
}
.mobile-link {
    position: relative;
}

/* Stat cards animation */
.stat-card {
    opacity: 0;
    transform: translateY(20px);
    animation: cardFloat 0.6s ease forwards;
}
.stat-card:nth-child(1) { animation-delay: 0.3s; }
.stat-card:nth-child(2) { animation-delay: 0.45s; }
.stat-card:nth-child(3) { animation-delay: 0.6s; }

@keyframes cardFloat {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Service cards */
.service-card {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.5s ease, transform 0.5s ease, border-color 0.4s ease, box-shadow 0.4s ease;
}
.service-card.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Section reveal animation */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Form focus styles */
input:focus, textarea:focus {
    border-color: #6ee7b7 !important;
    box-shadow: 0 0 0 3px rgba(110, 231, 183, 0.15) !important;
    outline: none;
}

/* Selection */
::selection {
    background: rgba(6, 95, 70, 0.15);
    color: #064e3b;
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #FAF9F6; }
::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #9ca3af; }

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

/* Focus visible */
:focus-visible {
    outline: 2px solid #065f46;
    outline-offset: 2px;
}
