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

body {
    overflow-x: hidden;
}

/* Smooth scroll for anchor links */
html {
    scroll-behavior: smooth;
}

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

::-webkit-scrollbar-track {
    background: #faf5ff;
}

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

::-webkit-scrollbar-thumb:hover {
    background: #6b21a8;
}

/* Navbar scroll state */
nav.scrolled {
    background: rgba(59, 10, 96, 0.95) !important;
    backdrop-filter: blur(20px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

/* Reveal animations (progressive enhancement) */
@media (prefers-reduced-motion: no-preference) {
    .reveal-item {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
    }
    
    .reveal-item.revealed {
        opacity: 1;
        transform: translateY(0);
    }
    
    .reveal-item:nth-child(2) { transition-delay: 0.1s; }
    .reveal-item:nth-child(3) { transition-delay: 0.2s; }
    .reveal-item:nth-child(4) { transition-delay: 0.3s; }
}

/* Ensure content is visible without JS */
.no-js .reveal-item {
    opacity: 1;
    transform: none;
}

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

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

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

.floating-card-1 { animation: float-slow 6s ease-in-out infinite; }
.floating-card-2 { animation: float-medium 5s ease-in-out infinite; }
.floating-card-3 { animation: float-fast 4s ease-in-out infinite; }
.floating-card-4 { animation: float-slow 7s ease-in-out infinite; }

/* Hero background parallax */
.hero-bg {
    will-change: transform;
}

/* Mobile menu transitions */
#mobile-menu {
    transition: max-height 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
}

#mobile-menu.hidden {
    max-height: 0 !important;
    opacity: 0;
    overflow: hidden;
}

#mobile-menu:not(.hidden) {
    max-height: 500px;
    opacity: 1;
}

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

/* Selection color */
::selection {
    background: rgba(124, 58, 237, 0.2);
    color: #581c87;
}

/* Service card hover image reveal */
.service-card:hover .service-img {
    transform: scale(1.08);
}

.service-img {
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Amber accent underline animation */
.underline-amber {
    position: relative;
    display: inline-block;
}

.underline-amber::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 3px;
    background: #F59E0B;
    border-radius: 2px;
    transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.underline-amber:hover::after {
    width: 100%;
}
