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

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

/* Scroll Reveal Animations */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
    }

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

/* Navbar */
.nav-scrolled {
    background: rgba(253, 252, 248, 0.95) !important;
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(26, 92, 42, 0.08);
}

.nav-scrolled .menu-line {
    background: #1a5c2a !important;
}

/* Mobile Menu */
.mobile-link {
    position: relative;
}

.mobile-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: #1a5c2a;
    transition: width 0.3s ease;
}

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

/* Active menu state */
#mobileMenu.open .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

#mobileMenu.open .menu-line:nth-child(2) {
    opacity: 0;
}

#mobileMenu.open .menu-line:nth-child(3) {
    width: 24px;
    margin-left: 0;
    transform: rotate(-45deg) translate(5px, -5px);
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #2d7a45;
}

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

/* Image loading placeholder */
img {
    background: linear-gradient(135deg, #eaf3ec 0%, #d3e8d7 100%);
}

/* Selection color */
::selection {
    background: #a9d4b2;
    color: #0e3318;
}

/* Button press effect */
button, a {
    -webkit-tap-highlight-color: transparent;
}

button:active, a:active {
    transform: scale(0.98);
}
