/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: 'Inter', system-ui, sans-serif;
    background-color: #1a0a2e;
    color: #f3e8ff;
    overflow-x: hidden;
}

/* Scroll Reveal Animations */
.scroll-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);
}

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

/* Floating Cards */
.floating-card-1 {
    animation: float-1 6s ease-in-out infinite;
}

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

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

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

@keyframes float-1 {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-15px) rotate(1deg); }
}

@keyframes float-2 {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(-1deg); }
}

@keyframes float-3 {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-12px) rotate(0.5deg); }
}

@keyframes float-4 {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-18px) rotate(-0.5deg); }
}

/* Navbar Glass Effect */
#navbar.scrolled {
    background: rgba(26, 10, 46, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(212, 160, 23, 0.1);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

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

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

::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, #9333ea, #d97706);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(to bottom, #a855f7, #f59e0b);
}

/* Selection */
::selection {
    background: rgba(212, 160, 23, 0.3);
    color: #faf5ff;
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .floating-card-1,
    .floating-card-2,
    .floating-card-3,
    .floating-card-4 {
        animation: none;
    }
    
    .scroll-reveal {
        transition: none;
    }
    
    html {
        scroll-behavior: auto;
    }
    
    img {
        transition: none;
    }
}

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

/* Image Loading */
img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

/* Mobile Menu Animation */
#mobile-menu {
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Button Hover Glow */
button:hover,
a:hover {
    filter: brightness(1.05);
}

/* Card Hover Effects */
.group:hover .group-hover\\:scale-110 {
    transform: scale(1.1);
}

/* Gradient Text Fallback */
.text-transparent {
    background-clip: text;
    -webkit-background-clip: text;
}

/* Responsive Typography */
@media (max-width: 640px) {
    .font-display {
        font-size: 2.5rem;
        line-height: 1.1;
    }
}

@media (min-width: 641px) and (max-width: 1023px) {
    .font-display {
        font-size: 3.5rem;
        line-height: 1.1;
    }
}

/* Loading State for Images */
img[loading="lazy"] {
    opacity: 0;
    transition: opacity 0.3s ease;
}

img[loading="lazy"].loaded {
    opacity: 1;
}

/* Print Styles */
@media print {
    #navbar,
    .floating-card-1,
    .floating-card-2,
    .floating-card-3,
    .floating-card-4 {
        display: none;
    }
    
    body {
        background: white;
        color: black;
    }
}
