/* ============================================================================
   静境智能声学科技 · GEO AI 官网 全局样式
   ============================================================================
   品牌色：$brand = #1b66f5（与后端 BRAND_COLOR 常量一致）
   设计语言：清爽科技蓝 + 大量留白 + 圆角卡片；响应式（移动端优先）。
   ============================================================================ */

:root {
    --brand: #1b66f5;
    --brand-dark: #1450c4;
    --brand-light: #eaf1ff;
    --ink: #1f2937;
    --ink-soft: #4b5563;
    --ink-faint: #6b7280;
    --line: #e5e7eb;
    --bg: #ffffff;
    --bg-alt: #f7f9fc;
    --success: #16a34a;
    --amber: #d97706;
    --radius: 14px;
    --shadow: 0 6px 24px rgba(27, 102, 245, 0.08);
    --shadow-lg: 0 16px 48px rgba(27, 102, 245, 0.14);
}

* { box-sizing: border-box; }

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

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    color: var(--ink);
    background: var(--bg);
    line-height: 1.7;
    font-size: 16px;
}

a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-dark); }
h1, h2, h3, h4 { line-height: 1.3; margin: 0 0 0.5em; font-weight: 700; }
h1 { font-size: 2.2rem; }
h2 { font-size: 1.6rem; }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }

.container { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.container-narrow { max-width: 820px; }
.center { text-align: center; }

/* ----------------------------------------------------------------------------
   按钮
   -------------------------------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 22px;
    border-radius: 10px;
    border: 1px solid transparent;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all .18s ease;
    text-decoration: none;
    white-space: nowrap;
}
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); color: #fff; }
.btn-ghost { background: transparent; color: var(--brand); border-color: var(--brand); }
.btn-ghost:hover { background: var(--brand-light); color: var(--brand-dark); }
.btn-lg { padding: 14px 30px; font-size: 16px; }
.btn-block { width: 100%; }

/* ----------------------------------------------------------------------------
   头部导航
   -------------------------------------------------------------------------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 700; font-size: 18px; }
.brand-logo { width: 34px; height: 34px; border-radius: 8px; }
.main-nav { display: flex; align-items: center; gap: 4px; }
.nav-link { padding: 8px 13px; border-radius: 8px; color: var(--ink-soft); font-size: 15px; }
.nav-link:hover { color: var(--brand); background: var(--brand-light); }
.nav-link.active { color: var(--brand); font-weight: 600; }
.nav-cta { margin-left: 10px; }
.nav-toggle { display: none; background: none; border: none; font-size: 24px; cursor: pointer; color: var(--ink); }

/* ----------------------------------------------------------------------------
   Hero 首屏
   -------------------------------------------------------------------------- */
.hero {
    background: linear-gradient(160deg, #eef4ff 0%, #ffffff 60%);
    padding: 72px 0 80px;
    overflow: hidden;
}
.hero-inner { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: center; }
.hero-badge {
    display: inline-block;
    background: var(--brand-light);
    color: var(--brand);
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 18px;
}
.hero h1 { font-size: 2.9rem; margin-bottom: 0.4em; }
.hero-sub { font-size: 1.15rem; color: var(--ink-soft); max-width: 560px; }
.hero-actions { display: flex; gap: 14px; margin: 26px 0 34px; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 36px; }
.stat strong { display: block; font-size: 1.7rem; color: var(--brand); }
.stat span { color: var(--ink-faint); font-size: 13px; }

.hero-visual { position: relative; height: 320px; }
.hero-wave {
    position: absolute; inset: 20% 5% 5%; border-radius: 24px;
    background: radial-gradient(circle at 50% 50%, var(--brand-light), transparent 70%);
}
.hero-beam {
    position: absolute; top: 40%; left: 50%; height: 6px; border-radius: 999px;
    background: linear-gradient(90deg, var(--brand), transparent);
    transform-origin: left center; opacity: .5;
}
.hero-beam-1 { width: 120px; transform: rotate(-18deg); }
.hero-beam-2 { width: 150px; transform: rotate(0deg); }
.hero-beam-3 { width: 120px; transform: rotate(18deg); }
.hero-speaker { position: absolute; top: 30%; left: 46%; font-size: 64px; }

/* ----------------------------------------------------------------------------
   区块与卡片
   -------------------------------------------------------------------------- */
.section { padding: 72px 0; }
.section-alt { background: var(--bg-alt); }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 44px; }
.section-head p { color: var(--ink-faint); }

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

.card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 26px;
    box-shadow: var(--shadow);
    transition: transform .18s ease, box-shadow .18s ease;
    color: var(--ink);
}
.card-link { display: block; }
.card-link:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); color: var(--ink); }
.card-icon { font-size: 30px; margin-bottom: 12px; }
.card-spec { display: inline-block; margin-top: 10px; font-size: 13px; color: var(--brand); font-weight: 600; }
.card p { color: var(--ink-soft); font-size: 15px; }

.case-card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.case-icon { font-size: 26px; }
.case-meta { color: var(--ink-faint); font-size: 13px; margin-top: 12px; }

.tag { display: inline-block; background: var(--brand-light); color: var(--brand); padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.tag-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }

/* ----------------------------------------------------------------------------
   CTA 区块
   -------------------------------------------------------------------------- */
.cta { background: linear-gradient(135deg, var(--brand), var(--brand-dark)); color: #fff; padding: 64px 0; }
.cta-inner { text-align: center; }
.cta-inner h2 { font-size: 2rem; }
.cta-inner p { opacity: .9; }
.cta .btn-primary { background: #fff; color: var(--brand); }
.cta .btn-primary:hover { background: var(--brand-light); }

/* ----------------------------------------------------------------------------
   页面 hero（子页面首屏）
   -------------------------------------------------------------------------- */
.page-hero { background: linear-gradient(160deg, #eef4ff 0%, #ffffff 70%); padding: 64px 0 56px; }
.page-hero h1 { font-size: 2.4rem; }
.page-hero p { color: var(--ink-soft); font-size: 1.1rem; max-width: 680px; }
.page-hero-sm { padding: 48px 0 40px; }
.page-hero .tag { margin-bottom: 14px; }
.case-client { color: var(--ink-faint) !important; font-size: 15px !important; }
.spec-pill { display: inline-block; margin-top: 16px; background: #fff; border: 1px solid var(--line); padding: 8px 16px; border-radius: 999px; color: var(--brand); font-weight: 600; }

/* ----------------------------------------------------------------------------
   正文排版（prose）
   -------------------------------------------------------------------------- */
.prose h2 { margin: 1.6em 0 0.6em; font-size: 1.35rem; }
.prose h3 { margin: 1.3em 0 0.5em; }
.prose p { color: var(--ink-soft); }
.prose ul { padding-left: 1.4em; color: var(--ink-soft); }
.prose li { margin: 0.3em 0; }
.prose blockquote {
    margin: 1.5em 0; padding: 16px 20px;
    background: var(--brand-light); border-left: 4px solid var(--brand);
    border-radius: 8px; color: var(--ink); font-size: 1.05rem;
}
.article-body { font-size: 16.5px; }
.article-tags { margin-top: 28px; }
.case-source { color: var(--ink-faint); font-size: 13px; margin-top: 24px; }
.post-byline { color: var(--ink-faint) !important; font-size: 14px !important; }
.error-code { font-size: 5rem; color: var(--brand); }

/* ----------------------------------------------------------------------------
   列表类（check-list / timeline / spec-box / contact）
   -------------------------------------------------------------------------- */
.check-list { list-style: none; padding: 0; }
.check-list li { padding: 8px 0 8px 30px; position: relative; color: var(--ink-soft); }
.check-list li::before { content: "✓"; position: absolute; left: 0; color: var(--success); font-weight: 700; }

.timeline { position: relative; padding-left: 24px; border-left: 2px solid var(--line); }
.timeline-item { margin-bottom: 24px; position: relative; }
.timeline-item::before { content: ""; position: absolute; left: -31px; top: 6px; width: 12px; height: 12px; border-radius: 50%; background: var(--brand); }
.timeline-year { font-weight: 700; color: var(--brand); margin-bottom: 4px; }
.timeline-body { color: var(--ink-soft); }

.spec-box { margin-top: 22px; background: var(--bg-alt); border-radius: var(--radius); padding: 18px; }
.spec-box > div { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--line); }
.spec-box > div:last-child { border-bottom: none; }
.spec-box span { color: var(--ink-faint); }

.contact-item { display: flex; justify-content: space-between; align-items: center; padding: 16px 0; border-bottom: 1px solid var(--line); }
.contact-item span { color: var(--ink-faint); }
.contact-item strong { color: var(--ink); }
.contact-note { color: var(--ink-soft); margin-top: 20px; font-size: 14px; }

/* ----------------------------------------------------------------------------
   筛选栏
   -------------------------------------------------------------------------- */
.filter-bar { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 32px; }
.filter-chip { padding: 7px 16px; border-radius: 999px; border: 1px solid var(--line); color: var(--ink-soft); font-size: 14px; }
.filter-chip:hover { border-color: var(--brand); color: var(--brand); }
.filter-chip.active { background: var(--brand); border-color: var(--brand); color: #fff; }

/* ----------------------------------------------------------------------------
   文章卡片
   -------------------------------------------------------------------------- */
.post-card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.post-date { color: var(--ink-faint); font-size: 13px; }
.post-author { color: var(--ink-faint); font-size: 13px; margin-top: 12px; }

/* ----------------------------------------------------------------------------
   FAQ
   -------------------------------------------------------------------------- */
.faq-list { display: flex; flex-direction: column; gap: 14px; }
.faq-item { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.faq-item summary { cursor: pointer; padding: 18px 22px; font-weight: 600; list-style: none; position: relative; }
.faq-item summary::after { content: "+"; position: absolute; right: 22px; color: var(--brand); font-size: 20px; }
.faq-item[open] summary::after { content: "−"; }
.faq-answer { padding: 0 22px 20px; color: var(--ink-soft); }

/* ----------------------------------------------------------------------------
   留资表单
   -------------------------------------------------------------------------- */
.lead-form-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); }
.lead-form-card h3 { margin-bottom: 4px; }
.lead-form-sub { color: var(--ink-faint); font-size: 14px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-field { margin-bottom: 16px; }
.form-field label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; color: var(--ink-soft); }
.form-field .req { color: #dc2626; }
.form-field input, .form-field select, .form-field textarea {
    width: 100%; padding: 11px 14px; border: 1px solid var(--line); border-radius: 9px;
    font-size: 15px; font-family: inherit; color: var(--ink); background: #fff;
}
.form-field input:focus, .form-field select:focus, .form-field textarea:focus {
    outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-light);
}
.form-tip { color: var(--ink-faint); font-size: 12px; margin-top: 10px; text-align: center; }
.form-tip.success { color: var(--success); }

/* ----------------------------------------------------------------------------
   客服挂件
   -------------------------------------------------------------------------- */
.chat-widget { position: fixed; right: 24px; bottom: 24px; z-index: 999; }
.chat-launcher {
    display: flex; align-items: center; gap: 8px; padding: 14px 20px;
    background: var(--brand); color: #fff; border: none; border-radius: 999px;
    font-size: 15px; font-weight: 600; cursor: pointer; box-shadow: var(--shadow-lg);
}
.chat-launcher:hover { background: var(--brand-dark); }
.chat-launcher-icon { font-size: 20px; }

.chat-panel {
    position: absolute; right: 0; bottom: 68px; width: 360px; max-width: calc(100vw - 40px);
    background: #fff; border-radius: 18px; box-shadow: var(--shadow-lg); overflow: hidden;
    display: flex; flex-direction: column; max-height: 70vh;
}
.chat-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; background: var(--brand); color: #fff; }
.chat-head-title { display: flex; align-items: center; gap: 10px; }
.chat-avatar { font-size: 24px; }
.chat-name { font-weight: 700; }
.chat-status { font-size: 12px; opacity: .85; }
.chat-close { background: none; border: none; color: #fff; font-size: 24px; cursor: pointer; }
.chat-body { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.chat-msg { padding: 10px 14px; border-radius: 14px; font-size: 14px; max-width: 85%; line-height: 1.6; }
.chat-msg-bot { background: var(--bg-alt); color: var(--ink); align-self: flex-start; border-bottom-left-radius: 4px; }
.chat-msg-user { background: var(--brand); color: #fff; align-self: flex-end; border-bottom-right-radius: 4px; }
.chat-suggest { display: flex; gap: 8px; flex-wrap: wrap; padding: 0 16px 10px; }
.chat-suggest-btn { background: var(--brand-light); color: var(--brand); border: none; border-radius: 999px; padding: 6px 12px; font-size: 12px; cursor: pointer; }
.chat-input { display: flex; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--line); }
.chat-input input { flex: 1; padding: 11px 14px; border: 1px solid var(--line); border-radius: 999px; font-size: 14px; }
.chat-input input:focus { outline: none; border-color: var(--brand); }

/* ----------------------------------------------------------------------------
   响应式
   -------------------------------------------------------------------------- */
@media (max-width: 900px) {
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
    .hero-inner { grid-template-columns: 1fr; }
    .hero-visual { display: none; }
    .hero h1 { font-size: 2.2rem; }
    .form-row { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
    .grid-2, .grid-3 { grid-template-columns: 1fr; }
    .main-nav { display: none; position: absolute; top: 68px; left: 0; right: 0; background: #fff; flex-direction: column; padding: 16px; border-bottom: 1px solid var(--line); }
    .main-nav.open { display: flex; }
    .nav-toggle { display: block; }
    h1 { font-size: 1.8rem; }
    .hero-stats { gap: 20px; }
    .chat-panel { width: calc(100vw - 40px); }
}
