/* ─── Base & Typography ─── */
html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    overflow-x: hidden;
}

::selection {
    background-color: rgba(58, 157, 98, 0.2);
    color: #113d25;
}

/* ─── Scroll Reveal Animations ─── */
.scroll-reveal {
    opacity: 0;
    transform: translateY(32px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* ─── Navbar ─── */
#navbar {
    transition: background-color 0.4s ease, padding 0.4s ease, box-shadow 0.4s ease;
}

#navbar.scrolled {
    background-color: rgba(8, 31, 18, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
}

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background-color: rgba(251, 232, 196, 0.8);
    transition: width 0.3s ease;
}

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

/* ─── Mobile Menu ─── */
.mobile-nav-link {
    position: relative;
}

.mobile-nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background-color: rgba(251, 232, 196, 0.5);
    transition: width 0.3s ease;
}

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

/* ─── Form Styles ─── */
input:focus,
textarea:focus {
    box-shadow: 0 0 0 4px rgba(58, 157, 98, 0.1);
}

/* ─── Button Hover Effects ─── */
button[type="submit"] {
    position: relative;
    overflow: hidden;
}

button[type="submit"]::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    transition: left 0.5s ease;
}

button[type="submit"]:hover::before {
    left: 100%;
}

/* ─── Image Hover ─── */
.group:hover .group-hover\:scale-105 {
    transform: scale(1.05);
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #267a48;
}

/* ─── Responsive Adjustments ─── */
@media (max-width: 640px) {
    .font-serif {
        line-height: 1.15;
    }
}
