/* ============================================================
   基础样式 · 重置 / 排版 / 焦点 / 降级动效
   ============================================================ */

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

* { margin: 0; }

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

body {
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.7;
  color: var(--color-ink);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* 蓝图网格背景氛围层（全局极淡） */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(var(--color-grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--color-grid) 1px, transparent 1px);
  background-size: 48px 48px;
  opacity: .9;
}

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

/* ---------- 标题 ---------- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.02em;
  color: var(--color-ink);
}
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }

p { max-width: 68ch; }

/* ---------- 中文排版微调 ---------- */
:lang(zh), body { letter-spacing: .01em; }

/* ---------- 焦点可见（可访问性） ---------- */
:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* ---------- 布局工具 ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--space-4);
  position: relative;
  z-index: 1;
}
.container-narrow { max-width: var(--container-narrow); }

.section { padding-block: var(--space-7); position: relative; z-index: 1; }
.section-sm { padding-block: var(--space-6); }

/* 区块上方的小标签（等宽 + 橙点） */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--color-muted);
}
.eyebrow::before {
  content: "";
  width: 8px; height: 8px;
  background: var(--color-accent);
  border-radius: 50%;
  flex: none;
}

/* 区块标题区 */
.section-head { max-width: 56ch; margin-bottom: var(--space-5); }
.section-head h2 { margin-top: var(--space-3); }
.section-head p { color: var(--color-muted); margin-top: var(--space-3); }

/* 等宽数字 */
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

/* 屏幕阅读器专用 */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ============================================================
   降级动效：用户偏好减少动效时全部关闭
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}
