/* Custom styles and overrides */

html {
    scroll-behavior: smooth;
}

/* Smooth scroll offset for fixed navbar */
section[id] {
    scroll-margin-top: 80px;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #1e293b;
}

/* Selection color */
::selection {
    background-color: #a7f3d0;
    color: #020617;
}

/* Fade-in animation for scroll reveals */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

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

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

.fade-in-stagger.visible > *:nth-child(1) { transition-delay: 0.1s; }
.fade-in-stagger.visible > *:nth-child(2) { transition-delay: 0.2s; }
.fade-in-stagger.visible > *:nth-child(3) { transition-delay: 0.3s; }
.fade-in-stagger.visible > *:nth-child(4) { transition-delay: 0.4s; }

.fade-in-stagger.visible > * {
    opacity: 1;
    transform: translateY(0);
}

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