/* ============================================================
   枝络官网 · 设计系统
   配色与 App 一致：主 #0060A8 / 辅绿 #1B7A50 / 底 #F6F6F6
   ============================================================ */
:root {
  --primary: #0060A8;
  --primary-dark: #00325C;
  --primary-light: #D1E4FF;
  --green: #1B7A50;
  --green-light: #C6F3D7;
  --red: #C43A31;
  --bg: #FAF8F2;
  --surface: #FFFFFF;
  --text: #2C2E2E;
  --text-2: #585A5A;
  --text-3: #6F6F6F;
  --line: #E5E1D8;
  --radius: 14px;
  --shadow: 0 2px 12px rgba(44, 46, 46, .08);
  --shadow-lg: 0 12px 40px rgba(44, 46, 46, .14);
  --max-w: 1120px;
  --serif: "Songti SC", "STSong", "SimSun", "Noto Serif SC", serif;
  --sans: "HarmonyOS Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  color: var(--text);
  background-color: var(--bg);
  background-image: url("../img/paper-xuan.jpg");
  background-size: 512px 512px;
  line-height: 1.75;
  font-size: 16px;
}

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

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* 无障碍：焦点环 */
:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---------- 顶部导航 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 248, 242, .92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 20px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
}
.brand img { width: 34px; height: 34px; border-radius: 8px; }
.brand:hover { text-decoration: none; }

.main-nav ul { list-style: none; display: flex; gap: 6px; }
.main-nav a {
  display: block;
  padding: 8px 14px;
  border-radius: 8px;
  color: var(--text-2);
  font-size: 15px;
}
.main-nav a:hover { background: var(--primary-light); color: var(--primary-dark); text-decoration: none; }
.main-nav a[aria-current="page"] { background: var(--primary); color: #fff; }

.nav-toggle {
  display: none;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 15px;
  cursor: pointer;
  color: var(--text);
}

/* ---------- 布局 ---------- */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 20px; }
.section { padding: 64px 0; }
.section-title {
  font-family: var(--serif);
  font-size: 30px;
  text-align: center;
  margin-bottom: 10px;
}
.section-sub { text-align: center; color: var(--text-2); margin-bottom: 40px; }

/* ---------- Hero ---------- */
.hero {
  padding: 72px 0 56px;
  text-align: center;
  background: linear-gradient(180deg, rgba(209, 228, 255, .35), rgba(250, 248, 242, 0) 80%);
}
.hero .app-icon {
  width: 96px;
  height: 96px;
  border-radius: 22px;
  margin: 0 auto 20px;
  box-shadow: var(--shadow-lg);
}
.hero h1 {
  font-family: var(--serif);
  font-size: 42px;
  letter-spacing: 2px;
  margin-bottom: 14px;
}
.hero .tagline { font-size: 19px; color: var(--text-2); margin-bottom: 8px; }
.hero .platform {
  display: inline-block;
  background: var(--primary-light);
  color: var(--primary-dark);
  font-size: 14px;
  padding: 4px 14px;
  border-radius: 999px;
  margin-bottom: 24px;
}
.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

.btn {
  display: inline-block;
  padding: 12px 28px;
  border-radius: 10px;
  font-size: 16px;
  transition: transform .15s ease, box-shadow .15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.btn-primary { background: var(--primary); color: #fff; }
.btn-ghost { border: 1.5px solid var(--primary); color: var(--primary); background: transparent; }

.hero-note { margin-top: 14px; font-size: 13px; color: var(--text-3); }

/* ---------- 卡片网格 ---------- */
.grid { display: grid; gap: 22px; }
.grid-3 { grid-template-columns: 1fr; }
.grid-2 { grid-template-columns: 1fr; }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow);
}
.card .icon { font-size: 34px; margin-bottom: 12px; }
.card h3 { font-size: 18px; margin-bottom: 8px; }
.card p { color: var(--text-2); font-size: 15px; }

/* ---------- 功能区（图文左右） ---------- */
.feature {
  display: grid;
  gap: 32px;
  align-items: center;
  margin-bottom: 56px;
}
.feature:last-child { margin-bottom: 0; }
.feature .text h3 {
  font-family: var(--serif);
  font-size: 24px;
  margin-bottom: 12px;
}
.feature .text p { color: var(--text-2); margin-bottom: 10px; }
.feature .text ul { padding-left: 20px; color: var(--text-2); }
.feature .text li { margin-bottom: 6px; }

/* 手机截图壳 */
.phone {
  border: 10px solid #2C2E2E;
  border-radius: 32px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  max-width: 300px;
  margin: 0 auto;
  background: #000;
}
.phone img { width: 100%; display: block; }
.phone-sm .phone { max-width: 250px; }

/* ---------- 步骤 ---------- */
.steps { counter-reset: step; list-style: none; max-width: 720px; margin: 0 auto; }
.steps li {
  counter-increment: step;
  position: relative;
  padding: 0 0 28px 64px;
}
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}
.steps li::after {
  content: "";
  position: absolute;
  left: 19px;
  top: 44px;
  bottom: 4px;
  width: 2px;
  background: var(--line);
}
.steps li:last-child::after { display: none; }
.steps h3 { font-size: 18px; margin-bottom: 4px; }
.steps p { color: var(--text-2); font-size: 15px; }

/* ---------- 教程章节 ---------- */
.guide-step {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 32px;
  margin-bottom: 32px;
  scroll-margin-top: 80px;
}
.guide-step .no {
  display: inline-block;
  background: var(--primary-light);
  color: var(--primary-dark);
  font-weight: 700;
  font-size: 14px;
  padding: 2px 12px;
  border-radius: 999px;
  margin-bottom: 12px;
}
.guide-step h2 { font-family: var(--serif); font-size: 24px; margin-bottom: 10px; }
.guide-step p { color: var(--text-2); margin-bottom: 10px; }
.guide-step ol { padding-left: 22px; color: var(--text-2); }
.guide-step ol li { margin-bottom: 8px; }
.guide-step .shot { margin-top: 20px; }

/* ---------- 画廊 ---------- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 22px;
}
.gallery-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  box-shadow: var(--shadow);
  cursor: zoom-in;
  transition: transform .15s ease;
}
.gallery-item:hover { transform: translateY(-4px); }
.gallery-item img {
  width: 100%;
  aspect-ratio: 1224 / 2700;
  object-fit: cover;
  border-radius: 10px;
}
.gallery-item figcaption {
  text-align: center;
  font-size: 14px;
  color: var(--text-2);
  padding-top: 10px;
}

/* 灯箱 */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, .85);
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.lightbox.open { display: flex; }
.lightbox img {
  max-height: 92vh;
  max-width: 92vw;
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
}
.lightbox .close {
  position: absolute;
  top: 16px;
  right: 20px;
  font-size: 30px;
  color: #fff;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

/* ---------- FAQ ---------- */
.faq-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 14px;
  overflow: hidden;
}
.faq-item h3 { font-size: 16px; }
.faq-item h3 button {
  width: 100%;
  text-align: left;
  padding: 18px 22px;
  background: none;
  border: none;
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.faq-item h3 button .arrow { transition: transform .2s ease; color: var(--primary); }
.faq-item h3 button[aria-expanded="true"] .arrow { transform: rotate(90deg); }
.faq-item .answer { padding: 0 22px 18px; color: var(--text-2); display: none; }
.faq-item .answer.open { display: block; }

/* ---------- 表格 ---------- */
.fact-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  font-size: 15px;
}
.fact-table th, .fact-table td {
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}
.fact-table th { background: var(--primary-light); color: var(--primary-dark); white-space: nowrap; }
.fact-table tr:last-child td { border-bottom: none; }

/* ---------- 法务页 ---------- */
.legal { max-width: 800px; margin: 0 auto; }
.legal h2 {
  font-family: var(--serif);
  font-size: 20px;
  margin: 32px 0 12px;
}
.legal p {
  color: var(--text-2);
  margin-bottom: 12px;
  word-break: break-word;
}
.legal strong { color: var(--text); }

/* ---------- 面包屑 ---------- */
.breadcrumb { font-size: 14px; color: var(--text-3); padding: 18px 0 0; }
.breadcrumb ol { list-style: none; display: flex; gap: 8px; }
.breadcrumb a { color: var(--text-3); }

/* ---------- 页脚 ---------- */
.site-footer {
  margin-top: 64px;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, .6);
  padding: 36px 0 28px;
  text-align: center;
  color: var(--text-3);
  font-size: 14px;
}
.site-footer .links { margin-bottom: 12px; }
.site-footer .links a { margin: 0 10px; color: var(--text-2); }
.site-footer .icp a { color: var(--text-3); }
.site-footer p { margin-bottom: 6px; }

/* ---------- 响应式 ---------- */
@media (min-width: 720px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .feature { grid-template-columns: 1fr 1fr; }
  .feature.reverse .text { order: 1; }
  .feature.reverse .media { order: 2; }
}
@media (min-width: 1000px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 719px) {
  .nav-toggle { display: block; }
  .main-nav {
    display: none;
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-lg);
  }
  .main-nav.open { display: block; }
  .main-nav ul { flex-direction: column; padding: 10px; }
  .main-nav a { padding: 14px; }
  .hero h1 { font-size: 32px; }
  .section { padding: 44px 0; }
  .section-title { font-size: 25px; }
  .guide-step { padding: 22px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}
