/* ============ 设计令牌 ============ */
/* --blue 只用于装饰（圆点、线条、光晕、描边）；蓝色文字用 --blue-ink，白字压蓝底用 --blue-fill，
   两者按主题取值，保证文字对比度 ≥ 4.5:1 */
:root {
  --blue: #1f8fff;
  --blue-2: #5cb0ff;
  --blue-deep: #0a5fd6;
  --blue-soft: rgba(31, 143, 255, 0.14);
  --blue-glow: rgba(31, 143, 255, 0.45);
  /* Logo 箭头色，仅用于品牌图形 */
  --brand-cyan: #00a0e9;

  --font: "Inter", "SF Pro Display", "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei UI", "Microsoft YaHei", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", "SF Mono", "Cascadia Code", Consolas, ui-monospace, monospace;

  --radius-s: 10px;
  --radius: 18px;
  --radius-l: 28px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-io: cubic-bezier(0.65, 0, 0.35, 1);
  --nav-h: 72px;
  --announce-h: 0px;
  --container: 1240px;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #050506;
  --bg-2: #0b0b0d;
  --surface: rgba(255, 255, 255, 0.035);
  --surface-2: rgba(255, 255, 255, 0.06);
  --solid: #111114;
  --line: rgba(255, 255, 255, 0.08);
  --line-2: rgba(255, 255, 255, 0.14);
  --text: #f5f5f7;
  --text-2: #a1a1aa;
  --text-3: #82828c;
  --invert: #0a0a0a;
  --blue-ink: #1f8fff;
  --blue-fill: #1672dd;
  --blue-press: #0a5fd6;
  --shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.8);
  --glass: rgba(18, 18, 22, 0.62);
}

html[data-theme="light"] {
  color-scheme: light;
  --bg: #f6f6f4;
  --bg-2: #ecece9;
  --surface: rgba(10, 10, 12, 0.025);
  --surface-2: rgba(10, 10, 12, 0.05);
  --solid: #ffffff;
  --line: rgba(10, 10, 12, 0.08);
  --line-2: rgba(10, 10, 12, 0.16);
  --text: #0a0a0c;
  --text-2: #52525b;
  --text-3: #66666f;
  --invert: #ffffff;
  --blue-ink: #0a5fd6;
  --blue-fill: #0a5fd6;
  --blue-press: #084fb3;
  --shadow: 0 30px 70px -32px rgba(10, 10, 20, 0.28);
  --glass: rgba(255, 255, 255, 0.72);
}

/* ============ 基础 ============ */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + var(--announce-h) + 12px);
  -webkit-text-size-adjust: 100%;
}
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  transition: background-color 0.5s var(--ease), color 0.5s var(--ease);
}
body.has-announce { --announce-h: 42px; }
body.menu-open { overflow: hidden; }

img, svg, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; }
ul, ol { list-style: none; }
::selection { background: var(--blue-fill); color: #fff; }

:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
  border-radius: 6px;
}

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.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;
}
.skip-link {
  position: fixed; left: 16px; top: -60px; z-index: 200;
  background: var(--blue-fill); color: #fff; padding: 10px 16px; border-radius: 10px;
  transition: top 0.2s;
}
.skip-link:focus { top: 12px; }

.mono { font-family: var(--mono); font-feature-settings: "tnum" 1, "zero" 1; letter-spacing: -0.01em; }
.accent-text {
  background: linear-gradient(100deg, var(--blue) 0%, var(--blue-2) 45%, var(--blue) 90%);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shimmer 6s linear infinite;
}
html[data-theme="light"] .accent-text {
  background-image: linear-gradient(100deg, var(--blue-ink) 0%, #1672dd 45%, var(--blue-ink) 90%);
}
@keyframes shimmer { to { background-position: -200% 0; } }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 40px);
}

/* 细噪点，增加质感 */
body::after {
  content: "";
  position: fixed; inset: 0; z-index: 90; pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
html[data-theme="light"] body::after { opacity: 0.05; }

/* ============ 按钮 ============ */
.btn {
  --h: 46px;
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: var(--h);
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.01em;
  white-space: nowrap;
  isolation: isolate;
  transition: transform 0.35s var(--ease), background-color 0.3s, color 0.3s, border-color 0.3s, box-shadow 0.4s var(--ease);
  will-change: transform;
}
.btn svg { width: 18px; height: 18px; transition: transform 0.35s var(--ease); }
.btn:hover svg { transform: translateX(3px); }
.btn-sm { --h: 40px; padding: 0 16px; font-size: 14px; }
.btn-lg { --h: 54px; padding: 0 28px; font-size: 16px; }

.btn-primary {
  background: var(--blue-fill);
  color: #fff;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12) inset, 0 10px 30px -10px var(--blue-glow);
  overflow: hidden;
}
.btn-primary::before {
  content: "";
  position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(120deg, transparent 30%, rgba(255, 255, 255, 0.35) 50%, transparent 70%);
  transform: translateX(-120%);
  transition: transform 0.8s var(--ease);
}
.btn-primary:hover { box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.18) inset, 0 16px 44px -10px var(--blue-glow); }
.btn-primary:hover::before { transform: translateX(120%); }
.btn-primary:active { background: var(--blue-press); }

.btn-ghost {
  color: var(--text);
  border: 1px solid var(--line-2);
  background: var(--surface);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.btn-ghost:hover { border-color: var(--text-3); background: var(--surface-2); }
.play-dot {
  display: grid; place-items: center;
  width: 26px; height: 26px; margin-left: -8px;
  border-radius: 50%;
  background: var(--text); color: var(--bg);
}
.play-dot svg { width: 12px; height: 12px; margin-left: 2px; }
.btn-ghost:hover .play-dot svg { transform: none; }

.icon-btn {
  display: grid; place-items: center;
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1px solid var(--line);
  color: var(--text-2);
  transition: color 0.25s, border-color 0.25s, background-color 0.25s;
}
.icon-btn:hover { color: var(--text); border-color: var(--line-2); background: var(--surface-2); }
.icon-btn svg { width: 18px; height: 18px; }
html[data-theme="dark"] .ico-moon, html[data-theme="light"] .ico-sun { display: none; }

/* ============ 公告条 ============ */
.announce {
  position: fixed; top: 0; left: 0; right: 0; z-index: 101;
  height: 42px;
  background: var(--blue-fill); color: #fff;
  font-size: 13.5px;
}
.announce-inner { height: 100%; display: flex; align-items: center; gap: 12px; }
.announce-dot { width: 6px; height: 6px; border-radius: 50%; background: #fff; flex: none; animation: pulse 2s infinite; }
.announce-text { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.announce-close { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; color: #fff; }
.announce-close:hover { background: rgba(255, 255, 255, 0.18); }
.announce-close svg { width: 16px; height: 16px; }

/* ============ 导航 ============ */
.nav {
  position: fixed; left: 0; right: 0; top: var(--announce-h); z-index: 100;
  height: var(--nav-h);
  transition: background-color 0.4s, border-color 0.4s, backdrop-filter 0.4s, top 0.3s;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  backdrop-filter: saturate(160%) blur(18px);
  -webkit-backdrop-filter: saturate(160%) blur(18px);
  border-bottom-color: var(--line);
}
.nav-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px; }

.brand { display: inline-flex; align-items: center; gap: 12px; }
.brand-mark {
  width: 36px; height: 36px; border-radius: 23%; flex: none;
  box-shadow: 0 0 0 1px var(--line-2);
  transition: transform 0.5s var(--ease);
}
.brand:hover .brand-mark { transform: rotate(-6deg) scale(1.05); }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font-weight: 700; font-size: 16px; letter-spacing: 0.06em; }
.brand-sub { font-family: var(--mono); font-size: 10px; letter-spacing: 0.22em; color: var(--text-3); margin-top: 3px; }

.nav-links {
  display: flex; gap: 4px;
  padding: 5px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.nav-links a {
  position: relative;
  padding: 7px 16px;
  border-radius: 999px;
  font-size: 14px;
  color: var(--text-2);
  transition: color 0.25s, background-color 0.25s;
}
.nav-links a:hover { color: var(--text); }
.nav-links a.active { color: var(--text); background: var(--surface-2); }

.nav-actions { display: flex; align-items: center; gap: 10px; }
.lang select {
  appearance: none;
  height: 40px;
  padding: 0 30px 0 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23888' stroke-width='1.5'/%3E%3C/svg%3E") no-repeat right 12px center;
  font-size: 13.5px;
  color: var(--text-2);
  cursor: pointer;
}
.lang select:hover { border-color: var(--line-2); color: var(--text); }
.lang option { background: var(--solid); color: var(--text); }

.menu-btn { display: none; flex-direction: column; gap: 4px; }
.menu-btn span { display: block; width: 16px; height: 1.6px; background: currentColor; border-radius: 2px; transition: transform 0.35s var(--ease), opacity 0.2s; }
.menu-open .menu-btn span:nth-child(1) { transform: translateY(5.6px) rotate(45deg); }
.menu-open .menu-btn span:nth-child(2) { opacity: 0; }
.menu-open .menu-btn span:nth-child(3) { transform: translateY(-5.6px) rotate(-45deg); }

/* ============ 通用分区 ============ */
.section { position: relative; padding: clamp(96px, 13vw, 160px) 0; }
.section-dark { background: var(--bg-2); }
html[data-theme="dark"] .section-dark {
  background:
    radial-gradient(1200px 500px at 85% 0%, rgba(31, 143, 255, 0.07), transparent 60%),
    var(--bg-2);
}
.section-head { max-width: 820px; margin-bottom: clamp(48px, 7vw, 80px); }
.section-head-row {
  max-width: none;
  display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; flex-wrap: wrap;
}
.kicker {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 22px;
}
.kicker span:first-child { color: var(--blue-ink); }
.kicker span:first-child::after {
  content: "";
  display: inline-block; vertical-align: middle;
  width: 28px; height: 1px; margin-left: 12px;
  background: var(--line-2);
}
.section-title {
  font-size: clamp(30px, 4.4vw, 54px);
  line-height: 1.16;
  font-weight: 700;
  letter-spacing: -0.025em;
  text-wrap: balance;
}
.section-sub {
  margin-top: 22px;
  font-size: clamp(16px, 1.4vw, 18px);
  color: var(--text-2);
  max-width: 640px;
  text-wrap: pretty;
}

/* ============ 入场动画 ============ */
.js .reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 1s var(--ease), transform 1s var(--ease);
}
.js .reveal.in { opacity: 1; transform: none; }

/* ============ 指针光晕 ============ */
.cursor-glow {
  position: fixed; left: -300px; top: -300px; z-index: 0;
  width: 600px; height: 600px;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(circle, rgba(31, 143, 255, 0.09), transparent 62%);
  opacity: 0;
  transition: opacity 0.6s;
}
.cursor-glow.on { opacity: 1; }
html[data-theme="light"] .cursor-glow { background: radial-gradient(circle, rgba(31, 143, 255, 0.08), transparent 62%); }
main, .footer { position: relative; z-index: 1; }

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(31, 143, 255, 0.6); }
  70% { box-shadow: 0 0 0 8px rgba(31, 143, 255, 0); }
  100% { box-shadow: 0 0 0 0 rgba(31, 143, 255, 0); }
}

/* ============ 响应式：导航 ============ */
@media (max-width: 960px) {
  .menu-btn { display: flex; }
  .nav-cta { display: none; }
  .nav-links {
    position: fixed;
    top: calc(var(--nav-h) + var(--announce-h)); left: 0; right: 0; bottom: 0;
    flex-direction: column; gap: 0;
    padding: 24px clamp(20px, 4vw, 40px);
    border: 0; border-radius: 0;
    background: var(--bg);
    backdrop-filter: none;
    opacity: 0; visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.3s var(--ease), transform 0.3s var(--ease), visibility 0.3s;
  }
  .menu-open .nav-links { opacity: 1; visibility: visible; transform: none; }
  .nav-links a {
    padding: 18px 0;
    border-radius: 0;
    border-bottom: 1px solid var(--line);
    font-size: 22px; font-weight: 600;
    color: var(--text);
  }
  .nav-links a.active { background: none; color: var(--blue-ink); }
  .menu-open .nav { background: var(--bg); }
}
@media (max-width: 520px) {
  .brand-sub { display: none; }
  .lang select { padding: 0 26px 0 10px; font-size: 13px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
