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

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

/* Scroll reveal animations */
.scroll-reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    
    .scroll-reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* Navbar scroll state */
nav.scrolled {
    background: rgba(253, 251, 247, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(5, 150, 105, 0.08);
}

nav.scrolled .nav-link {
    color: rgba(6, 78, 59, 0.7);
}

nav.scrolled .nav-link:hover {
    color: rgb(5, 150, 105);
}

/* Mobile menu transitions */
#mobile-menu {
    animation: slideDown 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.mobile-link {
    position: relative;
}

.mobile-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background: rgb(5, 150, 105);
    transition: width 0.3s ease;
}

.mobile-link:hover::after {
    width: 100%;
}

/* Image hover effects */
img {
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

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

::-webkit-scrollbar-track {
    background: rgb(250, 246, 238);
}

::-webkit-scrollbar-thumb {
    background: rgb(167, 243, 208);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgb(110, 231, 183);
}

/* Selection color */
::selection {
    background: rgb(167, 243, 208);
    color: rgb(6, 78, 59);
}
