/* ===== 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: rgba(201, 162, 46, 0.3);
    color: #fff;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: #0d0609;
}
::-webkit-scrollbar-thumb {
    background: #3a0c11;
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: #7a1f2f;
}

/* ===== REVEAL ANIMATIONS (progressive enhancement) ===== */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
        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.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Fallback: always visible if JS is disabled or prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* ===== NAV SCROLL STATE ===== */
#siteHeader.scrolled {
    background: rgba(8, 4, 6, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

#siteHeader.scrolled nav {
    padding-top: 1rem;
    padding-bottom: 1rem;
}

/* ===== MOBILE MENU ===== */
#mobileMenu.open {
    opacity: 1;
    pointer-events: all;
}

.mobileNavLink {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease, color 0.3s ease;
}

#mobileMenu.open .mobileNavLink {
    opacity: 1;
    transform: translateY(0);
}

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

/* ===== GALLERY HOVER ===== */
@media (prefers-reduced-motion: no-preference) {
    .group img {
        will-change: transform;
    }
}

/* ===== FOCUS VISIBLE ===== */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid #c9a22e;
    outline-offset: 2px;
}

/* ===== RESPONSIVE TWEAKS ===== */
@media (max-width: 640px) {
    .font-display {
        line-height: 1.15;
    }
}
