/* Base & Typography */
html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    overflow-x: hidden;
}

::selection {
    background-color: rgba(26, 58, 42, 0.15);
    color: #1a3a2a;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: #fafaf7;
}

::-webkit-scrollbar-thumb {
    background: #b9d0b9;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #8fb88f;
}

/* Navbar scroll state */
#navbar.scrolled {
    background: rgba(250, 250, 247, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(26, 58, 42, 0.06);
}

/* Mobile menu */
#mobile-menu {
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mobile-link {
    display: block;
    transition: color 0.3s ease, padding-left 0.3s ease;
}

.mobile-link:hover {
    color: #1a3a2a;
    padding-left: 8px;
}

/* Service cards */
.service-card {
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.service-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 60px rgba(26, 58, 42, 0.08);
}

/* Floating stat cards animation */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-8px); }
}

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

/* Scroll reveal (progressive enhancement) */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(24px);
        transition: opacity 0.8s ease, transform 0.8s ease;
    }

    .reveal.revealed {
        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; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }

    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

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

/* Image loading placeholder */
img {
    background-color: #dce8dc;
}
