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

body {
    overflow-x: hidden;
}

::selection {
    background-color: rgba(74, 168, 114, 0.25);
    color: #0A2342;
}

/* ── Scroll Reveal (progressive enhancement) ── */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(32px);
        transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1), transform 0.8s cubic-bezier(0.22, 1, 0.36, 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; }
}

/* ── Card Hover Effects ── */
.card-elevated {
    transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.5s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.5s ease;
}
.card-elevated:hover {
    transform: translateY(-6px);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.3);
}

/* ── Navbar ── */
#navbar {
    background: transparent;
    backdrop-filter: none;
}
#navbar.scrolled {
    background: rgba(253, 252, 250, 0.95);
    backdrop-filter: blur(16px);
    box-shadow: 0 1px 0 rgba(10, 35, 66, 0.06), 0 4px 24px rgba(10, 35, 66, 0.04);
}

.nav-link {
    position: relative;
}
.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1.5px;
    background: #4aa872;
    transition: width 0.3s ease;
}
.nav-link:hover::after {
    width: 100%;
}

/* ── Mobile Menu ── */
.mobile-link {
    position: relative;
}

/* ── Button Focus States ── */
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid #6bbf8c;
    outline-offset: 2px;
}

/* ── Custom Scrollbar ── */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #faf6f0;
}
::-webkit-scrollbar-thumb {
    background: #a3b5d0;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #7690ba;
}

/* ── Form Transitions ── */
#contact-form input,
#contact-form textarea {
    transition: border-color 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
}
#contact-form input:focus,
#contact-form textarea:focus {
    background-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 3px rgba(107, 191, 140, 0.15);
}

/* ── Success Message Animation ── */
#form-success {
    animation: fadeInUp 0.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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