/* ============================================================
   基础层 · Reset / 排版 / 栅格 / 原子组件 / 动效
   依赖 tokens.css
   ============================================================ */

/* 勿用全局 * / body 排版，会污染官网 cookie / 头尾 / 右侧浮层 */
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
#main, #main *, #main *::before, #main *::after,
.float-cta, .float-cta *, .float-cta *::before, .float-cta *::after,
.page-nav, .page-nav *, .page-nav *::before, .page-nav *::after {
  box-sizing: border-box;
}
#main, .float-cta {
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--ink);
}
/* 仅作用正文。:where(#main) 不增加优先级，组件间距才能盖过重置 */
:where(#main) img,
:where(#main) svg,
:where(#main) video,
:where(.float-cta) img {
  max-width: 100%; height: auto; display: block;
}
/* 铺满类图片保持包-2 的 height:100%，避免被上面的 height:auto 盖掉 */
:where(#main) .hero__kv,
:where(#main) .c-scene__img {
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
}
:where(#main) ul,
:where(#main) ol { margin: 0; padding: 0; list-style: none; }
:where(#main) h1,
:where(#main) h2,
:where(#main) h3,
:where(#main) h4,
:where(#main) p,
:where(#main) figure,
:where(#main) dl,
:where(#main) dd { margin: 0; }
:where(#main) a,
:where(.float-cta) a { color: inherit; text-decoration: none; }
:where(#main) button,
:where(#main) input,
:where(#main) select,
:where(#main) textarea,
:where(.float-cta) button {
  font: inherit; color: inherit;
}
table { border-collapse: collapse; width: 100%; }

/* ---------- 无障碍：跳转链接 / 焦点可见 / 屏读专用 ---------- */
.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: var(--z-toast);
  background: var(--rj-red); color: #fff; padding: 10px 18px;
  border-radius: var(--r-md); font-weight: var(--fw-bold);
  transition: top var(--dur-2) var(--ease-out);
}
.skip-link:focus { top: 12px; }

:focus-visible {
  outline: 3px solid var(--rj-red);
  outline-offset: 2px;
  border-radius: var(--r-sm);
}
.deep :focus-visible { outline-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;
}

/* ---------- 布局容器与栅格 ---------- */
.container {
  width: 100%; max-width: var(--container);
  margin-inline: auto; padding-inline: var(--pad-x);
}
.container--wide { max-width: var(--container-wide); }

.grid { display: grid; gap: var(--gutter); }
.grid--2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
.grid--sidebar { grid-template-columns: minmax(0,1.05fr) minmax(0,.95fr); align-items: center; }

@media (max-width: 992px) {
  .grid--3, .grid--4 { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .grid--sidebar { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; }
}

/* ---------- 区块 Section ---------- */
.section { padding-block: var(--section-y); scroll-margin-top: calc(var(--nav-h) + 12px); }
.section--soft { background: var(--bg-soft); }
.section--deep { background: var(--deep-800); color: #fff; }
.section--tight { padding-block: var(--sp-16); }
@media (max-width: 768px) { .section { padding-block: var(--section-y-sm); } }

/* 区块头 */
.sec-head { max-width: 780px; margin-bottom: var(--sp-12); }
.sec-head--center { margin-inline: auto; text-align: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: var(--fs-xs); font-weight: var(--fw-bold);
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--rj-red); margin-bottom: var(--sp-4);
}
.eyebrow::before {
  content: ""; width: 18px; height: 2px; background: var(--rj-red); border-radius: 2px;
}
.sec-head--center .eyebrow::before { display: none; }
.deep .eyebrow { color: #FF6B78; }

h1, .h1 { font-size: var(--fs-h1); line-height: var(--lh-h1); font-weight: var(--fw-black); letter-spacing: -.01em; }
h2, .h2 { font-size: var(--fs-h2); line-height: var(--lh-h2); font-weight: var(--fw-black); letter-spacing: -.01em; }
h3, .h3 { font-size: var(--fs-h3); line-height: var(--lh-h3); font-weight: var(--fw-bold); }
h4, .h4 { font-size: var(--fs-h4); line-height: var(--lh-h4); font-weight: var(--fw-bold); }

.sec-desc {
  margin-top: var(--sp-4); font-size: var(--fs-body); color: var(--ink-2);
}
.deep .sec-desc { color: var(--deep-text); }

/* ---------- 按钮 Button ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 48px; padding-inline: 26px; border: 1px solid transparent;
  border-radius: var(--r-md); font-size: 15px; font-weight: var(--fw-bold);
  cursor: pointer; white-space: nowrap; background: none;
  transition: background var(--dur-2) var(--ease-out),
              border-color var(--dur-2) var(--ease-out),
              color var(--dur-2) var(--ease-out),
              transform var(--dur-1) var(--ease-out),
              box-shadow var(--dur-2) var(--ease-out);
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn--primary { background: var(--rj-red); color: #fff; box-shadow: var(--sh-red); }
.btn--primary:hover,
.btn--primary:focus { background: var(--rj-red-deep); color: #fff !important; }

.btn--ghost { border-color: var(--line); color: var(--ink); background: #fff; }
.btn--ghost:hover { border-color: var(--rj-red); color: var(--rj-red); }

.btn--onDeep { border-color: rgba(255,255,255,.4); color: #fff; }
.btn--onDeep:hover,
.btn--onDeep:focus { background: rgba(255,255,255,.1); border-color: #fff; color: #fff !important; }

.btn--sm { height: 38px; padding-inline: 18px; font-size: 14px; }
.btn--block { width: 100%; }

/* 文字链接（带箭头） */
.link-arrow {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--rj-red); font-weight: var(--fw-bold); font-size: var(--fs-sm);
}
.link-arrow::after {
  content: "→"; transition: transform var(--dur-2) var(--ease-out);
}
.link-arrow:hover::after { transform: translateX(4px); }

/* ---------- 标签 Tag / 徽标 Badge ---------- */
.tag {
  display: inline-block; padding: 3px 10px; border-radius: var(--r-pill);
  font-size: var(--fs-xs); font-weight: var(--fw-bold); line-height: 1.6;
}
.tag--new  { background: var(--rj-red-soft); color: var(--rj-red); }
.tag--base { background: #EEF2F7; color: var(--ink-2); }
.tag--deep { background: rgba(255,255,255,.12); color: #fff; }
.tag--gold { background: #FBF3E0; color: var(--warn); }

/* ---------- 卡片 Card ---------- */
.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: var(--sp-8);
  transition: border-color var(--dur-2) var(--ease-out),
              box-shadow var(--dur-2) var(--ease-out),
              transform var(--dur-2) var(--ease-out);
}
.card:hover { border-color: var(--rj-red-line); box-shadow: var(--sh-3); transform: translateY(-3px); }
.card__title { margin-bottom: var(--sp-3); }
.card__text { color: var(--ink-2); font-size: var(--fs-sm); }
.card--flat:hover { transform: none; box-shadow: var(--sh-2); }

/* 顶部彩条卡片（"彩光"意象） */
.card--spectrum { position: relative; overflow: hidden; }
.card--spectrum::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 3px;
  background: var(--spectrum); opacity: .85;
}

/* ---------- 数据指标 Metric ---------- */
.metric__num {
  font-family: var(--font-num); font-size: 40px; line-height: 1.1;
  font-weight: var(--fw-black); color: var(--rj-red); letter-spacing: -.02em;
}
.metric__num small { font-size: 18px; font-weight: var(--fw-bold); margin-left: 2px; }
.metric__label { font-size: var(--fs-sm); color: var(--ink-2); margin-top: 6px; }
.deep .metric__num { color: #fff; }
.deep .metric__label { color: var(--deep-text); }

/* ---------- 表格 Table ---------- */
.table-wrap {
  overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-lg);
  background: #fff; -webkit-overflow-scrolling: touch;
}
.table-wrap:focus-visible { outline-offset: 0; }
.tbl { min-width: 720px; font-size: var(--fs-sm); }
.tbl caption { text-align: left; padding: var(--sp-4) var(--sp-5); color: var(--ink-3); font-size: var(--fs-xs); }
.tbl th, .tbl td { padding: 14px 18px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.tbl thead th { background: var(--bg-soft); font-weight: var(--fw-bold); color: var(--ink); white-space: nowrap; }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl tbody tr:hover { background: var(--bg-mute); }
.tbl .col-dim { font-weight: var(--fw-bold); color: var(--ink); width: 22%; }
.tbl .cell-new { background: var(--rj-red-soft); color: var(--ink); font-weight: var(--fw-medium); }
.tbl .cell-new b { color: #0175E8; }
.tbl .is-plus { color: var(--rj-red); font-weight: var(--fw-bold); }

/* ---------- 分隔与工具类 ---------- */
.hr { height: 1px; background: var(--line); border: 0; margin-block: var(--sp-12); }
.text-c { text-align: center; }
.muted { color: var(--ink-3); font-size: var(--fs-xs); }
.deep .muted { color: rgba(255,255,255,.5); }
.stack > * + * { margin-top: var(--sp-3); }
.nowrap { white-space: nowrap; }

/* 要点列表 */
.bullets li {
  position: relative; padding-left: 20px; font-size: var(--fs-sm);
  color: var(--ink-2); margin-top: 8px;
}
.bullets li::before {
  content: ""; position: absolute; left: 4px; top: 10px;
  width: 6px; height: 6px; border-radius: 50%; background: var(--rj-red);
}
.deep .bullets li { color: var(--deep-text); }

/* ============================================================
   滚动渐显动效（IntersectionObserver 驱动，仅用 transform/opacity）
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translate3d(0, 22px, 0);
  transition: opacity var(--dur-3) var(--ease-out), transform var(--dur-3) var(--ease-out);
  will-change: opacity, transform;
}
.reveal.is-in { opacity: 1; transform: none; will-change: auto; }
/* 组内错峰 */
.reveal[data-delay="1"] { transition-delay: .08s; }
.reveal[data-delay="2"] { transition-delay: .16s; }
.reveal[data-delay="3"] { transition-delay: .24s; }
.reveal[data-delay="4"] { transition-delay: .32s; }
.reveal[data-delay="5"] { transition-delay: .40s; }

/* 降级：无 JS 时全部可见 */
.no-js .reveal { opacity: 1; transform: none; }

/* 尊重系统减弱动效偏好 */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .reveal { opacity: 1 !important; transform: none !important; }
}

/* 打印：去掉深色底与动效，便于内部评审打印 */
@media print {
  .site-nav, .float-cta, .hero__glow { display: none !important; }
  .section { padding-block: 24px; break-inside: avoid; }
  .section--deep { background: #fff !important; color: #000 !important; }
}
