/* Base & Utilities */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

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

/* Scroll Reveal — progressive enhancement, works without JS */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(24px);
    }
    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Navbar active state */
nav.scrolled {
    background: rgba(30, 0, 64, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
}

nav.scrolled .nav-text,
nav.scrolled .nav-link,
nav.scrolled .bar {
    color: #f3e8ff;
}

/* Mobile menu animations */
#mobile-menu.open .bar:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}
#mobile-menu.open .bar:nth-child(2) {
    opacity: 0;
}
#mobile-menu.open .bar:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
    width: 1.5rem;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #1e0040;
}
::-webkit-scrollbar-thumb {
    background: #7B2CBF;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #a855f7;
}

/* Focus styles */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid #F59E0B;
    outline-offset: 2px;
}

/* Image loading placeholder */
img {
    background-color: #f3e8ff;
}
