/* ==========================================================================
   base.css — 设计令牌、Reset、排版、工具类
   苏州光速数据技术有限公司 官网
   ========================================================================== */

:root {
  /* 颜色 */
  --c-dark: #081426;
  --c-dark-2: #0F1F3A;
  --c-bg: #F5F8FC;
  --c-surface: #FFFFFF;
  --c-border: #DCE5F0;
  --c-primary: #2563EB;
  --c-primary-dark: #1D4ED8;
  --c-accent: #22D3EE;
  --c-text: #172033;
  --c-text-2: #475569;
  --c-text-inverse: #E6EEF8;

  /* 派生色 */
  --c-primary-soft: rgba(37, 99, 235, 0.08);
  --c-accent-soft: rgba(34, 211, 238, 0.12);
  --c-border-dark: rgba(230, 238, 248, 0.12);
  --c-text-inverse-2: rgba(230, 238, 248, 0.74);
  --c-success: #16A34A;
  --c-danger: #DC2626;

  /* 字体 */
  --font-sans: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", "Source Han Sans SC", sans-serif;
  --font-num: "Segoe UI", Inter, system-ui, sans-serif;

  /* 字号 */
  --fs-h1: 48px;
  --fs-h2: 36px;
  --fs-h3: 22px;
  --fs-body: 16px;
  --fs-small: 14px;
  --fs-xs: 12px;
  --lh-body: 1.7;

  /* 布局 */
  --container: 1200px;
  --gutter: 24px;
  --header-h: 72px;
  --radius: 12px;
  --radius-sm: 8px;
  --radius-pill: 999px;

  /* 阴影 */
  --shadow-sm: 0 1px 2px rgba(8, 20, 38, 0.04), 0 2px 8px rgba(8, 20, 38, 0.04);
  --shadow-md: 0 4px 16px rgba(8, 20, 38, 0.08), 0 1px 3px rgba(8, 20, 38, 0.04);
  --shadow-lg: 0 16px 40px rgba(8, 20, 38, 0.14);
  --shadow-glow: 0 0 0 1px rgba(34, 211, 238, 0.25), 0 0 24px rgba(34, 211, 238, 0.18);

  /* 动效 */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --dur: 0.3s;
  --dur-slow: 0.7s;
}

@media (max-width: 992px) {
  :root {
    --fs-h1: 40px;
    --fs-h2: 30px;
    --header-h: 64px;
  }
}

@media (max-width: 768px) {
  :root {
    --fs-h1: 32px;
    --fs-h2: 26px;
    --fs-h3: 20px;
    --gutter: 20px;
  }
}

/* --------------------------------------------------------------------------
   Reset
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--c-text);
  background: var(--c-surface);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6, p, ul, ol, figure, blockquote, dl, dd {
  margin: 0;
}

ul, ol {
  padding: 0;
  list-style: none;
}

img, svg, video {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: var(--c-primary);
  text-decoration: none;
  transition: color var(--dur);
}

a:hover {
  color: var(--c-primary-dark);
}

button, input, select, textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  background: none;
  border: 0;
  padding: 0;
}

:focus-visible {
  outline: 2px solid var(--c-accent);
  outline-offset: 3px;
  border-radius: 2px;
}

::selection {
  background: var(--c-primary);
  color: #fff;
}

/* --------------------------------------------------------------------------
   排版
   -------------------------------------------------------------------------- */
h1, .h1 {
  font-size: var(--fs-h1);
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.01em;
}

h2, .h2 {
  font-size: var(--fs-h2);
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: -0.005em;
}

h3, .h3 {
  font-size: var(--fs-h3);
  line-height: 1.4;
  font-weight: 600;
}

h4, .h4 {
  font-size: 18px;
  line-height: 1.45;
  font-weight: 600;
}

p + p {
  margin-top: 1em;
}

.text-2 {
  color: var(--c-text-2);
}

.text-small {
  font-size: var(--fs-small);
}

.text-center {
  text-align: center;
}

.num {
  font-family: var(--font-num);
  font-variant-numeric: tabular-nums;
}

.eyebrow,
.section__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-num);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--c-primary);
}

.eyebrow::before,
.section__eyebrow::before {
  content: "";
  width: 24px;
  height: 2px;
  background: currentColor;
  opacity: 0.8;
}

/* --------------------------------------------------------------------------
   工具类
   -------------------------------------------------------------------------- */
.visually-hidden,
.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 1000;
  padding: 10px 16px;
  background: var(--c-primary);
  color: #fff;
  border-radius: var(--radius-sm);
  font-weight: 600;
  transition: top 0.2s;
}

.skip-link:focus {
  top: 16px;
  color: #fff;
}

.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.mt-5 { margin-top: 48px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }

.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }
.gap-3 { gap: 24px; }

/* --------------------------------------------------------------------------
   入场动效（由 main.js 添加 .is-visible）
   -------------------------------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity var(--dur-slow) var(--ease-out), transform var(--dur-slow) var(--ease-out);
  transition-delay: var(--reveal-delay, 0s);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

.reveal[data-delay="1"] { --reveal-delay: 0.08s; }
.reveal[data-delay="2"] { --reveal-delay: 0.16s; }
.reveal[data-delay="3"] { --reveal-delay: 0.24s; }
.reveal[data-delay="4"] { --reveal-delay: 0.32s; }
.reveal[data-delay="5"] { --reveal-delay: 0.40s; }
.reveal[data-delay="6"] { --reveal-delay: 0.48s; }

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
