/* Custom styles for Looking Glass Salon */

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

/* Reduced 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;
    }
    .float-card-1, .float-card-2, .float-card-3, .float-card-4 {
        animation: none !important;
    }
}

/* Navbar transition */
.nav-logo-text {
    transition: color 0.5s ease;
}

#navbar.scrolled .nav-logo-text {
    color: #1A0E16;
}

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: #E5A820;
    transition: width 0.3s ease;
}

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

/* Mobile menu */
#mobile-menu.active {
    opacity: 1;
    pointer-events: all;
}

#mobile-menu.active .mobile-menu-link {
    animation: fadeUp 0.4s ease forwards;
    opacity: 0;
}

#mobile-menu.active .mobile-menu-link:nth-child(1) { animation-delay: 0.05s; }
#mobile-menu.active .mobile-menu-link:nth-child(2) { animation-delay: 0.1s; }
#mobile-menu.active .mobile-menu-link:nth-child(3) { animation-delay: 0.15s; }
#mobile-menu.active .mobile-menu-link:nth-child(4) { animation-delay: 0.2s; }

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

/* Menu lines animation */
#mobile-menu-btn.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(3px, 3px);
}
#mobile-menu-btn.active .menu-line:nth-child(2) {
    opacity: 0;
}
#mobile-menu-btn.active .menu-line:nth-child(3) {
    transform: rotate(-45deg) translate(3px, -3px);
    width: 1.25rem;
}

/* Scroll indicator */
@keyframes scrollIndicator {
    0% { top: -16px; opacity: 0; }
    20% { opacity: 1; }
    80% { opacity: 1; }
    100% { top: 48px; opacity: 0; }
}

.animate-scroll-indicator {
    animation: scrollIndicator 1.8s ease-in-out infinite;
}

/* Floating cards animation */
@keyframes float1 {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-12px) rotate(1deg); }
}

@keyframes float2 {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-8px) rotate(-1deg); }
}

@keyframes float3 {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

@keyframes float4 {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-6px) rotate(1deg); }
}

.float-card-1 { animation: float1 6s ease-in-out infinite; }
.float-card-2 { animation: float2 5s ease-in-out infinite; }
.float-card-3 { animation: float3 7s ease-in-out infinite; }
.float-card-4 { animation: float4 4.5s ease-in-out infinite; }

/* Service card hover */
.service-card {
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #6B3A5E, #E5A820);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.5s ease;
}

.service-card:hover::before {
    transform: scaleX(1);
}

/* Gallery items */
.gallery-item {
    cursor: pointer;
}

/* Scroll reveal animations */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.hidden-reveal {
    opacity: 0;
    transform: translateY(24px);
}

@media (prefers-reduced-motion: no-preference) {
    .reveal {
        transition: opacity 0.8s ease, transform 0.8s ease;
    }
}

/* Selection color */
::selection {
    background: #D8B8C8;
    color: #1A0E16;
}

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

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

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

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

/* Select dropdown styling */
select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236B3A5E' stroke-width='1.5'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

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

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