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

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

body {
    overflow-x: hidden;
}

/* Scroll Reveal Animations */
.reveal-up,
.reveal-left,
.reveal-right {
    opacity: 1;
    transform: none;
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), 
                transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-up {
    transform: translateY(0);
}

.reveal-left {
    transform: translateX(0);
}

.reveal-right {
    transform: translateX(0);
}

@media (prefers-reduced-motion: no-preference) {
    .reveal-up {
        opacity: 0;
        transform: translateY(40px);
    }
    
    .reveal-left {
        opacity: 0;
        transform: translateX(-40px);
    }
    
    .reveal-right {
        opacity: 0;
        transform: translateX(40px);
    }
    
    .reveal-up.revealed,
    .reveal-left.revealed,
    .reveal-right.revealed {
        opacity: 1;
        transform: none;
    }
    
    /* Hero animations */
    .hero-subtitle {
        opacity: 0;
        transform: translateY(20px);
        animation: heroFadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.2s forwards;
    }
    
    .hero-title {
        opacity: 0;
        transform: translateY(30px);
        animation: heroFadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.4s forwards;
    }
    
    .hero-desc {
        opacity: 0;
        transform: translateY(20px);
        animation: heroFadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.6s forwards;
    }
    
    .hero-cta {
        opacity: 0;
        transform: translateY(20px);
        animation: heroFadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.8s forwards;
    }
}

@keyframes heroFadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Delay utilities */
.delay-100 { transition-delay: 0.1s; }
.delay-200 { transition-delay: 0.2s; }

/* Navbar scroll state */
.nav-scrolled {
    background: rgba(88, 28, 135, 0.95) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.15);
}

.nav-scrolled .nav-link {
    color: rgba(255, 255, 255, 0.85) !important;
}

.nav-scrolled .nav-brand {
    color: #fff !important;
}

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

.mobile-menu-closed {
    opacity: 0 !important;
    pointer-events: none !important;
}

/* Menu button animation */
.menu-line:nth-child(1) {
    transform-origin: center;
}

.menu-line:nth-child(2) {
    transform-origin: center;
}

.menu-line:nth-child(3) {
    transform-origin: center;
}

.menu-btn.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.menu-btn.active .menu-line:nth-child(2) {
    opacity: 0;
}

.menu-btn.active .menu-line:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
    width: 1.5rem;
}

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

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

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

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

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

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

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

/* Button hover lift effect */
button, a {
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Form focus styles */
input:focus,
select:focus,
textarea:focus {
    box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.15);
}
