/* ─── Custom styles that extend Tailwind ─── */

html {
    scroll-behavior: smooth;
}

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

/* ─── Navbar scroll shadow ─── */
#navbar.scrolled {
    box-shadow: 0 1px 20px rgba(26, 92, 58, 0.08);
}

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

#mobile-menu .mobile-link {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

#mobile-menu.open .mobile-link {
    opacity: 1;
    transform: translateY(0);
}

#mobile-menu.open .mobile-link:nth-child(1) { transition-delay: 0.05s; }
#mobile-menu.open .mobile-link:nth-child(2) { transition-delay: 0.1s; }
#mobile-menu.open .mobile-link:nth-child(3) { transition-delay: 0.15s; }
#mobile-menu.open .mobile-link:nth-child(4) { transition-delay: 0.2s; }
#mobile-menu.open .mobile-link:nth-child(5) { transition-delay: 0.25s; }

/* ─── Hamburger animation ─── */
.menu-line {
    transition: transform 0.3s ease, opacity 0.3s ease;
}

#menu-btn.active .menu-line:nth-child(1) {
    transform: translateY(4px) rotate(45deg);
}

#menu-btn.active .menu-line:nth-child(2) {
    opacity: 0;
}

#menu-btn.active .menu-line:nth-child(3) {
    transform: translateY(-4px) rotate(-45deg);
    width: 1.25rem;
    margin-right: 0;
}

/* ─── Form focus states ─── */
input:focus,
select:focus,
textarea:focus {
    outline: none;
}

/* ─── Selection color ─── */
::selection {
    background-color: rgba(26, 92, 58, 0.2);
    color: #1a5c3a;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #86a990;
}

/* ─── Reduced motion ─── */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    .reveal,
    .reveal-left,
    .reveal-right {
        opacity: 1;
        transform: none;
        transition: none;
    }
}
