/* Base resets and custom utilities */
*, *::before, *::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Scroll reveal animations - progressive enhancement, only when JS is available and motion is preferred */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(32px);
        transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    }

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

    /* Stagger children */
    .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; }
}

/* Fallback: ensure content is visible even if JS is disabled */
.no-js .reveal,
.js-enabled .reveal {
    /* JS will add 'revealed' class; without JS, content is already visible */
}

/* Navbar scroll state */
#navbar.scrolled {
    background-color: rgba(250, 248, 244, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(40, 82, 40, 0.08);
}

/* Smooth image loading */
img {
    display: block;
    max-width: 100%;
}

/* Selection color */
::selection {
    background-color: rgba(40, 82, 40, 0.2);
    color: #172e17;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #f5f0e8;
}
::-webkit-scrollbar-thumb {
    background: #9cc59c;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #6fa86f;
}
