/* ============================================================
   base.css — 设计令牌、重置、基础排版、工具类
   视觉体系：深空蓝 + 冰川蓝 + 暖橙
   ============================================================ */

:root {
  /* ---- 品牌色 ---- */
  --color-primary: #0086F6;
  --color-primary-dark: #0064C9;   /* 兼容旧引用 */
  --color-primary-deep: #005CB8;
  --color-primary-light: #4FB0FF;
  --color-primary-tint: #EAF4FF;
  --color-accent: #FF7A00;
  --color-accent-dark: #E86A00;    /* 兼容旧引用 */
  --color-accent-tint: #FFF4E9;

  /* ---- 文字 ---- */
  --color-heading: #0C1B2A;        /* 深空蓝，替代纯黑，更高级 */
  --color-text: #1A1A1A;
  --color-text-secondary: #5A6B7B;
  --color-text-light: #8A99A8;
  --color-border: #E6EDF4;
  --color-line: #EFF3F8;

  /* ---- 背景 ---- */
  --color-bg: #FFFFFF;
  --color-bg-alt: #F5F8FC;
  --color-footer-bg: #0B1622;

  /* ---- 渐变 ---- */
  --gradient-primary: linear-gradient(135deg, #0A93FF 0%, #0067DC 100%);
  --gradient-accent: linear-gradient(135deg, #FF9433 0%, #F26A00 100%);
  --gradient-brand-line: linear-gradient(90deg, #0086F6 0%, #4FB0FF 55%, #FF8A1F 100%);

  /* ---- 阴影（分层柔光，避免脏灰） ---- */
  --shadow-xs: 0 1px 2px rgba(12, 27, 42, 0.05);
  --shadow-card: 0 1px 2px rgba(12, 27, 42, 0.04), 0 10px 30px -10px rgba(12, 27, 42, 0.12);
  --shadow-card-hover: 0 2px 6px rgba(12, 27, 42, 0.06), 0 22px 50px -18px rgba(12, 27, 42, 0.25);
  --shadow-brand: 0 14px 30px -12px rgba(0, 134, 246, 0.65);
  --shadow-accent: 0 14px 30px -12px rgba(242, 106, 0, 0.6);
  --shadow-nav: 0 10px 30px -20px rgba(12, 27, 42, 0.6);

  /* ---- 尺寸 ---- */
  --radius-card: 16px;
  --radius-btn: 10px;
  --container-max: 1200px;
  --section-gap: 96px;
  --header-height: 76px;

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

  /* ---- 动效 ---- */
  --transition-base: 0.3s cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-out: cubic-bezier(0.22, 0.61, 0.36, 1);
}

@media (max-width: 768px) {
  :root {
    --section-gap: 56px;
    --header-height: 64px;
  }
}

/* ---------- 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-family);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.75;
  color: var(--color-text);
  background-color: var(--color-bg);
  overflow-x: clip;          /* clip 不破坏 position: sticky */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

@supports not (overflow: clip) {
  body { overflow-x: hidden; }
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

ul, ol { list-style: none; }

button {
  font-family: inherit;
  border: none;
  background: none;
  cursor: pointer;
  color: inherit;
}

input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

::selection {
  background: rgba(0, 134, 246, 0.18);
  color: var(--color-heading);
}

/* ---------- 基础排版 ---------- */
h1, h2, h3, h4 {
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.015em;
  color: var(--color-heading);
}

h1 { font-size: clamp(1.875rem, 4.4vw, 3.25rem); }
h2 { font-size: clamp(1.625rem, 3vw, 2.375rem); }
h3 { font-size: 1.25rem; font-weight: 600; letter-spacing: -0.01em; }
h4 { font-size: 1.0625rem; font-weight: 600; letter-spacing: -0.005em; }

p {
  color: var(--color-text-secondary);
}

strong { color: var(--color-heading); font-weight: 600; }

/* ---------- 布局 ---------- */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: var(--section-gap) 0;
  position: relative;
}

.section--alt {
  background-color: var(--color-bg-alt);
  background-image:
    radial-gradient(900px 420px at 6% -8%, rgba(0, 134, 246, 0.09), transparent 62%),
    radial-gradient(760px 400px at 98% 108%, rgba(255, 138, 31, 0.07), transparent 62%);
}

.section__header {
  text-align: center;
  margin-bottom: 56px;
}

.section__title {
  margin-bottom: 18px;
  padding-bottom: 20px;
  position: relative;
}

/* 标题下的品牌渐变短横线 */
.section__title::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 52px;
  height: 3px;
  border-radius: 3px;
  background: var(--gradient-brand-line);
  background-size: 200% 100%;
}

.section__subtitle {
  color: var(--color-text-secondary);
  max-width: 600px;
  margin: 0 auto;
  font-size: 1.0625rem;
}

/* ---------- 滚动进入动画 ---------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
  transition-delay: var(--reveal-delay, 0s);
  will-change: opacity, transform;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

@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;
  }
  .reveal {
    opacity: 1;
    transform: none;
  }
}

/* ---------- 可访问性 ---------- */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--color-primary-deep);
  color: #fff;
  padding: 10px 18px;
  z-index: 2000;
  border-radius: 0 0 10px 0;
  font-size: 0.875rem;
}

.skip-link:focus { left: 0; }

@media (max-width: 640px) {
  .section__header { margin-bottom: 40px; }
  .section__subtitle { font-size: 0.9375rem; }
}
