/* ==========================================================================
   base.css —— 设计令牌 / 重置 / 基础排版 / 通用组件
   视觉基调：白色打底 + 品牌蓝，橙色作强调
   ========================================================================== */

:root {
  /* 色彩 */
  --brand: #1B5FD9;
  --brand-dark: #0F3E96;
  --brand-deep: #072354;
  --brand-light: #E8F0FE;
  --brand-soft: #F4F8FF;
  --accent: #F97316;
  --accent-dark: #EA580C;

  --ink: #0F172A;
  --ink-2: #334155;
  --muted: #5B6B85;
  --muted-2: #8695AD;
  --line: #E2E9F5;
  --line-2: #EEF3FB;

  --bg: #FFFFFF;
  --bg-soft: #F7FAFF;
  --bg-dark: #071A3D;

  /* 尺寸 */
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 20px;
  --radius-pill: 999px;
  --wrap: 1240px;
  --header-h: 76px;
  --header-h-compact: 64px;

  /* 阴影 */
  --shadow-xs: 0 1px 2px rgba(15, 42, 90, .06);
  --shadow-sm: 0 2px 10px rgba(15, 42, 90, .07);
  --shadow: 0 10px 30px rgba(15, 42, 90, .10);
  --shadow-lg: 0 24px 60px rgba(15, 42, 90, .16);
  --shadow-brand: 0 12px 28px rgba(27, 95, 217, .28);

  /* 动效 */
  --ease: cubic-bezier(.22, .61, .36, 1);
  --dur: .32s;

  /* 字体 */
  --font: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", "Noto Sans SC",
          -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* ------------------------------- 重置 ---------------------------------- */

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

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

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5 { margin: 0; font-weight: 700; line-height: 1.25; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 4.4vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); }
h3 { font-size: clamp(1.15rem, 1.8vw, 1.4rem); }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }
img, svg, video { max-width: 100%; display: block; }
a { color: var(--brand); text-decoration: none; transition: color var(--dur) var(--ease); }
a:hover { color: var(--brand-dark); }
ul, ol { margin: 0 0 1em; padding-left: 1.2em; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: var(--brand); color: #fff; }

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

/* 滚动条 */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg-soft); }
::-webkit-scrollbar-thumb { background: #C6D4EA; border-radius: 6px; border: 2px solid var(--bg-soft); }
::-webkit-scrollbar-thumb:hover { background: var(--brand); }

/* ------------------------------- 布局 ---------------------------------- */

.wrap {
  width: min(100% - 48px, var(--wrap));
  margin-inline: auto;
}
.wrap-wide { width: min(100% - 48px, 1560px); margin-inline: auto; }

.section { padding: clamp(56px, 7vw, 104px) 0; position: relative; }
.section--soft { background: var(--bg-soft); }
.section--light { background: var(--brand-light); }
.section--tight { padding: clamp(40px, 5vw, 72px) 0; }

.grid { display: grid; gap: 24px; }
.g-2 { grid-template-columns: repeat(2, 1fr); }
.g-3 { grid-template-columns: repeat(3, 1fr); }
.g-4 { grid-template-columns: repeat(4, 1fr); }

.stack > * + * { margin-top: 16px; }
.center { text-align: center; }

/* ---------------------------- 区块标题 --------------------------------- */

.sec-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: clamp(32px, 4vw, 52px);
}
.sec-head__main { max-width: 720px; }
.sec-head--center { flex-direction: column; align-items: center; text-align: center; }
.sec-head--center .sec-head__main { margin-inline: auto; }

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--brand);
  background: var(--brand-light);
  border-radius: var(--radius-pill);
  padding: 6px 14px;
  margin-bottom: 16px;
}
.kicker::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.sec-title { color: var(--ink); }
.sec-sub { margin-top: 14px; color: var(--muted); font-size: 1.02rem; }
.sec-more {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: var(--brand);
  white-space: nowrap;
}
.sec-more::after { content: "→"; transition: transform var(--dur) var(--ease); }
.sec-more:hover::after { transform: translateX(5px); }

/* ------------------------------ 按钮 ----------------------------------- */

.btn {
  --btn-bg: var(--brand);
  --btn-fg: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 30px;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease),
              transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease),
              border-color var(--dur) var(--ease);
}
.btn:hover { background: var(--brand-dark); color: #fff; transform: translateY(-2px); box-shadow: var(--shadow-brand); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; box-shadow: none; }

.btn--accent { --btn-bg: var(--accent); }
.btn--accent:hover { background: var(--accent-dark); box-shadow: 0 12px 28px rgba(249, 115, 22, .32); }

.btn--ghost {
  --btn-bg: transparent;
  --btn-fg: var(--brand);
  border-color: rgba(27, 95, 217, .35);
}
.btn--ghost:hover { background: var(--brand-light); color: var(--brand-dark); box-shadow: none; border-color: var(--brand); }

.btn--light {
  --btn-bg: rgba(255, 255, 255, .14);
  --btn-fg: #fff;
  border-color: rgba(255, 255, 255, .55);
  backdrop-filter: blur(6px);
}
.btn--light:hover { background: #fff; color: var(--brand); border-color: #fff; box-shadow: var(--shadow-lg); }

.btn--white { --btn-bg: #fff; --btn-fg: var(--brand); }
.btn--white:hover { background: #fff; color: var(--brand-dark); }

.btn--sm { padding: 10px 20px; font-size: 14px; }
.btn--lg { padding: 17px 38px; font-size: 16px; }
.btn--block { width: 100%; }

.btn-row { display: flex; flex-wrap: wrap; gap: 14px; }

/* ------------------------------ 卡片 ----------------------------------- */

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-xs);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease),
              border-color var(--dur) var(--ease);
}

/* ------------------------------ 标签 ----------------------------------- */

.tag {
  display: inline-block;
  padding: 3px 11px;
  font-size: 12px;
  font-weight: 600;
  border-radius: var(--radius-pill);
  background: var(--brand-light);
  color: var(--brand);
  line-height: 1.7;
}
.tag--accent { background: #FFF1E6; color: var(--accent-dark); }
.tag--muted { background: var(--line-2); color: var(--muted); }

/* ---------------------------- 滚动入场 --------------------------------- */

.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
  transition-delay: var(--reveal-delay, 0ms);
  will-change: opacity, transform;
}
.reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

/* ---------------------------- 富文本正文 -------------------------------- */

.prose { color: var(--ink-2); font-size: 1.02rem; }
.prose h2, .prose h3, .prose h4 { color: var(--ink); margin: 1.8em 0 .6em; }
.prose h2:first-child, .prose h3:first-child, .prose h4:first-child { margin-top: 0; }
.prose h4 { font-size: 1.15rem; padding-left: 14px; border-left: 4px solid var(--brand); }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin-bottom: .5em; }
.prose li::marker { color: var(--brand); }
.prose img { border-radius: var(--radius); margin: 1.5em 0; }
.prose strong { color: var(--ink); }
.prose table { width: 100%; border-collapse: collapse; margin: 1.5em 0; font-size: .95rem; }
.prose th, .prose td { border: 1px solid var(--line); padding: 10px 14px; text-align: left; }
.prose th { background: var(--brand-soft); font-weight: 600; }
.prose blockquote {
  margin: 1.5em 0; padding: 16px 22px;
  background: var(--brand-soft);
  border-left: 4px solid var(--brand);
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--ink-2);
}
.prose a { border-bottom: 1px solid rgba(27, 95, 217, .35); }
.prose a:hover { border-bottom-color: var(--brand); }

/* ---------------------------- 通用辅助 --------------------------------- */

.hidden { display: none !important; }
.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;
}
.text-muted { color: var(--muted); }
.text-brand { color: var(--brand); }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }

/* 骨架屏 */
.skeleton {
  background: linear-gradient(100deg, var(--line-2) 30%, #fff 50%, var(--line-2) 70%);
  background-size: 300% 100%;
  animation: shimmer 1.4s infinite linear;
  border-radius: var(--radius-sm);
}
@keyframes shimmer { from { background-position: 160% 0; } to { background-position: -60% 0; } }

/* 加载指示 */
.loading {
  padding: 60px 0;
  text-align: center;
  color: var(--muted-2);
}
.loading::after {
  content: "";
  display: block;
  width: 32px; height: 32px;
  margin: 16px auto 0;
  border: 3px solid var(--line);
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------------------------- 响应式栅格 -------------------------------- */

@media (max-width: 1024px) {
  .g-4 { grid-template-columns: repeat(2, 1fr); }
  .g-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
  .wrap, .wrap-wide { width: min(100% - 32px, var(--wrap)); }
  .g-2, .g-3, .g-4 { grid-template-columns: 1fr; }
  .sec-head { flex-direction: column; align-items: flex-start; gap: 18px; }
  .btn { padding: 13px 24px; }
}

/* ------------------------------ 打印 ----------------------------------- */
@media print {
  .site-header, .site-footer, .cta-banner { display: none !important; }
}
