/* ==========================================================================
   base.css —— 设计令牌、重置、通用排版与基础组件
   ========================================================================== */

:root {
  --blue-50: #eff6ff;
  --blue-100: #dbeafe;
  --blue-200: #bfdbfe;
  --blue-400: #60a5fa;
  --blue-500: #3b82f6;
  --blue-600: #2563eb;
  --blue-700: #1d4ed8;
  --blue-900: #1e3a5f;

  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-tertiary: #94a3b8;
  --bg-white: #ffffff;
  --bg-light: #f8fafc;
  --border: #e2e8f0;

  --amber-400: #fbbf24;
  --amber-500: #f59e0b;
  --violet-500: #8b5cf6;

  --max-width: 1080px;
  --radius-card: 16px;
  --radius-sm: 12px;
  --ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text-primary);
  background: var(--bg-white);
  font-family:
    "PingFang SC",
    "Microsoft YaHei",
    "Source Han Sans SC",
    Inter,
    system-ui,
    -apple-system,
    sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

h1,
h2,
h3,
p {
  margin: 0;
}

/* ---------- 布局容器与区块 ---------- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  position: relative;
  padding: 100px 0;
  overflow: hidden;
}

.section--light {
  background: var(--bg-light);
}

.section__head {
  margin-bottom: 48px;
}

.eyebrow {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--blue-50);
  color: var(--blue-600);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.section__heading {
  margin: 18px 0 14px;
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}

.section__intro {
  max-width: 640px;
  color: var(--text-secondary);
  font-size: 16px;
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 30px;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition:
    transform 0.2s var(--ease),
    background-color 0.2s var(--ease),
    box-shadow 0.2s var(--ease);
}

.btn__arrow {
  transition: transform 0.2s var(--ease);
}

.btn:hover .btn__arrow {
  transform: translateX(4px);
}

.btn--light {
  background: #fff;
  color: var(--blue-600);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.18);
}

.btn--light:hover {
  transform: scale(1.03);
  background: var(--blue-50);
}

.btn--primary {
  background: var(--blue-600);
  color: #fff;
  box-shadow: 0 10px 30px rgba(37, 99, 235, 0.28);
}

.btn--primary:hover {
  transform: scale(1.03);
  background: var(--blue-700);
}

/* ---------- 滚动入场动画基类 ---------- */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition:
    opacity 0.6s var(--ease),
    transform 0.6s var(--ease);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- 无障碍隐藏标题 ---------- */
.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;
}

/* ---------- 语言切换（玻璃拟态胶囊） ---------- */
.lang-switch {
  position: fixed;
  top: 24px;
  right: 28px;
  left: auto;
  z-index: 50;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  min-height: 42px;
  padding: 5px 8px;
  border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow:
    0 6px 24px rgba(15, 23, 42, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.lang-switch__btn {
  min-height: 32px;
  padding: 6px 14px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: rgba(15, 23, 42, 0.52);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1;
  cursor: pointer;
  transition:
    color 0.2s var(--ease),
    background-color 0.2s var(--ease),
    box-shadow 0.2s var(--ease);
}

.lang-switch__btn.is-active {
  color: var(--blue-700);
  background: rgba(37, 99, 235, 0.12);
  box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.14);
}

.lang-switch__btn:hover {
  color: var(--blue-600);
}

.lang-switch__sep {
  color: rgba(15, 23, 42, 0.28);
  font-size: 13px;
  user-select: none;
}

/* ---------- 语言切换：仅文案轻微淡入淡出（不影响背景 / 3D 像素） ---------- */
[data-i18n] {
  transition:
    opacity 0.15s var(--ease),
    transform 0.15s var(--ease);
}

html.is-lang-switching [data-i18n] {
  opacity: 0;
  transform: translateY(4px);
}

@media (prefers-reduced-motion: reduce) {
  [data-i18n] {
    transition: none;
  }
}

html[lang="en"] body {
  font-family:
    Inter,
    "Segoe UI",
    system-ui,
    -apple-system,
    sans-serif;
}
