/* ============================================================
   静安居官网 · 共享设计系统（极简留白 / 苹果风）
   四页共用：index.html / privacy.html / terms.html / download.html
   ============================================================ */

/* ---------- 设计令牌 ---------- */
:root {
  --bg: #ffffff;
  --bg-soft: #fbfaf7;          /* 分区交替的暖白 */
  --ink: #1d1d1f;              /* 标题墨黑 */
  --ink-2: #5f5f66;            /* 正文 */
  --ink-3: #8a8a8f;            /* 辅助/页脚 */
  --brand: #1e5a46;            /* 品牌墨绿（克制点缀） */
  --brand-2: #2c7a5f;          /* hover */
  --brand-soft: rgba(30, 90, 70, .07);
  --line: #ecebe6;             /* 发丝线 */
  --line-2: #e2e0d8;
  --nav-h: 60px;
  --maxw: 1120px;
  --prose: 720px;
  --shadow-icon: 0 14px 34px rgba(20, 32, 26, .16);
  --shadow-btn: 0 8px 22px rgba(30, 90, 70, .24);
  --ease: cubic-bezier(.22, .61, .36, 1);
}

/* ---------- 基础重置 ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 16px); -webkit-text-size-adjust: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", "Noto Sans SC", sans-serif;
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul { list-style: none; }
button { font: inherit; background: none; border: none; cursor: pointer; }

/* ---------- 布局工具 ---------- */
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.wrap-prose { width: 100%; max-width: var(--prose); margin: 0 auto; padding: 0 24px; }
.section { padding: clamp(64px, 9vw, 104px) 0; }
.hero + .section { padding-top: clamp(44px, 6vw, 68px); }
.section.soft { background: var(--bg-soft); }
.section-head { max-width: 640px; margin: 0 auto clamp(36px, 5vw, 56px); text-align: center; }
.eyebrow {
  display: inline-block;
  color: var(--brand);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 2px;
  margin-bottom: 16px;
}
.section-head h2 { font-size: clamp(1.8rem, 4.2vw, 2.5rem); font-weight: 600; letter-spacing: -.5px; line-height: 1.22; }
.section-head p { color: var(--ink-2); margin-top: 16px; font-size: 17px; line-height: 1.75; }

/* ---------- 滚动渐显 ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: .08s; }
.reveal.d2 { transition-delay: .16s; }
.reveal.d3 { transition-delay: .24s; }
.reveal.d4 { transition-delay: .32s; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-size: 15.5px; font-weight: 500;
  padding: 13px 28px; border-radius: 980px; border: 1px solid transparent;
  transition: transform .2s var(--ease), background .2s var(--ease), border-color .2s var(--ease), box-shadow .2s var(--ease), color .2s var(--ease);
}
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-2); transform: translateY(-1px); box-shadow: var(--shadow-btn); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-2); }
.btn-ghost:hover { border-color: var(--ink-3); transform: translateY(-1px); }
.btn-sm { padding: 9px 20px; font-size: 14px; }
.link-arrow { color: var(--brand); font-weight: 500; font-size: 15.5px; display: inline-flex; align-items: center; gap: 6px; transition: gap .2s var(--ease); }
.link-arrow:hover { gap: 11px; }
.link-arrow svg { width: 16px; height: 16px; }

/* ---------- 吸顶导航 ---------- */
.nav {
  position: sticky; top: 0; z-index: 50; height: var(--nav-h);
  background: rgba(255, 255, 255, .74);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--ease), background .3s var(--ease);
}
.nav.scrolled { border-bottom-color: var(--line); background: rgba(255, 255, 255, .86); }
.nav-inner { max-width: var(--maxw); margin: 0 auto; height: 100%; padding: 0 24px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 17px; letter-spacing: 1px; }
.brand img { width: 28px; height: 28px; border-radius: 7px; }
.nav-links { display: flex; align-items: center; gap: 34px; }
.nav-links > a:not(.btn) { font-size: 14.5px; color: var(--ink-2); transition: color .2s var(--ease); }
.nav-links > a:not(.btn):hover { color: var(--ink); }
.nav-toggle { display: none; flex-direction: column; gap: 5px; padding: 8px 4px; }
.nav-toggle span { width: 22px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .28s var(--ease), opacity .2s var(--ease); }
.nav-toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero { position: relative; padding: clamp(56px, 10vh, 104px) 0 clamp(24px, 4vw, 40px); text-align: center; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; left: 50%; top: -180px; transform: translateX(-50%);
  width: 720px; height: 520px; pointer-events: none;
  background: radial-gradient(closest-side, rgba(30, 90, 70, .07), rgba(30, 90, 70, 0));
}
.hero > * { position: relative; }
.hero h1 { font-size: clamp(2.6rem, 7.2vw, 4.6rem); font-weight: 600; letter-spacing: -1.5px; line-height: 1.1; margin: 0 auto 24px; max-width: 14em; }
.hero h1 .thin { font-weight: 300; color: var(--ink-2); }
.hero .sub { max-width: 34em; margin: 0 auto; color: var(--ink-2); font-size: clamp(1.05rem, 2.4vw, 1.22rem); line-height: 1.75; }

/* ---------- 功能（线性图标网格） ---------- */
.features { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(40px, 5vw, 60px) clamp(40px, 6vw, 80px); }
.feature { display: flex; flex-direction: column; gap: 12px; }
.feature .ic {
  width: 50px; height: 50px; border-radius: 15px;
  background: var(--brand-soft); color: var(--brand);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 4px;
}
.feature .ic svg { width: 25px; height: 25px; }
.feature h3 { font-size: 1.22rem; font-weight: 600; letter-spacing: -.2px; }
.feature p { color: var(--ink-2); font-size: 15.5px; line-height: 1.78; }

/* ---------- 安全看护闭环（三步） ---------- */
.steps { --steps-gap: clamp(20px, 3vw, 40px); display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--steps-gap); margin-bottom: clamp(48px, 7vw, 80px); }
.step {
  position: relative; background: #fff; border: 1px solid var(--line); border-radius: 20px;
  padding: 38px 26px 34px; text-align: center;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s var(--ease);
}
.step:hover { transform: translateY(-3px); box-shadow: 0 14px 34px rgba(20, 32, 26, .08); border-color: var(--line-2); }
.step .num {
  width: 46px; height: 46px; margin: 0 auto 18px; border-radius: 50%;
  background: var(--brand); color: #fff; font-size: 18px; font-weight: 600;
  display: flex; align-items: center; justify-content: center;
}
.step h3 { font-size: 1.18rem; font-weight: 600; letter-spacing: -.2px; margin-bottom: 10px; }
.step p { color: var(--ink-2); font-size: 15px; line-height: 1.75; }
.step:not(:last-child)::after {
  content: ""; position: absolute; top: 50%; right: calc(var(--steps-gap) / -2 - 6px);
  width: 12px; height: 12px;
  border-top: 2px solid var(--brand); border-right: 2px solid var(--brand);
  opacity: .45; transform: translateY(-50%) rotate(45deg);
}
.sub-head { text-align: center; max-width: 560px; margin: 0 auto clamp(36px, 5vw, 56px); }
.sub-head h3 { font-size: clamp(1.4rem, 3vw, 1.8rem); font-weight: 600; letter-spacing: -.3px; }
.sub-head p { color: var(--ink-2); margin-top: 10px; font-size: 16px; }

/* ---------- 隐私安全 band ---------- */
.band-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(28px, 4vw, 48px); }
.band-item { text-align: center; }
.band-item .ic { width: 42px; height: 42px; margin: 0 auto 14px; color: var(--brand); display: flex; align-items: center; justify-content: center; }
.band-item .ic svg { width: 30px; height: 30px; }
.band-item h4 { font-size: 16.5px; font-weight: 600; margin-bottom: 8px; }
.band-item p { color: var(--ink-2); font-size: 14.5px; line-height: 1.7; }
.band-more { text-align: center; margin-top: clamp(44px, 6vw, 64px); }

/* ---------- 下载 ---------- */
.download-card { max-width: 580px; margin: 0 auto; text-align: center; }
.download-card .app-icon { width: 92px; height: 92px; border-radius: 22px; margin: 0 auto 26px; box-shadow: var(--shadow-icon); }
.download-card h2 { font-size: clamp(1.7rem, 4vw, 2.3rem); font-weight: 600; letter-spacing: -.5px; margin-bottom: 14px; }
.download-card p { color: var(--ink-2); margin-bottom: 30px; line-height: 1.75; }
.qr-box { display: inline-flex; flex-direction: column; align-items: center; gap: 12px; padding: 22px 26px; border: 1px solid var(--line); border-radius: 20px; background: #fff; }
.qr-box img { width: 132px; height: 132px; border-radius: 10px; }
.qr-box .pending { color: var(--ink-3); font-size: 13.5px; }
.download-page { display: flex; align-items: center; min-height: calc(100vh - var(--nav-h) - 260px); }
.download-page .wrap { width: 100%; }

/* ---------- 页脚 ---------- */
.footer { border-top: 1px solid var(--line); padding: 52px 0 60px; }
.foot-links { display: flex; gap: 30px; justify-content: center; flex-wrap: wrap; margin-bottom: 26px; }
.foot-links a { color: var(--ink-2); font-size: 14.5px; transition: color .2s var(--ease); }
.foot-links a:hover { color: var(--brand); }
.footer p { text-align: center; color: var(--ink-3); font-size: 13px; line-height: 2.1; }
.footer .foot-org a { color: var(--brand); }
.footer .foot-org a:hover { text-decoration: underline; }
.foot-beian a { display: inline-flex; align-items: center; gap: 5px; color: var(--ink-3); transition: color .2s var(--ease); }
.foot-beian a:hover { color: var(--ink-2); }
.foot-beian img { width: 15px; height: auto; display: inline-block; }
.foot-copy { margin-top: 6px; }

/* ---------- 协议页正文 ---------- */
.page-hero { padding: clamp(56px, 9vw, 92px) 0 12px; text-align: center; }
.back-link { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-2); font-size: 14px; margin-bottom: 28px; transition: color .2s var(--ease), gap .2s var(--ease); }
.back-link:hover { color: var(--brand); gap: 9px; }
.back-link svg { width: 15px; height: 15px; }
.prose { padding-bottom: clamp(64px, 10vw, 110px); }
.prose h1 { font-size: clamp(1.9rem, 4.4vw, 2.4rem); font-weight: 600; letter-spacing: -.5px; text-align: center; margin-bottom: 14px; }
.prose .meta { color: var(--ink-3); font-size: 13.5px; text-align: center; margin-bottom: 44px; }
.prose h2 { font-size: 1.28rem; font-weight: 600; letter-spacing: -.2px; margin: 44px 0 14px; padding-top: 24px; border-top: 1px solid var(--line); }
.prose h2:first-of-type { border-top: none; padding-top: 0; }
.prose p { color: var(--ink-2); margin: 12px 0; font-size: 16.5px; line-height: 1.85; }
.prose p strong { color: var(--ink); font-weight: 600; }
.prose ul { margin: 12px 0; }
.prose li { color: var(--ink-2); font-size: 16.5px; line-height: 1.85; margin: 9px 0; padding-left: 22px; position: relative; }
.prose li::before { content: ""; position: absolute; left: 4px; top: .72em; width: 5px; height: 5px; border-radius: 50%; background: var(--brand); opacity: .55; }

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
  .band-grid { grid-template-columns: repeat(2, 1fr); gap: 36px 28px; }
}
@media (max-width: 820px) {
  .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: rgba(255, 255, 255, .97);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid var(--line);
    padding: 10px 24px 20px;
    opacity: 0; transform: translateY(-10px); visibility: hidden;
    transition: opacity .26s var(--ease), transform .26s var(--ease), visibility .26s;
    box-shadow: 0 18px 30px rgba(20, 32, 26, .07);
  }
  .nav-links.open { opacity: 1; transform: none; visibility: visible; }
  .nav-links > a:not(.btn) { padding: 15px 2px; border-bottom: 1px solid var(--line); font-size: 16px; color: var(--ink); }
  .nav-links > a:not(.btn):last-of-type { border-bottom: none; }
  .nav-links .btn { margin-top: 16px; }
}
@media (max-width: 720px) {
  body { font-size: 16px; }
  .features { grid-template-columns: 1fr; gap: 40px; }
  .steps { grid-template-columns: 1fr; gap: 18px; margin-bottom: 44px; }
  .step:not(:last-child)::after { display: none; }
}
@media (max-width: 520px) {
  .band-grid { grid-template-columns: 1fr; gap: 32px; }
  .wrap, .wrap-prose, .nav-inner { padding: 0 20px; }
}

/* ---------- 减弱动效偏好 ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  * { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
