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

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

/* Selection color */
::selection {
    background-color: rgba(74, 122, 84, 0.2);
    color: #1a3021;
}

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

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

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

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

/* Reveal animations — progressive enhancement, only active with JS */
@media (prefers-reduced-motion: no-preference) {
    .reveal-up {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
    }

    .reveal-left {
        opacity: 0;
        transform: translateX(-40px);
        transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
    }

    .reveal-right {
        opacity: 0;
        transform: translateX(40px);
        transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
    }

    .reveal-up.revealed,
    .reveal-left.revealed,
    .reveal-right.revealed {
        opacity: 1;
        transform: translate(0, 0);
    }
}

/* Fallback: ensure content is visible even without JS */
@media (prefers-reduced-motion: reduce) {
    .reveal-up,
    .reveal-left,
    .reveal-right {
        opacity: 1;
        transform: none;
    }
}

/* Navbar scroll state */
.navbar-scrolled {
    background-color: rgba(253, 252, 248, 0.95) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(26, 48, 33, 0.08);
}

.navbar-scrolled .font-serif {
    color: #1a3021 !important;
}

.navbar-scrolled .text-forest-600,
.navbar-scrolled .text-forest-700 {
    color: #2c4f35 !important;
}

/* Smooth focus for accessibility */
*:focus-visible {
    outline: 2px solid #4a7a54;
    outline-offset: 2px;
}

/* Select dropdown arrow */
select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%234a7a54' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

/* Image hover zoom effect */
img {
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Print styles */
@media print {
    header, footer, #contact-form, #form-success {
        display: none !important;
    }
    
    body {
        color: #000;
        background: #fff;
    }
}
