/* ============================================================
   脉冲工具箱官网 · 深空金属设计系统
   语言：黑金 + ECG 心跳 + 工程网格 + 发丝高光 + 大排版
   ============================================================ */

@font-face {
  font-family: "InterVar";
  src: url("fonts/InterVariable.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --bg: #0a0a0c;
  --surface: rgba(24, 24, 28, 0.72);
  --surface-solid: #141417;
  --line: rgba(255, 255, 255, 0.08);
  --fg: #f2efe9;
  --muted: #a9a496;
  --faint: #6e6a5e;
  --gold: #d9a441;
  --gold-hi: #f2d28a;
  --gold-dim: #8a6a2a;
  --danger: #e5645c;
  --success: #57c99a;
  --mono: ui-monospace, "Cascadia Code", "JetBrains Mono", Consolas, monospace;
  --sans: "InterVar", "Microsoft YaHei", "微软雅黑", system-ui, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  line-height: 1.7;
}
::selection { background: rgba(217, 164, 65, 0.35); }
a { color: inherit; text-decoration: none; }
code { font-family: var(--mono); font-size: 0.9em; color: var(--gold-hi); background: rgba(217,164,65,0.08); padding: 1px 7px; border-radius: 6px; }
.mono { font-family: var(--mono); }
.muted { color: var(--muted); }
.faint { color: var(--faint); }

/* ---------------- 背景层 ---------------- */
.bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; background: var(--bg); }
.aurora { position: absolute; border-radius: 50%; filter: blur(90px); opacity: 0.5; will-change: transform; animation: drift 34s ease-in-out infinite alternate; }
.aurora.a1 { width: 60vmax; height: 60vmax; top: -22vmax; left: -16vmax;
  background: radial-gradient(circle, rgba(217,164,65,0.16), transparent 62%); }
.aurora.a2 { width: 52vmax; height: 52vmax; bottom: -24vmax; right: -14vmax;
  background: radial-gradient(circle, rgba(138,106,42,0.14), transparent 62%); animation-delay: -12s; }
.aurora.a3 { width: 36vmax; height: 36vmax; top: 34%; left: 46%;
  background: radial-gradient(circle, rgba(242,210,138,0.07), transparent 62%); animation-delay: -22s; }
@keyframes drift {
  from { transform: translate3d(0,0,0) scale(1); }
  to { transform: translate3d(6vmax,-4vmax,0) scale(1.12); }
}
.bg .grid {
  position: absolute; inset: 0;
  background:
    linear-gradient(rgba(255,255,255,0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.028) 1px, transparent 1px);
  background-size: 46px 46px;
  -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 18%, #000 20%, transparent 78%);
  mask-image: radial-gradient(ellipse 90% 70% at 50% 18%, #000 20%, transparent 78%);
}

/* ---------------- 导航 ---------------- */
.nav { position: fixed; top: 0; left: 0; right: 0; z-index: 50; backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); background: rgba(10,10,12,0.55); border-bottom: 1px solid var(--line); }
.nav-progress { position: absolute; left: 0; bottom: -1px; height: 2px; width: 0; background: linear-gradient(90deg, var(--gold-dim), var(--gold-hi)); transition: width 0.15s linear; }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 24px; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand-ecg { width: 34px; height: 19px; filter: drop-shadow(0 0 6px rgba(217,164,65,0.55)); }
.brand-name { font-weight: 650; letter-spacing: 0.02em; }
.brand-en { font-family: var(--mono); font-size: 10px; letter-spacing: 0.3em; color: var(--gold); border: 1px solid var(--line); padding: 1px 7px; border-radius: 5px; }
.nav-links { display: flex; gap: 30px; }
.nav-links a { color: var(--muted); font-size: 14px; transition: color 0.2s var(--ease); }
.nav-links a:hover { color: var(--fg); }

/* ---------------- 容器与排版 ---------------- */
.container { width: min(1160px, calc(100% - 48px)); margin-inline: auto; }
.hero { padding: 176px 0 90px; text-align: center; }
.section { padding: 110px 0; }
.eyebrow { font-family: var(--mono); font-size: 12px; letter-spacing: 0.32em; color: var(--gold); margin-bottom: 22px; }
.hero-title { font-size: clamp(46px, 7.4vw, 92px); font-weight: 700; letter-spacing: -0.045em; line-height: 1.06; }
.gold-grad { background: linear-gradient(120deg, var(--gold-hi), var(--gold) 45%, var(--gold-dim)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-sub { margin-top: 26px; color: var(--muted); font-size: clamp(15px, 1.6vw, 18px); }
.section-title { font-size: clamp(30px, 4vw, 46px); font-weight: 680; letter-spacing: -0.035em; margin-bottom: 16px; }
.section-sub { color: var(--muted); max-width: 760px; }

/* ---------------- 按钮 ---------------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; border-radius: 12px; padding: 15px 30px; font-size: 15px; font-weight: 620; transition: transform 0.18s var(--spring), filter 0.2s, box-shadow 0.2s; cursor: pointer; position: relative; overflow: hidden; }
.btn-gold {
  background: linear-gradient(135deg, var(--gold-hi), var(--gold) 45%, #a5761f);
  color: #201503;
  box-shadow: 0 12px 34px rgba(217,164,65,0.28), inset 0 1px 0 rgba(255,255,255,0.5), inset 0 -8px 16px rgba(0,0,0,0.25);
}
.btn-gold::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(100deg, transparent 0 3px, rgba(255,255,255,0.06) 3px 4px); mix-blend-mode: overlay; }
.btn-gold:hover { transform: translateY(-2px) scale(1.02); filter: brightness(1.06); }
.btn-gold:active { transform: scale(0.97); }
.btn-ghost { border: 1px solid var(--line); color: var(--fg); background: rgba(255,255,255,0.03); }
.btn-ghost:hover { border-color: rgba(217,164,65,0.5); color: var(--gold-hi); transform: translateY(-1px); }
.btn-sm { padding: 10px 20px; font-size: 14px; }
.btn-block { width: 100%; margin-top: 18px; }
.btn-meta { font-family: var(--mono); font-size: 11px; font-weight: 500; opacity: 0.75; margin-left: 10px; }

/* ---------------- 英雄 ECG ---------------- */
.hero-ecg { max-width: 900px; margin: 70px auto 0; }
.hero-ecg svg { width: 100%; height: auto; }
.ecg-track { stroke: rgba(255,255,255,0.09); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.ecg-glow { stroke: rgba(217,164,65,0.28); stroke-width: 7; stroke-linecap: round; stroke-linejoin: round; filter: blur(6px); }
.ecg-line { stroke: var(--gold); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 1; stroke-dashoffset: 1; animation: ecg 3.6s cubic-bezier(0.4, 0, 0.2, 1) infinite; }
@keyframes ecg {
  0% { stroke-dashoffset: 1; }
  24% { stroke-dashoffset: 0; }
  68% { stroke-dashoffset: 0; opacity: 1; }
  82% { stroke-dashoffset: 0; opacity: 0.12; }
  100% { stroke-dashoffset: 0; opacity: 0; }
}
.ecg-dot { fill: var(--gold-hi); filter: drop-shadow(0 0 9px var(--gold)); animation: dot 3.6s ease-in-out infinite; }
@keyframes dot { 0%, 20% { opacity: 0; } 26%, 64% { opacity: 1; } 74%, 100% { opacity: 0; } }
.hero-pulse-note { margin-top: 26px; font-size: 11px; letter-spacing: 0.28em; color: var(--faint); }

/* ---------------- 指标 ---------------- */
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 14px; margin-top: 76px; text-align: center; }
.metric { border: 1px solid var(--line); border-radius: 14px; padding: 22px 10px; background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.01)); }
.metric strong { display: block; font-family: var(--mono); font-size: 34px; font-weight: 600; letter-spacing: -0.03em; color: var(--gold-hi); font-variant-numeric: tabular-nums; }
.metric span { font-size: 12px; color: var(--muted); }

/* ---------------- 玻璃卡片 ---------------- */
.glass-card { position: relative; border: 1px solid var(--line); border-radius: 18px; padding: 30px; background: linear-gradient(180deg, rgba(255,255,255,0.045), rgba(255,255,255,0.012) 60%), var(--surface); box-shadow: 0 18px 46px rgba(0,0,0,0.35), inset 0 1px 0 rgba(255,255,255,0.07); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.glass-card::before { content: ""; position: absolute; top: 0; left: 16%; right: 16%; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(242,210,138,0.34), transparent); }
.card-head { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 18px; }
.card-icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 11px; background: rgba(217,164,65,0.1); color: var(--gold-hi); font-size: 17px; flex-shrink: 0; }
.card-head h3 { font-size: 19px; font-weight: 650; }
.card-head p { font-size: 13px; margin-top: 3px; }
.chips { display: flex; flex-wrap: wrap; gap: 9px; list-style: none; }
.chips li { font-size: 12.5px; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 5px 13px; background: rgba(255,255,255,0.025); transition: border-color 0.2s, color 0.2s; }
.chips li:hover { border-color: rgba(217,164,65,0.45); color: var(--gold-hi); }
.module-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin-top: 40px; }

/* ---------------- 拓展包 ---------------- */
.ext-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 18px; margin-top: 40px; }
.ext-card { border: 1px solid var(--line); border-radius: 16px; padding: 24px; background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.01)), var(--surface); display: flex; flex-direction: column; gap: 12px; transition: transform 0.2s var(--ease), border-color 0.2s; }
.ext-card:hover { transform: translateY(-3px); border-color: rgba(217,164,65,0.4); }
.ext-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ext-name { font-size: 17px; font-weight: 650; }
.ext-kind { font-family: var(--mono); font-size: 10px; letter-spacing: 0.12em; padding: 3px 9px; border-radius: 6px; border: 1px solid var(--line); color: var(--gold-hi); background: rgba(217,164,65,0.07); flex-shrink: 0; }
.ext-note { font-size: 12.5px; color: var(--muted); flex: 1; }
.ext-meta { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 12px; color: var(--faint); font-family: var(--mono); }
.ext-status { font-size: 11.5px; letter-spacing: 0.1em; }
.status-planned { color: var(--faint); }
.status-ready { color: var(--success); }
.ext-actions { display: flex; gap: 10px; margin-top: auto; }
.ext-actions .btn { flex: 1; padding: 11px 14px; font-size: 13.5px; }
.ext-loading { grid-column: 1 / -1; text-align: center; padding: 40px; }

/* ---------------- 下载区 ---------------- */
.download-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 22px; margin-top: 40px; }
.dl-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 18px; }
.dl-head h3 { font-size: 20px; font-weight: 650; }
.badge { font-family: var(--mono); font-size: 12px; padding: 4px 12px; border-radius: 999px; flex-shrink: 0; }
.badge-gold { background: rgba(217,164,65,0.12); color: var(--gold-hi); border: 1px solid rgba(217,164,65,0.35); }
.dl-specs { list-style: none; display: grid; gap: 9px; }
.dl-specs li { display: flex; justify-content: space-between; gap: 18px; font-size: 13.5px; border-bottom: 1px dashed var(--line); padding-bottom: 9px; }
.dl-specs span { color: var(--faint); }
.dl-specs b { font-weight: 550; text-align: right; }
.dl-steps { list-style: none; counter-reset: step; display: grid; gap: 14px; }
.dl-steps li { counter-increment: step; position: relative; padding-left: 40px; font-size: 13.5px; color: var(--muted); }
.dl-steps li::before { content: counter(step, decimal-leading-zero); position: absolute; left: 0; top: -2px; font-family: var(--mono); font-size: 12px; color: var(--gold); border: 1px solid rgba(217,164,65,0.4); border-radius: 8px; padding: 2px 8px; }
.hash-note { margin-top: 16px; font-size: 12px; color: var(--faint); }

/* ---------------- 时间线 ---------------- */
.timeline { margin-top: 44px; border-left: 1px solid var(--line); padding-left: 26px; display: grid; gap: 30px; }
.tl-item { position: relative; }
.tl-dot { position: absolute; left: -31px; top: 8px; width: 9px; height: 9px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 10px rgba(217,164,65,0.7); }
.tl-ver { color: var(--gold-hi); font-size: 13px; margin-bottom: 5px; }

/* ---------------- 页脚 ---------------- */
.footer { border-top: 1px solid var(--line); margin-top: 60px; padding: 46px 0 54px; }
.footer-inner { display: grid; gap: 12px; }
.footer-brand { display: flex; align-items: center; gap: 12px; font-weight: 650; }
.footer-brand em { font-style: normal; font-family: var(--mono); font-size: 10px; letter-spacing: 0.28em; color: var(--gold); margin-left: 6px; }
.footer p { font-size: 12.5px; }

/* ---------------- 渐入动画 ---------------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.d1 { transition-delay: 0.05s; } .d2 { transition-delay: 0.14s; } .d3 { transition-delay: 0.24s; } .d4 { transition-delay: 0.34s; }

/* ---------------- 响应式 ---------------- */
@media (max-width: 900px) {
  .module-grid, .download-grid { grid-template-columns: 1fr; }
  .metrics { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .nav-links { display: none; }
  .hero { padding-top: 140px; }
}
@media (prefers-reduced-motion: reduce) {
  .aurora, .ecg-line, .ecg-dot { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}
