/* ===== Base & Utilities ===== */
html {
    scroll-behavior: smooth;
}

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

/* ===== Scroll Reveal ===== */
.scroll-reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.scroll-reveal[data-reveal-delay="1"] { transition-delay: 0.1s; }
.scroll-reveal[data-reveal-delay="2"] { transition-delay: 0.2s; }
.scroll-reveal[data-reveal-delay="3"] { transition-delay: 0.3s; }
.scroll-reveal[data-reveal-delay="4"] { transition-delay: 0.4s; }

@media (prefers-reduced-motion: no-preference) {
    .reveal-hidden {
        opacity: 0;
        transform: translateY(24px);
    }
    .reveal-hidden.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== Navbar Scroll State ===== */
.nav-scrolled {
    transition: box-shadow 0.3s ease, background 0.3s ease;
}

/* ===== Selection ===== */
::selection {
    background-color: #314f31;
    color: #fcfbf8;
}

/* ===== Custom Scrollbar ===== */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #f9f6ef;
}
::-webkit-scrollbar-thumb {
    background: #96be96;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #6a9a6a;
}

/* ===== Focus Visible ===== */
*:focus-visible {
    outline: 2px solid #4a7a4a;
    outline-offset: 2px;
    border-radius: 4px;
}

/* ===== Mobile Menu Animation ===== */
#mobile-menu {
    animation: slideDown 0.25s ease-out;
}

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

/* ===== Button Hover Micro-interaction ===== */
button[type="submit"],
a[href^="tel"] {
    position: relative;
    overflow: hidden;
}

/* ===== Form Input Autofill ===== */
input:-webkit-autofill,
textarea:-webkit-autofill,
select:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 30px #f9f6ef inset !important;
    -webkit-text-fill-color: #1c2e1c !important;
}
</style>
