/* 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-color: rgba(251, 191, 36, 0.3);
    color: #f9f5ff;
}

/* Scroll Reveal - Progressive Enhancement: content visible by default, JS adds animation */
@media (prefers-reduced-motion: no-preference) {
    .scroll-reveal {
        opacity: 1;
        transform: translateY(0);
        transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
    }
}

/* Floating card animations */
@keyframes float-1 {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-12px); }
}

@keyframes float-2 {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-8px); }
}

@keyframes float-3 {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

@keyframes float-4 {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-6px); }
}

.float-card-1 { animation: float-1 6s ease-in-out infinite; }
.float-card-2 { animation: float-2 5s ease-in-out infinite 0.5s; }
.float-card-3 { animation: float-3 7s ease-in-out infinite 1s; }
.float-card-4 { animation: float-4 5.5s ease-in-out infinite 1.5s; }

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

::-webkit-scrollbar-track {
    background: #0a0710;
}

::-webkit-scrollbar-thumb {
    background: #581c87;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #7e22ce;
}

/* Navbar glass effect */
.nav-scrolled {
    background: rgba(6, 4, 9, 0.85) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(88, 28, 135, 0.2);
}

/* Mobile menu active state */
.mobile-menu-open {
    opacity: 1 !important;
    pointer-events: all !important;
}

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

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

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

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

/* Smooth image loading */
img {
    opacity: 1;
    transition: opacity 0.3s ease;
}

img[data-src] {
    opacity: 0;
}
