/* 基础层：重置、排版、焦点可见、动效降级 */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.7;
  color: var(--color-ink);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
input, select { font: inherit; }

h1, h2, h3 { line-height: 1.1; font-weight: 600; }

/* 焦点可见性（键盘） */
:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

/* 中文排版细节 */
.site-body { letter-spacing: 0.02em; }

/* 等宽数字：监控台所有数据读数 */
.num {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

/* 视觉隐藏（供屏幕阅读器） */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  clip: rect(0 0 0 0); overflow: hidden; white-space: nowrap;
}

/* 入场序列（配合 .reveal / .in，由 JS IntersectionObserver 驱动） */
.reveal { opacity: 0; transform: translateY(24px); }
.reveal.in {
  opacity: 1; transform: none;
  transition: opacity var(--dur-base) var(--ease-out),
              transform var(--dur-base) var(--ease-out);
}
.reveal.in:nth-child(2) { transition-delay: 80ms; }
.reveal.in:nth-child(3) { transition-delay: 160ms; }
.reveal.in:nth-child(4) { transition-delay: 240ms; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
