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

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

body {
    overflow-x: hidden;
}

::selection {
    background-color: #2a4a2a;
    color: #fefdf8;
}

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

::-webkit-scrollbar-track {
    background: #182c18;
}

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

::-webkit-scrollbar-thumb:hover {
    background: #729e72;
}

/* ===== Marquee Animation ===== */
@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.animate-marquee {
    animation: marquee 30s linear infinite;
}

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

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

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

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

/* ===== Mobile Menu Button States ===== */
body.menu-open #menu-toggle .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

body.menu-open #menu-toggle .menu-line:nth-child(2) {
    opacity: 0;
}

body.menu-open #menu-toggle .menu-line:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
    width: 7px;
}

/* ===== Scroll Reveal (progressive enhancement) ===== */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
        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; }
    .reveal-delay-4 { transition-delay: 0.4s; }
}

/* ===== Focus Styles ===== */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 2px solid #4f7e4f;
    outline-offset: 2px;
}

/* ===== Image Loading ===== */
img {
    display: block;
    max-width: 100%;
}

/* ===== Utility ===== */
sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}
