:root {
  --primary: #2f6df6;
  --primary-dark: #1f4fc4;
  --primary-soft: #eaf1ff;
  --ink: #1c2433;
  --muted: #5b6678;
  --bg: #ffffff;
  --bg-alt: #f5f8ff;
  --line: #e4e9f2;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(31, 79, 196, 0.08);
  --maxw: 1140px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
}
a { color: inherit; text-decoration: none; }
code {
  background: #eef2f8;
  padding: 1px 6px;
  border-radius: 6px;
  font-size: 0.9em;
  color: #1f4fc4;
}

/* ===== 导航 ===== */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.brand { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 20px; }
.brand-logo { font-size: 24px; }
.brand-name { color: var(--primary); }
.nav-links { display: flex; gap: 22px; margin-left: 24px; flex: 1; }
.nav-links a { color: var(--muted); font-size: 15px; transition: color .2s; }
.nav-links a:hover { color: var(--primary); }
.nav-cta { margin-left: auto; }
.nav-toggle { display: none; background: none; border: 0; font-size: 24px; cursor: pointer; color: var(--ink); }

/* ===== 按钮 ===== */
.btn {
  display: inline-block;
  padding: 10px 18px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: transform .12s, box-shadow .2s, background .2s;
  border: 1px solid transparent;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); box-shadow: var(--shadow); }
.btn-ghost { background: #fff; color: var(--primary); border-color: var(--primary); }
.btn-ghost:hover { background: var(--primary-soft); }
.btn-lg { padding: 14px 26px; font-size: 16px; }

/* ===== Hero ===== */
.hero { position: relative; overflow: hidden; }
.hero-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(900px 400px at 80% -10%, rgba(47,109,246,0.18), transparent),
    radial-gradient(700px 360px at 0% 10%, rgba(47,109,246,0.10), transparent),
    linear-gradient(180deg, #f7faff, #ffffff);
}
.hero-inner {
  position: relative;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 90px 20px 70px;
  text-align: center;
}
.badge {
  display: inline-block;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--primary);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  box-shadow: var(--shadow);
}
.hero h1 { font-size: 44px; line-height: 1.25; margin: 18px 0 14px; }
.hero-sub { color: var(--muted); font-size: 18px; max-width: 760px; margin: 0 auto 28px; }
.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.hero-stats {
  display: flex; gap: 40px; justify-content: center; margin-top: 50px; flex-wrap: wrap;
}
.hero-stats div { display: flex; flex-direction: column; }
.hero-stats strong { font-size: 30px; color: var(--primary); }
.hero-stats span { color: var(--muted); font-size: 14px; }

/* ===== 通用区块 ===== */
.section { max-width: var(--maxw); margin: 0 auto; padding: 72px 20px; }
.section-alt { background: var(--bg-alt); max-width: none; }
.section-alt > * { max-width: var(--maxw); margin-left: auto; margin-right: auto; }
.section-head { text-align: center; margin-bottom: 44px; }
.section-head h2 { font-size: 32px; margin: 0 0 10px; }
.section-head p { color: var(--muted); font-size: 17px; margin: 0; }

/* ===== 卡片 ===== */
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; transition: transform .15s, box-shadow .2s, border-color .2s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: #cdd9f3; }
.card-ico { font-size: 30px; margin-bottom: 10px; }
.card h3 { margin: 0 0 8px; font-size: 18px; }
.card p { margin: 0; color: var(--muted); font-size: 14.5px; }

/* ===== 架构 ===== */
.arch { display: flex; align-items: center; justify-content: center; gap: 0; flex-wrap: wrap; }
.arch-node {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px 30px; width: 320px; box-shadow: var(--shadow);
}
.arch-node h3 { margin: 0 0 14px; }
.arch-node.master { border-top: 4px solid var(--primary); }
.arch-node.slave { border-top: 4px solid #16a34a; }
.arch-node ul { margin: 0; padding-left: 18px; color: var(--muted); font-size: 14.5px; }
.arch-node li { margin: 6px 0; }
.arch-flow { position: relative; width: 140px; text-align: center; }
.flow-line { height: 3px; background: linear-gradient(90deg, var(--primary), #16a34a); border-radius: 3px; }
.flow-label { display: block; margin-top: 8px; font-size: 13px; color: var(--muted); }
.arch-note { text-align: center; color: var(--muted); max-width: 820px; margin: 30px auto 0; font-size: 15px; }

/* ===== 下载 ===== */
.download-card {
  display: grid; grid-template-columns: 1.4fr 1fr; gap: 0;
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); background: #fff;
}
.dl-left { padding: 34px; }
.dl-tag { display: inline-block; background: var(--primary-soft); color: var(--primary); padding: 4px 12px; border-radius: 999px; font-size: 13px; font-weight: 600; }
.dl-left h3 { margin: 14px 0 8px; font-size: 24px; }
.dl-desc { color: var(--muted); margin: 0 0 16px; }
.dl-meta { list-style: none; padding: 0; margin: 0 0 22px; }
.dl-meta li { color: var(--muted); font-size: 14px; padding: 5px 0; border-bottom: 1px dashed var(--line); }
.dl-hint { color: #9aa4b5; font-size: 13px; margin-top: 12px; }
.dl-right { background: var(--bg-alt); padding: 34px; }
.dl-right h4 { margin: 0 0 14px; }
.changelog { list-style: none; padding: 0; margin: 0; }
.changelog li { font-size: 14px; color: var(--muted); padding: 8px 0; border-bottom: 1px dashed var(--line); }
.changelog b { color: var(--primary); }

/* ===== 文档 ===== */
.doc-card {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px; box-shadow: var(--shadow);
}
.doc-item { padding: 16px; border: 1px solid var(--line); border-radius: 12px; }
.doc-item h3 { margin: 0 0 6px; font-size: 17px; }
.doc-item p { margin: 0; color: var(--muted); font-size: 14px; }
.doc-card > .btn { grid-column: 1 / -1; justify-self: start; }

/* ===== 联系 ===== */
.contact { display: grid; gap: 14px; max-width: 760px; margin: 0 auto; }
.contact-item {
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  padding: 16px 20px; font-size: 15px;
}

/* ===== 页脚 ===== */
.footer { background: #0f1830; color: #c7d0e0; margin-top: 40px; }
.footer-inner {
  max-width: var(--maxw); margin: 0 auto; padding: 36px 20px;
  display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap;
}
.footer .brand-name { color: #fff; font-size: 20px; }
.footer p { margin: 6px 0 0; color: #8b97ad; font-size: 14px; }
.footer-links { display: flex; gap: 20px; align-items: center; }
.footer-links a { color: #c7d0e0; font-size: 14px; }
.footer-links a:hover { color: #fff; }
.footer-copy { text-align: center; padding: 16px; border-top: 1px solid #1c2540; color: #7c879c; font-size: 13px; }

/* ===== 响应式 ===== */
@media (max-width: 900px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .download-card { grid-template-columns: 1fr; }
  .doc-card { grid-template-columns: 1fr; }
  .hero h1 { font-size: 34px; }
}
@media (max-width: 640px) {
  .nav-links {
    position: absolute; top: 100%; left: 0; right: 0;
    background: #fff; flex-direction: column; gap: 0;
    border-bottom: 1px solid var(--line); display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 14px 20px; border-top: 1px solid var(--line); }
  .nav-toggle { display: block; }
  .cards { grid-template-columns: 1fr; }
  .hero-stats { gap: 22px; }
  .hero h1 { font-size: 28px; }
}
