/* Base & utilities */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

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

/* Mobile menu transitions */
#mobileMenu {
    animation: menuSlideIn 0.25s ease-out;
}

#mobileMenu.hidden {
    display: none !important;
}

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

.mobile-link {
    transition: color 0.2s ease;
}

.mobile-link:hover {
    color: #059669;
}

/* Scroll reveal — progressive enhancement, only active when JS runs and user prefers motion */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(24px);
        transition: opacity 0.6s ease, transform 0.6s ease;
    }

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

    /* Stagger children slightly */
    .reveal:nth-child(2) { transition-delay: 0.05s; }
    .reveal:nth-child(3) { transition-delay: 0.1s; }
    .reveal:nth-child(4) { transition-delay: 0.15s; }
    .reveal:nth-child(5) { transition-delay: 0.2s; }
    .reveal:nth-child(6) { transition-delay: 0.25s; }
}

/* Navbar scroll state */
#navbar.scrolled {
    box-shadow: 0 1px 20px rgba(6, 78, 59, 0.08);
}

/* Focus styles */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid #059669;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Selection */
::selection {
    background-color: #065f46;
    color: #fdf8f0;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #047857;
}
