/* Custom styles for HairByChealsea */

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

/* Navbar transitions */
#navbar {
    background: transparent;
}

#navbar.scrolled {
    background: rgba(250, 249, 246, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 1px 0 rgba(50, 82, 50, 0.08);
}

#navbar.scrolled .nav-link {
    color: #325232;
}

#navbar.scrolled .nav-link:hover {
    color: #1a2e1a;
}

#navbar.scrolled .menu-line {
    background: #325232;
}

#navbar.scrolled .font-serif {
    color: #325232;
}

/* Service card hover effects */
.service-card {
    transform: translateY(0);
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.service-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(17, 26, 17, 0.15);
}

/* Mobile menu animations */
.mobile-link {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

#mobileMenu.open .mobile-link:nth-child(1) { opacity: 1; transform: translateY(0); transition-delay: 0.1s; }
#mobileMenu.open .mobile-link:nth-child(2) { opacity: 1; transform: translateY(0); transition-delay: 0.15s; }
#mobileMenu.open .mobile-link:nth-child(3) { opacity: 1; transform: translateY(0); transition-delay: 0.2s; }
#mobileMenu.open .mobile-link:nth-child(4) { opacity: 1; transform: translateY(0); transition-delay: 0.25s; }

/* Menu button animation */
#menuBtn.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

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

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

/* Scroll reveal animations */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered reveal for service cards */
.service-card:nth-child(1) { transition-delay: 0.05s; }
.service-card:nth-child(2) { transition-delay: 0.1s; }
.service-card:nth-child(3) { transition-delay: 0.15s; }
.service-card:nth-child(4) { transition-delay: 0.2s; }
.service-card:nth-child(5) { transition-delay: 0.25s; }
.service-card:nth-child(6) { transition-delay: 0.3s; }

/* Gallery image hover overlay */
.group:hover .group-hover\:scale-110 {
    transform: scale(1.1);
}

/* Custom selection color */
::selection {
    background: #c9a84c;
    color: #111a11;
}

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

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

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

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

/* Input autofill styling */
input:-webkit-autofill,
textarea:-webkit-autofill,
select:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 30px #ebe7db inset !important;
    box-shadow: 0 0 0 30px #ebe7db inset !important;
}

/* Focus visible for accessibility */
*:focus-visible {
    outline: 2px solid #c9a84c;
    outline-offset: 2px;
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
    
    .service-card {
        transform: none;
        transition: none;
    }
    
    .group:hover .group-hover\:scale-110 {
        transform: none;
    }
    
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
