/* ========== BASE & RESET ========== */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
    overflow-x: hidden;
}

img, svg {
    display: block;
    max-width: 100%;
}

/* ========== SCROLL REVEAL ========== */
/* Default: content is visible (progressive enhancement) */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

/* When JS runs, add the hidden state to elements that should animate in */
.reveal.animated {
    opacity: 0;
    transform: translateY(30px);
}

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

/* Respect reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
    .reveal.animated {
        opacity: 1;
        transform: none;
    }
}

/* ========== NAVBAR SCROLL STATE ========== */
#navbar.scrolled {
    background: rgba(255, 254, 248, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(4, 120, 87, 0.08);
}

#navbar.scrolled .font-bold {
    color: #064e3b !important;
}

#navbar.scrolled .text-emerald-600 {
    color: #047857 !important;
}

/* ========== MOBILE MENU ========== */
#mobile-menu {
    animation: slideDown 0.3s ease;
}

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

/* ========== CUSTOM SCROLLBAR ========== */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #fefce8;
}
::-webkit-scrollbar-thumb {
    background: #a7f3d0;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #34d399;
}

/* ========== FOCUS STYLES ========== */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid #10b981;
    outline-offset: 2px;
    border-radius: 4px;
}

/* ========== SELECTION ========== */
::selection {
    background: #a7f3d0;
    color: #064e3b;
}
