/* ===== Base & Reset ===== */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

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

img, svg {
    display: block;
    max-width: 100%;
}

/* ===== Navbar ===== */
#navbar {
    background: rgba(250, 249, 246, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(46, 82, 48, 0.08);
}

#navbar.scrolled {
    background: rgba(250, 249, 246, 0.95);
    box-shadow: 0 1px 20px rgba(46, 82, 48, 0.08);
}

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: #3d6b3d;
    transition: width 0.25s ease;
}

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

/* ===== Mobile Menu ===== */
#mobile-menu.open {
    opacity: 1;
    pointer-events: all;
}

#mobile-menu.closed {
    opacity: 0;
    pointer-events: none;
}

.mobile-nav-link {
    position: relative;
}

.mobile-nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: #3d6b3d;
    transition: width 0.25s ease;
}

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

/* Menu button animation */
.menu-icon span:nth-child(1) {
    transform-origin: center;
}

.menu-icon span:nth-child(3) {
    transform-origin: center;
}

body.menu-open .menu-icon span:nth-child(1) {
    transform: translateY(4px) rotate(45deg);
}

body.menu-open .menu-icon span:nth-child(2) {
    opacity: 0;
}

body.menu-open .menu-icon span:nth-child(3) {
    transform: translateX(4px) rotate(-45deg);
    width: 1.25rem;
}

/* ===== Hero Image ===== */
#hero img {
    transition: transform 0.6s ease;
}

#hero:hover img {
    transform: scale(1.02);
}

/* ===== Card Hover Effects ===== */
#menu .group {
    will-change: transform;
}

/* ===== Scroll Reveal (progressive enhancement) ===== */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.7s ease, transform 0.7s ease;
    }

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

    .reveal-delay-1 { transition-delay: 0.1s; }
    .reveal-delay-2 { transition-delay: 0.2s; }
    .reveal-delay-3 { transition-delay: 0.3s; }
    .reveal-delay-4 { transition-delay: 0.4s; }
}

/* ===== Focus Styles ===== */
a:focus-visible,
button:focus-visible {
    outline: 2px solid #3d6b3d;
    outline-offset: 2px;
    border-radius: 4px;
}

/* ===== Selection ===== */
::selection {
    background: #3d6b3d;
    color: #faf9f6;
}

/* ===== Smooth image loading ===== */
img {
    background-color: #ebe7dd;
}

/* ===== Map container ===== */
iframe {
    filter: saturate(0.8) contrast(1.05);
    transition: filter 0.3s ease;
}

iframe:hover {
    filter: saturate(1) contrast(1);
}

/* ===== Print styles ===== */
@media print {
    #navbar, #mobile-menu { display: none; }
    body { background: white; }
    a { color: #1c321e; }
}
