/* 房服助手官网 · 全站样式（无框架依赖）
   设计目标：轻量、可读、AI 友好（清晰层级 / 大字号正文 / 语义化结构） */

:root {
  --brand: #2563eb;
  --brand-light: #eff4ff;
  --brand-dark: #1d4ed8;
  --text-1: #111827;
  --text-2: #374151;
  --text-3: #6b7280;
  --text-4: #9ca3af;
  --line: #e5e7eb;
  --bg: #f7f8fa;
  --card: #ffffff;
  --radius: 14px;
  --shadow: 0 1px 3px rgba(17, 24, 39, .06), 0 8px 24px rgba(17, 24, 39, .04);
  --max: 1120px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --text-1: #f3f4f6;
    --text-2: #d1d5db;
    --text-3: #9ca3af;
    --text-4: #6b7280;
    --line: #2d3340;
    --bg: #0f1115;
    --card: #171a21;
    --brand-light: #17233c;
    --shadow: 0 1px 3px rgba(0, 0, 0, .4);
  }
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.75;
  color: var(--text-2);
  background: var(--bg);
}

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

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

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

/* ============ 顶部导航 ============ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}

@media (prefers-color-scheme: dark) {
  .site-header { background: rgba(15, 17, 21, .92); }
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: 14px;
  height: 60px;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-1);
  font-weight: 700;
  font-size: 17px;
  text-decoration: none;
}

.site-logo img { width: 30px; height: 30px; border-radius: 8px; }

.site-nav {
  display: flex;
  gap: 18px;
  margin-left: auto;
  font-size: 15px;
}

.site-nav a { color: var(--text-2); }
.site-nav a:hover { color: var(--brand); }

@media (max-width: 640px) {
  .site-nav { display: none; }
}

/* ============ 通用区块 ============ */
.section { padding: 48px 0; }
.section--tight { padding: 28px 0; }

.section-head { margin-bottom: 24px; }

.section-head h2 {
  margin: 0 0 6px;
  font-size: 26px;
  color: var(--text-1);
  letter-spacing: -.3px;
}

.section-head p { margin: 0; color: var(--text-3); font-size: 15px; }

/* ============ 首屏 ============ */
.hero {
  background: linear-gradient(135deg, #2563eb 0%, #3b82f6 55%, #60a5fa 100%);
  color: #fff;
  padding: 64px 0 56px;
  border-radius: 0 0 28px 28px;
}

.hero h1 {
  margin: 0 0 14px;
  font-size: 38px;
  line-height: 1.25;
  letter-spacing: -1px;
}

.hero p {
  margin: 0 0 24px;
  font-size: 17px;
  color: rgba(255, 255, 255, .92);
  max-width: 640px;
}

.hero__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 28px;
}

.hero__badge {
  font-size: 13px;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .18);
  border: 1px solid rgba(255, 255, 255, .3);
}

.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; }

@media (max-width: 640px) {
  .hero { padding: 44px 0 40px; }
  .hero h1 { font-size: 28px; }
  .hero p { font-size: 15px; }
}

/* ============ 按钮 ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 46px;
  padding: 0 22px;
  border: 0;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
  text-decoration: none;
}

.btn:hover { transform: translateY(-1px); text-decoration: none; }

.btn--primary { background: #fff; color: var(--brand); box-shadow: 0 6px 18px rgba(0, 0, 0, .16); }
.btn--ghost { background: rgba(255, 255, 255, .16); color: #fff; border: 1px solid rgba(255, 255, 255, .45); }
.btn--solid { background: var(--brand); color: #fff; box-shadow: 0 6px 18px rgba(37, 99, 235, .28); }
.btn--sm { height: 38px; padding: 0 16px; font-size: 14px; }

/* ============ 卡片网格 ============ */
.grid { display: grid; gap: 16px; }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 900px) {
  .grid--3, .grid--4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; }
}

.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
}

.card--link { display: block; color: inherit; transition: transform .14s ease, box-shadow .14s ease; }
.card--link:hover { transform: translateY(-2px); text-decoration: none; box-shadow: 0 2px 6px rgba(17,24,39,.08), 0 14px 32px rgba(17,24,39,.08); }

.card h3 { margin: 0 0 6px; font-size: 17px; color: var(--text-1); }
.card p { margin: 0; font-size: 14px; color: var(--text-3); }

.tool-card__top { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.tool-card__icon { width: 38px; height: 38px; border-radius: 11px; background: var(--brand-light); color: var(--brand); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 15px; flex-shrink: 0; }
.tool-card__tag { margin-left: auto; font-size: 12px; color: var(--text-3); background: var(--bg); border-radius: 6px; padding: 2px 8px; }

/* ============ 场景卡 ============ */
.scene-card { border-radius: var(--radius); padding: 24px; color: #fff; display: block; text-decoration: none; }
.scene-card:hover { text-decoration: none; opacity: .94; }
.scene-card--buy { background: linear-gradient(135deg, #2563eb, #3b82f6); }
.scene-card--sell { background: linear-gradient(135deg, #dc2626, #ef4444); }
.scene-card--exchange { background: linear-gradient(135deg, #b45309, #f59e0b); }
.scene-card--decorate { background: linear-gradient(135deg, #047857, #10b981); }
.scene-card h3 { margin: 0 0 6px; font-size: 20px; color: #fff; }
.scene-card p { margin: 0; font-size: 14px; color: rgba(255,255,255,.9); }

/* ============ 内容排版（文章 / 详情页） ============ */
.prose { max-width: 820px; }
.prose h2 { margin: 36px 0 14px; font-size: 22px; color: var(--text-1); }
.prose h3 { margin: 26px 0 10px; font-size: 18px; color: var(--text-1); }
.prose p { margin: 0 0 14px; }
.prose ul, .prose ol { margin: 0 0 16px; padding-left: 22px; }
.prose li { margin-bottom: 8px; }
.prose strong { color: var(--text-1); }

.breadcrumb { font-size: 13px; color: var(--text-3); margin-bottom: 16px; }
.breadcrumb a { color: var(--text-3); }

.page-head { padding: 32px 0 8px; }
.page-head h1 { margin: 0 0 10px; font-size: 30px; color: var(--text-1); letter-spacing: -.5px; line-height: 1.3; }
.page-head .lead { margin: 0; font-size: 16px; color: var(--text-3); max-width: 760px; }

/* 要点框：便于 AI 摘录一句话结论 */
.callout {
  background: var(--brand-light);
  border-left: 4px solid var(--brand);
  border-radius: 10px;
  padding: 16px 18px;
  margin: 20px 0;
}
.callout strong { color: var(--text-1); }
.callout p:last-child { margin-bottom: 0; }

/* 表格 */
.table-wrap { overflow-x: auto; margin: 16px 0 22px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); }
th { background: var(--bg); color: var(--text-1); font-weight: 600; white-space: nowrap; }
td { color: var(--text-2); }

/* 定义列表（术语） */
.term-list dt { font-weight: 700; color: var(--text-1); margin-top: 18px; }
.term-list dd { margin: 6px 0 0; }

/* FAQ */
.faq-item { border-bottom: 1px solid var(--line); padding: 16px 0; }
.faq-item:last-child { border-bottom: 0; }
.faq-item h3 { margin: 0 0 8px; font-size: 16px; color: var(--text-1); }
.faq-item p { margin: 0; font-size: 15px; color: var(--text-2); }

/* ============ 底部 CTA ============ */
.cta {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 28px;
  display: flex;
  align-items: center;
  gap: 28px;
  box-shadow: var(--shadow);
  margin: 32px 0;
}

.cta__qr { width: 132px; height: 132px; border-radius: 14px; flex-shrink: 0; }

.cta__body h2 { margin: 0 0 8px; font-size: 21px; color: var(--text-1); }
.cta__body p { margin: 0 0 14px; font-size: 15px; color: var(--text-3); }

@media (max-width: 640px) {
  .cta { flex-direction: column; align-items: flex-start; gap: 16px; padding: 22px; }
}

/* ============ 页脚 ============ */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 32px 0 40px;
  font-size: 13px;
  color: var(--text-3);
  margin-top: 24px;
}

.site-footer__inner { display: flex; flex-wrap: wrap; gap: 16px 28px; align-items: center; }
.site-footer a { color: var(--text-3); }
.site-footer__copy { margin-left: auto; }

/* ============ 小程序码弹窗 ============ */
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal.is-open { display: flex; }

.modal__mask {
  position: absolute;
  inset: 0;
  background: rgba(17, 24, 39, .55);
  backdrop-filter: blur(2px);
}

.modal__panel {
  position: relative;
  background: var(--card);
  border-radius: 20px;
  padding: 30px 26px 26px;
  width: 100%;
  max-width: 360px;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .28);
  animation: pop .18s ease-out;
}

@keyframes pop {
  from { transform: scale(.94); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.modal__close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: var(--bg);
  color: var(--text-3);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.modal__logo { width: 46px; height: 46px; border-radius: 12px; margin: 0 auto 10px; }
.modal__qr { width: 200px; height: 200px; border-radius: 14px; margin: 0 auto 14px; border: 1px solid var(--line); }
.modal h2 { margin: 0 0 6px; font-size: 19px; color: var(--text-1); }
.modal p { margin: 0; font-size: 14px; color: var(--text-3); }
.modal__hint { margin-top: 10px !important; font-size: 13px; color: var(--text-4); }

/* 屏幕阅读器专用 */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* 标签 chips */
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 20px; }
.chip {
  font-size: 14px;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--text-2);
  cursor: pointer;
  font-family: inherit;
}
.chip.is-active { background: var(--brand); border-color: var(--brand); color: #fff; }
