/* ============================================================================
   SG Hub 官网样式

   品牌 token 与客户端同源（brand/tokens.css）。

   ★ 不加载任何 Web 字体。轻量应用服务器有月流量包，一套中英文 Web 字体
     动辄几百 KB，而系统字体栈在目标用户的设备上表现足够好。
     省下的流量直接换成更多次访问。
   ============================================================================ */

:root {
  /* 与 brand/tokens.css 同源 */
  --sg-navy-deep: #14213D;
  --sg-navy: #1F2E4D;
  --sg-gold: #C9A24C;
  --sg-paper: #F2EBD8;

  --ink: #14213D;
  --ink-soft: #4A5468;
  --ink-faint: #78829A;
  --line: #E3E7EE;
  --bg: #FFFFFF;
  --bg-soft: #F7F9FC;

  --radius: 12px;
  --radius-sm: 8px;
  --maxw: 1200px;
  --pad: 20px;

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
          Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--sg-navy); text-decoration: none; }
a:hover { text-decoration: underline; }

/* 焦点可见（无障碍 4.5：键盘可完整导航，焦点可见） */
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--sg-navy);
  outline-offset: 3px;
  border-radius: 4px;
}

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

/* 跳转到主内容：屏幕阅读器与键盘用户的第一个可聚焦元素 */
.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--sg-navy); color: #fff; padding: 10px 16px; z-index: 100;
}
.skip:focus { left: 8px; top: 8px; }

/* ── 语言建议条 ────────────────────────────────────────────────────────────
   需求文档 2.2：不做强制跳转，只提示一次，用户选择后写入 localStorage。
   默认 hidden，由 site.js 决定是否显示 —— 避免无 JS 时闪现一条无用横幅。 */
.langbar {
  display: none;
  background: var(--sg-paper);
  border-bottom: 1px solid #E6DCC2;
  font-size: 14px;
}
.langbar.on { display: block; }
.langbar .wrap {
  display: flex; align-items: center; gap: 12px;
  padding-top: 10px; padding-bottom: 10px; flex-wrap: wrap;
}
.langbar p { margin: 0; color: #5B5233; }
.langbar a { font-weight: 600; color: var(--sg-navy-deep); }
.langbar button {
  margin-left: auto; background: none; border: 0; cursor: pointer;
  color: #8A7F5C; font-size: 18px; line-height: 1; padding: 4px 8px;
}

/* ── 页头 ────────────────────────────────────────────────────────────────── */
.site-head {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-head .wrap {
  display: flex; align-items: center; gap: 16px;
  height: 62px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 650; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand img { width: 28px; height: 28px; }
.brand span { font-size: 17px; letter-spacing: -.01em; }

.nav { display: none; gap: 24px; margin-left: 12px; }
.nav a { color: var(--ink-soft); font-size: 15px; }
.nav a:hover { color: var(--ink); }

.head-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }

.langsel {
  font-size: 14px; color: var(--ink-soft);
  border: 1px solid var(--line); border-radius: 999px;
  padding: 5px 12px; background: #fff;
}
.langsel:hover { text-decoration: none; border-color: #C9CFDA; color: var(--ink); }

/* 汉堡菜单：移动端 */
.burger {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 8px;
  background: #fff; cursor: pointer; padding: 0;
}
.burger span { display: block; width: 16px; height: 1.5px; background: var(--ink); position: relative; }
.burger span::before, .burger span::after {
  content: ""; position: absolute; left: 0; width: 16px; height: 1.5px; background: var(--ink);
}
.burger span::before { top: -5px; }
.burger span::after { top: 5px; }

.mobile-menu { display: none; border-bottom: 1px solid var(--line); background: #fff; }
.mobile-menu.on { display: block; }
.mobile-menu nav { display: flex; flex-direction: column; padding: 8px 0 16px; }
.mobile-menu nav a { padding: 12px 0; color: var(--ink-soft); border-bottom: 1px solid var(--bg-soft); }

/* ── 按钮 ────────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 20px; border-radius: var(--radius-sm);
  font-size: 15px; font-weight: 600; line-height: 1.2;
  border: 1px solid transparent; cursor: pointer; white-space: nowrap;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--sg-navy-deep); color: #fff; }
.btn-primary:hover { background: #0E1830; }
.btn-outline { background: #fff; color: var(--ink); border-color: #C9CFDA; }
.btn-outline:hover { border-color: var(--ink-soft); }
.btn-sm { padding: 8px 14px; font-size: 14px; }
.btn-ghost { background: none; color: var(--ink-soft); padding-left: 4px; padding-right: 4px; }

/* 当前平台高亮：由 site.js 识别访客系统后加 class（文案终稿区块 1 设计说明） */
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ── 版本状态标识 ─────────────────────────────────────────────────────────
   克制的事实陈述，不用"抢先体验""内测"这类营销腔（文案终稿禁用词表） */
.rc-badge {
  display: inline-block; font-size: 12px; font-weight: 600; letter-spacing: .02em;
  color: #7A5B12; background: #FBF3DF; border: 1px solid #EDD9A8;
  border-radius: 999px; padding: 3px 10px; vertical-align: middle;
}

/* ── 区块 ────────────────────────────────────────────────────────────────── */
section { padding: 56px 0; }
section.alt { background: var(--bg-soft); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

h1, h2, h3 { line-height: 1.25; letter-spacing: -.02em; margin: 0 0 16px; }
h1 { font-size: 34px; font-weight: 700; }
h2 { font-size: 26px; font-weight: 700; }
h3 { font-size: 19px; font-weight: 650; }
p { margin: 0 0 16px; }
.lead { font-size: 17px; color: var(--ink-soft); max-width: 60ch; }
.meta-line { font-size: 14px; color: var(--ink-faint); margin-top: 18px; }
.section-intro { max-width: 62ch; color: var(--ink-soft); }

/* Hero */
.hero { padding: 44px 0 8px; }
.hero h1 { max-width: 20ch; }
.hero .lead { margin-bottom: 24px; }
.shot {
  margin-top: 36px;
  border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; background: #fff;
  box-shadow: 0 1px 2px rgba(20,33,61,.05), 0 12px 32px rgba(20,33,61,.08);
}

/* 场景卡片 */
.features { display: grid; gap: 40px; }
.feature h3 { margin-bottom: 8px; }
.feature p { color: var(--ink-soft); margin-bottom: 16px; }
.feature .shot { margin-top: 0; }

/* 无配图时的替代块：不留空洞，也不硬塞不匹配的图 */
.no-shot {
  border: 1px solid var(--line); border-left: 3px solid var(--sg-gold);
  border-radius: var(--radius-sm); background: #fff;
  padding: 18px 20px; color: var(--ink-soft); font-size: 15px;
}
.no-shot ul { margin: 10px 0 0; padding-left: 20px; }
.no-shot li { margin: 4px 0; }

/* 隐私区块的数据流示意：用文字与箭头表达，不用锁头盾牌图标
   （文案终稿区块 3 设计说明：学术用户对泛化安全图标已免疫） */
.dataflow {
  display: flex; align-items: center; flex-wrap: wrap; gap: 10px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 20px; margin: 8px 0 22px;
}
.dataflow .node {
  font-weight: 600; font-size: 15px; color: var(--ink);
  border: 1px solid #C9CFDA; border-radius: var(--radius-sm); padding: 8px 14px;
  background: var(--bg-soft);
}
.dataflow .arrow { color: var(--sg-gold); font-weight: 700; letter-spacing: .05em; font-size: 14px; }
.dataflow .note { font-size: 13px; color: var(--ink-faint); width: 100%; }

.privacy-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; }
.privacy-list li { padding-left: 18px; position: relative; color: var(--ink-soft); }
.privacy-list li::before {
  content: ""; position: absolute; left: 0; top: 11px;
  width: 6px; height: 6px; border-radius: 50%; background: var(--sg-gold);
}
.privacy-list strong { color: var(--ink); font-weight: 650; }

/* 模型列表 */
.models { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 20px; padding: 0; list-style: none; }
.models li {
  font-size: 14px; color: var(--ink-soft);
  border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; background: #fff;
}

/* 适用场景 */
.cases { display: grid; gap: 20px; }
.case {
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; background: #fff;
}
.case h3 { font-size: 17px; margin-bottom: 6px; }
.case p { margin: 0; color: var(--ink-soft); font-size: 15px; }

/* 下载页表格 */
.dl-table { width: 100%; border-collapse: collapse; margin: 8px 0 20px; font-size: 15px; }
.dl-table th, .dl-table td { text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--line); }
.dl-table th { font-size: 13px; color: var(--ink-faint); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.dl-table td.size { color: var(--ink-soft); white-space: nowrap; }

/* ── 页脚 ────────────────────────────────────────────────────────────────── */
.site-foot { border-top: 1px solid var(--line); padding: 40px 0 48px; background: var(--bg-soft); font-size: 15px; }
.foot-cols { display: grid; gap: 28px; margin-bottom: 32px; }
.foot-cols h4 { font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-faint); margin: 0 0 12px; font-weight: 600; }
.foot-cols ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.foot-cols a { color: var(--ink-soft); }
.foot-cols a:hover { color: var(--ink); }
/* 尚未上线的条目：显示但不做成链接，不制造 404 */
.foot-cols .soon { color: var(--ink-faint); }
.foot-bottom { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; border-top: 1px solid var(--line); padding-top: 24px; }
.foot-bottom img { width: 24px; height: 24px; }
.copyright { color: var(--ink-faint); font-size: 14px; margin: 0; }
.foot-bottom .langsel { margin-left: auto; }

/* ── 断点（需求文档 4.3）──────────────────────────────────────────────── */
@media (min-width: 640px) {
  :root { --pad: 28px; }
  h1 { font-size: 44px; }
  h2 { font-size: 30px; }
  .lead { font-size: 18px; }
  section { padding: 72px 0; }
  .cases { grid-template-columns: repeat(3, 1fr); }
  .foot-cols { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 1024px) {
  .nav { display: flex; }
  .burger { display: none; }
  .mobile-menu { display: none !important; }
  h1 { font-size: 52px; }
  .hero { padding: 72px 0 8px; }
  .hero-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
  .hero .shot { margin-top: 0; }
  .features { gap: 64px; }
  .feature-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 44px; align-items: center; }
  .feature-grid.rev .feature-text { order: 2; }
  .foot-cols { grid-template-columns: repeat(3, 1fr) auto; }
}

/* 打印时去掉粘性页头与阴影 */
@media print {
  .site-head, .langbar, .mobile-menu { position: static; box-shadow: none; }
  .shot { box-shadow: none; }
}
