/* =============================================
   Manhattan Hair Co — Custom Styles
   ============================================= */

/* --- Base & Typography --- */
html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    overflow-x: hidden;
}

::selection {
    background-color: rgba(22, 101, 52, 0.15);
    color: #166534;
}

/* --- Scroll Reveal (progressive enhancement) --- */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(24px);
        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);
    }

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

/* Fallback: content always visible if JS disabled or reduced motion */
@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
    }
}

/* --- Navbar --- */
#navbar {
    background: transparent;
    border-bottom: 1px solid transparent;
}

#navbar.scrolled {
    background: rgba(254, 253, 248, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom-color: rgba(187, 247, 208, 0.5);
    box-shadow: 0 1px 0 rgba(22, 101, 52, 0.05);
}

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

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

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

/* --- Menu Button --- */
.menu-line {
    transition: transform 0.3s ease, opacity 0.3s ease, width 0.3s ease;
}

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

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

#menuBtn.active .menu-line:nth-child(3) {
    transform: translateY(-4px) rotate(-45deg);
    width: 24px;
}

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

.service-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #166534, #22c55e);
    transition: width 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.service-card:hover::after {
    width: 100%;
}

/* --- Form Styles --- */
select option {
    background: #fefdf8;
    color: #2d2d2d;
}

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

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

::-webkit-scrollbar-thumb {
    background: #bbf7d0;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #86efac;
}

/* --- Image hover effects --- */
.gallery-img {
    transition: transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.gallery-img:hover {
    transform: scale(1.05);
}

/* --- Print styles --- */
@media print {
    #navbar, #mobileMenu, .reveal { display: none; }
    body { background: white; color: black; }
}
