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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    overflow-x: hidden;
}

/* Smooth scroll for anchor links */
a[href^="#"] {
    scroll-behavior: smooth;
}

/* Selection color */
::selection {
    background-color: rgba(16, 185, 129, 0.3);
    color: #1B4332;
}

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

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #FBF8F3;
}
::-webkit-scrollbar-thumb {
    background: #8fba96;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #619f6e;
}

/* Reveal animations - progressive enhancement */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
        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: translateY(0);
    }
}

/* Ensure content is always visible even without JS */
@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* If JS is disabled, show all reveals */
.no-js .reveal {
    opacity: 1;
    transform: none;
}

/* Navbar scroll state */
.nav-scrolled #navbar {
    background-color: rgba(254, 253, 251, 0.95);
    box-shadow: 0 4px 20px rgba(27, 67, 50, 0.08);
}

/* Active nav link */
.nav-link.active {
    background-color: rgba(27, 67, 50, 0.1);
    color: #1B4332;
}

/* Mobile menu transition */
#mobileMenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.3s ease;
}
#mobileMenu.open {
    max-height: 400px;
    opacity: 1;
}
