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

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

/* Scroll reveal base — always visible by default */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Only apply hidden state when JS is active and motion is preferred */
@media (prefers-reduced-motion: no-preference) {
    .reveal-hidden {
        opacity: 0;
        transform: translateY(30px);
    }
    
    .reveal-hidden.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #256b3a;
}

/* Selection color */
::selection {
    background: #1a5230;
    color: #fdfcfa;
}

/* Focus visible styles */
:focus-visible {
    outline: 2px solid #3d8a52;
    outline-offset: 2px;
}

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

/* Subtle text rendering for serif headlines */
.font-serif {
    text-rendering: optimizeLegibility;
}

/* Mobile menu transitions */
#mobile-menu {
    animation: slideDown 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Navbar transition */
#navbar.scrolled {
    background: rgba(253, 252, 250, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(13, 48, 30, 0.08);
}

/* Button hover effects */
button, a {
    -webkit-tap-highlight-color: transparent;
}

/* Print styles */
@media print {
    #navbar, #contact-form, button {
        display: none;
    }
    
    body {
        color: #000;
        background: #fff;
    }
}
