/* Custom styles for Batchelor's Barbershop */

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

/* Prevent FOUC on page load */
body {
    opacity: 1;
}

/* Scroll reveal base styles — content is visible by default */
.section-reveal {
    /* Default: fully visible */
}

/* Scroll reveal animation — only applied when JS adds the class */
.reveal-active {
    animation: fadeInUp 0.7s ease forwards;
}

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

/* Staggered delays for grid items */
.reveal-active.delay-100 { animation-delay: 0.1s; }
.reveal-active.delay-200 { animation-delay: 0.2s; }
.reveal-active.delay-300 { animation-delay: 0.3s; }
.reveal-active.delay-400 { animation-delay: 0.4s; }
.reveal-active.delay-500 { animation-delay: 0.5s; }

/* Mobile menu transitions */
#mobileMenu {
    transition: opacity 0.4s ease, pointer-events 0.4s ease;
}

#mobileMenu.open {
    opacity: 1;
    pointer-events: all;
}

#mobileMenu.closed {
    opacity: 0;
    pointer-events: none;
}

/* Navbar transition */
#navbar {
    transition: background-color 0.4s ease, box-shadow 0.4s ease;
}

#navbar.scrolled {
    background-color: rgba(253, 252, 248, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(0, 0, 0, 0.06);
}

/* Hero image parallax-like subtle effect */
#hero img {
    will-change: transform;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #6EE7B7;
}

/* Focus styles for accessibility */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid #059669;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    
    .reveal-active {
        animation: none;
        opacity: 1;
        transform: none;
    }
    
    .section-reveal {
        opacity: 1 !important;
        transform: none !important;
    }
    
    #hero img,
    .rounded-2xl img {
        transition: none;
    }
}
