/* ============================================================
   home.css — DriverSpecs Home Page Styles
   Premium automotive landing page design
   ============================================================ */

/* ── Google Fonts ── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

/* ── Home-specific reset ── */
.home-page {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f8f9fa;
    overflow-x: hidden;
}

/* ════════════════════════════════════════════════════════════
   HERO SECTION
   ════════════════════════════════════════════════════════════ */
.home-hero {
    position: relative;
    background: linear-gradient(135deg, #0f0c29 0%, #302b63 50%, #24243e 100%);
    padding: 80px 20px 90px;
    text-align: center;
    overflow: hidden;
}

/* Animated background grid pattern */
.home-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(102, 126, 234, 0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(102, 126, 234, 0.06) 1px, transparent 1px);
    background-size: 60px 60px;
    animation: hero-grid-drift 20s linear infinite;
}

@keyframes hero-grid-drift {
    0% { transform: translate(0, 0); }
    100% { transform: translate(60px, 60px); }
}

/* Glowing orb accent */
.home-hero::after {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(102, 126, 234, 0.15) 0%, transparent 70%);
    top: -150px;
    right: -100px;
    border-radius: 50%;
    pointer-events: none;
}

.home-hero-inner {
    position: relative;
    z-index: 2;
    max-width: 820px;
    margin: 0 auto;
}

.home-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(102, 126, 234, 0.15);
    border: 1px solid rgba(102, 126, 234, 0.3);
    border-radius: 999px;
    padding: 6px 16px;
    font-size: 12px;
    font-weight: 600;
    color: #a5b4fc;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-bottom: 24px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    animation: home-fadeInUp 0.6s ease both;
}

.home-hero-badge .pulse-dot {
    width: 8px;
    height: 8px;
    background: #22c55e;
    border-radius: 50%;
    animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4); }
    50% { box-shadow: 0 0 0 6px rgba(34, 197, 94, 0); }
}

.home-hero h1 {
    font-size: clamp(32px, 5vw, 56px);
    font-weight: 900;
    color: #ffffff;
    line-height: 1.1;
    margin: 0 0 20px;
    letter-spacing: -1px;
    animation: home-fadeInUp 0.6s ease 0.1s both;
}

.home-hero h1 .text-gradient {
    background: linear-gradient(135deg, #667eea 0%, #a78bfa 50%, #c084fc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.home-hero-subtitle {
    font-size: clamp(16px, 2vw, 20px);
    color: #94a3b8;
    line-height: 1.7;
    margin: 0 0 32px;
    max-width: 640px;
    margin-left: auto;
    margin-right: auto;
    animation: home-fadeInUp 0.6s ease 0.2s both;
}

.home-hero-tags {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-bottom: 36px;
    animation: home-fadeInUp 0.6s ease 0.3s both;
}

.home-hero-tag {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 999px;
    padding: 7px 16px;
    font-size: 13px;
    font-weight: 500;
    color: #cbd5e1;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: background 0.2s, border-color 0.2s;
}

.home-hero-tag:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.home-hero-tag .tag-icon {
    font-size: 14px;
}

.home-hero-cta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    padding: 16px 36px;
    border-radius: 12px;
    font-size: 17px;
    font-weight: 700;
    letter-spacing: -0.2px;
    box-shadow: 0 4px 24px rgba(102, 126, 234, 0.35), 0 0 0 0 rgba(102, 126, 234, 0);
    transition: transform 0.2s, box-shadow 0.3s;
    animation: home-fadeInUp 0.6s ease 0.4s both;
}

.home-hero-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(102, 126, 234, 0.45), 0 0 0 4px rgba(102, 126, 234, 0.15);
}

.home-hero-cta:active {
    transform: translateY(0);
}

.home-hero-cta .cta-arrow {
    font-size: 18px;
    transition: transform 0.2s;
}

.home-hero-cta:hover .cta-arrow {
    transform: translateX(4px);
}


/* ════════════════════════════════════════════════════════════
   QUICK SEARCH SECTION
   ════════════════════════════════════════════════════════════ */
.home-search-section {
    max-width: 700px;
    margin: -48px auto 0;
    padding: 0 20px;
    position: relative;
    z-index: 10;
}

.home-search-card {
    background: white;
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.1), 0 2px 8px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.04);
    text-align: center;
}

.home-search-card h2 {
    font-size: 20px;
    font-weight: 800;
    color: #1a202c;
    margin: 0 0 6px;
}

.home-search-card .search-hint {
    font-size: 14px;
    color: #64748b;
    margin: 0 0 20px;
}

.home-search-link {
    display: flex;
    align-items: center;
    gap: 14px;
    background: #f8f9ff;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px 20px;
    text-decoration: none;
    color: #1a202c;
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s;
}

.home-search-link:hover {
    border-color: #667eea;
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.12);
    transform: translateY(-1px);
}

.home-search-icon {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.home-search-text {
    text-align: left;
}

.home-search-text .primary {
    font-size: 15px;
    font-weight: 700;
    color: #1a202c;
    display: block;
    margin-bottom: 2px;
}

.home-search-text .secondary {
    font-size: 13px;
    color: #64748b;
}

.home-search-arrow {
    margin-left: auto;
    font-size: 18px;
    color: #667eea;
    transition: transform 0.2s;
}

.home-search-link:hover .home-search-arrow {
    transform: translateX(4px);
}


/* ════════════════════════════════════════════════════════════
   POPULAR MAKES SECTION
   ════════════════════════════════════════════════════════════ */
.home-section {
    max-width: 1100px;
    margin: 0 auto;
    padding: 64px 20px 0;
}

.home-section-header {
    text-align: center;
    margin-bottom: 36px;
}

.home-section-header h2 {
    font-size: clamp(22px, 3vw, 30px);
    font-weight: 800;
    color: #1a202c;
    margin: 0 0 10px;
    letter-spacing: -0.5px;
}

.home-section-header p {
    font-size: 16px;
    color: #64748b;
    margin: 0;
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

.home-makes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
}

.home-make-card {
    display: flex;
    align-items: center;
    gap: 16px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 20px 22px;
    text-decoration: none;
    color: #1a202c;
    transition: border-color 0.2s, box-shadow 0.25s, transform 0.2s;
    position: relative;
    overflow: hidden;
}

.home-make-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.03) 0%, rgba(118, 75, 162, 0.03) 100%);
    opacity: 0;
    transition: opacity 0.25s;
}

.home-make-card:hover::before {
    opacity: 1;
}

.home-make-card:hover {
    border-color: #c7d2fe;
    box-shadow: 0 6px 24px rgba(102, 126, 234, 0.12);
    transform: translateY(-3px);
}

.home-make-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #f0f4ff, #e8eaff);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

.home-make-info {
    flex: 1;
    min-width: 0;
    position: relative;
    z-index: 1;
}

.home-make-name {
    font-size: 16px;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 2px;
}

.home-make-desc {
    font-size: 12px;
    color: #94a3b8;
}

.home-make-arrow {
    color: #c7d2fe;
    font-size: 16px;
    transition: color 0.2s, transform 0.2s;
    position: relative;
    z-index: 1;
}

.home-make-card:hover .home-make-arrow {
    color: #667eea;
    transform: translateX(3px);
}

.home-makes-viewall {
    text-align: center;
    margin-top: 24px;
}

.home-makes-viewall a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 15px;
    font-weight: 600;
    color: #667eea;
    text-decoration: none;
    padding: 10px 24px;
    border: 2px solid #667eea;
    border-radius: 10px;
    transition: background 0.2s, color 0.2s, transform 0.15s;
}

.home-makes-viewall a:hover {
    background: #667eea;
    color: white;
    transform: translateY(-1px);
}


/* ════════════════════════════════════════════════════════════
   FEATURES SECTION
   ════════════════════════════════════════════════════════════ */
.home-features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.home-feature-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 32px 28px;
    text-align: center;
    transition: border-color 0.2s, box-shadow 0.25s, transform 0.2s;
    position: relative;
}

.home-feature-card:hover {
    border-color: #c7d2fe;
    box-shadow: 0 8px 28px rgba(102, 126, 234, 0.1);
    transform: translateY(-4px);
}

.home-feature-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 20px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
}

.home-feature-icon.green  { background: linear-gradient(135deg, #dcfce7, #bbf7d0); }
.home-feature-icon.blue   { background: linear-gradient(135deg, #dbeafe, #bfdbfe); }
.home-feature-icon.purple { background: linear-gradient(135deg, #ede9fe, #ddd6fe); }

.home-feature-card h3 {
    font-size: 18px;
    font-weight: 800;
    color: #1a202c;
    margin: 0 0 8px;
}

.home-feature-card p {
    font-size: 14px;
    color: #64748b;
    line-height: 1.7;
    margin: 0;
}

@media (max-width: 768px) {
    .home-features-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }
    .home-feature-card {
        padding: 24px 20px;
    }
}


/* ════════════════════════════════════════════════════════════
   HOW IT WORKS SECTION
   ════════════════════════════════════════════════════════════ */
.home-steps {
    display: flex;
    gap: 24px;
    align-items: flex-start;
    position: relative;
}

/* Connector line behind steps */
.home-steps::before {
    content: '';
    position: absolute;
    top: 36px;
    left: calc(16.66%);
    right: calc(16.66%);
    height: 3px;
    background: linear-gradient(90deg, #667eea, #a78bfa, #c084fc);
    border-radius: 2px;
    z-index: 0;
}

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

.home-step-num {
    width: 72px;
    height: 72px;
    background: white;
    border: 3px solid #e2e8f0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    font-weight: 900;
    margin: 0 auto 18px;
    transition: border-color 0.3s, box-shadow 0.3s;
    color: #667eea;
}

.home-step:hover .home-step-num {
    border-color: #667eea;
    box-shadow: 0 0 0 6px rgba(102, 126, 234, 0.12);
}

.home-step h3 {
    font-size: 17px;
    font-weight: 800;
    color: #1a202c;
    margin: 0 0 8px;
}

.home-step p {
    font-size: 14px;
    color: #64748b;
    line-height: 1.6;
    margin: 0;
    max-width: 260px;
    margin-left: auto;
    margin-right: auto;
}

@media (max-width: 700px) {
    .home-steps {
        flex-direction: column;
        gap: 20px;
        align-items: center;
    }
    .home-steps::before {
        display: none;
    }
    .home-step-num {
        width: 56px;
        height: 56px;
        font-size: 22px;
    }
}


/* ════════════════════════════════════════════════════════════
   FAQ SECTION
   ════════════════════════════════════════════════════════════ */
.home-faq-list {
    max-width: 760px;
    margin: 0 auto;
}

.home-faq-item {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    margin-bottom: 12px;
    overflow: hidden;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.home-faq-item:hover {
    border-color: #c7d2fe;
}

.home-faq-q {
    width: 100%;
    background: none;
    border: none;
    padding: 20px 24px;
    text-align: left;
    font-size: 16px;
    font-weight: 700;
    color: #1a202c;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    font-family: 'Inter', sans-serif;
    transition: background 0.15s;
}

.home-faq-q:hover {
    background: #fafafe;
}

.home-faq-q .faq-toggle {
    font-size: 20px;
    color: #667eea;
    flex-shrink: 0;
    transition: transform 0.3s ease;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #f0f4ff;
}

.home-faq-q[aria-expanded="true"] .faq-toggle {
    transform: rotate(45deg);
    background: #667eea;
    color: white;
}

.home-faq-a {
    display: none;
    padding: 0 24px 20px;
    font-size: 15px;
    color: #64748b;
    line-height: 1.8;
}

.home-faq-a.open {
    display: block;
    animation: home-fadeIn 0.3s ease;
}


/* ════════════════════════════════════════════════════════════
   BOTTOM CTA
   ════════════════════════════════════════════════════════════ */
.home-bottom-cta {
    text-align: center;
    padding: 72px 20px 80px;
    max-width: 600px;
    margin: 0 auto;
}

.home-bottom-cta h2 {
    font-size: clamp(22px, 3vw, 30px);
    font-weight: 800;
    color: #1a202c;
    margin: 0 0 12px;
    letter-spacing: -0.3px;
}

.home-bottom-cta p {
    font-size: 16px;
    color: #64748b;
    margin: 0 0 28px;
    line-height: 1.6;
}

.home-bottom-cta a {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    padding: 16px 36px;
    border-radius: 12px;
    font-size: 17px;
    font-weight: 700;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.3);
    transition: transform 0.2s, box-shadow 0.3s;
}

.home-bottom-cta a:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(102, 126, 234, 0.4);
}


/* ════════════════════════════════════════════════════════════
   ANIMATIONS
   ════════════════════════════════════════════════════════════ */
@keyframes home-fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes home-fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Scroll-triggered animation class */
.home-animate {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.home-animate.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger children for grids */
.home-animate-stagger > * {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.home-animate-stagger.visible > *:nth-child(1) { transition-delay: 0.05s; }
.home-animate-stagger.visible > *:nth-child(2) { transition-delay: 0.1s; }
.home-animate-stagger.visible > *:nth-child(3) { transition-delay: 0.15s; }
.home-animate-stagger.visible > *:nth-child(4) { transition-delay: 0.2s; }
.home-animate-stagger.visible > *:nth-child(5) { transition-delay: 0.25s; }
.home-animate-stagger.visible > *:nth-child(6) { transition-delay: 0.3s; }
.home-animate-stagger.visible > *:nth-child(7) { transition-delay: 0.35s; }
.home-animate-stagger.visible > *:nth-child(8) { transition-delay: 0.4s; }

.home-animate-stagger.visible > * {
    opacity: 1;
    transform: translateY(0);
}


/* ════════════════════════════════════════════════════════════
   RESPONSIVE
   ════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
    .home-hero {
        padding: 56px 16px 70px;
    }
    .home-hero h1 {
        letter-spacing: -0.5px;
    }
    .home-search-section {
        margin-top: -36px;
    }
    .home-search-card {
        padding: 24px 20px;
    }
    .home-section {
        padding: 48px 16px 0;
    }
    .home-makes-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }
    .home-make-card {
        padding: 16px;
        gap: 12px;
    }
    .home-make-icon {
        width: 40px;
        height: 40px;
        font-size: 20px;
        border-radius: 10px;
    }
    .home-make-name {
        font-size: 14px;
    }
    .home-make-desc {
        display: none;
    }
}

@media (max-width: 480px) {
    .home-hero {
        padding: 44px 14px 60px;
    }
    .home-hero-tags {
        gap: 6px;
    }
    .home-hero-tag {
        font-size: 12px;
        padding: 5px 12px;
    }
    .home-hero-cta {
        width: 100%;
        justify-content: center;
        padding: 15px 28px;
        font-size: 16px;
    }
    .home-makes-grid {
        grid-template-columns: 1fr;
    }
    .home-section-header h2 {
        font-size: 22px;
    }
    .home-bottom-cta a {
        width: 100%;
        justify-content: center;
    }
}
