/* ==========================================================================
   base.css — 设计令牌 / 重置 / 排版 / 工具类
   ========================================================================== */

:root {
  /* 品牌 */
  --brand: #1a6fe0;
  --brand-dark: #1a4fb0;
  --brand-soft: #eaf1fe;
  --brand-wash: #f5f8fe;

  /* 中性色 */
  --ink: #0f1419;
  --ink-2: #5b6472;
  --ink-3: #8a929e;
  --ink-4: #6b7280;
  --line: #e7e7ea;
  --line-soft: #eef0f3;
  --surface: #ffffff;
  --surface-alt: #f9fafc;
  --surface-deep: #0f1419;
  --surface-footer: #0b0e13;

  /* 语义色 */
  --success: #0f7a50;
  --success-soft: #e7f7ef;
  --warn: #92400e;
  --warn-soft: #fffbeb;
  --danger: #991b1b;
  --danger-soft: #fef2f2;

  /* 字体 */
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", sans-serif;
  --font-mono: "SF Mono", "JetBrains Mono", Consolas, "Courier New", monospace;

  /* 尺寸 */
  --shell: 1440px;
  --pad-x: 64px;
  --nav-h: 72px;
  --radius-sm: 12px;
  --radius: 16px;
  --radius-lg: 28px;

  /* 版心内边距：视口宽于 --shell 时自动居中，背景仍铺满全宽。
     100% 在替换处解析为元素的包含块宽度，因此各区块可直接引用。 */
  --gutter: max(var(--pad-x), calc((100% - var(--shell)) / 2 + var(--pad-x)));
  --gutter-tight: max(32px, calc((100% - var(--shell)) / 2 + 32px));
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

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

h1,
h2,
h3,
h4,
p,
figure,
blockquote {
  margin: 0;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

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

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

/* ---------- 排版工具 ---------- */

.display {
  font-size: 52px;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -1.4px;
  text-wrap: balance;
}

.h2 {
  font-size: 32px;
  font-weight: 700;
  line-height: 1.22;
  letter-spacing: -0.8px;
  text-wrap: balance;
}

.h3 {
  font-size: 19px;
  font-weight: 600;
  line-height: 1.4;
}

.lead {
  font-size: 17px;
  line-height: 1.75;
  color: var(--ink-2);
}

.body-sm {
  font-size: 14px;
  line-height: 1.7;
  color: var(--ink-2);
}

.eyebrow {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 1.2px;
  color: var(--brand);
}

.mono {
  font-family: var(--font-mono);
  font-size: 0.92em;
}

.muted {
  color: var(--ink-3);
}

.measure {
  max-width: 780px;
}

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

@media (max-width: 900px) {
  :root {
    --pad-x: 24px;
  }

  .display {
    font-size: 34px;
    letter-spacing: -0.9px;
  }

  .h2 {
    font-size: 25px;
  }

  .lead {
    font-size: 16px;
  }
}
