/* Allide 官网。颜色与账号网站(control/account/src/web/account/design.css)同一套;
   字号只用 12/14/16/20/24/32/48,间距只用 4/8/16/24/32/48/64。 */
:root {
  color-scheme: light;
  --bg: #F6F5FA;
  --panel: #FFFFFF;
  --text: #1A1726;
  --secondary: #5A5670;
  --muted: #6B657B;
  --border: #E3E0EE;
  --outline: #A7A2B7;
  --accent: #6447F5;
  --on: #FFFFFF;
  --tint: #F0EDFF;
  --inset: #FAF9FC;
  --shadow: #26204308;
  --mono: Consolas, "Cascadia Mono", "SF Mono", Menlo, monospace;
}
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #13111C;
    --panel: #1C1A28;
    --text: #EEECF6;
    --secondary: #ABA7BF;
    --muted: #AAA5BC;
    --border: #2D2A3D;
    --outline: #625E74;
    --accent: #8F7BFF;
    --on: #13111C;
    --tint: #302847;
    --inset: #211F2E;
    --shadow: #09071230;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 "Segoe UI", "PingFang SC", "Microsoft YaHei UI", "Microsoft YaHei", system-ui, sans-serif;
  text-align: left;
  overflow-x: hidden;
}
h1, h2, h3, p, dl, dd { margin: 0; }
h1, h2, h3, .hero__lead { text-wrap: balance; }
p { text-wrap: pretty; }
:lang(zh) .hero h1 { word-break: keep-all; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
[hidden] { display: none !important; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
svg use { fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.icon { width: 16px; height: 16px; flex: none; }

.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 48px; }

/* 顶栏 */
.top {
  position: sticky; top: 0; z-index: 10;
  background: var(--panel);
  border-bottom: 1px solid var(--border);
}
.top__row { height: 72px; display: flex; align-items: center; gap: 32px; }
.brand { display: flex; align-items: center; gap: 8px; flex: none; }
.brand:hover { text-decoration: none; }
.brand picture { display: flex; }
.brand__mark { width: 32px; height: 32px; }
.brand__word { width: auto; height: 24px; }
.nav { display: flex; align-items: center; gap: 24px; flex: 1; font-size: 14px; }
.nav a { color: var(--secondary); font-weight: 600; }
.nav a:hover { color: var(--text); text-decoration: none; }
.nav a:last-child { margin-left: auto; color: var(--accent); }
.top__tools { display: flex; align-items: center; gap: 8px; }
.lang, .menu {
  display: inline-flex; align-items: center; gap: 8px;
  height: 32px; padding: 0 8px;
  background: transparent; border: 1px solid var(--border); border-radius: 8px;
  color: var(--secondary); font-size: 14px; cursor: pointer;
}
.lang:hover, .menu:hover { color: var(--text); border-color: var(--outline); }
.menu { display: none; width: 32px; justify-content: center; padding: 0; }

/* 按钮:全页只有首屏那一个实心主按钮 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 8px 24px;
  border-radius: 8px; border: 1px solid transparent;
  font-size: 16px; font-weight: 650; text-decoration: none; white-space: nowrap;
}
.btn:hover { text-decoration: none; }
.btn .icon { width: 20px; height: 20px; }
.btn--primary { background: var(--accent); color: var(--on); }
.btn--primary:hover { filter: brightness(1.08); }
.btn--ghost { background: transparent; color: var(--muted); border-color: var(--border); cursor: default; }
.btn--outline { background: var(--panel); color: var(--accent); border-color: var(--accent); min-height: 44px; padding: 8px 16px; }
.btn--outline:hover { background: var(--tint); }

/* 首屏 */
.hero { padding: 64px 0; border-bottom: 1px solid var(--border); background: var(--panel); }
.hero__inner { display: flex; flex-direction: column; align-items: center; text-align: center; padding-top: 48px; padding-bottom: 48px; }
.hero h1 { font-size: 48px; line-height: 1.2; font-weight: 700; letter-spacing: -.5px; max-width: 800px; }
.hero__lead { margin-top: 24px; max-width: 640px; font-size: 20px; line-height: 1.6; color: var(--secondary); }
.hero__actions { margin-top: 48px; display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; }
.hero__meta { margin-top: 16px; font-size: 12px; color: var(--muted); }

/* 区块 */
.section { padding: 64px 0; }
.section h2 { font-size: 32px; line-height: 1.3; font-weight: 700; margin-bottom: 32px; }

.features { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.feature {
  background: var(--panel); border: 1px solid var(--border); border-radius: 16px;
  padding: 32px; box-shadow: 0 4px 16px var(--shadow);
}
.feature__icon {
  display: block; width: 48px; height: 48px; padding: 8px;
  background: var(--tint); color: var(--accent); border-radius: 12px;
  margin-bottom: 24px;
}
.feature h3 { font-size: 20px; line-height: 1.4; font-weight: 650; }
.feature p { margin-top: 8px; font-size: 16px; color: var(--secondary); }

/* 下载 */
.downloads { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; align-items: start; }
.card {
  display: flex; flex-direction: column; align-items: flex-start; gap: 24px;
  background: var(--panel); border: 1px solid var(--border); border-radius: 16px;
  padding: 32px; min-width: 0;
}
.card__head { display: flex; align-items: center; gap: 16px; width: 100%; }
.card__head h3 { font-size: 24px; line-height: 1.3; font-weight: 650; }
.card__icon { width: 32px; height: 32px; color: var(--text); flex: none; }
.card--soon .card__icon, .card--soon h3 { color: var(--muted); }
.chip {
  margin-left: auto; padding: 4px 8px; border-radius: 8px;
  background: var(--tint); color: var(--accent); font-size: 12px; font-weight: 600; white-space: nowrap;
}
.card__req { font-size: 14px; color: var(--secondary); }

.specs { width: 100%; display: grid; gap: 8px; font-size: 14px; }
.specs > div { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 16px; align-items: baseline; }
.specs dt { color: var(--muted); }
.specs dd { color: var(--text); font-weight: 600; min-width: 0; }
.specs__hash { padding-top: 8px; border-top: 1px solid var(--border); margin-top: 8px; }
.specs__hash dd { display: flex; align-items: flex-start; gap: 8px; }
.specs__hash code {
  flex: 1; min-width: 0; padding: 8px; border-radius: 8px;
  background: var(--inset); border: 1px solid var(--border);
  font: 400 12px/1.6 var(--mono); color: var(--secondary); overflow-wrap: anywhere;
}
.copy {
  display: inline-flex; align-items: center; gap: 4px; flex: none;
  height: 32px; padding: 0 8px;
  background: transparent; border: 1px solid var(--border); border-radius: 8px;
  color: var(--secondary); font-size: 12px; font-weight: 600; cursor: pointer;
}
.copy:hover { color: var(--accent); border-color: var(--accent); }
.copy[data-done] { color: var(--accent); border-color: var(--accent); }

/* 页脚 */
.foot { border-top: 1px solid var(--border); background: var(--panel); }
.foot__row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 32px; padding-bottom: 32px; font-size: 14px; }
.foot__links { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.foot__links a { color: var(--secondary); }
.foot__links a:hover { color: var(--accent); }
.foot__copy { color: var(--muted); }

/* 窄屏 */
@media (max-width: 860px) {
  .features, .downloads { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 700px) {
  html { scroll-padding-top: 64px; }
  .wrap { padding: 0 16px; }
  .top__row { height: 64px; gap: 16px; justify-content: space-between; }
  .menu { display: inline-flex; }
  .nav {
    display: none; position: absolute; left: 0; right: 0; top: 64px;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--panel); border-bottom: 1px solid var(--border);
    padding: 8px 16px; box-shadow: 0 16px 24px var(--shadow);
  }
  .top[data-open] .nav { display: flex; }
  .nav a { padding: 16px 0; font-size: 16px; border-bottom: 1px solid var(--border); }
  .nav a:last-child { margin-left: 0; border-bottom: 0; }
  .hero { padding: 32px 0; }
  .hero__inner { padding-top: 32px; padding-bottom: 32px; }
  .hero h1 { font-size: 32px; letter-spacing: 0; }
  .hero__lead { margin-top: 16px; font-size: 16px; }
  .hero__actions { margin-top: 32px; flex-direction: column; align-items: stretch; width: 100%; }
  .section { padding: 48px 0; }
  .section h2 { font-size: 24px; margin-bottom: 24px; }
  .features, .downloads { gap: 16px; }
  .feature, .card { padding: 24px; }
  .feature__icon { margin-bottom: 16px; }
  .specs > div { grid-template-columns: 72px minmax(0, 1fr); }
  .specs__hash { grid-template-columns: minmax(0, 1fr) !important; gap: 8px !important; }
  .btn--outline { align-self: stretch; }
  .foot__row { flex-direction: column; align-items: flex-start; }
  .foot__links { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
