/* ============================================================
   Base — reset + typography + scroll defaults
   ============================================================ */

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

html, body {
  margin: 0;
  padding: 0;
}

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

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.55;
  font-feature-settings: 'cv11', 'ss01', 'kern';
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  overflow-x: hidden;
}

img, svg, video { display: block; max-width: 100%; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
a { color: inherit; text-decoration: none; }

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

/* —— 标题节奏 —— */
h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0;
  color: var(--fg);
  text-wrap: balance;
}
h1 { font-size: clamp(40px, 5.6vw, 72px); letter-spacing: -0.035em; font-weight: 580; }
h2 { font-size: clamp(28px, 3.4vw, 44px); letter-spacing: -0.028em; }
h3 { font-size: clamp(20px, 1.8vw, 24px); letter-spacing: -0.018em; }
h4 { font-size: 17px; letter-spacing: -0.01em; }
h5 { font-size: 14px; letter-spacing: 0; font-weight: 600; }

p { margin: 0; text-wrap: pretty; }

code, kbd {
  font-family: var(--font-mono);
  font-size: 0.92em;
  font-feature-settings: 'tnum';
}

.tnum { font-variant-numeric: tabular-nums; }

/* —— 容器 —— */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(20px, 4vw, 48px);
}
.container-narrow { max-width: var(--container-narrow); }

/* —— 通用文字工具 —— */
.eyebrow {
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-feature-settings: 'tnum';
}
.muted { color: var(--muted); }
.fg-2  { color: var(--fg-2); }
.lead { font-size: clamp(17px, 1.5vw, 19px); color: var(--fg-2); line-height: 1.55; max-width: 56ch; }

/* —— 焦点环（无障碍） —— */
:where(button, a, input, textarea, select, [tabindex]):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--r-sm);
}

/* —— 滚动条（窄而克制） —— */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--border-strong) transparent;
}
*::-webkit-scrollbar { width: 8px; height: 8px; }
*::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 8px; }
*::-webkit-scrollbar-thumb:hover { background: var(--muted); }
