/* ==========================================================================
   base.css — Reset / 排版基线 / 布局容器 / 工具类
   ========================================================================== */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 20px);
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.7;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body.has-overlay {
  overflow: hidden;
}

/* --------------------------------------------------------------------------
   复制保护：禁止选中文本 / 禁止拖拽图片与链接
   -------------------------------------------------------------------------- */
body {
  -webkit-user-select: none;
  -moz-user-select: none;
  user-select: none;
}

/* 表单控件必须保留选中与输入能力，否则无法填写、无法选择文本 */
input,
textarea,
select,
[contenteditable="true"] {
  -webkit-user-select: text;
  -moz-user-select: text;
  user-select: text;
}

/* 禁止浏览器原生拖拽（Chrome / Safari 生效，Firefox 由 main.js 兜底） */
img,
a {
  -webkit-user-drag: none;
  -khtml-user-drag: none;
  -moz-user-drag: none;
  -o-user-drag: none;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 0 0 0.6em;
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.22;
  color: var(--color-text);
}

h1 {
  font-size: var(--fs-hero);
}
h2 {
  font-size: var(--fs-h2);
}
h3 {
  font-size: var(--fs-h3);
}
h4 {
  font-size: 20px;
}

p {
  margin: 0 0 1em;
}
p:last-child {
  margin-bottom: 0;
}

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

a:hover {
  color: var(--color-primary-dark);
}

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

ul,
ol {
  margin: 0 0 1em;
  padding-left: 1.25em;
}
li {
  margin-bottom: 0.35em;
}

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

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

table {
  border-collapse: collapse;
  width: 100%;
}

/* 焦点可见性（无障碍） */
:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* 仅屏幕阅读器可见 */
.u-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;
}

.u-skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 2000;
  padding: 10px 18px;
  background: var(--color-primary);
  color: #fff;
  border-radius: var(--radius-sm);
  transition: top var(--transition-fast);
}
.u-skip-link:focus {
  top: 12px;
  color: #fff;
}

/* ==========================================================================
   布局容器（.shell 为主，.container 兼容既有模板）
   ========================================================================== */
.shell,
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--pad-desktop);
}

@media (max-width: 767px) {
  .shell,
  .container {
    padding-inline: var(--pad-mobile);
  }
}

/* ==========================================================================
   页面主容器
   ========================================================================== */
main {
  display: block;
}

.l-main {
  overflow: clip;
}

/* ==========================================================================
   工具类
   ========================================================================== */
.u-text-center {
  text-align: center;
}
.u-mt-0 {
  margin-top: 0;
}
.u-mb-0 {
  margin-bottom: 0;
}
.u-hidden {
  display: none;
}

/* 移动端隐藏（≤767px） */
@media (max-width: 767px) {
  .u-hide-sm {
    display: none;
  }
}

/* 小节标题组 */
.c-section-head {
  margin-bottom: var(--gap-lg);
}
.c-section-head--center {
  text-align: center;
  /* max-width: 860px;
  margin-inline: auto; */
  margin-bottom: var(--gap-lg);
}

.c-section-head__eyebrow {
  display: inline-block;
  margin-bottom: 14px;
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-primary);
}

.c-section-head__title {
  margin-bottom: 14px;
}

.c-section-head__desc {
  color: var(--color-text-muted);
  font-size: 17px;
  margin: 0;
}

/* 浅主题色板块内的小节标题（趋近白色的蓝底 → 使用深色文字保证对比度） */
.l-section-accent .c-section-head__eyebrow {
  color: var(--color-primary);
}
.l-section-accent .c-section-head__title {
  color: var(--color-text);
}
.l-section-accent .c-section-head__desc {
  color: var(--color-text-muted);
}

/* 深色图片视差板块内的小节标题（深色遮罩 → 使用白色文字保证对比度） */
.l-section-img .c-section-head__eyebrow {
  color: #fff;
  opacity: 0.92;
}
.l-section-img .c-section-head__title {
  color: #fff;
}
.l-section-img .c-section-head__desc {
  color: rgba(255, 255, 255, 0.88);
}

/* 富文本正文基线 */
.c-rich-text > *:first-child {
  margin-top: 0;
}
.c-rich-text h2 {
  margin-top: 1.6em;
}
.c-rich-text h3 {
  margin-top: 1.4em;
}
.c-rich-text ul,
.c-rich-text ol {
  padding-left: 1.4em;
}
.c-rich-text blockquote {
  margin: 1.5em 0;
  padding: 18px 24px;
  border-left: 4px solid var(--color-primary);
  background: var(--color-bg-soft);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  color: var(--color-text-muted);
}
.c-rich-text blockquote p:last-child {
  margin-bottom: 0;
}
.c-rich-text img {
  border-radius: var(--radius-md);
  margin: 1.5em 0;
}
.c-rich-text table {
  margin: 1.5em 0;
}
.c-rich-text th,
.c-rich-text td {
  padding: 12px 16px;
  border: 1px solid var(--color-border);
  text-align: left;
}
.c-rich-text th {
  background: var(--color-bg-soft);
  font-weight: 700;
}
