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

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

/* Selection color */
::selection {
    background-color: rgba(45, 106, 79, 0.2);
    color: #1B4332;
}

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

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

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

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

/* 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;
    }
}

/* Scroll reveal animations (progressive enhancement) */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 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; }

@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
    }
}

/* Nav scroll state */
.nav-scrolled {
    background-color: rgba(250, 249, 246, 0.95) !important;
    backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(27, 67, 50, 0.06);
}

.nav-scrolled #navbar a:not([href^="tel:"]) {
    color: #1B4332 !important;
}

/* Image lazy load fade */
img[loading="lazy"] {
    opacity: 0;
    transition: opacity 0.6s ease;
}

img[loading="lazy"].loaded {
    opacity: 1;
}
