/* 云屿小筑官网：深色为主，晨曦渐变点缀（颜色取自 app/lib/ui/tokens/yunyu_tokens.g.dart 和 design/logo/brand.js）。
   不引用任何外部字体 / CDN，中文用系统字体。 */
:root {
  --bg: #0e0d16;
  --bg-elevated: #13121c;
  --surface: #191726;
  --surface-2: #211e2f;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.14);
  --text-hi: #f5f2fa;
  --text-mid: #b8b1c8;
  --text-lo: #8782a0;
  --on-accent: #1c1930;
  --accent: #b3a2f5;
  --accent-strong: #8f7cf4;
  --rose: #f58fbb;
  --warm: #ffc08a;
  --sky: #8fc3fa;
  /* 品牌晨曦渐变：从右上的天蓝到左下的杏色（brand.js 的 129°） */
  --dawn: linear-gradient(219deg, #85bffc 0%, #97b7fb 19%, #c4acf6 38%, #ebabe0 53%, #f9aece 61%, #fdc6af 80%, #fdd7a9 100%);
  --radius: 18px;
  --wrap: 1120px;
  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", "Source Han Sans SC", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text-hi);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.3; margin: 0; }
p { margin: 0; }

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

/* ───────── 顶栏 ───────── */
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(14, 13, 22, 0.82);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text-hi); font-weight: 700; font-size: 18px; letter-spacing: 0.04em; }
.brand:hover { text-decoration: none; }
.brand img { width: 32px; height: 32px; border-radius: 8px; }
.topnav { display: flex; gap: 4px; }
.topnav a { color: var(--text-mid); font-size: 15px; padding: 8px 12px; border-radius: 999px; }
.topnav a:hover, .topnav a[aria-current="page"] { color: var(--text-hi); background: rgba(255, 255, 255, 0.06); text-decoration: none; }

/* ───────── 首屏 ───────── */
.hero { position: relative; overflow: hidden; padding: 72px 0 88px; }
.hero::before, .hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.35;
  pointer-events: none;
}
.hero::before { width: 520px; height: 520px; right: -120px; top: -160px; background: #85bffc; }
.hero::after { width: 460px; height: 460px; left: -160px; bottom: -220px; background: #f9aece; opacity: 0.22; }
.hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: center; }
.hero-logo { width: 88px; height: 88px; border-radius: 22px; box-shadow: 0 18px 40px -12px rgba(196, 172, 246, 0.55); }
.hero h1 { margin-top: 24px; font-size: 56px; font-weight: 800; letter-spacing: 0.06em; }
.latin { margin-top: 6px; font-size: 13px; letter-spacing: 0.42em; color: var(--text-lo); }
.tagline {
  margin-top: 20px;
  font-size: 26px;
  font-weight: 700;
  background: var(--dawn);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.summary { margin-top: 16px; font-size: 17px; color: var(--text-mid); max-width: 34em; }
.hero-actions { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  padding: 0 26px;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 700;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--dawn); color: var(--on-accent); box-shadow: 0 10px 28px -10px rgba(249, 174, 206, 0.6); }
.btn-ghost { color: var(--text-hi); border: 1px solid var(--line-strong); background: rgba(255, 255, 255, 0.04); }
.hero-note { margin-top: 18px; font-size: 13px; color: var(--text-lo); }

.hero-phones { position: relative; display: flex; justify-content: center; }
.hero-phones .phone:first-child { width: 270px; position: relative; z-index: 2; }
.hero-phones .phone:last-child { width: 230px; margin-left: -70px; margin-top: 70px; opacity: 0.9; }

/* 手机外框 */
.phone {
  border-radius: 38px;
  padding: 8px;
  background: linear-gradient(160deg, #2a263b, #15131f);
  border: 1px solid var(--line-strong);
  box-shadow: 0 30px 60px -24px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(0, 0, 0, 0.45);
}
.phone img { display: block; width: 100%; height: auto; aspect-ratio: 390 / 844; border-radius: 30px; }

/* ───────── 通用区块 ───────── */
.section { padding: 88px 0; }
.section-alt { background: var(--bg-elevated); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { max-width: 720px; margin-bottom: 40px; }
.eyebrow { font-size: 13px; letter-spacing: 0.24em; color: var(--accent); font-weight: 700; }
.section-head h2 { margin-top: 10px; font-size: 34px; font-weight: 800; }
.section-head p { margin-top: 14px; color: var(--text-mid); }

.about { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.about p { color: var(--text-mid); }
.about p + p { margin-top: 14px; }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-content: start; }
.fact { padding: 18px 20px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.fact b { display: block; font-size: 15px; color: var(--text-hi); }
.fact span { display: block; margin-top: 4px; font-size: 14px; color: var(--text-lo); line-height: 1.6; }

/* 功能卡片 */
.features { display: grid; grid-template-columns: repeat(6, 1fr); gap: 20px; }
.feature { grid-column: span 2; padding: 28px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.feature:nth-child(4), .feature:nth-child(5) { grid-column: span 3; }
.feature-no {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--dawn);
  color: var(--on-accent);
  font-weight: 800;
  font-size: 15px;
}
.feature h3 { margin-top: 18px; font-size: 20px; font-weight: 700; }
.feature p { margin-top: 10px; color: var(--text-mid); font-size: 15px; }
.feature ul { margin: 12px 0 0; padding-left: 1.1em; color: var(--text-lo); font-size: 14px; }
.feature li + li { margin-top: 4px; }

/* 截图 */
.screens { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; }
.screen { margin: 0; }
.screen figcaption { margin-top: 16px; text-align: center; }
.screen figcaption b { display: block; font-size: 16px; }
.screen figcaption span { display: block; margin-top: 2px; font-size: 14px; color: var(--text-lo); }

/* 安全与未成年人保护 */
.safety { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.safety-item { padding: 24px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); border-top: 3px solid var(--accent); }
.safety-item:nth-child(2) { border-top-color: var(--rose); }
.safety-item:nth-child(3) { border-top-color: var(--warm); }
.safety-item:nth-child(4) { border-top-color: var(--sky); }
.safety-item h3 { font-size: 18px; }
.safety-item p { margin-top: 10px; font-size: 14px; color: var(--text-mid); }

.notice { margin-top: 28px; padding: 22px 26px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.notice h3 { font-size: 17px; }
.notice p { margin-top: 8px; font-size: 15px; color: var(--text-mid); }

/* 下载 */
#download { padding-top: 24px; }
.download {
  display: flex;
  align-items: center;
  gap: 32px;
  padding: 44px 48px;
  border-radius: 28px;
  background: var(--dawn);
  color: var(--on-accent);
}
.download img { width: 96px; height: 96px; border-radius: 24px; box-shadow: 0 12px 30px -10px rgba(28, 25, 48, 0.45); flex: none; }
.download h2 { font-size: 30px; font-weight: 800; }
.download p { margin-top: 8px; font-size: 16px; color: rgba(28, 25, 48, 0.78); }
.download .status {
  display: inline-block;
  margin-top: 16px;
  padding: 8px 18px;
  border-radius: 999px;
  background: rgba(28, 25, 48, 0.88);
  color: #fff;
  font-weight: 700;
  font-size: 15px;
}

/* ───────── 页脚（build-legal.js 生成，首页和协议页共用） ───────── */
.site-footer { border-top: 1px solid var(--line); background: var(--bg-elevated); padding: 48px 0 28px; font-size: 14px; color: var(--text-lo); }
.footer-grid { display: grid; grid-template-columns: 1.1fr 1fr 1.4fr; gap: 32px; }
.footer-brand p { margin-top: 10px; }
.footer-col h3 { font-size: 14px; color: var(--text-hi); margin-bottom: 12px; }
.footer-col p + p { margin-top: 6px; }
.footer-links { display: flex; flex-direction: column; gap: 6px; }
.footer-links a, .site-footer a { color: var(--text-mid); }
.footer-bottom { position: relative; margin-top: 36px; padding-top: 20px; display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; }
.footer-bottom::before { content: ""; position: absolute; top: 0; left: 24px; right: 24px; border-top: 1px solid var(--line); }

/* ───────── 法律文件页 ───────── */
.doc { max-width: 860px; padding-top: 48px; padding-bottom: 72px; }
.doc-header h1 { font-size: 32px; font-weight: 800; }
.doc-meta { margin-top: 8px; font-size: 13px; color: var(--text-lo); }
.doc-meta + .doc-meta { margin-top: 2px; }
.doc-intro { margin-top: 20px; color: var(--text-mid); line-height: 1.85; }
.doc-highlights { margin-top: 28px; padding: 20px 24px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--warm); }
.doc-highlights h2 { font-size: 16px; }
.doc-highlights ul { margin: 10px 0 0; padding-left: 1.2em; color: var(--text-mid); font-size: 15px; }
.doc-highlights li + li { margin-top: 6px; }
.doc-toc { margin-top: 28px; padding: 18px 24px; border-radius: 14px; border: 1px solid var(--line); }
.doc-toc h2 { font-size: 15px; color: var(--text-mid); }
.doc-toc ol { margin: 8px 0 0; padding: 0; list-style: none; columns: 2; column-gap: 28px; font-size: 14px; }
.doc-toc li { break-inside: avoid; padding: 2px 0; }
.doc-toc a { color: var(--text-mid); }
.doc-section { padding: 28px 0; border-bottom: 1px solid var(--line); scroll-margin-top: 80px; }
.doc-section:last-of-type { border-bottom: 0; }
.doc-section h2 { font-size: 20px; font-weight: 700; }
.doc-section p { margin-top: 10px; color: var(--text-mid); line-height: 1.85; word-break: break-word; overflow-wrap: anywhere; }
.doc-related { margin-top: 24px; padding: 20px 24px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.doc-related h2 { font-size: 15px; color: var(--text-mid); }
.doc-related div { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 8px 20px; }

/* ───────── 窄屏 ───────── */
@media (max-width: 960px) {
  .hero { padding: 48px 0 64px; }
  .hero-grid { grid-template-columns: 1fr; gap: 48px; }
  .hero h1 { font-size: 44px; }
  .about { grid-template-columns: 1fr; }
  .features { grid-template-columns: 1fr 1fr; }
  .feature, .feature:nth-child(4), .feature:nth-child(5) { grid-column: span 1; }
  .feature:nth-child(5) { grid-column: span 2; }
  .screens { grid-template-columns: 1fr 1fr; }
  .safety { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: span 2; }
}
@media (max-width: 600px) {
  .wrap { padding: 0 18px; }
  .footer-bottom::before { left: 18px; right: 18px; }
  .topnav a:first-child { display: none; }
  .topnav a { padding: 6px 8px; font-size: 14px; }
  .hero h1 { font-size: 38px; }
  .tagline { font-size: 21px; }
  .summary { font-size: 16px; }
  .hero-phones .phone:first-child { width: 210px; }
  .hero-phones .phone:last-child { width: 170px; margin-left: -56px; margin-top: 56px; }
  .section { padding: 64px 0; }
  .section-head h2 { font-size: 27px; }
  .facts { grid-template-columns: 1fr; }
  .features { grid-template-columns: 1fr; }
  .feature, .feature:nth-child(4), .feature:nth-child(5) { grid-column: span 1; }
  .screens { gap: 18px; }
  .safety { grid-template-columns: 1fr; }
  .download { flex-direction: column; text-align: center; padding: 36px 24px; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-brand { grid-column: span 1; }
  .doc { padding-top: 32px; }
  .doc-header h1 { font-size: 26px; }
  .doc-toc ol { columns: 1; }
}
@media (max-width: 420px) {
  .topnav a:nth-child(2) { display: none; }
}
