/* ==========================================================
   迅胜卡密 · 官网样式（动效强化版）
   ========================================================== */
:root {
  --brand: #3b5bdb;
  --brand-2: #4c6ef5;
  --brand-3: #7048e8;
  --cyan: #22d3ee;
  --dark: #0b1120;
  --dark-2: #131c31;
  --text: #0f172a;
  --muted: #64748b;
  --border: #e2e8f0;
  --bg: #ffffff;
  --bg-alt: #f7f9fc;
  --radius: 16px;
  --ease: cubic-bezier(.22, 1, .36, 1);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; color: var(--text); background: var(--bg); line-height: 1.7;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC',
    'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 22px; }
.center { text-align: center; }
.muted { color: var(--muted); }

/* ---------- 光标跟随光晕 ---------- */
#cursor-glow {
  position: fixed; width: 420px; height: 420px; border-radius: 50%;
  pointer-events: none; z-index: 0; opacity: 0; transition: opacity .4s;
  background: radial-gradient(circle, rgba(76,110,245,.13), transparent 65%);
  transform: translate(-50%, -50%);
}
body.has-pointer #cursor-glow { opacity: 1; }

/* ---------- 顶部进度条 ---------- */
#progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 0; z-index: 99;
  background: linear-gradient(90deg, var(--brand-2), var(--brand-3), var(--cyan));
  box-shadow: 0 0 12px rgba(76,110,245,.6);
  transition: width .08s linear;
}

/* ---------- 导航 ---------- */
.nav {
  position: sticky; top: 0; z-index: 60;
  background: rgba(255,255,255,.8);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: box-shadow .3s, border-color .3s, background .3s;
}
.nav.scrolled {
  box-shadow: 0 6px 30px rgba(15,23,42,.07);
  border-bottom-color: var(--border);
  background: rgba(255,255,255,.92);
}
.nav .wrap { display: flex; align-items: center; gap: 22px; height: 66px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 17px; }
.logo {
  width: 32px; height: 32px; border-radius: 9px; display: inline-flex;
  align-items: center; justify-content: center; color: #fff; font-size: 16px;
  background: linear-gradient(135deg, var(--brand-2), var(--brand-3));
  background-size: 200% 200%;
  animation: gradFlow 6s ease infinite;
  box-shadow: 0 4px 14px rgba(76,110,245,.35);
}
@keyframes gradFlow {
  0%,100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}
.nav .links { display: flex; gap: 6px; margin-left: auto; }
.nav .links a {
  color: var(--muted); font-size: 14.5px; padding: 8px 12px; border-radius: 8px;
  position: relative; transition: color .2s, background .2s;
}
.nav .links a::after {
  content: ''; position: absolute; left: 12px; right: 12px; bottom: 4px; height: 2px;
  background: var(--brand); border-radius: 2px; transform: scaleX(0);
  transform-origin: left; transition: transform .28s var(--ease);
}
.nav .links a:hover { color: var(--brand); background: #f1f5ff; }
.nav .links a:hover::after { transform: scaleX(1); }
.nav .actions { display: flex; gap: 10px; }

/* ---------- 按钮（含光泽扫过） ---------- */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  padding: 10px 20px; border-radius: 10px; font-size: 14.5px; font-weight: 500;
  border: 1px solid transparent; cursor: pointer; white-space: nowrap;
  transition: transform .22s var(--ease), box-shadow .25s, background .25s, border-color .25s, color .25s;
  overflow: hidden;
}
.btn-primary {
  background: linear-gradient(120deg, var(--brand-2), var(--brand));
  color: #fff; box-shadow: 0 6px 18px rgba(59,91,219,.28);
}
.btn-primary::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,.42), transparent 70%);
  transform: translateX(-120%);
}
.btn-primary:hover::before { transform: translateX(120%); transition: transform .7s var(--ease); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(59,91,219,.36); }
.btn-ghost { border-color: var(--border); color: var(--text); background: #fff; }
.btn-ghost:hover { border-color: var(--brand); color: var(--brand); transform: translateY(-2px); box-shadow: 0 8px 20px rgba(15,23,42,.07); }
.btn-light { background: #fff; color: var(--brand); }
.btn-light:hover { background: #eef2ff; transform: translateY(-2px); box-shadow: 0 12px 26px rgba(0,0,0,.18); }
.btn-lg { padding: 14px 30px; font-size: 16px; border-radius: 12px; }
.btn:active { transform: translateY(0) scale(.98); }

/* ---------- Hero ---------- */
.hero {
  position: relative; padding: 96px 0 76px; text-align: center; overflow: hidden;
  background: linear-gradient(180deg, #fff 0%, var(--bg-alt) 100%);
}
.hero .orb {
  position: absolute; border-radius: 50%; filter: blur(60px); opacity: .55;
  animation: float 14s ease-in-out infinite;
}
.hero .orb.o1 { width: 420px; height: 420px; background: #a5b4fc; top: -120px; left: -80px; }
.hero .orb.o2 { width: 360px; height: 360px; background: #c4b5fd; top: -60px; right: -60px; animation-delay: -4s; }
.hero .orb.o3 { width: 300px; height: 300px; background: #a5f3fc; bottom: -140px; left: 42%; opacity: .4; animation-delay: -8s; }
@keyframes float {
  0%,100% { transform: translate(0,0) scale(1); }
  33% { transform: translate(26px,-22px) scale(1.06); }
  66% { transform: translate(-20px,18px) scale(.96); }
}
.hero .wrap { position: relative; z-index: 2; }
.hero .pill {
  display: inline-flex; align-items: center; gap: 8px; margin-bottom: 22px;
  padding: 7px 16px; border-radius: 999px; font-size: 13.5px; color: var(--brand);
  background: rgba(76,110,245,.1); border: 1px solid rgba(76,110,245,.22);
}
.hero .pill .dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--brand);
  animation: pulse 1.8s ease-in-out infinite;
}
@keyframes pulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(59,91,219,.55); }
  70% { box-shadow: 0 0 0 9px rgba(59,91,219,0); }
}
.hero h1 { font-size: 50px; line-height: 1.22; margin: 0 0 20px; letter-spacing: -1px; }
.grad {
  background: linear-gradient(100deg, var(--brand-2), var(--brand-3), var(--cyan), var(--brand-2));
  background-size: 300% auto;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: gradText 7s linear infinite;
}
@keyframes gradText { to { background-position: 300% center; } }
.hero .sub { color: var(--muted); font-size: 17.5px; max-width: 660px; margin: 0 auto 32px; }
.hero .sub .caret {
  display: inline-block; width: 2px; height: 1.05em; vertical-align: -2px;
  background: var(--brand); margin-left: 2px; animation: blink 1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }
.cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* Hero 可视化：卡密验证流程动画 */
.flow-card {
  position: relative; margin: 60px auto 0; max-width: 780px; padding: 26px 26px 22px;
  background: linear-gradient(180deg, #ffffff, #f8faff);
  border: 1px solid var(--border); border-radius: 20px;
  box-shadow: 0 26px 60px rgba(15,23,42,.12);
}
.flow-card .bar { display: flex; gap: 7px; margin-bottom: 18px; }
.flow-card .bar i { width: 11px; height: 11px; border-radius: 50%; background: #e2e8f0; }
.flow-card .bar i:nth-child(1) { background: #ff5f57; }
.flow-card .bar i:nth-child(2) { background: #febc2e; }
.flow-card .bar i:nth-child(3) { background: #28c840; }
.flow-line { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.flow-node {
  flex: 1; text-align: center; padding: 14px 8px; border-radius: 12px;
  background: #fff; border: 1px solid var(--border); font-size: 13.5px;
  transition: border-color .3s, box-shadow .3s;
}
.flow-node b { display: block; font-size: 20px; margin-bottom: 4px; }
.flow-node.active { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(76,110,245,.12); }
.flow-arrow { color: #cbd5e1; font-size: 18px; }
.flow-packet {
  position: absolute; top: -6px; left: 8%; width: 9px; height: 9px; border-radius: 50%;
  background: var(--brand); box-shadow: 0 0 12px rgba(59,91,219,.9);
  animation: packet 4s var(--ease) infinite;
}
@keyframes packet {
  0% { left: 8%; opacity: 0; }
  10% { opacity: 1; }
  46% { left: 60%; }
  54% { left: 60%; }
  90% { left: 88%; opacity: 1; }
  100% { left: 90%; opacity: 0; }
}
.flow-out {
  margin-top: 16px; text-align: left; font-family: Consolas, Monaco, monospace;
  font-size: 13px; background: #0b1120; color: #7ee787; padding: 12px 14px;
  border-radius: 10px; overflow: hidden; white-space: nowrap;
}
.flow-out .dim { color: #6b7a90; }

/* ---------- 统计数字 ---------- */
.stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px;
  margin-top: 58px; padding-top: 34px; border-top: 1px solid var(--border);
  position: relative; z-index: 2;
}
.stats b {
  display: block; font-size: 34px; font-weight: 800; letter-spacing: -1px;
  background: linear-gradient(120deg, var(--brand-2), var(--brand-3));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.stats span { color: var(--muted); font-size: 14px; }

/* ---------- 区块 ---------- */
.section { padding: 84px 0; position: relative; }
.section.alt { background: var(--bg-alt); }
.section h2 { font-size: 34px; text-align: center; margin: 0 0 10px; letter-spacing: -.6px; }
.sec-sub { text-align: center; color: var(--muted); margin: 0 0 48px; font-size: 16px; }
.section .tag {
  display: block; width: fit-content; margin: 0 auto 14px; padding: 5px 14px;
  font-size: 12.5px; letter-spacing: 1px; color: var(--brand);
  background: rgba(76,110,245,.09); border-radius: 999px;
}

/* ---------- 功能卡（3D 倾斜 + 光泽） ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(258px, 1fr)); gap: 20px; }
.card {
  position: relative; background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius); padding: 26px 24px;
  transition: transform .3s var(--ease), box-shadow .3s, border-color .3s;
  transform-style: preserve-3d; overflow: hidden;
}
.card::after {
  content: ''; position: absolute; top: 0; left: -60%; width: 45%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.85), transparent);
  transform: skewX(-18deg); opacity: 0;
}
.card:hover::after { animation: shine .85s var(--ease); }
@keyframes shine {
  0% { left: -60%; opacity: .9; }
  100% { left: 130%; opacity: 0; }
}
.card:hover { border-color: #c7d2fe; box-shadow: 0 22px 46px rgba(59,91,219,.14); }
.card .ico {
  width: 46px; height: 46px; border-radius: 12px; font-size: 22px; margin-bottom: 14px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #eef2ff, #e0e7ff);
  transition: transform .35s var(--ease);
}
.card:hover .ico { transform: translateZ(24px) scale(1.08) rotate(-4deg); }
.card h3 { margin: 0 0 8px; font-size: 17px; }
.card p { margin: 0; color: var(--muted); font-size: 14.5px; }

/* ---------- 步骤（脉冲圆环） ---------- */
.steps { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-bottom: 44px; }
.steps::before {
  content: ''; position: absolute; top: 47px; left: 16%; right: 16%; height: 2px;
  background: repeating-linear-gradient(90deg, #c7d2fe 0 8px, transparent 8px 16px);
}
.step {
  position: relative; background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius); padding: 28px 24px; text-align: center;
  transition: transform .3s var(--ease), box-shadow .3s;
}
.step:hover { transform: translateY(-6px); box-shadow: 0 22px 44px rgba(15,23,42,.1); }
.step .num {
  position: relative; width: 46px; height: 46px; border-radius: 50%; margin: 0 auto 16px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--brand-2), var(--brand-3));
  color: #fff; font-weight: 700; font-size: 19px;
  box-shadow: 0 8px 20px rgba(76,110,245,.32);
}
.step .num::after {
  content: ''; position: absolute; inset: -6px; border-radius: 50%;
  border: 2px solid rgba(76,110,245,.25); animation: ring 2.6s ease-out infinite;
}
.step:nth-child(2) .num::after { animation-delay: .5s; }
.step:nth-child(3) .num::after { animation-delay: 1s; }
@keyframes ring {
  0% { transform: scale(.9); opacity: .9; }
  100% { transform: scale(1.5); opacity: 0; }
}
.step h3 { margin: 0 0 8px; font-size: 17px; }
.step p { margin: 0; color: var(--muted); font-size: 14.5px; }

/* ---------- FAQ ---------- */
.faq { max-width: 800px; margin: 0 auto; }
.faq details {
  background: #fff; border: 1px solid var(--border); border-radius: 12px;
  padding: 17px 22px; margin-bottom: 12px; transition: border-color .25s, box-shadow .25s;
}
.faq details:hover { border-color: #c7d2fe; box-shadow: 0 8px 24px rgba(59,91,219,.07); }
.faq summary {
  cursor: pointer; font-weight: 600; outline: none; list-style: none;
  display: flex; justify-content: space-between; align-items: center;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '＋'; color: var(--brand); transition: transform .3s var(--ease); }
.faq details[open] summary::after { transform: rotate(135deg); }
.faq details[open] { border-color: #c7d2fe; }
.faq p { margin: 10px 0 0; color: var(--muted); font-size: 14.5px; animation: fadeIn .35s var(--ease); }
@keyframes fadeIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

/* ---------- CTA 带（流光） ---------- */
.cta-band {
  position: relative; padding: 76px 0; text-align: center; color: #fff; overflow: hidden;
  background: linear-gradient(120deg, #1b2542, var(--brand), var(--brand-3), #1b2542);
  background-size: 300% 300%; animation: bandFlow 12s ease infinite;
}
@keyframes bandFlow {
  0%,100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}
.cta-band::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(circle at 20% 30%, rgba(255,255,255,.16), transparent 45%);
}
.cta-band .wrap { position: relative; z-index: 2; }
.cta-band h2 { margin: 0 0 10px; font-size: 32px; }
.cta-band p { margin: 0 0 26px; opacity: .9; }
.cta-band .tiny { margin-top: 16px; font-size: 13px; opacity: .75; }

/* ---------- 页脚 ---------- */
.foot { background: var(--dark); color: #cbd5e1; padding: 56px 0 28px; position: relative; }
.foot .cols { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 30px; }
.foot h4 { color: #fff; font-size: 14.5px; margin: 0 0 14px; }
.foot a { display: block; color: #94a3b8; font-size: 14px; margin-bottom: 9px; transition: color .2s, transform .2s; }
.foot a:hover { color: #fff; transform: translateX(3px); }
.foot .brand { color: #fff; margin-bottom: 10px; }
.foot .copy { border-top: 1px solid #26334d; margin-top: 36px; padding-top: 20px; font-size: 13px; color: #7c8ba1; }

/* ---------- 滚动渐入 ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: .08s; }
.reveal.d2 { transition-delay: .16s; }
.reveal.d3 { transition-delay: .24s; }
.reveal.d4 { transition-delay: .32s; }

/* ---------- 文档页 ---------- */
.page-head {
  position: relative; padding: 54px 0 34px; overflow: hidden;
  background: linear-gradient(180deg, var(--bg-alt), #fff);
  border-bottom: 1px solid var(--border);
}
.page-head h1 { margin: 0 0 10px; font-size: 34px; letter-spacing: -.6px; }
.page-head p { margin: 0; color: var(--muted); }
.doc { display: grid; grid-template-columns: 224px minmax(0, 1fr); gap: 38px; padding: 46px 0 80px; }
.doc > main { min-width: 0; }
.doc .toc { position: sticky; top: 88px; align-self: start; min-width: 0; }
.doc .toc a {
  display: block; color: var(--muted); font-size: 14px; padding: 7px 0 7px 13px;
  border-left: 2px solid transparent; transition: .2s;
}
.doc .toc a:hover { color: var(--brand); border-left-color: var(--brand); transform: translateX(2px); }
.doc h2 { font-size: 25px; margin: 36px 0 12px; scroll-margin-top: 84px; }
.doc h3 { font-size: 18px; margin: 26px 0 10px; scroll-margin-top: 84px; }
.doc p, .doc li { color: #334155; font-size: 15px; }
.doc code { background: #f1f5f9; padding: 2px 6px; border-radius: 5px; font-size: 13.5px; font-family: Consolas, Monaco, monospace; }
.doc pre {
  background: #0b1120; color: #e2e8f0; padding: 18px; border-radius: 12px;
  overflow-x: auto; max-width: 100%;
  font-size: 13.5px; line-height: 1.7; border: 1px solid #1e293b;
}
.doc pre code { background: none; color: inherit; padding: 0; white-space: pre; }
/* 表格在窄屏可横向滚动，避免撑破容器 */
.doc table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 14.5px; display: block; overflow-x: auto; }
.doc table thead, .doc table tbody { display: table; width: 100%; table-layout: auto; }
.doc th, .doc td { border: 1px solid var(--border); padding: 10px 13px; text-align: left; }
.doc th { background: var(--bg-alt); font-weight: 600; }
.doc tbody tr { transition: background .18s; }
.doc tbody tr:hover { background: #f8faff; }
.copy-btn { z-index: 3; }

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
  .nav .links { display: none; }
  .hero h1 { font-size: 32px; }
  .hero { padding: 56px 0 44px; }
  .stats { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .stats b { font-size: 25px; }
  .steps { grid-template-columns: 1fr; }
  .steps::before { display: none; }
  .section { padding: 52px 0; }
  .section h2 { font-size: 25px; }
  .foot .cols { grid-template-columns: 1fr 1fr; gap: 24px; }
  .doc { grid-template-columns: 1fr; gap: 22px; }
  .doc .toc { position: static; display: flex; flex-wrap: wrap; gap: 8px; }
  .doc .toc a { border: 1px solid var(--border); border-radius: 9px; padding: 5px 12px; padding-left: 12px; }
  .page-head h1 { font-size: 25px; }
  .flow-line { flex-direction: column; }
  .flow-arrow { transform: rotate(90deg); }
  .flow-card { padding: 18px; }
  .flow-out { font-size: 11.5px; }
  .cta-band h2 { font-size: 25px; }
  .hero .orb { display: none; }
}

/* ---------- 无障碍：尊重系统减弱动画偏好 ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .reveal { opacity: 1 !important; transform: none !important; }
}
