/* ── Reset & 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 {
    overflow-x: hidden;
}

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

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

button {
    border: none;
    background: none;
    cursor: pointer;
    font-family: inherit;
}

/* ── Scroll Reveal (progressive enhancement) ── */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(32px);
        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: always visible if JS is disabled or reduced motion */
@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
    }
}

/* ── Navbar ── */
#navbar {
    background: transparent;
    transition: background 0.4s ease, box-shadow 0.4s ease, backdrop-filter 0.4s ease;
}

#navbar.scrolled {
    background: rgba(253, 252, 251, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
}

#navbar.scrolled .nav-link {
    color: #4A3728;
}

#navbar.scrolled .font-serif.text-xl {
    color: #2A1E14;
}

/* ── Mobile Menu ── */
#mobile-menu.open {
    transform: translateX(0);
}

#mobile-menu:not(.open) {
    transform: translateX(100%);
}

.menu-line:nth-child(3) {
    width: 1.5rem;
}

#menu-toggle[aria-expanded="true"] .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(0.25rem, 0.25rem);
}

#menu-toggle[aria-expanded="true"] .menu-line:nth-child(2) {
    opacity: 0;
}

#menu-toggle[aria-expanded="true"] .menu-line:nth-child(3) {
    width: 1.5rem;
    transform: rotate(-45deg) translate(0.25rem, -0.25rem);
}

/* ── Menu Section ── */
#menu .border-b {
    border-color: rgba(212, 196, 173, 0.5);
}

/* ── Selection ── */
::selection {
    background: #C1694F;
    color: #FDFCFB;
}

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

/* ── Smooth Scroll Offset for Fixed Nav ── */
section[id] {
    scroll-margin-top: 80px;
}

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

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

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

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

/* ── Print Styles ── */
@media print {
    #navbar, #mobile-menu, .reveal { display: none; }
    body { background: white; color: black; }
    section { padding: 20px 0; }
}
