/* ============================================================
   M0 · 基础层（reset / 排版 / 容器 / 通用工具类）
   ============================================================ */

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

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

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

h1, h2, h3, h4 {
  margin: 0 0 .5em;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -.025em;
  color: var(--text);
}

h1 { font-size: var(--fs-hero); }
h2 { font-size: var(--fs-3xl); }
h3 { font-size: var(--fs-xl); letter-spacing: -.015em; }
h4 { font-size: var(--fs-sm); letter-spacing: .04em; text-transform: uppercase; }

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

a { color: var(--brand-ink); text-decoration: none; transition: color var(--e-fast); }
a:hover { color: var(--teal-800); }

img, svg, canvas { display: block; max-width: 100%; }
svg { flex: none; }

ul, ol { margin: 0; padding: 0; list-style: none; }

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

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

:focus-visible {
  outline: 2px solid var(--teal-500);
  outline-offset: 3px;
  border-radius: 4px;
}

::selection { background: var(--teal-200); color: var(--teal-900); }

/* hidden 属性必须真的隐藏：组件里给了 display 的元素（弹窗、栅格）会覆盖它 */
[hidden] { display: none !important; }

/* ---- 布局 ---- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* 紧跟首屏的第一个 section：顶部留白减半，避免和 hero 底部叠加 */
.hero + .section {
  padding-top: calc(var(--section-y) * 0.52);
}

.section {
  padding-block: var(--section-y);
  position: relative;
}

.section--soft { background: var(--bg-soft); }

.section--dark {
  background:
    radial-gradient(900px 420px at 15% 0%, rgba(19, 168, 161, .22), transparent 60%),
    radial-gradient(700px 380px at 90% 110%, rgba(19, 168, 161, .12), transparent 60%),
    var(--ink-950);
  color: var(--text-inv);
}
.section--dark h2, .section--dark h3 { color: var(--text-inv); }
.section--dark .lead { color: var(--text-inv-2); }

/* ---- 区块标题 ---- */
.section-head {
  max-width: 720px;
  margin: 0 auto 56px;
  text-align: center;
}

.section-head .lead { margin-top: 14px; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  padding: 6px 14px 6px 12px;
  border: 1px solid var(--teal-200);
  border-radius: var(--r-pill);
  background: var(--teal-50);
  color: var(--teal-700);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.eyebrow--light {
  border-color: rgba(255, 255, 255, .18);
  background: rgba(255, 255, 255, .07);
  color: var(--teal-200);
}

/* ---- 文本 ---- */
.lead {
  font-size: var(--fs-lg);
  line-height: 1.65;
  color: var(--text-2);
  margin: 0;
}

.lead.narrow { max-width: 600px; margin-inline: auto; }

.muted { color: var(--text-2); }
.small { font-size: var(--fs-sm); }
.tiny  { font-size: var(--fs-xs); }

.grad-text {
  background: linear-gradient(100deg, var(--teal-600) 0%, var(--teal-400) 45%, var(--teal-700) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---- 滚动入场 ---- */
html.js .reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .7s var(--e-out), transform .7s var(--e-out);
  transition-delay: calc(var(--d, 0) * 70ms);
}
html.js .reveal.is-in {
  opacity: 1;
  transform: none;
}

/* ---- 可访问性 ---- */
.skip-link {
  position: fixed;
  top: -100px;
  left: 16px;
  z-index: 200;
  padding: 10px 16px;
  border-radius: var(--r-sm);
  background: var(--ink-900);
  color: #fff;
  font-size: var(--fs-sm);
}
.skip-link:focus { top: 12px; color: #fff; }

.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: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  html.js .reveal { opacity: 1; transform: none; }
}

@media (max-width: 720px) {
  :root { --section-y: 72px; --gutter: 20px; }
  .br-lg { display: none; }
}

/* 品牌字标：单色。红色只出现在标志方块里，字标不再抢色 */
.brand-accent { color: inherit; }
