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

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

body {
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

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

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

/* ===== SCROLL REVEAL (progressive enhancement) ===== */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
    }

    .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; }
}

/* ===== NAVBAR SCROLL STATE ===== */
.navbar-scrolled {
    background: rgba(250, 249, 245, 0.95) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(45, 94, 45, 0.1);
}

/* ===== MOBILE LINK TRANSITIONS ===== */
.mobile-link {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease, color 0.2s ease;
}

.mobile-menu-open .mobile-link {
    opacity: 1;
    transform: translateY(0);
}

.mobile-link:nth-child(1) { transition-delay: 0.1s; }
.mobile-link:nth-child(2) { transition-delay: 0.15s; }
.mobile-link:nth-child(3) { transition-delay: 0.2s; }
.mobile-link:nth-child(4) { transition-delay: 0.25s; }

/* ===== CUSTOM SELECTION ===== */
::selection {
    background: #2d5e2d;
    color: #FAF9F5;
}

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

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #8abc8a;
}

/* ===== MOBILE MENU ANIMATION ===== */
#mobileMenu {
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

/* ===== DECORATIVE PULSE ===== */
@keyframes subtle-pulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

.animate-pulse {
    animation: subtle-pulse 2s ease-in-out infinite;
}

/* ===== IMAGE PLACEHOLDER FALLBACK ===== */
img {
    background: linear-gradient(135deg, #dce8dc 0%, #b9d4b9 100%);
}

/* ===== ACCESSIBILITY: REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    html {
        scroll-behavior: auto;
    }

    .animate-marquee {
        animation: none;
    }
}
