/* Base styles and custom properties */
:root {
    --color-terracotta-50: #fdf8f6;
    --color-terracotta-100: #f2e8e5;
    --color-terracotta-200: #eaddd7;
    --color-terracotta-300: #e0c4b8;
    --color-terracotta-400: #d4a08e;
    --color-terracotta-500: #c48265;
    --color-terracotta-600: #b56446;
    --color-terracotta-700: #9d4e34;
    --color-terracotta-800: #82412f;
    --color-terracotta-900: #6c372a;
    
    --color-sand-50: #fefce8;
    --color-sand-100: #fef9c3;
    --color-sand-200: #fef08a;
    --color-sand-300: #fde047;
    --color-sand-400: #facc15;
    --color-sand-500: #ca8a04;
    --color-sand-600: #a16207;
    --color-sand-700: #854d0e;
    --color-sand-800: #713f12;
    --color-sand-900: #422006;
    
    --color-luxury-900: #0a0a0a;
    --color-luxury-800: #111111;
    --color-luxury-700: #1a1a1a;
    --color-luxury-600: #242424;
    --color-luxury-500: #2d2d2d;
}

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

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

::-webkit-scrollbar-track {
    background: var(--color-luxury-900);
}

::-webkit-scrollbar-thumb {
    background: var(--color-terracotta-600);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-terracotta-500);
}

/* Selection color */
::selection {
    background: var(--color-terracotta-600);
    color: var(--color-sand-50);
}

/* Animation keyframes */
@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(181, 100, 70, 0.3);
    }
    50% {
        box-shadow: 0 0 40px rgba(181, 100, 70, 0.6);
    }
}

/* Stat card animations */
.stat-card {
    animation: float 6s ease-in-out infinite;
}

.stat-card:nth-child(2) {
    animation-delay: -2s;
}

.stat-card:nth-child(3) {
    animation-delay: -4s;
}

/* Reveal animations - progressive enhancement */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.8s ease-out, transform 0.8s ease-out;
    }
    
    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
    
    .vehicle-card {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.8s ease-out, transform 0.8s ease-out;
    }
    
    .vehicle-card.revealed {
        opacity: 1;
        transform: translateY(0);
    }
    
    .feature-card {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.8s ease-out, transform 0.8s ease-out;
    }
    
    .feature-card.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Reduced motion - ensure content is visible */
@media (prefers-reduced-motion: reduce) {
    .reveal,
    .vehicle-card,
    .feature-card {
        opacity: 1;
        transform: none;
    }
    
    .stat-card {
        animation: none;
    }
}

/* Focus styles for accessibility */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--color-terracotta-400);
    outline-offset: 2px;
}

/* Button hover effects */
button,
a {
    transition: all 0.3s ease;
}

/* Image loading optimization */
img {
    max-width: 100%;
    height: auto;
}

/* Ensure text contrast */
.text-sand-300,
.text-sand-400,
.text-sand-50 {
    color: inherit;
}

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

#mobile-menu.open {
    max-height: 300px;
}

/* Navbar background on scroll */
#navbar.scrolled {
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

/* Form focus states */
input:focus,
textarea:focus {
    background-color: var(--color-luxury-700);
}

/* Card hover effects */
.vehicle-card:hover .bg-luxury-800 {
    border-color: rgba(181, 100, 70, 0.5);
}

.feature-card:hover {
    border-color: rgba(181, 100, 70, 0.5);
}
