/* ============================================================================
   2CarsAI — 官网首页样式
   设计还原：基于设计稿视觉，主色 #FF4A00 / 深色 #111318 / 中性灰阶
   ========================================================================== */

:root {
    --brand: #ff4a00;
    --brand-dark: #e03900;
    --brand-soft: #fff1ea;
    --brand-soft-2: #ffe6da;

    --ink: #111318;
    --ink-2: #2a2f38;
    --gray-700: #4a5058;
    --gray-500: #7b828c;
    --gray-400: #a2a8b2;
    --gray-200: #e4e7ec;
    --gray-100: #f1f3f6;
    --gray-50: #f7f8fa;

    --bg: #ffffff;
    --bg-soft: #fafbfc;

    /* 兼容灰底版的引用（浅色主题下等同深色文字） */
    --on-bg: #111318;
    --on-bg-dim: #7b828c;

    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 16px;
    --radius-pill: 999px;

    --shadow-sm: 0 1px 2px rgba(17, 19, 24, 0.04), 0 1px 3px rgba(17, 19, 24, 0.06);
    --shadow: 0 4px 16px rgba(17, 19, 24, 0.07);
    --shadow-lg: 0 12px 36px rgba(17, 19, 24, 0.10);
    --shadow-brand: 0 6px 18px rgba(255, 74, 0, 0.28);

    --maxw: 1280px;
    --gutter: 40px;

    --font-sans: 'Poppins', -apple-system, BlinkMacSystemFont, 'PingFang SC',
                 'Hiragino Sans GB', 'Microsoft YaHei', 'Helvetica Neue', Arial, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-sans);
    color: var(--ink);
    background: var(--bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; border: none; background: none; cursor: pointer; color: inherit; }
ul { list-style: none; }

/* ============================================================================
   Header
   ========================================================================== */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: saturate(180%) blur(14px);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    border-bottom: 1px solid transparent;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.site-header.is-scrolled {
    border-bottom-color: var(--gray-200);
    box-shadow: 0 2px 12px rgba(17, 19, 24, 0.04);
}

.header-inner {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 0 var(--gutter);
    height: 76px;
    display: flex;
    align-items: center;
    gap: 40px;
}

.brand img { height: 34px; width: auto; }

/* 主导航 */
.main-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 24px;
}

.nav-item { position: relative; }

.nav-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 9px 14px;
    font-size: 15px;
    font-weight: 500;
    color: var(--ink-2);
    border-radius: var(--radius-sm);
    transition: color 0.18s ease, background 0.18s ease;
}

.nav-link:hover { color: var(--brand); background: var(--brand-soft); }

/* 下拉箭头 */
.caret {
    width: 8px; height: 8px;
    border-right: 1.6px solid currentColor;
    border-bottom: 1.6px solid currentColor;
    transform: rotate(45deg) translateY(-2px);
    transition: transform 0.22s ease;
    opacity: 0.6;
}

.has-dropdown.is-open > .nav-link .caret { transform: rotate(225deg) translateY(-1px); }
.has-dropdown.is-open > .nav-link { color: var(--brand); background: var(--brand-soft); }

/* 下拉面板 */
.dropdown {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    min-width: 190px;
    padding: 8px;
    background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
}

.has-dropdown.is-open .dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown a {
    display: block;
    padding: 10px 12px;
    font-size: 14px;
    color: var(--gray-700);
    border-radius: var(--radius-sm);
    transition: background 0.16s ease, color 0.16s ease;
}

.dropdown a:hover { background: var(--brand-soft); color: var(--brand); }

/* 右侧动作区 */
.header-actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 18px;
}

.lang-switch {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 15px;
    font-weight: 500;
    color: var(--ink-2);
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: color 0.18s ease;
}

.lang-switch:hover { color: var(--brand); }
.lang-switch .globe { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.lang-switch .caret { opacity: 0.5; }

/* ============================================================================
   按钮
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 12px 22px;
    font-size: 15px;
    font-weight: 600;
    border-radius: var(--radius-sm);
    white-space: nowrap;
    transition: transform 0.18s ease, box-shadow 0.22s ease, background 0.18s ease,
                color 0.18s ease, border-color 0.18s ease;
    cursor: pointer;
}

.btn .arrow { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; transition: transform 0.22s ease; }
.btn:hover .arrow { transform: translateX(3px); }

.btn-primary {
    background: var(--brand);
    color: #fff;
    box-shadow: var(--shadow-brand);
}
.btn-primary:hover {
    background: var(--brand-dark);
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(255, 74, 0, 0.34);
}

.btn-ghost {
    background: #fff;
    color: var(--ink);
    border: 1.5px solid var(--gray-200);
}
.btn-ghost:hover {
    border-color: var(--brand);
    color: var(--brand);
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(255, 74, 0, 0.12);
}

.btn-lg { padding: 15px 30px; font-size: 16px; }

/* 播放图标 */
.play {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px; height: 22px;
    border: 1.6px solid currentColor;
    border-radius: 50%;
    flex-shrink: 0;
}
.play svg { width: 12px; height: 12px; fill: currentColor; stroke: none; }

/* 移动端菜单按钮 */
.menu-toggle { display: none; flex-direction: column; gap: 5px; padding: 8px; }
.menu-toggle span { width: 22px; height: 2px; background: var(--ink); border-radius: 2px; transition: 0.25s ease; }

/* ============================================================================
   Hero
   ========================================================================== */
.hero {
    position: relative;
    background:
        radial-gradient(1100px 520px at 78% 8%, #fff4ee 0%, rgba(255, 244, 238, 0) 62%),
        linear-gradient(180deg, #ffffff 0%, #fdfefe 100%);
    padding-top: 26px;
}

.hero-grid {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 30px var(--gutter) 10px;
    display: grid;
    grid-template-columns: minmax(0, 1.02fr) minmax(0, 1fr);
    gap: 40px;
    align-items: center;
}

/* 左侧文案 */
.hero-copy { padding-top: 18px; }

.eyebrow {
    display: inline-block;
    padding: 7px 16px;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--brand);
    background: var(--brand-soft);
    border-radius: var(--radius-pill);
    letter-spacing: 0.3px;
    margin-bottom: 26px;
}

.hero-title {
    font-size: clamp(38px, 5.2vw, 66px);
    font-weight: 800;
    line-height: 1.14;
    letter-spacing: -0.5px;
    margin-bottom: 26px;
}

.hero-title .line-dark { display: block; color: #111318; }
.hero-title .line-accent { display: block; color: var(--brand); }

.hero-desc {
    font-size: 16.5px;
    line-height: 1.85;
    color: var(--gray-500);
    margin-bottom: 38px;
    max-width: 30em;
}

.hero-cta { display: flex; flex-wrap: wrap; gap: 16px; }

/* ============================================================================
   Hero 视觉区
   ========================================================================== */
.hero-visual { position: relative; }

.hero-car {
    position: relative;
    aspect-ratio: 800 / 470;
    width: 100%;
}

/* 真实车图：透明底 PNG/WebP，作为视觉底层 */
.car-img {
    position: absolute;
    inset: 9% -2% 2% 10%;
    display: block;
    z-index: 1;
}

.car-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: 58% 52%;
    /* 白车在灰底上需要阴影托住 */
    filter: contrast(1.06) saturate(1.02)
            drop-shadow(0 24px 38px rgba(120, 132, 152, 0.22));
}

.connector { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 2; }
.dashline {
    fill: none;
    stroke: var(--brand);
    stroke-width: 1.6;
    stroke-dasharray: 5 6;
    opacity: 0.35;
    animation: dashflow 2.6s linear infinite;
}
@keyframes dashflow { to { stroke-dashoffset: -44; } }

/* 浮层卡片基类 */
.float-card {
    position: absolute;
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(10px);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    animation: floaty 7s ease-in-out infinite;
}

@keyframes floaty {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

/* AI 分析卡 — 左上，车头前方 */
.card-ai {
    top: 2%;
    left: 4%;
    width: 112px;
    padding: 11px 12px;
    border-color: #ffd9c6;
    background: linear-gradient(160deg, #fff8f4, #ffffff);
    animation-delay: 0s;
    z-index: 3;
}
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 6px; margin-bottom: 10px; }
.ai-mark { font-size: 26px; font-weight: 800; color: var(--brand); line-height: 1; letter-spacing: -1px; }
.card-head small { font-size: 8px; line-height: 1.3; color: var(--gray-400); text-align: right; }
.mini-bars { display: flex; align-items: flex-end; gap: 3px; height: 34px; }
.mini-bars span {
    flex: 1;
    height: var(--h);
    background: linear-gradient(180deg, #ff7a3d, var(--brand));
    border-radius: 2px;
    opacity: 0.85;
}

/* 大盘面板 — 右上 */
.card-dash {
    top: 0;
    right: -3%;
    width: 290px;
    padding: 12px 14px;
    animation-delay: 0.7s;
    z-index: 5;
}
.dash-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.dash-brand { font-size: 11px; font-weight: 700; color: var(--ink); }
.dash-dots { display: flex; gap: 3px; }
.dash-dots i { width: 4px; height: 4px; border-radius: 50%; background: var(--gray-400); }

.dash-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 8px; }
.dash-cell { background: var(--gray-50); border-radius: 7px; padding: 7px; }
.dash-cell.chart svg, .dash-cell.donut svg { width: 100%; display: block; }
.dash-cell.donut svg { max-width: 46px; margin: 0 auto; }
.dash-cell.bars { display: flex; align-items: flex-end; gap: 4px; min-height: 34px; }
.dash-cell.bars span {
    flex: 1; height: var(--h);
    background: linear-gradient(180deg, #ff9d6e, var(--brand));
    border-radius: 2px; opacity: 0.85;
}
.dash-cell.list { display: flex; flex-direction: column; gap: 5px; justify-content: center; }
.dash-cell.list i { height: 5px; border-radius: 3px; background: var(--gray-200); }
.dash-cell.list i:nth-child(1) { width: 88%; background: #ffd0b8; }
.dash-cell.list i:nth-child(2) { width: 70%; }
.dash-cell.list i:nth-child(3) { width: 80%; }

/* 运营数据卡 — 左侧中部 */
.card-ops {
    top: 40%;
    left: -2%;
    width: 190px;
    padding: 12px 14px;
    animation-delay: 1.4s;
    z-index: 4;
}
.card-title {
    display: flex; align-items: center; gap: 6px;
    font-size: 12.5px; font-weight: 600; color: var(--ink-2);
    margin-bottom: 9px;
}
.card-title .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--brand); }
.card-title .dot.blue { background: #4a8fe0; }

.ops-body { display: flex; gap: 10px; align-items: center; }
.spark { width: 76px; height: 44px; flex-shrink: 0; }
.metric-list { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.metric-list li { display: flex; align-items: center; justify-content: space-between; font-size: 9px; color: var(--gray-500); }
.metric-list li b { color: var(--ink-2); font-weight: 600; }

/* 用户卡 — 左下 */
.card-users {
    top: 74%;
    left: 10%;
    width: 176px;
    padding: 12px 14px;
    animation-delay: 2.6s;
    z-index: 4;
}
.avatars { display: flex; margin-bottom: 10px; }
.avatars .av {
    width: 26px; height: 26px; border-radius: 50%;
    border: 2px solid #fff; margin-right: -8px;
    background: linear-gradient(135deg, #ffd2bd, #ff9d6e);
}
.avatars .av.a2 { background: linear-gradient(135deg, #bcd8ff, #7fb0f0); }
.avatars .av.a3 { background: linear-gradient(135deg, #ffe0b0, #f0b45f); }
.avatars .av.a4 { background: linear-gradient(135deg, #cfc4ff, #9a86f0); }
.user-stats { display: flex; justify-content: space-between; gap: 8px; }
.user-stats div { display: flex; flex-direction: column; gap: 1px; }
.user-stats small { font-size: 8.5px; color: var(--gray-400); }
.user-stats b { font-size: 13px; font-weight: 700; color: var(--ink); }

/* ============================================================================
   客户 logo 墙
   ========================================================================== */
.brand-strip {
    margin-top: 34px;
    border-top: 1px solid var(--gray-200);
    background: #ffffff;
}

.strip-inner {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 30px var(--gutter);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    flex-wrap: wrap;
}

.client-logo {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #9aa1ab;
    font-weight: 700;
    filter: grayscale(1);
    opacity: 0.72;
    transition: opacity 0.25s ease, filter 0.25s ease, color 0.25s ease;
    cursor: default;
}

.client-logo:hover { opacity: 1; filter: grayscale(0); color: var(--ink-2); }

.client-logo.geely { font-size: 25px; font-weight: 800; letter-spacing: 1.5px; font-style: italic; }
.client-logo.byd { font-size: 26px; font-weight: 800; letter-spacing: 0.5px; font-style: italic; }
.client-logo.nio { font-size: 24px; font-weight: 700; letter-spacing: 2px; }
.client-logo.lixiang { font-size: 22px; font-weight: 600; letter-spacing: 3px; }

.client-logo.changan, .client-logo.gac { flex-direction: column; gap: 0; align-items: center; }
.client-logo .cn { font-size: 17px; font-weight: 600; letter-spacing: 1px; }
.client-logo .en { font-size: 9.5px; font-weight: 500; letter-spacing: 1.6px; opacity: 0.8; }

.client-logo.saic { gap: 8px; }
.client-logo.saic .badge {
    display: inline-flex; align-items: center; justify-content: center;
    width: 34px; height: 34px; border-radius: 50%;
    border: 1.6px solid currentColor; font-size: 9px; font-weight: 700; letter-spacing: 0.5px;
}
.client-logo.saic .stack { display: flex; flex-direction: column; align-items: flex-start; }

/* ============================================================================
   Footer
   ========================================================================== */
.site-footer {
    border-top: 1px solid var(--gray-200);
    background: #ffffff;
    padding: 26px 0 42px;
}

.footer-inner {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 0 var(--gutter);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 26px;
    flex-wrap: wrap;
}

.copyright { font-size: 13.5px; color: var(--gray-500); }
.site-domain { font-size: 13.5px; color: var(--gray-500); font-weight: 500; }

.footer-features { display: flex; align-items: center; gap: 40px; flex-wrap: wrap; }
.footer-features li {
    display: inline-flex; align-items: center; gap: 9px;
    font-size: 13.5px; color: var(--gray-500);
}
.footer-features svg {
    width: 20px; height: 20px; flex-shrink: 0;
    fill: none; stroke: var(--brand); stroke-width: 1.5;
    stroke-linecap: round; stroke-linejoin: round;
}

/* 备案号：底部中央 */
.footer-icp {
    max-width: var(--maxw);
    margin: 20px auto 0;
    padding: 0 var(--gutter);
    text-align: center;
}
.footer-icp a {
    font-size: 12.5px;
    color: var(--gray-400);
    transition: color 0.2s ease;
}
.footer-icp a:hover { color: var(--brand); }

/* ============================================================================
   响应式
   ========================================================================== */
@media (max-width: 1080px) {
    .main-nav { gap: 2px; margin-left: 10px; }
    .nav-link { padding: 9px 10px; font-size: 14px; }
    .header-inner { gap: 20px; }
    .card-dash { width: 250px; }
    .card-ops { left: 16%; }
}

@media (max-width: 920px) {
    .main-nav, .lang-switch { display: none; }

    .menu-toggle { display: flex; margin-left: auto; }

    .hero-grid {
        grid-template-columns: 1fr;
        gap: 30px;
        padding-top: 10px;
    }
    .hero-copy { padding-top: 0; text-align: left; }
    .hero-visual { max-width: 620px; margin: 0 auto; width: 100%; }

    .site-footer .footer-inner { flex-direction: column; align-items: flex-start; gap: 16px; }
    .footer-features { gap: 22px; }
}

@media (max-width: 620px) {
    :root { --gutter: 20px; }

    .header-inner { height: 64px; }
    .brand img { height: 28px; }
    .header-actions .btn { padding: 10px 16px; font-size: 14px; }

    .hero-title { font-size: 34px; }
    .hero-desc { font-size: 15px; }
    .hero-desc br { display: none; }
    .btn-lg { padding: 13px 22px; font-size: 15px; width: 100%; }
    .hero-cta { gap: 12px; }

    /* 小屏简化浮层：隐藏次要卡片，保留车体与 2 个关键卡 */
    .hero-car { aspect-ratio: 800 / 560; }
    .card-ai { display: none; }
    .card-users { display: none; }

    .card-dash {
        width: 62%;
        right: 0;
        top: 2%;
        padding: 9px 10px;
    }
    .card-ops {
        width: 54%;
        left: 0;
        top: 46%;
        padding: 9px 10px;
    }
    .card-title { font-size: 11px; margin-bottom: 6px; }
    .spark { width: 58px; height: 34px; }
    .metric-list li { font-size: 8px; }
    .dash-cell { padding: 5px; }
    .dash-cell.bars { min-height: 26px; }

    .strip-inner { justify-content: center; gap: 22px; padding: 22px var(--gutter); }
    .client-logo { opacity: 0.6; }

    .footer-features { flex-direction: column; align-items: flex-start; gap: 12px; }
}

/* 减少动效偏好 */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
    html { scroll-behavior: auto; }
}
