/* Custom styles for Binh's Family Hair Care */

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

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #1a1c20;
}
::-webkit-scrollbar-thumb {
    background: #42474f;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #ff6b35;
}

/* Selection color */
::selection {
    background: rgba(255, 107, 53, 0.3);
    color: #f6f6f7;
}

/* Navigation scroll state */
#navbar.scrolled {
    background: rgba(26, 28, 32, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

/* Reveal animations - progressive enhancement */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Only apply animation if user prefers motion */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
    }
    
    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

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

#mobile-menu.closed {
    opacity: 0;
    pointer-events: none;
}

/* Menu line animation */
.menu-line:nth-child(1) {
    transform-origin: center;
}
.menu-line:nth-child(2) {
    transform-origin: center;
}
.menu-line:nth-child(3) {
    transform-origin: center;
}

#menu-toggle.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(3px, 3px);
}
#menu-toggle.active .menu-line:nth-child(2) {
    opacity: 0;
}
#menu-toggle.active .menu-line:nth-child(3) {
    transform: rotate(-45deg) translate(3px, -3px);
    width: 1.5rem;
}

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

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

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

/* Hero decorative elements */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

/* Subtle gradient shift on hero */
@keyframes gradientShift {
    0%, 100% { opacity: 0.1; }
    50% { opacity: 0.15; }
}

/* Service card hover glow */
.group:hover .w-14 {
    box-shadow: 0 0 20px rgba(255, 107, 53, 0.15);
}

/* Button ripple effect */
button, a {
    position: relative;
    overflow: hidden;
}

/* Gallery image hover */
.group img {
    will-change: transform;
}

/* Form focus states */
input:focus, select:focus, textarea:focus {
    outline: none;
}

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

/* Print styles */
@media print {
    #navbar, #mobile-menu, button {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
    
    .bg-charcoal-950, .bg-charcoal-900 {
        background: white !important;
    }
    
    .text-charcoal-100, .text-charcoal-50, .text-charcoal-300 {
        color: black !important;
    }
}
