/* Base & resets */
*, *::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 base — visible by default, animated via JS for progressive enhancement */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 1;
        transform: translateY(0);
        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 */
#navbar {
    background: transparent;
    transition: background 0.3s ease, box-shadow 0.3s ease, padding 0.3s ease;
}

#navbar.scrolled {
    background: rgba(254, 253, 248, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(28, 52, 22, 0.08);
}

.nav-logo {
    transition: color 0.3s ease;
}

#navbar:not(.scrolled) .nav-logo {
    color: #fefdf8;
}

#navbar.scrolled .nav-logo {
    color: #1c3416;
}

#navbar:not(.scrolled) .menu-bar {
    background: #fefdf8;
}

#navbar.scrolled .menu-bar {
    background: #1c3416;
}

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

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

.mobile-link {
    display: block;
    padding: 8px 0;
    border-bottom: 1px solid rgba(74, 122, 50, 0.1);
}

.mobile-link:last-child {
    border-bottom: none;
}

.mobile-link:hover {
    color: #4a7a32;
}

/* Hero */
#hero {
    position: relative;
}

#hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(28, 52, 22, 0.9) 0%, rgba(45, 79, 32, 0.75) 50%, rgba(74, 122, 50, 0.5) 100%);
    z-index: 1;
}

#hero > .relative {
    position: relative;
    z-index: 2;
}

/* Button focus states */
a:focus-visible, button:focus-visible {
    outline: 2px solid #6a964e;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Selection */
::selection {
    background: rgba(74, 122, 50, 0.3);
    color: #1c3416;
}

/* Smooth image loading */
img {
    max-width: 100%;
    height: auto;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #8fb576;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
