/* 上传至现 · 落地页
 * 依赖 tokens.css。深色终端风 + 单一青绿强调色。
 */

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; overflow-x: clip; }
html { color-scheme: dark; }

body {
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  background-image:
    radial-gradient(1100px 520px at 50% -220px, var(--accent-soft), transparent 72%),
    linear-gradient(var(--line-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-soft) 1px, transparent 1px);
  background-size: auto, 72px 72px, 72px 72px;
  background-attachment: fixed;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
h1, h2, h3 { margin: 0; line-height: 1.2; letter-spacing: -0.02em; font-weight: 650; }
p { margin: 0; }
code { font-family: var(--font-mono); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
::selection { background: var(--accent); color: var(--accent-ink); }

/* ── 顶栏 ─────────────────────────────────────────────────────────────── */
.site-head {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: var(--sp-6);
  height: var(--topbar-h);
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--sp-6);
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line-soft);
}
.brand { display: inline-flex; align-items: center; gap: var(--sp-2); color: var(--ink); flex: none; }
.brand:hover { text-decoration: none; }
.brand-mark {
  position: relative; width: 22px; height: 22px; border-radius: 6px;
  background: var(--accent); box-shadow: 0 0 18px var(--accent-line); flex: none;
}
.brand-mark::after { content: ""; position: absolute; inset: 6px; border-radius: 2px; background: var(--accent-ink); }
.brand-name { font-weight: 700; font-size: var(--text-md); }
.brand-sub {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.14em; color: var(--muted-2);
  border-left: 1px solid var(--line); padding-left: var(--sp-2); margin-left: var(--sp-1); white-space: nowrap;
}
.site-nav { display: flex; gap: var(--sp-1); flex: 1; }
.site-nav a { padding: var(--sp-2) var(--sp-3); border-radius: var(--r-sm); color: var(--muted); font-size: var(--text-sm); }
.site-nav a:hover { color: var(--ink); background: var(--panel); text-decoration: none; }
.site-actions { display: flex; gap: var(--sp-2); flex: none; }

/* ── 按钮 ─────────────────────────────────────────────────────────────── */
.btn {
  --btn-bg: var(--panel); --btn-fg: var(--ink); --btn-border: var(--line);
  display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-2);
  min-height: 44px; padding: 0 var(--sp-5);
  border: 1px solid var(--btn-border); border-radius: var(--r-sm);
  background: var(--btn-bg); color: var(--btn-fg);
  font: inherit; font-size: var(--text-sm); font-weight: 550; line-height: 1;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out),
              color var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out);
}
.btn:hover { background: var(--panel-2); border-color: var(--muted-2); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-primary { --btn-bg: var(--accent); --btn-fg: var(--accent-ink); --btn-border: var(--accent); font-weight: 650; }
.btn-primary:hover { --btn-bg: color-mix(in srgb, var(--accent) 86%, white); --btn-border: color-mix(in srgb, var(--accent) 86%, white); }
.btn-ghost { --btn-bg: transparent; --btn-border: transparent; color: var(--muted); }
.btn-ghost:hover { background: var(--panel); color: var(--ink); border-color: var(--line-soft); }
.btn-sm { min-height: 36px; padding: 0 var(--sp-3); font-size: var(--text-xs); border-radius: 7px; }

/* ── 通用区块 ─────────────────────────────────────────────────────────── */
main { max-width: 1200px; margin: 0 auto; padding: 0 var(--sp-6) var(--sp-16); }

.eyebrow {
  display: inline-flex; align-items: center; gap: var(--sp-2);
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--muted-2);
}
.eyebrow-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent-line); }

.section-head { display: grid; gap: var(--sp-2); margin-bottom: var(--sp-8); }
.section-title { font-size: clamp(24px, 3.4vw, var(--text-3xl)); letter-spacing: -0.025em; }
.section-sub { color: var(--muted); font-size: var(--text-base); max-width: 56ch; }

/* ── Hero ─────────────────────────────────────────────────────────────── */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: var(--sp-12);
  align-items: center;
  padding: var(--sp-16) 0 var(--sp-12);
}
.hero-copy { min-width: 0; display: grid; gap: var(--sp-5); justify-items: start; }
.hero-title {
  font-size: clamp(34px, 5.2vw, 64px);
  line-height: 1.04;
  letter-spacing: -0.035em;
  font-weight: 700;
  overflow-wrap: anywhere;
}
.hero-title em { font-style: normal; color: var(--accent); position: relative; }
.hero-title em::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0.04em; height: 0.09em;
  background: var(--accent-line); border-radius: var(--r-full);
}
.hero-sub { color: var(--muted); font-size: var(--text-md); line-height: 1.75; max-width: 52ch; }
.hero-actions { display: flex; gap: var(--sp-3); flex-wrap: wrap; }
.hero-note { font-size: var(--text-xs); color: var(--muted-2); font-family: var(--font-mono); }
.hero-note code { color: var(--accent); background: var(--accent-soft); padding: 2px 6px; border-radius: 5px; }

/* 演示面板 */
.hero-demo {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-2);
  overflow: hidden;
  min-width: 0;
}
.demo-head {
  display: flex; align-items: center; gap: var(--sp-2);
  padding: var(--sp-3) var(--sp-4);
  border-bottom: 1px solid var(--line-soft);
  background: var(--paper-2);
}
.demo-live { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 8px var(--accent-line); flex: none; }
.demo-title { font-size: var(--text-xs); color: var(--muted-2); font-family: var(--font-mono); }
.demo-body { display: grid; gap: var(--sp-3); padding: var(--sp-4); }
.demo-label { font-size: 10px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted-2); }
.demo-editor {
  width: 100%; min-height: 120px; resize: vertical;
  padding: var(--sp-3); border: 1px solid var(--line); border-radius: var(--r-sm);
  background: var(--paper-2); color: var(--ink-soft);
  font-family: var(--font-mono); font-size: 12px; line-height: 1.6;
}
.demo-editor:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.demo-url-row { display: flex; align-items: center; gap: var(--sp-2); flex-wrap: wrap; }
.demo-url {
  flex: 1; min-width: 0;
  font-family: var(--font-mono); font-size: var(--text-xs); color: var(--muted);
  padding: var(--sp-2) var(--sp-3);
  border: 1px solid var(--line-soft); border-radius: var(--r-sm); background: var(--paper-2);
  overflow-wrap: anywhere;
}
.demo-url strong { color: var(--accent); }
.demo-preview-wrap { display: grid; gap: var(--sp-2); }
.demo-preview-label { font-size: 10px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted-2); }
.demo-preview {
  width: 100%; height: 180px; border: 1px solid var(--line-soft); border-radius: var(--r-sm);
  background: #fff;
}

/* ── 三步 ─────────────────────────────────────────────────────────────── */
.how { padding: var(--sp-16) 0 var(--sp-12); border-top: 1px solid var(--line-soft); }
.how-steps {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--sp-5);
}
.how-step {
  display: grid; gap: var(--sp-2);
  padding: var(--sp-5);
  background: var(--panel); border: 1px solid var(--line-soft); border-radius: var(--r-lg);
}
.how-num { font-family: var(--font-mono); font-size: var(--text-sm); color: var(--accent); letter-spacing: 0.1em; }
.how-step h3 { font-size: var(--text-lg); }
.how-step p { color: var(--muted); font-size: var(--text-sm); line-height: 1.7; }
.how-step code { color: var(--ink-soft); background: var(--paper-2); padding: 1px 5px; border-radius: 4px; font-size: 12px; }

/* ── 能力 ─────────────────────────────────────────────────────────────── */
.features { padding: var(--sp-16) 0 var(--sp-12); border-top: 1px solid var(--line-soft); }
.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--sp-4);
}
.feature {
  display: grid; gap: var(--sp-3); align-content: start;
  padding: var(--sp-6);
  background: var(--panel); border: 1px solid var(--line-soft); border-radius: var(--r-lg);
  min-width: 0;
}
.feature-wide { grid-column: 1 / -1; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: var(--sp-6); }
.feature h3 { font-size: var(--text-lg); }
.feature p { color: var(--muted); font-size: var(--text-sm); line-height: 1.7; }
.feature code { color: var(--accent); }
.feature-tag {
  justify-self: start;
  font-family: var(--font-mono); font-size: 11px; color: var(--muted-2);
  padding: var(--sp-1) var(--sp-2); border: 1px solid var(--line-soft); border-radius: var(--r-sm);
  overflow-wrap: anywhere;
}
.feature-list {
  list-style: none; margin: var(--sp-1) 0 0; padding: 0;
  display: grid; gap: var(--sp-2);
}
.feature-list li {
  position: relative;
  padding-left: var(--sp-4);
  color: var(--muted); font-size: var(--text-sm); line-height: 1.6;
}
.feature-list li::before {
  content: "";
  position: absolute; left: 0; top: 0.55em;
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--accent);
}
.feature-code {
  margin: 0; padding: var(--sp-4);
  background: var(--paper-2); border: 1px solid var(--line-soft); border-radius: var(--r-md);
  overflow-x: auto; font-size: 12px; line-height: 1.7; color: var(--ink-soft);
}

/* ── 场景 ─────────────────────────────────────────────────────────────── */
.scenes { padding: var(--sp-16) 0 var(--sp-12); border-top: 1px solid var(--line-soft); }
.scene-list {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-3);
}
.scene-list li {
  display: flex; align-items: center; gap: var(--sp-3);
  padding: var(--sp-4); background: var(--panel);
  border: 1px solid var(--line-soft); border-radius: var(--r-md);
  font-size: var(--text-sm); color: var(--muted);
}
.scene-list strong { color: var(--ink); font-weight: 600; }
.scene-icon {
  display: grid; place-items: center;
  width: 34px; height: 34px; flex: none;
  border-radius: var(--r-sm); background: var(--accent-soft); color: var(--accent);
  font-size: var(--text-md);
}

/* ── FAQ ──────────────────────────────────────────────────────────────── */
.faq { padding: var(--sp-16) 0 var(--sp-12); border-top: 1px solid var(--line-soft); }
.faq-list { display: grid; gap: var(--sp-2); }
.faq-item {
  background: var(--panel); border: 1px solid var(--line-soft); border-radius: var(--r-md);
  padding: var(--sp-4) var(--sp-5);
}
.faq-item summary {
  cursor: pointer; font-weight: 600; font-size: var(--text-md);
  list-style: none; display: flex; justify-content: space-between; align-items: center; gap: var(--sp-3);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; font-family: var(--font-mono); color: var(--accent); font-size: var(--text-lg); line-height: 1; }
.faq-item[open] summary::after { content: "−"; }
.faq-item p { color: var(--muted); font-size: var(--text-sm); line-height: 1.75; padding-top: var(--sp-3); }
.faq-item code { color: var(--ink-soft); background: var(--paper-2); padding: 1px 5px; border-radius: 4px; font-size: 12px; }

/* ── CTA ──────────────────────────────────────────────────────────────── */
.cta {
  display: grid; justify-items: center; gap: var(--sp-3);
  padding: var(--sp-16) var(--sp-6);
  margin-top: var(--sp-8);
  background: linear-gradient(180deg, var(--accent-soft), transparent 80%);
  border: 1px solid var(--accent-line);
  border-radius: var(--r-lg);
  text-align: center;
}
.cta-title { font-size: clamp(24px, 3.4vw, var(--text-3xl)); }
.cta-sub { color: var(--muted); font-size: var(--text-sm); }

/* ── Footer ───────────────────────────────────────────────────────────── */
.site-foot {
  display: flex; align-items: center; justify-content: center; gap: var(--sp-2);
  flex-wrap: wrap;
  max-width: 1200px; margin: 0 auto;
  padding: var(--sp-6);
  border-top: 1px solid var(--line-soft);
  color: var(--muted-2); font-size: var(--text-xs); font-family: var(--font-mono);
}
.site-foot a { color: var(--muted); }
.site-foot a:hover { color: var(--accent); }
.foot-sep { color: var(--line); }

/* ── 响应式 ───────────────────────────────────────────────────────────── */
@media (max-width: 980px) {
  .hero { grid-template-columns: minmax(0, 1fr); gap: var(--sp-8); padding-top: var(--sp-10); }
  .hero-demo { max-width: 640px; }
  .feature-wide { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 760px) {
  .site-nav { display: none; }
  .site-head { gap: var(--sp-3); padding: 0 var(--sp-4); }
  .brand-sub { display: none; }
  main { padding: 0 var(--sp-4) var(--sp-12); }
  .how-steps { grid-template-columns: minmax(0, 1fr); }
  .feature-grid { grid-template-columns: minmax(0, 1fr); }
  .scene-list { grid-template-columns: minmax(0, 1fr); }
  .hero-title { font-size: clamp(32px, 9vw, 44px); }
  .hero-actions .btn { flex: 1; min-width: 0; }
  .demo-url-row .btn { width: 100%; }
  .cta { padding: var(--sp-10) var(--sp-4); }
}

@media (max-width: 420px) {
  .site-actions .btn-ghost { display: none; }
  .hero-sub { font-size: var(--text-sm); }
  .demo-body { padding: var(--sp-3); }
}

.demo-note {
  font-size: var(--text-xs);
  color: var(--warn);
  line-height: 1.5;
}

/* 手机：页脚链接要能点中 */
@media (max-width: 640px) {
  .site-foot { flex-wrap: wrap; row-gap: 0; font-size: 12px; }
  .site-foot a {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    padding: 0 var(--sp-1, 4px);
  }
}

/* ── 手机端触控与字号 ──────────────────────────────────────────────────
   落地页用的是这份 CSS（不是 app.css），所以规则要单独写一遍。
   44px 是 Apple HIG 的最小可点尺寸，40/36px 在手机上容易点空。 */
@media (max-width: 640px) {
  .btn { min-height: 44px; }
  .btn-sm { min-height: 44px; padding: 0 var(--sp-4); font-size: var(--text-sm); }
  .brand { min-height: 44px; }
  /* 10–11px 在手机上要眯眼，一律抬到 12px */
  .eyebrow, .demo-label, .feature-tag, .brand-sub { font-size: 12px; }
  /* FAQ 折叠标题只有一行文字高，很难点 */
  summary { min-height: 44px; display: flex; align-items: center; }
}
