/* Custom styles for Hair Creations Unisex Salon */

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

/* Reduce motion preference */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    .reveal {
        opacity: 1 !important;
        transform: none !important;
    }
}

/* Navigation transitions */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #c8952e, #f59e0b);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* Navbar scroll state */
.nav-scrolled {
    background: rgba(255, 255, 255, 0.98) !important;
    backdrop-filter: blur(20px);
    box-shadow: 0 1px 20px rgba(45, 27, 61, 0.08);
}

.nav-scrolled .nav-logo-text {
    color: #2d1b3d !important;
}

.nav-scrolled .nav-logo-sub {
    color: #4a2d5e !important;
}

.nav-scrolled .nav-link {
    color: #2d1b3d !important;
}

.nav-scrolled #navbar .w-10 {
    background: linear-gradient(to br, #9d174d, #c8952e) !important;
}

/* Reveal animations - progressive enhancement */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* Mobile menu animations */
#mobileMenu {
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

#mobileMenu.open {
    transform: translateX(0);
}

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

#mobileMenu.open .mobile-menu-link {
    opacity: 1;
    transform: translateY(0);
}

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

/* Hamburger animation */
#menuLine1 {
    transform-origin: center;
}

#menuLine2 {
    transform-origin: center;
}

#menuLine3 {
    transform-origin: center;
}

#mobileMenuBtn.active #menuLine1 {
    transform: translateY(6px) rotate(45deg);
}

#mobileMenuBtn.active #menuLine2 {
    opacity: 0;
}

#mobileMenuBtn.active #menuLine3 {
    transform: translateY(-6px) rotate(-45deg);
}

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

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

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

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #9d174d, #c8952e);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #831443, #b45309);
}

/* Selection color */
::selection {
    background: rgba(200, 149, 46, 0.3);
    color: #2d1b3d;
}

/* Focus visible styles */
:focus-visible {
    outline: 2px solid #c8952e;
    outline-offset: 2px;
}

/* Button ripple effect on hover */
button, a {
    -webkit-tap-highlight-color: transparent;
}

/* Image lazy loading fade */
img[loading="lazy"] {
    transition: opacity 0.3s ease;
}

img[loading="lazy"]:not([src]) {
    opacity: 0;
}

/* Print styles */
@media print {
    nav, #backToTop, button {
        display: none !important;
    }
    
    body {
        color: #000 !important;
        background: white !important;
    }
    
    .bg-gradient-to-br, .bg-gradient-to-r {
        background: white !important;
        color: black !important;
    }
}
