/* ── Base ── */
html {
    scroll-behavior: smooth;
}

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

/* ── Mobile Nav ── */
.nav-closed {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease, opacity 0.35s ease;
    opacity: 0;
}

.nav-open {
    max-height: 400px;
    opacity: 1;
}

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

@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(24px);
    }

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

@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ── Selection ── */
::selection {
    background: color-mix(in srgb, #0d9488 80%, white);
    color: white;
}

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

/* ── Custom Scrollbar ── */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
    background: #94a3b8;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #64748b;
}

/* ── Nav transition fix ── */
@media (max-width: 1023px) {
    #mobileNav {
        transition: max-height 0.35s ease, opacity 0.35s ease;
    }
}
