/* ========== 布局变量 ========== */
:root {
  --container: 1080px;
  --narrow: 720px;
  --radius: 8px;
  --radius-lg: 12px;
  --space-xs: 8px;
  --space-sm: 16px;
  --space-md: 24px;
  --space-lg: 48px;
  --space-xl: 80px;

  /* 亮色主题色阶 */
  --bg: #ffffff;
  --bg-alt: #f5f5f5;
  --bg-card: #ffffff;
  --text: #1a1a1a;
  --text-muted: #6b6b6b;
  --border: #e5e5e5;
  --primary: #1a1a1a;
  --on-primary: #ffffff;

  /* 液态玻璃变量 */
  --glass-bg: rgba(26, 26, 26, 0.04);
  --glass-bg-hover: rgba(26, 26, 26, 0.08);
  --glass-border: rgba(26, 26, 26, 0.1);
  --glass-highlight: rgba(255, 255, 255, 0.7);
  --glass-shadow: rgba(0, 0, 0, 0.06);
  --glass-primary-bg: rgba(26, 26, 26, 0.85);
  --glass-primary-border: rgba(26, 26, 26, 0.9);
  --glass-primary-highlight: rgba(255, 255, 255, 0.22);
}

[data-theme="dark"] {
  --bg: #121212;
  --bg-alt: #1a1a1a;
  --bg-card: #1e1e1e;
  --text: #f0f0f0;
  --text-muted: #9a9a9a;
  --border: #2e2e2e;
  --primary: #f0f0f0;
  --on-primary: #121212;

  /* 液态玻璃变量（暗色） */
  --glass-bg: rgba(240, 240, 240, 0.05);
  --glass-bg-hover: rgba(240, 240, 240, 0.1);
  --glass-border: rgba(240, 240, 240, 0.12);
  --glass-highlight: rgba(255, 255, 255, 0.12);
  --glass-shadow: rgba(0, 0, 0, 0.3);
  --glass-primary-bg: rgba(240, 240, 240, 0.9);
  --glass-primary-border: rgba(240, 240, 240, 0.95);
  --glass-primary-highlight: rgba(255, 255, 255, 0.5);
}

/* ========== 基础重置 ========== */
* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  transition: background 0.25s ease, color 0.25s ease;
}

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

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.container.narrow { max-width: var(--narrow); }

/* ========== 导航栏 ========== */
.navbar {
  position: sticky;
  top: 0;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  z-index: 100;
}

.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.nav-links {
  display: flex;
  gap: var(--space-md);
}

.nav-links a {
  color: var(--text-muted);
  font-size: 14px;
  transition: color 0.2s;
}

.nav-links a:hover { color: var(--text); }

.nav-actions { display: flex; align-items: center; gap: var(--space-xs); }

.icon-btn {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  color: var(--text);
  cursor: pointer;
  box-shadow:
    inset 0 1px 0 var(--glass-highlight),
    inset 0 -1px 0 var(--glass-shadow);
  transition: transform 0.2s ease, background 0.2s ease;
}

.icon-btn:hover {
  transform: translateY(-1px);
  background: var(--glass-bg-hover);
}

.hamburger { display: none; }

/* 主题切换：亮/暗图标互斥显示 */
[data-theme="dark"] .icon-sun { display: block; }
[data-theme="dark"] .icon-moon { display: none; }
.icon-sun { display: none; }
.icon-moon { display: block; }

.icon { width: 18px; height: 18px; }

/* ========== Hero ========== */
.hero {
  padding: var(--space-xl) 0;
  text-align: center;
}

.hero-title {
  font-size: 56px;
  font-weight: 700;
  letter-spacing: -1px;
  margin-bottom: var(--space-sm);
}

.hero-subtitle {
  font-size: 18px;
  color: var(--text-muted);
  margin-bottom: var(--space-lg);
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: var(--space-sm);
}

/* ========== 按钮：液态玻璃（无高斯模糊） ========== */
.btn {
  display: inline-block;
  padding: 11px 24px;
  border-radius: 14px;
  font-size: 14px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  position: relative;
}

/* 主按钮：深色/浅色玻璃（CTA） */
.btn-primary {
  background: var(--glass-primary-bg);
  color: var(--on-primary);
  border-color: var(--glass-primary-border);
  box-shadow:
    inset 0 1px 0 var(--glass-primary-highlight),
    inset 0 -1px 0 rgba(0, 0, 0, 0.2),
    0 1px 2px rgba(0, 0, 0, 0.08);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.32),
    inset 0 -1px 0 rgba(0, 0, 0, 0.2),
    0 4px 12px rgba(0, 0, 0, 0.12);
}

/* 次按钮：半透明玻璃 */
.btn-ghost {
  background: var(--glass-bg);
  border-color: var(--glass-border);
  color: var(--text);
  box-shadow:
    inset 0 1px 0 var(--glass-highlight),
    inset 0 -1px 0 var(--glass-shadow);
}

.btn-ghost:hover {
  transform: translateY(-1px);
  background: var(--glass-bg-hover);
}

/* ========== 顶部滚动进度条 ========== */
.progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 0%;
  background: var(--primary);
  z-index: 200;
  transition: width 0.1s linear;
}

/* ========== Hero 线性流程 ========== */
.flow {
  margin-top: var(--space-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
}

.flow-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-xs);
}

.flow-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-muted);
}

.flow-label {
  font-size: 12px;
  color: var(--text-muted);
}

.flow-line {
  position: relative;
  width: 80px;
  height: 1px;
  background: var(--border);
  margin: 0 var(--space-xs);
  margin-bottom: 22px;
  overflow: hidden;
}

.flow-dot-runner {
  position: absolute;
  top: -2px;
  left: 0;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--text);
  animation: flow-run 2.4s linear infinite;
}

@keyframes flow-run {
  0%   { left: 0; opacity: 0; }
  15%  { opacity: 1; }
  85%  { opacity: 1; }
  100% { left: calc(100% - 5px); opacity: 0; }
}

/* ========== 通用区块 ========== */
.section {
  padding: var(--space-xl) 0;
}

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

.section-title {
  font-size: 28px;
  font-weight: 600;
  text-align: center;
  margin-bottom: var(--space-lg);
}

.paragraph {
  color: var(--text-muted);
  font-size: 16px;
  text-align: center;
}

/* ========== 网格与卡片 ========== */
.grid {
  display: grid;
  gap: var(--space-md);
}

.grid-3 { grid-template-columns: repeat(3, 1fr); }

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
}

.card-icon {
  width: 28px;
  height: 28px;
  color: var(--text);
  margin-bottom: var(--space-sm);
}

.card h3 {
  font-size: 18px;
  margin-bottom: var(--space-xs);
}

.card p {
  color: var(--text-muted);
  font-size: 14px;
}

/* ========== 页脚 ========== */
.footer {
  border-top: 1px solid var(--border);
  padding: var(--space-md) 0;
  font-size: 14px;
  color: var(--text-muted);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-links a:hover { color: var(--text); }

/* ========== 响应式 ========== */
@media (max-width: 720px) {
  .grid-3 { grid-template-columns: 1fr; }
  .hero-title { font-size: 40px; }

  .hamburger { display: inline-flex; }

  .nav-links {
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: var(--space-md);
    gap: var(--space-sm);
    display: none;
  }

  .nav-links.open { display: flex; }
}
