/* ============================================
   包松 · AI 搜索获客（GEO）— 全站样式
   移动优先 · 微信内置浏览器友好 · 纯静态
   ============================================ */

/* === Reset === */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body, h1, h2, h3, h4, p, ul, ol, li, figure, blockquote, dl, dd { margin: 0; padding: 0; }
ul, ol { list-style: none; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }

/* === 变量 === */
:root {
  --ink: #14202e;
  --ink-soft: #3d4f63;
  --ink-muted: #6b7c8f;
  --brand: #0f6fd6;
  --brand-dark: #0a56a8;
  --brand-soft: #e8f1fc;
  --line: #e2e8ef;
  --bg: #ffffff;
  --bg-soft: #f6f9fc;
  --radius: 10px;
  --shadow: 0 1px 3px rgba(20, 32, 46, .06), 0 8px 24px rgba(20, 32, 46, .05);
  --maxw: 960px;
}

/* === 基础 === */
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.75;
  font-size: 16px;
  overflow-x: hidden;
}

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

h1 { font-size: 1.75rem; line-height: 1.35; font-weight: 800; letter-spacing: -.01em; }
h2 { font-size: 1.35rem; line-height: 1.4; font-weight: 700; margin: 2.2em 0 .8em; }
h3 { font-size: 1.1rem; font-weight: 700; margin: 1.6em 0 .6em; }
p  { margin: 1em 0; color: var(--ink-soft); }
strong { color: var(--ink); font-weight: 700; }
a.underline { color: var(--brand); border-bottom: 1px solid rgba(15,111,214,.3); }
a.underline:hover { border-bottom-color: var(--brand); }

/* === Header / Nav === */
.site-header {
  background: rgba(255,255,255,.95);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: saturate(180%) blur(8px);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; height: 60px;
}
.brand { font-weight: 800; font-size: 1.02rem; color: var(--ink); white-space: nowrap; }
.brand span { color: var(--brand); }

.nav-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 8px;
  background: #fff; color: var(--ink);
}
.nav-toggle .bars { position: relative; width: 18px; height: 2px; background: currentColor; }
.nav-toggle .bars::before, .nav-toggle .bars::after {
  content: ""; position: absolute; left: 0; width: 18px; height: 2px; background: currentColor;
}
.nav-toggle .bars::before { top: -6px; }
.nav-toggle .bars::after { top: 6px; }

.site-nav { display: none; }
.site-nav.open {
  display: block; position: absolute; left: 0; right: 0; top: 60px;
  background: #fff; border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow); padding: 8px 20px 16px;
}
.site-nav ul { display: flex; flex-direction: column; }
.site-nav a { display: block; padding: 12px 4px; border-bottom: 1px solid var(--line); font-weight: 600; }
.site-nav a[aria-current="page"] { color: var(--brand); }

.cta-btn {
  display: inline-block; background: var(--brand); color: #fff !important;
  padding: 10px 18px; border-radius: 999px; font-weight: 700; font-size: .92rem;
  white-space: nowrap;
}
.cta-btn:hover { background: var(--brand-dark); }
.header-cta { display: none; }

/* === Hero === */
.hero {
  background: linear-gradient(160deg, #0f6fd6 0%, #0a4f9e 100%);
  color: #fff; padding: 48px 0 44px;
}
.hero h1 { color: #fff; font-size: 1.9rem; }
.hero .subtitle { color: rgba(255,255,255,.92); font-size: 1.02rem; margin: 14px 0 24px; font-weight: 500; }
.hero .kicker {
  display: inline-block; font-size: .8rem; letter-spacing: .08em;
  background: rgba(255,255,255,.16); color: #fff; padding: 5px 12px;
  border-radius: 999px; margin-bottom: 16px;
}
.hero .cta-btn { background: #fff; color: var(--brand) !important; }
.hero .cta-btn:hover { background: #eaf2fc; }

/* === Section === */
.section { padding: 44px 0; }
.section.soft { background: var(--bg-soft); }
.section-intro { color: var(--ink-muted); max-width: 62ch; }

/* === Cards === */
.grid { display: grid; gap: 16px; grid-template-columns: 1fr; }
.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; box-shadow: var(--shadow);
}
.card h3 { margin-top: 0; }
.card .num { color: var(--brand); font-weight: 800; font-size: .9rem; }

/* 信任锚点 */
.trust-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.trust-item { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; text-align: center; }
.trust-item .big { display: block; font-size: 1.5rem; font-weight: 800; color: var(--brand); }
.trust-item .small { font-size: .82rem; color: var(--ink-muted); }

/* === Article list === */
.article-card { display: block; }
.article-card h3 { margin: 0 0 6px; }
.article-card .meta { font-size: .8rem; color: var(--ink-muted); margin-bottom: 8px; }
.article-card .summary { color: var(--ink-soft); font-size: .94rem; margin: 0; }
.tag {
  display: inline-block; font-size: .74rem; background: var(--brand-soft);
  color: var(--brand-dark); padding: 2px 9px; border-radius: 999px; font-weight: 600;
}
.tag-primary { background: var(--brand); color: #fff; }
.tag-secondary { background: #fff; color: var(--ink-muted); border: 1px solid #d8dee6; }

/* === 文章主轴分组 === */
.article-group { margin-top: 30px; }
.article-group:first-of-type { margin-top: 24px; }
.article-group .group-title {
  margin: 0 0 4px; font-size: 1.02rem; color: var(--brand-dark);
  padding-bottom: 8px; border-bottom: 1px solid #e6ebf1;
}
.article-group[hidden] { display: none; }

/* === 双轴标签筛选（JS 增强，核心内容不依赖 JS） === */
.tag-filter-group { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px; margin: 6px 0; }
.tag-filter-label {
  flex: 0 0 auto; font-size: .78rem; font-weight: 700; color: var(--ink-muted);
  min-width: 5.5em;
}
.tag-filter-bar { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 4px; }
.tag-filter {
  appearance: none; -webkit-appearance: none; border: 1px solid transparent;
  background: var(--brand-soft); color: var(--brand-dark); cursor: pointer;
  font: inherit; font-size: .78rem; line-height: 1.4;
}
.tag-filter:hover { border-color: var(--brand); }
.tag-filter:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.tag-filter.is-active { background: var(--brand); color: #fff; border-color: var(--brand); }
.tag-filter-hint { font-size: .78rem; color: var(--ink-muted); margin: 8px 0 0; }
.article-card[hidden] { display: none; }

/* === Article detail === */
.article-body { max-width: 68ch; }
.article-body h2 { margin-top: 1.9em; padding-top: .2em; }
.article-body ul, .article-body ol { margin: 1em 0; padding-left: 1.4em; }
.article-body ul { list-style: disc; }
.article-body ol { list-style: decimal; }
.article-body li { margin: .4em 0; color: var(--ink-soft); }
.article-meta { color: var(--ink-muted); font-size: .86rem; border-bottom: 1px solid var(--line); padding-bottom: 14px; margin-bottom: 22px; }
.article-summary {
  background: var(--brand-soft); border-left: 4px solid var(--brand);
  padding: 14px 18px; border-radius: 0 8px 8px 0; margin: 20px 0;
}
.article-summary p { margin: 0; color: var(--ink); }

/* === FAQ === */
.faq-item { border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; background: #fff; margin-bottom: 12px; }
.faq-item h3 { margin: 0 0 8px; font-size: 1.02rem; }
.faq-item p { margin: 0; }

/* === Author card === */
.author-card {
  display: flex; gap: 14px; align-items: flex-start;
  background: var(--bg-soft); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px; margin: 32px 0 0;
}
.author-avatar {
  flex: 0 0 auto; width: 52px; height: 52px; border-radius: 50%;
  background: var(--brand); color: #fff; display: flex; align-items: center;
  justify-content: center; font-weight: 800; font-size: 1.1rem;
}
.author-card .who { font-weight: 700; }
.author-card p { margin: 4px 0 0; font-size: .88rem; }

/* === CTA band === */
.cta-band { background: var(--ink); color: #fff; border-radius: var(--radius); padding: 28px 24px; text-align: center; }
.cta-band h2 { color: #fff; margin: 0 0 8px; }
.cta-band p { color: rgba(255,255,255,.8); margin: 0 0 18px; }

/* === QR === */
.qr-box { text-align: center; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; max-width: 340px; margin: 0 auto; }
.qr-box img { width: 220px; height: auto; margin: 0 auto 12px; border-radius: 8px; }
.qr-note { font-size: .8rem; color: var(--ink-muted); }

/* === Breadcrumb === */
.breadcrumb { font-size: .84rem; color: var(--ink-muted); padding: 16px 0 0; }
.breadcrumb a { color: var(--brand); }
.breadcrumb span { margin: 0 6px; }

/* === Footer === */
.site-footer { background: var(--bg-soft); border-top: 1px solid var(--line); padding: 32px 0; margin-top: 40px; color: var(--ink-muted); font-size: .88rem; }
.site-footer p { margin: 6px 0; color: var(--ink-muted); }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 12px; }
.footer-links a { color: var(--brand); }

/* === 移动端底部固定 CTA === */
.mobile-cta {
  position: fixed; left: 0; right: 0; bottom: 0; padding: 10px 16px;
  background: rgba(255,255,255,.96); border-top: 1px solid var(--line);
  backdrop-filter: blur(8px); z-index: 40;
}
.mobile-cta .cta-btn { display: block; width: 100%; text-align: center; }
body { padding-bottom: 64px; }

/* === 桌面端 === */
@media (min-width: 768px) {
  h1 { font-size: 2.2rem; }
  .hero { padding: 72px 0 64px; }
  .hero h1 { font-size: 2.6rem; }
  .hero .subtitle { font-size: 1.16rem; }
  .section { padding: 60px 0; }
  .grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
  .grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
  .trust-row { grid-template-columns: repeat(4, 1fr); }

  .nav-toggle { display: none; }
  .site-nav { display: block; position: static !important; }
  .site-nav ul { flex-direction: row; gap: 4px; }
  .site-nav a { border-bottom: none; padding: 8px 12px; border-radius: 8px; font-size: .92rem; }
  .site-nav a:hover { background: var(--bg-soft); }
  .header-cta { display: inline-block; }
  .mobile-cta { display: none; }
  body { padding-bottom: 0; }
}

@media (min-width: 1024px) {
  h1 { font-size: 2.4rem; }
  .hero h1 { font-size: 3rem; }
}
