/* ============================================================
   DealMesh 官网 · 设计系统
   暗色 + 神经网络背景 + 玻璃卡片 + 等宽标签 = "AI 范"
   ============================================================ */

:root {
  --night: #06070b;
  --panel: #0b0e15;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);
  --fg: #eceef2;
  --muted: #98a0ae;
  --faint: #6b7280;
  --cyan: #67e8f9;
  --violet: #a78bfa;
  --indigo: #818cf8;
  --amber: #fbbf24;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  --mono: "SF Mono", "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo,
    Consolas, "Liberation Mono", monospace;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--night);
  color: var(--fg);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

::selection { background: rgba(103, 232, 249, 0.28); }

.mono { font-family: var(--mono); }

a { color: inherit; }

/* ---------- 背景层 ---------- */

#mesh {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  opacity: 0.55;
  pointer-events: none;
}

.bg-grid {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 90% 65% at 50% 0%, #000 25%, transparent 78%);
  mask-image: radial-gradient(ellipse 90% 65% at 50% 0%, #000 25%, transparent 78%);
}

.glow {
  position: fixed;
  z-index: 0;
  border-radius: 50%;
  filter: blur(90px);
  pointer-events: none;
}
.glow-1 { width: 560px; height: 560px; left: -180px; top: -180px;
  background: radial-gradient(circle, rgba(103, 232, 249, 0.22), transparent 62%); }
.glow-2 { width: 620px; height: 620px; right: -220px; top: 18%;
  background: radial-gradient(circle, rgba(167, 139, 250, 0.18), transparent 62%); }
.glow-3 { width: 680px; height: 680px; left: 6%; bottom: -260px;
  background: radial-gradient(circle, rgba(129, 140, 248, 0.14), transparent 62%); }

/* ---------- 导航 ---------- */

.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: rgba(6, 7, 11, 0.55);
  border-bottom: 1px solid transparent;
  transition: background 0.3s, border-color 0.3s;
}
.nav.scrolled { background: rgba(6, 7, 11, 0.85); border-bottom-color: var(--line); }

.nav-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  gap: 28px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.3em;
  text-decoration: none;
}

.nav-links { display: flex; gap: 28px; margin-left: auto; }
.nav-links a {
  font-size: 14px;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--fg); }

.nav .btn-sm { margin-left: 4px; }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px; height: 40px;
  padding: 10px;
  background: none;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
}
.nav-toggle span { display: block; height: 1.5px; background: var(--muted); }

/* ---------- 按钮 ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border: 1px solid transparent;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s, background 0.25s;
}
.btn .arrow { transition: transform 0.25s; }
.btn:hover .arrow { transform: translateX(4px); }

.btn-primary {
  background: linear-gradient(92deg, #22d3ee, #818cf8 55%, #a78bfa);
  color: #05060a;
  font-weight: 600;
  box-shadow: 0 0 24px rgba(103, 232, 249, 0.22);
}
.btn-primary:hover { box-shadow: 0 0 44px rgba(103, 232, 249, 0.42); transform: translateY(-1px); }

.btn-ghost {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.02);
  color: var(--fg);
}
.btn-ghost:hover { border-color: rgba(103, 232, 249, 0.5); }

.btn-sm { padding: 8px 16px; font-size: 13px; border-radius: 8px; }
.btn-lg { padding: 15px 30px; font-size: 16px; }

/* ---------- 布局 ---------- */

.container { max-width: 1120px; margin: 0 auto; padding: 0 24px; }

.section {
  position: relative;
  z-index: 1;
  padding: 112px 0;
  border-top: 1px solid var(--line);
  scroll-margin-top: 64px;
}

.kicker { color: var(--cyan); font-size: 12px; letter-spacing: 0.35em; margin: 0; }

h1, h2, h3 { letter-spacing: 0.01em; }

h2 { font-size: clamp(28px, 4vw, 42px); line-height: 1.3; font-weight: 700; margin: 18px 0 0; }

.section-sub { margin: 18px 0 0; color: var(--muted); font-size: 16px; line-height: 1.9; max-width: 44em; }

.grad {
  background: linear-gradient(92deg, #67e8f9, #818cf8 50%, #a78bfa);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- HERO ---------- */

.hero { position: relative; z-index: 1; padding: 168px 0 72px; }

.hero-grid {
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: 56px;
  align-items: center;
}

.tag { color: var(--cyan); font-size: 12px; letter-spacing: 0.22em; margin: 0; }

h1 { font-size: clamp(40px, 5.6vw, 66px); line-height: 1.16; font-weight: 700; margin: 22px 0 0; }

.lead { margin: 26px 0 0; color: var(--muted); font-size: 17px; line-height: 2; max-width: 33em; }

.hero-cta { margin-top: 38px; display: flex; gap: 14px; flex-wrap: wrap; }

.note { margin-top: 30px; color: var(--faint); font-size: 12px; letter-spacing: 0.08em; }

/* 终端演示 */
.term {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(11, 14, 21, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  overflow: hidden;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5), inset 0 0 0 1px rgba(103, 232, 249, 0.05);
}
.term-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
}
.dot { width: 10px; height: 10px; border-radius: 50%; }
.dot.r { background: #ff5f57; } .dot.y { background: #febc2e; } .dot.g { background: #28c840; }
.term-title { margin-left: 8px; color: var(--faint); font-size: 12px; }
.term-body {
  margin: 0;
  padding: 20px 18px;
  min-height: 268px;
  font-size: 13px;
  line-height: 2;
  color: var(--muted);
  white-space: pre-wrap;
  word-break: break-all;
}
.t-cmd { color: var(--fg); }
.t-cmd .dollar { color: var(--cyan); }
.t-out { color: var(--muted); }
.t-warn { color: var(--amber); }
.t-ok { color: var(--cyan); }
.caret {
  display: inline-block;
  width: 8px; height: 14px;
  margin-left: 2px;
  background: var(--cyan);
  vertical-align: -2px;
  animation: caret 1s steps(1) infinite;
}
@keyframes caret { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }

/* 流水线 */
.pipeline {
  margin-top: 96px;
  display: flex;
  align-items: stretch;
  gap: 12px;
  flex-wrap: wrap;
}
.pipe-step {
  flex: 1;
  min-width: 132px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(11, 14, 21, 0.6);
  padding: 14px 16px;
}
.pipe-step b { display: block; font-size: 14px; font-weight: 600; }
.pipe-step span { display: block; margin-top: 6px; font-family: var(--mono); font-size: 10px; letter-spacing: 0.18em; color: var(--faint); }
.pipe-end { border-color: rgba(103, 232, 249, 0.4); background: rgba(103, 232, 249, 0.06); }
.pipe-arrow {
  flex: 0 0 44px;
  align-self: center;
  height: 2px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.08);
  position: relative;
  overflow: hidden;
}
.pipe-arrow::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, var(--cyan), transparent);
  animation: sweep 2.2s linear infinite;
}
@keyframes sweep { from { transform: translateX(-100%); } to { transform: translateX(100%); } }

/* ---------- 卡片 ---------- */

.cards-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 56px;
}

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

.card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01));
  padding: 24px;
  transition: border-color 0.3s, transform 0.3s;
}
.card:hover { border-color: rgba(103, 232, 249, 0.4); transform: translateY(-3px); }
.card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(103, 232, 249, 0.6), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}
.card:hover::before { opacity: 1; }

.card .idx { color: var(--cyan); font-size: 12px; letter-spacing: 0.2em; }
.card h3 { margin: 16px 0 0; font-size: 17px; font-weight: 600; }
.card h3 .en { display: block; margin-top: 5px; font-size: 10px; letter-spacing: 0.25em; color: var(--faint); font-weight: 400; }
.card p { margin: 12px 0 0; color: var(--muted); font-size: 14px; line-height: 1.9; }

.chip {
  display: inline-block;
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--cyan);
  border: 1px solid rgba(103, 232, 249, 0.3);
  background: rgba(103, 232, 249, 0.06);
  border-radius: 6px;
  padding: 4px 9px;
}

/* ---------- 原则 ---------- */

.principles { list-style: none; margin: 56px 0 0; padding: 0; }
.principles li {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 24px;
  padding: 38px 0;
  border-top: 1px solid var(--line);
  align-items: start;
}
.p-idx { color: var(--faint); font-size: 13px; padding-top: 8px; }
.principles h3 { margin: 0; font-size: clamp(20px, 2.6vw, 28px); font-weight: 600; }
.principles p { margin: 14px 0 0; color: var(--muted); line-height: 1.95; max-width: 46em; }

/* ---------- 证据链 ---------- */

.ev-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 64px;
  align-items: start;
}

.checks { list-style: none; margin: 30px 0 0; padding: 0; display: grid; gap: 13px; }
.checks li { position: relative; padding-left: 26px; color: var(--muted); font-size: 15px; }
.checks li::before { content: "✓"; position: absolute; left: 0; color: var(--cyan); font-family: var(--mono); }

.ev-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(11, 14, 21, 0.7);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  padding: 22px 22px 18px;
}
.ev-card.pending { border-color: rgba(251, 191, 36, 0.22); }
.ev-card header { display: flex; align-items: center; justify-content: space-between; }
.ev-id { color: var(--faint); font-size: 12px; letter-spacing: 0.15em; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  padding: 4px 11px;
  border-radius: 999px;
  border: 1px solid;
}
.badge i { width: 6px; height: 6px; border-radius: 50%; }
.badge-ok { color: var(--cyan); border-color: rgba(103, 232, 249, 0.35); background: rgba(103, 232, 249, 0.08); }
.badge-ok i { background: var(--cyan); }
.badge-wait { color: var(--amber); border-color: rgba(251, 191, 36, 0.35); background: rgba(251, 191, 36, 0.08); }
.badge-wait i { background: var(--amber); animation: pulse 1.6s ease-out infinite; }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(251, 191, 36, 0.45); }
  70% { box-shadow: 0 0 0 7px rgba(251, 191, 36, 0); }
  100% { box-shadow: 0 0 0 0 rgba(251, 191, 36, 0); }
}

.ev-claim { margin: 16px 0 0; font-size: 15px; line-height: 1.85; }
.ev-meta { margin: 16px 0 0; display: grid; gap: 8px; font-size: 12px; }
.ev-meta div { display: flex; gap: 12px; }
.ev-meta dt { color: var(--faint); flex: 0 0 40px; }
.ev-meta dd { margin: 0; color: var(--muted); word-break: break-all; }
.ev-link { margin: 14px 0 0; padding-top: 12px; border-top: 1px dashed var(--line); color: var(--faint); font-size: 11px; }

.chain-link {
  width: 2px;
  height: 28px;
  margin: 8px auto;
  background: linear-gradient(180deg, rgba(103, 232, 249, 0.6), rgba(167, 139, 250, 0.35));
}

/* ---------- 公司信息条 ---------- */

.company-bar {
  margin-top: 40px;
  display: flex;
  flex-wrap: wrap;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(11, 14, 21, 0.6);
  overflow: hidden;
}
.company-bar span {
  flex: 1 1 220px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 18px 22px;
  border-left: 1px solid var(--line);
  font-size: 13px;
  color: var(--muted);
}
.company-bar span:first-child { border-left: 0; }
.company-bar b {
  font-size: 10px;
  letter-spacing: 0.25em;
  color: var(--faint);
  font-weight: 400;
}

/* ---------- CTA ---------- */

.cta { text-align: center; padding: 148px 0; }
.cta::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 55% 60% at 50% 50%, rgba(103, 232, 249, 0.07), transparent 70%);
  pointer-events: none;
}
.cta h2 { font-size: clamp(30px, 4.6vw, 52px); }
.cta p { margin: 22px auto 0; color: var(--muted); line-height: 1.9; max-width: 36em; }
.cta .hero-cta { justify-content: center; margin-top: 42px; }

/* ---------- 页脚 ---------- */

.footer { position: relative; z-index: 1; border-top: 1px solid var(--line); padding: 36px 0; }
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  color: var(--faint);
  font-size: 13px;
}
.footer-mid { font-size: 11px; letter-spacing: 0.1em; }
.footer-tag { font-size: 11px; letter-spacing: 0.2em; color: var(--faint); }

/* ---------- 滚动揭示 ---------- */

.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.8s cubic-bezier(0.22, 0.61, 0.36, 1),
    transform 0.8s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.reveal.is-visible { opacity: 1; transform: none; }
.d1 { transition-delay: 0.08s; }
.d2 { transition-delay: 0.16s; }
.d3 { transition-delay: 0.24s; }
.d4 { transition-delay: 0.32s; }

/* ---------- 响应式 ---------- */

@media (max-width: 1024px) {
  .cards-4 { grid-template-columns: repeat(2, 1fr); }
  .cards-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  .hero { padding-top: 132px; }
  .hero-grid { grid-template-columns: 1fr; gap: 44px; }
  .ev-grid { grid-template-columns: 1fr; gap: 44px; }
  .nav-links {
    display: none;
    position: absolute;
    top: 64px; left: 0; right: 0;
    flex-direction: column;
    gap: 4px;
    margin: 0;
    padding: 12px 24px 20px;
    background: rgba(6, 7, 11, 0.97);
    border-bottom: 1px solid var(--line);
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 10px 0; font-size: 15px; }
  .nav .btn-sm { margin-left: auto; }
  .nav-toggle { display: flex; }
}

@media (max-width: 640px) {
  .cards-4 { grid-template-columns: 1fr; }
  .cards-3 { grid-template-columns: 1fr; }
  .principles li { grid-template-columns: 1fr; gap: 10px; padding: 30px 0; }
  .p-idx { padding-top: 0; }
  .pipeline { gap: 10px; }
  .pipe-arrow { display: none; }
  .pipe-step { min-width: calc(50% - 10px); }
  .section { padding: 84px 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .pipe-arrow::after, .caret, .badge-wait i { animation: none; }
  .btn, .card { transition: none; }
}
