/* Base & Typography */
html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-feature-settings: "cv02", "cv03", "cv04", "cv11";
    font-optical-sizing: auto;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #FDFCF8;
}
::-webkit-scrollbar-thumb {
    background: #8fb892;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #2a5c36;
}

/* Selection */
::selection {
    background: #1B4332;
    color: #FDFCF8;
}

/* Hero parallax effect */
#top {
    will-change: transform;
}

/* Smooth image loading */
img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

/* Mobile menu transitions */
#mobileMenu {
    transition: opacity 0.3s ease, pointer-events 0.3s ease;
}
#mobileMenu.active {
    opacity: 1;
    pointer-events: all;
}

/* Mobile links */
.mobile-link {
    position: relative;
}
.mobile-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: #D4A843;
    transition: width 0.3s ease;
}
.mobile-link:hover::after {
    width: 80%;
}

/* Scroll reveal base - content is ALWAYS visible by default */
.scroll-reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

/* Scroll reveal when animated - only applied via JS for progressive enhancement */
.scroll-reveal.animated {
    opacity: 0;
    transform: translateY(30px);
}

.scroll-reveal.animated.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered animation delays for grid items */
.scroll-reveal:nth-child(1) { transition-delay: 0.05s; }
.scroll-reveal:nth-child(2) { transition-delay: 0.1s; }
.scroll-reveal:nth-child(3) { transition-delay: 0.15s; }
.scroll-reveal:nth-child(4) { transition-delay: 0.2s; }
.scroll-reveal:nth-child(5) { transition-delay: 0.25s; }
.scroll-reveal:nth-child(6) { transition-delay: 0.3s; }

/* Navbar scroll state */
#navbar.scrolled {
    background: rgba(253, 252, 248, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(27, 67, 50, 0.08), 0 4px 20px rgba(27, 67, 50, 0.06);
}

#navbar.scrolled .font-serif,
#navbar.scrolled .text-forest-900 {
    color: #1B4332;
}

#navbar.scrolled a:not(.bg-forest-700):not(.text-gold-400) {
    color: #1B4332;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    .scroll-reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
    .scroll-reveal.animated {
        opacity: 1;
        transform: none;
    }
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Tablet */
@media (max-width: 768px) {
    .font-serif {
        line-height: 1.1;
    }
}

/* Large screens */
@media (min-width: 1920px) {
    .max-w-7xl {
        max-width: 80rem;
    }
}
