/* ── Base ─────────────────────────────────────────────────────────────────── */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

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

body {
    min-height: 100vh;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

/* ── Scroll Reveal (progressive enhancement) ─────────────────────────────── */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(24px);
        transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
                    transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    }

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

    .reveal-delay-1 { transition-delay: 0.1s; }
    .reveal-delay-2 { transition-delay: 0.2s; }
    .reveal-delay-3 { transition-delay: 0.3s; }
    .reveal-delay-4 { transition-delay: 0.4s; }
}

/* ── Navbar scroll state ──────────────────────────────────────────────────── */
.navbar-scrolled {
    background: rgba(250, 250, 246, 0.95) !important;
    backdrop-filter: blur(20px) !important;
    box-shadow: 0 1px 0 rgba(27, 67, 50, 0.06);
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #93c99e;
}

/* ── Selection ────────────────────────────────────────────────────────────── */
::selection {
    background: #1B4332;
    color: #FAFAF6;
}

/* ── Focus visible ────────────────────────────────────────────────────────── */
a:focus-visible,
button:focus-visible {
    outline: 2px solid #1B4332;
    outline-offset: 3px;
    border-radius: 4px;
}

/* ── Mobile menu animation ────────────────────────────────────────────────── */
#mobile-menu {
    animation: slideDown 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

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

/* ── Floating card animations ─────────────────────────────────────────────── */
@media (prefers-reduced-motion: no-preference) {
    .float-slow {
        animation: float 6s ease-in-out infinite;
    }

    .float-medium {
        animation: float 4.5s ease-in-out infinite;
    }

    .float-fast {
        animation: float 3.5s ease-in-out infinite;
    }

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

/* ── Utility ──────────────────────────────────────────────────────────────── */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}
