/* Custom styles for Finish Line Car Wash */

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

/* Selection color */
::selection {
    background-color: rgba(176, 107, 75, 0.2);
    color: inherit;
}

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

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

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

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

/* 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;
        scroll-behavior: auto !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* Fade-in animation for scroll-reveal elements */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger children */
.fade-in-stagger > * {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.fade-in-stagger.visible > *:nth-child(1) { transition-delay: 0.05s; }
.fade-in-stagger.visible > *:nth-child(2) { transition-delay: 0.1s; }
.fade-in-stagger.visible > *:nth-child(3) { transition-delay: 0.15s; }
.fade-in-stagger.visible > *:nth-child(4) { transition-delay: 0.2s; }
.fade-in-stagger.visible > *:nth-child(5) { transition-delay: 0.25s; }
.fade-in-stagger.visible > *:nth-child(6) { transition-delay: 0.3s; }

.fade-in-stagger.visible > * {
    opacity: 1;
    transform: translateY(0);
}

/* Navbar scrolled state */
.navbar-scrolled #nav-bg {
    opacity: 1;
}

/* Hero text animation - only for below-fold content */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Button hover glow */
.btn-glow:hover {
    box-shadow: 0 0 30px rgba(176, 107, 75, 0.3);
}

/* Image hover zoom */
.img-zoom {
    transition: transform 0.6s ease;
}

.img-zoom:hover {
    transform: scale(1.03);
}

/* Focus visible styles */
:focus-visible {
    outline: 2px solid #b06b4b;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Loading state for form button */
.btn-loading {
    position: relative;
    color: transparent !important;
}

.btn-loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Print styles */
@media print {
    header, footer, .no-print {
        display: none !important;
    }
    
    body {
        color: #1c1917;
        background: white;
    }
    
    a {
        color: #1c1917;
        text-decoration: underline;
    }
}
