/* =========================================================
   知微智能 · 官网首页样式
   纯静态、零外部依赖（不使用任何 CDN / 网络字体 / 追踪脚本）
   主题：深色 + 薄荷绿强调色
   ========================================================= */

/* ---------- 设计变量 ---------- */
:root {
  --bg: #07090c;
  --bg-soft: #0a0e13;
  --surface: #0d1218;
  --surface-2: #111821;
  --surface-3: #151d27;
  --border: #1c2630;
  --border-strong: #2a3644;

  --text: #e9eeea;
  --text-2: #b6c0c9;
  --muted: #7d8894;
  --muted-2: #5d6773;

  --accent: #3ae3a2;
  --accent-2: #22b87f;
  --accent-ink: #04140e;
  --warm: #ffb76b;
  --danger: #ff7a7a;

  --radius-s: 10px;
  --radius: 16px;
  --radius-l: 24px;

  --maxw: 1200px;
  --header-h: 72px;

  --font-sans: "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei",
    "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "Cascadia Code", "JetBrains Mono", "SFMono-Regular", Consolas,
    "Liberation Mono", "Courier New", monospace;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ---------- 基础重置 ---------- */
*,
*::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;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

body.nav-open { overflow: hidden; }

h1, h2, h3, h4, p, dl, dd, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
strong { font-weight: 600; color: var(--text); }

::selection { background: var(--accent); color: var(--accent-ink); }

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

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: -80px; left: 24px;
  z-index: 200;
  padding: 12px 20px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
  border-radius: 0 0 var(--radius-s) var(--radius-s);
  transition: top 0.2s var(--ease);
}
.skip-link:focus { top: 0; }

/* ---------- 容器与通用元素 ---------- */
.container {
  width: min(100% - 48px, var(--maxw));
  margin-inline: auto;
}

/* 网格子项默认 min-width:auto，长代码/长单词会撑破列宽，统一收紧 */
.hero-grid > *,
.layers-layout > *,
.dev-layout > *,
.faq-layout > *,
.section-head--split > *,
.footer-grid > *,
.sc-item > * {
  min-width: 0;
}
.code-window { max-width: 100%; }

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.section-label span {
  display: inline-grid;
  place-items: center;
  width: 26px; height: 20px;
  border: 1px solid var(--border-strong);
  border-radius: 5px;
  color: var(--accent);
  font-size: 11px;
  letter-spacing: 0.04em;
}

.section-head { margin-bottom: 56px; }
.section-head h2 {
  margin-top: 18px;
  font-size: clamp(28px, 3.4vw, 44px);
  line-height: 1.22;
  letter-spacing: -0.02em;
  font-weight: 650;
}
.section-head--split {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: end;
}
.section-desc {
  color: var(--muted);
  font-size: 15.5px;
  line-height: 1.8;
  max-width: 460px;
  padding-bottom: 6px;
}
.section-head:not(.section-head--split) .section-desc {
  margin-top: 20px;
  max-width: 620px;
}

/* ---------- 按钮 ---------- */
.btn {
  --btn-bg: transparent;
  --btn-fg: var(--text);
  --btn-bd: var(--border-strong);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border: 1px solid var(--btn-bd);
  border-radius: 999px;
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-size: 14.5px;
  font-weight: 550;
  letter-spacing: 0.01em;
  white-space: nowrap;
  transition: transform 0.25s var(--ease), background-color 0.25s var(--ease),
    border-color 0.25s var(--ease), box-shadow 0.25s var(--ease), color 0.25s var(--ease);
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  --btn-bg: var(--accent);
  --btn-fg: var(--accent-ink);
  --btn-bd: var(--accent);
  font-weight: 650;
}
.btn-primary:hover {
  --btn-bg: #52efb2;
  box-shadow: 0 8px 30px -10px #3ae3a2;
}

.btn-outline { --btn-bg: var(--surface); --btn-fg: var(--text); }
.btn-outline:hover { --btn-bd: var(--accent); --btn-fg: var(--accent); }

.btn-ghost { --btn-bg: transparent; --btn-fg: var(--text-2); --btn-bd: transparent; }
.btn-ghost:hover { --btn-fg: var(--text); --btn-bg: var(--surface-2); }

.btn-sm { padding: 9px 18px; font-size: 13.5px; }
.btn-lg { padding: 15px 30px; font-size: 15.5px; }

.btn-arrow { width: 18px; height: 18px; transition: transform 0.25s var(--ease); }
.btn:hover .btn-arrow { transform: translateX(3px); }

/* ---------- 页头 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.site-header.is-scrolled {
  border-bottom-color: var(--border);
  box-shadow: 0 12px 32px -24px #000;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--accent);
  flex-shrink: 0;
}
.brand-mark { width: 30px; height: 30px; }
.brand-name {
  font-size: 17px;
  font-weight: 650;
  letter-spacing: 0.02em;
  color: var(--text);
}
.brand-sub {
  margin-left: 4px;
  color: var(--muted);
  font-weight: 400;
  font-size: 15px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 30px;
}
.nav a {
  position: relative;
  font-size: 14px;
  color: var(--text-2);
  padding: 6px 0;
  transition: color 0.2s var(--ease);
}
.nav a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 0; height: 1.5px;
  background: var(--accent);
  transition: width 0.28s var(--ease);
}
.nav a:hover { color: var(--text); }
.nav a:hover::after { width: 100%; }
.nav a.is-current { color: var(--text); }
.nav a.is-current::after { width: 100%; }

.header-actions { display: flex; align-items: center; gap: 10px; }

.menu-toggle {
  display: none;
  width: 40px; height: 40px;
  border: 1px solid var(--border);
  border-radius: 10px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}
.menu-bar {
  display: block;
  width: 17px; height: 1.6px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.3s var(--ease), opacity 0.2s var(--ease);
}
.menu-toggle[aria-expanded="true"] .menu-bar:nth-child(1) { transform: translateY(6.6px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-bar:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] .menu-bar:nth-child(3) { transform: translateY(-6.6px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 64px 0 0;
  overflow: hidden;
}
.hero-glow {
  position: absolute;
  inset: -180px 0 auto 0;
  height: 780px;
  background: radial-gradient(58% 52% at 50% 24%, #10251d 0%, #07090c 68%);
  pointer-events: none;
  z-index: 0;
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.06fr 0.94fr;
  gap: 56px;
  align-items: center;
  padding-bottom: 44px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 15px 7px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-2);
  font-size: 13px;
  letter-spacing: 0.01em;
}
.eyebrow .dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px #14382c;
  animation: breathe 2.8s ease-in-out infinite;
}
@keyframes breathe {
  0%, 100% { box-shadow: 0 0 0 4px #14382c; }
  50% { box-shadow: 0 0 0 7px #0f2a22; }
}

.hero-title {
  margin-top: 26px;
  font-size: clamp(38px, 5vw, 66px);
  line-height: 1.14;
  letter-spacing: -0.035em;
  font-weight: 680;
}
.grad-text {
  background: linear-gradient(96deg, #e9eeea 6%, #3ae3a2 52%, #8ee9ff 96%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-lead {
  margin-top: 24px;
  max-width: 540px;
  color: var(--muted);
  font-size: 16.5px;
  line-height: 1.82;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}
.hero-note {
  margin-top: 16px;
  font-size: 13px;
  color: var(--muted-2);
  letter-spacing: 0.01em;
}

/* Hero 视觉区 */
.hero-visual { position: relative; }
.visual-stage {
  position: relative;
  aspect-ratio: 1 / 0.94;
  min-height: 380px;
  border: 1px solid var(--border);
  border-radius: var(--radius-l);
  background: linear-gradient(160deg, #0d141a 0%, #080b10 60%, #07090c 100%);
  overflow: hidden;
}
#neuralCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.stage-ring {
  position: absolute;
  top: 50%; left: 50%;
  translate: -50% -50%;
  border: 1px solid #1a2b24;
  border-radius: 50%;
  pointer-events: none;
}
.stage-ring--1 { width: 46%; aspect-ratio: 1; border-style: dashed; animation: spin 42s linear infinite; }
.stage-ring--2 { width: 66%; aspect-ratio: 1; border-color: #14211c; animation: spin 64s linear infinite reverse; }
@keyframes spin { to { rotate: 360deg; } }

.float-card {
  position: absolute;
  width: 244px;
  padding: 15px 16px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  box-shadow: 0 22px 50px -18px #000;
  font-size: 12px;
  animation: float 7s ease-in-out infinite;
}
.float-card--doc { top: 12%; left: 5%; }
.float-card--code { bottom: 9%; right: 3%; animation-delay: -3.4s; }

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-9px); }
}

.fc-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
.fc-icon {
  display: grid;
  place-items: center;
  width: 24px; height: 24px;
  border-radius: 7px;
  background: #12261f;
  color: var(--accent);
  flex-shrink: 0;
}
.fc-icon svg { width: 15px; height: 15px; }
.fc-icon--code { background: #241d12; color: var(--warm); }
.fc-title { font-size: 12.5px; font-weight: 600; color: var(--text); }
.fc-status {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10.5px;
  color: var(--muted);
}
.fc-status--live { color: var(--warm); }
.pulse {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--warm);
  animation: breathe 1.6s ease-in-out infinite;
}
.fc-line {
  color: var(--text-2);
  font-size: 11.5px;
  line-height: 1.62;
  text-wrap: pretty;
}
.fc-meta { font-size: 10.5px; color: var(--muted-2); margin-top: 8px; line-height: 1.55; text-wrap: pretty; }
.fc-bar {
  height: 3px;
  margin: 10px 0 8px;
  border-radius: 999px;
  background: #1a232d;
  overflow: hidden;
}
.fc-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
}
.fc-bar--live i {
  background: linear-gradient(90deg, #a8702f, var(--warm));
}
.fc-meta { font-size: 10.5px; color: var(--muted-2); }

/* Hero 数据条 */
.hero-stats {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--border);
}
.stat {
  padding: 26px 28px 30px;
  border-left: 1px solid var(--border);
}
.stat:first-child { border-left: 0; padding-left: 0; }
.stat dt {
  font-size: 12.5px;
  color: var(--muted-2);
  letter-spacing: 0.06em;
}
.stat dd {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: clamp(24px, 2.6vw, 32px);
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.02em;
}
.stat-unit { font-size: 12.5px; color: var(--muted); font-family: var(--font-sans); }

/* ---------- 引言 ---------- */
.statement {
  padding: clamp(88px, 11vw, 148px) 0;
  border-top: 1px solid var(--border);
  background: var(--bg-soft);
}
.statement-title {
  margin-top: 22px;
  max-width: 900px;
  font-size: clamp(26px, 3.6vw, 48px);
  line-height: 1.36;
  letter-spacing: -0.025em;
  font-weight: 600;
}
.statement-title em {
  font-style: normal;
  color: var(--accent);
}
.statement-body {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 40px;
  max-width: 900px;
  margin-top: 40px;
}
.statement-body p {
  color: var(--muted);
  font-size: 15.5px;
  line-height: 1.85;
}

/* ---------- 三层能力 ---------- */
.layers { padding: clamp(80px, 10vw, 130px) 0; }

.layers-layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 56px;
  align-items: start;
}

.layer-tabs {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--border);
}
.layer-tab {
  display: grid;
  grid-template-columns: 34px 1fr;
  grid-template-rows: auto auto;
  column-gap: 12px;
  padding: 20px 18px 20px 4px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  border-left: 2px solid transparent;
  transition: background-color 0.25s var(--ease), border-color 0.25s var(--ease);
}
.layer-tab:hover { background: var(--surface); }
.layer-tab.is-active {
  border-left-color: var(--accent);
  background: var(--surface);
}
.lt-index {
  grid-row: 1 / 3;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted-2);
  padding-top: 3px;
}
.layer-tab.is-active .lt-index { color: var(--accent); }
.lt-title { font-size: 17px; font-weight: 600; color: var(--text-2); }
.layer-tab.is-active .lt-title { color: var(--text); }
.lt-sub { font-size: 12.5px; color: var(--muted-2); margin-top: 2px; }

.layer-panels { min-height: 340px; }
.layer-panel { display: none; }
.layer-panel.is-active { display: block; animation: fadeUp 0.45s var(--ease); }
.layer-panel h3 {
  font-size: clamp(21px, 2.2vw, 27px);
  font-weight: 620;
  letter-spacing: -0.02em;
}
.layer-panel > p {
  margin-top: 14px;
  max-width: 620px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.85;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
}
.tag-list li {
  padding: 5px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  font-size: 12.5px;
  color: var(--text-2);
}

.layer-demo {
  margin-top: 28px;
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  max-width: 620px;
}
.demo-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 9px 0;
  border-bottom: 1px dashed #1c2630;
  font-size: 13px;
}
.demo-row:last-child { border-bottom: 0; }
.demo-key { color: var(--muted); font-family: var(--font-mono); font-size: 12px; }
.demo-val { color: var(--text-2); }
.demo-warn { color: var(--warm); }

.demo-step {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 0;
  font-size: 13px;
  color: var(--text-2);
}
.demo-step i {
  display: grid;
  place-items: center;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: #12261f;
  color: var(--accent);
  font-style: normal;
  font-size: 10.5px;
  font-family: var(--font-mono);
  flex-shrink: 0;
}
.demo-step em {
  margin-left: auto;
  font-style: normal;
  font-size: 11.5px;
  color: var(--accent);
}

.demo-code {
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 2;
  color: var(--text-2);
  overflow-x: auto;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- 核心能力 ---------- */
.capabilities {
  padding: clamp(80px, 10vw, 130px) 0;
  background: var(--bg-soft);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.cap-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--border);
  overflow: hidden;
}
.cap-card {
  position: relative;
  padding: 32px 28px 34px;
  background: var(--surface);
  transition: background-color 0.3s var(--ease);
}
.cap-card:hover { background: var(--surface-2); }
.cap-no {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--muted-2);
  letter-spacing: 0.08em;
}
.cap-card h3 {
  margin-top: 16px;
  font-size: 18.5px;
  font-weight: 620;
  letter-spacing: -0.01em;
}
.cap-card p {
  margin-top: 10px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.8;
}
.cap-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 18px;
}
.cap-tags li {
  font-size: 11.5px;
  color: var(--muted-2);
  padding: 2px 9px;
  border: 1px solid var(--border);
  border-radius: 5px;
}

/* ---------- 场景 ---------- */
.scenarios { padding: clamp(80px, 10vw, 130px) 0; }
.sc-list { border-top: 1px solid var(--border); }
.sc-item {
  display: grid;
  grid-template-columns: 48px 1fr 190px;
  gap: 32px;
  align-items: center;
  padding: 30px 8px;
  border-bottom: 1px solid var(--border);
  transition: background-color 0.3s var(--ease), padding-left 0.3s var(--ease);
}
.sc-item:hover { background: var(--surface); padding-left: 20px; }
.sc-index {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent);
}
.sc-main h3 { font-size: 19px; font-weight: 600; }
.sc-main p {
  margin-top: 7px;
  max-width: 620px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.75;
}
.sc-metric { text-align: right; }
.sc-metric strong {
  display: block;
  font-family: var(--font-mono);
  font-size: 26px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.02em;
}
.sc-metric span { font-size: 11.5px; color: var(--muted-2); }
.sc-footnote {
  margin-top: 20px;
  font-size: 12px;
  color: var(--muted-2);
}

/* ---------- 工作原理 ---------- */
.how {
  padding: clamp(80px, 10vw, 130px) 0;
  background: var(--bg-soft);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.flow {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  border-top: 1px solid var(--border-strong);
}
.flow-step {
  position: relative;
  padding: 30px 26px 6px 0;
}
.flow-step::before {
  content: "";
  position: absolute;
  top: -1px; left: 0;
  width: 0; height: 2px;
  background: var(--accent);
  transition: width 0.5s var(--ease);
}
.flow-step:hover::before { width: 46px; }
.flow-num {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted-2);
}
.flow-step h3 {
  margin-top: 12px;
  font-size: 19px;
  font-weight: 600;
}
.flow-step p {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.8;
  padding-right: 12px;
}

/* ---------- 开发者 ---------- */
.dev { padding: clamp(80px, 10vw, 130px) 0; }
.dev-layout {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 64px;
  align-items: center;
}
.dev-copy h2 {
  margin-top: 18px;
  font-size: clamp(28px, 3.2vw, 42px);
  line-height: 1.24;
  letter-spacing: -0.025em;
  font-weight: 640;
}
.dev-lead {
  margin-top: 20px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.85;
}
.check-list { margin-top: 26px; display: grid; gap: 12px; }
.check-list li {
  position: relative;
  padding-left: 26px;
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.7;
}
.check-list li::before {
  content: "";
  position: absolute;
  left: 0; top: 7px;
  width: 13px; height: 7px;
  border-left: 1.8px solid var(--accent);
  border-bottom: 1.8px solid var(--accent);
  transform: rotate(-45deg);
}
.dev-copy .btn { margin-top: 30px; }

/* 代码窗口 */
.code-window {
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: #080c11;
  overflow: hidden;
  box-shadow: 0 30px 70px -40px #000;
}
.code-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.code-dots { display: flex; gap: 6px; flex-shrink: 0; }
.code-dots i { width: 9px; height: 9px; border-radius: 50%; background: #263140; }
.code-dots i:nth-child(1) { background: #3a2b2b; }
.code-dots i:nth-child(2) { background: #3a352a; }
.code-dots i:nth-child(3) { background: #2a3a30; }

.code-tabs { display: flex; gap: 4px; margin-left: 6px; }
.code-tab {
  padding: 4px 12px;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--muted);
  transition: color 0.2s var(--ease), background-color 0.2s var(--ease);
}
.code-tab:hover { color: var(--text-2); }
.code-tab.is-active { background: var(--surface-3); color: var(--accent); }

.copy-btn {
  margin-left: auto;
  padding: 4px 12px;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  font-size: 11.5px;
  color: var(--muted);
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.copy-btn:hover { color: var(--text); border-color: var(--muted-2); }
.copy-btn[data-copied="true"] { color: var(--accent); border-color: var(--accent-2); }

.code-body { padding: 20px 4px 20px 20px; overflow-x: auto; }
.code-panel {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 12.2px;
  line-height: 1.95;
  color: #c3cdd6;
  tab-size: 2;
  white-space: pre;
}
.code-panel:not(.is-active) { display: none; }

.c-cmd { color: var(--accent); }
.c-key { color: var(--warm); }
.c-str { color: #8fe0b8; }
.c-fn { color: #8cc8ff; }
.c-bool { color: var(--warm); }

.code-result {
  border-top: 1px solid var(--border);
  background: var(--surface);
}
.cr-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted-2);
  border-bottom: 1px solid var(--border);
}
.cr-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.cr-body {
  margin: 0;
  padding: 14px 18px 18px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  line-height: 1.9;
  color: var(--text-2);
  white-space: pre-wrap;
  word-break: break-word;
}

/* ---------- 信任指标 ---------- */
.trust {
  padding: clamp(64px, 8vw, 100px) 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--bg-soft);
}
.trust-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.trust-item {
  padding: 4px 28px;
  border-left: 1px solid var(--border);
}
.trust-item:first-child { border-left: 0; padding-left: 0; }
.trust-num {
  display: block;
  font-family: var(--font-mono);
  font-size: clamp(28px, 3vw, 38px);
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--accent);
}
.trust-num span { font-size: 0.5em; margin-left: 2px; color: var(--muted); }
.trust-label {
  display: block;
  margin-top: 8px;
  font-size: 13px;
  color: var(--muted);
}

/* ---------- FAQ ---------- */
.faq { padding: clamp(80px, 10vw, 130px) 0; }
.faq-layout {
  display: grid;
  grid-template-columns: 0.72fr 1.28fr;
  gap: 64px;
  align-items: start;
}
.faq-head h2 {
  margin-top: 18px;
  font-size: clamp(28px, 3.2vw, 40px);
  line-height: 1.26;
  letter-spacing: -0.025em;
  font-weight: 640;
}
.faq-note {
  margin-top: 22px;
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.8;
}
.faq-note a { color: var(--accent); border-bottom: 1px solid #2c6f57; }

.faq-list { border-top: 1px solid var(--border); }
.faq-item { border-bottom: 1px solid var(--border); }
.faq-item summary {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 22px 4px;
  cursor: pointer;
  list-style: none;
  font-size: 15.5px;
  font-weight: 550;
  color: var(--text-2);
  transition: color 0.2s var(--ease);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:hover { color: var(--text); }
.faq-item[open] summary { color: var(--text); }

.faq-icon {
  position: relative;
  margin-left: auto;
  width: 14px; height: 14px;
  flex-shrink: 0;
}
.faq-icon::before,
.faq-icon::after {
  content: "";
  position: absolute;
  top: 50%; left: 50%;
  width: 12px; height: 1.6px;
  background: var(--muted);
  translate: -50% -50%;
  transition: transform 0.3s var(--ease), background-color 0.3s var(--ease);
}
.faq-icon::after { transform: rotate(90deg); }
.faq-item[open] .faq-icon::after { transform: rotate(0deg); background: var(--accent); }
.faq-item[open] .faq-icon::before { background: var(--accent); }

.faq-answer { padding: 0 40px 24px 4px; }
.faq-answer p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.9;
}

/* ---------- CTA ---------- */
.cta { padding: 0 0 clamp(80px, 10vw, 130px); }
.cta-box {
  position: relative;
  padding: clamp(56px, 7vw, 88px) clamp(28px, 5vw, 72px);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-l);
  background:
    radial-gradient(62% 86% at 50% -14%, #17483a 0%, #0f1d19 44%, #0a1014 74%),
    linear-gradient(150deg, #0e1a16 0%, #0a1014 52%, #080b10 100%);
  overflow: hidden;
  text-align: center;
}
.cta-box > * { position: relative; z-index: 1; }
.cta-box h2 {
  margin-top: 18px;
  font-size: clamp(30px, 4vw, 50px);
  line-height: 1.2;
  letter-spacing: -0.03em;
  font-weight: 660;
}
.cta-lead {
  margin-top: 16px;
  color: var(--muted);
  font-size: 15.5px;
}
.cta-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

/* ---------- 页脚 ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 64px 0 32px;
  background: var(--bg-soft);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, minmax(0, 1fr));
  gap: 40px;
  padding-bottom: 48px;
}
.footer-brand p {
  margin-top: 16px;
  font-size: 13.5px;
  color: var(--muted);
}
.footer-col h3 {
  font-size: 12.5px;
  color: var(--muted-2);
  letter-spacing: 0.06em;
  margin-bottom: 16px;
}
.footer-col a {
  display: block;
  padding: 5px 0;
  font-size: 13.5px;
  color: var(--text-2);
  transition: color 0.2s var(--ease);
}
.footer-col a:hover { color: var(--accent); }

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  font-size: 12.5px;
  color: var(--muted-2);
}
.beian { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.beian a { color: var(--muted); transition: color 0.2s var(--ease); }
.beian a:hover { color: var(--accent); }
.beian-sep { color: var(--muted-2); }
.demo-note {
  margin-top: 14px;
  font-size: 11.5px;
  color: #4d5661;
}

/* =========================================================
   长文版块：阅读时长 / 时间线 / 关键转变 / 应用版图 / 冷静看 / 结语
   ========================================================= */

.read-time {
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--muted-2);
  white-space: nowrap;
}

/* ---------- 时间线 ---------- */
.timeline-section {
  padding: clamp(80px, 10vw, 130px) 0;
  background: var(--bg-soft);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.timeline {
  position: relative;
  max-width: 920px;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 110px;
  top: 14px;
  bottom: 36px;
  width: 1px;
  background: var(--border-strong);
}
.tl-item {
  position: relative;
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 44px;
  padding-bottom: 46px;
}
.tl-item:last-child { padding-bottom: 0; }
.tl-item::before {
  content: "";
  position: absolute;
  left: 104px;
  top: 8px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--bg-soft);
  border: 1.5px solid var(--accent);
}
.tl-year {
  padding-top: 1px;
  padding-right: 26px;
  text-align: right;
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: -0.01em;
}
.tl-year span {
  display: block;
  margin-top: 2px;
  font-size: 11.5px;
  font-weight: 400;
  color: var(--muted-2);
  letter-spacing: 0;
}
.tl-body h3 {
  font-size: 20px;
  font-weight: 620;
  letter-spacing: -0.01em;
}
.tl-body p {
  margin-top: 10px;
  max-width: 660px;
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.85;
}
.tl-note {
  margin-top: 14px !important;
  padding-left: 14px;
  border-left: 2px solid var(--border-strong);
  color: var(--muted-2) !important;
  font-size: 13px !important;
}

/* ---------- 关键转变 ---------- */
.shifts { padding: clamp(80px, 10vw, 130px) 0; }
.shift-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--border);
  overflow: hidden;
}
.shift-card {
  padding: 34px 32px 36px;
  background: var(--surface);
  transition: background-color 0.3s var(--ease);
}
.shift-card:hover { background: var(--surface-2); }
.shift-no {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--muted-2);
  letter-spacing: 0.08em;
}
.shift-card h3 {
  margin-top: 12px;
  font-size: 19.5px;
  font-weight: 620;
  letter-spacing: -0.01em;
}
.shift-flow {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 18px;
  font-size: 12.5px;
}
.shift-flow span {
  padding: 4px 11px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg-soft);
  color: var(--text-2);
}
.shift-flow span:last-child {
  border-color: #24594a;
  color: var(--accent);
}
.shift-flow i {
  font-style: normal;
  color: var(--muted-2);
}
.shift-card > p:last-child {
  margin-top: 18px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.8;
}

/* ---------- 应用版图 ---------- */
.fields {
  padding: clamp(80px, 10vw, 130px) 0;
  background: var(--bg-soft);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.field-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.field-card {
  padding: 28px 26px 30px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  transition: border-color 0.3s var(--ease), transform 0.3s var(--ease);
}
.field-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
}
.field-card h3 {
  font-size: 18px;
  font-weight: 620;
  letter-spacing: -0.01em;
}
.field-card dl { margin-top: 4px; }
.field-card dt {
  margin-top: 16px;
  font-size: 11.5px;
  letter-spacing: 0.06em;
  color: var(--accent);
}
.field-card dt:nth-of-type(2) { color: var(--warm); }
.field-card dd {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.75;
}

/* ---------- 冷静看 ---------- */
.limits { padding: clamp(80px, 10vw, 130px) 0; }
.limit-list {
  max-width: 920px;
  border-top: 1px solid var(--border);
}
.limit-item {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 24px;
  padding: 28px 0;
  border-bottom: 1px solid var(--border);
}
.limit-no {
  padding-top: 4px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent);
}
.limit-item h3 {
  font-size: 18px;
  font-weight: 600;
}
.limit-item p {
  margin-top: 9px;
  max-width: 720px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.85;
}

/* ---------- 结语 ---------- */
.closing { padding: 0 0 clamp(80px, 10vw, 120px); }
.closing-box {
  position: relative;
  padding: clamp(44px, 6vw, 80px) clamp(28px, 5vw, 72px);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-l);
  background:
    radial-gradient(62% 86% at 12% -20%, #17483a 0%, #0f1d19 44%, #0a1014 74%),
    linear-gradient(150deg, #0e1a16 0%, #0a1014 52%, #080b10 100%);
  overflow: hidden;
}
.closing-box h2 {
  margin-top: 22px;
  max-width: 760px;
  font-size: clamp(26px, 3.4vw, 42px);
  line-height: 1.38;
  letter-spacing: -0.028em;
  font-weight: 640;
}
.closing-lead {
  margin-top: 24px;
  max-width: 700px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.9;
}

.footer-col--note p {
  margin-top: 0;
  color: var(--muted-2);
  font-size: 13px;
  line-height: 1.8;
}

/* ---------- 回到顶部 ---------- */
.to-top {
  position: fixed;
  right: 24px; bottom: 24px;
  z-index: 90;
  display: grid;
  place-items: center;
  width: 44px; height: 44px;
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  background: var(--surface);
  color: var(--text-2);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease),
    visibility 0.3s, color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { color: var(--accent); border-color: var(--accent-2); }
.to-top svg { width: 18px; height: 18px; }

/* ---------- 入场动画 ---------- */
.js .reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.75s var(--ease), transform 0.75s var(--ease);
  will-change: opacity, transform;
}
.js .reveal.is-in { opacity: 1; transform: none; }

/* ---------- 响应式 ---------- */
@media (max-width: 1080px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 48px;
    padding-bottom: 56px;
  }
  .hero-visual { max-width: 560px; }
  .hero-lead { max-width: 620px; }
  .layers-layout { grid-template-columns: 260px 1fr; gap: 40px; }
  .dev-layout { grid-template-columns: 1fr; gap: 48px; }
  .faq-layout { grid-template-columns: 1fr; gap: 40px; }
  .section-head--split { grid-template-columns: 1fr; gap: 24px; align-items: start; }
  .section-desc { max-width: 620px; }
}

@media (max-width: 900px) {
  .nav {
    position: fixed;
    inset: var(--header-h) 0 0 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 24px 28px;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 24px 40px -20px #000;
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s var(--ease), transform 0.25s var(--ease), visibility 0.25s;
    overflow-y: auto;
  }
  .nav.is-open { opacity: 1; transform: none; visibility: visible; }
  .nav a {
    padding: 15px 0;
    font-size: 15.5px;
    border-bottom: 1px solid var(--border);
  }
  .nav a::after { display: none; }
  .nav a:last-child { border-bottom: 0; }
  .header-docs { display: none; }
  .menu-toggle { display: flex; }

  .cap-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .flow { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .flow-step { padding: 26px 20px 20px 0; }
  .trust-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 34px 0; }
  .trust-item:nth-child(3) { border-left: 0; padding-left: 0; }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 36px; }
  .shift-grid { grid-template-columns: 1fr; }
  .field-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .read-time { display: none; }
}

@media (max-width: 680px) {
  .container { width: calc(100% - 40px); }
  :root { --header-h: 64px; }

  .hero { padding-top: 48px; }
  .hero-title { font-size: clamp(32px, 9vw, 44px); }
  .hero-lead { font-size: 14.8px; line-height: 1.78; }
  .hero-actions { gap: 10px; margin-top: 28px; }
  .hero-actions .btn-lg { padding: 13px 18px; font-size: 14.5px; }
  .hero-actions .btn { flex: 1 1 auto; }
  .hero-note { font-size: 12px; }

  .visual-stage { min-height: 320px; aspect-ratio: 1 / 1.02; }
  .float-card { width: 208px; padding: 12px 13px; }
  .float-card--doc { top: 6%; left: 4%; }
  .float-card--code { bottom: 5%; right: 3%; }

  .hero-stats { grid-template-columns: repeat(2, 1fr); }
  .stat { padding: 18px 16px 20px; }
  .stat:nth-child(3) { border-left: 0; padding-left: 0; }
  .stat:nth-child(3),
  .stat:nth-child(4) { border-top: 1px solid var(--border); }
  .stat:nth-child(4) { padding-left: 16px; }

  .statement-body { grid-template-columns: 1fr; gap: 20px; }
  .layers-layout { grid-template-columns: 1fr; gap: 28px; }
  .layer-tabs { flex-direction: row; border-top: 0; border-bottom: 1px solid var(--border); overflow-x: auto; }
  .layer-tab {
    flex: 1 0 auto;
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    row-gap: 2px;
    padding: 14px 14px 14px;
    border-bottom: 0;
    border-left: 0;
    border-top: 2px solid transparent;
    min-width: 112px;
  }
  .layer-tab.is-active { border-top-color: var(--accent); }
  .lt-index { grid-row: auto; padding: 0; font-size: 10.5px; }
  .lt-title { font-size: 15px; }
  .lt-sub { font-size: 11.5px; }

  .cap-grid { grid-template-columns: 1fr; }

  /* 长文版块：移动端 */
  .timeline::before { left: 56px; top: 10px; bottom: 28px; }
  .tl-item { grid-template-columns: 56px 1fr; gap: 20px; padding-bottom: 34px; }
  .tl-item::before { left: 49px; top: 6px; width: 12px; height: 12px; }
  .tl-year { font-size: 13px; }
  .tl-year span { font-size: 10.5px; }
  .tl-body h3 { font-size: 17.5px; }
  .tl-body p { font-size: 14px; line-height: 1.8; }
  .tl-note { font-size: 12.5px !important; }

  .shift-card { padding: 26px 22px 28px; }
  .shift-card h3 { font-size: 18px; }
  .field-grid { grid-template-columns: 1fr; }
  .field-card { padding: 24px 22px 26px; }
  .limit-item { grid-template-columns: 30px 1fr; gap: 14px; padding: 22px 0; }
  .limit-item h3 { font-size: 16.5px; }
  .limit-item p { font-size: 13.5px; }
  .closing-box h2 { font-size: clamp(24px, 7vw, 30px); }
  .sc-item { grid-template-columns: 30px 1fr; gap: 14px; padding: 24px 4px; }
  .sc-metric { grid-column: 2; text-align: left; display: flex; align-items: baseline; gap: 8px; }
  .sc-metric strong { font-size: 20px; }
  .flow { grid-template-columns: 1fr; }
  .flow-step { padding: 22px 0; border-bottom: 1px solid var(--border); }
  .flow-step:last-child { border-bottom: 0; }
  .flow-step::before { display: none; }

  .code-body { padding: 16px 14px; }
  .code-panel { font-size: 11px; }
  .code-bar { flex-wrap: wrap; gap: 10px; }
  .code-tabs { order: 3; width: 100%; margin-left: 0; }
  .copy-btn { margin-left: auto; }

  .trust-grid { grid-template-columns: 1fr; gap: 24px; }
  .trust-item { border-left: 0; padding: 0; }

  .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
  .footer-brand { grid-column: 1 / -1; }
  .footer-bottom { flex-direction: column; align-items: flex-start; gap: 12px; }

  .to-top { right: 16px; bottom: 16px; }
}

/* ---------- 动效降级 ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .js .reveal { opacity: 1; transform: none; }
}

/* ---------- 打印 ---------- */
@media print {
  body { background: #fff; color: #111; }
  .site-header, .to-top, .hero-visual, .cta, .code-window { display: none; }
  a { color: #111; text-decoration: underline; }
}
