/* Base */
html {
    scroll-behavior: smooth;
}

body {
    overflow-x: hidden;
}

/* Scroll-reveal base: visible by default for progressive enhancement */
.scroll-reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

@media (prefers-reduced-motion: no-preference) {
    .scroll-reveal {
        opacity: 0;
        transform: translateY(24px);
    }

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

/* Header scroll state */
.header-scrolled {
    background: rgba(253, 252, 248, 0.95) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 12px rgba(20, 58, 36, 0.08);
}

/* Mobile menu animation */
#mobile-menu {
    transition: max-height 0.35s ease, opacity 0.25s ease;
    opacity: 1;
}

#mobile-menu.closed {
    max-height: 0 !important;
    opacity: 0;
    overflow: hidden;
}

/* Subtle page background texture */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -1;
    opacity: 0.3;
    background-image: radial-gradient(circle at 25% 25%, rgba(53, 146, 89, 0.04) 0%, transparent 50%),
                      radial-gradient(circle at 75% 75%, rgba(53, 146, 89, 0.03) 0%, transparent 50%);
}

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

/* Selection */
::selection {
    background: #B3E0C1;
    color: #19492D;
}

/* Smooth image loading */
img {
    loading: lazy;
}

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

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

::-webkit-scrollbar-thumb {
    background: #B3E0C1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #7DC79A;
}
