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

body {
    overflow-x: hidden;
}

::selection {
    background-color: #E86A5B;
    color: #fff;
}

/* ── Reveal Animations (progressive enhancement) ── */
@media (prefers-reduced-motion: no-preference) {
    .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);
    }

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

    .reveal:nth-child(2) { transition-delay: 0.1s; }
    .reveal:nth-child(3) { transition-delay: 0.2s; }
    .reveal:nth-child(4) { transition-delay: 0.3s; }
}

/* ── Navbar scroll state ── */
#site-header.scrolled {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06), 0 4px 24px rgba(0, 0, 0, 0.04);
}

#site-header.scrolled .font-display {
    color: #1A1C2A !important;
}

#site-header.scrolled a:not([class*="bg-coral"]) {
    color: #51566E !important;
}

#site-header.scrolled a:not([class*="bg-coral"]):hover {
    color: #E86A5B !important;
}

/* ── Mobile Menu ── */
#mobile-menu.open {
    display: block;
}

#mobile-menu.open[aria-hidden="true"] {
    display: block;
    aria-hidden: "false";
}

.mobile-menu-link {
    display: block;
}

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

/* ── Custom scrollbar ── */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #FFF3F0;
}
::-webkit-scrollbar-thumb {
    background: #DADCE6;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #B8BCCC;
}
