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

body {
    overflow-x: hidden;
}

::selection {
    background-color: #A8C5AB;
    color: #1A3524;
}

/* ── Animations ── */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

@keyframes float-delayed {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-8px); }
}

.animate-float {
    animation: float 4s ease-in-out infinite;
}

.animate-float-delayed {
    animation: float-delayed 4.5s ease-in-out infinite;
    animation-delay: 1s;
}

/* ── 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.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Default state for reduced-motion or no-JS: always visible */
@media (prefers-reduced-motion: no-preference) {
    .scroll-reveal {
        opacity: 0;
        transform: translateY(24px);
    }
    .scroll-reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ── Navbar ── */
#navbar {
    background: transparent;
}

#navbar.scrolled {
    background: rgba(253, 252, 250, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(45, 90, 61, 0.08);
}

/* ── Mobile Menu ── */
#mobile-menu {
    animation: slideDown 0.3s ease-out;
}

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

/* ── Buttons ── */
a, button {
    -webkit-tap-highlight-color: transparent;
}

/* ── Form ── */
input:focus, textarea:focus {
    box-shadow: 0 0 0 3px rgba(45, 90, 61, 0.1);
}

/* ── Image hover containers ── */
.rounded-2xl.overflow-hidden,
.rounded-3xl.overflow-hidden {
    will-change: transform;
}

/* ── Smooth image loading ── */
img {
    image-rendering: auto;
}

/* ── Focus visible for accessibility ── */
:focus-visible {
    outline: 2px solid #2D5A3D;
    outline-offset: 2px;
}

/* ── Custom scrollbar ── */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #F5F0E8;
}
::-webkit-scrollbar-thumb {
    background: #A8C5AB;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #7FA983;
}
