/* Custom styles for The Green Dragon Barbershop */

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

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #1A1A1A;
}
::-webkit-scrollbar-thumb {
    background: #E86A5B;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #D4574A;
}

/* Reveal animation base - content always visible by default */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

/* Reveal animation - only active when JS adds class and user prefers motion */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
    }
    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Hero entrance animations - only for below-fold or progressive enhancement */
#hero-eyebrow,
#hero-headline,
#hero-sub,
#hero-cta,
#hero-scroll {
    opacity: 1;
    transform: none;
}

@media (prefers-reduced-motion: no-preference) {
    #hero-eyebrow {
        animation: fadeUp 0.8s ease 0.2s forwards;
        opacity: 0;
    }
    #hero-headline {
        animation: fadeUp 0.8s ease 0.4s forwards;
        opacity: 0;
    }
    #hero-sub {
        animation: fadeUp 0.8s ease 0.6s forwards;
        opacity: 0;
    }
    #hero-cta {
        animation: fadeUp 0.8s ease 0.8s forwards;
        opacity: 0;
    }
    #hero-scroll {
        animation: fadeUp 0.8s ease 1s forwards;
        opacity: 0;
    }
}

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

/* Mobile menu transitions */
#mobile-menu {
    transition: opacity 0.4s ease, visibility 0.4s ease;
}
#mobile-menu.open {
    opacity: 1;
    pointer-events: auto;
}
#mobile-menu.closed {
    opacity: 0;
    pointer-events: none;
}

/* Navbar scroll state */
#navbar.scrolled #nav-logo {
    color: #fff;
}

/* Selection color */
::selection {
    background: #E86A5B;
    color: #fff;
}

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

/* Reduced motion preference */
@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;
    }
}
