/* Base & Typography */
html {
    scroll-behavior: smooth;
}

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

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #f5f0e8;
}
::-webkit-scrollbar-thumb {
    background: #1a3a2a;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #2d4f2c;
}

/* Navbar scroll state */
.nav-scrolled {
    background: rgba(250, 248, 244, 0.95) !important;
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(26, 58, 42, 0.08);
}

.nav-scrolled .nav-logo-text {
    color: #1a3a2a !important;
}

.nav-scrolled .nav-link {
    color: #1a3a2a !important;
}

.nav-scrolled .nav-link:hover {
    color: #4a7a46 !important;
}

/* Marquee animation */
.marquee-track {
    animation: marquee 30s linear infinite;
}

@keyframes marquee {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

/* Reveal animations - progressive enhancement */
.reveal-section {
    opacity: 1;
    transform: none;
}

@media (prefers-reduced-motion: no-preference) {
    .reveal-section {
        opacity: 0;
        transform: translateY(32px);
        transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
                    transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    }

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

    /* Stagger children */
    .reveal-section .group:nth-child(2) { transition-delay: 0.1s; }
    .reveal-section .group:nth-child(3) { transition-delay: 0.2s; }
    .reveal-section .group:nth-child(4) { transition-delay: 0.3s; }
    .reveal-section .group:nth-child(5) { transition-delay: 0.4s; }
    .reveal-section .group:nth-child(6) { transition-delay: 0.5s; }
}

/* Mobile menu */
.mobile-menu-link {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.4s ease, transform 0.4s ease, color 0.2s ease;
}

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

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

/* Selection color */
::selection {
    background: #1a3a2a;
    color: #faf8f4;
}

/* Focus styles */
a:focus-visible,
button:focus-visible {
    outline: 2px solid #1a3a2a;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Image loading placeholder */
img {
    background-color: #dce8de;
}

/* Smooth image loading */
img {
    transition: opacity 0.3s ease;
}
img[loading="lazy"] {
    opacity: 0;
}
img.loaded {
    opacity: 1;
}
