/* ========================================
   CarBob Sells Automobiles — Styles
   Plum + Amber | Confident Corporate
   ======================================== */

/* --- CSS Custom Properties --- */
:root {
    --plum-50: #faf5ff;
    --plum-100: #f3e8ff;
    --plum-200: #e9d5ff;
    --plum-300: #d8b4fe;
    --plum-400: #c084fc;
    --plum-500: #a855f7;
    --plum-600: #9333ea;
    --plum-700: #7c3aed;
    --plum-800: #6b21a8;
    --plum-900: #581c87;
    --plum-950: #3b0764;
    
    --amber-50: #fffbeb;
    --amber-100: #fef3c7;
    --amber-200: #fde68a;
    --amber-300: #fcd34d;
    --amber-400: #fbbf24;
    --amber-500: #f59e0b;
    --amber-600: #d97706;
    --amber-700: #b45309;
    --amber-800: #92400e;
    --amber-900: #78350f;
    
    --neutral-50: #fafafa;
    --neutral-100: #f5f5f5;
    --neutral-200: #e5e5e5;
    --neutral-300: #d4d4d4;
    --neutral-400: #a3a3a3;
    --neutral-500: #737373;
    --neutral-600: #525252;
    --neutral-700: #404040;
    --neutral-800: #262626;
    --neutral-900: #171717;
    --neutral-950: #0a0a0a;
    
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-display: 'Playfair Display', Georgia, serif;
    
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
}

/* --- Reset & Base --- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    color: var(--neutral-800);
    background-color: #ffffff;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
}

ul {
    list-style: none;
}

/* --- Container --- */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* --- Typography --- */
h1, h2, h3, h4 {
    line-height: 1.2;
    font-weight: 700;
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: var(--radius-md);
    font-family: var(--font-body);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    border: 2px solid transparent;
    white-space: nowrap;
}

.btn-primary {
    background: var(--plum-700);
    color: #ffffff;
    border-color: var(--plum-700);
}

.btn-primary:hover {
    background: var(--plum-800);
    border-color: var(--plum-800);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-outline {
    background: transparent;
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.6);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #ffffff;
    transform: translateY(-2px);
}

.btn-outline-dark {
    background: transparent;
    color: var(--plum-700);
    border-color: var(--plum-700);
}

.btn-outline-dark:hover {
    background: var(--plum-700);
    color: #ffffff;
    transform: translateY(-2px);
}

.btn-full {
    width: 100%;
}

/* --- Section Utilities --- */
.section {
    padding: 100px 0;
}

.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 64px;
}

.section-tag {
    display: inline-block;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--plum-700);
    background: var(--plum-100);
    padding: 6px 16px;
    border-radius: 100px;
    margin-bottom: 20px;
}

.section-title {
    font-size: clamp(28px, 4vw, 44px);
    color: var(--neutral-900);
    margin-bottom: 20px;
    font-family: var(--font-display);
}

.section-title-light {
    font-size: clamp(28px, 4vw, 44px);
    color: #ffffff;
    margin-bottom: 20px;
    font-family: var(--font-display);
}

.section-subtitle {
    font-size: 18px;
    color: var(--neutral-600);
    line-height: 1.7;
}

.section-subtitle-light {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.7;
}

/* --- Navbar --- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--neutral-200);
    transition: box-shadow 0.3s ease;
}

.navbar.scrolled {
    box-shadow: var(--shadow-md);
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: 700;
    color: var(--neutral-900);
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-link {
    padding: 8px 16px;
    font-size: 15px;
    font-weight: 500;
    color: var(--neutral-600);
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
}

.nav-link:hover {
    color: var(--plum-700);
    background: var(--plum-50);
}

.nav-cta {
    background: var(--plum-700);
    color: #ffffff !important;
    border-radius: var(--radius-md);
    margin-left: 8px;
}

.nav-cta:hover {
    background: var(--plum-800);
    color: #ffffff !important;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--neutral-700);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle.active span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* --- Hero --- */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 120px 24px 80px;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--plum-900) 0%, var(--plum-700) 30%, var(--plum-600) 50%, var(--amber-600) 80%, var(--amber-500) 100%);
    z-index: 0;
}

.hero-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(ellipse at 20% 50%, rgba(124, 58, 237, 0.4) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 20%, rgba(217, 119, 6, 0.3) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 80%, rgba(107, 33, 168, 0.3) 0%, transparent 50%);
}

.hero-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 820px;
}

.hero-badge {
    display: inline-block;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--amber-200);
    background: rgba(251, 191, 36, 0.15);
    border: 1px solid rgba(251, 191, 36, 0.3);
    padding: 8px 20px;
    border-radius: 100px;
    margin-bottom: 28px;
}

.hero-headline {
    font-family: var(--font-display);
    font-size: clamp(32px, 5.5vw, 64px);
    font-weight: 700;
    color: #ffffff;
    line-height: 1.1;
    margin-bottom: 24px;
    letter-spacing: -0.02em;
}

.hero-subheadline {
    font-size: clamp(16px, 2vw, 20px);
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.7;
    margin-bottom: 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 56px;
}

.hero-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 32px;
    flex-wrap: wrap;
}

.stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 22px;
    font-weight: 700;
    color: var(--amber-400);
}

.stat-label {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stat-divider {
    width: 1px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
}

.hero-scroll {
    position: absolute;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1;
    color: rgba(255, 255, 255, 0.5);
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
    40% { transform: translateX(-50%) translateY(-8px); }
    60% { transform: translateX(-50%) translateY(-4px); }
}

/* --- Inventory Grid --- */
.inventory-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

.car-card {
    background: #ffffff;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--neutral-200);
    transition: all 0.3s ease;
}

.car-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-xl);
    border-color: var(--plum-200);
}

.car-card-image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 3/2;
}

.car-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.car-card:hover .car-card-image img {
    transform: scale(1.05);
}

.car-badge {
    position: absolute;
    top: 16px;
    left: 16px;
    background: var(--plum-700);
    color: #ffffff;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 100px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.car-card-content {
    padding: 24px;
}

.car-card-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--neutral-900);
    margin-bottom: 10px;
}

.car-card-desc {
    font-size: 15px;
    color: var(--neutral-600);
    line-height: 1.6;
    margin-bottom: 16px;
}

.car-card-link {
    font-size: 14px;
    font-weight: 600;
    color: var(--plum-700);
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: gap 0.2s ease;
}

.car-card-link:hover {
    gap: 8px;
}

/* --- Features Grid --- */
.section-dark {
    background: var(--neutral-950);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.feature-card {
    background: var(--neutral-900);
    border: 1px solid var(--neutral-800);
    border-radius: var(--radius-lg);
    padding: 36px 28px;
    transition: all 0.3s ease;
}

.feature-card:hover {
    border-color: var(--plum-700);
    transform: translateY(-4px);
    box-shadow: 0 0 40px rgba(124, 58, 237, 0.15);
}

.feature-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(217, 119, 6, 0.1);
    border: 1px solid rgba(217, 119, 6, 0.2);
    border-radius: var(--radius-md);
    margin-bottom: 20px;
}

.feature-title {
    font-size: 18px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 12px;
}

.feature-desc {
    font-size: 15px;
    color: var(--neutral-400);
    line-height: 1.7;
}

/* --- Process Grid --- */
.process-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    position: relative;
}

.process-grid::before {
    content: '';
    position: absolute;
    top: 44px;
    left: calc(33.33% - 16px);
    right: calc(33.33% - 16px);
    height: 2px;
    background: linear-gradient(90deg, var(--plum-200), var(--amber-300), var(--plum-200));
    z-index: 0;
}

.process-step {
    text-align: center;
    position: relative;
    z-index: 1;
}

.step-number {
    font-family: var(--font-display);
    font-size: 56px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--plum-600), var(--amber-500));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    margin-bottom: 16px;
}

.step-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--neutral-900);
    margin-bottom: 12px;
}

.step-desc {
    font-size: 15px;
    color: var(--neutral-600);
    line-height: 1.7;
    max-width: 280px;
    margin: 0 auto;
}

/* --- Testimonials --- */
.section-gradient {
    background: linear-gradient(135deg, var(--plum-900) 0%, var(--plum-800) 50%, var(--plum-700) 100%);
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.testimonial-card {
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-lg);
    padding: 36px 28px;
    backdrop-filter: blur(8px);
    transition: all 0.3s ease;
}

.testimonial-card:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-4px);
}

.testimonial-quote {
    margin-bottom: 20px;
}

.testimonial-text {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.88);
    line-height: 1.8;
    margin-bottom: 24px;
    font-style: italic;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 14px;
}

.author-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.author-name {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #ffffff;
}

.author-location {
    display: block;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 2px;
}

/* --- Contact --- */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: start;
}

.contact-details {
    margin-top: 40px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.contact-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--plum-100);
    border-radius: var(--radius-md);
    flex-shrink: 0;
}

.contact-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--neutral-500);
    margin-bottom: 4px;
}

.contact-value {
    display: block;
    font-size: 16px;
    font-weight: 600;
    color: var(--neutral-900);
    line-height: 1.5;
}

.contact-value a {
    color: var(--plum-700);
    transition: color 0.2s ease;
}

.contact-value a:hover {
    color: var(--plum-800);
    text-decoration: underline;
}

.contact-map {
    margin-top: 32px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

/* --- Contact Form --- */
.contact-form-wrapper {
    background: #ffffff;
    border: 1px solid var(--neutral-200);
    border-radius: var(--radius-xl);
    padding: 40px;
    box-shadow: var(--shadow-lg);
}

.contact-form-header {
    margin-bottom: 32px;
}

.contact-form-header h3 {
    font-size: 24px;
    font-weight: 700;
    color: var(--neutral-900);
    margin-bottom: 8px;
}

.contact-form-header p {
    font-size: 15px;
    color: var(--neutral-500);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--neutral-700);
    margin-bottom: 6px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1.5px solid var(--neutral-200);
    border-radius: var(--radius-md);
    font-family: var(--font-body);
    font-size: 15px;
    color: var(--neutral-900);
    background: var(--neutral-50);
    transition: all 0.2s ease;
    outline: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--plum-500);
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--neutral-400);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.form-success {
    display: none;
    text-align: center;
    padding: 40px 20px;
}

.form-success.active {
    display: block;
}

.success-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 20px;
    background: var(--plum-100);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.form-success h3 {
    font-size: 24px;
    font-weight: 700;
    color: var(--neutral-900);
    margin-bottom: 12px;
}

.form-success p {
    font-size: 15px;
    color: var(--neutral-600);
    margin-bottom: 24px;
    line-height: 1.6;
}

/* --- Footer --- */
.footer {
    background: var(--neutral-950);
    padding: 72px 0 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1.5fr;
    gap: 48px;
    padding-bottom: 56px;
    border-bottom: 1px solid var(--neutral-800);
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 16px;
}

.footer-desc {
    font-size: 15px;
    color: var(--neutral-400);
    line-height: 1.7;
    max-width: 320px;
}

.footer-links h4,
.footer-contact h4 {
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--neutral-300);
    margin-bottom: 20px;
}

.footer-links ul,
.footer-contact ul {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-links li a {
    font-size: 15px;
    color: var(--neutral-400);
    transition: color 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-links li a:hover {
    color: var(--amber-400);
}

.footer-contact li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 14px;
    color: var(--neutral-400);
    line-height: 1.6;
}

.footer-contact li a {
    color: var(--neutral-400);
    transition: color 0.2s ease;
}

.footer-contact li a:hover {
    color: var(--amber-400);
}

.footer-bottom {
    padding: 24px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.footer-bottom p {
    font-size: 14px;
    color: var(--neutral-500);
}

.footer-bottom a {
    color: var(--amber-500);
    transition: color 0.2s ease;
}

.footer-bottom a:hover {
    color: var(--amber-400);
}

/* --- Reveal Animations (progressive enhancement) --- */
@media (prefers-reduced-motion: no-preference) {
    [data-reveal] {
        opacity: 0;
        transform: translateY(24px);
        transition: opacity 0.6s ease, transform 0.6s ease;
    }
    
    [data-reveal].revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Responsive --- */
@media (max-width: 1024px) {
    .inventory-grid,
    .features-grid,
    .testimonials-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 48px;
    }
    
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        top: 72px;
        left: 0;
        right: 0;
        background: #ffffff;
        flex-direction: column;
        padding: 24px;
        gap: 4px;
        border-bottom: 1px solid var(--neutral-200);
        box-shadow: var(--shadow-lg);
        transform: translateY(-120%);
        transition: transform 0.3s ease;
        z-index: 999;
    }
    
    .nav-menu.open {
        transform: translateY(0);
    }
    
    .nav-link {
        width: 100%;
        padding: 12px 16px;
    }
    
    .nav-cta {
        margin-left: 0;
        text-align: center;
        margin-top: 8px;
    }
    
    .hero {
        min-height: auto;
        padding: 140px 24px 100px;
    }
    
    .hero-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .hero-actions .btn {
        width: 100%;
    }
    
    .hero-stats {
        gap: 20px;
    }
    
    .stat-divider {
        display: none;
    }
    
    .section {
        padding: 72px 0;
    }
    
    .inventory-grid,
    .features-grid,
    .testimonials-grid,
    .process-grid {
        grid-template-columns: 1fr;
    }
    
    .process-grid::before {
        display: none;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .contact-form-wrapper {
        padding: 28px;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 36px;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }
    
    .hero-headline {
        font-size: 28px;
    }
    
    .section-title,
    .section-title-light {
        font-size: 26px;
    }
}
