/* ========================================
   reset.css — 样式重置 + 基础设置
   ======================================== */
@import url("../fonts/fonts.css");

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

html {
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  scroll-behavior: smooth;
  /* 锚点跳转时补偿固定导航栏高度 */
  scroll-padding-top: var(--nav-h);
}

body {
  font-family: "Noto Sans SC", "Source Han Sans CN", "Source Han Sans SC",
    "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: var(--fs-body);
  line-height: 1.75;
  color: var(--text-primary);
  background-color: var(--bg-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, picture, video, svg {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: var(--text-primary);
  text-decoration: none;
  transition: color var(--transition-base);
}
a:hover { color: var(--primary-color); }

ul, ol { list-style: none; }

button {
  font-family: inherit;
  font-size: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

input, textarea, select {
  font-family: inherit;
  font-size: inherit;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.3;
  color: var(--text-primary);
}

/* ---- 响应式字号（移动端） ---- */
@media (max-width: 767px) {
  html { scroll-padding-top: var(--nav-h-m); }
  body { font-size: var(--fs-sm); line-height: 1.65; }
  h1 { font-size: var(--fs-h1-m, 32px) !important; }
  h2 { font-size: var(--fs-h2-m, 26px) !important; }
  h3 { font-size: var(--fs-h3-m, 22px) !important; }
  h4 { font-size: var(--fs-h4-m, 18px) !important; }
}

/* ---- 无障碍：尊重减少动效偏好 ---- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
