/* ===== Base & Utilities ===== */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

/* ===== Navbar ===== */
#navbar {
    backdrop-filter: blur(0px);
    transition: background-color 0.5s ease, backdrop-filter 0.5s ease, padding 0.5s ease;
}

#navbar.scrolled {
    background-color: rgba(254, 253, 248, 0.92);
    backdrop-filter: blur(16px);
    box-shadow: 0 1px 0 rgba(6, 78, 59, 0.06);
}

.nav-logo-text {
    transition: color 0.5s ease;
}

#navbar:not(.scrolled) .nav-logo-text {
    color: #fefdf8;
}

#navbar.scrolled .nav-logo-text {
    color: #064e3b;
}

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

#mobile-menu.open .mobile-link {
    animation: fadeUp 0.4s ease forwards;
    opacity: 0;
}

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

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile menu button states */
.menu-btn.active .menu-line:nth-child(1) {
    transform: translateY(4px) rotate(45deg);
}
.menu-btn.active .menu-line:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}
.menu-btn.active .menu-line:nth-child(3) {
    transform: translateY(-4px) rotate(-45deg);
    width: 1.5rem;
}

/* ===== Menu Items ===== */
.menu-item {
    border-bottom: 1px solid rgba(110, 231, 183, 0.1);
    padding-bottom: 1rem;
}

.menu-item:last-child {
    border-bottom: none;
}

/* ===== Scroll Reveal (progressive enhancement) ===== */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(24px);
        transition: opacity 0.8s ease, transform 0.8s ease;
    }
    
    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
    
    .reveal-delay-1 { transition-delay: 0.1s; }
    .reveal-delay-2 { transition-delay: 0.2s; }
    .reveal-delay-3 { transition-delay: 0.3s; }
}

/* ===== Selection ===== */
::selection {
    background-color: rgba(16, 185, 129, 0.2);
    color: #064e3b;
}

/* ===== Focus ===== */
:focus-visible {
    outline: 2px solid #10b981;
    outline-offset: 2px;
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: #fefdf8;
}
::-webkit-scrollbar-thumb {
    background: #a7f3d0;
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: #6ee7b7;
}
