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

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

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

/* ===== Scroll Animations (progressive enhancement) ===== */
.scroll-anim {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* ===== Navbar scroll state ===== */
#navbar.scrolled {
    background: rgba(252, 252, 247, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(44, 95, 50, 0.08), 0 4px 20px rgba(0, 0, 0, 0.04);
}

/* ===== Mobile menu animation ===== */
#mobile-menu {
    animation: slideDown 0.25s ease;
}

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

/* ===== Hero gradient animation ===== */
#hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 30% 50%, rgba(97, 155, 100, 0.3) 0%, transparent 60%),
                radial-gradient(ellipse at 70% 30%, rgba(59, 122, 68, 0.25) 0%, transparent 50%);
    animation: heroGlow 8s ease-in-out infinite alternate;
    z-index: 0;
}

@keyframes heroGlow {
    from { opacity: 0.6; }
    to   { opacity: 1; }
}

/* ===== Selection color ===== */
::selection {
    background: rgba(44, 95, 50, 0.2);
    color: #1d3f24;
}
