/* ==========================================================================
   base.css — 根字号方案 / reset / 通用件
   ========================================================================== */

/* ---------- 根字号：全站缩放比例的唯一定义处 ---------- */
:root { --sbw: 0px; }

html {
  font-size: calc((100vw - var(--sbw, 0px)) * 100 / 1920);
  -webkit-text-size-adjust: 100%;
}
@media (min-width: 1600px) and (max-width: 1920px) {
  html { font-size: 100px; }
}
@media (min-width: 1025px) and (max-width: 1599.98px) {
  html { font-size: calc(100 * 100vw / 1600); }
}
@media (min-width: 769px) and (max-width: 1024px) {
  html { font-size: max(70px, calc(100 * 100vw / 1600)); }
}
@media (max-width: 768px) {
  html { font-size: min(calc(100 * 100vw / 750), 70px); }
}

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

html,
body { margin: 0; padding: 0; }

body {
  font-family: var(--ff-sans);
  font-size: var(--fs-body);
  line-height: 1.6;
  color: var(--c-ink);
  background: var(--c-surface);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, p, figure, ul, ol, dl, dd {
  margin: 0;
  padding: 0;
}
ul, ol { list-style: none; }

a {
  color: inherit;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

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

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

:focus-visible {
  outline: 2px solid var(--c-primary);
  outline-offset: 2px;
}

/* ---------- 版心 ---------- */
.container {
  width: min(calc(var(--max-width) / 100 * 1rem), calc(100% - 0.4rem));
  margin-inline: auto;
}

/* ---------- 文本省略 ---------- */
.ellipsis {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.clamp-2,
.clamp-3 {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.clamp-2 { -webkit-line-clamp: 2; line-clamp: 2; }
.clamp-3 { -webkit-line-clamp: 3; line-clamp: 3; }

/* ---------- 无障碍 ---------- */
.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;
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-3);
  height: 0.58rem;
  padding-inline: var(--sp-6);
  border-radius: var(--radius-btn);
  background: var(--c-primary);
  color: var(--c-white);
  font-size: var(--fs-sm);
  line-height: 1;
  white-space: nowrap;
  transition: background-color 0.25s ease, transform 0.25s ease;
}
.btn:hover { background: #0a6ecb; }
.btn:active { transform: translateY(1px); }
.btn .ico {
  width: 0.08rem;
  height: 0.12rem;
}

/* ---------- 图标 ---------- */
.ico {
  display: block;
  flex: none;
  width: 1em;
  height: 1em;
}
