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

body {
    overflow-x: hidden;
}

::selection {
    background: #b0d4b0;
    color: #0e3f17;
}

/* ── Floating cards animation ── */
.floating-card-1 {
    animation: float1 4s ease-in-out infinite;
}

.floating-card-2 {
    animation: float2 5s ease-in-out infinite;
}

.floating-card-3 {
    animation: float3 4.5s ease-in-out infinite;
}

.floating-card-4 {
    animation: float4 5.5s ease-in-out infinite;
}

@keyframes float1 {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-12px); }
}

@keyframes float2 {
    0%, 100% { transform: translateY(0px) rotate(2deg); }
    50% { transform: translateY(-16px) rotate(2deg); }
}

@keyframes float3 {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

@keyframes float4 {
    0%, 100% { transform: translateY(0px) translateX(0); }
    50% { transform: translateY(-14px) translateX(4px); }
}

/* ── Scroll reveal (progressive enhancement) ── */
@media (prefers-reduced-motion: no-preference) {
    .scroll-reveal {
        opacity: 0;
        transform: translateY(32px);
        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);
    }
}

/* ── Navbar scroll state ── */
nav.scrolled {
    background: rgba(250, 249, 246, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 20px rgba(26, 107, 40, 0.08);
}

nav.scrolled .logo-text {
    color: #0e3f17;
}

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

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

.mobile-link {
    transition: color 0.2s ease, padding-left 0.2s ease;
}

.mobile-link:hover {
    padding-left: 8px;
}

/* ── Focus styles ── */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid #31843f;
    outline-offset: 2px;
    border-radius: 4px;
}

/* ── Smooth image loading ── */
img {
    background-color: #eae6da;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #7fbf85;
}
