/*
 * landing 样式。设计令牌与管理台（src/web/style.css）同基因——
 * 同一套颜色/圆角/字体栈，好让 landing 与 demo 看起来是一件东西。
 * 无构建链、无字体外链、无框架。
 */

:root {
  color-scheme: light dark;

  --bg: #f6f7f9;
  --surface: #ffffff;
  --surface-2: #f0f2f5;
  --border: #d8dce3;
  --text: #1d2129;
  --text-dim: #6b7280;

  --running: #17a34a;
  --degraded: #d98800;
  --ready: #2f6fed;

  --radius: 10px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", "PingFang SC", "Microsoft YaHei", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --maxw: 1120px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #16181d;
    --surface: #1e2127;
    --surface-2: #24272e;
    --border: #33373f;
    --text: #e6e8ea;
    --text-dim: #9aa1ab;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font: 15px/1.65 var(--font);
  color: var(--text);
  background: var(--bg);
}

code { font-family: var(--mono); font-size: 0.92em; }

a { color: var(--ready); }

h1, h2, h3 { line-height: 1.25; }

/* ── 顶栏 ─────────────────────────────────────────────────────────────── */

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 12px 22px;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 680;
  font-size: 16px;
  color: var(--text);
  text-decoration: none;
}

.brand-mark {
  width: 13px;
  height: 13px;
  border-radius: 4px;
  background: linear-gradient(135deg, var(--ready), var(--running));
}

.topnav { display: flex; gap: 18px; flex-wrap: wrap; font-size: 14px; }
.topnav a { color: var(--text-dim); text-decoration: none; }
.topnav a:hover { color: var(--text); }

/* ── Hero ─────────────────────────────────────────────────────────────── */

.hero {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 56px 22px 40px;
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(320px, 1.15fr);
  gap: 40px;
  align-items: center;
}

.hero h1 { margin: 0 0 14px; font-size: 34px; letter-spacing: -0.4px; }
.hero h1 code { font-size: 0.86em; background: var(--surface-2); padding: 1px 7px; border-radius: 6px; }

.lede { margin: 0 0 22px; color: var(--text-dim); font-size: 16px; }

.cta { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }

.btn {
  display: inline-block;
  font: inherit;
  font-size: 14px;
  font-weight: 560;
  padding: 9px 18px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  cursor: pointer;
}

.btn:hover { border-color: var(--ready); }

.btn-primary {
  background: var(--ready);
  border-color: var(--ready);
  color: #fff;
}

.badges { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; list-style: none; margin: 0 0 16px; padding: 0; }
.badges img { display: block; height: 20px; }

.chip {
  font-size: 12px;
  color: var(--text-dim);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 2px 10px;
}

.hero-hint { margin: 0; font-size: 13.5px; color: var(--text-dim); }

.hero-shot { margin: 0; }
.hero-shot img,
.card img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}
.hero-shot figcaption { margin-top: 9px; font-size: 12.5px; color: var(--text-dim); }

/* ── 通用分节 ──────────────────────────────────────────────────────────── */

.section { padding: 52px 22px; }
.section > * { max-width: var(--maxw); margin-left: auto; margin-right: auto; }
.section.alt { background: var(--surface); border-block: 1px solid var(--border); }
.section h2 { margin: 0 0 8px; font-size: 25px; }
.section-lede { color: var(--text-dim); margin: 0 0 26px; }

/* ── 卡片 ─────────────────────────────────────────────────────────────── */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 24px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.section.alt .card { background: var(--bg); }
.card h3 { margin: 0; font-size: 16.5px; }
.card p { margin: 0; color: var(--text-dim); font-size: 14px; }
.card img { margin-top: auto; }

/* ── 步骤 ─────────────────────────────────────────────────────────────── */

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
  margin: 0 auto 26px;
  padding: 0;
  counter-reset: step;
  list-style: none;
}

.steps li {
  position: relative;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 18px 16px 52px;
  counter-increment: step;
}

.steps li::before {
  content: counter(step);
  position: absolute;
  left: 16px;
  top: 17px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--ready);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  display: grid;
  place-items: center;
}

.steps h3 { margin: 0 0 6px; font-size: 15.5px; }
.steps p { margin: 0 0 10px; color: var(--text-dim); font-size: 13.5px; }
.steps em { font-style: normal; color: var(--text); font-weight: 560; }
.try { font-size: 13px; text-decoration: none; }
.try:hover { text-decoration: underline; }

/* ── 安装 ─────────────────────────────────────────────────────────────── */

.install-grid {
  display: grid;
  grid-template-columns: minmax(320px, 1.5fr) minmax(260px, 1fr);
  gap: 28px;
  margin-top: 22px;
}

.cmd {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
  overflow-x: auto;
}

.cmd code { flex: 1; white-space: nowrap; font-size: 13px; }
.btn-copy { flex: none; padding: 5px 12px; font-size: 12.5px; }
.cmd-note { color: var(--text-dim); font-size: 13.5px; }

.block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 13px 15px;
  overflow-x: auto;
  font-size: 13px;
  line-height: 1.75;
}

.prereq {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
}

.prereq h3 { margin: 0 0 10px; font-size: 15.5px; }
.prereq ul { margin: 0 0 16px; padding-left: 20px; color: var(--text-dim); font-size: 13.5px; }
.prereq li { margin-bottom: 8px; }

/* ── 页脚 ─────────────────────────────────────────────────────────────── */

.footer {
  padding: 34px 22px 46px;
  border-top: 1px solid var(--border);
  text-align: center;
  color: var(--text-dim);
  font-size: 13.5px;
}

.footer p { margin: 0 0 8px; }
.footer .fine { font-size: 12.5px; opacity: 0.8; }

/* ── 窄屏 ─────────────────────────────────────────────────────────────── */

@media (max-width: 880px) {
  .hero,
  .install-grid { grid-template-columns: 1fr; }
  .hero { padding-top: 34px; gap: 28px; }
  .hero h1 { font-size: 27px; }
}
