/* Base styles */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    overflow-x: hidden;
}

/* Selection color */
::selection {
    background: #F59E0B;
    color: #1A0B17;
}

/* Scroll reveal - progressive enhancement: hidden by default, JS adds visible class */
.scroll-reveal {
    opacity: 1;
    transform: none;
    transition: none;
}

@media (prefers-reduced-motion: no-preference) {
    .scroll-reveal {
        opacity: 0;
        transform: translateY(32px);
        transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
    }

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

/* Mobile menu open state */
.mobile-menu-open #mobileMenu {
    opacity: 1 !important;
    pointer-events: auto !important;
}

.mobile-menu-open .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(4px, 4px);
}

.mobile-menu-open .menu-line:nth-child(2) {
    opacity: 0;
}

.mobile-menu-open .menu-line:nth-child(3) {
    width: 5rem;
    transform: rotate(-45deg) translate(4px, -4px);
}

/* Navbar scrolled state */
.nav-scrolled {
    background: rgba(26, 11, 23, 0.95) !important;
    backdrop-filter: blur(16px);
    box-shadow: 0 4px 32px rgba(0, 0, 0, 0.3);
}

.nav-scrolled .nav-link {
    color: rgba(255, 255, 255, 0.9) !important;
}

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

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #1A0B17;
}

::-webkit-scrollbar-thumb {
    background: #6B2F5B;
    border-radius: 4px;
}

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

/* Smooth image loading */
img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}
