/* ============================================
   基础样式：重置 / 容器 / 区块 / 按钮
============================================ */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; overflow-x: hidden; }

body {
  font-family: var(--font-sans);
  background: var(--bg-page);
  color: var(--text-primary);
  font-size: 16px;
  line-height: 1.75;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }

::selection { background: rgba(139, 92, 246, 0.4); }

/* 容器：电脑端最宽 1400px */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-pad);
}

/* 区块 */
.section { padding: 100px 0; position: relative; }
.section-alt { background: var(--bg-deep); }

/* 区块标题 */
.section-head { max-width: 760px; margin: 0 auto 64px; text-align: center; position: relative; z-index: 1; }
.section-head.left { text-align: left; margin-left: 0; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; letter-spacing: 3px; text-transform: uppercase;
  color: var(--brand-cyan);
  padding: 6px 18px; border: 1px solid rgba(34, 211, 238, 0.28);
  border-radius: 999px; background: rgba(34, 211, 238, 0.06);
  margin-bottom: 20px;
}
.eyebrow::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--brand-cyan); box-shadow: 0 0 8px var(--brand-cyan); }
.section-title { font-size: clamp(28px, 4vw, 44px); line-height: 1.25; font-weight: 700; }
.section-desc { margin-top: 16px; color: var(--text-secondary); font-size: 17px; }

/* 渐变文字 */
.grad-text { background: var(--gradient-text); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* 按钮 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 34px; border-radius: 999px;
  font-size: 16px; font-weight: 600; white-space: nowrap;
  transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease, background .3s ease;
}
.btn-primary { background: var(--gradient-main); color: #fff; box-shadow: 0 8px 24px rgba(99, 102, 241, 0.35); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 36px rgba(99, 102, 241, 0.5); }
.btn-ghost { border: 1px solid var(--border-strong); color: var(--text-primary); background: rgba(255, 255, 255, 0.03); }
.btn-ghost:hover { border-color: var(--brand-blue); background: rgba(59, 130, 246, 0.1); transform: translateY(-2px); }
.btn-sm { padding: 10px 24px; font-size: 14px; }
.btn-block { width: 100%; }

/* 数字字体 */
.num { font-family: var(--font-num); font-variant-numeric: tabular-nums; }

/* 内页顶部横幅 */
.page-hero { padding: 170px 0 90px; text-align: center; position: relative; overflow: hidden; }
.page-hero h1 { font-size: clamp(30px, 4.5vw, 52px); line-height: 1.2; font-weight: 700; }
.page-hero .hero-sub { margin: 18px auto 0; max-width: none; white-space: nowrap; color: var(--text-secondary); font-size: 18px; }
.crumbs { margin-top: 24px; font-size: 14px; color: var(--text-muted); }
.crumbs a { color: var(--text-muted); transition: color .2s; }
.crumbs a:hover { color: var(--brand-cyan); }

/* 通用栅格 */
.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* 返回顶部 */
.back-top {
  position: fixed; right: 28px; bottom: 28px; z-index: 90;
  width: 46px; height: 46px; border-radius: 50%;
  background: var(--bg-elevated); border: 1px solid var(--border-light);
  color: var(--text-secondary); font-size: 18px;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden; transform: translateY(12px);
  transition: all .3s ease;
}
.back-top.show { opacity: 1; visibility: visible; transform: none; }
.back-top:hover { color: #fff; border-color: var(--brand-blue); box-shadow: var(--glow-blue); }

/* 响应式基础 */
@media (max-width: 1200px) {
  .section { padding: 80px 0; }
}
@media (max-width: 992px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .page-hero { padding: 140px 0 70px; }
  /* 平板/手机端 Hero 副标题恢复自动换行，避免窄屏溢出 */
  .page-hero .hero-sub { max-width: 680px; white-space: normal; }
}
@media (max-width: 768px) {
  :root { --container-pad: 18px; }
  .section { padding: 64px 0; }
  .section-head { margin-bottom: 44px; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .section-title { font-size: 26px; }
  /* 手机端 Hero 副标题字号略小，配合自动换行 */
  .page-hero .hero-sub { font-size: 16px; }
}
