/* ==========================================================================
   88精选 · 育儿成长官网  —  设计系统
   移动优先 + 桌面自适应 | 微信内置浏览器兼容
   ========================================================================== */

/* ---------- 设计令牌 ---------- */
:root {
  /* 品牌色 */
  --c-primary: #0f7b6c;        /* 主色：成长绿，信赖感 */
  --c-primary-600: #0c6356;
  --c-primary-050: #e6f2ef;
  --c-primary-100: #cfe7e2;
  --c-accent: #f09a5e;          /* 点缀：暖阳橙，亲和力 */
  --c-accent-600: #e8833c;
  --c-accent-050: #fdeee0;

  /* 中性色 */
  --c-bg: #fbf8f3;              /* 米白底，温和 */
  --c-surface: #ffffff;
  --c-ink: #22303a;             /* 主文字 */
  --c-ink-soft: #4c5b66;
  --c-muted: #8b96a0;
  --c-line: #ece6dd;

  /* 语义色 */
  --c-success: #2e9e6b;
  --c-warn: #d9932f;

  /* 圆角 / 阴影 */
  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 24px;
  --shadow-1: 0 1px 2px rgba(34,48,58,.05), 0 4px 16px rgba(34,48,58,.06);
  --shadow-2: 0 6px 24px rgba(15,123,108,.14);

  /* 布局 */
  --container: 1120px;
  --nav-h: 64px;
  --gap: 16px;

  /* 字号（移动优先） */
  --fs-h1: clamp(1.9rem, 5vw, 3rem);
  --fs-h2: clamp(1.4rem, 3.4vw, 2.1rem);
  --fs-h3: clamp(1.08rem, 2.2vw, 1.3rem);
  --fs-body: 1rem;
  --fs-small: .875rem;
}

/* ---------- Reset & 基础 ---------- */
*, *::before, *::after { 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: var(--fs-body);
  line-height: 1.65;
  color: var(--c-ink);
  background: var(--c-bg);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
h1,h2,h3,h4 { margin: 0; line-height: 1.25; font-weight: 700; }
p { margin: 0; }
button { font-family: inherit; cursor: pointer; }

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

/* 顶部导航占位（sticky） */
body { padding-top: var(--nav-h); }

/* ---------- 通用排版 ---------- */
.section { padding: 56px 0; }
.section--tight { padding: 36px 0; }
.eyebrow {
  display: inline-block;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .12em;
  color: var(--c-primary);
  background: var(--c-primary-050);
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 12px;
}
.section-head { text-align: center; max-width: 640px; margin: 0 auto 36px; }
.section-head h2 { font-size: var(--fs-h2); margin-bottom: 12px; }
.section-head p { color: var(--c-ink-soft); }
.section-head--left { text-align: left; margin-left: 0; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  border-radius: 999px;
  font-size: 1rem;
  font-weight: 600;
  padding: 14px 26px;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: translateY(1px); }
.btn--primary {
  background: linear-gradient(120deg, var(--c-primary), var(--c-primary-600));
  color: #fff;
  box-shadow: var(--shadow-2);
}
.btn--primary:hover { background: linear-gradient(120deg, var(--c-primary-600), var(--c-primary)); }
.btn--accent {
  background: linear-gradient(120deg, var(--c-accent), var(--c-accent-600));
  color: #fff;
  box-shadow: 0 6px 20px rgba(240,154,94,.35);
}
.btn--ghost {
  background: transparent;
  color: var(--c-primary);
  border: 1.5px solid var(--c-primary-100);
}
.btn--ghost:hover { background: var(--c-primary-050); }
.btn--block { width: 100%; }
.btn--sm { padding: 10px 18px; font-size: .92rem; }

/* ---------- 顶部导航 ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  background: rgba(255,255,255,.92);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--c-line);
  z-index: 100;
}
.nav__inner {
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand { display: flex; align-items: center; gap: 10px; }
/* ---------- 顶部隐私政策条 ---------- */
.topbar {
  background: var(--c-primary-deep);
  color: rgba(255, 255, 255, .92);
  font-size: .75rem;
  line-height: 1.5;
  padding: 7px 0;
  text-align: center;
}
.topbar a { color: #fff; text-decoration: underline; text-underline-offset: 2px; }
.topbar .sep { margin: 0 8px; opacity: .5; }

.brand__mark {
  width: 38px; height: 38px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--c-primary), #14a08a);
  display: grid; place-items: center;
  color: #fff; font-weight: 800; font-size: 1.1rem;
  box-shadow: var(--shadow-2);
}
/* 品牌 Logo 图片（assets/logo.png）：加载失败时由 onerror 回退为文字标 */
.brand__logo {
  width: 38px; height: 38px;
  border-radius: 12px;
  object-fit: contain;
  flex: none;
}
.brand__name { font-weight: 800; font-size: 1.15rem; letter-spacing: .04em; }
.brand__name small { display: block; font-size: .68rem; font-weight: 500; color: var(--c-muted); letter-spacing: .2em; }

.nav__links { display: none; gap: 28px; }
.nav__links a {
  font-size: .95rem;
  font-weight: 500;
  color: var(--c-ink-soft);
  position: relative;
  padding: 6px 0;
}
.nav__links a:hover, .nav__links a.is-active { color: var(--c-primary); }
.nav__links a.is-active::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0;
  height: 2px; border-radius: 2px; background: var(--c-primary);
}
.nav__cta { display: none; }

/* 汉堡菜单按钮 */
.nav__toggle {
  width: 42px; height: 42px;
  border: none; background: transparent;
  display: grid; place-items: center;
}
.nav__toggle span,
.nav__toggle span::before,
.nav__toggle span::after {
  content: ""; display: block; width: 22px; height: 2px;
  background: var(--c-ink); border-radius: 2px; position: relative;
  transition: transform .2s ease, opacity .2s ease;
}
.nav__toggle span::before { position: absolute; top: -7px; }
.nav__toggle span::after { position: absolute; top: 7px; }
.nav.open .nav__toggle span { background: transparent; }
.nav.open .nav__toggle span::before { transform: translateY(7px) rotate(45deg); }
.nav.open .nav__toggle span::after { transform: translateY(-7px) rotate(-45deg); }

/* 移动端抽屉菜单 */
.nav__mobile {
  position: fixed;
  top: var(--nav-h); left: 0; right: 0;
  background: #fff;
  border-bottom: 1px solid var(--c-line);
  padding: 8px 20px 20px;
  display: none;
  z-index: 99;
  box-shadow: var(--shadow-1);
}
.nav.open .nav__mobile { display: block; }
.nav__mobile a {
  display: block; padding: 13px 4px;
  font-weight: 500; color: var(--c-ink);
  border-bottom: 1px solid var(--c-line);
}
.nav__mobile a:last-of-type { border-bottom: none; }
.nav__mobile .btn { margin-top: 14px; }

/* ---------- Hero ---------- */
.hero {
  background:
    radial-gradient(1200px 500px at 85% -10%, var(--c-primary-050), transparent),
    radial-gradient(800px 400px at 10% 110%, var(--c-accent-050), transparent),
    var(--c-bg);
  padding: 48px 0 40px;
  overflow: hidden;
}
.hero__grid { display: grid; gap: 32px; align-items: center; }
.hero__tag {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: .85rem; color: var(--c-primary);
  background: var(--c-primary-050);
  padding: 6px 14px; border-radius: 999px; margin-bottom: 16px;
}
.hero__tag i { width: 8px; height: 8px; border-radius: 50%; background: var(--c-primary); }
.hero h1 { font-size: var(--fs-h1); letter-spacing: .01em; margin-bottom: 16px; }
.hero h1 .accent { color: var(--c-primary); }
.hero__sub { color: var(--c-ink-soft); font-size: 1.05rem; margin-bottom: 24px; max-width: 560px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 20px; }
.hero__note { font-size: .82rem; color: var(--c-muted); display: flex; align-items: center; gap: 6px; }
.hero__figure { position: relative; }
.hero__figure img { border-radius: var(--r-lg); box-shadow: var(--shadow-1); }
.hero__figure .float-card {
  position: absolute; left: -8px; bottom: 16px;
  background: #fff; border-radius: var(--r-md); padding: 12px 16px;
  box-shadow: var(--shadow-1); font-size: .85rem; display: flex; gap: 10px; align-items: center;
}
.float-card .dot { width: 34px; height: 34px; border-radius: 50%; background: var(--c-primary-050);
  display: grid; place-items: center; color: var(--c-primary); font-weight: 700; }

/* ---------- 数据条 ---------- */
.stats { background: var(--c-surface); border-block: 1px solid var(--c-line); }
.stats__grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 20px; padding: 26px 0; }
.stat { text-align: center; }
.stat b { display: block; font-size: 1.6rem; color: var(--c-primary); font-weight: 800; }
.stat span { font-size: .85rem; color: var(--c-muted); }

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

.card {
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-radius: var(--r-md);
  padding: 24px;
  transition: transform .2s ease, box-shadow .2s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-1); }
.card__icon {
  width: 48px; height: 48px; border-radius: 14px;
  background: var(--c-primary-050); color: var(--c-primary);
  display: grid; place-items: center; font-size: 1.3rem; margin-bottom: 16px;
}
.card__icon--accent { background: var(--c-accent-050); color: var(--c-accent-600); }
.card h3 { font-size: var(--fs-h3); margin-bottom: 8px; }
.card p { color: var(--c-ink-soft); font-size: .94rem; }

/* ---------- 课程卡 ---------- */
.course {
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-radius: var(--r-md);
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform .2s ease, box-shadow .2s ease;
}
.course:hover { transform: translateY(-4px); box-shadow: var(--shadow-1); }
.course__thumb { aspect-ratio: 16/9; background: var(--c-primary-050); position: relative; }
.course__thumb img { width: 100%; height: 100%; object-fit: cover; }
.course__badge {
  position: absolute; top: 12px; left: 12px;
  background: rgba(255,255,255,.9); color: var(--c-primary);
  font-size: .75rem; font-weight: 700; padding: 4px 10px; border-radius: 999px;
}
.course__body { padding: 18px 20px 22px; display: flex; flex-direction: column; flex: 1; }
.course__meta { display: flex; gap: 10px; font-size: .78rem; color: var(--c-muted); margin-bottom: 8px; }
.course__meta span { display: inline-flex; align-items: center; gap: 4px; }
.course h3 { font-size: 1.06rem; margin-bottom: 6px; }
.course p { color: var(--c-ink-soft); font-size: .9rem; flex: 1; }
.course__cta { margin-top: 16px; }
.course__cta .btn { width: 100%; }

/* 大纲列表 */
.syllabus { margin-top: 12px; border-top: 1px dashed var(--c-line); padding-top: 12px; }
.syllabus li { font-size: .85rem; color: var(--c-ink-soft); padding: 5px 0; display: flex; gap: 8px; }
.syllabus li::before { content: "·"; color: var(--c-primary); font-weight: 800; }

/* ---------- 服务流程 ---------- */
.steps { counter-reset: step; }
.step { display: flex; gap: 16px; align-items: flex-start; }
.step__num {
  flex: none; width: 44px; height: 44px; border-radius: 50%;
  background: var(--c-primary); color: #fff; display: grid; place-items: center;
  font-weight: 800; box-shadow: var(--shadow-2);
}
.step h3 { font-size: 1.05rem; margin-bottom: 4px; }
.step p { color: var(--c-ink-soft); font-size: .92rem; }
.step + .step { margin-top: 26px; }

/* ---------- 见证 ---------- */
.quote {
  background: var(--c-surface); border: 1px solid var(--c-line);
  border-radius: var(--r-md); padding: 22px; position: relative;
}
.quote::before { content: "“"; position: absolute; top: 4px; left: 14px;
  font-size: 2.4rem; color: var(--c-primary-100); font-family: Georgia, serif; }
.quote p { color: var(--c-ink-soft); font-size: .92rem; padding-left: 20px; }
.quote footer { margin-top: 14px; padding-left: 20px; font-size: .82rem; color: var(--c-muted); }
.quote footer b { color: var(--c-ink); }

/* ---------- 私域转化 CTA ---------- */
.cta-band {
  background: linear-gradient(120deg, var(--c-primary), #14a08a);
  color: #fff; border-radius: var(--r-lg);
  padding: 40px 28px; text-align: center; position: relative; overflow: hidden;
}
.cta-band::after {
  content: ""; position: absolute; right: -60px; top: -60px;
  width: 220px; height: 220px; border-radius: 50%; background: rgba(255,255,255,.08);
}
.cta-band h2 { font-size: var(--fs-h2); margin-bottom: 10px; }
.cta-band p { opacity: .9; margin-bottom: 22px; max-width: 560px; margin-inline: auto; }
.cta-band .btn--light { background: #fff; color: var(--c-primary); box-shadow: none; }

/* ---------- 表单 ---------- */
.form { display: grid; gap: 14px; }
.field label { display: block; font-size: .85rem; font-weight: 600; margin-bottom: 6px; }
.field input, .field select, .field textarea {
  width: 100%; border: 1.5px solid var(--c-line); border-radius: var(--r-sm);
  padding: 12px 14px; font-size: .95rem; font-family: inherit; color: var(--c-ink);
  background: #fff; -webkit-appearance: none;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--c-primary); box-shadow: 0 0 0 3px var(--c-primary-050);
}
.form__hint { font-size: .78rem; color: var(--c-muted); }
.form__hint a { color: var(--c-primary); text-decoration: underline; text-underline-offset: 2px; }
/* 表单顶部隐私协议提示 */
.form__privacy { margin-bottom: 2px; }

/* ---------- 合规提示条 ---------- */
.compliance {
  background: var(--c-primary-050);
  border: 1px solid var(--c-primary-100);
  border-radius: var(--r-md);
  padding: 18px 20px; font-size: .85rem; color: var(--c-primary-600);
  display: flex; gap: 12px; align-items: flex-start;
}
.compliance .ic { font-size: 1.2rem; }

/* ---------- 页脚 ---------- */
.footer { background: #182229; color: #cbd4da; padding: 48px 0 24px; margin-top: 60px; }
.footer a { color: #cbd4da; }
.footer a:hover { color: #fff; }
.footer__grid { display: grid; gap: 28px; margin-bottom: 28px; }
.footer h4 { color: #fff; font-size: .95rem; margin-bottom: 14px; }
.footer li { padding: 4px 0; font-size: .88rem; }
.footer__brand p { font-size: .85rem; opacity: .75; margin-top: 10px; max-width: 260px; }
.footer__bottom { border-top: 1px solid #2a3741; padding-top: 18px; font-size: .78rem; opacity: .65; text-align: center; }
.footer__bottom p + p { margin-top: 6px; }

/* ---------- 页脚：支付方式徽章与条款链接（由 config.js 控制显示/隐藏） ---------- */
.footer__payments {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 18px;
}
.footer__payments[hidden] { display: none; }
.pay-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #223138;
  border: 1px solid #2f4049;
  color: #dfe6ea;
  font-size: .8rem;
  padding: 7px 14px;
  border-radius: 8px;
}
.pay-badge svg { width: 18px; height: 18px; flex: none; }
.footer__legal-links a { color: #9fb0ba; text-decoration: underline; text-underline-offset: 3px; }
.footer__legal-links a:hover { color: #fff; }
.footer__legal-links .sep { margin: 0 10px; opacity: .4; }

/* ---------- 转化弹窗（添加顾问） ---------- */
.modal-mask {
  position: fixed; inset: 0; background: rgba(20,28,34,.55);
  display: none; align-items: flex-end; justify-content: center; z-index: 200;
  backdrop-filter: blur(2px);
}
.modal-mask.open { display: flex; }
.modal {
  background: #fff; width: 100%; max-width: 480px;
  border-radius: 20px 20px 0 0; padding: 28px 24px 34px;
  animation: sheetUp .28s ease;
  max-height: 86vh; overflow: auto;
}
@keyframes sheetUp { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.modal h3 { font-size: 1.25rem; margin-bottom: 6px; }
.modal .sub { color: var(--c-muted); font-size: .88rem; margin-bottom: 18px; }
.modal__close { position: absolute; }
.qr-box { text-align: center; }
.qr-box .ph {
  width: 190px; height: 190px; margin: 0 auto 14px;
  border-radius: var(--r-md); background: var(--c-primary-050);
  border: 2px dashed var(--c-primary-100); display: grid; place-items: center;
  color: var(--c-primary); font-size: .85rem; text-align: center; padding: 12px;
}

/* ---------- 回到顶部（移动端友好） ---------- */
.to-top {
  position: fixed; right: 16px; bottom: 20px;
  width: 44px; height: 44px; border-radius: 50%;
  background: #fff; border: 1px solid var(--c-line); box-shadow: var(--shadow-1);
  display: none; place-items: center; color: var(--c-primary); z-index: 90;
}
.to-top.show { display: grid; }

/* ---------- 工具类 ---------- */
.mt-2 { margin-top: 12px; } .mt-3 { margin-top: 18px; } .mt-4 { margin-top: 24px; }
.center { text-align: center; }
.hide-mobile { display: none; }
.soft { color: var(--c-muted); font-size: .82rem; }

/* ==========================================================================
   响应式断点：≥768px 平板 / ≥1024px 桌面
   ========================================================================== */
@media (min-width: 768px) {
  .grid--2 { grid-template-columns: repeat(2,1fr); }
  .grid--3 { grid-template-columns: repeat(3,1fr); }
  .grid--4 { grid-template-columns: repeat(2,1fr); }
  .stats__grid { grid-template-columns: repeat(4,1fr); }
  .hero { padding: 72px 0 56px; }
  .hero__grid { grid-template-columns: 1.05fr .95fr; gap: 48px; }
  .footer__grid { grid-template-columns: 2fr 1fr 1fr 1fr; }
  .modal { border-radius: 20px; margin-bottom: 40px; }
  .modal-mask { align-items: center; }
}

@media (min-width: 1024px) {
  :root { --nav-h: 72px; }
  .grid--3 { grid-template-columns: repeat(3,1fr); }
  .grid--4 { grid-template-columns: repeat(4,1fr); }
  .nav__toggle { display: none; }
  .nav__links { display: flex; }
  .nav__cta { display: inline-flex; }
  .nav__mobile { display: none !important; }
  .section { padding: 76px 0; }
  .hide-desktop { display: none; }
  .hide-mobile { display: block; }
}

/* 减少动效（可访问性） */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto; }
}
