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

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

body {
    margin: 0;
    min-height: 100vh;
}

/* Selection */
::selection {
    background: rgba(251, 191, 36, 0.3);
    color: #fbbf24;
}

/* Floating animation for stat cards */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-12px); }
}

.floating-card {
    animation: float 4s ease-in-out infinite;
}

.floating-card:nth-child(2) {
    animation-delay: -1.3s;
    animation-duration: 5s;
}

.floating-card:nth-child(3) {
    animation-delay: -2.6s;
    animation-duration: 4.5s;
}

/* Scroll reveal */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Nav scroll state */
nav.scrolled {
    background: rgba(45, 3, 20, 0.9);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(251, 191, 36, 0.1);
}

nav.scrolled .menu-line {
    background: white;
}

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

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

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

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

/* Mobile link animation */
.mobile-link {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s ease, color 0.3s ease;
}

.mobile-menu-open .mobile-link {
    opacity: 1;
    transform: translateY(0);
}

.mobile-menu-open .mobile-link:nth-child(1) { transition-delay: 0.1s; }
.mobile-menu-open .mobile-link:nth-child(2) { transition-delay: 0.2s; }
.mobile-menu-open .mobile-link:nth-child(3) { transition-delay: 0.3s; }
.mobile-menu-open .mobile-link:nth-child(4) { transition-delay: 0.4s; }
.mobile-menu-open .mobile-link:nth-child(5) { transition-delay: 0.5s; }

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

::-webkit-scrollbar-track {
    background: #2d0314;
}

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

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

/* Image aspect ratio helpers */
.aspect-portrait {
    aspect-ratio: 3/4;
}

/* Focus visible */
:focus-visible {
    outline: 2px solid #fbbf24;
    outline-offset: 2px;
}

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

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