/* =========================================================
   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) + 12px);
}

body {
  margin: 0;
  background: var(--page);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  /* 移动端底部 CTA 条不遮挡内容 */
  padding-bottom: env(safe-area-inset-bottom);
}

body.is-locked { overflow: hidden; }

h1, h2, h3, h4, h5 {
  margin: 0 0 var(--sp-4);
  line-height: var(--lh-tight);
  letter-spacing: -.018em;
  font-weight: 700;
  text-wrap: balance;
}
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }
h4 { font-size: var(--fs-h4); line-height: var(--lh-snug); }

p { margin: 0 0 var(--sp-4); text-wrap: pretty; }
p:last-child { margin-bottom: 0; }

a {
  color: var(--teal);
  text-decoration: none;
  transition: color var(--dur-fast) var(--ease);
}
a:hover { color: var(--teal-strong); }

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

ul, ol { margin: 0 0 var(--sp-4); padding-left: 1.25em; }
li { margin-bottom: var(--sp-2); }
li:last-child { margin-bottom: 0; }

strong, b { font-weight: 700; color: inherit; }

hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: var(--sp-7) 0;
}

button { font: inherit; color: inherit; }

code, kbd {
  font-family: var(--font-mono);
  font-size: .92em;
  background: var(--surface-alt);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: .1em .4em;
}

/* 焦点可见性：仅键盘触发 */
:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 3px;
  border-radius: 4px;
}

::selection { background: var(--brand); color: var(--ink-900); }

/* ---------- 布局工具 ---------- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.container--narrow { max-width: 820px; }

.section { padding-block: var(--section-y); }
.section--tight { padding-block: calc(var(--section-y) * .66); }

/* 深色沉浸区块 */
.section--dark {
  background:
    radial-gradient(120% 90% at 82% 8%, rgba(0, 217, 89, .16) 0%, transparent 58%),
    radial-gradient(100% 80% at 6% 96%, rgba(0, 141, 116, .28) 0%, transparent 60%),
    var(--ink-900);
  color: var(--on-dark);
}
.section--dark h1,
.section--dark h2,
.section--dark h3,
.section--dark h4 { color: var(--on-dark); }
.section--dark a { color: var(--brand); }
.section--dark .lead,
.section--dark .section-sub { color: var(--on-dark-muted); }

.section--alt { background: var(--surface-alt); }
/* 区块内有外扩的装饰层时加这个，防止溢出到相邻区块 */
.section--clip { overflow: hidden; }

/* ---------- 标题组 ---------- */
.section-head { max-width: 640px; margin-bottom: var(--sp-7); }
.section-head--center { margin-inline: auto; text-align: center; }
.section-title--impact {
  font-size: clamp(1.9rem, 1.35rem + 2.2vw, 3rem);
  line-height: 1.1;
  letter-spacing: -.03em;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: var(--sp-3);
}
.section--dark .eyebrow { color: var(--brand); }

.section-sub {
  color: var(--text-muted);
  font-size: var(--fs-body);
  margin-top: calc(var(--sp-3) * -1 + var(--sp-4));
}

.lead {
  font-size: clamp(1.06rem, 1rem + .5vw, 1.28rem);
  color: var(--text-muted);
  line-height: 1.6;
}

/* ---------- 通用工具 ---------- */
.u-center { text-align: center; }
.u-mt-6 { margin-top: var(--sp-6); }
.u-mt-7 { margin-top: var(--sp-7); }
.u-muted { color: var(--text-muted); }
.u-small { font-size: var(--fs-sm); }
.u-xs { font-size: var(--fs-xs); }

.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;
}

.skip-link {
  position: absolute;
  left: 50%;
  top: -100px;
  transform: translateX(-50%);
  z-index: 999;
  background: var(--brand);
  color: var(--ink-900);
  font-weight: 700;
  padding: var(--sp-3) var(--sp-5);
  border-radius: 0 0 var(--r-md) var(--r-md);
  transition: top var(--dur) var(--ease);
}
.skip-link:focus { top: 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;
    scroll-behavior: auto !important;
  }
}

/* 入场动效：默认不阻塞阅读，JS 加 .is-in 后显现 */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity var(--dur-slow) var(--ease-out),
              transform var(--dur-slow) var(--ease-out);
}
.reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; }
}
/* 无 JS 时不要把内容藏起来 */
.no-js .reveal { opacity: 1; transform: none; }
