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

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

body {
    background-color: #0D0517;
    color: #E8DDE8;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #633A63;
}

/* Selection */
::selection {
    background: rgba(212, 168, 83, 0.3);
    color: #F5F0F7;
}

/* Gold shimmer animation for decorative elements */
@keyframes shimmer {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 1; }
}

.gold-shimmer {
    animation: shimmer 3s ease-in-out infinite;
}

/* Fade in animations for scroll reveals */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), 
                transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal[data-reveal-delay="1"] { transition-delay: 0.1s; }
.reveal[data-reveal-delay="2"] { transition-delay: 0.2s; }
.reveal[data-reveal-delay="3"] { transition-delay: 0.3s; }
.reveal[data-reveal-delay="4"] { transition-delay: 0.4s; }
.reveal[data-reveal-delay="5"] { transition-delay: 0.5s; }

/* Reduced 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;
    }
}

/* Image aspect ratios */
img {
    max-width: 100%;
    height: auto;
}

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

/* Mobile menu transitions */
#mobile-menu {
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

#mobile-menu.open {
    opacity: 1;
    pointer-events: all;
}

/* Navbar scroll state */
#navbar.scrolled {
    background: rgba(13, 5, 23, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(212, 168, 83, 0.1);
}

/* Card hover glow */
.group:hover .group-hover\:scale-105 {
    transform: scale(1.05);
}

/* Button press effect */
button, a {
    -webkit-tap-highlight-color: transparent;
}

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

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