/* ============================================
   Salon Savvy — Custom Styles
   Classic & Elegant | Terracotta + Sand
   ============================================ */

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

body {
    overflow-x: hidden;
}

::selection {
    background-color: #C07F5B;
    color: #FDFCFA;
}

/* --- Scroll Reveal Animations --- */
/* Default state: always visible (progressive enhancement) */
.reveal {
    opacity: 1;
    transform: none;
    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);
}

/* Enhanced state: animate on scroll (only when JS runs and user prefers motion) */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(32px);
    }

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

    .reveal.delay-1 { transition-delay: 0.1s; }
    .reveal.delay-2 { transition-delay: 0.2s; }
    .reveal.delay-3 { transition-delay: 0.3s; }
    .reveal.delay-4 { transition-delay: 0.4s; }
}

/* --- Navbar Scroll State --- */
#navbar.scrolled {
    background-color: rgba(15, 13, 12, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05);
}

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

#navbar.scrolled .nav-link {
    color: rgba(245, 240, 235, 0.85);
}

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

#mobile-menu.open .mobile-nav-link {
    animation: fadeInUp 0.4s ease forwards;
}

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

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

/* Mobile menu button active state */
#mobile-menu-btn.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(4px, 4px);
}

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

#mobile-menu-btn.active .menu-line:nth-child(3) {
    width: 24px;
    transform: rotate(-45deg) translate(4px, -4px);
}

/* --- Smooth Image Loading --- */
img {
    display: block;
    max-width: 100%;
}

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

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

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

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

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

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

/* --- Button Micro-interactions --- */
a[href^="tel:"],
button[type="submit"] {
    position: relative;
    overflow: hidden;
}

/* --- Selection Color --- */
::selection {
    background: #C07F5B;
    color: #FDFCFA;
}

/* --- Reduced Motion --- */
@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 !important;
        transform: none !important;
    }
}

/* --- Utility: Aspect Ratio Fallbacks --- */
.aspect-\[4\/5\] {
    aspect-ratio: 4 / 5;
}

/* --- Print Styles --- */
@media print {
    nav,
    #mobile-menu-btn,
    .reveal {
        display: none !important;
    }

    body {
        color: #000;
        background: #fff;
    }

    a {
        text-decoration: underline;
    }
}
