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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    overflow-x: hidden;
}

/* Navbar transitions */
.nav-text {
    color: #29432f;
}

#navbar.scrolled .nav-text {
    color: #29432f;
}

#navbar.scrolled {
    background: rgba(253, 252, 248, 0.95);
    backdrop-blur-lg;
    box-shadow: 0 1px 20px rgba(33, 55, 39, 0.08);
}

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

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

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

/* Scroll reveal base — content always visible by default */
.reveal-up,
.reveal-left,
.reveal-right {
    opacity: 1;
    transform: none;
    transition: none;
}

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

    .reveal-left {
        opacity: 0;
        transform: translateX(-40px);
        transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
    }

    .reveal-right {
        opacity: 0;
        transform: translateX(40px);
        transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
    }

    .reveal-up.revealed,
    .reveal-left.revealed,
    .reveal-right.revealed {
        opacity: 1;
        transform: translate(0, 0);
    }
}

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

/* Selection */
::selection {
    background: #b8d0be;
    color: #111c13;
}

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

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

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

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