/* ── Base & Utilities ── */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

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

/* ── Scroll Reveal ── */
.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);
}

.reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

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

/* ── Floating Cards ── */
.floating-card {
    animation: float 4s ease-in-out infinite;
}

.floating-card:nth-child(2) {
    animation-delay: -2s;
    animation-duration: 5s;
}

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

/* ── Navbar ── */
#navbar.scrolled {
    background: rgba(253, 251, 247, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 1px 0 rgba(6, 78, 59, 0.08);
}

/* ── Mobile Menu ── */
.mobile-link {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.3s ease, transform 0.3s ease, color 0.2s ease;
}

.mobile-menu.open .mobile-link {
    opacity: 1;
    transform: translateY(0);
}

.mobile-menu.open .mobile-link:nth-child(1) { transition-delay: 0.05s; }
.mobile-menu.open .mobile-link:nth-child(2) { transition-delay: 0.1s; }
.mobile-menu.open .mobile-link:nth-child(3) { transition-delay: 0.15s; }
.mobile-menu.open .mobile-link:nth-child(4) { transition-delay: 0.2s; }
.mobile-menu.open .mobile-link:nth-child(5) { transition-delay: 0.25s; }

/* ── Image Hover ── */
img {
    display: block;
    max-width: 100%;
}

/* ── Selection ── */
::selection {
    background: rgba(6, 78, 59, 0.15);
    color: #064E3B;
}

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

/* ── Smooth scrollbar ── */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #F9F5EB;
}
::-webkit-scrollbar-thumb {
    background: #064E3B;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #065F46;
}
