/* Base styles and custom utilities */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

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

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #fefdf8;
}
::-webkit-scrollbar-thumb {
    background: #065f46;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #047857;
}

/* Selection color */
::selection {
    background: #059669;
    color: #fefdf8;
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus visible styles */
:focus-visible {
    outline: 2px solid #059669;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Nav background when scrolled */
.nav-scrolled {
    background: rgba(254, 253, 248, 0.95) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(6, 95, 70, 0.08);
}

.nav-scrolled .font-serif {
    color: #064e3b !important;
}

.nav-scrolled a:not(.bg-emerald-800):not(.bg-cream-50) {
    color: rgba(6, 78, 59, 0.7) !important;
}

.nav-scrolled a:not(.bg-emerald-800):not(.bg-cream-50):hover {
    color: #064e3b !important;
}

/* Scroll reveal base - visible by default for progressive enhancement */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

/* Scroll reveal - only active when JS is enabled and user prefers motion */
@media (prefers-reduced-motion: no-preference) {
    .js-enabled .reveal {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.7s ease, transform 0.7s ease;
    }
    .js-enabled .reveal.visible {
        opacity: 1;
        transform: translateY(0);
    }
}

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