/* ==========================================================================
   ZNZBW / Base — reset, typography, utilities
   ========================================================================== */

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

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

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink-800);
  font: 400 var(--fs-15) / var(--lh-body) var(--font-sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6 {
  margin: 0;
  font-weight: 700;
  line-height: var(--lh-tight);
  letter-spacing: var(--ls-tight);
  color: var(--ink-900);
}
p, ul, ol, dl, dd, figure, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg, video { display: block; max-width: 100%; }
/* 内联图标的尺寸兜底：避免无 width/height 的 SVG 采用 300x150 默认值撑破按钮 */
svg { width: 1em; height: 1em; flex: none; }
.ico, .btn > svg, .searchbar__btn > svg { width: 16px; height: 16px; }
.note > svg { width: 20px; height: 20px; color: var(--brand-500); flex: none; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--brand-600); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }

:focus-visible {
  outline: 2px solid var(--brand-500);
  outline-offset: 3px;
  border-radius: var(--r-4);
}
::selection { background: var(--brand-200); color: var(--brand-ink); }

/* ---- Layout utilities ---- */
.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.stack > * + * { margin-top: var(--s-4); }
.row { display: flex; align-items: center; }
.row--between { justify-content: space-between; }
.row--wrap { flex-wrap: wrap; }
.grow { flex: 1 1 auto; min-width: 0; }
.num { font-family: var(--font-num); font-variant-numeric: tabular-nums; letter-spacing: .01em; }
.mono-en {
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: var(--ls-label);
  font-weight: 600;
}
.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;
}
.skip-link {
  position: fixed; top: -60px; left: var(--s-4); z-index: 200;
  padding: 10px 16px; background: var(--brand-600); color: #fff;
  border-radius: 0 0 var(--r-8) var(--r-8); font-size: var(--fs-14);
  transition: top var(--t-fast) var(--ease);
}
.skip-link:focus { top: 0; color: #fff; }

.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.clamp-2 {
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2;
  line-clamp: 2; overflow: hidden;
}
.clamp-3 {
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3;
  line-clamp: 3; overflow: hidden;
}
.divider { height: 1px; background: var(--line); border: 0; }
.hr-soft { height: 1px; background: var(--line); opacity: .8; }
.text-muted { color: var(--ink-500); }
.text-faint { color: var(--ink-400); }
.text-brand { color: var(--brand-600); }

/* 表面：区块容器两种形态，避免「万物皆卡片」 */
.surface {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-16);
  box-shadow: var(--sh-1);
}
.surface--flat { box-shadow: none; }
.surface--open {
  background: transparent; border: 0; box-shadow: none; border-radius: 0;
}
.pad-4 { padding: var(--s-4); }
.pad-6 { padding: var(--s-6); }
.pad-8 { padding: var(--s-8); }

/* 网格纹理：仅用于 hero / 数据带 */
.mesh { background-image: var(--mesh); background-size: 28px 28px; }

/* 十字准星：品牌装饰，纯 CSS */
.crosshair { position: relative; }
.crosshair::before, .crosshair::after {
  content: ""; position: absolute; background: var(--brand-400); opacity: .55;
}
.crosshair::before { width: 14px; height: 1px; top: 50%; left: -22px; }
.crosshair::after  { width: 1px; height: 14px; top: calc(50% - 7px); left: -15px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}
