/* 全局排版与间距系统 v5
   依据 better-typography：少字号、语义层级、按角色行高、em 字距、4/8 间距。 */

:root {
  --fs-display: clamp(3rem, 7vw, 6.2rem);
  --fs-h2: clamp(1.75rem, 3.2vw, 2.9rem);
  --fs-h3: clamp(1.05rem, 1.35vw, 1.22rem);
  --fs-lead: clamp(0.95rem, 1.05vw, 1.06rem);
  --fs-body: 1rem;
  --fs-small: 0.8125rem;
  --fs-meta: 0.75rem;
  --fs-mono: 0.6875rem;

  --lh-display: 1.04;
  --lh-heading: 1.24;
  --lh-body: 1.68;

  --ls-display: -0.03em;
  --ls-heading: -0.02em;
  --ls-label: 0.14em;

  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 24px;
  --s-6: 32px;
  --s-7: 48px;
  --s-8: 64px;
  --s-9: 96px;

  --section-pad: clamp(64px, 9vh, 112px);
  --card-pad: clamp(16px, 2vw, 22px);
}

body {
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  letter-spacing: 0;
}

/* 标题层级：逐级递减 */
.hero h1 {
  font-size: var(--fs-display);
  line-height: var(--lh-display);
  letter-spacing: var(--ls-display);
  text-wrap: balance;
}

.head h2,
.section h2,
.hero h2 {
  font-size: var(--fs-h2);
  line-height: var(--lh-heading);
  letter-spacing: var(--ls-heading);
  text-wrap: balance;
}

.line-card h3,
.feat-card h3,
.head h3 {
  font-size: var(--fs-h3);
  line-height: 1.35;
  letter-spacing: -0.01em;
}

/* 正文与引导文 */
.hero-lead,
.head .sub,
.hero-sub p {
  font-size: var(--fs-lead);
  line-height: 1.8;
  text-wrap: pretty;
}

.hero-lead,
.head .sub {
  max-width: 60ch;
}

.line-card p,
.about-grid p,
.pcard-callout p {
  text-wrap: pretty;
}

/* 统一小标签与等宽信息 */
.eyebrow,
.pcard-sub,
.pcard-foot,
.line-k,
.flow3 i,
.hero-badge .live {
  font-family: var(--mono);
  font-size: var(--fs-mono);
  letter-spacing: var(--ls-label);
}

.pcard-row b {
  font-size: 0.75rem;
}

.pcard-row i,
.pcard-row em,
.contact-quick .pcard-row em {
  font-size: 0.625rem;
  letter-spacing: 0.1em;
}

.chips span {
  font-size: 0.6875rem;
}

.hero-meta li {
  font-size: 0.75rem;
}

.hero-badge .tag {
  font-size: 0.75rem;
}

/* 组件小标签：统一等宽字族、字号与字距 */
.card-k,
.line-k,
.case-k,
.feat-k,
.row-k,
.viz-head,
.demo-lab,
.spec dt,
.about-item span:last-child,
.pipeline i,
.step-list i,
.contact-card .k,
.dcard-foot > span,
.cap em,
.app-bar,
.foot-note {
  font-family: var(--mono);
  font-size: var(--fs-mono);
  letter-spacing: var(--ls-label);
}

/* 交互控件行高与正文一致，避免按钮内文字发挤 */
button,
[role="button"] {
  line-height: 1.5;
}

/* 正文段落统一行高，中文阅读更稳 */
.row p,
.why-grid p,
.about-grid p,
.feat p,
.line-card p,
.case-card p,
.faq p,
.cta-band p,
.pcard-callout p,
.demo-note,
.viz-note,
.spec dd {
  line-height: 1.8;
}

/* 数字稳定宽度 */
.metric-strip b,
.proof-strip b,
.hero-meta,
.pcard-foot,
.chips {
  font-variant-numeric: tabular-nums;
}

/* 间距统一 */
.section {
  padding: var(--section-pad) var(--pad);
}

.head {
  margin-bottom: var(--s-7);
}

.hero-grid {
  gap: var(--s-7);
}

.hero-actions {
  gap: var(--s-3);
}

.hero-meta {
  gap: var(--s-4);
}

.line-grid {
  gap: var(--s-4);
}

.line-card {
  padding: var(--card-pad);
}

.pcard-row {
  padding: 10px 12px;
}

.flow3 {
  gap: var(--s-3);
  padding-top: var(--s-4);
}

/* 小屏保持同样的层级，不额外放大标题 */
@media (max-width: 760px) {
  .hero h1 {
    font-size: clamp(2.6rem, 12vw, 4rem);
  }

  .head h2,
  .section h2 {
    font-size: clamp(1.65rem, 8vw, 2.35rem);
  }

  .hero-lead,
  .head .sub {
    line-height: 1.75;
  }

  .hero-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--s-2) var(--s-3);
  }
}
