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

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    margin: 0;
    overflow-x: hidden;
}

/* Scroll reveal animations - progressive enhancement, only applied via JS */
.reveal-item {
    opacity: 1;
    transform: none;
    transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94), 
                transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

/* Mobile menu transitions */
#mobile-menu {
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

#mobile-menu.open {
    transform: translateX(0);
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #6da078;
}

/* Selection color */
::selection {
    background: #c8dfcf;
    color: #0f1a13;
}

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

/* Reduce motion preference */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    .reveal-item {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
}
