@import "./tokens.css";

/* ==========================================================================
   基础重置与通用组件样式
   ========================================================================== */

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

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

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: 1.75;
  color: var(--c-ink-2);
  background: var(--c-bg);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { color: var(--c-ink); line-height: 1.35; margin: 0 0 .6em; font-weight: 700; }
h1 { font-size: var(--fs-h1); letter-spacing: -.4px; }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }
p { margin: 0 0 1em; }
ul { margin: 0; padding: 0; list-style: none; }

/* 键盘跳转链接（无障碍）：平时移出屏幕，按 Tab 聚焦时浮现在左上角 */
.skip {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--c-primary); color: #fff; padding: 10px 16px; border-radius: 0 0 6px 0;
}
.skip:focus { left: 0; }

/* ---- 布局 ---- */
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 20px; }
.section { padding: var(--sp-section) 0; }
/* 全站统一白底：区块之间只用留白分隔（原浅灰底已取消） */
.section--soft { background: var(--c-bg); }

/* 板块标题 */
.sec-head { text-align: center; max-width: 760px; margin: 0 auto 32px; }
.sec-head p { color: var(--c-muted); margin: 10px 0 0; }

/* ---- 按钮（全站统一）---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 12px 26px; border-radius: var(--radius-sm);
  font-size: 16px; font-weight: 600; cursor: pointer; border: 1px solid transparent;
  transition: transform .15s ease, background .15s ease, box-shadow .15s ease;
  font-family: inherit;
}
.btn:hover { transform: translateY(-1px); }
.btn--primary { background: var(--c-accent); color: #fff; box-shadow: 0 4px 14px rgba(0,0,0,.14); }
.btn--primary:hover { background: var(--c-accent-dark); }
.btn--ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.55); }
.btn--ghost:hover { background: rgba(255,255,255,.12); }
.btn--outline { background: #fff; color: var(--c-primary); border-color: var(--c-line); }
.btn--outline:hover { border-color: var(--c-primary); }
.btn--sm { min-height: 40px; padding: 8px 18px; font-size: 14px; }
.btn--block { width: 100%; }

/* ---- 卡片 ---- */
.card {
  background: #fff; border: 1px solid var(--c-line); border-radius: var(--radius);
  overflow: hidden; transition: box-shadow .2s ease, transform .2s ease;
}
.card:hover { box-shadow: var(--shadow); transform: translateY(-3px); }

/* ---- 图标（统一 2px stroke，全站禁用 Emoji）---- */
.icon { width: 22px; height: 22px; stroke-width: 2; fill: none; stroke: currentColor;
  stroke-linecap: round; stroke-linejoin: round; flex: none; }
.icon--lg { width: 28px; height: 28px; }

/* ---- 面包屑 ---- */
.breadcrumb { font-size: var(--fs-sm); color: var(--c-muted); padding: 14px 0; }
.breadcrumb a:hover { color: var(--c-primary); }
.breadcrumb span { margin: 0 6px; }

/* ---- 无障碍 ---- */
:focus-visible { outline: 3px solid var(--c-accent); outline-offset: 2px; border-radius: 4px; }
.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;
}

/* ---- 占位图（真实图片到位后替换）---- */
.ph {
  background:
    linear-gradient(135deg, var(--c-primary-tint) 0%, #dde7f5 100%);
  display: flex; align-items: center; justify-content: center;
  color: var(--c-primary); font-size: var(--fs-sm); font-weight: 600;
  letter-spacing: 1px; text-align: center; padding: 12px;
}

@media (max-width: 767px) {
  .section { padding: 48px 0; }
  .sec-head { margin-bottom: 30px; }
}
