/* ============================================================
   首页模板 · 经典商务（classic）
   自包含样式：无外部依赖 · 浅色/深色自适应（跟随系统 + 手动切换）
   ============================================================ */

/* ── 设计变量 ─────────────────────────────────────────── */
:root {
  --bg: #f5f7fd;
  --panel: #ffffff;
  --panel-2: #f7f8fa;
  --text-1: #1d2129;
  --text-2: #4e5969;
  --text-3: #86909c;
  --text-4: #c9cdd4;
  --border: #e5e6eb;

  --primary: #1659ff;
  --primary-strong: #0e42d2;
  --primary-tint: #e8f3ff;
  --purple: #722ed1;
  --purple-tint: #f5f0ff;
  --green: #00b42a;
  --green-tint: #e8ffea;
  --orange: #ff7d00;
  --orange-tint: #fff3e8;
  --red: #f53f3f;
  --cyan: #14c9c9;
  --cyan-tint: #e8fffb;

  --shadow-sm: 0 1px 4px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 14px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.1);
  --radius: 12px;
  --radius-sm: 8px;
  --container: 1200px;
}

[data-theme='dark'] {
  --bg: #17171a;
  --panel: #232326;
  --panel-2: #2b2b2e;
  --text-1: #f7f8fa;
  --text-2: #c9cdd4;
  --text-3: #86909c;
  --text-4: #6b6e75;
  --border: #3a3a3d;

  --primary: #3c7eff;
  --primary-strong: #5c93ff;
  --primary-tint: rgba(60, 126, 255, 0.14);
  --purple: #9a6cff;
  --purple-tint: rgba(154, 108, 255, 0.14);
  --green: #23c343;
  --green-tint: rgba(35, 195, 67, 0.14);
  --orange: #ff9a2e;
  --orange-tint: rgba(255, 154, 46, 0.14);
  --red: #f76560;
  --cyan: #29cdd0;
  --cyan-tint: rgba(41, 205, 208, 0.14);

  --shadow-sm: 0 1px 4px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 14px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.45);
}

/* 无 JS 时跟随系统偏好（JS 就绪后由 data-theme 接管） */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --bg: #17171a;
    --panel: #232326;
    --panel-2: #2b2b2e;
    --text-1: #f7f8fa;
    --text-2: #c9cdd4;
    --text-3: #86909c;
    --text-4: #6b6e75;
    --border: #3a3a3d;
    --primary: #3c7eff;
    --primary-strong: #5c93ff;
    --primary-tint: rgba(60, 126, 255, 0.14);
    --purple: #9a6cff;
    --purple-tint: rgba(154, 108, 255, 0.14);
    --green: #23c343;
    --green-tint: rgba(35, 195, 67, 0.14);
    --orange: #ff9a2e;
    --orange-tint: rgba(255, 154, 46, 0.14);
    --red: #f76560;
    --cyan: #29cdd0;
    --cyan-tint: rgba(41, 205, 208, 0.14);
    --shadow-sm: 0 1px 4px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 14px rgba(0, 0, 0, 0.35);
    --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.45);
  }
}

/* ── 基础 ─────────────────────────────────────────────── */
* { padding: 0; margin: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC',
    'Hiragino Sans GB', 'Microsoft YaHei', 'Helvetica Neue', Arial, sans-serif;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-2);
  background-color: var(--bg);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizelegibility;
  transition: background-color 0.25s ease, color 0.25s ease;
}

a { color: inherit; text-decoration: none; cursor: pointer; }
ul, ol { list-style: none; }
img { max-width: 100%; display: block; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 16px;
}

.icon {
  width: 1.15em;
  height: 1.15em;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  vertical-align: -0.2em;
  flex-shrink: 0;
}

.icon-xs { width: 0.95em; height: 0.95em; stroke-width: 2.5; }

/* ── 按钮 ─────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  padding: 8px 18px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-1);
  background-color: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn:hover { border-color: var(--primary); color: var(--primary); }

.btn-primary {
  color: #fff;
  background-color: var(--primary);
  border-color: var(--primary);
}

.btn-primary:hover {
  color: #fff;
  background-color: var(--primary-strong);
  border-color: var(--primary-strong);
  box-shadow: 0 4px 14px rgba(22, 89, 255, 0.35);
}

.btn-text {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
  color: var(--text-2);
}

.btn-text:hover { color: var(--primary); }

.btn-lg { padding: 11px 24px; font-size: 15px; }
.btn-sm { padding: 6px 14px; font-size: 13px; }

/* ── 顶部导航 ─────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--panel);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.header-inner {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}

.brand {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-shrink: 0;
}

.brand-mark {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--primary), var(--purple));
  box-shadow: 0 4px 10px rgba(22, 89, 255, 0.35);
}

.brand-mark::after {
  content: '¥';
  display: flex;
  align-items: center;
  justify-content: center;
  height: 30px;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
}

/* 后台设置的站点 Logo（assets/img/logo.png），加载失败回退 brand-mark 占位符 */
.brand-logo {
  height: 48px;
  max-width: 240px;
  object-fit: contain;
}

.brand-name {
  font-size: 17px;
  font-weight: 600;
  color: var(--text-1);
}

.site-nav {
  display: flex;
  gap: 4px;
  flex: 1;
  justify-content: center;
}

.site-nav a {
  position: relative;
  padding: 6px 14px;
  font-size: 14px;
  color: var(--text-2);
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
}

.site-nav a:hover { color: var(--text-1); background-color: var(--panel-2); }

.site-nav a[aria-current='page'] { color: var(--primary); font-weight: 600; }

.site-nav a[aria-current='page']::after {
  content: '';
  position: absolute;
  bottom: -14px;
  left: 50%;
  width: 16px;
  height: 3px;
  background-color: var(--primary);
  border-radius: 2px;
  transform: translateX(-50%);
}

.header-actions { display: flex; gap: 10px; align-items: center; flex-shrink: 0; }

.theme-toggle {
  width: 32px;
  height: 32px;
  font-size: 15px;
  line-height: 1;
  color: var(--text-2);
  background-color: transparent;
  border: 1px solid var(--border);
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.2s ease;
}

.theme-toggle:hover { color: var(--primary); border-color: var(--primary); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  width: 34px;
  height: 34px;
  padding: 8px 7px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.nav-toggle-bar {
  display: block;
  width: 100%;
  height: 2px;
  background-color: var(--text-2);
  border-radius: 1px;
}

/* ── Hero ─────────────────────────────────────────────── */
.hero {
  position: relative;
  display: flex;
  gap: 40px;
  align-items: center;
  justify-content: space-between;
  padding: 48px 0 40px;
  overflow: hidden;
}

.hero-glow {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.hero-glow-1 {
  top: -140px;
  right: -60px;
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, rgba(22, 89, 255, 0.14) 0%, transparent 70%);
}

.hero-glow-2 {
  bottom: -160px;
  left: -80px;
  width: 360px;
  height: 360px;
  background: radial-gradient(circle, rgba(114, 46, 209, 0.1) 0%, transparent 70%);
}

.hero-content { position: relative; flex: 1; min-width: 0; }

.hero-badge {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  padding: 4px 12px;
  margin-bottom: 20px;
  font-size: 13px;
  color: var(--green);
  background-color: var(--green-tint);
  border-radius: 100px;
}

.badge-dot {
  width: 7px;
  height: 7px;
  background-color: var(--green);
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(0, 180, 42, 0.4); }
  50% { box-shadow: 0 0 0 5px rgba(0, 180, 42, 0); }
}

.hero-title {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0 0 14px;
}

.title-brand {
  font-size: 42px;
  font-weight: 700;
  line-height: 1.2;
  background: linear-gradient(120deg, var(--primary), var(--purple));
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.title-sub {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-2);
}

.hero-desc {
  max-width: 560px;
  margin: 0 0 26px;
  font-size: 15px;
  line-height: 1.8;
  color: var(--text-3);
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }

.hero-meta {
  display: flex;
  gap: 40px;
  margin-top: 30px;
  flex-wrap: wrap;
}

.meta-item { display: flex; flex-direction: column; gap: 2px; }

.meta-value {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-1);
}

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

.hero-visual {
  position: relative;
  flex-shrink: 0;
}

.hero-card {
  width: 360px;
  max-width: 100%;
  background-color: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
}

.hero-card-head {
  display: flex;
  gap: 6px;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.dot-green { background: var(--green); }
.dot-yellow { background: var(--orange); }
.dot-red { background: var(--red); }

.hero-card-title {
  margin-left: 8px;
  font-size: 13px;
  color: var(--text-3);
}

.hero-card-body { padding: 16px; }

.pay-row {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  margin-bottom: 8px;
  background-color: var(--panel-2);
  border-radius: var(--radius-sm);
}

.pay-row img {
  width: 28px;
  height: 28px;
  border-radius: 6px;
}

.pay-info {
  display: flex;
  flex: 1;
  justify-content: space-between;
}

.pay-name {
  font-size: 14px;
  color: var(--text-1);
}

.pay-status {
  font-size: 12px;
  color: var(--text-3);
}

.pay-status.ok { color: var(--green); }

.pay-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  padding: 12px 12px 2px;
  font-size: 12px;
  color: var(--text-3);
}

.pay-trust span {
  display: inline-flex;
  gap: 4px;
  align-items: center;
}

.pay-trust .icon-xs { color: var(--green); }

/* ── 数据概览 ─────────────────────────────────────────── */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.stat-card {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 18px 20px;
  background-color: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.stat-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  font-size: 20px;
  border-radius: 10px;
}

.stat-icon .icon { width: 22px; height: 22px; }

.stat-green { color: var(--green); background-color: var(--green-tint); }
.stat-blue { color: var(--primary); background-color: var(--primary-tint); }
.stat-orange { color: var(--orange); background-color: var(--orange-tint); }
.stat-purple { color: var(--purple); background-color: var(--purple-tint); }

.stat-body { display: flex; flex-direction: column; }

.stat-value {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-1);
  line-height: 1.3;
}

.stat-value em {
  font-style: normal;
  font-size: 12px;
  font-weight: 400;
  margin-left: 2px;
}

.stat-title {
  font-size: 12px;
  color: var(--text-3);
}

/* ── 区块标题 ─────────────────────────────────────────── */
.section-head {
  margin-bottom: 24px;
  text-align: center;
}

.section-head h2 {
  margin: 0 0 6px;
  font-size: 26px;
  font-weight: 700;
  color: var(--text-1);
}

.section-head p {
  margin: 0;
  font-size: 14px;
  color: var(--text-3);
}

/* ── 特性矩阵 ─────────────────────────────────────────── */
.features { margin-top: 48px; }

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.feature-card {
  padding: 24px;
  background-color: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: all 0.25s ease;
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary);
}

.feature-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  margin-bottom: 14px;
  border-radius: 10px;
}

.feature-icon .icon { width: 24px; height: 24px; }

.fi-green { color: var(--green); background-color: var(--green-tint); }
.fi-blue { color: var(--primary); background-color: var(--primary-tint); }
.fi-cyan { color: var(--cyan); background-color: var(--cyan-tint); }
.fi-orange { color: var(--orange); background-color: var(--orange-tint); }
.fi-purple { color: var(--purple); background-color: var(--purple-tint); }
.fi-red { color: var(--red); background-color: rgba(245, 63, 63, 0.12); }

[data-theme='dark'] .fi-red { background-color: rgba(247, 101, 96, 0.14); }

.feature-card h3 {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 600;
  color: var(--text-1);
}

.feature-card p {
  margin: 0;
  font-size: 13px;
  line-height: 1.7;
  color: var(--text-3);
}

/* ── 接入流程（桌面横向 / 移动纵向）──────────────────── */
.workflow {
  margin-top: 48px;
  padding: 32px 24px 8px;
  background-color: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  padding: 8px 16px 24px;
}

.step {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 12px 8px;
  text-align: center;
}

/* 横向连接线：节点之间的虚线（首步除外） */
.step::before {
  content: '';
  position: absolute;
  top: 32px;
  right: calc(50% + 34px);
  left: calc(-50% - 8px);
  height: 0;
  border-top: 2px dashed var(--border);
}

.step:first-child::before { display: none; }

.step-node {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  font-size: 17px;
  font-weight: 700;
  color: var(--primary);
  background-color: var(--primary-tint);
  border: 2px solid var(--primary);
  border-radius: 50%;
  z-index: 1;
}

.step-body h3 {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-1);
}

.step-body p {
  margin: 0;
  font-size: 13px;
  color: var(--text-3);
}

/* ── CTA ──────────────────────────────────────────────── */
.cta {
  padding: 48px 16px 24px;
  margin-top: 48px;
  margin-bottom: 8px;
  text-align: center;
  background: linear-gradient(135deg, var(--primary-tint), var(--purple-tint));
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.cta h2 {
  margin: 0 0 8px;
  font-size: 26px;
  font-weight: 700;
  color: var(--text-1);
}

.cta p {
  margin: 0 0 22px;
  font-size: 14px;
  color: var(--text-3);
}

.cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

/* ── 页脚 ─────────────────────────────────────────────── */
.site-footer {
  padding: 24px 16px;
  margin-top: 40px;
  background-color: var(--panel);
  border-top: 1px solid var(--border);
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  font-size: 13px;
  color: var(--text-3);
}

.footer-brand {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-2);
}

.footer-links {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
}

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

.footer-copy {
  font-size: 12px;
  color: var(--text-4);
}

/* ── 响应式 ───────────────────────────────────────────── */
@media (max-width: 992px) {
  .hero { flex-direction: column; align-items: stretch; gap: 24px; }
  .hero-visual { display: flex; justify-content: center; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .site-nav {
    display: none;
    position: absolute;
    top: 60px;
    right: 0;
    left: 0;
    flex-direction: column;
    gap: 0;
    padding: 8px 16px 12px;
    background-color: var(--panel);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-md);
  }

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

  .site-nav a { padding: 10px 12px; text-align: left; }

  .site-nav a[aria-current='page']::after { display: none; }

  .nav-toggle { display: flex; }

  .title-brand { font-size: 32px; }

  .title-sub { font-size: 16px; }

  .hero { padding: 32px 0 24px; }

  .hero-meta { gap: 20px; }

  .hero-card { width: 100%; }

  .stats { grid-template-columns: repeat(2, 1fr); gap: 12px; }

  .stat-card { padding: 14px 16px; }

  .stat-value { font-size: 18px; }

  .feature-grid { grid-template-columns: 1fr; }

  .workflow { padding: 24px 12px 0; }

  /* 步骤条改纵向：连接线转为左侧竖线，彻底规避横向溢出 */
  .steps {
    grid-template-columns: 1fr;
    gap: 0;
    max-width: 420px;
    margin: 0 auto;
    padding: 8px 8px 20px;
  }

  .step {
    position: relative;
    flex-direction: row;
    gap: 16px;
    padding: 14px 8px;
    text-align: left;
  }

  .step::before {
    top: 22px;
    bottom: calc(-100% + 22px);
    left: 30px;
    right: auto;
    width: 0;
    height: auto;
    border-top: 0;
    border-left: 2px dashed var(--border);
  }

  .step:last-child::before { display: none; }

  .step-body h3 { margin-bottom: 2px; }

  .cta { padding: 36px 12px 20px; }

  .cta h2 { font-size: 22px; }
}

@media (max-width: 480px) {
  .brand-logo { height: 34px; max-width: 170px; }
  .hero-actions .btn { flex: 1; min-width: 140px; }

  .hero-meta { gap: 16px; }

  .meta-value { font-size: 18px; }

  .stats { grid-template-columns: 1fr 1fr; }
}

/* ── 无障碍：键盘焦点可见 ─────────────────────────────── */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: 4px;
}
