*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    overflow-x: hidden;
}

::selection {
    background: #064e3b;
    color: #fefdf8;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: #fefdf8;
}
::-webkit-scrollbar-thumb {
    background: #166534;
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: #064e3b;
}

/* Animations */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-up {
    animation: fadeUp 0.8s ease-out forwards;
}

/* Reveal on scroll — progressive enhancement, content is visible by default */
.reveal {
    /* Default state: visible, no animation — JS adds the animated state */
}

@media (prefers-reduced-motion: no-preference) {
    .reveal.is-visible {
        animation: fadeUp 0.7s ease-out forwards;
    }
}

/* Header transition states */
#site-header.scrolled {
    background: rgba(254, 253, 248, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(6, 78, 59, 0.08);
}

#site-header.scrolled #nav-name,
#site-header.scrolled .nav-link {
    color: #064e3b;
}

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

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

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

/* Mobile menu button animation */
.menu-line {
    display: block;
    height: 1.5px;
    background: currentColor;
    transition: all 0.3s ease;
}

#mobile-menu-btn.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(4px, 4px);
}
#mobile-menu-btn.active .menu-line:nth-child(2) {
    opacity: 0;
}
#mobile-menu-btn.active .menu-line:nth-child(3) {
    width: 1.5rem;
    transform: rotate(-45deg) translate(4px, -4px);
}

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

/* Selection for form inputs */
input::placeholder,
textarea::placeholder {
    color: rgba(6, 78, 59, 0.15);
}
