/* ============================================================
   智数盒子官网 · 基础样式（reset + 排版 + 工具类）
   ============================================================ */

/* ===== Reset ===== */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.8;
  color: var(--text-1);
  background: var(--bg-page);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: "palt" 1, "kern" 1;
  overflow-x: hidden;
}
img, svg, video { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; transition: color var(--t-fast); }
a:hover { color: var(--brand-primary); }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
ul, ol { list-style: none; }
input, textarea, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--brand-primary); outline-offset: 2px; }

/* ===== 排版 ===== */
h1, h2, h3, h4, h5 { color: var(--text-1); line-height: 1.32; font-weight: 800; letter-spacing: 0.01em; }
h1 { font-size: clamp(28px, 4vw, 44px); letter-spacing: 2px; }
h2 { font-size: clamp(24px, 3vw, 32px); }
h3 { font-size: 20px; font-weight: 700; }
h4 { font-size: 16px; font-weight: 700; color: var(--text-2); }
p  { color: var(--text-2); }
strong { color: var(--text-1); font-weight: 700; }
num, .num, .stat-band__num, .price-card__amount, .calc-val, .calc-val--red, .calc-val--green, .dash-mini__stat-val, .tco-bar__val {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1, "lnum" 1;
}
code { font-family: var(--font-mono); background: var(--bg-soft); padding: 2px 6px; border-radius: var(--radius-xs); font-size: 0.9em; }

/* ===== 容器 ===== */
.container {
  width: 100%;
  max-width: var(--container-w);
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
}
.container.narrow { max-width: var(--container-narrow); }

/* ===== 区块 ===== */
.section { padding: var(--sp-20) 0; }
.section--soft { background: var(--bg-soft); }
.section--tight { padding: var(--sp-16) 0; }

.section-head { text-align: center; max-width: 720px; margin: 0 auto var(--sp-12); }
.section-tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  color: var(--brand-primary);
  background: var(--bg-tint-b);
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: var(--sp-2);
  border: 1px solid var(--border-b);
}
.section-title { font-size: clamp(24px, 3vw, 32px); font-weight: 800; margin-bottom: var(--sp-3); position: relative; }
/* 标题下方蓝色装饰短线（科技感锚点）*/
.section-head .section-title::after {
  content: '';
  display: block;
  width: 40px;
  height: 3px;
  background: var(--brand-primary);
  border-radius: 2px;
  margin-top: var(--sp-3);
  margin-left: auto;
  margin-right: auto;
}
.section-sub { font-size: 16px; color: var(--text-3); line-height: 1.7; }

/* ===== 通用工具类 ===== */
.text-center { text-align: center; }
.text-primary { color: var(--brand-primary); }
.text-success { color: var(--success); }
.text-danger  { color: var(--danger); }
.text-gradient {
  background: var(--grad-primary);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.text-nowrap { white-space: nowrap; }

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

.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-wrap { flex-wrap: wrap; }
.gap-2 { gap: var(--sp-2); }
.gap-3 { gap: var(--sp-3); }
.gap-4 { gap: var(--sp-4); }

/* ===== 数字强调 ===== */
.big-num {
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 800;
  color: var(--brand-primary);
  line-height: 1.1;
}

/* ===== 提示框（保留语义，但降低饱和度）===== */
.callout {
  padding: var(--sp-5) var(--sp-6);
  border-radius: var(--radius);
  margin: var(--sp-4) 0;
  border: 1px solid var(--border-1);
  background: linear-gradient(180deg, #fff, var(--bg-soft));
  position: relative;
}
.callout h4 { margin-bottom: var(--sp-2); color: var(--text-1); }
.callout p { color: var(--text-2); }
.callout p:last-child { margin-bottom: 0; }
/* 左边一道彩色粗边表示语义 */
.callout--blue   { border-left: 4px solid var(--brand-primary); }
.callout--blue h4, .callout--blue strong { color: var(--brand-primary-d); }
.callout--green  { border-left: 4px solid var(--success); }
.callout--green h4, .callout--green strong { color: #047857; }
.callout--orange { border-left: 4px solid var(--warn); }
.callout--orange h4, .callout--orange strong { color: #B45309; }
.callout--red    { border-left: 4px solid var(--danger); }
.callout--red h4, .callout--red strong { color: #B91C1C; }

/* ===== 表格 ===== */
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  margin: var(--sp-4) 0;
}
.table th {
  background: var(--ink-800);
  color: #fff;
  padding: 12px 14px;
  text-align: left;
  font-weight: 600;
  white-space: nowrap;
}
.table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-1);
  color: var(--text-2);
  vertical-align: top;
}
.table tbody tr:nth-child(even) td { background: rgba(37, 99, 235, 0.015); }
.table tbody tr:hover td { background: var(--bg-tint-b); }
.table--soft th { background: var(--bg-soft); color: var(--text-3); border-bottom: 2px solid var(--border-1); }
.table--highlight-col th:nth-child(2) {
  background: var(--brand-primary);
  color: #fff;
}
.table--highlight-col td:nth-child(2) {
  background: var(--bg-tint-b);
  color: var(--text-1);
  font-weight: 600;
}

/* ===== 视觉装饰 ===== */
.deco-circle {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

/* ===== 响应式（移动优先补丁）===== */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  body { font-size: 15px; }
  .section { padding: var(--sp-12) 0; }
  .container { padding-left: 16px; padding-right: 16px; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .table { font-size: 12px; }
  .table th, .table td { padding: 8px 10px; }
  h1 { letter-spacing: 1px; }
  .section-head { margin-bottom: var(--sp-8); }
}

/* ===== 打印 ===== */
@media print {
  .site-header, .site-footer, .floating-cta, .menu-toggle { display: none !important; }
  body { background: #fff; }
  .section { padding: 24px 0; }
}
