/* ============================================
   HAIR CREW — Custom Styles
   Classic & Elegant · Burgundy + Blush Palette
   ============================================ */

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

body {
    overflow-x: hidden;
}

::selection {
    background-color: rgba(161, 21, 59, 0.2);
    color: #711736;
}

/* --- Animations --- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fadeInUp {
    animation-name: fadeInUp;
    animation-duration: 0.9s;
    animation-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
    animation-fill-mode: both;
}

/* --- Navbar Scroll State --- */
#navbar.scrolled {
    background: rgba(62, 7, 22, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(244, 163, 184, 0.1);
}

#navbar.scrolled #nav-logo {
    color: #fce7eb;
}

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

#mobile-menu.open .mobile-link {
    animation: fadeInUp 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}

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

/* --- Hamburger Animation --- */
.menu-line {
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
                opacity 0.25s ease,
                width 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

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

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

#menu-toggle.active .menu-line:nth-child(3) {
    transform: translateY(-5px) rotate(-45deg);
    width: 1.5rem;
}

/* --- Service Card Hover --- */
.group:hover .group-hover\:scale-105 {
    transform: scale(1.05);
}

/* --- Form Focus Styles --- */
input:focus,
select:focus,
textarea:focus {
    border-bottom-color: #a1153b !important;
}

input::placeholder,
textarea::placeholder {
    color: rgba(74, 55, 40, 0.2);
}

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

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

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

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

/* --- Reduced Motion --- */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    html {
        scroll-behavior: auto;
    }

    .reveal {
        opacity: 1 !important;
        transform: none !important;
    }
}

/* --- Tablet --- */
@media (max-width: 767px) {
    .font-serif {
        line-height: 1.15;
    }
}

/* --- Large Desktop --- */
@media (min-width: 1280px) {
    .reveal {
        will-change: opacity, transform;
    }
}
