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

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

body {
    overflow-x: hidden;
}

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

/* Navbar scroll effect */
nav.scrolled {
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(10px);
    box-shadow: 0 1px 20px rgba(124, 58, 237, 0.08);
}

/* Fade-in animations for below-fold content */
.fade-in-section {
    opacity: 1;
    transform: none;
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in-section.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger children animations */
.stagger-children .fade-in-item {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.stagger-children .fade-in-item.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.stagger-children .fade-in-item:nth-child(1) { transition-delay: 0.05s; }
.stagger-children .fade-in-item:nth-child(2) { transition-delay: 0.1s; }
.stagger-children .fade-in-item:nth-child(3) { transition-delay: 0.15s; }
.stagger-children .fade-in-item:nth-child(4) { transition-delay: 0.2s; }
.stagger-children .fade-in-item:nth-child(5) { transition-delay: 0.25s; }
.stagger-children .fade-in-item:nth-child(6) { transition-delay: 0.3s; }

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    .fade-in-section,
    .fade-in-item {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

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

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

/* Pulse animation for CTA */
@keyframes subtle-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

/* Gradient text utility */
.gradient-text {
    background: linear-gradient(135deg, #7e22ce, #d97706);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
