/* ============================================================
   家事小匣 · 官网样式
   设计系统 Token（与小程序保持一致：暖奶油 + 珊瑚）
   页底 #FBF8F3 ｜ 卡片 #FFFFFF ｜ 墨字 #2B2A28 ｜ 弱字 #8C857B
   主色珊瑚 #E8745B（hover #D9654D / active #C55843 / soft #FCE9E3）
   语义：充足 #7BA88F ｜ 预警 #E8A33D ｜ 危险 #D9534F ｜ 线 #ECE6DC
   ============================================================ */

:root {
  /* 背景 */
  --bg: #FBF8F3;
  --bg-card: #FFFFFF;
  --bg-soft: #F7F2EA;
  --primary-soft: #FCE9E3;

  /* 文字 */
  --text: #2B2A28;
  --text-muted: #8C857B;

  /* 主色 */
  --primary: #E8745B;
  --primary-hover: #D9654D;
  --primary-active: #C55843;

  /* 语义 */
  --success: #7BA88F;
  --warn: #E8A33D;
  --danger: #D9534F;
  --line: #ECE6DC;

  /* 圆角 / 阴影 */
  --radius-card: 12px;
  --radius-btn: 999px;
  --shadow-card: 0 4px 16px rgba(43, 42, 40, .05);
  --shadow-primary: 0 6px 16px rgba(232, 116, 91, .28);
  --shadow-hover: 0 10px 30px rgba(43, 42, 40, .10);

  /* 尺寸 */
  --nav-h: 64px;
  --max-w: 1120px;
  --pad-x: 24px;
}

/* ===== 基础重置 ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", Helvetica, "Segoe UI", "Microsoft YaHei", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--primary); text-decoration: none; transition: color .15s; }
a:hover { color: var(--primary-hover); }

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

ul { list-style: none; }

/* ===== 布局容器 ===== */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--pad-x);
}

.section { padding: 80px 0; }
.section-sm { padding: 56px 0; }

/* ===== 导航栏 ===== */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(251, 248, 243, .88);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}

.nav-inner {
  height: var(--nav-h);
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--pad-x);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 19px;
  font-weight: 700;
  color: var(--text);
}
.nav-logo:hover { color: var(--primary); }
.nav-logo img { width: 34px; height: 34px; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav-links a {
  padding: 8px 14px;
  border-radius: var(--radius-btn);
  font-size: 15px;
  color: var(--text-muted);
  transition: all .15s;
}
.nav-links a:hover { color: var(--primary); background: var(--primary-soft); }
.nav-links a.active { color: var(--primary); background: var(--primary-soft); font-weight: 500; }

/* 汉堡菜单按钮（移动端） */
.nav-toggle {
  display: none;
  width: 40px; height: 40px;
  border: none;
  background: transparent;
  cursor: pointer;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
}
.nav-toggle span {
  width: 22px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all .25s;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ===== 按钮 ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 30px;
  border-radius: var(--radius-btn);
  font-size: 16px;
  font-weight: 500;
  border: none;
  cursor: pointer;
  transition: all .15s ease;
  white-space: nowrap;
}
.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: var(--shadow-primary);
}
.btn-primary:hover { background: var(--primary-hover); color: #fff; transform: translateY(-1px); }
.btn-ghost {
  background: #fff;
  color: var(--text);
  border: 1px solid var(--line);
}
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); }

/* ===== 卡片 ===== */
.card {
  background: var(--bg-card);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 28px;
  transition: all .2s ease;
}
.card:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); }

/* ===== Hero 区 ===== */
.hero {
  padding: 72px 0 56px;
  position: relative;
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 56px;
  align-items: center;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 14px;
  padding: 6px 16px;
  border-radius: var(--radius-btn);
  font-weight: 500;
  margin-bottom: 24px;
}
.hero h1 {
  font-size: clamp(34px, 5vw, 52px);
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -.5px;
  margin-bottom: 20px;
}
.hero .hero-sub {
  font-size: clamp(17px, 2vw, 21px);
  color: var(--text-muted);
  margin-bottom: 16px;
  font-weight: 500;
}
.hero .hero-desc {
  font-size: 16px;
  color: var(--text-muted);
  margin-bottom: 32px;
  max-width: 480px;
}
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }

/* Hero 右侧：小程序码卡片 */
.qr-card {
  background: var(--bg-card);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-hover);
  padding: 28px;
  text-align: center;
}
.qr-card .qr-img-wrap {
  width: 200px; height: 200px;
  margin: 0 auto 18px;
  border-radius: 16px;
  background: var(--bg-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid var(--line);
}
.qr-card .qr-img-wrap img { width: 100%; height: 100%; object-fit: contain; }
.qr-card .qr-placeholder {
  width: 100%; height: 100%;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 13px;
}
.qr-card .qr-placeholder .qr-icon { font-size: 40px; opacity: .4; }
.qr-card .qr-title { font-size: 15px; font-weight: 600; margin-bottom: 4px; }
.qr-card .qr-tip { font-size: 13px; color: var(--text-muted); }

/* ===== 区块标题 ===== */
.section-head { text-align: center; margin-bottom: 48px; }
.section-head .eyebrow {
  display: inline-block;
  font-size: 14px;
  font-weight: 600;
  color: var(--primary);
  background: var(--primary-soft);
  padding: 4px 14px;
  border-radius: var(--radius-btn);
  margin-bottom: 14px;
}
.section-head h2 {
  font-size: clamp(26px, 3.4vw, 36px);
  font-weight: 800;
  letter-spacing: -.3px;
  margin-bottom: 12px;
}
.section-head p {
  font-size: 16px;
  color: var(--text-muted);
  max-width: 580px;
  margin: 0 auto;
}

/* ===== 痛点区 ===== */
.pains {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.pain-item {
  background: var(--bg-card);
  border-radius: var(--radius-card);
  padding: 28px 24px;
  text-align: center;
  border: 1px solid var(--line);
}
.pain-item .pain-q {
  font-size: 24px;
  margin-bottom: 10px;
}
.pain-item p { color: var(--text-muted); font-size: 15px; }

/* ===== 功能特性网格 ===== */
.features {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.feature-card {
  background: var(--bg-card);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 28px 24px;
  transition: all .2s;
}
.feature-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-3px); }
.feature-card .feature-icon {
  width: 52px; height: 52px;
  border-radius: 14px;
  background: var(--primary-soft);
  display: flex; align-items: center; justify-content: center;
  font-size: 26px;
  margin-bottom: 18px;
}
.feature-card h3 { font-size: 18px; font-weight: 700; margin-bottom: 10px; }
.feature-card p { font-size: 14px; color: var(--text-muted); line-height: 1.65; }

/* ===== 场景展示 ===== */
.scenes {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.scene-card {
  background: var(--bg-card);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 24px;
  text-align: center;
  transition: all .2s;
}
.scene-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-3px); }
.scene-card .scene-ring {
  width: 88px; height: 88px;
  margin: 0 auto 16px;
  position: relative;
}
.scene-card h3 { font-size: 16px; font-weight: 600; margin-bottom: 6px; }
.scene-card .scene-remain { font-size: 13px; color: var(--text-muted); }
.scene-card .scene-remain .num { color: var(--success); font-weight: 700; font-size: 15px; }
.scene-card .scene-remain .num.warn { color: var(--warn); }

/* 环形进度条（SVG） */
.ring-svg { transform: rotate(-90deg); }
.ring-bg { stroke: var(--line); }
.ring-fg { stroke: var(--primary); stroke-linecap: round; transition: stroke-dashoffset .6s; }
.ring-fg.warn { stroke: var(--warn); }
.ring-fg.danger { stroke: var(--danger); }
.ring-center {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  font-size: 13px; font-weight: 700; color: var(--text);
}

/* ===== 步骤区 ===== */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.step-card { text-align: center; padding: 12px; }
.step-card .step-num {
  width: 48px; height: 48px;
  margin: 0 auto 18px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 20px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-primary);
}
.step-card h3 { font-size: 18px; font-weight: 700; margin-bottom: 10px; }
.step-card p { font-size: 14px; color: var(--text-muted); }

/* ===== 底部 CTA ===== */
.cta-banner {
  background: linear-gradient(135deg, var(--primary) 0%, #F08E6F 100%);
  border-radius: 24px;
  padding: 56px 40px;
  text-align: center;
  color: #fff;
  box-shadow: var(--shadow-primary);
}
.cta-banner h2 { font-size: clamp(24px, 3vw, 32px); font-weight: 800; margin-bottom: 12px; }
.cta-banner p { font-size: 16px; opacity: .95; margin-bottom: 28px; }
.cta-banner .btn { background: #fff; color: var(--primary); }
.cta-banner .btn:hover { background: #fff; transform: translateY(-1px); opacity: .95; }

/* ===== 文章页（关于/隐私/协议通用） ===== */
.article {
  max-width: 800px;
  margin: 0 auto;
  padding: 56px 0 80px;
}
.article-head { margin-bottom: 36px; padding-bottom: 24px; border-bottom: 1px solid var(--line); }
.article-head h1 { font-size: clamp(26px, 3.5vw, 36px); font-weight: 800; margin-bottom: 10px; }
.article-head .meta { font-size: 14px; color: var(--text-muted); }
.article-head .meta .tag { color: var(--primary); font-weight: 600; }

.article-body h2 {
  font-size: 22px;
  font-weight: 700;
  margin: 36px 0 16px;
  padding-left: 12px;
  border-left: 4px solid var(--primary);
}
.article-body h3 { font-size: 18px; font-weight: 600; margin: 24px 0 12px; }
.article-body p { margin-bottom: 16px; color: var(--text); line-height: 1.8; }
.article-body ul { margin: 0 0 16px; padding-left: 20px; }
.article-body li { margin-bottom: 8px; line-height: 1.8; list-style: disc; color: var(--text); }
.article-body strong { color: var(--primary); font-weight: 600; }

/* 更新记录表 */
.timeline { margin-top: 24px; }
.timeline-item {
  display: flex;
  gap: 20px;
  padding: 20px 0;
  border-bottom: 1px dashed var(--line);
}
.timeline-item:last-child { border-bottom: none; }
.timeline-item .t-version {
  flex-shrink: 0;
  width: 64px;
  font-weight: 700;
  color: var(--primary);
}
.timeline-item .t-content h4 { font-size: 16px; margin-bottom: 6px; }
.timeline-item .t-content p { font-size: 14px; color: var(--text-muted); margin: 0; }

/* FAQ 折叠 */
.faq-item {
  background: var(--bg-card);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  margin-bottom: 14px;
  overflow: hidden;
}
.faq-q {
  width: 100%;
  text-align: left;
  padding: 20px 24px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.faq-q .faq-icon {
  flex-shrink: 0;
  font-size: 20px;
  color: var(--primary);
  transition: transform .2s;
}
.faq-item.open .faq-q .faq-icon { transform: rotate(45deg); }
.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height .25s ease;
  padding: 0 24px;
  color: var(--text-muted);
}
.faq-item.open .faq-a { max-height: 400px; padding-bottom: 20px; }

/* 联系卡片 */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-bottom: 48px;
}
.contact-card {
  background: var(--bg-card);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 32px;
  text-align: center;
}
.contact-card .c-icon {
  width: 56px; height: 56px;
  margin: 0 auto 18px;
  border-radius: 16px;
  background: var(--primary-soft);
  display: flex; align-items: center; justify-content: center;
  font-size: 26px;
}
.contact-card h3 { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.contact-card p { color: var(--text-muted); font-size: 14px; margin-bottom: 12px; }
.contact-card .c-value { font-size: 16px; color: var(--primary); font-weight: 600; word-break: break-all; }

/* ===== 页脚 ===== */
.footer {
  background: #2B2A28;
  color: rgba(255, 255, 255, .7);
  padding: 56px 0 28px;
  margin-top: 40px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}
.footer-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.footer-brand img { width: 32px; height: 32px; }
.footer-brand span { font-size: 18px; font-weight: 700; color: #fff; }
.footer-col p { font-size: 14px; line-height: 1.7; max-width: 280px; }
.footer-col h4 { font-size: 15px; font-weight: 600; color: #fff; margin-bottom: 16px; }
.footer-col ul li { margin-bottom: 10px; }
.footer-col ul a { font-size: 14px; color: rgba(255, 255, 255, .7); }
.footer-col ul a:hover { color: var(--primary); }

.footer-bottom {
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, .12);
  text-align: center;
  font-size: 13px;
  color: rgba(255, 255, 255, .5);
}
.footer-bottom .icp { margin: 0 8px; }
.footer-bottom a { color: rgba(255, 255, 255, .5); }
.footer-bottom a:hover { color: var(--primary); }

/* 占位符标记（提醒替换） */
.placeholder-note {
  display: inline-block;
  background: #FFF3CD;
  color: #856404;
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 6px;
  border: 1px dashed #E0A800;
}

/* ===== 响应式 ===== */
@media (max-width: 900px) {
  .features { grid-template-columns: repeat(2, 1fr); }
  .scenes { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
}

@media (max-width: 768px) {
  :root { --pad-x: 18px; }
  .section { padding: 56px 0; }

  /* 移动端导航折叠 */
  .nav-toggle { display: flex; }
  .nav-links {
    position: fixed;
    top: var(--nav-h);
    left: 0; right: 0;
    flex-direction: column;
    background: var(--bg);
    padding: 16px var(--pad-x) 24px;
    gap: 4px;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 8px 24px rgba(0, 0, 0, .06);
    transform: translateY(-120%);
    transition: transform .25s ease;
    max-height: calc(100vh - var(--nav-h));
    overflow-y: auto;
  }
  .nav-links.open { transform: translateY(0); }
  .nav-links a { width: 100%; padding: 12px 14px; }

  /* Hero 单列 */
  .hero-grid { grid-template-columns: 1fr; gap: 36px; text-align: center; }
  .hero-cta { justify-content: center; }
  .hero .hero-desc { margin-left: auto; margin-right: auto; }
  .qr-card { max-width: 280px; margin: 0 auto; }

  .pains { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; text-align: center; }
  .footer-col p { margin: 0 auto; }
  .footer-brand { justify-content: center; }

  .cta-banner { padding: 40px 24px; }
}

@media (max-width: 480px) {
  .features { grid-template-columns: 1fr; }
  .scenes { grid-template-columns: 1fr; }
  .timeline-item { flex-direction: column; gap: 6px; }
  .timeline-item .t-version { width: auto; }
}
