/* Custom styles for 3H Precision Barbers Stylists */

/* Base styles */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Selection color */
::selection {
    background-color: #059669;
    color: #fefdf8;
}

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

@media (prefers-reduced-motion: no-preference) {
    .scroll-reveal {
        opacity: 0;
        transform: translateY(24px);
        transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
    }
    
    .scroll-reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Navbar styles */
#navbar {
    background: transparent;
    transition: background-color 0.4s ease, box-shadow 0.4s ease, backdrop-filter 0.4s ease;
}

#navbar.scrolled {
    background: rgba(254, 253, 248, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 1px 0 rgba(5, 150, 105, 0.08);
}

#navbar.scrolled .nav-link {
    color: #064e3b;
}

#navbar.scrolled .nav-link:hover {
    color: #059669;
}

/* Mobile menu */
#mobileMenu.open {
    opacity: 1;
    pointer-events: auto;
}

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

.mobile-link {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

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

/* Hamburger animation */
#menuBtn.active #line1 {
    transform: translateY(3px) rotate(45deg);
}

#menuBtn.active #line2 {
    opacity: 0;
    transform: scaleX(0);
}

#menuBtn.active #line3 {
    transform: translateY(-3px) rotate(-45deg);
}

/* Smooth image loading */
img {
    opacity: 1;
    transition: opacity 0.3s ease;
}

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

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #6ee7b7;
}

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

/* Print styles */
@media print {
    #navbar,
    #mobileMenu,
    .scroll-reveal {
        display: block !important;
        opacity: 1 !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
}
