/* =============================================================
   SnapLink — 全局样式
   风格：深色科技风 / 极光渐变 / 玻璃拟态
   ============================================================= */

/* ---------- 设计令牌 ---------- */
:root {
  --font: "Inter", "Noto Sans SC", "PingFang SC", "Microsoft YaHei UI",
    system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: "JetBrains Mono", "Cascadia Code", ui-monospace, SFMono-Regular,
    Consolas, monospace;

  --bg: #060910;
  --bg-2: #0a1020;
  --surface: rgba(255, 255, 255, 0.04);
  --surface-2: rgba(255, 255, 255, 0.07);
  --surface-3: rgba(255, 255, 255, 0.11);
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.16);

  --text: #e9edf8;
  --text-2: #b3bdd4;
  --muted: #7f8aa3;

  --brand: #7c5cff;
  --brand-2: #24d3ee;
  --brand-3: #ff6fae;
  --ok: #34d399;
  --warn: #fbbf24;

  --grad-main: linear-gradient(120deg, #7c5cff 0%, #24d3ee 55%, #6ef2c0 100%);
  --grad-soft: linear-gradient(120deg, rgba(124, 92, 255, 0.18), rgba(36, 211, 238, 0.14));

  --shadow-lg: 0 30px 80px -30px rgba(0, 0, 0, 0.85);
  --shadow-md: 0 16px 40px -20px rgba(0, 0, 0, 0.7);
  --glow: 0 0 0 1px rgba(124, 92, 255, 0.35), 0 18px 50px -18px rgba(124, 92, 255, 0.55);

  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 24px;
  --r-full: 999px;

  --header-h: 68px;
  --maxw: 1160px;
  --blur: saturate(150%) blur(12px);
}

[data-theme="light"] {
  --bg: #f6f7fb;
  --bg-2: #eceef7;
  --surface: rgba(255, 255, 255, 0.72);
  --surface-2: rgba(255, 255, 255, 0.9);
  --surface-3: rgba(16, 20, 40, 0.05);
  --border: rgba(16, 20, 40, 0.1);
  --border-strong: rgba(16, 20, 40, 0.18);

  --text: #10142a;
  --text-2: #414a68;
  --muted: #6b7490;

  --shadow-lg: 0 30px 70px -34px rgba(20, 26, 60, 0.35);
  --shadow-md: 0 16px 36px -22px rgba(20, 26, 60, 0.28);
  --glow: 0 0 0 1px rgba(124, 92, 255, 0.25), 0 18px 40px -20px rgba(124, 92, 255, 0.4);
}

/* ---------- 基础重置 ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.75;
  font-size: 16px;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  line-height: 1.2;
  margin: 0 0 .6em;
  letter-spacing: -0.02em;
  font-weight: 700;
}

p { margin: 0 0 1em; }

a { color: inherit; text-decoration: none; }

img, svg { display: block; max-width: 100%; }

button {
  font: inherit;
  color: inherit;
  border: 0;
  background: none;
  cursor: pointer;
}

::selection { background: rgba(124, 92, 255, 0.4); }

:focus-visible {
  outline: 2px solid var(--brand-2);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ---------- 极光背景 ---------- */
/* 性能要点：模糊下移到每个气泡自身，父层只做隔离与裁剪。
   这样气泡动画时只需合成 transform，浏览器不必每帧重算整屏 blur。 */
.aurora {
  position: fixed;
  inset: -25vh -20vw auto -20vw;
  height: 130vh;
  z-index: -2;
  opacity: .62;
  pointer-events: none;
  overflow: hidden;
  isolation: isolate; /* 保持气泡之间 screen 混合效果不变 */
}

.aurora b {
  position: absolute;
  display: block;
  border-radius: 50%;
  filter: blur(64px);
  mix-blend-mode: screen;
  will-change: transform;
  animation: drift 26s ease-in-out infinite alternate;
}

.aurora b:nth-child(1) {
  width: 42vw; height: 42vw; left: 4vw; top: 0;
  background: radial-gradient(circle at 30% 30%, #7c5cff, transparent 68%);
}
.aurora b:nth-child(2) {
  width: 38vw; height: 38vw; right: 6vw; top: 4vh;
  background: radial-gradient(circle at 60% 40%, #24d3ee, transparent 68%);
  animation-duration: 32s; animation-delay: -6s;
}
.aurora b:nth-child(3) {
  width: 32vw; height: 32vw; left: 34vw; top: 26vh;
  background: radial-gradient(circle at 50% 50%, #ff6fae, transparent 70%);
  animation-duration: 38s; animation-delay: -12s;
}

[data-theme="light"] .aurora { opacity: .45; }
[data-theme="light"] .aurora b { mix-blend-mode: normal; }

@keyframes drift {
  0%   { transform: translate3d(0, 0, 0) scale(1); }
  50%  { transform: translate3d(4vw, 6vh, 0) scale(1.12); }
  100% { transform: translate3d(-4vw, 3vh, 0) scale(.96); }
}

/* 网格纹理 */
.grid-overlay {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, .035) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, .035) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 100%);
}
[data-theme="light"] .grid-overlay {
  background-image:
    linear-gradient(to right, rgba(16, 20, 40, .05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(16, 20, 40, .05) 1px, transparent 1px);
}

/* ---------- 布局工具 ---------- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: 22px;
}

.section { padding: 92px 0; position: relative; }
.section--tight { padding: 62px 0; }

.center { text-align: center; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--brand-2);
  margin-bottom: 14px;
}
.eyebrow::before {
  content: "";
  width: 22px; height: 1px;
  background: currentColor;
  opacity: .6;
}

.section-title {
  font-size: clamp(1.7rem, 3.6vw, 2.6rem);
  margin-bottom: .45em;
}

.lead {
  color: var(--text-2);
  font-size: 1.05rem;
  max-width: 62ch;
}
/* 两种写法都要居中：父级带 .center，或元素自身带 .center（class="lead center"） */
.center .lead,
.lead.center { margin-inline: auto; }

.grad-text {
  background: var(--grad-main);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.section-head { margin-bottom: 48px; }

/* ---------- 顶栏 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  height: var(--header-h);
  display: flex;
  align-items: center;
  border-bottom: 1px solid transparent;
  transition: background .3s, border-color .3s, backdrop-filter .3s;
}
.site-header.is-stuck {
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  border-bottom-color: var(--border);
}

.site-header .container {
  display: flex;
  align-items: center;
  gap: 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  letter-spacing: -.02em;
  font-size: 1.06rem;
  flex-shrink: 0;
}

.brand-mark {
  width: 32px; height: 32px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: var(--grad-main);
  box-shadow: 0 8px 22px -10px rgba(124, 92, 255, .9);
}
.brand-mark svg { width: 18px; height: 18px; }
.brand small {
  display: block;
  font-size: .62rem;
  font-weight: 500;
  letter-spacing: .16em;
  color: var(--muted);
  text-transform: uppercase;
  line-height: 1;
  margin-top: 2px;
}

.nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav a {
  padding: 8px 14px;
  border-radius: var(--r-full);
  font-size: .92rem;
  color: var(--text-2);
  transition: color .2s, background .2s;
}
.nav a:hover { color: var(--text); background: var(--surface); }
.nav a[aria-current="page"] {
  color: var(--text);
  background: var(--surface-2);
  box-shadow: inset 0 0 0 1px var(--border);
}

.header-tools { display: flex; align-items: center; gap: 8px; }

.icon-btn {
  width: 38px; height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-2);
  transition: .2s;
}
.icon-btn:hover { color: var(--text); background: var(--surface-2); border-color: var(--border-strong); }
.icon-btn svg { width: 17px; height: 17px; }
.icon-btn .icon-moon { display: none; }
[data-theme="light"] .icon-btn .icon-sun { display: none; }
[data-theme="light"] .icon-btn .icon-moon { display: block; }

.nav-toggle { display: none; }
.nav-toggle .icon-close { display: none; }
body.nav-open .nav-toggle .icon-close { display: block; }
body.nav-open .nav-toggle .icon-menu { display: none; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 13px 24px;
  border-radius: var(--r-full);
  font-weight: 600;
  font-size: .95rem;
  border: 1px solid transparent;
  transition: transform .18s ease, box-shadow .25s, background .25s, border-color .25s;
  white-space: nowrap;
}
.btn svg { width: 17px; height: 17px; }
.btn:active { transform: translateY(1px) scale(.99); }

.btn--primary {
  background: var(--grad-main);
  color: #08101f;
  box-shadow: var(--glow);
}
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 0 0 1px rgba(124,92,255,.5), 0 24px 60px -20px rgba(124,92,255,.75); }

.btn--ghost {
  background: var(--surface);
  border-color: var(--border-strong);
  color: var(--text);
}
.btn--ghost:hover { background: var(--surface-2); transform: translateY(-2px); }

.btn--sm { padding: 9px 17px; font-size: .88rem; }
.btn--block { width: 100%; }

/* ---------- Hero ---------- */
.hero {
  padding: clamp(56px, 9vw, 108px) 0 76px;
  position: relative;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr);
  gap: 56px;
  align-items: center;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 6px 14px 6px 8px;
  border-radius: var(--r-full);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  font-size: .8rem;
  color: var(--text-2);
  margin-bottom: 22px;
}
.pill .dot {
  position: relative;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 4px rgba(52, 211, 153, .16);
}
/* 脉冲改用 transform + opacity，走合成器而不是每帧重绘 box-shadow */
.pill .dot::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid rgba(52, 211, 153, .55);
  animation: pulse 2.4s ease-out infinite;
}
@keyframes pulse {
  0% { transform: scale(1); opacity: .9; }
  70%, 100% { transform: scale(2.4); opacity: 0; }
}

.hero h1 {
  font-size: clamp(2.1rem, 5.4vw, 3.6rem);
  letter-spacing: -.035em;
  margin-bottom: .35em;
}

.hero .lead { font-size: 1.1rem; margin-bottom: 30px; }

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 34px;
}

.hero-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 26px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
  list-style: none;
  margin: 0;
}
.hero-facts li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .87rem;
  color: var(--text-2);
}
.hero-facts svg { width: 15px; height: 15px; color: var(--ok); flex-shrink: 0; }

/* Hero 右侧可视化卡片 */
/* 性能要点：此元素位于持续动画的极光之上，若使用 backdrop-filter，
   浏览器每帧都要重新采样并模糊背景。改用半透明实色 + 渐变叠加，视觉接近但零采样开销。 */
.panel {
  position: relative;
  border-radius: var(--r-lg);
  border: 1px solid var(--border-strong);
  background: var(--grad-soft),
    color-mix(in srgb, var(--bg-2) 80%, transparent);
  box-shadow: var(--shadow-lg);
  padding: 22px;
  overflow: hidden;
}
.panel::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(160deg, rgba(255,255,255,.14), transparent 42%);
  pointer-events: none;
}

.panel-head {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: .78rem;
  color: var(--muted);
  letter-spacing: .1em;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.panel-head .traffic { display: flex; gap: 6px; margin-right: auto; }
.panel-head .traffic i {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--surface-3);
}
.panel-head .traffic i:nth-child(1) { background: #ff6b6b; }
.panel-head .traffic i:nth-child(2) { background: #ffd166; }
.panel-head .traffic i:nth-child(3) { background: #51cf66; }

.route { position: relative; padding-left: 26px; }
.route::before {
  content: "";
  position: absolute;
  left: 7px; top: 12px; bottom: 22px;
  width: 2px;
  background: linear-gradient(180deg, var(--brand), var(--brand-2), transparent);
}

.route-node {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 0;
}
.route-node::before {
  content: "";
  position: absolute;
  left: -24px; top: 50%;
  width: 12px; height: 12px;
  border-radius: 50%;
  transform: translateY(-50%);
  background: var(--bg);
  border: 2px solid var(--brand-2);
}
.route-node.is-done::before { background: var(--ok); border-color: var(--ok); }
.route-node .node-icon {
  width: 34px; height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--surface-2);
  border: 1px solid var(--border);
  flex-shrink: 0;
}
.route-node .node-icon svg { width: 16px; height: 16px; color: var(--brand-2); }
.route-node strong { display: block; font-size: .92rem; font-weight: 600; }
.route-node span { font-size: .78rem; color: var(--muted); }

.panel-foot {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px dashed var(--border-strong);
  display: flex;
  justify-content: space-between;
  font-size: .8rem;
  color: var(--text-2);
}
.panel-foot b { color: var(--text); font-weight: 600; }

/* 浮动徽标 */
.floating-tag {
  position: absolute;
  right: -14px; bottom: 30px;
  padding: 8px 15px;
  border-radius: var(--r-full);
  /* 自带平移动画，去掉 backdrop-filter 以避免每帧重算模糊 */
  background: color-mix(in srgb, var(--bg-2) 86%, transparent);
  border: 1px solid var(--border-strong);
  font-size: .78rem;
  display: flex;
  align-items: center;
  gap: 7px;
  box-shadow: var(--shadow-md);
  animation: bob 5s ease-in-out infinite;
}
@keyframes bob { 50% { transform: translateY(-9px); } }

/* ---------- 信任条 ---------- */
.trust {
  border-block: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface) 60%, transparent);
}
.trust ul {
  list-style: none;
  margin: 0;
  padding: 20px 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px 30px;
}
.trust li {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: .88rem;
  color: var(--text-2);
}
.trust svg { width: 16px; height: 16px; color: var(--brand-2); }

/* ---------- 卡片网格 ---------- */
.grid {
  display: grid;
  gap: 20px;
}
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.card {
  position: relative;
  padding: 26px 24px;
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  /* 网格卡片数量多，去掉 backdrop-filter 可省下大量背景重采样 */
  background: var(--grad-soft), color-mix(in srgb, var(--bg-2) 42%, transparent);
  transition: transform .28s cubic-bezier(.2,.7,.3,1), border-color .28s, background .28s;
  overflow: hidden;
}
.card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(124,92,255,.7), transparent);
  opacity: 0;
  transition: opacity .3s;
}
.card:hover {
  transform: translateY(-5px);
  border-color: var(--border-strong);
  background: var(--grad-soft), var(--surface-2);
}
.card:hover::before { opacity: 1; }

.card-icon {
  width: 44px; height: 44px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  margin-bottom: 16px;
  background: var(--grad-soft);
  border: 1px solid var(--border-strong);
  color: var(--brand-2);
}
.card-icon svg { width: 21px; height: 21px; }

.card h3 { font-size: 1.06rem; margin-bottom: .35em; }
.card p { color: var(--text-2); font-size: .93rem; margin: 0; }

.card-tag {
  position: absolute;
  top: 18px; right: 18px;
  font-size: .68rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: var(--r-full);
  padding: 3px 9px;
}

/* ---------- 步骤 ---------- */
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  counter-reset: step;
}
.steps li {
  position: relative;
  padding: 26px 22px;
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  background: linear-gradient(170deg, var(--surface-2), transparent);
}
.steps li::before {
  counter-increment: step;
  content: "0" counter(step);
  display: block;
  font-family: var(--mono);
  font-size: 1.5rem;
  font-weight: 700;
  background: var(--grad-main);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 10px;
}
.steps h3 { font-size: 1rem; }
.steps p { font-size: .9rem; color: var(--text-2); margin: 0; }

/* ---------- 统计条 ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 2px;
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--border);
}
.stats div {
  background: var(--bg-2);
  padding: 30px 20px;
  text-align: center;
}
.stats .num {
  font-size: clamp(1.7rem, 3.4vw, 2.4rem);
  font-weight: 700;
  font-family: var(--mono);
  letter-spacing: -.03em;
  background: var(--grad-main);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  display: block;
}
.stats .num + span { font-size: .84rem; color: var(--muted); }

/* ---------- 下载卡片 ---------- */
.platforms {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.platform {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 24px;
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  background: var(--surface);
  transition: .28s;
}
.platform:hover {
  transform: translateY(-4px);
  border-color: var(--border-strong);
  background: var(--surface-2);
}
.platform-top {
  display: flex;
  align-items: center;
  gap: 13px;
}
.platform-top svg { width: 26px; height: 26px; color: var(--brand-2); flex-shrink: 0; }
.platform-top strong { display: block; font-size: 1rem; }
.platform-top small { color: var(--muted); font-size: .78rem; font-family: var(--mono); }
.platform .meta {
  display: flex;
  justify-content: space-between;
  font-size: .78rem;
  color: var(--muted);
  padding-top: 12px;
  border-top: 1px dashed var(--border);
  margin-top: auto;
}
.platform .meta span { display: flex; align-items: center; gap: 5px; }

.platform.is-featured {
  border-color: rgba(124, 92, 255, .45);
  background: var(--grad-soft), var(--surface);
  box-shadow: var(--shadow-md);
}
.badge-best {
  font-size: .68rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: var(--r-full);
  background: var(--grad-main);
  color: #08101f;
  font-weight: 700;
  margin-left: auto;
}

/* ---------- 表格（协议对比） ---------- */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface);
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: .92rem;
  min-width: 620px;
}
th, td {
  padding: 15px 18px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
thead th {
  font-size: .76rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
  background: var(--surface-3);
}
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: var(--surface); }
td code, .kbd {
  font-family: var(--mono);
  font-size: .82rem;
  padding: 2px 7px;
  border-radius: 6px;
  background: var(--surface-3);
  border: 1px solid var(--border);
}

.tag {
  display: inline-block;
  font-size: .72rem;
  padding: 3px 10px;
  border-radius: var(--r-full);
  border: 1px solid var(--border-strong);
  color: var(--text-2);
  white-space: nowrap;
}
.tag--ok { color: var(--ok); border-color: rgba(52,211,153,.35); background: rgba(52,211,153,.1); }
.tag--warn { color: var(--warn); border-color: rgba(251,191,36,.35); background: rgba(251,191,36,.1); }
.tag--brand { color: var(--brand-2); border-color: rgba(36,211,238,.35); background: rgba(36,211,238,.1); }

/* ---------- 手风琴 FAQ ---------- */
.faq { display: grid; gap: 12px; }

.faq details {
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface);
  padding: 4px 20px;
  transition: border-color .25s, background .25s;
}
.faq details[open] {
  border-color: var(--border-strong);
  background: var(--surface-2);
}
.faq summary {
  list-style: none;
  cursor: pointer;
  padding: 16px 0;
  display: flex;
  align-items: center;
  gap: 14px;
  font-weight: 600;
  font-size: .98rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "";
  margin-left: auto;
  width: 9px; height: 9px;
  border-right: 2px solid var(--text-2);
  border-bottom: 2px solid var(--text-2);
  transform: rotate(45deg) translateY(-3px);
  transition: transform .3s;
  flex-shrink: 0;
}
.faq details[open] summary::after { transform: rotate(225deg) translateY(-1px); }
.faq details[open] summary { color: var(--brand-2); }
.faq .answer {
  padding: 0 0 18px;
  color: var(--text-2);
  font-size: .93rem;
  border-top: 1px solid var(--border);
  padding-top: 14px;
}
.faq .answer p:last-child { margin-bottom: 0; }

/* ---------- CTA 区块 ---------- */
.cta-band {
  position: relative;
  border-radius: var(--r-lg);
  border: 1px solid var(--border-strong);
  background: var(--grad-soft), var(--bg-2);
  padding: clamp(34px, 6vw, 62px);
  text-align: center;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.cta-band::before {
  content: "";
  position: absolute;
  inset: -60% -20% auto;
  height: 140%;
  background: radial-gradient(ellipse at 50% 0%, rgba(124,92,255,.28), transparent 62%);
  pointer-events: none;
}
.cta-band > * { position: relative; }
.cta-band h2 { font-size: clamp(1.6rem, 3.6vw, 2.4rem); }
.cta-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 26px; }

/* ---------- 页脚 ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  margin-top: 40px;
  padding: 56px 0 30px;
  background: color-mix(in srgb, var(--bg-2) 70%, transparent);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr repeat(3, 1fr);
  gap: 36px;
  margin-bottom: 40px;
}
.footer-brand p {
  color: var(--muted);
  font-size: .88rem;
  max-width: 34ch;
  margin-top: 14px;
}
.footer-col h4 {
  font-size: .78rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 14px;
}
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.footer-col a { font-size: .89rem; color: var(--text-2); transition: color .2s; }
.footer-col a:hover { color: var(--brand-2); }

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 22px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  align-items: center;
  justify-content: space-between;
  font-size: .82rem;
  color: var(--muted);
}
.footer-bottom .socials { display: flex; gap: 8px; }
.footer-bottom .socials a {
  width: 34px; height: 34px;
  display: grid; place-items: center;
  border-radius: 50%;
  border: 1px solid var(--border);
  color: var(--text-2);
  transition: .2s;
}
.footer-bottom .socials a:hover { color: var(--brand-2); border-color: var(--border-strong); background: var(--surface); }
.footer-bottom .socials svg { width: 15px; height: 15px; }

/* ---------- 内页头部 ---------- */
.page-hero {
  padding: clamp(46px, 7vw, 82px) 0 30px;
  text-align: center;
}
.page-hero h1 { font-size: clamp(1.9rem, 4.6vw, 3rem); }
.page-hero .lead { margin-inline: auto; }

/* ---------- 富文本块 ---------- */
.prose h2 { font-size: 1.45rem; margin-top: 2em; }
.prose h3 { font-size: 1.1rem; margin-top: 1.6em; }
.prose p, .prose li { color: var(--text-2); }
.prose ul { padding-left: 20px; }
.prose li { margin-bottom: .4em; }
.prose code {
  font-family: var(--mono);
  font-size: .85em;
  padding: 2px 6px;
  border-radius: 6px;
  background: var(--surface-3);
  border: 1px solid var(--border);
  color: var(--brand-2);
}
.two-col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 44px;
  align-items: start;
}

.callout {
  display: flex;
  gap: 14px;
  padding: 18px 20px;
  border-radius: var(--r-md);
  border: 1px solid rgba(36, 211, 238, .28);
  background: rgba(36, 211, 238, .07);
  font-size: .92rem;
  color: var(--text-2);
  margin: 26px 0;
}
.callout svg { width: 19px; height: 19px; color: var(--brand-2); flex-shrink: 0; margin-top: 3px; }
.callout p:last-child { margin-bottom: 0; }

/* ---------- Toast ---------- */
.toast-host {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  z-index: 200;
  display: grid;
  gap: 10px;
  width: min(92vw, 420px);
  pointer-events: none;
}
.toast {
  display: flex;
  gap: 11px;
  align-items: flex-start;
  padding: 13px 17px;
  border-radius: var(--r-md);
  border: 1px solid var(--border-strong);
  background: color-mix(in srgb, var(--bg-2) 88%, transparent);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  box-shadow: var(--shadow-lg);
  font-size: .88rem;
  color: var(--text-2);
  animation: toast-in .32s cubic-bezier(.2,.8,.3,1);
}
.toast.is-out { animation: toast-out .3s forwards; }
.toast svg { width: 17px; height: 17px; color: var(--brand-2); flex-shrink: 0; margin-top: 2px; }
.toast b { color: var(--text); display: block; font-size: .9rem; }
@keyframes toast-in { from { opacity: 0; transform: translateY(14px) scale(.97); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(10px) scale(.97); } }

/* ---------- 滚动入场 ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.3,1);
  transition-delay: var(--delay, 0ms);
}
[data-reveal].is-in { opacity: 1; transform: none; }

/* ---------- 响应式 ---------- */
@media (max-width: 1020px) {
  .hero-grid { grid-template-columns: 1fr; gap: 44px; }
  .grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .platforms { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 30px; }
  .floating-tag { right: 10px; }
}

@media (max-width: 780px) {
  .section { padding: 68px 0; }

  /* 移动端与低端设备降级：减少极光层数、停掉背景动画、顶栏改用实色，
     避免 backdrop-filter 与全屏动画叠加导致的掉帧。 */
  .aurora { opacity: .5; }
  .aurora b { animation: none; }
  .aurora b:nth-child(3) { display: none; }
  .site-header.is-stuck {
    background: color-mix(in srgb, var(--bg) 94%, transparent);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }

  .nav {
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 14px 22px 22px;
    background: color-mix(in srgb, var(--bg) 96%, transparent);
    -webkit-backdrop-filter: var(--blur);
    backdrop-filter: var(--blur);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    transform: translateY(-12px);
    opacity: 0;
    visibility: hidden;
    transition: .26s ease;
    max-height: calc(100vh - var(--header-h));
    overflow-y: auto;
  }
  .nav a { padding: 13px 14px; border-radius: var(--r-sm); font-size: 1rem; }
  body.nav-open .nav { transform: none; opacity: 1; visibility: visible; }
  .nav-toggle { display: grid; }
  .header-tools .btn--primary { display: none; }
  .grid--2, .grid--3 { grid-template-columns: 1fr; }
  .two-col { grid-template-columns: 1fr; gap: 28px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
}

@media (max-width: 560px) {
  .steps { grid-template-columns: 1fr; }
  .platforms { grid-template-columns: 1fr; }
  .hero-actions .btn { flex: 1 1 auto; }
  .section { padding: 56px 0; }
}

/* ---------- 语言切换器（由 assets/i18n.js 注入） ---------- */
.lang-switch { position: relative; }

.lang-btn {
  width: auto;
  min-width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0 10px;
  border-radius: var(--r-full);
}
.lang-btn svg { width: 15px; height: 15px; }
.lang-code {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .02em;
  line-height: 1;
}

.lang-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 90;
  min-width: 168px;
  /* 语言较多时菜单可滚动，避免超出视口 */
  max-height: min(70vh, 440px);
  overflow-y: auto;
  overscroll-behavior: contain;
  display: none;
  flex-direction: column;
  gap: 2px;
  padding: 6px;
  border-radius: var(--r-sm);
  border: 1px solid var(--border-strong);
  background: color-mix(in srgb, var(--bg-2) 96%, transparent);
  box-shadow: var(--shadow-md);
}
.lang-switch.is-open .lang-menu { display: flex; }

.lang-menu button {
  padding: 8px 10px;
  border-radius: 7px;
  text-align: left;
  font-size: .86rem;
  color: var(--text-2);
  transition: background .18s, color .18s;
}
.lang-menu button:hover { background: var(--surface-2); color: var(--text); }
.lang-menu button[aria-current="true"] {
  color: var(--text);
  background: var(--surface-2);
  box-shadow: inset 0 0 0 1px var(--border);
}

/* 从右向左的语言（阿拉伯语等）：菜单靠左展开 */
[dir="rtl"] .lang-menu { right: auto; left: 0; }
[dir="rtl"] .lang-menu button { text-align: right; }

/* 词典尚未套用时先隐藏页面，避免中英文字闪烁 */
html.i18n-pending body { visibility: hidden; }

@media (max-width: 780px) {
  .lang-btn { padding: 0 8px; }
  .lang-code { display: none; }
}

/* ---------- 动效偏好 ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  [data-reveal] { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}

/* ---------- 打印 ---------- */
@media print {
  .aurora, .grid-overlay, .site-header, .toast-host { display: none; }
  body { background: #fff; color: #000; }
}
