/* ===== 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: #F5A623;
    color: #2a0e2e;
}

/* ===== Scroll Reveal (Progressive Enhancement) ===== */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(32px);
        transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1), transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
    }

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

    .reveal.delay-100 { transition-delay: 100ms; }
    .reveal.delay-200 { transition-delay: 200ms; }
    .reveal.delay-300 { transition-delay: 300ms; }
}

/* ===== Navbar Scroll State ===== */
#navbar.scrolled {
    background: rgba(250, 245, 251, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(123, 45, 139, 0.08), 0 8px 32px rgba(123, 45, 139, 0.06);
}

#navbar.scrolled .font-display {
    color: #2a0e2e;
}

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

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

/* ===== Smooth Image Loading ===== */
img {
    background-color: #f5e9f5;
}

/* ===== Custom Scrollbar ===== */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #faf5fb;
}
::-webkit-scrollbar-thumb {
    background: #d9aed7;
    border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover {
    background: #a354a0;
}

/* ===== Focus Styles ===== */
a:focus-visible, button:focus-visible {
    outline: 2px solid #F5A623;
    outline-offset: 4px;
    border-radius: 0.5rem;
}

/* ===== Selection ===== */
::selection {
    background: #F5A623;
    color: #2a0e2e;
}

/* ===== 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;
    }
    .reveal {
        opacity: 1 !important;
        transform: none !important;
    }
}
