/* Custom styles for Carroll & Sons Auto Care */

html {
    scroll-behavior: smooth;
}

/* Reveal animation for below-fold content */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(24px);
        transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
    }
    
    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Fallback: ensure content is visible even without JS */
@supports not (animation: none) {
    .reveal {
        opacity: 1;
        transform: none;
    }
}

/* Navbar scroll effect */
.navbar-scrolled {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 4px 16px rgba(0, 0, 0, 0.04);
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
    background: #94a3b8;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #64748b;
}

/* Selection color */
::selection {
    background: #14b8a6;
    color: white;
}

/* Form focus styles */
input:focus, textarea:focus, select:focus {
    outline: none;
}

/* Smooth image rendering */
img {
    image-rendering: -webkit-optimize-contrast;
}

/* Mobile menu animation */
#mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}
#mobile-menu.open {
    max-height: 400px;
}

/* Stat card float animation */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-8px); }
}

@media (prefers-reduced-motion: no-preference) {
    .stat-card-1 { animation: float 4s ease-in-out infinite; }
    .stat-card-2 { animation: float 4s ease-in-out 0.5s infinite; }
    .stat-card-3 { animation: float 4s ease-in-out 1s infinite; }
    .stat-card-4 { animation: float 4s ease-in-out 1.5s infinite; }
}

/* Pulse dot */
@keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}
