/* Custom styles for Kathryn McDermott Salon */

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

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

/* Nav link underline animation */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: #d4a853;
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* Reveal animations (progressive enhancement) */
.reveal-up,
.reveal-scroll {
    opacity: 1;
    transform: none;
}

@media (prefers-reduced-motion: no-preference) {
    .reveal-up {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.8s ease, transform 0.8s ease;
    }

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

    .reveal-scroll {
        opacity: 0;
        transform: translateY(40px);
        transition: opacity 0.8s ease, transform 0.8s ease;
    }

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

    /* Stagger children */
    .reveal-scroll:nth-child(1) { transition-delay: 0.05s; }
    .reveal-scroll:nth-child(2) { transition-delay: 0.1s; }
    .reveal-scroll:nth-child(3) { transition-delay: 0.15s; }
    .reveal-scroll:nth-child(4) { transition-delay: 0.2s; }
    .reveal-scroll:nth-child(5) { transition-delay: 0.25s; }
    .reveal-scroll:nth-child(6) { transition-delay: 0.3s; }
}

/* Hero reveal (always visible, no JS needed) */
.reveal-up {
    opacity: 1;
    transform: none;
}

/* Mobile menu transitions */
.mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, opacity 0.3s ease;
    opacity: 0;
}

.mobile-menu.open {
    max-height: 500px;
    opacity: 1;
}

/* Mobile nav links */
.mobile-nav-link {
    display: block;
    padding: 8px 0;
    border-bottom: 1px solid #e8eef5;
}

.mobile-nav-link:last-child {
    border-bottom: none;
}

/* Back to top button */
.back-to-top.visible {
    opacity: 1;
    transform: translateY(0);
}

.back-to-top {
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease, background-color 0.3s ease;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #1e3a5f;
}

/* Focus styles */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 2px solid #d4a853;
    outline-offset: 2px;
}

/* Selection color */
::selection {
    background: #d4a853;
    color: #0f1f3d;
}
