/* === Base & Reset === */
*, *::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;
}

::selection {
    background-color: rgba(54, 138, 36, 0.3);
    color: #faf8f4;
}

/* === Scroll Reveal (progressive enhancement) === */
.scroll-reveal {
    opacity: 1;
    transform: none;
    transition: opacity 0.6s ease, transform 0.6s ease;
}

@media (prefers-reduced-motion: no-preference) {
    .scroll-reveal {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.7s ease, transform 0.7s ease;
    }

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

/* === Navbar === */
#navbar {
    background: transparent;
    transition: background 0.4s ease, box-shadow 0.4s ease, backdrop-filter 0.4s ease;
}

#navbar.scrolled {
    background: rgba(4, 6, 4, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05), 0 4px 30px rgba(0, 0, 0, 0.3);
}

/* === Nav Links === */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: linear-gradient(90deg, #56a83d, #84c46e);
    transition: width 0.3s ease;
}

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

/* === Mobile Menu === */
#mobile-menu {
    z-index: 50;
}

#mobile-menu.open {
    transform: translateX(0);
}

#mobile-menu.closed {
    transform: translateX(-100%);
}

/* === Pulse Animation === */
@keyframes pulse-slow {
    0%, 100% {
        opacity: 0.4;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.05);
    }
}

.animate-pulse-slow {
    animation: pulse-slow 4s ease-in-out infinite;
}

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

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

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #1b5213, #0f310c);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #246b18, #1b5213);
}

/* === Form Focus Styles === */
input:focus,
select:focus,
textarea:focus {
    outline: none;
    box-shadow: 0 0 0 1px rgba(86, 168, 61, 0.3);
}

/* === Button Hover Glow === */
button[type="submit"]:hover {
    box-shadow: 0 0 30px rgba(86, 168, 61, 0.2) !important;
}

/* === Image Loading === */
img {
    image-rendering: auto;
}

img[loading="lazy"] {
    opacity: 1;
}

/* === Utility === */
@media (max-width: 768px) {
    .font-display {
        font-size: clamp(2rem, 8vw, 3.5rem);
    }
}
