/* ==========================================================================
   base.css —— 设计令牌 / 重置 / 排版 / 按钮 / 工具类
   视觉基调：浅色工业简洁。冷灰底 + 工业蓝主色 + 等宽字体呈现型号与技术标签，
   大量留白与细分割线营造科技企业的克制、直观、大气。
   ========================================================================== */

/* ---------- 设计令牌 ---------- */
:root {
  /* 文字 */
  --ink: #0b1526;
  --ink-2: #3d4a5c;
  --ink-3: #6b7a90;
  --ink-4: #9aa7b8;

  /* 背景与线条 */
  --bg: #ffffff;
  --bg-soft: #f5f7fa;
  --bg-mute: #eef2f7;
  --bg-deep: #0a1a30;
  --bg-deep-2: #10263f;
  --line: #e3e8ef;
  --line-2: #cfd8e3;

  /* 品牌色 */
  --brand: #0b4fd8;
  --brand-2: #2f7dff;
  --brand-3: #6aa6ff;
  --brand-soft: #eaf1fe;
  --brand-ink: #08306f;
  --accent: #00a3a3;

  /* 语义色 */
  --ok: #16a34a;
  --warn: #d97706;
  --danger: #d92d20;

  /* 尺寸 */
  --container: 1240px;
  --gutter: 24px;
  --radius-s: 4px;
  --radius: 8px;
  --radius-l: 14px;

  /* 阴影 */
  --sh-1: 0 1px 2px rgba(11, 21, 38, .06), 0 4px 14px rgba(11, 21, 38, .05);
  --sh-2: 0 6px 24px rgba(11, 21, 38, .09);
  --sh-3: 0 18px 48px rgba(11, 21, 38, .14);

  /* 排版 */
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", "Noto Sans SC", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
    "Liberation Mono", monospace;

  /* 动效 */
  --t-fast: 160ms;
  --t-base: 280ms;
  --t-slow: 520ms;
  --ease: cubic-bezier(.22, .61, .36, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);

  --header-h: 76px;
}

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

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

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6 { margin: 0; font-weight: 700; line-height: 1.25; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }
ul, ol { margin: 0 0 1em; padding-left: 1.4em; }
ul:last-child, ol:last-child { margin-bottom: 0; }
a { color: inherit; text-decoration: none; }
img, svg, video { display: block; max-width: 100%; height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
table { border-collapse: collapse; width: 100%; }
hr { border: 0; border-top: 1px solid var(--line); margin: 48px 0; }

::selection { background: var(--brand); color: #fff; }

/* 焦点可见性：键盘导航必须能看到焦点位置 */
:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; border-radius: 2px; }

/* ---------- 排版尺度 ---------- */
.t-display { font-size: clamp(34px, 5.2vw, 62px); line-height: 1.12; letter-spacing: -.025em; font-weight: 800; }
.t-h1 { font-size: clamp(28px, 3.6vw, 42px); line-height: 1.2; letter-spacing: -.02em; }
.t-h2 { font-size: clamp(24px, 2.8vw, 34px); line-height: 1.24; }
.t-h4 { font-size: 17px; line-height: 1.4; }
.t-body { font-size: 16px; line-height: 1.8; color: var(--ink-2); }
.t-sm { font-size: 14px; line-height: 1.7; color: var(--ink-2); }
.t-xs { font-size: 13px; line-height: 1.6; color: var(--ink-3); }
.t-mute { color: var(--ink-3); }
.t-mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; letter-spacing: .01em; }

/* 技术感小标签：等宽 + 大写字距 */
.kicker {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-mono); font-size: 12px; font-weight: 600;
  letter-spacing: .18em; text-transform: uppercase; color: var(--brand);
  /* 眉标允许在「·」等分隔符处换行，但不得在单词中间断开 */
  overflow-wrap: normal; word-break: keep-all; line-height: 1.9;
}
.kicker::before {
  content: ""; width: 22px; height: 2px; background: currentColor; opacity: .55;
}
.kicker--light { color: var(--brand-3); }

.lead { font-size: clamp(16px, 1.5vw, 19px); line-height: 1.85; color: var(--ink-2); }

/* ---------- 布局工具 ---------- */
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }
.container--narrow { max-width: 860px; }

.section { padding: clamp(56px, 8vw, 104px) 0; position: relative; }
.section--soft { background: var(--bg-soft); }
.section--deep { background: var(--bg-deep); color: #fff; }
.section--deep .t-body, .section--deep .t-sm { color: rgba(255, 255, 255, .74); }
.section--deep .kicker { color: var(--brand-3); }

.grid { display: grid; gap: var(--gutter); }
.g-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.stack > * + * { margin-top: 16px; }
.row { display: flex; gap: 14px; align-items: center; }
.row--between { justify-content: space-between; }
.row--wrap { flex-wrap: wrap; }
.col { display: flex; flex-direction: column; gap: 14px; }

.mt-0 { margin-top: 0 !important; }
.mt-1 { margin-top: 8px !important; }
.mt-2 { margin-top: 16px !important; }
.mt-3 { margin-top: 24px !important; }
.mt-4 { margin-top: 36px !important; }
.mt-5 { margin-top: 56px !important; }

.center { text-align: center; }
.nowrap { white-space: nowrap; }
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 999;
  background: var(--brand); color: #fff; padding: 10px 18px; border-radius: 0 0 var(--radius) 0;
}
.skip-link:focus { left: 0; }

/* ---------- 按钮 ---------- */
.btn {
  --btn-bg: var(--brand);
  --btn-fg: #fff;
  --btn-bd: var(--brand);
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 13px 26px; border: 1px solid var(--btn-bd); border-radius: var(--radius-s);
  background: var(--btn-bg); color: var(--btn-fg);
  font-size: 15px; font-weight: 600; letter-spacing: .01em; line-height: 1.2;
  cursor: pointer; overflow: hidden; white-space: nowrap;
  transition: transform var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease),
    background-color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease),
    color var(--t-fast) var(--ease);
}
.btn:hover { background: var(--brand-ink); border-color: var(--brand-ink); transform: translateY(-1px); box-shadow: var(--sh-2); }
.btn:active { transform: translateY(0); box-shadow: none; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .5; pointer-events: none; }

/* 按钮内的箭头随 hover 前移，强化"可点击"的直觉反馈 */
.btn .btn-arrow { transition: transform var(--t-base) var(--ease-out); }
.btn:hover .btn-arrow { transform: translateX(4px); }

.btn--ghost { --btn-bg: transparent; --btn-fg: var(--ink); --btn-bd: var(--line-2); }
.btn--ghost:hover { --btn-bg: var(--ink); --btn-fg: #fff; --btn-bd: var(--ink); }
.btn--outline { --btn-bg: transparent; --btn-fg: var(--brand); --btn-bd: var(--brand); }
.btn--outline:hover { --btn-bg: var(--brand); --btn-fg: #fff; }
.btn--light { --btn-bg: #fff; --btn-fg: var(--brand-ink); --btn-bd: #fff; }
.btn--light:hover { --btn-bg: var(--brand-soft); --btn-bd: var(--brand-soft); }
.btn--on-dark { --btn-bg: transparent; --btn-fg: #fff; --btn-bd: rgba(255, 255, 255, .34); }
.btn--on-dark:hover { --btn-bg: #fff; --btn-fg: var(--brand-ink); --btn-bd: #fff; }
.btn--sm { padding: 9px 18px; font-size: 14px; }
.btn--lg { padding: 16px 34px; font-size: 16px; }
.btn--block { width: 100%; }

/* 文字链接型按钮 */
.link-arrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 15px; font-weight: 600; color: var(--brand);
  padding-bottom: 2px; border-bottom: 1px solid transparent;
  /* 文字链接型按钮也是"固定标题"，折行后下划线会断开成两截 */
  white-space: nowrap;
  transition: gap var(--t-base) var(--ease-out), border-color var(--t-fast) var(--ease);
}
.link-arrow:hover { gap: 14px; border-bottom-color: currentColor; }

/* ---------- 徽标 ---------- */
.tag {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: 999px;
  background: var(--brand-soft); color: var(--brand-ink);
  font-size: 12px; font-weight: 600; letter-spacing: .02em; line-height: 1.6;
  /* 徽标是最短的一类"固定标题"，绝不允许在词中或词间断行 */
  white-space: nowrap;
}
.tag--mono { font-family: var(--font-mono); letter-spacing: .04em; }
.tag--gray { background: var(--bg-mute); color: var(--ink-2); }
.tag--new { background: #e7f8ee; color: #0f7a3d; }

/* ---------- 卡片基础 ---------- */
.panel { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); }

/* 细网格科技底纹：用于 Hero 与深色区块 */
.bg-grid {
  background-image:
    linear-gradient(to right, rgba(11, 79, 216, .07) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(11, 79, 216, .07) 1px, transparent 1px);
  background-size: 48px 48px;
}

/* ---------- 进场动效 ---------- */
/* 仅在 JS 可用（html.js）时才隐藏待进场元素，无 JS 环境下内容始终可见 */
html.js .js-reveal { opacity: 0; transform: translateY(26px); }
html.js .js-reveal.is-in {
  opacity: 1; transform: none;
  transition: opacity var(--t-slow) var(--ease-out), transform var(--t-slow) var(--ease-out);
  transition-delay: var(--reveal-delay, 0ms);
}

@keyframes fade-up { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes slide-in-right { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: none; } }
@keyframes pulse-soft { 0%, 100% { opacity: .55; } 50% { opacity: 1; } }
@keyframes spin-slow { to { transform: rotate(360deg); } }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

.anim-fade-up { animation: fade-up .7s var(--ease-out) both; }

/* 无障碍：尊重系统「减少动态效果」偏好 */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .js-reveal { opacity: 1 !important; transform: none !important; }
}

/* ---------- 响应式 ---------- */
@media (max-width: 1024px) {
  .g-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  :root { --gutter: 18px; --header-h: 62px; }
  .g-2, .g-3 { grid-template-columns: minmax(0, 1fr); }
  .section { padding: 48px 0; }
  .t-body { font-size: 15px; }
}

@media print {
  .site-header, .site-footer, .btn, .cta-band { display: none !important; }
  body { color: #000; }
}
