/* ============================================================
   村级自治管理平台 —— 官网样式
   ------------------------------------------------------------
   设计原则：
     · 零外部依赖（不引 CDN、不引字体、不引图标库）—— 国内环境打开快，断网也不怕
     · 政务蓝主色，克制、干净，面向村委和乡镇的正式场景
     · 移动端可用（村干部常用手机看）
   改配色：只改下面 :root 里的变量即可，全站跟着变。
   ============================================================ */

:root {
  /* ---- 主色 ---- */
  --c-primary:      #1657a8;
  --c-primary-dark: #0e3f7e;
  --c-primary-soft: #e8f1fb;
  --c-accent:       #2f9e6e;

  /* ---- 文字 ---- */
  --c-text:    #1b2733;
  --c-text-2:  #4a5b6d;
  --c-text-3:  #7a8b9c;

  /* ---- 背景与边框 ---- */
  --c-bg:      #ffffff;
  --c-bg-soft: #f5f8fc;
  --c-bg-deep: #0d2b52;
  --c-line:    #e2eaf3;

  /* ---- 间距 ---- */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 24px;
  --sp-6: 32px;
  --sp-7: 48px;
  --sp-8: 64px;
  --sp-9: 88px;

  /* ---- 圆角 ---- */
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 16px;

  --shadow-sm: 0 1px 2px rgba(16, 42, 76, .06), 0 2px 8px rgba(16, 42, 76, .04);
  --shadow-md: 0 4px 12px rgba(16, 42, 76, .08), 0 12px 32px rgba(16, 42, 76, .06);

  --wrap: 1180px;
  --nav-h: 64px;
}

/* ============ 基础 ============ */

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 12px);   /* 锚点跳转别被吸顶导航挡住 */
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--c-bg);
  color: var(--c-text);
  font-family: system-ui, -apple-system, "Segoe UI", "Microsoft YaHei UI",
               "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB",
               "Source Han Sans SC", "Noto Sans CJK SC", sans-serif;
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

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

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

h1, h2, h3 { line-height: 1.35; margin: 0; font-weight: 700; }
p { margin: 0; }

code {
  font-family: "Cascadia Mono", Consolas, "Courier New", monospace;
  background: var(--c-bg-soft);
  border: 1px solid var(--c-line);
  border-radius: 4px;
  padding: 1px 6px;
  font-size: .9em;
  color: var(--c-primary-dark);
  word-break: break-all;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--sp-5);
}

/* 键盘可达性：焦点可见 */
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--c-primary);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ============ 顶部导航 ============ */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: saturate(180%) blur(10px);
  -webkit-backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--c-line);
}

.nav-inner {
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-5);
}

.brand {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  color: var(--c-text);
  font-weight: 700;
  font-size: 17px;
  letter-spacing: .2px;
  white-space: nowrap;
}
.brand:hover { text-decoration: none; }

/* 纯 CSS 画的标志：蓝色圆角方块里一个白色屋顶 */
.brand-mark {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: linear-gradient(135deg, #2f7ad1, var(--c-primary-dark));
  position: relative;
  flex: none;
}
.brand-mark::before {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 13px;
  height: 10px;
  background: #fff;
  clip-path: polygon(50% 0, 100% 42%, 88% 42%, 88% 100%, 12% 100%, 12% 42%, 0 42%);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--sp-5);
  margin-left: auto;
}
.nav-links a {
  color: var(--c-text-2);
  font-size: 15px;
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
}
.nav-links a:hover {
  color: var(--c-primary);
  border-bottom-color: var(--c-primary);
  text-decoration: none;
}

.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border: 1px solid var(--c-line);
  background: #fff;
  border-radius: var(--r-sm);
  cursor: pointer;
  padding: 9px 8px;
  flex-direction: column;
  justify-content: space-between;
}
.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--c-text-2);
  border-radius: 2px;
}

/* ============ 首屏 ============ */

.hero {
  background:
    radial-gradient(1100px 460px at 12% -12%, rgba(47, 122, 209, .38), transparent 62%),
    linear-gradient(160deg, #0d2b52 0%, #123c72 52%, #1657a8 100%);
  color: #fff;
  padding: var(--sp-9) 0 var(--sp-8);
  overflow: hidden;
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: var(--sp-8);
  align-items: center;
}

.hero-badge {
  display: inline-block;
  font-size: 13px;
  letter-spacing: .3px;
  color: #cfe2fa;
  background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 999px;
  padding: 5px 14px;
  margin-bottom: var(--sp-5);
}

.hero h1 {
  font-size: clamp(30px, 4.2vw, 46px);
  letter-spacing: -.5px;
  margin-bottom: var(--sp-5);
}

.hero-sub {
  font-size: 17px;
  color: #d6e5f7;
  line-height: 1.8;
  max-width: 34em;
}
.hero-sub strong { color: #fff; }

.hero-btns {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
  margin: var(--sp-6) 0 var(--sp-5);
}

.hero-points {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2) var(--sp-5);
  font-size: 14px;
  color: #b9d2ee;
}
.hero-points li::before {
  content: "✓";
  color: #6fe0a8;
  font-weight: 700;
  margin-right: 6px;
}

/* 首屏截图：白卡片包一层，显得像"软件截图"而不是一张裸图 */
.hero-shot {
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(4, 18, 38, .45), 0 0 0 1px rgba(255, 255, 255, .14);
  background: #fff;
}
.hero-shot img {
  width: 100%;
  aspect-ratio: 16 / 8.6;
  object-fit: cover;
  object-position: center 30%;   /* 裁掉顶部浏览器栏（里面是内网地址）与底部留白 */
}

/* ============ 按钮 ============ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  height: 46px;
  padding: 0 var(--sp-6);
  border-radius: var(--r-md);
  font-size: 15px;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease, background-color .12s ease;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--c-primary);
  color: #fff;
  box-shadow: 0 4px 14px rgba(22, 87, 168, .28);
}
.btn-primary:hover { background: var(--c-primary-dark); }

/* 深色背景上的次要按钮：白描边 */
.hero .btn-ghost,
.section-demo .btn-ghost {
  background: rgba(255, 255, 255, .1);
  color: #fff;
  border-color: rgba(255, 255, 255, .45);
}
.hero .btn-ghost:hover,
.section-demo .btn-ghost:hover { background: rgba(255, 255, 255, .2); }

/* 浅色背景上的次要按钮 */
.section-download .btn-ghost {
  background: #fff;
  color: var(--c-primary);
  border-color: var(--c-primary);
}
.section-download .btn-ghost:hover { background: var(--c-primary-soft); }

.btn-block { display: flex; width: 100%; }

/* ============ 通用区块 ============ */

.section { padding: var(--sp-9) 0; }
.section + .section { border-top: 1px solid var(--c-line); }
.section-features,
.section-shots,
.section-contact { background: var(--c-bg-soft); }

.section-title {
  font-size: clamp(23px, 2.6vw, 30px);
  letter-spacing: -.3px;
  margin-bottom: var(--sp-4);
}

.section-lead {
  font-size: 16px;
  color: var(--c-text-2);
  max-width: 46em;
  margin-bottom: var(--sp-7);
}

/* ============ 介绍 ============ */

.intro-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--sp-5);
}
.intro-card {
  background: var(--c-bg-soft);
  border: 1px solid var(--c-line);
  border-radius: var(--r-md);
  padding: var(--sp-6);
}
.intro-card h3 {
  font-size: 17px;
  margin-bottom: var(--sp-3);
  color: var(--c-primary-dark);
}
.intro-card p { color: var(--c-text-2); font-size: 15px; }

/* ============ 功能模块 ============ */

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: var(--sp-5);
}

.feature {
  background: #fff;
  border: 1px solid var(--c-line);
  border-radius: var(--r-md);
  padding: var(--sp-6);
  transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease;
}
.feature:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: #c9dcf1;
}
.feature h3 { font-size: 17px; margin-bottom: var(--sp-3); }
.feature p { font-size: 14.5px; color: var(--c-text-2); line-height: 1.72; }

/* 图标：一个色块 + 一个汉字，不依赖图标字体 */
.feature-icon {
  width: 42px;
  height: 42px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  margin-bottom: var(--sp-4);
  letter-spacing: 0;
}
.i-pop   { background: linear-gradient(135deg, #4a90d9, #1657a8); }
.i-col   { background: linear-gradient(135deg, #6dbd7a, #2f7d4f); }
.i-land  { background: linear-gradient(135deg, #d9a94a, #a97a1f); }
.i-house { background: linear-gradient(135deg, #e08a72, #b5573c); }
.i-map   { background: linear-gradient(135deg, #5aa9c4, #21748f); }
.i-inc   { background: linear-gradient(135deg, #b98ad6, #7a4fa3); }
.i-con   { background: linear-gradient(135deg, #7a93b8, #3f5c85); }
.i-rem   { background: linear-gradient(135deg, #e0b04a, #b8801f); }
.i-ai    { background: linear-gradient(135deg, #4fb3a5, #1f7d72); }
.i-sys   { background: linear-gradient(135deg, #8b9bb0, #55657a); }

/* ============ 特色 ============ */

.why-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--sp-6) var(--sp-7);
}
.why h3 {
  font-size: 17px;
  margin-bottom: var(--sp-3);
  display: flex;
  align-items: baseline;
  gap: var(--sp-3);
}
.why-no {
  font-size: 13px;
  font-weight: 700;
  color: var(--c-primary);
  background: var(--c-primary-soft);
  border-radius: 6px;
  padding: 2px 8px;
  letter-spacing: .5px;
}
.why p { color: var(--c-text-2); font-size: 15px; }
.why p strong { color: var(--c-text); }

/* ============ 截图 ============ */

.shot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: var(--sp-6);
}

.shot { margin: 0; }
.shot-wide { grid-column: 1 / -1; }

.shot-frame {
  border: 1px solid var(--c-line);
  border-radius: var(--r-md);
  overflow: hidden;
  background: #fff;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .14s ease;
}
.shot:hover .shot-frame { box-shadow: var(--shadow-md); }

.shot-frame img {
  width: 100%;
  aspect-ratio: 16 / 8.8;
  object-fit: cover;
  object-position: center 30%;   /* 同上：裁掉浏览器栏与底部留白 */
}
/* 宽图（整行）留得高一点，细节更清楚 */
.shot-wide .shot-frame img { aspect-ratio: 16 / 7.6; }

.shot figcaption {
  margin-top: var(--sp-3);
  font-size: 14px;
  color: var(--c-text-3);
  text-align: center;
}

.shots-note {
  margin-top: var(--sp-6);
  font-size: 13.5px;
  color: var(--c-text-3);
  text-align: center;
}

/* ============ 下载 ============ */

.dl-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--sp-5);
  align-items: start;
}

.dl-card {
  background: #fff;
  border: 1px solid var(--c-line);
  border-radius: var(--r-lg);
  padding: var(--sp-7) var(--sp-6) var(--sp-6);
  box-shadow: var(--shadow-sm);
}
.dl-card-main {
  border-color: var(--c-primary);
  box-shadow: 0 8px 28px rgba(22, 87, 168, .12);
}

.dl-head {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  margin-bottom: var(--sp-4);
}
.dl-head h3 { font-size: 20px; }

.dl-tag {
  font-size: 12px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--c-bg-soft);
  color: var(--c-text-2);
  border: 1px solid var(--c-line);
}
.dl-tag-rec {
  background: var(--c-primary);
  color: #fff;
  border-color: var(--c-primary);
}

.dl-desc {
  font-size: 14.5px;
  color: var(--c-text-2);
  min-height: 3.4em;
  margin-bottom: var(--sp-5);
}
.dl-desc strong { color: var(--c-text); }

.dl-meta {
  margin: 0 0 var(--sp-5);
  border-top: 1px solid var(--c-line);
  padding-top: var(--sp-4);
  display: grid;
  gap: var(--sp-2);
}
.dl-meta > div {
  display: flex;
  justify-content: space-between;
  gap: var(--sp-4);
  font-size: 14px;
}
.dl-meta dt { color: var(--c-text-3); }
.dl-meta dd { margin: 0; color: var(--c-text); font-weight: 600; }

.dl-hash {
  margin-top: var(--sp-3);
  font-size: 12px;
  color: var(--c-text-3);
  word-break: break-all;
  font-family: "Cascadia Mono", Consolas, monospace;
}

.dl-notes {
  margin-top: var(--sp-7);
  padding-top: var(--sp-6);
  border-top: 1px solid var(--c-line);
  display: grid;
  gap: var(--sp-3);
  font-size: 14.5px;
  color: var(--c-text-2);
}

/* ============ 在线体验 ============ */

.section-demo {
  background:
    radial-gradient(900px 400px at 88% 0%, rgba(47, 122, 209, .45), transparent 60%),
    linear-gradient(160deg, #0d2b52, #1657a8);
  color: #fff;
}
.section-demo .section-title { color: #fff; }
.section-demo .section-lead { color: #cfe2fa; }

.demo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--sp-5);
}

.demo-card {
  background: rgba(255, 255, 255, .07);
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: var(--r-lg);
  padding: var(--sp-7) var(--sp-6) var(--sp-6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.demo-card h3 { font-size: 18px; margin-bottom: var(--sp-3); }
.demo-card > p {
  font-size: 14.5px;
  color: #d3e4f8;
  margin-bottom: var(--sp-4);
}
.demo-account { font-size: 14px !important; color: #b9d2ee !important; }
.demo-account code {
  background: rgba(255, 255, 255, .14);
  border-color: rgba(255, 255, 255, .28);
  color: #fff;
}
.demo-card .btn { margin-top: var(--sp-2); }
.demo-card .btn-primary { background: #fff; color: var(--c-primary-dark); }
.demo-card .btn-primary:hover { background: #eaf2fc; }

.demo-note {
  margin-top: var(--sp-6);
  font-size: 13.5px;
  color: #9fbcdd;
}

/* ============ 联系我们 ============ */

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--sp-5);
  align-items: start;
}

.contact-item {
  background: #fff;
  border: 1px solid var(--c-line);
  border-radius: var(--r-md);
  padding: var(--sp-6);
}
.contact-label {
  font-size: 13px;
  color: var(--c-text-3);
  margin-bottom: var(--sp-2);
  letter-spacing: .5px;
}
.contact-value {
  font-size: 19px;
  font-weight: 700;
  color: var(--c-primary-dark);
  word-break: break-all;
}

.contact-qr { text-align: center; }
.contact-qr img {
  width: 160px;
  height: 160px;
  margin: 0 auto var(--sp-3);
  border: 1px solid var(--c-line);
  border-radius: var(--r-sm);
  object-fit: contain;
  background: #fff;
}
.qr-placeholder {
  width: 160px;
  height: 160px;
  margin: 0 auto var(--sp-3);
  border: 1px dashed var(--c-line);
  border-radius: var(--r-sm);
  display: grid;
  place-items: center;
  color: var(--c-text-3);
  font-size: 13px;
  background: var(--c-bg-soft);
}
.qr-hint { font-size: 13px; color: var(--c-text-3); }

/* ============ 页脚 ============ */

.footer {
  background: var(--c-bg-deep);
  color: #93a9c4;
  padding: var(--sp-7) 0;
  font-size: 14px;
}
.footer-inner {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
  align-items: center;
  text-align: center;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  color: #fff;
  font-weight: 700;
  font-size: 16px;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--sp-5);
}
.footer-links a { color: #a9c1dc; }
.footer-links a:hover { color: #fff; }
.footer-note { color: #7e93ad; font-size: 13.5px; }
.footer-note .sep { margin: 0 var(--sp-2); }
.footer-ver { color: #6d819a; font-size: 13px; }

/* ============ 回到顶部 ============ */

.to-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--c-line);
  background: rgba(255, 255, 255, .95);
  color: var(--c-primary);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  opacity: 0;
  visibility: hidden;
  transition: opacity .2s ease, visibility .2s ease;
  z-index: 40;
}
.to-top.show { opacity: 1; visibility: visible; }

/* ============ 移动端 ============ */

@media (max-width: 900px) {
  .hero-inner {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--sp-7);
  }
  .hero { padding: var(--sp-8) 0 var(--sp-7); }
  .hero-shot { order: 2; }
  .intro-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  :root { --sp-9: 56px; --sp-8: 44px; }

  .nav-toggle { display: flex; }

  .nav-links {
    position: absolute;
    top: var(--nav-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: #fff;
    border-bottom: 1px solid var(--c-line);
    box-shadow: var(--shadow-md);
    padding: var(--sp-2) var(--sp-5) var(--sp-4);
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a {
    padding: var(--sp-4) 0;
    border-bottom: 1px solid var(--c-line);
    font-size: 16px;
  }
  .nav-links a:last-child { border-bottom: 0; }

  .feature-grid { grid-template-columns: 1fr; }
  .shot-grid { grid-template-columns: 1fr; }
  .shot-frame img,
  .shot-wide .shot-frame img { aspect-ratio: 16 / 10; }
  .dl-card { padding: var(--sp-6) var(--sp-5) var(--sp-5); }
  .to-top { right: 14px; bottom: 14px; }
}

/* 首屏截图在窄屏上别裁太狠 */
@media (max-width: 520px) {
  .hero-shot img { aspect-ratio: 16 / 11; object-position: center 26%; }
}

/* 尊重"减少动效"的系统设置 */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
