/* Custom styles for B & B Flooring and Design LLC */

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

/* Base styles */
body {
    overflow-x: hidden;
}

/* Scroll reveal animations - progressive enhancement, only active when JS enables the class */
.reveal {
    opacity: 1;
    transform: none;
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.js-enabled .reveal {
    opacity: 0;
    transform: translateY(30px);
}

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

/* Staggered reveal delays */
.js-enabled .reveal:nth-child(1) { transition-delay: 0.1s; }
.js-enabled .reveal:nth-child(2) { transition-delay: 0.2s; }
.js-enabled .reveal:nth-child(3) { transition-delay: 0.3s; }
.js-enabled .reveal:nth-child(4) { transition-delay: 0.4s; }
.js-enabled .reveal:nth-child(5) { transition-delay: 0.5s; }
.js-enabled .reveal:nth-child(6) { transition-delay: 0.6s; }

/* Navbar scroll state */
.navbar-scrolled {
    background: rgba(10, 22, 40, 0.95) !important;
    backdrop-filter: blur(20px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

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

::-webkit-scrollbar-track {
    background: #0a1628;
}

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

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

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

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
    
    html {
        scroll-behavior: auto;
    }
    
    .group:hover img {
        transform: none;
    }
    
    .animate-bounce {
        animation: none;
    }
    
    .animate-pulse {
        animation: none;
    }
}

/* Mobile menu transitions */
#mobile-menu {
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Form input autofill styling */
input:-webkit-autofill,
textarea:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 30px white inset !important;
}

/* Print styles */
@media print {
    nav, #back-to-top, .reveal {
        display: none !important;
    }
    
    body {
        color: #000;
        background: #fff;
    }
}
