/* ═══════════════════════════════════════════════════════════
   CapStack · Arc Dark 设计系统 v1.0
   站群差异化: 深炭#0B0F16 + 电弧青#00E0FF · Syncopate/Inter/Space Mono
   签名: charge-bar 电荷余量条 · mono 数据标签 · 1px 面板描边
   本文件为 CapStack 站专属, 从风格卡 A 方向从零产出, 禁止跨站复制
   ═══════════════════════════════════════════════════════════ */
:root {
  /* 底色三档 (section 节奏交替用) */
  --bg: #0B0F16;            /* 页面基底 深炭 */
  --bg-raised: #101724;     /* 浮起面板 */
  --bg-panel: #131C2C;      /* 高亮面板/卡片 */

  /* 墨色 */
  --ink: #E8EEF6;           /* 主文字 (on --bg ≈ 15.2:1) */
  --ink-dim: #A9B9CE;       /* 次文字 (≈ 9.3:1) */
  --ink-mute: #7C8CA2;      /* 弱文字/标签 (≈ 5.4:1) */

  /* 电弧青 accent */
  --accent: #00E0FF;
  --accent-soft: #6FE9FA;   /* 青色浅档 (小字/描边高亮) */
  --on-accent: #062028;     /* CTA 按钮文字 (on #00E0FF ≈ 10.9:1) */
  --accent-dim: #0E6B7C;    /* 青色暗档 (描边/进度) */

  /* 语义色 (仅状态, 不作装饰) */
  --ok: #34D399;            /* 在线/通过 */
  --warn: #F0C000;          /* 注意 */
  --danger: #F87171;        /* 报警 */

  /* 线与描边 */
  --line: #1E2A3C;          /* 1px 面板描边/分隔 */
  --line-strong: #2C3D55;

  /* 字体 */
  --font-display: 'Syncopate', 'Inter', sans-serif;  /* 仅 h1/eyebrow/大数字, 常态 700 + letter-spacing .04em */
  --font-body: 'Inter', system-ui, sans-serif;
  --font-mono: 'Space Mono', ui-monospace, monospace; /* 数据/标签/表格数字 */

  /* 字号节奏 */
  --fs-h1: clamp(1.4rem, 4.4vw, 3.4rem);
  --fs-h2: clamp(1.5rem, 2.6vw, 2.1rem);
  --fs-h3: 1.15rem;
  --fs-body: 1rem;
  --fs-small: .9rem;
  --fs-micro: .875rem;

  /* 间距 (4px 基) */
  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px;
  --sp-5: 24px; --sp-6: 32px; --sp-7: 48px; --sp-8: 64px; --sp-9: 96px;

  /* 形状: 工业面板 = 小圆角, 禁 16-24px 大圆角 */
  --r-sm: 4px; --r-md: 8px; --r-lg: 12px;
  --shadow-panel: 0 8px 28px rgba(0, 0, 0, .38);

  /* 布局 */
  --container: 1180px;
  --nav-h: 68px;
}

/* ── 基础 reset 与排版 ───────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 { line-height: 1.18; font-weight: 700; margin-bottom: var(--sp-4); }
h1 { font-size: var(--fs-h1); font-family: var(--font-display); letter-spacing: .02em; text-transform: uppercase; overflow-wrap: break-word; }
h2 { font-size: var(--fs-h2); margin-bottom: var(--sp-4); }
h3 { font-size: var(--fs-h3); }
p { margin-bottom: var(--sp-4); }

/* 硬约束 43: 标题节奏 margin-bottom ≥16px (上面 var(--sp-4)=16px 已保证) */

.container { max-width: var(--container); margin: 0 auto; padding: 0 var(--sp-5); }
section { padding: var(--sp-9) 0; }
section + section { border-top: 1px solid var(--line); }

/* ── 签名: mono 数据标签 eyebrow ─────────────────── */
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-mono); font-size: var(--fs-micro);
  letter-spacing: .18em; text-transform: uppercase;
  color: var(--accent); margin-bottom: var(--sp-4);
}
.eyebrow::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 8px rgba(0,224,255,.55); }

/* ── 签名: charge-bar 电荷余量条 ─────────────────── */
.charge-bar { display: inline-flex; gap: 4px; align-items: flex-end; }
.charge-bar i {
  width: 7px; border-radius: 2px; background: var(--accent-dim);
  display: inline-block;
}
.charge-bar i.on { background: var(--accent); box-shadow: 0 0 6px rgba(0,224,255,.5); }
.charge-bar i:nth-child(1) { height: 8px; } .charge-bar i:nth-child(2) { height: 12px; }
.charge-bar i:nth-child(3) { height: 16px; } .charge-bar i:nth-child(4) { height: 20px; }
.charge-bar i:nth-child(5) { height: 24px; }

/* ── 按钮 ───────────────────────────────────────── */
.btn {
  display: inline-block; padding: 14px 30px; border-radius: var(--r-md);
  font-weight: 600; font-size: var(--fs-small); cursor: pointer;
  border: 1px solid transparent; transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
  min-height: 44px;
}
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 6px 22px rgba(0,224,255,.28); text-decoration: none; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }

/* ── 面板与卡片 ─────────────────────────────────── */
.panel { background: var(--bg-raised); border: 1px solid var(--line); border-radius: var(--r-lg); }
.card {
  background: var(--bg-panel); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: var(--sp-5);
  transition: border-color .18s ease, transform .18s ease;
}
.card:hover { border-color: var(--accent-dim); transform: translateY(-3px); }
.grid { display: grid; gap: var(--sp-5); min-width: 0; }
.grid > * { min-width: 0; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* ── 图位比例 (与生图尺寸白名单一一对应, 硬约束 40) ── */
.ar-3-2 { aspect-ratio: 3 / 2; }
.ar-2-3 { aspect-ratio: 2 / 3; }
.ar-1-1 { aspect-ratio: 1 / 1; }
.frame-img { overflow: hidden; border-radius: var(--r-lg); border: 1px solid var(--line); }
.frame-img img { width: 100%; height: 100%; object-fit: cover; }

/* ── split 分屏 (图文同高, 排除清单) ─────────────── */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-6); align-items: stretch; }
.split .split-media { min-height: 100%; }
.split .split-media .frame-img { height: 100%; }
.split.rev .split-media { order: 2; }

/* ── spec 表格 ─────────────────────────────────── */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-lg); }
table.spec { width: 100%; border-collapse: collapse; font-size: var(--fs-small); }
table.spec th, table.spec td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--line); }
table.spec th { font-family: var(--font-mono); font-size: var(--fs-micro); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-mute); background: var(--bg-raised); }
table.spec td:first-child { color: var(--ink-dim); }
table.spec td { font-variant-numeric: tabular-nums; }
table.spec tr:last-child td { border-bottom: none; }

/* ── stats band ────────────────────────────────── */
.stat-num { font-family: var(--font-display); font-size: clamp(1.7rem, 3vw, 2.4rem); color: var(--accent); letter-spacing: .02em; }
.stat-label { font-family: var(--font-mono); font-size: var(--fs-micro); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-mute); margin-top: 6px; }

/* ── 步骤条 ────────────────────────────────────── */
.steps { counter-reset: step; display: grid; gap: var(--sp-5); }
.steps--3 { grid-template-columns: repeat(3, 1fr); }
.steps--4 { grid-template-columns: repeat(4, 1fr); }
.steps--6 { grid-template-columns: repeat(3, 1fr); }
.step { counter-increment: step; background: var(--bg-raised); border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--sp-5); }
.step::before {
  content: counter(step, decimal-leading-zero);
  font-family: var(--font-mono); font-size: var(--fs-micro); color: var(--accent);
  display: inline-flex; width: 24px; height: 24px; border: 1px solid var(--accent-dim);
  border-radius: 50%; align-items: center; justify-content: center; margin-bottom: var(--sp-3);
}

/* ── quote band (CTA) ──────────────────────────── */
.quote-band { position: relative; border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.quote-band .qb-media { position: absolute; inset: 0; }
.quote-band .qb-media img { width: 100%; height: 100%; object-fit: cover; }
.quote-band .qb-media::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(11,15,22,.94) 0%, rgba(11,15,22,.82) 42%, rgba(11,15,22,.45) 100%); }
.quote-band .qb-body { position: relative; padding: var(--sp-8) var(--sp-6); max-width: 640px; }

/* ── FAQ 手风琴 ────────────────────────────────── */
.faq-item { border: 1px solid var(--line); border-radius: var(--r-md); background: var(--bg-raised); margin-bottom: var(--sp-3); overflow: hidden; }
.faq-q {
  width: 100%; display: flex; justify-content: space-between; align-items: center; gap: var(--sp-4);
  padding: 18px 20px; background: none; border: none; color: var(--ink);
  font: 600 var(--fs-small) var(--font-body); text-align: left; cursor: pointer; min-height: 44px;
}
.faq-q::after { content: '▾'; font-family: var(--font-mono); color: var(--accent); transition: transform .2s ease; }
.faq-item.open .faq-q::after { transform: rotate(180deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .28s ease; }
.faq-a > div { padding: 0 20px 18px; color: var(--ink-dim); font-size: var(--fs-small); }

/* ── 表单 ──────────────────────────────────────── */
.field { margin-bottom: var(--sp-4); }
.field label { display: block; font-family: var(--font-mono); font-size: var(--fs-micro); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-mute); margin-bottom: 6px; }
.field input, .field select, .field textarea {
  width: 100%; background: var(--bg); border: 1px solid var(--line-strong);
  border-radius: var(--r-md); padding: 12px 14px; color: var(--ink);
  font: 400 var(--fs-small) var(--font-body); min-height: 44px;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--accent-dim); border-color: var(--accent); }

/* ── 询盘弹窗 (硬约束 22: 左图右表双栏) ─────────── */
.modal-overlay { position: fixed; inset: 0; background: rgba(4,7,12,.78); display: none; align-items: center; justify-content: center; z-index: 90; padding: var(--sp-4); }
.modal-overlay.open { display: flex; }
.modal-dialog { display: grid; grid-template-columns: 1fr 1fr; max-width: 760px; width: 100%; background: var(--bg-panel); border: 1px solid var(--line-strong); border-radius: var(--r-lg); overflow: hidden; }
.modal-image-panel { position: relative; min-height: 320px; }
.modal-image-panel img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.modal-image-panel .mi-cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px; background: linear-gradient(0deg, rgba(6,10,16,.92), transparent); font-family: var(--font-mono); font-size: var(--fs-micro); letter-spacing: .1em; text-transform: uppercase; color: var(--accent); }
.modal-form-panel { padding: var(--sp-6); }
.modal-close { position: absolute; top: 10px; right: 10px; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line-strong); background: rgba(11,15,22,.72); color: var(--ink); font-size: 18px; cursor: pointer; }

/* ── 导航 / 页脚 (blocks 单一模板渲染目标) ───────── */
.site-nav { position: sticky; top: 0; z-index: 60; background: rgba(11,15,22,.92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.site-nav .nav-inner { max-width: var(--container); margin: 0 auto; padding: 0 var(--sp-5); height: var(--nav-h); display: flex; align-items: center; gap: var(--sp-6); }
.nav-logo { display: flex; align-items: center; gap: 10px; color: var(--ink); font-family: var(--font-display); font-weight: 700; letter-spacing: .06em; font-size: 1.02rem; }
.nav-logo:hover { text-decoration: none; }
.nav-links { display: flex; gap: var(--sp-2); margin-left: auto; align-items: center; list-style: none; }
.nav-links > li { position: relative; }
.nav-links a { display: inline-flex; align-items: center; padding: 10px 14px; color: var(--ink-dim); font-size: var(--fs-small); font-weight: 500; border-radius: var(--r-md); min-height: 44px; }
.nav-links a:hover { color: var(--ink); background: var(--bg-raised); text-decoration: none; }
.nav-links a.active { color: var(--accent); }
.nav-drop { position: absolute; top: 100%; left: 0; min-width: 220px; background: var(--bg-panel); border: 1px solid var(--line-strong); border-radius: var(--r-md); padding: 8px; display: none; box-shadow: var(--shadow-panel); }
.nav-links li:hover .nav-drop, .nav-links li:focus-within .nav-drop { display: block; }
.nav-drop a { display: block; padding: 10px 14px; }
.nav-burger { display: none; }

.site-footer { border-top: 1px solid var(--line); background: var(--bg-raised); padding: var(--sp-8) 0 var(--sp-6); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: var(--sp-6); }
.site-footer h3 { font-family: var(--font-mono); font-size: var(--fs-micro); letter-spacing: .16em; text-transform: uppercase; color: var(--ink-mute); margin-bottom: var(--sp-3); }
.site-footer ul { list-style: none; }
.site-footer li { margin-bottom: 8px; }
.site-footer a { color: var(--ink-dim); font-size: var(--fs-small); }
.footer-legal a { display: inline-block; padding: 12px 0; }
.footer-legal { margin-top: var(--sp-6); padding-top: var(--sp-4); border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: var(--sp-4); flex-wrap: wrap; color: var(--ink-mute); font-size: var(--fs-micro); font-family: var(--font-mono); }

/* ── 轻 hero (P1d) ─────────────────────────────── */
.hero-light { padding: var(--sp-8) 0 var(--sp-7); border-bottom: 1px solid var(--line); background: var(--bg-raised); }
.crumbs { font-family: var(--font-mono); font-size: var(--fs-micro); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-mute); margin-bottom: var(--sp-4); }
.crumbs a { color: var(--ink-mute); }

/* ── 动效 ──────────────────────────────────────── */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } html { scroll-behavior: auto; } }


/* ── 移动端防溢出 + 触控目标（Playwright 验收修复） ── */
.crumbs a { display: inline-block; padding: 8px 0; }
.text-link { display: inline-block; padding: 8px 0; }
.stats-band > * { min-width: 0; }
.stat-label, .stat .l, .stat-num { overflow-wrap: anywhere; }

/* ── 响应式 ────────────────────────────────────── */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .steps--4 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  section { padding: var(--sp-8) 0; }
  .split, .split.rev { grid-template-columns: 1fr; }
  .split.rev .split-media { order: 0; }
  .modal-dialog { grid-template-columns: 1fr; }
  .modal-image-panel { min-height: 200px; }
  .steps--3, .steps--4, .steps--6 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  body { font-size: 15px; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .steps--3, .steps--4, .steps--6 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .nav-links { display: none; }
  .nav-burger { display: inline-flex; margin-left: auto; background: none; border: 1px solid var(--line-strong); border-radius: var(--r-md); color: var(--ink); width: 44px; height: 44px; align-items: center; justify-content: center; cursor: pointer; }
  .nav-links.open { display: flex; flex-direction: column; position: absolute; top: var(--nav-h); left: 0; right: 0; background: var(--bg-panel); border-bottom: 1px solid var(--line-strong); padding: var(--sp-4); }
}
