/* ============================================================
   知微官网 - 官网页面公共样式
   来源：index.html 原内联样式（官网主页/下载教程页）
   引用方式：<link rel="stylesheet" href="css/theme.css">
   ============================================================ */

:root {
  --ink: #27213d;
  --muted: #665f78;
  --purple: #6848c7;
  --purple-dark: #41278f;
  --lav: #f3efff;
  --line: #e5def3;
  --paper: #fff;
  --warm: #fff9ef;
  --green: #23704a;
  --shadow: 0 10px 28px rgba(57, 39, 112, .10);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: #fbfaff;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 18px;
  line-height: 1.75;
}
a { color: inherit; }
img { display: block; max-width: 100%; }

.wrap { width: min(1120px, calc(100% - 40px)); margin: auto; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; background: #fff; padding: 8px; z-index: 5; }

.top {
  position: sticky; top: 0; z-index: 5;
  background: rgba(251, 250, 255, .96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}
.nav { min-height: 70px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { font-size: 23px; font-weight: 800; letter-spacing: .08em; color: var(--purple-dark); text-decoration: none; }
.navlinks { display: flex; gap: 20px; align-items: center; font-size: 16px; color: var(--muted); }
.navlinks a { text-decoration: none; }
.navlinks a:hover, .navlinks a:focus { color: var(--purple-dark); }

.hero { padding: 78px 0 70px; background: linear-gradient(135deg, #f1edff 0%, #fff 58%, #fff8ed 100%); }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; align-items: center; gap: 60px; }
.eyebrow { color: var(--purple); font-weight: 800; letter-spacing: .08em; }
.hero h1 { font-size: clamp(36px, 5vw, 60px); line-height: 1.2; margin: 12px 0 20px; letter-spacing: -.03em; }
.hero p { font-size: 21px; color: var(--muted); max-width: 640px; margin: 0 0 28px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 54px; padding: 10px 23px; border-radius: 12px;
  border: 1px solid var(--purple); font-size: 18px; font-weight: 800;
  text-decoration: none; cursor: pointer;
}
.btn-primary { color: #fff; background: var(--purple); }
.btn-primary:hover, .btn-primary:focus { background: var(--purple-dark); }
.btn-secondary { color: var(--purple-dark); background: #fff; }
.btn-disabled { color: #8d889b; border-color: #d9d5e3; background: #f3f1f6; cursor: not-allowed; }
.hero-note { font-size: 16px !important; color: var(--muted); margin-top: 14px !important; }

.hero-visual { padding: 18px; border-radius: 28px; background: #fff; box-shadow: var(--shadow); transform: rotate(1deg); }
.hero-visual img { width: min(100%, 390px); margin: auto; border-radius: 16px; }

.section { padding: 78px 0; }
.section-alt { background: #fff; }
.section-head { max-width: 760px; margin: 0 auto 38px; text-align: center; }
.section-head h2 { font-size: clamp(30px, 4vw, 43px); line-height: 1.3; margin: 0 0 13px; }
.section-head p { color: var(--muted); margin: 0; }

.notice { padding: 24px 26px; border-radius: 16px; border: 1px solid #e7d9f5; background: var(--lav); margin-bottom: 30px; }
.notice strong { color: var(--purple-dark); }
.notice p { margin: 7px 0 0; }

.quick-grid, .steps, .feature-grid, .faq-grid { display: grid; gap: 22px; }
.quick-grid { grid-template-columns: repeat(3, 1fr); }
.quick { padding: 26px; background: #fff; border: 1px solid var(--line); border-radius: 17px; box-shadow: var(--shadow); }
.quick-num, .step-num {
  display: inline-grid; place-items: center;
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--purple); color: #fff; font-weight: 800;
}
.quick h3, .step h3, .feature h3 { margin: 15px 0 7px; font-size: 22px; line-height: 1.35; }
.quick p, .step p, .feature p { margin: 0; color: var(--muted); }

/* ---------- 步骤卡：统一 3 列、内部固定分区 ----------
   卡片纵向三段式：① 序号+标题（顶部）② 说明文字（固定 3 行高）③ 截图（贴底）
   保证每张卡各元素纵向位置一致，视觉有迹可循 */
.steps { grid-template-columns: repeat(3, 1fr); }
.step {
  padding: 25px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 17px;
  display: flex;
  flex-direction: column;
}
.step .step-num { flex-shrink: 0; }
.step h3 { margin: 15px 0 7px; font-size: 21px; line-height: 1.35; }
/* 说明文字区：统一预留 3 行高度，长短文案都在同一基线开始 */
.step p {
  min-height: 5.3em;
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.75;
}
/* 截图区固定比例、贴底，所有卡片图片顶部/底部完全对齐 */
.step .shot-frame { margin-top: auto; }
.step .shot-frame img { width: 100%; height: 100%; object-fit: contain; border-radius: 11px; }
.step small { display: block; color: var(--purple-dark); font-weight: 800; margin-top: 13px; font-size: 15px; }

.feature-grid { grid-template-columns: repeat(2, 1fr); }
.feature {
  display: grid; grid-template-columns: 170px 1fr; gap: 24px;
  padding: 25px; background: #fff; border: 1px solid var(--line);
  border-radius: 19px; box-shadow: var(--shadow);
}
.feature img { width: 170px; height: auto; border-radius: 11px; background: #f2eff8; }
.feature h3 { margin-top: 0; }
.feature .label {
  display: inline-block; margin-bottom: 8px; padding: 2px 10px;
  border-radius: 999px; color: var(--green); background: #eaf7f0;
  font-size: 14px; font-weight: 800;
}
.feature ul { padding-left: 21px; margin: 12px 0 0; color: var(--muted); }
.feature li { margin: 4px 0; }

.audience { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.audience-card { padding: 28px; border-radius: 19px; background: var(--warm); border: 1px solid #f1e2c5; }
.audience-card h3 { margin-top: 0; }
.audience-card ul { margin-bottom: 0; }

.faq-grid { grid-template-columns: 1fr 1fr; }
.faq { padding: 23px 25px; background: #fff; border: 1px solid var(--line); border-radius: 15px; }
.faq h3 { font-size: 20px; line-height: 1.4; margin: 0 0 8px; }
.faq p { margin: 0; color: var(--muted); }

.cta { padding: 65px 0; background: var(--purple-dark); color: #fff; text-align: center; }
.cta h2 { font-size: 36px; line-height: 1.3; margin: 0 0 13px; }
.cta p { margin: 0 auto 23px; color: #e7e2ff; }
.cta .btn-secondary { border-color: #fff; }

.back { display: inline-block; margin-top: 22px; color: var(--purple-dark); font-weight: 800; text-decoration: none; }
/* footer 样式见下方"页脚"区块 */

/* ---------- 浮动返回顶部按钮 ---------- */
.back-to-top {
  position: fixed;
  right: 22px;
  bottom: 34px;
  z-index: 50;
  width: 46px;
  height: 46px;
  border: none;
  border-radius: 50%;
  background: var(--purple);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(65, 39, 143, .35);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity .25s, transform .25s, visibility .25s;
}
.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.back-to-top:hover, .back-to-top:focus-visible {
  background: var(--purple-dark);
}

/* ---------- 页脚 ---------- */
.footer {
  padding: 40px 0 34px;
  color: var(--muted);
  font-size: 14px;
  text-align: center;
  background: #fff;
  border-top: 1px solid var(--line);
}
.footer p { margin: 5px 0; }
.footer-brand { font-size: 16px; font-weight: 800; color: var(--purple-dark); letter-spacing: .06em; margin-bottom: 8px; }
.footer-icp a { color: var(--muted); text-decoration: none; }
.footer-icp a:hover { color: var(--purple-dark); }

/* ---------- 教程页 Hero ---------- */
.tutorial-hero {
  background: linear-gradient(165deg, #1E1040 0%, #2D1B69 30%, #4C1D95 65%, #5B30B8 100%);
  padding: 48px 24px 52px; text-align: center;
  position: relative; overflow: hidden; border-radius: 0 0 36px 36px; color: #fff;
}
.tutorial-hero::before {
  content: ''; position: absolute; top: -120px; right: -80px;
  width: 360px; height: 360px; border-radius: 50%;
  background: radial-gradient(circle, rgba(139, 92, 246, .25) 0%, transparent 65%);
  pointer-events: none;
}
.tutorial-hero::after {
  content: ''; position: absolute; bottom: -40px; left: -60px;
  width: 260px; height: 260px; border-radius: 50%;
  background: radial-gradient(circle, rgba(196, 181, 253, .1) 0%, transparent 65%);
  pointer-events: none;
}
.tutorial-hero > * { position: relative; z-index: 1; }
.tutorial-hero-brand { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 28px; }
.tutorial-hero-brand .brand-dot {
  width: 8px; height: 8px; background: #C4B5FD; border-radius: 50%;
  box-shadow: 0 0 12px rgba(196, 181, 253, .55);
}
.tutorial-hero-brand .brand-name { color: rgba(255, 255, 255, .75); font-size: 15px; font-weight: 500; letter-spacing: 3px; }
.tutorial-hero h1 { font-size: 28px; font-weight: 800; color: #fff; line-height: 1.35; letter-spacing: 1px; margin: 0 0 10px; }
.tutorial-hero h1 .accent {
  background: linear-gradient(135deg, #C4B5FD 0%, #EDE9FE 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.tutorial-hero .sub { font-size: 14px; color: rgba(255, 255, 255, .58); line-height: 1.65; margin: 0 auto 30px; max-width: 300px; }
.tutorial-hero-phone {
  width: 230px; margin: 0 auto 28px; border-radius: 24px; overflow: hidden;
  box-shadow: 0 24px 64px rgba(0, 0, 0, .35), 0 0 0 1px rgba(255, 255, 255, .08) inset;
}
.tutorial-hero-phone img { display: block; width: 100%; height: auto; }
.tutorial-hero .btn-group { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }
.tutorial-hero .btn-android, .tutorial-hero .btn-ios {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 13px 26px; border-radius: 999px;
  font-size: 14px; font-family: inherit; letter-spacing: .3px;
}
.tutorial-hero .btn-android {
  background: #fff; color: #4C1D95; font-weight: 700; border: 0;
  box-shadow: 0 4px 24px rgba(0, 0, 0, .22); cursor: pointer;
}
.tutorial-hero .btn-ios {
  background: rgba(255, 255, 255, .05); color: rgba(255, 255, 255, .28);
  border: 1px solid rgba(255, 255, 255, .07); cursor: not-allowed; pointer-events: none;
}
.tutorial-hero .btn-icon { width: 18px; height: 18px; flex-shrink: 0; }
.tutorial-hero .btn-ios .btn-icon { opacity: .4; }

/* ---------- App 界面截图规范化 ----------
   所有手机截图统一放入固定比例的展示框（9:19.5 手机屏比例），
   图片完整显示不裁剪（contain），尺寸不同的原图也能排出整齐网格。
   新增模块配图时直接 <img src="..."> 即可，无需关心原图尺寸。 */
.shot-frame {
  position: relative;
  width: 100%;
  margin-top: 18px;
  border-radius: 14px;
  background: #f2eff8;
  overflow: hidden;
}
/* 步骤卡里的截图（1 列展示，稍高） */
.step .shot-frame { aspect-ratio: 3 / 4.6; max-height: 420px; margin-inline: auto; }
.step .shot-frame img { width: 100%; height: 100%; object-fit: contain; }
/* 功能卡里的截图（与左栏 170px 等宽） */
.feature .shot-frame { aspect-ratio: 9 / 16; }
.feature .shot-frame img { width: 100%; height: 100%; object-fit: contain; }
/* 兼容未包 shot-frame 的旧结构：保持原行为 */
.step img, .feature img { height: auto; max-height: none; aspect-ratio: auto; object-fit: contain; object-position: center; }

/* ---------- 移动端适配 ---------- */
@media (max-width: 800px) {
  body { font-size: 17px; }
  .wrap { width: min(100% - 28px, 560px); }
  .nav { min-height: 62px; }
  .navlinks { gap: 8px; font-size: 13px; }
  .navlinks a { white-space: nowrap; }
  .hero { padding: 52px 0; }
  .hero-grid { grid-template-columns: 1fr; gap: 32px; }
  .hero h1 { font-size: 39px; }
  .hero p { font-size: 19px; }
  .hero-visual { max-width: 340px; margin: auto; }
  .section { padding: 56px 0; }
  .quick-grid, .steps, .feature-grid, .audience, .faq-grid { grid-template-columns: 1fr; }
  #install .steps { grid-template-columns: 1fr; }
  .steps { gap: 16px; }
  .step { padding: 19px; }
  /* 移动端：序号与标题同排，说明与截图保持与桌面相同的三段式结构 */
  .step .step-head { display: flex; align-items: center; gap: 12px; }
  .step h3 { margin: 0; font-size: 19px; }
  .step p { margin-top: 8px; min-height: 0; font-size: 15px; line-height: 1.7; }
  .step .shot-frame { margin-top: 14px; max-width: 260px; align-self: center; }
  .feature { grid-template-columns: 110px 1fr; gap: 16px; padding: 19px; }
  .feature img { width: 110px; height: auto; }
  .feature .shot-frame { max-width: 120px; }
  .feature h3 { font-size: 20px; }
  .btn { width: 100%; }
  .hero-actions { display: grid; }
  .notice { padding: 19px; }
  .cta { padding: 50px 0; }
  .cta h2 { font-size: 30px; }
  .tutorial-hero-phone { margin-top: 28px; }
}

@media (min-width: 801px) {
  .tutorial-hero {
    display: flex; align-items: center; justify-content: center; gap: 80px;
    min-height: 580px; padding: 96px 60px 100px; text-align: left; border-radius: 0;
  }
  .tutorial-hero::before { top: -200px; right: -120px; width: 600px; height: 600px; }
  .tutorial-hero::after { bottom: -100px; left: -100px; width: 450px; height: 450px; }
  .tutorial-hero-left { max-width: 520px; flex-shrink: 0; }
  .tutorial-hero-right { flex-shrink: 0; }
  .tutorial-hero-brand { margin-bottom: 32px; }
  .tutorial-hero-brand .brand-name { font-size: 17px; letter-spacing: 4px; }
  .tutorial-hero h1 { font-size: 48px; line-height: 1.25; letter-spacing: 2px; margin-bottom: 14px; }
  .tutorial-hero .sub { font-size: 17px; max-width: 520px; margin-left: 0; margin-right: 0; margin-bottom: 28px; }
  .tutorial-hero .btn-group { justify-content: flex-start; }
  .tutorial-hero .btn-android, .tutorial-hero .btn-ios { padding: 16px 30px; font-size: 15px; }
  .tutorial-hero-phone { width: 280px; margin: 0; border-radius: 30px; }
}
