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

html {
    scroll-behavior: smooth;
    -webkit-tap-highlight-color: transparent;
}

body {
    overflow-x: hidden;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #faf5ff;
}
::-webkit-scrollbar-thumb {
    background: #c084fc;
    border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
    background: #a855f7;
}

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

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

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

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

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

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

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

.animate-float-delayed {
    animation: float-delayed 4.5s ease-in-out infinite;
}

.animate-float-delayed-2 {
    animation: float-delayed-2 5s ease-in-out infinite;
}

/* Scroll Reveal - Progressive Enhancement */
.scroll-reveal {
    opacity: 1;
    transform: none;
    transition: opacity 0.6s ease, transform 0.6s ease;
}

@media (prefers-reduced-motion: no-preference) {
    .scroll-reveal {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.7s ease, transform 0.7s ease;
    }
    
    .scroll-reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Navbar transition */
#navbar.scrolled {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(20px);
    box-shadow: 0 4px 30px rgba(107, 33, 168, 0.08);
}

#navbar.scrolled .nav-link {
    color: #7e22ce !important;
}

#navbar.scrolled .nav-link:hover {
    background: #f3e8ff !important;
    color: #581c87 !important;
}

#navbar.scrolled .font-display {
    color: #581c87 !important;
}

/* Selection color */
::selection {
    background: #e9d5ff;
    color: #581c87;
}

/* Focus visible */
:focus-visible {
    outline: 2px solid #a855f7;
    outline-offset: 2px;
    border-radius: 8px;
}

/* Mobile menu animation */
#mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, opacity 0.3s ease;
    opacity: 0;
}

#mobile-menu.open {
    max-height: 400px;
    opacity: 1;
}

/* Image loading placeholder */
img {
    background: linear-gradient(135deg, #f3e8ff 0%, #fef3c7 100%);
}

/* Prevent layout shift */
img {
    content-visibility: auto;
}
