:root {
  --bg: #f7f8fa;
  --surface: #ffffff;
  --line: #e4e7ec;
  --line-soft: #eef0f3;
  --ink: #14171c;
  --ink-soft: #3c434e;
  --muted: #626b78;
  --brand: #005fb8;
  --brand-hover: #0b6fd0;
  --brand-soft: #e9f1fa;
  --cf: #f6821f;
  --radius: 14px;
  --shadow-sm: 0 1px 2px rgba(20, 23, 28, 0.04), 0 1px 3px rgba(20, 23, 28, 0.04);
  --shadow-md: 0 8px 24px rgba(20, 23, 28, 0.07), 0 2px 6px rgba(20, 23, 28, 0.04);
  --shadow-lg: 0 24px 60px rgba(20, 23, 28, 0.12), 0 6px 18px rgba(20, 23, 28, 0.06);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI Variable Text", "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --mono: "SFMono-Regular", "JetBrains Mono", Consolas, "Liberation Mono", Menlo, monospace;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-weight: 700;
  letter-spacing: -0.02em;
}

p {
  margin: 0;
}

.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

/* ---------- 导航 ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(247, 248, 250, 0.82);
  border-bottom: 1px solid transparent;
  backdrop-filter: saturate(180%) blur(14px);
  transition: border-color 0.2s ease, background 0.2s ease;
}

.nav.is-scrolled {
  border-bottom-color: var(--line);
  background: rgba(247, 248, 250, 0.94);
}

.nav-inner {
  max-width: 1160px;
  margin: 0 auto;
  height: 64px;
  padding: 0 32px;
  display: flex;
  align-items: center;
  gap: 40px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 15.5px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.brand img {
  border-radius: 6px;
}

.nav-links {
  display: flex;
  gap: 26px;
  margin-left: auto;
  font-size: 14px;
  color: var(--ink-soft);
}

.nav-links a {
  transition: color 0.15s ease;
}

.nav-links a:hover {
  color: var(--brand);
}

.nav-github {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 34px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  font-size: 13.5px;
  font-weight: 600;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.nav-github svg {
  width: 15px;
  height: 15px;
  fill: currentColor;
}

.nav-github:hover {
  border-color: #c9ced6;
  transform: translateY(-1px);
}

/* ---------- 首屏 ---------- */
.hero {
  max-width: 1160px;
  margin: 0 auto;
  padding: 84px 32px 0;
}

.hero-copy {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 12.5px;
  color: var(--muted);
}

.tag {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  border-radius: 6px;
  background: var(--brand-soft);
  color: var(--brand);
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 600;
}

.hero h1 {
  margin: 22px 0 20px;
  font-size: 62px;
  line-height: 1.08;
  letter-spacing: -0.035em;
}

.lede {
  max-width: 560px;
  margin: 0 auto;
  font-size: 16.5px;
  line-height: 1.7;
  color: var(--muted);
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 32px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 42px;
  padding: 0 20px;
  border-radius: 10px;
  border: 1px solid transparent;
  font-size: 14.5px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease,
    box-shadow 0.15s ease;
}

.btn svg {
  width: 15px;
  height: 15px;
  fill: currentColor;
}

.btn.primary {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 6px 16px rgba(0, 95, 184, 0.22);
}

.btn.primary:hover {
  background: var(--brand-hover);
  transform: translateY(-1px);
}

.btn.ghost {
  background: var(--surface);
  border-color: var(--line);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}

.btn.ghost:hover {
  border-color: #c9ced6;
  transform: translateY(-1px);
}

.btn.lg {
  height: 46px;
  padding: 0 24px;
  font-size: 15px;
}

.btn.block {
  width: 100%;
}

.hero-meta {
  margin-top: 16px;
  font-size: 13px;
  color: #8b939f;
}

/* ---------- 应用窗口模拟 ---------- */
.window {
  max-width: 1010px;
  margin: 60px auto 0;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.win-bar {
  display: flex;
  align-items: center;
  gap: 9px;
  height: 42px;
  padding: 0 10px 0 14px;
  background: #f4f5f7;
  border-bottom: 1px solid var(--line-soft);
}

.win-bar img {
  border-radius: 5px;
}

.win-title {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-soft);
}

.win-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--muted);
}

.win-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  font-size: 12px;
}

.win-ico svg {
  width: 13px;
  height: 13px;
  fill: currentColor;
}

.win-sep {
  width: 1px;
  height: 16px;
  margin: 0 6px;
  background: var(--line);
}

.win-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 28px;
  border-radius: 6px;
  font-size: 11px;
  color: var(--ink-soft);
}

.win-btn.close {
  font-size: 10px;
}

.win-body {
  display: grid;
  grid-template-columns: 186px minmax(0, 1fr);
  min-height: 396px;
}

.win-side {
  padding: 12px 10px;
  border-right: 1px solid var(--line-soft);
  background: #fafbfc;
  font-size: 13px;
}

.side-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 9px 12px;
  color: #9aa2ae;
  font-size: 12px;
}

.side-menu {
  font-size: 13px;
}

.side-item {
  display: flex;
  align-items: center;
  gap: 9px;
  height: 34px;
  padding: 0 9px;
  border-radius: 8px;
  color: var(--ink-soft);
}

.side-item.active {
  background: var(--brand-soft);
  color: var(--brand);
  font-weight: 600;
}

.side-emoji {
  font-size: 13px;
  filter: saturate(0.9);
}

.side-arrow {
  margin-left: auto;
  font-size: 10px;
  color: #9aa2ae;
}

.side-sub {
  margin: 2px 0 8px;
  padding-left: 12px;
}

.side-sub-item {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 30px;
  padding: 0 9px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 12.5px;
}

.side-sub-item.active {
  background: #eef1f5;
  color: var(--ink);
  font-weight: 600;
}

.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #b6bdc7;
}

.dot.quick {
  background: #f6821f;
}

.dot.named {
  background: #005fb8;
}

.win-main {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 18px 20px 18px;
  min-width: 0;
}

.pane-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.pane-head h4 {
  font-size: 15px;
  letter-spacing: -0.01em;
}

.pane-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
}

.mini-btn {
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 500;
}

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

.pill {
  display: inline-flex;
  align-items: center;
  height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  background: #e8f6ed;
  color: #17784a;
  font-size: 11.5px;
  font-weight: 600;
}

.rows {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.row {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto auto 28px;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: var(--surface);
}

.row-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #2ba471;
  box-shadow: 0 0 0 3px rgba(43, 164, 113, 0.14);
}

.row-dot.idle {
  background: #c3c9d2;
  box-shadow: none;
}

.row-text {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.row-text b {
  font-size: 13px;
  font-weight: 600;
}

.row-text small {
  font-family: var(--mono);
  font-size: 10.5px;
  color: #9aa2ae;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.badge {
  height: 20px;
  padding: 0 7px;
  display: inline-flex;
  align-items: center;
  border-radius: 5px;
  background: #f1f3f6;
  color: #5c6472;
  font-size: 10.5px;
  font-weight: 600;
}

.badge.running {
  background: #e8f6ed;
  color: #17784a;
}

.play {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 7px;
  background: #f4f6f9;
  color: var(--brand);
  font-size: 10px;
}

.logs {
  margin-top: auto;
  border: 1px solid #23272e;
  border-radius: 10px;
  background: #1b1f26;
  overflow: hidden;
}

.logs-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-bottom: 1px solid #2a2f37;
  color: #8f9aa8;
  font-size: 11.5px;
}

.logs-clear {
  color: #5f6a78;
}

.logs pre {
  margin: 0;
  padding: 12px;
  font-family: var(--mono);
  font-size: 10.5px;
  line-height: 1.75;
  color: #9fb0c4;
  white-space: pre-wrap;
  word-break: break-all;
}

/* ---------- 通用区块 ---------- */
.section {
  max-width: 1160px;
  margin: 0 auto;
  padding: 104px 32px 0;
}

.section-head {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 34px;
}

.eyebrow-text {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.16em;
  color: #9aa2ae;
}

.section-head h2 {
  font-size: 34px;
  letter-spacing: -0.03em;
}

/* 功能卡片 */
.grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.card {
  padding: 22px 20px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.card:hover {
  transform: translateY(-3px);
  border-color: #d7dbe2;
  box-shadow: var(--shadow-md);
}

.card-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: var(--brand-soft);
  color: var(--brand);
}

.card-ico svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.card h3 {
  margin: 14px 0 7px;
  font-size: 15px;
  letter-spacing: -0.01em;
}

.card p {
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--muted);
}

.card code {
  padding: 1px 4px;
  border-radius: 4px;
  background: #f2f4f7;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-soft);
}

/* 快速开始 */
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.steps li {
  padding: 22px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.step-no {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 7px;
  background: #eef1f5;
  color: var(--ink-soft);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
}

.step-body h3 {
  margin: 12px 0 5px;
  font-size: 14.5px;
}

.step-body p {
  font-size: 13px;
  line-height: 1.7;
  color: var(--muted);
}

/* 协议表 */
.proto {
  margin-top: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.proto-head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line-soft);
}

.proto-head h3 {
  font-size: 15px;
}

.proto-head span {
  font-size: 12.5px;
  color: #9aa2ae;
}

.proto table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}

.proto th {
  text-align: left;
  padding: 10px 22px;
  font-size: 12px;
  font-weight: 600;
  color: #8b939f;
  background: #fafbfc;
}

.proto td {
  padding: 11px 22px;
  border-top: 1px solid var(--line-soft);
  color: var(--ink-soft);
}

.proto th:first-child,
.proto td:first-child {
  width: 26%;
  white-space: nowrap;
}

.proto td:first-child {
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--ink);
}

/* 下载 */
.os-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.os-card {
  display: flex;
  flex-direction: column;
  padding: 22px 22px 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.os-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.os-head h3 {
  font-size: 17px;
  letter-spacing: -0.02em;
}

.os-ver {
  font-family: var(--mono);
  font-size: 11px;
  color: #9aa2ae;
}

.os-formats {
  margin: 12px 0 22px;
  font-size: 13px;
  line-height: 1.9;
  color: var(--muted);
}

.os-card .btn {
  margin-top: auto;
}

.releases {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
  padding: 14px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  font-size: 13.5px;
  color: var(--ink-soft);
  box-shadow: var(--shadow-sm);
  transition: border-color 0.15s ease, color 0.15s ease;
}

.releases svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  margin-left: auto;
  color: #9aa2ae;
}

.releases:hover {
  border-color: #d7dbe2;
  color: var(--brand);
}

/* 页脚 */
.footer {
  margin-top: 104px;
  border-top: 1px solid var(--line);
  background: #fbfbfc;
}

.footer-inner {
  max-width: 1160px;
  margin: 0 auto;
  padding: 26px 32px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 600;
}

.footer-brand img {
  border-radius: 5px;
}

.footer-links {
  margin-left: auto;
  display: flex;
  gap: 22px;
  font-size: 13px;
  color: var(--muted);
}

.footer-links a:hover {
  color: var(--brand);
}

/* ---------- 入场动画 ---------- */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.2, 0.7, 0.3, 1);
}

.reveal.is-in {
  opacity: 1;
  transform: none;
}

/* ---------- 响应式 ---------- */
@media (max-width: 1024px) {
  .hero h1 {
    font-size: 52px;
  }

  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .win-body {
    grid-template-columns: 158px minmax(0, 1fr);
  }
}

@media (max-width: 860px) {
  .nav-links {
    display: none;
  }

  .nav-github {
    margin-left: auto;
  }

  .os-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .win-side {
    display: none;
  }

  .win-body {
    grid-template-columns: minmax(0, 1fr);
    min-height: 0;
  }
}

@media (max-width: 640px) {
  .nav-inner,
  .hero,
  .section,
  .footer-inner {
    padding-left: 18px;
    padding-right: 18px;
  }

  .hero {
    padding-top: 56px;
  }

  .hero h1 {
    font-size: 38px;
  }

  .lede {
    font-size: 15px;
  }

  .hero-actions {
    gap: 10px;
  }

  .window {
    margin-top: 40px;
    border-radius: 12px;
  }

  .section {
    padding-top: 72px;
  }

  .section-head h2 {
    font-size: 27px;
  }

  .grid,
  .steps {
    grid-template-columns: minmax(0, 1fr);
  }

  .row {
    grid-template-columns: 8px minmax(0, 1fr) auto 26px;
    gap: 10px;
  }

  .row .badge.running {
    display: none;
  }

  .logs pre {
    font-size: 9.5px;
  }

  .proto th,
  .proto td {
    padding-left: 16px;
    padding-right: 16px;
  }

  .proto th:first-child,
  .proto td:first-child {
    width: 42%;
  }

  .footer-inner {
    flex-wrap: wrap;
  }

  .footer-links {
    gap: 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .card,
  .btn {
    transition: none;
  }
}
