/* 
   Elite Auto Cars - Ultra Modern Theme
   (c) 2025 Enterprise Edition
*/

:root {
    /* Premium Palette */
    --primary: #2563EB;
    --primary-dark: #1E40AF;
    --accent: #EC4899;
    --surface: #ffffff;
    --background: #F8FAFC;
    --text-main: #0F172A;
    --text-muted: #64748B;
    --glass: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.5);

    /* Typography */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;

    /* Spacing & Radius */
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --container: 1280px;

    /* Shadows */
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --glow-primary: 0 0 20px rgba(37, 99, 235, 0.3);
}

/* Dark Mode Detect via class or auto */
@media (prefers-color-scheme: dark) {
    :root {
        --surface: #1E293B;
        --background: #0F172A;
        --text-main: #F1F5F9;
        --text-muted: #94A3B8;
        --glass: rgba(30, 41, 59, 0.7);
        --glass-border: rgba(255, 255, 255, 0.05);
    }
}

/* Reset & Base */
html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background: var(--background);
    color: var(--text-main);
    margin: 0;
    line-height: 1.6;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5 {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--text-main);
    margin-top: 0;
}

a {
    text-decoration: none;
    color: inherit;
    transition: 0.3s;
}

img {
    max-width: 100%;
    display: block;
    border-radius: var(--radius-sm);
}

/* Components */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--primary);
    color: white;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 1rem;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--glow-primary);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: white;
}

.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 24px;
}

/* Header */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(15, 23, 42, 0.85);
    /* Always dark header for contrast */
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: 0.3s;
}

.header-inner {
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    font-family: var(--font-heading);
    background: linear-gradient(135deg, #60A5FA 0%, #A855F7 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-links {
    display: flex;
    gap: 32px;
}

.nav-links a {
    font-weight: 500;
    font-size: 0.95rem;
    color: #cbd5e1;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: 0.3s;
}

.nav-links a:hover {
    color: white;
}

.nav-links a:hover::after {
    width: 100%;
}

/* Mobile Menu */
.mobile-toggle {
    display: none;
    font-size: 1.5rem;
    color: white;
    cursor: pointer;
}

/* Hero Section */
.hero {
    position: relative;
    height: 100vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    background: #000;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.4;
    z-index: 0;
    transition: transform 10s ease;
}

.hero:hover .hero-bg {
    transform: scale(1.05);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 600px;
    animation: fadeInSlide 1s ease-out;
}

.hero h1 {
    font-size: 4rem;
    line-height: 1.1;
    margin-bottom: 24px;
    color: white;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.hero p {
    font-size: 1.25rem;
    color: #e2e8f0;
    margin-bottom: 32px;
}

.hero-cta {
    display: flex;
    gap: 16px;
}

/* Features Grid */
.features {
    padding: 100px 0;
    position: relative;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 16px;
}

.section-header p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 32px;
}

.card {
    background: var(--surface);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: 32px;
    transition: 0.3s;
    box-shadow: var(--shadow-sm);
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.card-icon {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 24px;
}

.card h3 {
    font-size: 1.5rem;
    margin-bottom: 12px;
}

.card p {
    color: var(--text-muted);
}

/* Stock Preview (Simple) */
.stock-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    margin-top: 40px;
}

.car-card {
    background: var(--surface);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: 0.3s;
}

.car-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.car-img {
    height: 200px;
    background: #cbd5e1;
    position: relative;
}

.car-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.car-info {
    padding: 20px;
}

.car-price {
    color: var(--primary);
    font-weight: 700;
    font-size: 1.2rem;
}

/* Footer */
footer {
    background: #0F172A;
    color: #cbd5e1;
    padding: 80px 0 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 60px;
}

.footer-col h4 {
    color: white;
    margin-bottom: 24px;
    font-size: 1.1rem;
}

.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a:hover {
    color: var(--primary);
}

.copyright {
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 20px;
    font-size: 0.9rem;
    color: #64748b;
}

/* Animations */
@keyframes fadeInSlide {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .header-inner {
        height: 60px;
    }

    .nav-links {
        display: none;
    }

    /* Mobile menu simplified */
    .mobile-toggle {
        display: block;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}