/* 机甲壳 Portal · 机甲暗色主题（docs/ui/40） */

:root {
  --bg: #0a0d14;
  --panel: #121724;
  --panel-2: #171e2e;
  --line: #1e2739;
  --ink: #e8ecf4;
  --ink-dim: #9aa4b8;
  --accent-a: #3b5bdb;
  --accent-b: #863bff;
  --ok: #34d399;
  --warn: #fbbf24;
  --grad: linear-gradient(135deg, var(--accent-a), var(--accent-b));
  --radius: 10px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.7 system-ui, "PingFang SC", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.mono { font-family: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace; }
.dim { color: var(--ink-dim); }
.sm { font-size: 13px; }
.grad {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---- 背景层 ---- */
.grid-bg {
  position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 32px 32px;
  opacity: .35;
  mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 30%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 30%, transparent 100%);
}
.glow { position: fixed; z-index: -3; border-radius: 50%; filter: blur(120px); pointer-events: none; }
.glow-a { width: 560px; height: 560px; left: -160px; top: -140px; background: rgba(59, 91, 219, .16); }
.glow-b { width: 620px; height: 620px; right: -200px; top: 60px; background: rgba(134, 59, 255, .13); }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }

/* ---- 页头 ---- */
.topbar {
  position: sticky; top: 0; z-index: 10;
  background: rgba(10, 13, 20, .82);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.topbar-in { display: flex; align-items: center; gap: 28px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand-txt { font-weight: 700; font-size: 17px; letter-spacing: .02em; }
.brand-txt i { font-style: normal; font-size: 12px; color: var(--ink-dim); margin-left: 6px; letter-spacing: .12em; }
.nav { display: flex; gap: 22px; margin-left: auto; }
.nav a { color: var(--ink-dim); text-decoration: none; font-size: 14px; transition: color .15s; }
.nav a:hover { color: var(--ink); }
.topbar-cta { display: flex; gap: 10px; }

/* ---- 按钮 ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: var(--radius); text-decoration: none; font-weight: 600;
  border: 1px solid transparent; cursor: pointer; white-space: nowrap;
  transition: filter .15s, background .15s, border-color .15s;
}
.btn.primary { background: var(--grad); color: #fff; }
.btn.primary:hover { filter: brightness(1.12); }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn.ghost:hover { border-color: var(--ink-dim); background: rgba(255, 255, 255, .03); }
.btn.sm { height: 34px; padding: 0 16px; font-size: 13px; }
.btn.lg { height: 46px; padding: 0 26px; font-size: 15px; }

/* ---- 区块通用 ---- */
.sec { padding: 88px 24px 0; }
.sec:last-of-type { padding-bottom: 96px; }
.tag { font-size: 12px; color: var(--accent-b); letter-spacing: .18em; margin-bottom: 14px; }
h2 { font-size: clamp(24px, 3.4vw, 32px); line-height: 1.35; margin-bottom: 12px; }
.sec-lead { font-size: 15px; margin-bottom: 40px; max-width: 620px; }

/* ---- 机甲卡片：切角 + HUD 括号 ---- */
.card, .step, .faq, .cta-box, .dash {
  background: linear-gradient(180deg, var(--panel) 0%, var(--panel-2) 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.corner {
  position: relative;
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 14px 100%, 0 calc(100% - 14px));
}
.corner::before, .corner::after {
  content: ""; position: absolute; width: 14px; height: 14px; pointer-events: none;
  border-color: rgba(134, 59, 255, .55); border-style: solid;
}
.corner::before { left: 0; top: 0; border-width: 1px 0 0 1px; }
.corner::after { right: 0; bottom: 0; border-width: 0 1px 1px 0; }

/* ---- Hero ---- */
.hero { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; padding-top: 96px; padding-bottom: 32px; }
.hero h1 { font-size: clamp(34px, 5vw, 52px); line-height: 1.2; margin: 14px 0 18px; }
.lead { font-size: 17px; color: var(--ink-dim); margin-bottom: 30px; }
.lead strong { color: var(--ink); }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-note { margin-top: 16px; font-size: 13px; }

/* ---- 看板样机 ---- */
.dash { padding: 20px; box-shadow: 0 24px 60px rgba(0, 0, 0, .45); }
.dash-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.dash-title { font-weight: 700; }
.dash-badge { font-size: 11px; color: var(--ink-dim); border: 1px solid var(--line); border-radius: 999px; padding: 2px 10px; }
.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 18px; }
.stat { background: rgba(255, 255, 255, .02); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; }
.stat-k { font-size: 11px; color: var(--ink-dim); }
.stat-v { font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; }
.stat-d { font-size: 10px; color: var(--ink-dim); }
.stat-d.up { color: var(--ok); }
.chart { margin-bottom: 16px; }
.chart-k { display: block; font-size: 11px; color: var(--ink-dim); margin-bottom: 8px; }
.bars { display: flex; align-items: flex-end; gap: 5px; height: 72px; }
.bars i { flex: 1; height: var(--h, 40%); background: var(--grad); border-radius: 3px 3px 0 0; opacity: .85; transform-origin: bottom; transform: scaleY(0); transition: transform .7s cubic-bezier(.2, .7, .3, 1); }
.dash.on .bars i { transform: scaleY(1); }
.apps { display: flex; flex-direction: column; gap: 6px; }
.app-row {
  display: flex; align-items: center; gap: 10px;
  background: rgba(255, 255, 255, .02); border: 1px solid var(--line);
  border-radius: 8px; padding: 8px 12px; font-size: 13px;
}
.app-n { flex: 1; }
.app-v { font-variant-numeric: tabular-nums; color: var(--ink-dim); }
.pill { font-size: 10px; padding: 1px 8px; border-radius: 999px; border: 1px solid; }
.pill.ok { color: var(--ok); border-color: rgba(52, 211, 153, .4); }
.pill.warn { color: var(--warn); border-color: rgba(251, 191, 36, .4); }

/* ---- 宫格 ---- */
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.card { padding: 24px; }
.c-idx { font-size: 11px; color: var(--accent-a); letter-spacing: .15em; }
.card h3 { font-size: 17px; margin: 10px 0 8px; }
.card p { font-size: 13.5px; color: var(--ink-dim); }

/* ---- 玩法卡 ---- */
.play { display: flex; flex-direction: column; }
.p-k { font-size: 11px; color: var(--accent-b); letter-spacing: .18em; }
.play .p-foot { margin-top: auto; padding-top: 16px; border-top: 1px dashed var(--line); font-size: 12.5px; color: var(--ink-dim); }
.kv { color: var(--ink); font-weight: 600; margin-right: 8px; }

/* ---- 功能模块 chips ---- */
.chips { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.chip {
  display: flex; align-items: flex-start; gap: 10px;
  background: rgba(255, 255, 255, .02); border: 1px solid var(--line);
  border-radius: 8px; padding: 12px 14px;
}
.chip b { display: block; font-size: 14px; font-weight: 600; white-space: nowrap; }
.chip span { display: block; font-size: 12px; color: var(--ink-dim); }

/* ---- 三步 ---- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.step { padding: 26px 24px; }
.s-n { font-size: 11px; color: var(--accent-a); letter-spacing: .18em; }
.step h3 { font-size: 17px; margin: 10px 0 8px; }
.step p { font-size: 13.5px; color: var(--ink-dim); }

/* ---- FAQ ---- */
.faq-list { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: start; }
.faq { padding: 0; }
.faq summary {
  list-style: none; cursor: pointer; padding: 16px 20px;
  font-weight: 600; font-size: 14.5px; position: relative; padding-right: 44px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 20px; top: 50%; transform: translateY(-50%);
  color: var(--accent-b); font-weight: 400; font-size: 18px; transition: transform .2s;
}
.faq[open] summary::after { content: "−"; }
.faq p { padding: 0 20px 18px; font-size: 13.5px; color: var(--ink-dim); }

/* ---- 底部 CTA ---- */
.cta-band { padding-bottom: 0; }
.cta-box { text-align: center; padding: 56px 32px; }
.cta-box h2 { margin-bottom: 10px; }
.cta-box p { margin-bottom: 28px; }

/* ---- 页脚 ---- */
.footer { border-top: 1px solid var(--line); margin-top: 96px; }
.foot-in { display: flex; align-items: flex-start; gap: 32px; padding-top: 36px; padding-bottom: 36px; }
.foot-brand { flex: 1; }
.foot-brand .sm { margin-top: 6px; }
.foot-nav { display: flex; gap: 20px; }
.foot-nav a { color: var(--ink-dim); text-decoration: none; font-size: 13px; }
.foot-nav a:hover { color: var(--ink); }
.foot-copy { margin-left: auto; }

/* ---- 动效 ---- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; }
  .bars i { transform: none; }
}

/* ---- 响应式 ---- */
@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; gap: 36px; padding-top: 64px; }
  .grid-4, .chips { grid-template-columns: repeat(2, 1fr); }
  .grid-3, .steps { grid-template-columns: 1fr; }
  .faq-list { grid-template-columns: 1fr; }
  .nav { display: none; }
  .stat-row { grid-template-columns: repeat(2, 1fr); }
  .foot-in { flex-direction: column; gap: 16px; }
  .foot-copy { margin-left: 0; }
}
@media (max-width: 560px) {
  .grid-4, .chips { grid-template-columns: 1fr; }
  .topbar-cta .ghost { display: none; }
  .sec { padding-top: 64px; }
}
