/* ============================================================
   NeuroAtlas · base.css
   重置 / 排版基础 / 容器 / 通用分节结构 / 可访问性
   依赖：css/tokens.css
   ============================================================ */

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

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

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img,
svg {
  display: block;
  max-width: 100%;
}

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

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

input,
textarea,
select {
  font: inherit;
  color: inherit;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 650;
  line-height: 1.22;
  letter-spacing: -0.01em;
}

p {
  margin: 0;
}

ul,
ol {
  margin: 0;
}

::selection {
  background: var(--blue-100);
  color: var(--ink-900);
}

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
  border-radius: 4px;
}

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

.skip-link {
  position: absolute;
  left: 16px;
  top: -52px;
  z-index: 100;
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  background: var(--ink-900);
  color: #fff;
  font-size: 13px;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 12px;
}

.container {
  width: min(100% - 40px, var(--max-width));
  margin-inline: auto;
}

@media (min-width: 768px) {
  .container {
    width: min(100% - 64px, var(--max-width));
  }
}

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

/* ---------- 通用分节结构 ---------- */
.section {
  padding: clamp(52px, 7.5vw, 88px) 0;
  border-bottom: 1px solid var(--line);
}

.section:last-of-type {
  border-bottom: 0;
}

.section--tint {
  background: var(--surface-soft);
}

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px 32px;
  align-items: end;
  margin-bottom: clamp(26px, 4vw, 40px);
}

.section-head h2 {
  margin-top: 10px;
  font-size: clamp(25px, 3vw, 34px);
}

.section-head p {
  max-width: 52em;
  margin-top: 10px;
  color: var(--text-soft);
  font-size: 14.5px;
}

.section-head__meta {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.section-more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.04em;
  color: var(--blue-600);
  white-space: nowrap;
}

.section-more:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--blue-600);
}

.kicker::before {
  content: "";
  width: 22px;
  height: 1px;
  background: currentColor;
  opacity: 0.7;
}

@media (max-width: 720px) {
  .section-head {
    grid-template-columns: 1fr;
    align-items: start;
  }
}

/* ---------- 动效 / 低动态偏好 ---------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .card,
  .btn {
    transition: none;
  }
}
