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

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

::selection {
    background-color: #7B2D3B;
    color: #FDF8F6;
}

/* ── Hero Fade-In Animations ── */
@keyframes fade-in {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation-name: fade-in;
    animation-duration: 0.8s;
    animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    animation-fill-mode: forwards;
}

/* ── Scroll Reveal (progressive enhancement) ── */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1),
                    transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    }

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

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

/* Ensure content is visible without JS */
@media not all and (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 1;
        transform: none;
    }
}

/* ── Navbar Scroll State ── */
#navbar.scrolled {
    background-color: rgba(253, 248, 246, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(123, 45, 59, 0.08);
}

#navbar.scrolled .font-playfair {
    color: #7B2D3B;
}

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

#mobile-menu.closed {
    opacity: 0;
    pointer-events: none;
}

.mobile-link {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.4s ease, transform 0.4s ease, color 0.3s ease;
}

#mobile-menu.open .mobile-link {
    opacity: 1;
    transform: translateY(0);
}

#mobile-menu.open .mobile-link:nth-child(1) { transition-delay: 0.1s; }
#mobile-menu.open .mobile-link:nth-child(2) { transition-delay: 0.15s; }
#mobile-menu.open .mobile-link:nth-child(3) { transition-delay: 0.2s; }
#mobile-menu.open .mobile-link:nth-child(4) { transition-delay: 0.25s; }

/* ── Menu Line Animation ── */
#menu-toggle.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(4px, 4px);
}

#menu-toggle.active .menu-line:nth-child(2) {
    opacity: 0;
}

#menu-toggle.active .menu-line:nth-child(3) {
    width: 1.5rem;
    transform: rotate(-45deg) translate(4px, -4px);
}

/* ── Smooth Image Loading ── */
img {
    opacity: 1;
    transition: opacity 0.3s ease;
}

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

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

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

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

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

/* ── Print Styles ── */
@media print {
    #navbar,
    #mobile-menu,
    .reveal {
        display: none !important;
    }
    
    body {
        color: #000;
        background: #fff;
    }
}
