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

body {
    overflow-x: hidden;
}

::selection {
    background-color: rgba(168, 85, 112, 0.15);
    color: #4d222f;
}

/* ===== Scroll Reveal Animations ===== */
.reveal-up,
.reveal-left,
.reveal-right {
    opacity: 1;
    transform: none;
    transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.reveal-up {
    transform: translateY(0);
}

.reveal-left {
    transform: translateX(0);
}

.reveal-right {
    transform: translateX(0);
}

@media (prefers-reduced-motion: no-preference) {
    .reveal-up {
        opacity: 0;
        transform: translateY(30px);
    }
    
    .reveal-left {
        opacity: 0;
        transform: translateX(-30px);
    }
    
    .reveal-right {
        opacity: 0;
        transform: translateX(30px);
    }
    
    .reveal-up.revealed,
    .reveal-left.revealed,
    .reveal-right.revealed {
        opacity: 1;
        transform: translate(0);
    }
}

/* ===== Navbar Scroll State ===== */
#navbar.scrolled {
    background-color: rgba(250, 245, 247, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(140, 85, 112, 0.08);
}

#navbar.scrolled .font-serif {
    color: #4d222f !important;
}

#navbar.scrolled .mobile-link {
    color: #4d222f !important;
}

#navbar.scrolled #bar1,
#navbar.scrolled #bar2,
#navbar.scrolled #bar3 {
    background-color: #4d222f;
}

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

#mobile-menu:not(.open) {
    opacity: 0;
    pointer-events: none;
}

/* ===== Menu Item Hover ===== */
#menu section .group:hover h4 {
    letter-spacing: 0.02em;
}

/* ===== Button Focus ===== */
a:focus-visible,
button:focus-visible {
    outline: 2px solid #fcb70a;
    outline-offset: 2px;
    border-radius: 9999px;
}

/* ===== Custom Scrollbar ===== */
::-webkit-scrollbar {
    width: 6px;
}

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

::-webkit-scrollbar-thumb {
    background: #d9a8be;
    border-radius: 3px;
}

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

/* ===== Image Loading ===== */
img {
    image-rendering: auto;
}

/* ===== Smooth Section Transitions ===== */
section {
    position: relative;
}

/* ===== Print Styles ===== */
@media print {
    nav, .reveal-up, .reveal-left, .reveal-right {
        opacity: 1 !important;
        transform: none !important;
    }
}
