/* Custom styles for Jo Ann's Hair Boutique */

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

/* Navbar transitions */
.nav-text {
    transition: color 0.3s ease;
}

.nav-subtext {
    transition: color 0.3s ease;
}

/* Scroll reveal animations */
.scroll-reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94), transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

@media (prefers-reduced-motion: no-preference) {
    .scroll-reveal {
        opacity: 0;
        transform: translateY(30px);
    }

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

/* Mobile menu */
#mobileMenu {
    opacity: 0;
    pointer-events: none;
}

#mobileMenu.open {
    opacity: 1;
    pointer-events: all;
}

.mobile-link {
    transform: translateY(20px);
    opacity: 0;
    transition: transform 0.4s ease, opacity 0.4s ease, color 0.3s ease;
}

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

#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; }

/* Menu button animation */
.menu-line {
    transform-origin: center;
}

.menu-btn.active .menu-line:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}

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

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

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

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

::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, #6B2D5B, #D4943A);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(to bottom, #562449, #B87A2E);
}

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

/* Selection color */
::selection {
    background-color: #D4943A;
    color: #2A1022;
}

/* Image loading placeholder */
img {
    background: linear-gradient(135deg, #F3E0EF 0%, #FFF3DC 100%);
}

/* Focus visible styles */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 2px solid #D4943A;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .scroll-reveal {
        opacity: 1;
        transform: none;
    }

    * {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }
}
