/* ── Base & Reset ── */
*, *::before, *::after {
    box-sizing: border-box;
}

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

body {
    margin: 0;
    overflow-x: hidden;
}

::selection {
    background: #C4613A;
    color: #FDF9F4;
}

/* ── Navbar Scroll State ── */
#navbar.scrolled {
    background: rgba(253, 249, 244, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(45, 31, 22, 0.08);
}

#navbar.scrolled .font-serif {
    color: #2D1F16;
}

/* ── Mobile Menu ── */
.mobile-menu.open {
    opacity: 1;
    pointer-events: all;
}

.mobile-link {
    position: relative;
    display: inline-block;
}

.mobile-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: #C4613A;
    transition: width 0.3s ease;
}

.mobile-link:hover::after,
.mobile-link:focus::after {
    width: 100%;
}

/* ── Menu Item Hover ── */
.menu-item {
    transition: background-color 0.3s ease;
}

.menu-item:first-child {
    border-top: none;
}

/* ── Scroll Reveal (Progressive Enhancement) ── */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
        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; }
}

/* Fallback: ensure content is always visible */
@supports not (animation: none) {
    .reveal {
        opacity: 1;
        transform: none;
    }
}

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

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #C4613A;
}
