/* Custom styles for Nelson Auto Sales */

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

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

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

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

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

/* Selection color */
::selection {
    background: rgba(251, 191, 36, 0.3);
    color: #fff;
}

/* Hero text animation - progressive enhancement only */
@media (prefers-reduced-motion: no-preference) {
    .hero-badge {
        animation: fadeInDown 0.8s ease-out both;
    }
    
    .hero-headline {
        animation: fadeInUp 0.8s ease-out 0.2s both;
    }
    
    .hero-subheadline {
        animation: fadeInUp 0.8s ease-out 0.4s both;
    }
    
    .hero-cta {
        animation: fadeInUp 0.8s ease-out 0.6s both;
    }
    
    .hero-stats {
        animation: fadeInUp 0.8s ease-out 0.8s both;
    }
    
    .hero-card {
        animation: fadeInRight 0.8s ease-out 0.4s both;
    }
}

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

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

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

/* Scroll reveal animations - progressive enhancement */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

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

/* Reduced motion - hide animations */
@media (prefers-reduced-motion: reduce) {
    .hero-badge,
    .hero-headline,
    .hero-subheadline,
    .hero-cta,
    .hero-stats,
    .hero-card {
        animation: none;
        opacity: 1;
        transform: none;
    }
    
    .reveal {
        opacity: 1;
        transform: none;
    }
}

/* Gold shimmer effect for special elements */
@keyframes shimmer {
    0% {
        background-position: -200% center;
    }
    100% {
        background-position: 200% center;
    }
}

.shimmer-text {
    background: linear-gradient(
        90deg,
        #fbbf24 0%,
        #fcd34d 25%,
        #fbbf24 50%,
        #fcd34d 75%,
        #fbbf24 100%
    );
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shimmer 4s linear infinite;
}

/* Glass morphism utility */
.glass {
    background: rgba(26, 26, 46, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

/* Gradient border utility */
.gradient-border {
    position: relative;
    background: #1a1a2e;
    border-radius: 1rem;
}

.gradient-border::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 1rem;
    padding: 1px;
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.3), rgba(168, 85, 247, 0.3));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

/* Pulse animation for live indicators */
@keyframes pulse-ring {
    0% {
        transform: scale(0.8);
        opacity: 1;
    }
    100% {
        transform: scale(2);
        opacity: 0;
    }
}

.pulse-ring::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: inherit;
    animation: pulse-ring 1.5s ease-out infinite;
}

/* Navbar transition states */
.nav-scrolled {
    background: rgba(13, 13, 26, 0.95) !important;
    backdrop-filter: blur(12px) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
}

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

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

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

/* Card hover effects */
.vehicle-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.vehicle-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

/* Image lazy loading placeholder */
img {
    loading: lazy;
}

/* Map styling override */
.map-container iframe {
    width: 100%;
    height: 100%;
}

/* Print styles */
@media print {
    nav,
    #contact-form,
    .map-container {
        display: none;
    }
    
    body {
        background: white;
        color: black;
    }
}
