/* ============================================
   Ken Morgan's Salon — Custom Styles
   ============================================ */

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

/* Base focus styles for accessibility */
*:focus-visible {
    outline: 2px solid #fbbf24;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Scroll-reveal base (progressive enhancement — content is visible by default) */
.scroll-reveal {
    opacity: 1;
    transform: none;
    transition: opacity 0.6s ease, transform 0.6s ease;
}

/* Only apply animation when JS is active and user prefers motion */
@media (prefers-reduced-motion: no-preference) {
    .js-enabled .scroll-reveal {
        opacity: 0;
        transform: translateY(24px);
    }
    .js-enabled .scroll-reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
    .js-enabled .scroll-reveal.revealed:nth-child(1) { transition-delay: 0.05s; }
    .js-enabled .scroll-reveal.revealed:nth-child(2) { transition-delay: 0.1s; }
    .js-enabled .scroll-reveal.revealed:nth-child(3) { transition-delay: 0.15s; }
    .js-enabled .scroll-reveal.revealed:nth-child(4) { transition-delay: 0.2s; }
    .js-enabled .scroll-reveal.revealed:nth-child(5) { transition-delay: 0.25s; }
    .js-enabled .scroll-reveal.revealed:nth-child(6) { transition-delay: 0.3s; }
}

/* Navbar scroll state */
#navbar.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(123, 45, 142, 0.08);
}

#navbar.scrolled .font-serif {
    color: #3d1349;
}

/* Mobile menu transitions */
#mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease, padding 0.35s ease;
}

#mobile-menu.open {
    max-height: 400px;
    padding-top: 0;
}

/* Hamburger animation */
.menu-line {
    transition: transform 0.3s ease, opacity 0.3s ease;
}

#menu-toggle[aria-expanded="true"] .menu-line:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}
#menu-toggle[aria-expanded="true"] .menu-line:nth-child(2) {
    opacity: 0;
}
#menu-toggle[aria-expanded="true"] .menu-line:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
    width: 5rem;
}

/* Mobile link hover */
.mobile-link {
    display: block;
}

/* Subtle image hover */
img {
    display: block;
    max-width: 100%;
}

/* Selection color */
::selection {
    background: #fbbf24;
    color: #3d1349;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #faf0fb;
}
::-webkit-scrollbar-thumb {
    background: #dc94dc;
    border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover {
    background: #a83fa8;
}

/* Reduced motion: disable all transitions */
@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;
    }
}
