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

body {
    overflow-x: hidden;
}

::selection {
    background-color: rgba(38, 82, 38, 0.2);
    color: #1c401c;
}

/* ===== Scroll Animations ===== */
.scroll-animate {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

/* Progressive enhancement: hidden by default, revealed by JS */
@media (prefers-reduced-motion: no-preference) {
    .scroll-animate {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.7s ease, transform 0.7s ease;
    }
}

.scroll-animate.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===== Hero Animations ===== */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== Navbar ===== */
.navbar-scrolled {
    background-color: rgba(15, 36, 15, 0.95) !important;
    backdrop-filter: blur(12px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.15);
}

.navbar-transparent {
    background-color: transparent !important;
    box-shadow: none;
}

/* ===== Mobile Menu ===== */
.mobile-nav-link {
    border-left: 3px solid transparent;
}

.mobile-nav-link:hover {
    border-left-color: rgba(253, 252, 250, 0.6);
    padding-left: 1rem;
}

/* ===== Custom Select ===== */
select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23356b35' 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;
}

/* ===== Focus Styles ===== */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid #356b35;
    outline-offset: 2px;
    border-radius: 4px;
}

/* ===== Button Ripple Effect ===== */
button, a {
    -webkit-tap-highlight-color: transparent;
}

/* ===== Image Placeholder Fallback ===== */
img {
    background-color: #d8e2d8;
}

/* ===== Responsive Adjustments ===== */
@media (max-width: 768px) {
    .font-serif {
        line-height: 1.15;
    }
}

/* ===== Print Styles ===== */
@media print {
    header, footer, .scroll-animate {
        opacity: 1 !important;
        transform: none !important;
    }
}
