/* Custom Styles for The Hair Story Salon */

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

/* Selection Color */
::selection {
    background-color: #841636;
    color: white;
}

/* Custom Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(40px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in {
    animation: fadeIn 0.8s ease-out forwards;
}

.animate-slide-up {
    animation: slideUp 0.9s ease-out forwards;
    opacity: 0;
}

.animate-slide-up-delay {
    animation: slideUp 0.9s ease-out 0.2s forwards;
    opacity: 0;
}

.animate-slide-up-delay-2 {
    animation: slideUp 0.9s ease-out 0.4s forwards;
    opacity: 0;
}

/* Scroll Reveal Base State - always visible */
.scroll-reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.scroll-reveal.revealed {
    opacity: 0;
    transform: translateY(30px);
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    .scroll-reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
    .animate-slide-up,
    .animate-slide-up-delay,
    .animate-slide-up-delay-2 {
        animation: none;
        opacity: 1;
    }
    .group img {
        transition: none;
    }
}

/* Navbar transition */
#navbar.scrolled {
    background-color: rgba(15, 15, 26, 0.95);
    backdrop-filter: blur(20px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

/* Mobile menu animation */
#mobileMenu.open {
    max-height: 500px;
}

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

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

#menuBtn.active .menu-line:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
    width: 1.25rem;
}

/* Mobile link animation */
.mobile-link {
    opacity: 0;
    transform: translateX(-10px);
}

#mobileMenu.open .mobile-link {
    opacity: 1;
    transform: translateX(0);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

#mobileMenu.open .mobile-link:nth-child(1) { transition-delay: 0.1s; }
#mobileMenu.open .mobile-link:nth-child(2) { transition-delay: 0.15s; }
#mobileMenu.open .mobile-link:nth-child(3) { transition-delay: 0.2s; }
#mobileMenu.open .mobile-link:nth-child(4) { transition-delay: 0.25s; }
#mobileMenu.open .mobile-link:nth-child(5) { transition-delay: 0.3s; }
#mobileMenu.open .mobile-link:nth-child(6) { transition-delay: 0.35s; }

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

::-webkit-scrollbar-track {
    background: #0f0f1a;
}

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

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

/* Focus styles for accessibility */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid #841636;
    outline-offset: 2px;
}

/* Button hover effect for service cards */
.group:hover .rounded-2xl {
    box-shadow: 0 20px 60px rgba(132, 22, 54, 0.15);
}

/* Print styles */
@media print {
    nav, #backToTop, button {
        display: none !important;
    }
    body {
        color: #000;
        background: #fff;
    }
}
