/* ==========================================================
   木鱼点读启蒙官网
   移动优先（Mobile-first），桌面 >= 900px 增强
   ========================================================== */

:root {
  --ink: #37322c;
  --ink-soft: #6f655a;
  --cream: #fffaf2;
  --card: #ffffff;
  --line: #f0e4d2;

  --pinyin: #1f9d6b;
  --pinyin-soft: #e7f6ef;
  --gushi: #f5641e;
  --gushi-soft: #fff0e6;
  /* 新增产品主色在此追加，配套用法见文件末尾「备用色板」 */
  --gold: #ffb43a;

  --radius: 20px;
  --shadow: 0 10px 30px rgba(120, 88, 45, 0.12);
  --maxw: 1120px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background: var(--cream);
  line-height: 1.7;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul, ol { list-style: none; }

.section-inner {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 20px;
}

.section-title {
  font-size: 30px;
  text-align: center;
  letter-spacing: 1px;
}
.section-sub {
  text-align: center;
  color: var(--ink-soft);
  margin: 10px auto 0;
  max-width: 560px;
}

/* ---------------- 顶部导航 ---------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 250, 242, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 20px;
  height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark {
  width: 40px; height: 40px;
  border-radius: 12px;
  object-fit: contain;
  display: block;
  background: transparent;
  box-shadow: none;
}
.brand-name { font-size: 18px; font-weight: 800; letter-spacing: 1px; }
.brand-light .brand-mark { background: transparent; }
.brand-light .brand-name { color: #fff; }

.site-nav { display: flex; align-items: center; gap: 4px; }
.site-nav a {
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 15px;
  color: var(--ink-soft);
  transition: background 0.2s, color 0.2s;
  white-space: nowrap;
}
.site-nav a:hover { color: var(--ink); background: #f4e9d8; }
.site-nav .nav-cta {
  background: var(--gushi);
  color: #fff;
  font-weight: 700;
}
.site-nav .nav-cta:hover { background: #e0520f; color: #fff; }

/* 汉堡按钮（移动端） */
.nav-toggle {
  display: none;
  border: none;
  background: none;
  width: 42px; height: 42px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
}
.nav-toggle span {
  width: 24px; height: 2.5px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(8.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8.5px) rotate(-45deg); }

/* ---------------- Hero ---------------- */
.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(900px 480px at 12% -10%, rgba(255, 180, 58, 0.28), transparent 60%),
    radial-gradient(900px 520px at 95% 8%, rgba(31, 157, 107, 0.16), transparent 60%),
    linear-gradient(180deg, #fff7e6, #ffefd5);
  padding: 74px 0 66px;
  text-align: center;
}
.hero-cloud {
  position: absolute;
  width: 180px; height: 60px;
  background: rgba(255, 255, 255, 0.55);
  border-radius: 60px;
  filter: blur(1px);
}
.hero-cloud.c1 { top: 26px; left: -40px; animation: drift 26s linear infinite; }
.hero-cloud.c2 { top: 110px; right: -30px; width: 120px; animation: drift 32s linear infinite reverse; }
@keyframes drift {
  0% { transform: translateX(0); }
  50% { transform: translateX(40px); }
  100% { transform: translateX(0); }
}
.hero-inner { position: relative; max-width: 760px; margin: 0 auto; padding: 0 20px; }
.hero-eyebrow {
  display: inline-block;
  font-size: 14px;
  font-weight: 700;
  color: #b06d1e;
  background: #ffe6bb;
  border: 1px solid #ffd38a;
  padding: 4px 16px;
  border-radius: 999px;
  letter-spacing: 1px;
}
.hero-title {
  margin: 20px 0 14px;
  font-size: 44px;
  line-height: 1.25;
  font-weight: 900;
  letter-spacing: 2px;
}
.hero-title span {
  color: var(--gushi);
  background: linear-gradient(90deg, var(--pinyin), var(--gushi));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-desc { color: var(--ink-soft); font-size: 16px; margin: 0 auto; max-width: 560px; word-break: break-word; }
.hero-actions { margin-top: 30px; display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 30px;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 800;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary {
  background: linear-gradient(135deg, var(--gushi), #ff8a3d);
  color: #fff;
  box-shadow: 0 10px 20px rgba(245, 100, 30, 0.32);
}
.btn-ghost {
  background: #fff;
  color: var(--pinyin);
  border-color: #bfe6d2;
}
.btn-ghost:hover { background: #f2fbf7; }
.hero-hint {
  margin-top: 26px;
  font-size: 13px;
  color: #a58a63;
}
.hero-hint::before {
  content: "↓ ";
  font-weight: 800;
}

/* ---------------- 双产品总览 ---------------- */
.products { padding: 72px 0 56px; }
.product-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  margin-top: 34px;
}
.pcard {
  background: var(--card);
  border-radius: var(--radius);
  padding: 30px 26px;
  box-shadow: var(--shadow);
  border-top: 6px solid var(--pinyin);
  transition: transform 0.25s, box-shadow 0.25s;
  display: block;
}
.pcard-gushi { border-top-color: var(--gushi); }
.pcard:hover { transform: translateY(-6px); box-shadow: 0 18px 40px rgba(120, 88, 45, 0.2); }
.pcard-logo {
  width: 72px; height: 72px;
  border-radius: 20px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}
.pcard h3 { font-size: 21px; margin: 18px 0 6px; letter-spacing: 1px; }
.pcard p { color: var(--ink-soft); font-size: 15px; }
.pcard-tag {
  display: inline-block;
  margin-top: 16px;
  font-size: 13px;
  font-weight: 700;
  color: var(--pinyin);
  background: var(--pinyin-soft);
  padding: 3px 12px;
  border-radius: 999px;
}
.pcard-gushi .pcard-tag { color: var(--gushi); background: var(--gushi-soft); }
.pcard-qr {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px dashed var(--line);
  display: flex;
  align-items: center;
  gap: 10px;
}
.pcard-code {
  width: 56px;
  height: 56px;
  padding: 3px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 3px 8px rgba(120, 88, 45, 0.08);
  flex: none;
}
.pcard-qr span { font-size: 12px; color: var(--ink-soft); }

/* ---------------- 产品详情 ---------------- */
.detail { padding: 70px 0; scroll-margin-top: 62px; }
.detail-pinyin { background: linear-gradient(180deg, #fff 0%, #f3fbf7 100%); }
.detail-gushi { background: linear-gradient(180deg, #fff6ec 0%, #fffaf2 100%); }
.detail > .section-inner {
  display: grid;
  grid-template-columns: 1fr minmax(160px, 200px);
  grid-template-areas:
    "head find"
    "features features";
  gap: 24px;
  align-items: start;
}
.detail-head {
  grid-area: head;
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 0;
}
.detail-logo {
  width: 92px; height: 92px;
  border-radius: 24px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.14);
  flex: none;
}
.detail-kicker { font-size: 13px; font-weight: 800; letter-spacing: 2px; color: var(--pinyin); }
.detail-gushi .detail-kicker { color: var(--gushi); }
.detail-intro h2 { font-size: 32px; letter-spacing: 1px; margin: 2px 0; }
.detail-slogan { color: var(--ink-soft); }

.feature-grid {
  grid-area: features;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.feat {
  background: var(--card);
  border-radius: 18px;
  padding: 24px 20px 22px;
  box-shadow: 0 6px 18px rgba(120, 88, 45, 0.08);
  border: 1px solid var(--line);
  transition: transform 0.2s, box-shadow 0.2s;
}
.feat:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.feat-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  border-radius: 14px;
  font-size: 17px;
  font-weight: 800;
  color: var(--pinyin);
  background: var(--pinyin-soft);
  margin-bottom: 14px;
}
.detail-gushi .feat-badge { color: var(--gushi); background: var(--gushi-soft); }
.feat h3 { font-size: 17px; margin-bottom: 6px; }
.feat p { font-size: 14px; color: var(--ink-soft); }

.detail-find {
  grid-area: find;
  margin: 0;
  width: 100%;
  max-width: none;
  align-self: center;
  text-align: center;
}
.detail-find .find-hint {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  letter-spacing: 0.5px;
  color: var(--ink-soft);
}
/* 小程序码：长按/扫码直达对应小程序 */
.detail-find .find-code {
  width: 80px;
  height: 80px;
  margin: 0 auto;
  padding: 4px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 4px 12px rgba(120, 88, 45, 0.1);
}

/* ---------------- 特色 ---------------- */
.features { padding: 70px 0 64px; background: #fff; }
.feature-cols {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-top: 34px;
}
.fcol {
  text-align: center;
  padding: 26px 16px;
  border-radius: 18px;
  background: var(--cream);
  border: 1px solid var(--line);
}
.fcol-icon {
  width: 58px; height: 58px;
  margin: 0 auto 12px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 900;
  color: #fff;
  background: linear-gradient(135deg, var(--gushi), #ffb43a);
  box-shadow: 0 8px 18px rgba(245, 100, 30, 0.25);
}
.fcol:nth-child(2) .fcol-icon { background: linear-gradient(135deg, var(--pinyin), #43c98f); box-shadow: 0 8px 18px rgba(31, 157, 107, 0.25); }
.fcol:nth-child(3) .fcol-icon { background: linear-gradient(135deg, #5b8cff, #7fa7ff); box-shadow: 0 8px 18px rgba(91, 140, 255, 0.25); }
.fcol:nth-child(4) .fcol-icon { background: linear-gradient(135deg, #b06edb, #cf98ea); box-shadow: 0 8px 18px rgba(176, 110, 219, 0.25); }
.fcol h3 { font-size: 17px; margin-bottom: 6px; }
.fcol p { font-size: 14px; color: var(--ink-soft); }

/* ---------------- 获取方式 ---------------- */
.get { padding: 70px 0 64px; }
.steps {
  max-width: 680px;
  margin: 34px auto 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  counter-reset: none;
}
.steps li {
  display: flex;
  align-items: center;
  gap: 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px 20px;
  box-shadow: 0 4px 12px rgba(120, 88, 45, 0.06);
}
.steps li span {
  flex: none;
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--gushi);
  color: #fff;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}
.steps li:nth-child(even) span { background: var(--pinyin); }
.get-tip { text-align: center; color: #a58a63; font-size: 14px; margin-top: 22px; }

/* ---------------- FAQ ---------------- */
.faq { padding: 70px 0 76px; background: #fff; }
.faq-list { max-width: 720px; margin: 34px auto 0; display: flex; flex-direction: column; gap: 12px; }
.faq-item {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--cream);
  overflow: hidden;
}
.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 18px 20px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  flex: none;
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--gushi-soft);
  color: var(--gushi);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 18px;
  transition: transform 0.25s;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item p { padding: 0 20px 18px; color: var(--ink-soft); font-size: 15px; }

/* ---------------- 页脚 ---------------- */
.site-footer { background: #3a342b; color: #d8cdba; }
.site-footer .section-inner { padding-top: 40px; padding-bottom: 34px; }
.footer-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.footer-top p { font-size: 15px; }
.footer-copy {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  font-size: 13px;
  color: #a99c86;
}

/* ---------------- 滚动显现 ---------------- */
/* 内容直接可见：避免某些 WebView 下 IntersectionObserver 不触发导致整块空白 */
.reveal { opacity: 1; transform: none; }

/* ==========================================================
   响应式：平板与手机
   ========================================================== */
@media (max-width: 960px) {
  .feature-grid { grid-template-columns: 1fr 1fr; }
  .feature-cols { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 860px) {
  .section-title { font-size: 26px; }

  /* 移动端导航抽屉 */
  .nav-toggle { display: inline-flex; }
  .site-nav {
    position: absolute;
    top: 62px; left: 0; right: 0;
    background: #fffaf2;
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 10px 16px 16px;
    box-shadow: 0 16px 24px rgba(120, 88, 45, 0.12);
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.25s, transform 0.25s, visibility 0.25s;
  }
  .site-nav.open { opacity: 1; visibility: visible; transform: none; pointer-events: auto; }
  .site-nav a { padding: 12px 14px; font-size: 16px; }
  .site-nav .nav-cta { text-align: center; margin-top: 6px; }

  .detail > .section-inner {
    grid-template-columns: 1fr;
    grid-template-areas:
      "head"
      "features"
      "find";
  }
  .detail-find { max-width: 520px; margin: 0 auto; width: 100%; }

  .hero { padding: 60px 0 54px; }
  .hero-title { font-size: 34px; }
  .hero-desc { font-size: 15px; }

  .product-cards { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .hero-title { font-size: 29px; }
  .feature-grid, .feature-cols { grid-template-columns: 1fr; }
  .detail-head { flex-direction: column; text-align: center; }
  .detail-logo { width: 80px; height: 80px; }
  .section-title { font-size: 24px; }
  .footer-top { justify-content: center; text-align: center; }
  .footer-top p { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero-cloud, .btn, .pcard, .feat { animation: none; transition: none; }
}

/* ==========================================================
   备用色板（产品矩阵扩展模板）
   ----------------------------------------------------------
   目前内建两套产品配色：
     · 拼音点读 = pinyin 绿 → 卡片 .pcard 默认色 + 详情 .detail-pinyin
     · 古诗点读 = gushi  橙 → 卡片另加 .pcard-gushi + 详情 .detail-gushi

   新增产品如需沿用上面任一主色，直接复用即可，无需改本文件；
   如需全新主色，把下面整套示例复制出来并替换 key（把 next 换成新产品
   的英文 key，例如加第 3 款拼音外的识字产品可命名为 next）：
     ── ① 在 :root 追加主色变量（参考文件顶部）──
        --next: #7c5ce0;  --next-soft: #efeafe;
     ── ② HTML 里这样使用 ──
        总览卡片 class 加 .pcard-next，如 <a class="pcard pcard-next">
        详情区 class 用 .detail-next，如 <section class="detail detail-next">
        （详情内 kicker / 图标 / 搜索名会随 class 自动变成新主色）
     ── ③ 删除/保留本示例块均可，不影响现有两款产品 ──
   ========================================================== */
.pcard-next { border-top-color: var(--next); }
.pcard-next .pcard-tag { color: var(--next); background: var(--next-soft); }
.detail-next { background: linear-gradient(180deg, #fff 0%, #f1edfd 100%); }
.detail-next .detail-kicker { color: var(--next); }
.detail-next .feat-badge { color: var(--next); background: var(--next-soft); }
.detail-next .detail-find strong { color: var(--next); }
