/* Custom styles for Tony's Truck Accessories */

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

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #faf5ff;
}
::-webkit-scrollbar-thumb {
    background: #9333ea;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #7e22ce;
}

/* Selection color */
::selection {
    background: #fbbf24;
    color: #3b0764;
}

/* Hero entrance - no JS required, always visible */
#hero h1,
#hero p,
#hero .flex {
    animation: fadeInUp 0.8s ease-out both;
}
#hero h1 { animation-delay: 0.1s; }
#hero p { animation-delay: 0.3s; }
#hero .flex { animation-delay: 0.5s; }

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

/* Scroll reveal animations - progressive enhancement only */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(40px);
        transition: opacity 0.8s ease-out, transform 0.8s ease-out;
    }
    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
    .reveal-delay-1 { transition-delay: 0.1s; }
    .reveal-delay-2 { transition-delay: 0.2s; }
    .reveal-delay-3 { transition-delay: 0.3s; }
    .reveal-delay-4 { transition-delay: 0.4s; }
    .reveal-delay-5 { transition-delay: 0.5s; }
    .reveal-delay-6 { transition-delay: 0.6s; }
}

/* Reduced motion - disable animations */
@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;
    }
    .reveal {
        opacity: 1 !important;
        transform: none !important;
    }
}

/* Navbar glass effect on scroll */
.navbar-scrolled {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(59, 7, 100, 0.08);
}

/* Service card hover glow */
.service-card:hover {
    box-shadow: 0 25px 50px -12px rgba(59, 7, 100, 0.25);
}

/* Input autofill styling */
input:-webkit-autofill,
textarea:-webkit-autofill,
select:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 30px #faf5ff inset !important;
    -webkit-text-fill-color: #3b0764 !important;
}

/* Form focus states */
input:focus,
textarea:focus,
select:focus {
    box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.2);
}

/* Button ripple effect */
button, a {
    -webkit-tap-highlight-color: transparent;
}

/* Mobile menu transition */
#mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.4s ease;
}
#mobile-menu.open {
    max-height: 400px;
    padding-top: 0;
}

/* Print styles */
@media print {
    nav, #contact-form, button, .reveal {
        display: none !important;
    }
    body {
        color: #000 !important;
        background: #fff !important;
    }
    .font-serif {
        color: #000 !important;
    }
}
