/* ─── 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: #7B2D3B;
    color: #FFF8F5;
}

/* ─── SCROLL REVEAL (progressive enhancement) ─── */
.reveal {
    opacity: 1;
    transform: none;
    transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.js-active .reveal {
    opacity: 0;
    transform: translateY(32px);
}

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

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

/* ─── NAVBAR SCROLL STATE ─── */
#navbar.scrolled {
    background: rgba(58, 15, 22, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 1px 24px rgba(0, 0, 0, 0.2);
}

#navbar.scrolled nav {
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
}

/* ─── MOBILE MENU ─── */
#mobile-menu.open {
    opacity: 1;
    pointer-events: auto;
}

/* ─── SMOOTH SCROLL OFFSET ─── */
section[id] {
    scroll-margin-top: 80px;
}

/* ─── CUSTOM SELECT ARROW ─── */
select.appearance-none {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

/* ─── FOCUS VISIBLE ─── */
*:focus-visible {
    outline: 2px solid #7B2D3B;
    outline-offset: 2px;
}

/* ─── REDUCED MOTION ─── */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    html { scroll-behavior: auto; }
    .js-active .reveal {
        opacity: 1;
        transform: none;
    }
}
