/* ==========================================================================
   MiniFamily 小家庭 — 官网设计系统
   来源：Ardot 设计稿《官网V4.1》(node 190:1)
   ========================================================================== */

:root {
  /* 品牌色板 */
  --cream: #FFF8EF;          /* 主背景 rgb(1, .973, .937) */
  --cream-soft: #FFF8F9;     /* 卡片浅底 rgb(1, .992, .976) */
  --ink: #3B2518;            /* 主标题深棕 rgb(.231,.145,.094) */
  --ink-deep: #2C1B10;       /* 深色板块背景（隐私区） */
  --muted: #706255;          /* 正文灰棕 rgb(.439,.388,.337) */
  --muted-soft: #D8C4B3;     /* 深底次要文字 rgb(.847,.769,.702) */
  --muted-softer: #C9B3A0;   /* 深底卡片正文 */
  --accent: #B5470E;         /* 强调橙棕 rgb(.71,.278,.086) */
  --accent-gold: #F0A868;    /* 数字/徽标金橙 */
  --white: #ffffff;

  --grad-cta-start: #FF8736;
  --grad-cta-end: #F55C14;

  --font-serif: "Noto Serif SC", "Songti SC", serif;
  --font-sans: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-en: "Nunito", var(--font-sans);

  --shadow-soft: 0 10px 24px -6px rgba(153, 97, 46, .10);
  --shadow-card: 0 20px 48px -8px rgba(153, 97, 46, .22);
  --shadow-deep: 0 24px 44px -8px rgba(153, 97, 46, .20);

  --container-max: 1280px;
  --pad-x: 80px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

.wrap {
  max-width: var(--container-max);
  margin: 0 auto;
  padding-left: var(--pad-x);
  padding-right: var(--pad-x);
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--cream);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px var(--pad-x);
  transition: box-shadow .25s ease;
}
.site-header.scrolled { box-shadow: 0 8px 24px -12px rgba(153,97,46,.28); }

.logo { display: flex; align-items: center; }
.logo-img { display: block; height: 36px; width: auto; }

.nav-panel { display: flex; align-items: center; gap: 28px; }
.nav { display: flex; align-items: center; gap: 36px; }
.nav a {
  font-size: 15px; font-weight: 500; color: var(--muted);
  transition: color .2s ease;
}
.nav a:hover, .nav a.active { color: var(--ink); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border-radius: 999px; font-weight: 600; white-space: nowrap;
  transition: transform .2s ease, box-shadow .2s ease, opacity .2s ease;
}
.btn:active { transform: scale(.97); }

.btn-primary {
  background: linear-gradient(90deg, var(--grad-cta-start), var(--grad-cta-end));
  color: #fff;
  padding: 17px 32px;
  font-size: 16px;
  box-shadow: var(--shadow-soft);
}
.btn-primary:hover { box-shadow: 0 14px 30px -6px rgba(197,80,15,.38); }

.btn-secondary {
  background: var(--cream-soft);
  color: var(--ink);
  border: 1px solid var(--ink);
  padding: 16px 31px;
  font-size: 16px;
}
.btn-secondary:hover { background: #fff; }

.btn-nav-cta {
  background: linear-gradient(90deg, var(--grad-cta-start), var(--grad-cta-end));
  color: #fff;
  padding: 11px 22px;
  font-size: 14px;
}

.menu-toggle {
  display: none;
  width: 40px; height: 40px;
  border: none; background: transparent;
  position: relative;
}
.menu-toggle span, .menu-toggle span::before, .menu-toggle span::after {
  content: ""; position: absolute; left: 8px; right: 8px; height: 2px; background: var(--ink);
  transition: transform .25s ease, opacity .25s ease;
}
.menu-toggle span { top: 19px; }
.menu-toggle span::before { top: -7px; }
.menu-toggle span::after { top: 7px; }
.menu-toggle.open span { background: transparent; }
.menu-toggle.open span::before { transform: translateY(7px) rotate(45deg); }
.menu-toggle.open span::after { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Sections shared ---------- */
section { position: relative; }
.section-pad { padding: 112px var(--pad-x); }
.section-header { max-width: 800px; margin: 0 auto 56px; text-align: center; }
.eyebrow {
  font-size: 14px; font-weight: 600; color: var(--accent);
  display: block; margin-bottom: 14px;
}
.section-title {
  font-family: var(--font-serif); font-weight: 700; font-size: 40px;
  color: var(--ink); margin: 0 0 14px;
}
.section-desc {
  font-size: 16px; line-height: 1.6; color: var(--muted); margin: 0 auto;
  max-width: 700px;
}

/* ---------- Hero ---------- */
.hero {
  display: flex; align-items: center; justify-content: center; gap: 72px;
  padding: 72px var(--pad-x) 104px;
  max-width: 1440px; margin: 0 auto;
}
.hero-left { flex: 0 0 600px; max-width: 600px; }
.badge {
  display: inline-flex; align-items: center;
  background: var(--cream-soft); color: var(--accent);
  font-size: 13px; font-weight: 600; padding: 7px 16px; border-radius: 16px;
  margin-bottom: 28px;
}
.hero-headline {
  font-family: var(--font-serif); font-weight: 800; font-size: 60px;
  line-height: 1.27; color: var(--ink); margin: 0 0 28px;
}
.hero-sub {
  font-size: 18px; line-height: 1.67; color: var(--muted); margin: 0 0 28px; max-width: 540px;
}
.cta-row { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 28px; }
.trust-line { font-size: 14px; font-weight: 500; color: var(--muted); }

.hero-visual { flex: 0 0 460px; width: 460px; aspect-ratio: 920 / 1360; position: relative; }
.hero-blob {
  position: absolute; width: 480px; height: 480px; left: -20px; top: 70px;
  border-radius: 240px;
  background: linear-gradient(135deg, #FFE8CA, #FFF8EF);
}
.hero-phone-img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: contain; filter: drop-shadow(0 24px 40px rgba(153,97,46,.22));
}

/* ---------- Slogan band ---------- */
.slogan-band {
  background: var(--ink); color: var(--cream);
  text-align: center; padding: 96px var(--pad-x);
}
.slogan-band .eyebrow { color: var(--accent-gold); }
.slogan-title {
  font-family: var(--font-serif); font-weight: 800; font-size: 46px; line-height: 1.3;
  margin: 0 0 20px; max-width: 900px; margin-left: auto; margin-right: auto;
}
.slogan-desc { font-size: 17px; line-height: 1.65; color: var(--muted-soft); max-width: 700px; margin: 0 auto; }

/* ---------- Pillars ---------- */
.pillars { background: var(--cream-soft); }
.cards-row { display: flex; gap: 28px; align-items: stretch; }
.pillar-card {
  flex: 1; background: #fff; border-radius: 24px; padding: 36px 30px;
  box-shadow: var(--shadow-soft);
  display: flex; flex-direction: column; gap: 14px;
}
.pillar-num { font-family: var(--font-en); font-weight: 800; font-size: 32px; color: var(--accent-gold); }
.pillar-title { font-family: var(--font-serif); font-weight: 700; font-size: 24px; color: var(--ink); margin: 0; }
.pillar-desc { font-size: 15px; line-height: 1.53; color: var(--muted); margin: 0; }
.pillar-bullets { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.pillar-bullets span { font-size: 14px; line-height: 1.5; color: var(--muted); }

/* ---------- Family ---------- */
.family-section {
  display: flex; align-items: center; justify-content: center; gap: 80px;
  max-width: 1440px; margin: 0 auto;
}
.family-visual { flex: 0 0 460px; width: 460px; aspect-ratio: 920 / 1360; position: relative; }
.family-blob {
  position: absolute; width: 440px; height: 440px; left: 20px; top: 30px; border-radius: 220px;
  background: linear-gradient(135deg,#FFF8EF,#FFE8CA);
}
.family-phone-img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: contain; filter: drop-shadow(0 24px 40px rgba(153,97,46,.22));
}

.family-text { flex: 0 1 600px; max-width: 600px; }
.family-title { font-family: var(--font-serif); font-weight: 700; font-size: 38px; color: var(--ink); margin: 0 0 22px; }
.family-desc { font-size: 16px; line-height: 1.625; color: var(--muted); margin: 0 0 22px; max-width: 560px; }
.family-rows { display: flex; flex-direction: column; gap: 22px; }
.family-row { display: flex; gap: 16px; }
.family-row .num-badge {
  flex: none; width: 40px; height: 40px; border-radius: 50%;
  background: #FFF3E1; color: var(--accent); font-family: var(--font-en); font-weight: 800; font-size: 14px;
  display: flex; align-items: center; justify-content: center;
}
.family-row-title { font-size: 18px; font-weight: 700; color: var(--ink); margin: 0 0 4px; }
.family-row-desc { font-size: 14px; line-height: 1.57; color: var(--muted); margin: 0; }

/* ---------- Loop ---------- */
.loop-steps {
  display: flex; align-items: flex-start; justify-content: center; gap: 14px; flex-wrap: wrap;
}
.loop-step { width: 120px; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.loop-circle {
  width: 64px; height: 64px; border-radius: 32px;
  background: linear-gradient(90deg, var(--grad-cta-start), var(--grad-cta-end));
  color: #fff; font-family: var(--font-en); font-weight: 800; font-size: 24px;
  display: flex; align-items: center; justify-content: center;
}
.loop-circle.repeat { background: var(--ink); color: var(--cream); }
.loop-step span { font-size: 15px; font-weight: 500; color: var(--ink); text-align: center; }
.loop-arrow { font-size: 22px; color: #D9BFA8; align-self: center; margin-top: 20px; }

/* ---------- Privacy (dark) ---------- */
.privacy-section { background: var(--ink-deep); color: var(--cream); }
.privacy-section .section-title { color: var(--cream); }
.privacy-section .section-desc { color: var(--muted-soft); }
.privacy-items { display: flex; gap: 24px; flex-wrap: wrap; }
.privacy-item {
  flex: 1; min-width: 240px; background: var(--ink);
  border-radius: 20px; padding: 28px 24px;
  display: flex; flex-direction: column; gap: 10px;
}
.privacy-icon {
  width: 22px; height: 22px; display: flex; align-items: center; justify-content: center;
  color: var(--cream); font-size: 18px; font-weight: 800;
}
.privacy-item h4 { font-size: 17px; font-weight: 700; color: var(--cream); margin: 0; }
.privacy-item p { font-size: 13px; line-height: 1.54; color: var(--muted-softer); margin: 0; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); padding: 48px var(--pad-x) 32px; }
.footer-links {
  font-size: 13px;
  display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 10px;
  margin-bottom: 14px;
}
.footer-links a { color: var(--cream); text-decoration: none; }
.footer-links a:hover { text-decoration: underline; }
.footer-sep { color: #9C8679; }
.footer-bottom {
  font-size: 13px; color: #9C8679;
  display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 6px;
  text-align: center;
}

/* ---------- Inner pages (about / privacy) ---------- */
.page-hero { background: var(--cream-soft); padding: 64px var(--pad-x) 56px; text-align: center; }
.breadcrumb { font-size: 13px; font-weight: 600; color: var(--accent); display: block; margin-bottom: 14px; }
.page-title { font-family: var(--font-serif); font-weight: 800; font-size: 42px; color: var(--ink); margin: 0 0 14px; }
.page-lead { font-size: 16px; line-height: 1.625; color: var(--muted); max-width: 680px; margin: 0 auto; }

.page-body { padding: 72px var(--pad-x) 96px; }
.page-inner { max-width: 840px; margin: 0 auto; display: flex; flex-direction: column; gap: 40px; }
.doc-h2 { font-family: var(--font-serif); font-weight: 800; font-size: 30px; color: var(--accent); margin: 8px 0 0; }
.doc-block { display: flex; flex-direction: column; gap: 10px; }
.doc-h3 { font-family: var(--font-serif); font-weight: 700; font-size: 22px; color: var(--ink); margin: 0; }
.doc-p { font-size: 15px; line-height: 1.73; color: var(--muted); margin: 0; }
.doc-p.lg { font-size: 17px; line-height: 1.65; color: var(--ink); }
.doc-byline { font-size: 14px; font-weight: 500; color: var(--accent); margin: 0; }
.doc-vision-title { font-family: var(--font-serif); font-weight: 800; font-size: 38px; line-height: 1.58; color: var(--ink); margin: 0 0 4px; max-width: 700px; }

.doc-p strong, .doc-list strong, .doc-callout strong { color: var(--ink); font-weight: 700; }

.doc-meta {
  font-size: 14px; line-height: 1.9; color: var(--muted);
  background: var(--cream-soft); border-radius: 14px; padding: 16px 22px;
}

.doc-callout {
  background: var(--cream-soft); border-left: 3px solid var(--accent);
  border-radius: 4px 16px 16px 4px; padding: 22px 26px;
  display: flex; flex-direction: column; gap: 8px;
}
.doc-callout .doc-h3 { font-size: 17px; }

.doc-toc-intro { font-size: 15px; color: var(--muted); margin: 0; }
.doc-toc {
  list-style: none; counter-reset: toc; margin: 0; padding: 0;
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px 32px;
}
.doc-toc li a {
  font-size: 14px; color: var(--muted); display: block; padding: 6px 0;
  border-bottom: 1px solid rgba(112,98,85,.14);
  transition: color .2s ease;
}
.doc-toc li a:hover { color: var(--accent); }

.doc-list {
  margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 12px;
}
.doc-list li { font-size: 15px; line-height: 1.73; color: var(--muted); }

.doc-list ul { margin: 8px 0 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.doc-p a, .doc-list a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; word-break: break-all; }

.doc-h2, .doc-h3 { scroll-margin-top: 110px; }

/* ---------- Scroll reveal ---------- */
.reveal {
  opacity: 0; transform: translateY(28px);
  transition: opacity .7s cubic-bezier(.2,.7,.2,1), transform .7s cubic-bezier(.2,.7,.2,1);
}
.reveal.in-view { opacity: 1; transform: translateY(0); }
.reveal-stagger.in-view .stagger-item {
  animation: reveal-up .6s cubic-bezier(.2,.7,.2,1) both;
}
.reveal-stagger .stagger-item:nth-child(1) { animation-delay: .05s; }
.reveal-stagger .stagger-item:nth-child(2) { animation-delay: .15s; }
.reveal-stagger .stagger-item:nth-child(3) { animation-delay: .25s; }
.reveal-stagger .stagger-item:nth-child(4) { animation-delay: .35s; }
.reveal-stagger .stagger-item:nth-child(5) { animation-delay: .45s; }
@keyframes reveal-up {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal-stagger .stagger-item { animation: none !important; transition: none !important; opacity: 1 !important; transform: none !important; }
}

/* ---------- QR modal ---------- */
.qr-float {
  position: relative; display: inline-flex; align-items: center; gap: 12px;
}
.qr-chip {
  display: none;
}
.qr-modal {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(59,37,24,.55);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity .25s ease;
}
.qr-modal.open { opacity: 1; pointer-events: auto; }
.qr-modal-card {
  background: #fff; border-radius: 24px; padding: 32px; width: 300px; text-align: center;
  box-shadow: var(--shadow-deep);
  transform: scale(.92); transition: transform .25s ease;
}
.qr-modal.open .qr-modal-card { transform: scale(1); }
.qr-modal-card img { width: 200px; height: 200px; margin: 0 auto 16px; border-radius: 12px; }
.qr-modal-card h4 { margin: 0 0 6px; font-size: 17px; color: var(--ink); }
.qr-modal-card p { margin: 0; font-size: 13px; color: var(--muted); }
.qr-modal-card .qr-modal-link { margin-top: 10px; }
.qr-modal-card .qr-modal-link a { color: var(--link, #B54716); text-decoration: underline; }
.qr-modal-close {
  margin-top: 18px; border: none; background: var(--cream-soft); color: var(--ink);
  font-size: 13px; font-weight: 600; padding: 10px 20px; border-radius: 999px;
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1180px) {
  :root { --pad-x: 48px; }
  .hero { flex-direction: column; }
  .hero-left { flex-basis: auto; max-width: 640px; }
  .hero-visual { margin: 0 auto; }
  .family-section { flex-direction: column; }
  .family-section.reverse { flex-direction: column; }
}

@media (max-width: 860px) {
  :root { --pad-x: 24px; }
  .nav-panel { display: none; }
  .menu-toggle { display: block; }
  .site-header.menu-open .nav-panel {
    display: flex; flex-direction: column; align-items: stretch; gap: 18px;
    position: absolute; top: 100%; left: 0; right: 0; background: var(--cream);
    padding: 24px; box-shadow: 0 16px 30px -10px rgba(153,97,46,.2);
  }
  .site-header.menu-open .nav-panel .nav {
    flex-direction: column; align-items: flex-start; gap: 16px;
  }
  .site-header.menu-open .nav-panel .btn-nav-cta {
    justify-content: center; margin-top: 4px;
  }
  .section-pad { padding: 72px var(--pad-x); }
  .hero { padding-top: 40px; padding-bottom: 56px; }
  .hero-headline { font-size: 40px; }
  .hero-sub { font-size: 16px; }
  .hero-visual { width: 100%; max-width: 390px; aspect-ratio: 920 / 1360; }
  .hero-blob { display: none; }
  .section-title { font-size: 30px; }
  .slogan-title { font-size: 32px; }
  .cards-row { flex-direction: column; }
  .family-visual { width: 100%; max-width: 390px; aspect-ratio: 920 / 1360; }
  .family-blob { display: none; }
  .family-title { font-size: 28px; }
  .loop-steps { justify-content: flex-start; }
  .loop-arrow { display: none; }
  .privacy-items { flex-direction: column; }
  .page-title { font-size: 32px; }
  .doc-vision-title { font-size: 28px; }
  .doc-toc { grid-template-columns: 1fr; }
  .footer-bottom { text-align: center; }
}

@media (max-width: 480px) {
  .hero-headline { font-size: 34px; }
  .badge { font-size: 12px; }
  .cta-row { flex-direction: column; align-items: stretch; }
  .btn-primary, .btn-secondary { justify-content: center; }
}

/* ---------- 小家庭怎么用（guide.html） ---------- */
.guide-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin: 6px 0; }
.guide-card { background: #fff; border-radius: 20px; padding: 22px; box-shadow: var(--shadow-soft); display: flex; flex-direction: column; gap: 8px; }
.guide-tag { align-self: flex-start; font-size: 13px; font-weight: 600; color: var(--accent); background: #FDEDD9; padding: 4px 12px; border-radius: 999px; }
.guide-tag.sage { color: #3D734F; background: #E6EFDB; }
.guide-card-title { font-size: 17px; font-weight: 600; color: var(--ink); margin: 0; }
.guide-scope { display: flex; flex-direction: column; background: #fff; border-radius: 20px; padding: 6px 22px; box-shadow: var(--shadow-soft); }
.guide-scope-row { display: flex; gap: 16px; align-items: baseline; padding: 14px 0; border-bottom: 1px solid #E9DFD1; }
.guide-scope-row:last-child { border-bottom: none; }
.guide-scope-name { flex: 0 0 88px; font-size: 15px; font-weight: 600; color: var(--ink); }
.guide-steps { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; gap: 18px; }
.guide-steps li { display: flex; gap: 16px; align-items: flex-start; }
.guide-step-num { flex: 0 0 36px; height: 36px; border-radius: 18px; background: linear-gradient(90deg, var(--grad-cta-start), var(--grad-cta-end)); color: #fff; font-family: var(--font-en); font-weight: 800; display: flex; align-items: center; justify-content: center; }
.guide-step-title { font-size: 17px; font-weight: 600; color: var(--ink); margin: 4px 0 4px; }
.guide-cta { align-items: center; text-align: center; padding-top: 8px; }
.guide-cta .cta-row { justify-content: center; margin: 8px 0 0; }
@media (max-width: 860px) {
  .guide-pair { grid-template-columns: 1fr; }
  .guide-scope-row { flex-direction: column; gap: 4px; }
  .guide-scope-name { flex-basis: auto; }
}
.family-more { color: var(--accent); font-weight: 600; margin-left: 6px; white-space: nowrap; }
