/* ============================================================
   base.css —— 品牌变量 + 基础重置 + 通用原子样式
   品牌替换说明：
- 全部品牌视觉集中在本文件 :root 变量区，替换时只改这里
   - 品牌色已对齐公司 LOGO 主色（科技蓝），与 VI 一致
   ============================================================ */

:root {
  /* ---- 品牌色（取自公司 LOGO 主色，浅底文字使用深阶保证对比度） ---- */
  --brand: #2a9be0;            /* 主强调色：科技蓝（深底使用） */
  --brand-deep: #0f6fae;       /* 强调色深阶：浅底文字/深底 hover 背景 */
  --brand-bright: #57c2f2;     /* 亮阶：深底高亮与描边 */
  --brand-soft: rgba(42, 155, 224, 0.12);
  --brand-line: rgba(42, 155, 224, 0.38);

  /* ---- 深色体系 ---- */
  --ink: #0a1220;              /* 主深底 */
  --ink-2: #0e1a2e;            /* 次级深底 */
  --ink-3: #16233b;            /* 深底卡片 */
  --ink-line: rgba(255, 255, 255, 0.09);
  --ink-text-2: rgba(233, 240, 252, 0.66);
  --ink-text-3: rgba(210, 222, 240, 0.58);

  /* ---- 浅色体系 ---- */
  --bg-light: #f6f8fb;
  --white: #ffffff;
  --text-1: #111c2e;
  --text-2: #5b6b7f;
  --text-3: #66768d;
  --line: #e5eaf2;

  /* ---- 圆角 / 阴影 ---- */
  --r-s: 8px;
  --r-m: 14px;
  --r-l: 22px;
  --shadow-s: 0 4px 18px rgba(13, 27, 51, 0.06);
  --shadow-m: 0 16px 48px rgba(13, 27, 51, 0.1);
  --shadow-brand: 0 10px 32px rgba(11, 181, 132, 0.28);

  /* ---- 版式 ---- */
  --container: 1200px;
  --font-sans: "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei",
    -apple-system, "Segoe UI", Roboto, sans-serif;
  --header-h: 72px;
}

/* ---------- 重置 ---------- */
*,
*::before,
*::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-1);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { font-family: inherit; border: 0; background: none; cursor: pointer; }
input, textarea { font-family: inherit; }

/* ---------- 键盘焦点可见性（无障碍） ---------- */
:focus-visible {
  outline: 2px solid var(--brand-deep);
  outline-offset: 2px;
}
/* 深色区域使用亮色焦点环，保证深底上的可见度 */
.hero :focus-visible,
.section--ink :focus-visible,
.site-footer :focus-visible,
.cta-band :focus-visible,
.site-header:not(.scrolled):not(.solid) :focus-visible {
  outline-color: var(--brand);
}

/* ---------- 跳转到主要内容（键盘用户 Tab 的首个可聚焦元素） ---------- */
.skip-link {
  position: fixed;
  top: 12px;
  left: 16px;
  z-index: 200;
  padding: 10px 18px;
  border-radius: 10px;
  background: var(--brand);
  color: #04231a;
  font-size: 14px;
  font-weight: 600;
  translate: 0 -180%;
  transition: translate 0.2s ease;
}
.skip-link:focus { translate: 0 0; }

::selection { background: var(--brand); color: var(--ink); }

/* ---------- 布局原子 ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.section { padding: 96px 0; }
.section--tight { padding: 72px 0; }
.section--light { background: var(--bg-light); }
.section--ink { background: var(--ink); color: #eaf1fc; }

/* ---------- 段落标题组件 ---------- */
.sec-head { max-width: 720px; margin-bottom: 56px; }
.sec-head--center { margin-left: auto; margin-right: auto; text-align: center; }

.sec-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brand-deep);
  margin-bottom: 14px;
}
.sec-eyebrow::before {
  content: "";
  width: 22px; height: 2px;
  background: var(--brand);
  border-radius: 2px;
}
.sec-head--center .sec-eyebrow::after {
  content: "";
  width: 22px; height: 2px;
  background: var(--brand);
  border-radius: 2px;
}
.section--ink .sec-eyebrow { color: var(--brand); }

.sec-title {
  font-size: clamp(26px, 3.4vw, 40px);
  line-height: 1.28;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.sec-desc {
  margin-top: 16px;
  font-size: 16px;
  color: var(--text-2);
}
.section--ink .sec-desc { color: var(--ink-text-2); }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 48px;
  padding: 0 26px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  transition: transform 0.2s ease, box-shadow 0.2s ease,
    background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn--brand {
  background: var(--brand);
  color: #04231a;
  box-shadow: var(--shadow-brand);
}
.btn--brand:hover { background: var(--brand-deep); color: #fff; }

.btn--ghost {
  border: 1px solid var(--line);
  color: var(--text-1);
  background: var(--white);
}
.btn--ghost:hover { border-color: var(--brand); color: var(--brand-deep); }

.btn--ghost-ink {
  border: 1px solid rgba(255, 255, 255, 0.24);
  color: #eaf1fc;
}
.btn--ghost-ink:hover { border-color: var(--brand); color: var(--brand); }

.btn--sm { height: 40px; padding: 0 20px; font-size: 14px; }
.btn--lg { height: 54px; padding: 0 32px; font-size: 16px; }

.btn .arrow { transition: transform 0.2s ease; }
.btn:hover .arrow { transform: translateX(3px); }

/* ---------- 标签 ---------- */
.tag {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  background: var(--brand-soft);
  color: var(--brand-deep);
}

/* ---------- 滚动出现动画（仅 JS 可用时启用隐藏态，无 JS 时内容直接可见） ----------
   实现说明：
   - 位移用独立 translate 属性（而非 transform），与卡片自身的 transform
     （hover 位移等）互不干扰；
   - 过渡只在“未完成”阶段生效（:not(.reveal-done)），入场后 JS 为元素补
     .reveal-done 移除过渡，避免覆盖组件自己的 transition（阴影/边框过渡）；
   - 网格与步骤卡子项按序交错入场（stagger），提升出现节奏感。 ---------- */
html.js .reveal {
  opacity: 0;
  translate: 0 26px;
}
html.js .reveal:not(.reveal-done) {
  transition: opacity 0.7s cubic-bezier(0.22, 0.61, 0.36, 1),
    translate 0.7s cubic-bezier(0.22, 0.61, 0.36, 1);
}
html.js .reveal.is-in { opacity: 1; translate: none; }

/* 组内子项交错入场：第 n 项递延 60ms */
html.js .grid > .reveal:nth-child(2):not(.reveal-done),
html.js .pipeline-steps > .reveal:nth-child(2):not(.reveal-done) { transition-delay: 60ms; }
html.js .grid > .reveal:nth-child(3):not(.reveal-done),
html.js .pipeline-steps > .reveal:nth-child(3):not(.reveal-done) { transition-delay: 120ms; }
html.js .grid > .reveal:nth-child(4):not(.reveal-done),
html.js .pipeline-steps > .reveal:nth-child(4):not(.reveal-done) { transition-delay: 180ms; }
html.js .grid > .reveal:nth-child(5):not(.reveal-done),
html.js .pipeline-steps > .reveal:nth-child(5):not(.reveal-done) { transition-delay: 240ms; }
html.js .grid > .reveal:nth-child(6):not(.reveal-done) { transition-delay: 300ms; }
html.js .grid > .reveal:nth-child(n + 7):not(.reveal-done) { transition-delay: 360ms; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  html.js .reveal { opacity: 1; translate: none; }
  html.js .reveal:not(.reveal-done) { transition: none; }
}

/* ---------- 网格工具 ---------- */
.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); }

@media (max-width: 960px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .section { padding: 72px 0; }
}
@media (max-width: 640px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .section { padding: 56px 0; }
  .sec-head { margin-bottom: 40px; }
}
