/* =============================================================
 * base.css — 盛科网络科技官网 设计系统基础层
 * 内容：reset + 设计令牌(CSS变量) + 排版 + 布局工具类 + 暗色模式
 * 作者：前端交付 / 2026
 * ============================================================= */

/* ---------- 1. 设计令牌 (Design Tokens) ---------- */
:root {
  /* 品牌色 */
  --c-primary: #0F52BA;        /* 深海蓝 主色 */
  --c-primary-600: #0C429A;
  --c-primary-700: #09347A;
  --c-accent: #22D3EE;         /* 青色 点缀 */
  --c-accent-soft: #67E8F9;
  --c-ink: #1F2937;            /* 深灰 正文/辅助 */
  --c-ink-2: #4B5563;          /* 次级灰 */
  --c-ink-3: #9CA3AF;          /* 弱化灰 */

  /* 基底 */
  --c-bg: #FFFFFF;
  --c-bg-soft: #F6F8FB;        /* 浅灰区块 */
  --c-bg-tint: #EEF3FB;        /* 蓝调浅底 */
  --c-surface: #FFFFFF;        /* 卡片表面 */
  --c-border: #E5E9F0;
  --c-line: #EAEEF4;

  /* 渐变 */
  --grad-brand: linear-gradient(135deg, #0F52BA 0%, #1E6FE0 55%, #22D3EE 120%);
  --grad-brand-soft: linear-gradient(135deg, rgba(15,82,186,.10), rgba(34,211,238,.10));
  --grad-dark: linear-gradient(160deg, #0B1F3A 0%, #0F2E5C 60%, #123B73 100%);

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

  /* 字号 */
  --fs-xs: 12px;
  --fs-sm: 14px;
  --fs-base: 16px;
  --fs-lg: 18px;
  --fs-xl: 22px;
  --fs-2xl: 28px;
  --fs-3xl: 36px;
  --fs-4xl: 48px;
  --fs-hero: clamp(32px, 5vw, 58px);

  /* 字重 */
  --fw-normal: 400;
  --fw-medium: 500;
  --fw-semibold: 600;
  --fw-bold: 700;
  --fw-black: 800;

  /* 行高 */
  --lh-tight: 1.2;
  --lh-snug: 1.4;
  --lh-base: 1.7;

  /* 间距尺度 */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;
  --space-9: 96px;
  --space-10: 128px;

  /* 圆角 */
  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-full: 999px;

  /* 阴影 */
  --shadow-sm: 0 1px 2px rgba(15, 30, 60, .06), 0 2px 6px rgba(15, 30, 60, .06);
  --shadow: 0 6px 18px rgba(15, 41, 95, .08);
  --shadow-md: 0 12px 32px rgba(15, 41, 95, .12);
  --shadow-lg: 0 24px 60px rgba(15, 41, 95, .18);
  --shadow-glow: 0 10px 40px rgba(34, 211, 238, .28);

  /* 布局 */
  --container: 1200px;
  --container-narrow: 920px;
  --nav-h: 72px;

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

  --z-nav: 100;
  --z-modal: 200;
}

/* ---------- 暗色模式令牌覆盖 ---------- */
[data-theme="dark"] {
  --c-bg: #0A1426;
  --c-bg-soft: #0E1B30;
  --c-bg-tint: #102445;
  --c-surface: #12203A;
  --c-ink: #E6ECF6;
  --c-ink-2: #B4C0D4;
  --c-ink-3: #6E7C93;
  --c-border: #1E2E49;
  --c-line: #18253C;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.4);
  --shadow: 0 6px 18px rgba(0,0,0,.45);
  --shadow-md: 0 12px 32px rgba(0,0,0,.5);
  --shadow-lg: 0 24px 60px rgba(0,0,0,.6);
}

/* ---------- 2. Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-delay: 0s !important; transition-duration: .001ms !important; transition-delay: 0s !important; }
}

body {
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  line-height: var(--lh-base);
  color: var(--c-ink);
  background: var(--c-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img, svg, video { display: block; max-width: 100%; }
img { height: auto; }

a { color: inherit; text-decoration: none; transition: color var(--dur) var(--ease); }
a:hover { color: var(--c-primary); }

button { font-family: inherit; font-size: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, textarea, select { font-family: inherit; font-size: inherit; color: inherit; }
ul, ol { list-style: none; }

h1, h2, h3, h4, h5, h6 { line-height: var(--lh-tight); font-weight: var(--fw-bold); color: var(--c-ink); }
:focus-visible { outline: 2px solid var(--c-accent); outline-offset: 2px; border-radius: 4px; }

/* ---------- 3. 布局工具类 ---------- */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--space-5); }
.container-narrow { max-width: var(--container-narrow); }

.section { padding-block: var(--space-9); }
.section-soft { background: var(--c-bg-soft); }
.section-tint { background: var(--c-bg-tint); }

.grid { display: grid; gap: var(--space-6); }
.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; }
.items-center { align-items: center; }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }
.gap-5 { gap: var(--space-5); }
.gap-6 { gap: var(--space-6); }

.text-center { text-align: center; }
.text-primary { color: var(--c-primary); }
.text-accent { color: var(--c-accent); }
.text-muted { color: var(--c-ink-2); }
.text-ink-3 { color: var(--c-ink-3); }
.fw-bold { font-weight: var(--fw-bold); }
.fw-semibold { font-weight: var(--fw-semibold); }

/* ---------- 4. 排版工具类 ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: var(--space-2);
  font-size: var(--fs-sm); font-weight: var(--fw-semibold);
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--c-primary); margin-bottom: var(--space-4);
}
.eyebrow::before { content: ""; width: 26px; height: 2px; background: var(--grad-brand); border-radius: 2px; }

.section-title { font-size: var(--fs-3xl); line-height: var(--lh-snug); margin-bottom: var(--space-4); }
.section-lead { font-size: var(--fs-lg); color: var(--c-ink-2); max-width: 640px; margin-inline: auto; }
.section-head { text-align: center; margin-bottom: var(--space-7); }

.lead { font-size: var(--fs-lg); color: var(--c-ink-2); line-height: var(--lh-base); }
.muted { color: var(--c-ink-2); }

/* 分隔的竖线小标记 */
.divider-dot { display: inline-block; width: 4px; height: 4px; border-radius: 50%; background: var(--c-accent); margin: 0 10px; vertical-align: middle; }

/* ---------- 5. 滚动揭示动画 (默认状态) ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s var(--ease-out), transform .7s var(--ease-out); will-change: opacity, transform; }
.reveal.in-view { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: .08s; }
.reveal.d2 { transition-delay: .16s; }
.reveal.d3 { transition-delay: .24s; }
.reveal.d4 { transition-delay: .32s; }
.reveal.d5 { transition-delay: .40s; }
.reveal.d6 { transition-delay: .48s; }

/* ---------- 6. 无障碍：视觉隐藏 ---------- */
.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;
}

/* ---------- 7. 响应式：断点变量提示（具体适配在 components/pages） ---------- */
/* 移动端优先：默认即移动样式；≥768 平板；≥1024 桌面 */
