/* Custom styles for Xiao Jiang Beauty Salon */

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Prevent content flash on scroll reveal */
.scroll-reveal {
    opacity: 1;
    transform: none;
}

@media (prefers-reduced-motion: no-preference) {
    .scroll-reveal {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.8s ease, transform 0.8s ease;
    }
    
    .scroll-reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
    
    .hero-anim {
        animation: heroFadeIn 1s ease forwards;
        animation-delay: var(--delay, 0s);
    }
    
    @keyframes heroFadeIn {
        from {
            opacity: 0;
            transform: translateY(16px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
}

/* Navbar scroll effect */
nav.scrolled {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.05);
}

nav.scrolled .font-serif {
    color: #1e293b !important;
}

nav.scrolled .text-slate-500 {
    color: #64748b !important;
}

/* Mobile menu */
.mobile-nav-link {
    opacity: 1;
    transform: none;
}

@media (prefers-reduced-motion: no-preference) {
    .mobile-nav-link {
        opacity: 0;
        transform: translateY(20px);
        transition: opacity 0.4s ease, transform 0.4s ease;
    }
    
    .mobile-nav-link.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Image loading placeholder */
img {
    background-color: #f1f5f9;
}

/* Selection color */
::selection {
    background-color: #0d9488;
    color: white;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}
