/* home.css — 首页各 section 样式,移植自 mockup/index.html <style> 的
   hero → responsive 区块。选择器与属性与样张保持一致,颜色改为引用
   tokens.css 已有变量;样张里 tokens.css 缺失的颜色变量在下方 :root 补齐
   (--bg-alt / --ink-soft / --brand-ink 三个 tokens.css 已定义,直接复用,
   不在此重复声明,避免全局变量冲突)。 */

:root {
  --line-dark: #20283a;
  --dark-soft: #8a97ad;
}

/* ---------- 首页专用基础类(base.css 未定义) ---------- */
.wrap { max-width: var(--maxw); margin-inline: auto; padding-inline: 24px; }
.mono { font-family: var(--font-mono); }
.eyebrow { display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 12px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--brand-ink);
  padding: 7px 13px 7px 11px; border-radius: 999px; background: var(--brand-wash);
  border: 1px solid color-mix(in srgb, var(--brand) 32%, transparent); }
.eyebrow::before { content: ""; width: 7px; height: 7px; border-radius: 50%;
  background: var(--brand); flex: none; }
h1, h2, h3 { margin: 0; letter-spacing: -.02em; line-height: 1.08; font-weight: 700; }
section { position: relative; }
.btn-ghost { color: var(--ink); border: 1px solid var(--line); }
.btn-ghost:hover { border-color: var(--ink); background: #fff; }

/* ---------- hero ---------- */
.hero { padding: 84px 0 68px; overflow: hidden; }
.hero .grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; }
.hero h1 { font-size: clamp(38px, 5vw, 66px); line-height: 1.02; margin-top: 18px; }
.hero h1 .accent { color: var(--brand); }
.hero p.sub { font-size: 19px; color: var(--ink-soft); max-width: 33ch; margin: 22px 0 30px; }
.hero .cta { display: flex; gap: 14px; flex-wrap: wrap; }
.hero .chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.hero .chip { font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .08em;
  color: var(--ink-soft); padding: 6px 11px; border: 1px solid var(--line); border-radius: 8px; }
.hero-visual { position: relative; }
.hero-visual .live { position: absolute; left: -22px; top: 132px; z-index: 2;
  display: flex; align-items: center; gap: 10px; background: #fff;
  border: 1px solid var(--line); border-radius: 12px; padding: 11px 15px; box-shadow: var(--shadow-float); }
.hero-visual .live .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--ok); flex: none;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 26%, transparent); }
.hero-visual .live b { display: block; font-size: 13px; line-height: 1.3; }
.hero-visual .live em { display: block; font-style: normal; font-family: var(--font-mono);
  font-size: 10.5px; letter-spacing: .06em; color: var(--ink-soft); }
.frame { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line);
  background: #fff; box-shadow: 0 40px 80px -40px rgba(13,26,43,.4), 0 12px 28px -18px rgba(13,26,43,.25); }
.frame .chrome { display: flex; align-items: center; gap: 7px; padding: 11px 14px;
  border-bottom: 1px solid var(--line); background: #fbfaf7; }
.frame .chrome i { width: 10px; height: 10px; border-radius: 50%; background: #dcd8cd; }
.frame .chrome span { margin-left: 10px; font-family: var(--font-mono); font-size: 11.5px; color: var(--ink-soft); }
.frame img { width: 100%; height: auto; background: #0e1524; }
.cap { font-family: var(--font-mono); font-size: 12px; color: var(--ink-soft); margin-top: 12px; text-align: right; }
.sig { position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(58% 54% at 82% 36%, color-mix(in srgb, var(--brand) 20%, transparent), transparent 62%); }

/* ---------- pillars ---------- */
.pillars { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: #fff; }
.pillars .grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); }
.pillar { padding: 34px 30px; background: #fff; }
.pillar .ic { width: 46px; height: 46px; padding: 11px; box-sizing: border-box;
  color: var(--brand); background: var(--brand-wash); border-radius: 13px; margin-bottom: 18px; }
.pillar h3 { font-size: 17px; margin-bottom: 8px; }
.pillar p { margin: 0; font-size: 14px; color: var(--ink-soft); line-height: 1.5; }

/* ---------- versus / 定位对比 ---------- */
.versus { padding: 88px 0; background: var(--bg-alt); border-top: 1px solid var(--line); }
.vs-head { max-width: 60ch; margin-bottom: 40px; }
.vs-head h2 { font-size: clamp(28px, 3.4vw, 40px); margin: 14px 0 16px; }
.vs-head .lead { font-size: 17px; color: var(--ink-soft); margin: 0; max-width: 52ch; }
.vs-cols { display: grid; grid-template-columns: 1fr auto 1fr; gap: 24px; align-items: stretch; }
.vs-col { border-radius: var(--radius-lg); padding: 26px 28px; border: 1px solid var(--line); background: #fff; }
.vs-col.them { background: transparent; }
.vs-col.us { border-color: color-mix(in srgb, var(--brand) 40%, var(--line)); box-shadow: var(--shadow-card); }
.vs-label { font-family: var(--font-mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--ink-soft); margin-bottom: 18px; }
.vs-col.us .vs-label { color: var(--brand-ink); }
.vs-col ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 13px; }
.vs-col li { position: relative; padding-left: 26px; font-size: 15px; color: var(--ink); line-height: 1.4; }
.vs-col.them li { color: var(--ink-soft); }
.vs-col.them li::before { content: ""; position: absolute; left: 3px; top: 10px; width: 10px; height: 2px;
  background: var(--dark-soft); border-radius: 1px; }
.vs-col.us li::before { content: ""; position: absolute; left: 3px; top: 5px; width: 11px; height: 6px;
  border-left: 2px solid var(--brand); border-bottom: 2px solid var(--brand); transform: rotate(-45deg); }
.vs-arrow { display: grid; place-items: center; color: var(--ink-soft); }

/* ---------- ChirpStack 迁移说明 ---------- */
.migrate { padding: 44px 0 92px; }
.migrate-card { display: grid; grid-template-columns: 1fr 1fr; gap: 44px; align-items: center;
  padding: 42px 46px; border-radius: var(--radius-lg); border: 1px solid var(--line);
  background: #fff; box-shadow: var(--shadow-card); }
.migrate-intro h2 { font-size: clamp(24px, 2.8vw, 32px); margin: 14px 0; }
.migrate-intro .lead { font-size: 16px; color: var(--ink-soft); margin: 0 0 22px; max-width: 42ch; }
.migrate-steps { margin: 0; padding: 0; list-style: none; display: grid; gap: 18px; }
.migrate-steps li { display: flex; align-items: flex-start; gap: 14px; font-size: 15px; color: var(--ink); line-height: 1.45; }
.migrate-steps .num { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  font-family: var(--font-mono); font-size: 13px; font-weight: 600; color: var(--brand-ink);
  background: var(--brand-wash); border: 1px solid color-mix(in srgb, var(--brand) 30%, transparent); }

/* ---------- promo banner(特性推广,可复用;带配图) ---------- */
.promo-band { padding: 24px 0 0; }
.promo { display: grid; grid-template-columns: 1.5fr .85fr; align-items: stretch;
  border-radius: var(--radius-lg); overflow: hidden;
  background: linear-gradient(90deg, var(--brand-wash), #fff);
  border: 1px solid color-mix(in srgb, var(--brand) 28%, var(--line)); box-shadow: var(--shadow-card); }
.promo:hover { text-decoration: none; border-color: var(--brand); }
.promo-main { display: flex; flex-direction: column; align-items: flex-start; gap: 11px; padding: 30px 36px; }
.promo-badge { font-family: var(--font-mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase;
  color: #fff; background: var(--brand); padding: 5px 10px; border-radius: 999px; }
.promo-main strong { font-size: 22px; color: var(--ink); letter-spacing: -.01em; line-height: 1.22; }
.promo-desc { font-size: 15px; color: var(--ink-soft); line-height: 1.55; max-width: 52ch; }
.promo-cta { margin-top: 4px; display: inline-flex; align-items: center; gap: 6px;
  font-weight: 600; font-size: 14px; color: var(--brand-ink); }
.promo-media { background: #fff; border-left: 1px solid var(--line); display: grid; place-items: center; padding: 18px 24px; overflow: hidden; }
.promo-media img { width: 100%; max-height: 200px; object-fit: contain; }

/* ---------- self-host 一键部署命令 ---------- */
.selfhost { padding: 88px 0; }
.selfhost .grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.selfhost h2 { font-size: clamp(28px, 3.4vw, 40px); margin: 14px 0 18px; }
.selfhost .lead { font-size: 17px; color: var(--ink-soft); max-width: 42ch; margin-bottom: 24px; }
.cmd { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line-dark); background: var(--dark);
  box-shadow: 0 30px 60px -34px rgba(13, 26, 43, .5); }
.cmd-bar { display: flex; align-items: center; gap: 7px; padding: 11px 14px; background: #0f1524; border-bottom: 1px solid var(--line-dark); }
.cmd-bar i { width: 10px; height: 10px; border-radius: 50%; background: #2a3346; }
.cmd-bar span { margin-left: 8px; font-family: var(--font-mono); font-size: 11.5px; color: var(--dark-soft); }
.cmd-body { padding: 20px 18px; font-family: var(--font-mono); font-size: 14px; color: #e8edf5; overflow-x: auto; }
.cmd-prompt { color: var(--ok); user-select: none; margin-right: 8px; }
.cmd-body code { color: #e8edf5; white-space: nowrap; }
.cmd-note { margin-top: 12px; font-family: var(--font-mono); font-size: 12px; color: var(--ink-soft); }

/* ---------- edgebus / 存量 ---------- */
.edge { padding: 96px 0; }
.edge .grid { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.edge h2 { font-size: clamp(28px, 3.4vw, 40px); margin: 14px 0 20px; }
.edge p.lead { font-size: 17px; color: var(--ink-soft); max-width: 46ch; }
.flow { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; align-items: center;
  font-family: var(--font-mono); font-size: 12.5px; }
.flow .node { background: var(--brand-wash); color: var(--brand-ink);
  padding: 7px 12px; border-radius: 8px; white-space: nowrap; }
.flow .node.on { background: var(--ink); color: #fff; }
.flow .ar { color: var(--ink-soft); }
.edge-visual { position: relative; background: var(--bg-alt); border-radius: var(--radius);
  border: 1px solid var(--line); padding: 34px; display: grid; place-items: center; }
.edge-visual img { width: 78%; filter: drop-shadow(0 24px 40px rgba(13,26,43,.18)); }
.edge-visual .tag { position: absolute; left: 22px; bottom: 20px; font-family: var(--font-mono);
  font-size: 12px; color: var(--ink-soft); }

/* ---------- deployment ---------- */
.deploy { padding: 92px 0; background: var(--bg-alt); border-top: 1px solid var(--line); }
.deploy .head { max-width: 60ch; margin-bottom: 46px; }
.deploy h2 { font-size: clamp(28px, 3.4vw, 40px); margin-bottom: 14px; }
.deploy .head p { color: var(--ink-soft); font-size: 17px; margin: 0; }
.modes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.mode { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  overflow: hidden; box-shadow: var(--shadow-card); }
.mode-shot { height: 150px; margin: 0; border: 0; border-bottom: 1px solid var(--line);
  background: var(--bg-alt); display: grid; place-items: center; overflow: hidden; }
.mode-shot img { max-width: 82%; max-height: 78%; object-fit: contain; }
.mode-body { padding: 26px 28px 30px; }
.mode .k { font-family: var(--font-mono); font-size: 13px; color: var(--brand-ink); font-weight: 500; }
.mode h3 { font-size: 20px; margin: 10px 0 12px; }
.mode p { margin: 0; color: var(--ink-soft); font-size: 14.5px; }
.mode ul { margin: 16px 0 0; padding: 0; list-style: none; font-size: 13.5px; color: var(--ink-soft); }
.mode li { padding: 6px 0 6px 20px; position: relative; }
.mode li::before { content: ""; position: absolute; left: 0; top: 12px; width: 8px; height: 2px; background: var(--brand); }

/* ---------- cta band ---------- */
.band { background: var(--dark); color: #fff; padding: 84px 0; text-align: center; position: relative; overflow: hidden; }
.band::before { content: ""; position: absolute; inset: 0;
  background: radial-gradient(circle at 50% -20%, rgba(22,119,255,.28), transparent 55%); }
.band .wrap { position: relative; }
.band h2 { font-size: clamp(28px, 3.6vw, 44px); margin-bottom: 16px; }
.band p { color: var(--dark-soft); font-size: 18px; max-width: 44ch; margin: 0 auto 32px; }
.band .cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.band .btn-ghost { color: #fff; border-color: var(--line-dark); }
.band .btn-ghost:hover { border-color: #fff; background: transparent; }

/* ---------- motion ---------- */
/* 默认(无 .js,即 JS 未运行/被禁用/被拦截时) .rise 不设置 opacity,
   保持正常可见 — 渐进增强:内容优先,动画是增强而非前提。 */
.js .rise { opacity: 0; transform: translateY(18px);
  transition: opacity .6s cubic-bezier(.16,1,.3,1), transform .6s cubic-bezier(.16,1,.3,1); }
.js .rise.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js .rise { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .hero .grid, .edge .grid, .selfhost .grid { grid-template-columns: 1fr; gap: 36px; }
  .pillars .grid { grid-template-columns: 1fr 1fr; }
  .modes { grid-template-columns: 1fr; }
  .cap { text-align: left; }
  .hero-visual .live { display: none; }
  .promo { grid-template-columns: 1fr; }
  .promo-media { border-left: 0; border-top: 1px solid var(--line); }
  .vs-cols { grid-template-columns: 1fr; }
  .vs-arrow { transform: rotate(90deg); }
  .migrate-card { grid-template-columns: 1fr; gap: 28px; padding: 32px 28px; }
}
@media (max-width: 520px) {
  .pillars .grid { grid-template-columns: 1fr; }
}
