/* ===========================================================
   ZZMatrix — 亚马逊卖家 ERP / WMS / 供应链 主页面
   设计系统：深墨底 + 单一品牌蓝 + 等宽字体点缀 + 矩阵网格纹理
   =========================================================== */

/* ---------- Tokens ---------- */
:root {
  /* color */
  --ink-0: #0b1017;          /* 页面底 */
  --ink-1: #0f1620;          /* 卡片底 */
  --ink-2: #141d29;          /* 浮层 */
  --ink-3: #1b2634;          /* 高亮浮层 */
  --line: rgba(255,255,255,.08);
  --line-strong: rgba(255,255,255,.16);

  --brand: #2f6df6;          /* 品牌蓝 */
  --brand-hi: #5b8bff;       /* 悬停 */
  --brand-soft: rgba(47,109,246,.12);
  --brand-ghost: rgba(47,109,246,.22);

  --text: #e7ecf3;
  --text-dim: #aab4c4;
  --text-faint: #6f7c90;

  /* type */
  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;

  /* space */
  --wrap: 1180px;
  --pad: clamp(20px, 4vw, 32px);

  /* radii / shadow */
  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 20px;
  --shadow-1: 0 1px 0 rgba(255,255,255,.04) inset, 0 18px 48px -28px rgba(0,0,0,.7);

  /* motion */
  --ease: cubic-bezier(.2,.7,.2,1);
  --dur: .45s;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.62;
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 78% -8%, rgba(47,109,246,.14), transparent 60%),
    linear-gradient(var(--ink-0), var(--ink-0));
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
/* 矩阵网格纹理（呼应 matrix 意象），极淡 */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,.9), rgba(0,0,0,.25) 70%, transparent);
  opacity: .5;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.12; letter-spacing: -.01em; margin: 0; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--brand-hi); outline-offset: 3px; border-radius: 4px; }

/* ---------- Layout helpers ---------- */
.section { position: relative; z-index: 1; padding: clamp(72px, 9vw, 120px) 0; }
.section--alt {
  background: linear-gradient(var(--ink-1), var(--ink-1));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.wrap { width: min(var(--wrap), 100% - 2*var(--pad)); margin-inline: auto; }

.section-head { max-width: 640px; margin-bottom: clamp(36px, 5vw, 56px); }
.section-head--left { margin-inline: auto 0; }
.section-index {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: .18em;
  color: var(--brand-hi);
  border: 1px solid var(--brand-ghost);
  background: var(--brand-soft);
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 18px;
}
.section-title { font-size: clamp(28px, 4.2vw, 40px); }
.section-lede { margin-top: 16px; color: var(--text-dim); font-size: 17px; }

/* ---------- Buttons ---------- */
.btn {
  --bg: var(--brand);
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 600; font-size: 15px;
  padding: 12px 22px;
  border-radius: 10px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background var(--dur) var(--ease), transform var(--dur) var(--ease),
              border-color var(--dur) var(--ease), color var(--dur) var(--ease);
  min-height: 44px;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-hi); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line-strong); }
.btn-ghost:hover { border-color: var(--brand-ghost); color: #fff; background: var(--brand-soft); }
.btn-lg { font-size: 16px; padding: 14px 26px; }
.btn-sm { font-size: 14px; padding: 9px 16px; min-height: 38px; }

/* ============ TOP BAR ============ */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(11,16,23,.72);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav-shell {
  width: min(var(--wrap), 100% - 2*var(--pad));
  margin-inline: auto;
  display: flex; align-items: center; gap: 24px;
  height: 66px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 700; font-size: 18px; letter-spacing: -.01em; }
.brand-mark { color: var(--brand-hi); display: inline-flex; }
.brand-name { color: var(--text); }
.brand-dot { color: var(--text-dim); font-weight: 500; }

.nav-links { display: flex; gap: 28px; margin-left: 12px; font-size: 15px; }
.nav-links a { color: var(--text-dim); transition: color var(--dur) var(--ease); }
.nav-links a:hover { color: #fff; }
.nav-cta { margin-left: auto; display: flex; gap: 10px; }

.nav-toggle { display: none; }
.mobile-menu { display: none; }

/* ============ HERO ============ */
.hero { position: relative; z-index: 1; padding: clamp(64px, 8vw, 104px) 0 clamp(56px, 7vw, 88px); }
.hero-grid {
  width: min(var(--wrap), 100% - 2*var(--pad));
  margin-inline: auto;
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-mono); font-size: 12.5px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--text-dim);
  padding: 6px 12px 6px 10px;
  border: 1px solid var(--line-strong); border-radius: 999px;
  background: var(--ink-1);
}
.eyebrow-swatch { width: 8px; height: 8px; border-radius: 2px; background: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.hero-title { font-size: clamp(38px, 6.4vw, 68px); margin-top: 22px; }
.hero-em { color: var(--brand-hi); }
.hero-lede { margin-top: 22px; max-width: 520px; color: var(--text-dim); font-size: 18px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }
.hero-points { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 30px; }
.hero-points li { display: inline-flex; align-items: center; gap: 9px; color: var(--text-dim); font-size: 15px; }
.hero-points li::before {
  content: ""; width: 16px; height: 10px; border-radius: 2px;
  background:
    linear-gradient(var(--brand-hi), var(--brand-hi)) left center / 100% 2px no-repeat,
    linear-gradient(var(--brand-hi), var(--brand-hi)) left center / 2px 100% no-repeat;
  opacity: .9;
}

/* Hero visual — 订单流转面板 */
.hero-visual { position: relative; }
.flow-card {
  position: relative;
  background: linear-gradient(180deg, var(--ink-2), var(--ink-1));
  border: 1px solid var(--line-strong);
  border-radius: var(--r-lg);
  padding: 26px 24px 24px;
  box-shadow: var(--shadow-1);
}
.flow-card::before { /* 顶部一道细蓝光，暗示"在运行" */
  content: ""; position: absolute; inset: 0 auto auto 0; height: 1px; width: 100%;
  background: linear-gradient(90deg, transparent, var(--brand-hi) 40%, transparent);
  opacity: .8;
}
.flow-card-head { display: flex; gap: 10px; margin-bottom: 20px; }
.flow-dot {
  width: 12px; height: 12px; border-radius: 50%;
  border: 1px solid var(--line-strong); background: var(--ink-3);
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.flow-dot.is-done, .flow-dot.is-active {
  background: var(--brand); border-color: var(--brand);
  box-shadow: 0 0 0 4px var(--brand-soft);
}
.flow-steps { display: grid; gap: 10px; }
.flow-step {
  display: grid; grid-template-columns: 1fr;
  padding: 10px 12px; border-radius: var(--r-sm);
  border: 1px solid transparent;
  opacity: .5;
  transition: opacity var(--dur) var(--ease), border-color var(--dur) var(--ease), background var(--dur) var(--ease);
}
.flow-step.is-active { opacity: 1; border-color: var(--line); background: var(--brand-soft); }
.flow-step.is-done { opacity: .82; }
.flow-step-label { font-family: var(--font-display); font-weight: 600; font-size: 15px; }
.flow-step-sub { font-family: var(--font-mono); font-size: 12.5px; color: var(--text-faint); margin-top: 2px; }
.hero-visual-note { margin-top: 12px; font-family: var(--font-mono); font-size: 11.5px; color: var(--text-faint); text-align: right; }

/* ============ SCOPE strip ============ */
.scope { position: relative; z-index: 1; padding: 26px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--ink-1); }
.scope-line {
  width: min(var(--wrap), 100% - 2*var(--pad)); margin-inline: auto;
  font-family: var(--font-mono); font-size: 14px; color: var(--text-dim);
  text-align: center; letter-spacing: .02em;
}
.scope-line strong { color: var(--text); font-weight: 600; }

/* ============ SYSTEMS ============ */
.systems-grid {
  width: min(var(--wrap), 100% - 2*var(--pad)); margin-inline: auto;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
}
.sys-card {
  background: var(--ink-1);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 28px 26px 30px;
  position: relative; overflow: hidden;
  transition: transform var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.sys-card:hover { transform: translateY(-4px); border-color: var(--line-strong); }
/* 用顶部一条细色带区分系统，不做左侧色条（避免 accent rail 套路） */
.sys-card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: var(--accent, var(--brand)); opacity: .85; }
.sys-card--erp { --accent: #2f6df6; }
.sys-card--wms { --accent: #24b39a; }
.sys-card--scm { --accent: #e0a13a; }
.sys-card-top { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.sys-tag {
  font-family: var(--font-mono); font-size: 12px; letter-spacing: .12em;
  color: var(--accent); border: 1px solid var(--accent);
  padding: 3px 8px; border-radius: 6px;
}
.sys-card h3 { font-size: 20px; }
.sys-card-desc { color: var(--text-dim); font-size: 15px; }
.sys-list { margin-top: 20px; display: grid; gap: 10px; }
.sys-list li { position: relative; padding-left: 20px; color: var(--text-dim); font-size: 14.5px; }
.sys-list li::before {
  content: ""; position: absolute; left: 0; top: 7px;
  width: 11px; height: 11px;
  border-left: 2px solid var(--accent); border-bottom: 2px solid var(--accent);
  transform: rotate(-45deg);
}

/* ============ FLOW / HOW ============ */
.flow-track {
  width: min(var(--wrap), 100% - 2*var(--pad)); margin-inline: auto;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px;
  counter-reset: step;
}
.flow-node {
  position: relative;
  background: var(--ink-1);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 24px 20px 26px;
}
.flow-node::after { /* 节点间连线（箭头） */
  content: ""; position: absolute; top: 30px; right: -14px;
  width: 14px; height: 2px; background: var(--line-strong);
}
.flow-node:last-child::after { display: none; }
.flow-node-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 8px;
  font-family: var(--font-mono); font-size: 14px; font-weight: 600;
  color: var(--brand-hi); background: var(--brand-soft);
  border: 1px solid var(--brand-ghost);
}
.flow-node h3 { font-size: 17px; margin-top: 14px; }
.flow-node p { margin-top: 8px; color: var(--text-dim); font-size: 14px; }

/* ============ FIT / WHO ============ */
.fit-wrap { width: min(var(--wrap), 100% - 2*var(--pad)); margin-inline: auto; }
.fit-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px 28px; margin-top: 8px; }
.fit-list li {
  position: relative; padding: 18px 20px;
  background: var(--ink-1); border: 1px solid var(--line);
  border-radius: var(--r-md); color: var(--text-dim); font-size: 15.5px;
}
.fit-list li::before {
  content: ""; position: absolute; top: 18px; left: 0; width: 3px; height: 22px;
  border-radius: 2px; background: var(--brand);
}
.fit-list li:last-child { grid-column: 1 / -1; opacity: .85; }

/* ============ FAQ ============ */
.faq-list { width: min(760px, 100% - 2*var(--pad)); margin-inline: auto; display: grid; gap: 12px; }
.faq-item {
  background: var(--ink-1); border: 1px solid var(--line);
  border-radius: var(--r-md); overflow: hidden;
}
.faq-item summary {
  cursor: pointer; list-style: none;
  display: flex; align-items: center; gap: 14px;
  padding: 18px 20px; font-family: var(--font-display); font-weight: 600; font-size: 16px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::before {
  content: "+"; flex: none; width: 22px; height: 22px; border-radius: 6px;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-size: 15px; color: var(--brand-hi);
  background: var(--brand-soft); border: 1px solid var(--brand-ghost);
  transition: transform var(--dur) var(--ease);
}
.faq-item[open] summary::before { transform: rotate(45deg); }
.faq-item p { padding: 0 20px 20px 56px; color: var(--text-dim); font-size: 15px; }

/* ============ CTA ============ */
.cta { position: relative; z-index: 1; padding: clamp(72px, 9vw, 120px) 0; }
.cta::before {
  content: ""; position: absolute; inset: 0; z-index: 0;
  background: radial-gradient(700px 320px at 50% 0%, var(--brand-soft), transparent 70%);
}
.cta-inner {
  position: relative; z-index: 1;
  width: min(720px, 100% - 2*var(--pad)); margin-inline: auto;
  text-align: center;
  background: var(--ink-1); border: 1px solid var(--line-strong);
  border-radius: var(--r-lg); padding: clamp(32px, 4vw, 48px);
  box-shadow: var(--shadow-1);
}
.cta-title { font-size: clamp(26px, 4vw, 36px); }
.cta-lede { margin: 14px auto 0; color: var(--text-dim); max-width: 460px; }
.cta-form { margin-top: 28px; display: grid; gap: 16px; text-align: left; }
.cta-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: grid; gap: 7px; }
.field-label { font-family: var(--font-mono); font-size: 12px; letter-spacing: .1em; color: var(--text-dim); }
.field input, .field textarea {
  width: 100%; font-family: var(--font-body); font-size: 15px; color: var(--text);
  background: var(--ink-0); border: 1px solid var(--line-strong);
  border-radius: 10px; padding: 12px 14px; resize: vertical;
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.field input:focus, .field textarea:focus {
  outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft);
}
.field input::placeholder, .field textarea::placeholder { color: var(--text-faint); }
.cta-submit { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.cta-hint { font-size: 13px; color: var(--text-faint); }

/* toast */
.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%) translateY(12px);
  z-index: 100; background: var(--ink-3); color: var(--text);
  border: 1px solid var(--line-strong); border-left: 3px solid var(--brand);
  border-radius: 10px; padding: 14px 20px; font-size: 14.5px;
  box-shadow: var(--shadow-1); opacity: 0; pointer-events: none;
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease);
  max-width: min(420px, calc(100% - 40px));
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ============ FOOTER ============ */
.footer { position: relative; z-index: 1; border-top: 1px solid var(--line); background: var(--ink-1); }
.footer-shell {
  width: min(var(--wrap), 100% - 2*var(--pad)); margin-inline: auto;
  display: flex; flex-wrap: wrap; align-items: center; gap: 18px;
  padding: 28px 0;
}
.footer-brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 700; }
.footer-brand .brand-mark { color: var(--brand-hi); }
.footer-domain { font-family: var(--font-mono); font-size: 13px; color: var(--brand-hi); }
.footer-links { margin-left: auto; display: flex; gap: 22px; font-size: 14px; }
.footer-links a { color: var(--text-dim); transition: color var(--dur) var(--ease); }
.footer-links a:hover { color: #fff; }
.footer-note { width: 100%; font-family: var(--font-mono); font-size: 12px; color: var(--text-faint); }

/* ============ REVEAL ============ */
[data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
[data-reveal].in { opacity: 1; transform: none; }

/* ============ RESPONSIVE ============ */
@media (max-width: 900px) {
  .nav-links { display: none; }
  .nav-cta .btn-ghost { display: none; }
  .nav-toggle {
    margin-left: auto; display: inline-flex; flex-direction: column; gap: 5px;
    background: none; border: 0; cursor: pointer; padding: 10px;
  }
  .nav-toggle-bar { width: 24px; height: 2px; background: var(--text); border-radius: 2px; transition: var(--dur) var(--ease); }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .mobile-menu {
    display: grid; gap: 4px; padding: 12px var(--pad) 22px;
    background: var(--ink-1); border-bottom: 1px solid var(--line);
    position: absolute; top: 66px; left: 0; right: 0; z-index: 40;
  }
  .mobile-menu a { padding: 12px 8px; color: var(--text-dim); font-size: 15px; }
  .mobile-menu a.btn { margin-top: 8px; color: #fff; text-align: center; }
  .mobile-menu[hidden] { display: none; }

  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { margin-top: 8px; }
  .systems-grid { grid-template-columns: 1fr; }
  .flow-track { grid-template-columns: 1fr 1fr; }
  .flow-node:nth-child(2n)::after { display: none; }
  .flow-node { border-radius: var(--r-md); }
}
@media (max-width: 560px) {
  .cta-row { grid-template-columns: 1fr; }
  .fit-list { grid-template-columns: 1fr; }
  .flow-track { grid-template-columns: 1fr; }
  .flow-node::after { display: none; }
  .footer-links { margin-left: 0; flex-wrap: wrap; gap: 14px 20px; }
}
