:root {
    --color-forest-50: #f0f7f2;
    --color-forest-100: #dcefd5;
    --color-forest-200: #b8dfaa;
    --color-forest-300: #85c978;
    --color-forest-400: #4fad4a;
    --color-forest-500: #2d8a32;
    --color-forest-600: #1a5c22;
    --color-forest-700: #14461a;
    --color-forest-800: #0e3213;
    --color-forest-900: #081e0b;
    --color-off-white: #fafaf7;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

body {
    background-color: var(--color-off-white);
    color: #1f2937;
}

/* Scroll reveal — progressive enhancement, only active when JS runs and prefers-reduced-motion allows */
@media (prefers-reduced-motion: no-preference) {
    .scroll-reveal {
        opacity: 0;
        transform: translateY(24px);
        transition: opacity 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94), transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    }

    .scroll-reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }

    .scroll-reveal:nth-child(2) { transition-delay: 0.1s; }
    .scroll-reveal:nth-child(3) { transition-delay: 0.2s; }
    .scroll-reveal:nth-child(4) { transition-delay: 0.3s; }
    .scroll-reveal:nth-child(5) { transition-delay: 0.4s; }
    .scroll-reveal:nth-child(6) { transition-delay: 0.5s; }
}

/* Navbar transitions */
#navbar.scrolled {
    background-color: rgba(250, 250, 247, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(26, 92, 34, 0.08);
}

#navbar.scrolled #nav-logo {
    color: #14461a;
}

#navbar.scrolled .nav-link {
    color: #14461a;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--color-off-white);
}

::-webkit-scrollbar-thumb {
    background: var(--color-forest-200);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-forest-300);
}

/* Selection */
::selection {
    background-color: var(--color-forest-200);
    color: var(--color-forest-800);
}

/* Form select arrow */
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='%239ca3af' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0 center;
    padding-right: 2rem !important;
}

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

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

/* Focus visible styles */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 2px solid var(--color-forest-500);
    outline-offset: 2px;
}
