/* ==========================================================================
   Linkshing 官网 · 样式重置（Reset）
   说明：现代化最小重置，消除浏览器默认差异，为后续样式提供干净基线
   ========================================================================== */

/* ------------------------------------------------------------------
   西文字体 Inter（本地托管）
   用途：英文小字——区块副标题（eyebrow）、面包屑英文等
   说明：仅含拉丁字符子集（各 ~24KB），中文字符不受影响
   ------------------------------------------------------------------ */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/inter-latin-400-normal.woff2") format("woff2");
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/inter-latin-500-normal.woff2") format("woff2");
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/inter-latin-600-normal.woff2") format("woff2");
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/inter-latin-700-normal.woff2") format("woff2");
}

/* ------------------------------------------------------------------
   盒模型：统一 border-box，消除默认外边距
   ------------------------------------------------------------------ */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body,
h1, h2, h3, h4, h5, h6,
p, figure, blockquote, dl, dd,
ul, ol {
  margin: 0;
  padding: 0;
}

/* ------------------------------------------------------------------
   HTML / Body 基础
   ------------------------------------------------------------------ */
html {
  /* 移动端点击高亮去除 */
  -webkit-tap-highlight-color: transparent;
  /* 防止 iOS 横屏字体放大 */
  -webkit-text-size-adjust: 100%;
  /* 平滑滚动（在 prefers-reduced-motion 中关闭） */
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  font-family: var(--font-family-base);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--color-text);
  background-color: var(--color-white);
  /* 字体渲染优化 */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* ------------------------------------------------------------------
   标题：继承字重控制，行高收窄
   ------------------------------------------------------------------ */
h1, h2, h3, h4, h5, h6 {
  font-size: inherit;
  font-weight: var(--fw-semibold);
  line-height: var(--lh-heading);
  color: var(--color-ink);
}

/* ------------------------------------------------------------------
   列表：去默认符号（按需在组件中恢复）
   ------------------------------------------------------------------ */
ul,
ol {
  list-style: none;
}

/* ------------------------------------------------------------------
   链接：去下划线，继承颜色
   ------------------------------------------------------------------ */
a {
  color: inherit;
  text-decoration: none;
}

/* ------------------------------------------------------------------
   媒体元素：块级化、限宽，避免撑破容器
   ------------------------------------------------------------------ */
img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
}

img,
video {
  height: auto;
}

/* ------------------------------------------------------------------
   表单元素：继承字体，边框归零
   ------------------------------------------------------------------ */
input,
button,
textarea,
select {
  font: inherit;
  color: inherit;
  margin: 0;
}

button {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}

textarea {
  resize: vertical;
}

/* 去除数字输入框的上下箭头 */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* ------------------------------------------------------------------
   表格：合并边框
   ------------------------------------------------------------------ */
table {
  border-collapse: collapse;
  border-spacing: 0;
}

/* ------------------------------------------------------------------
   其他
   ------------------------------------------------------------------ */
/* 隐藏但保留可访问性（屏幕阅读器专用） */
.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) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
