/* ==========================================================================
   HomiBook 官网样式
   零依赖，纯 CSS 变量驱动主题
   ========================================================================== */

:root {
  --brand: #f97316;
  --brand-strong: #ea580c;
  --brand-deep: #c2410c;
  --brand-soft: rgba(249, 115, 22, 0.1);
  --brand-line: rgba(249, 115, 22, 0.28);
  --brand-glow: rgba(249, 115, 22, 0.35);
  --danger: #e11d48;

  --bg: #ffffff;
  --bg-soft: #f7f8fb;
  --surface: #ffffff;
  --surface-2: #f4f6fa;
  --border: #e5e9f0;
  --border-strong: #d5dce7;
  --text: #0e1726;
  --text-2: #46536a;
  --text-3: #76839b;

  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 12px 30px -18px rgba(15, 23, 42, 0.28);
  --shadow-lg: 0 34px 70px -34px rgba(15, 23, 42, 0.35);
  --shadow-brand: 0 14px 30px -14px rgba(249, 115, 22, 0.6);

  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --header-h: 68px;
  --container: 1180px;

  --font-sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC",
    system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}

[data-theme="dark"] {
  --brand-soft: rgba(249, 115, 22, 0.14);
  --brand-line: rgba(249, 115, 22, 0.35);

  --bg: #0a1120;
  --bg-soft: #0d1526;
  --surface: #111b2d;
  --surface-2: #162134;
  --border: #223049;
  --border-strong: #2e3f5c;
  --text: #eef3fa;
  --text-2: #a9b7cc;
  --text-3: #7d8ca5;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 14px 34px -20px rgba(0, 0, 0, 0.7);
  --shadow-lg: 0 40px 80px -40px rgba(0, 0, 0, 0.85);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img,
svg {
  display: block;
  max-width: 100%;
}

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

p,
h1,
h2,
h3,
ul,
dl,
dd,
figure {
  margin: 0;
}

ul {
  padding: 0;
  list-style: none;
}

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

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  border-radius: 4px;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 24px;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 200;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  background: var(--brand);
  color: #fff;
  font-size: 14px;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 12px;
}

/* ---------- 顶栏 ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 90;
  background: var(--bg);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  border-bottom: 1px solid transparent;
  backdrop-filter: saturate(180%) blur(14px);
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.site-header.is-scrolled {
  border-bottom-color: var(--border);
  box-shadow: var(--shadow-sm);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 20px;
  height: var(--header-h);
}

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

.brand-logo {
  width: 34px;
  height: 34px;
  border-radius: 9px;
}

.brand-name {
  font-size: 18px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: 12px;
}

.nav a {
  padding: 8px 12px;
  border-radius: 8px;
  color: var(--text-2);
  font-size: 14.5px;
  font-weight: 500;
  transition: color 0.18s ease, background-color 0.18s ease;
}

.nav a:hover {
  color: var(--text);
  background: var(--surface-2);
}

.nav a[aria-current="page"] {
  color: var(--text);
  background: var(--surface-2);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text-2);
  cursor: pointer;
  transition: color 0.18s ease, border-color 0.18s ease, background-color 0.18s ease;
}

.icon-btn:hover {
  color: var(--brand-strong);
  border-color: var(--brand-line);
}

.icon-btn svg {
  width: 18px;
  height: 18px;
}

.theme-toggle .icon-moon,
[data-theme="dark"] .theme-toggle .icon-sun {
  display: none;
}

[data-theme="dark"] .theme-toggle .icon-moon {
  display: block;
}

.menu-toggle {
  display: none;
}

/* ---------- 按钮 ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-size: 14.5px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease,
    border-color 0.18s ease, color 0.18s ease;
}

.btn svg {
  width: 16px;
  height: 16px;
}

.btn-primary {
  background: linear-gradient(135deg, #fb923c, var(--brand-strong));
  color: #fff;
  box-shadow: var(--shadow-brand);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 34px -14px var(--brand-glow);
}

.btn-outline {
  border-color: var(--border-strong);
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}

.btn-outline:hover {
  border-color: var(--brand-line);
  color: var(--brand-strong);
}

.btn-ghost {
  background: transparent;
  color: var(--text-2);
}

.btn-ghost:hover {
  background: var(--surface-2);
  color: var(--text);
}

.btn-lg {
  padding: 13px 24px;
  border-radius: 12px;
  font-size: 15.5px;
}

.btn-light {
  background: #fff;
  color: var(--brand-deep);
  box-shadow: 0 16px 30px -18px rgba(0, 0, 0, 0.5);
}

.btn-ghost-light {
  border-color: rgba(255, 255, 255, 0.55);
  color: #fff;
}

.btn-ghost-light:hover {
  background: rgba(255, 255, 255, 0.14);
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  padding-block: clamp(56px, 8vw, 96px) clamp(64px, 9vw, 112px);
  overflow: hidden;
}

.hero-glow {
  position: absolute;
  inset: -20% -10% auto -10%;
  height: 620px;
  background:
    radial-gradient(46% 54% at 18% 22%, rgba(249, 115, 22, 0.16), transparent 70%),
    radial-gradient(42% 46% at 82% 12%, rgba(251, 146, 60, 0.14), transparent 72%);
  pointer-events: none;
}

.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(0, 0.96fr);
  align-items: center;
  gap: clamp(32px, 5vw, 64px);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 13px 6px 11px;
  border: 1px solid var(--brand-line);
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand-deep);
  font-size: 12.8px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

[data-theme="dark"] .eyebrow {
  color: #fdba74;
}

.eyebrow .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-soft);
}

.hero h1 {
  margin-top: 20px;
  font-size: clamp(2.15rem, 4.6vw, 3.55rem);
  font-weight: 800;
  line-height: 1.16;
  letter-spacing: -0.025em;
}

.grad {
  background: linear-gradient(120deg, #fb923c 12%, var(--brand-strong) 58%, #b45309 96%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lead {
  margin-top: 20px;
  max-width: 34em;
  color: var(--text-2);
  font-size: clamp(15px, 1.15vw, 17px);
  line-height: 1.78;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.hero-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  max-width: 520px;
  margin-top: 42px;
  padding-top: 26px;
  border-top: 1px solid var(--border);
}

.hero-meta dt {
  color: var(--text-3);
  font-size: 12.5px;
  letter-spacing: 0.02em;
}

.hero-meta dd {
  margin-top: 4px;
  font-size: 14.5px;
  font-weight: 600;
}

.hero-meta s {
  color: var(--text-3);
  text-decoration: line-through;
}

/* 主视觉 */

.hero-visual {
  position: relative;
}

.window {
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.window-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 40px;
  padding-inline: 14px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
}

.window-dots {
  display: inline-flex;
  gap: 6px;
}

.window-dots i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border-strong);
}

.window-dots i:first-child {
  background: var(--brand);
}

.window-title {
  color: var(--text-3);
  font-family: var(--font-mono);
  font-size: 11.5px;
}

.window-body {
  padding: 14px;
}

/* 占位框 */

.shot-frame {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 18px;
  border: 1.5px dashed var(--border-strong);
  border-radius: 14px;
  background: var(--bg-soft);
  background:
    radial-gradient(120% 110% at 50% 0%, var(--brand-soft), transparent 62%),
    var(--bg-soft);
  color: var(--text-3);
  text-align: center;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.shot-frame--phone {
  aspect-ratio: 647 / 1338;
  border-radius: 20px;
}

.shot-frame--wide {
  width: 100%;
  aspect-ratio: 2560 / 1389;
}

.shot-icon svg {
  width: 26px;
  height: 26px;
  opacity: 0.5;
}

/* 真实截图铺满占位框 */
.shot-frame img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
}

.shot-frame:has(> img) {
  padding: 0;
  border: 1px solid var(--border);
  background: var(--surface-2);
  overflow: hidden;
}

.window-shot {
  display: block;
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 10px;
}

.shot-title {
  color: var(--text-2);
  font-size: 13px;
  font-weight: 600;
}

.shot-note {
  font-size: 11.5px;
  letter-spacing: 0.02em;
}

.float-card {
  position: absolute;
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow-md);
  font-size: 13px;
  animation: float 7s ease-in-out infinite alternate;
}

.float-card--left {
  left: -26px;
  top: 16%;
}

.float-card--left strong {
  font-size: 17px;
  letter-spacing: -0.01em;
}

.float-label {
  color: var(--text-3);
  font-size: 11.5px;
}

.float-trend {
  color: #16a34a;
  font-size: 11.5px;
  font-weight: 600;
}

.float-card--right {
  right: -22px;
  bottom: 12%;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  max-width: 232px;
  line-height: 1.5;
  animation-delay: -2.4s;
}

.float-card--right b {
  color: var(--brand-strong);
  font-weight: 600;
}

.float-ai {
  display: grid;
  place-items: center;
  flex: none;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: linear-gradient(135deg, #fb923c, var(--brand-strong));
  color: #fff;
  font-size: 11px;
  font-weight: 700;
}

@keyframes float {
  from {
    transform: translateY(-4px);
  }
  to {
    transform: translateY(6px);
  }
}

/* ---------- 通用区块 ---------- */

.section {
  padding-block: clamp(64px, 8vw, 104px);
}

.section-soft {
  background: var(--bg-soft);
  border-block: 1px solid var(--border);
}

.section[id] {
  scroll-margin-top: calc(var(--header-h) + 12px);
}

.section-head {
  max-width: 660px;
  margin: 0 auto clamp(36px, 4.5vw, 52px);
  text-align: center;
}

.section-tag {
  display: inline-block;
  padding: 4px 11px;
  border: 1px solid var(--brand-line);
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand-strong);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

[data-theme="dark"] .section-tag {
  color: #fdba74;
}

.section h2 {
  margin-top: 14px;
  font-size: clamp(1.6rem, 2.7vw, 2.35rem);
  font-weight: 800;
  line-height: 1.28;
  letter-spacing: -0.02em;
}

.section-sub,
.section-head p {
  margin-top: 14px;
  color: var(--text-2);
  font-size: 15.5px;
  line-height: 1.78;
}

.section-head p code {
  padding: 2px 5px;
  border-radius: 5px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-size: 12.5px;
}

/* ---------- 能力卡片 ---------- */

.ability-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.ability {
  display: flex;
  flex-direction: column;
  padding: 26px 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.ability:hover {
  transform: translateY(-3px);
  border-color: var(--brand-line);
  box-shadow: var(--shadow-md);
}

.card-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 16px;
  border-radius: 12px;
  background: var(--brand-soft);
  color: var(--brand-strong);
}

[data-theme="dark"] .card-icon {
  color: #fdba74;
}

.card-icon svg {
  width: 22px;
  height: 22px;
}

.ability h3 {
  font-size: 16.5px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.ability-lead {
  margin-top: 6px;
  color: var(--text-3);
  font-size: 13px;
  line-height: 1.6;
}

.ability-list {
  display: grid;
  gap: 9px;
  margin-top: 16px;
}

.ability-list li {
  position: relative;
  padding-left: 17px;
  color: var(--text-2);
  font-size: 13.6px;
  line-height: 1.62;
}

.ability-list li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 8px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--brand);
  opacity: 0.65;
}

/* ---------- AI 区块 ---------- */

.ai-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(0, 0.94fr);
  align-items: center;
  gap: clamp(36px, 5vw, 70px);
}

.ai-list {
  margin-top: 30px;
}

.ai-list li {
  display: flex;
  gap: 14px;
  padding: 15px 0;
  border-top: 1px dashed var(--border);
}

.ai-list li:first-child {
  border-top: 0;
  padding-top: 0;
}

.ai-index {
  flex: none;
  margin-top: 2px;
  padding: 3px 7px;
  border-radius: 7px;
  background: var(--brand-soft);
  color: var(--brand-strong);
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
}

[data-theme="dark"] .ai-index {
  color: #fdba74;
}

.ai-list strong {
  display: block;
  font-size: 15px;
  font-weight: 700;
}

.ai-list div span {
  display: block;
  margin-top: 3px;
  color: var(--text-2);
  font-size: 13.8px;
  line-height: 1.68;
}

.ai-visual {
  position: relative;
}

.chat {
  max-width: 430px;
  margin-inline: auto;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.chat-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--border);
}

.chat-avatar {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(135deg, #fb923c, var(--brand-strong));
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}

.chat-head strong {
  display: block;
  font-size: 13.5px;
}

.chat-head div span {
  display: block;
  color: var(--text-3);
  font-size: 11.5px;
}

.chat-body {
  display: flex;
  flex-direction: column;
  gap: 13px;
  padding: 18px 16px;
  background: var(--bg-soft);
}

.bubble {
  max-width: 88%;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 13.2px;
  line-height: 1.68;
}

.bubble--user {
  align-self: flex-end;
  border-bottom-right-radius: 4px;
  background: linear-gradient(135deg, #fb923c, var(--brand-strong));
  color: #fff;
  box-shadow: 0 10px 20px -14px var(--brand-glow);
}

.bubble--ai {
  align-self: flex-start;
  border: 1px solid var(--border);
  border-bottom-left-radius: 4px;
  background: var(--surface);
  color: var(--text-2);
}

.tx-card {
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px dashed var(--border-strong);
  border-radius: 10px;
  background: var(--bg-soft);
}

.tx-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 12.5px;
}

.tx-top strong {
  color: var(--danger);
  font-size: 14.5px;
}

.tx-card dl {
  margin-top: 8px;
}

.tx-card dl div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
  line-height: 1.9;
}

.tx-card dt {
  color: var(--text-3);
}

.tx-card dd {
  color: var(--text-2);
}

.tx-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  font-size: 12px;
  font-weight: 600;
}

.tx-confirm,
.tx-cancel {
  padding: 5px 11px;
  border-radius: 7px;
}

.tx-confirm {
  background: var(--brand);
  color: #fff;
}

.tx-cancel {
  border: 1px solid var(--border-strong);
  color: var(--text-2);
}

.typing {
  display: inline-flex;
  gap: 4px;
  align-self: flex-start;
  padding: 11px 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  border-bottom-left-radius: 4px;
  background: var(--surface);
}

.typing i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-3);
  animation: blink 1.3s ease-in-out infinite;
}

.typing i:nth-child(2) {
  animation-delay: 0.18s;
}

.typing i:nth-child(3) {
  animation-delay: 0.36s;
}

@keyframes blink {
  0%,
  100% {
    opacity: 0.25;
    transform: translateY(0);
  }
  50% {
    opacity: 1;
    transform: translateY(-2px);
  }
}

.chat-input {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  color: var(--text-3);
  font-size: 12.5px;
}

.chat-input em {
  padding: 5px 12px;
  border-radius: 7px;
  background: var(--brand-soft);
  color: var(--brand-strong);
  font-style: normal;
  font-weight: 600;
  font-size: 12px;
}

[data-theme="dark"] .chat-input em {
  color: #fdba74;
}

.chat-tip {
  margin-top: 14px;
  color: var(--text-3);
  font-size: 12px;
  text-align: center;
}

/* ---------- 截图 ---------- */

.shot-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 22px;
}

.shot {
  margin: 0;
  cursor: zoom-in;
}

.shot:hover .shot-frame {
  border-color: var(--brand-line);
  background-color: var(--brand-soft);
}

.shot figcaption {
  margin-top: 10px;
  color: var(--text-2);
  font-size: 13px;
  text-align: center;
}

.shot-tabs-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 26px;
}

.shot-tabs {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-2);
}

.shot-tab {
  padding: 8px 20px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--text-2);
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.shot-tab:hover {
  color: var(--text);
}

.shot-tab.is-active {
  background: var(--surface);
  color: var(--brand-strong);
  box-shadow: var(--shadow-sm);
}

.shot-panel[hidden] {
  display: none;
}

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

.shot-grid--three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  max-width: 720px;
  margin-inline: auto;
}

.more-link {
  margin-top: 34px;
  text-align: center;
}

.more-link .link-arrow {
  margin-top: 0;
}

/* ---------- 子页面页头 ---------- */

.page-hero {
  padding-block: clamp(44px, 5.5vw, 72px) clamp(34px, 4.2vw, 52px);
  border-bottom: 1px solid var(--border);
  background:
    radial-gradient(120% 120% at 6% 0%, var(--brand-soft), transparent 58%),
    var(--bg-soft);
}

.page-hero h1 {
  margin-top: 14px;
  font-size: clamp(1.9rem, 3.6vw, 2.8rem);
  font-weight: 800;
  line-height: 1.22;
  letter-spacing: -0.022em;
}

.page-hero p {
  max-width: 46em;
  margin-top: 14px;
  color: var(--text-2);
  font-size: 15.5px;
  line-height: 1.78;
}

.page-hero code {
  padding: 2px 6px;
  border-radius: 5px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 13px;
}

/* ---------- 下载卡片 ---------- */

.download-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.download-card {
  display: flex;
  flex-direction: column;
  padding: 26px 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.download-card h3 {
  font-size: 16.5px;
  font-weight: 700;
}

.download-card p {
  margin-top: 8px;
  color: var(--text-2);
  font-size: 14px;
  line-height: 1.7;
}

.download-card code {
  display: block;
  margin-top: 12px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--text-2);
  font-size: 12.5px;
  word-break: break-all;
}

.download-card .btn {
  align-self: flex-start;
  margin-top: auto;
}

.download-card .btn-row {
  margin-top: auto;
  padding-top: 18px;
}

/* ---------- 常见问题 ---------- */

.faq-list {
  display: grid;
  gap: 12px;
  max-width: 820px;
  margin-inline: auto;
}

.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  transition: border-color 0.2s ease;
}

.faq-item[open] {
  border-color: var(--brand-line);
}

.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 20px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  flex: none;
  color: var(--brand-strong);
  font-size: 18px;
  line-height: 1;
}

.faq-item[open] summary::after {
  content: "−";
}

.faq-body {
  padding: 0 20px 18px;
  color: var(--text-2);
  font-size: 14.2px;
  line-height: 1.78;
}

.faq-body p + p,
.faq-body ul + p {
  margin-top: 10px;
}

.faq-body ul {
  margin-top: 8px;
  display: grid;
  gap: 6px;
}

.faq-body li {
  position: relative;
  padding-left: 16px;
}

.faq-body li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 9px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--brand);
  opacity: 0.6;
}

.faq-body a {
  color: var(--brand-strong);
  font-weight: 500;
}

.faq-body code {
  padding: 1px 5px;
  border-radius: 5px;
  background: var(--brand-soft);
  color: var(--brand-strong);
  font-size: 12.5px;
}

/* ---------- 快速开始 ---------- */

.start-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  align-items: start;
  gap: clamp(32px, 5vw, 64px);
}

.start-copy p {
  margin-top: 14px;
  color: var(--text-2);
  font-size: 15.5px;
  line-height: 1.78;
}

.start-copy p code {
  padding: 2px 6px;
  border-radius: 5px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-size: 13px;
}

.check-list {
  margin-top: 22px;
  display: grid;
  gap: 10px;
}

.check-list li {
  position: relative;
  padding-left: 26px;
  color: var(--text-2);
  font-size: 14.5px;
}

.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 4px;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: var(--brand-soft)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ea580c' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E")
    center / 11px no-repeat;
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 24px;
  color: var(--brand-strong);
  font-size: 14.5px;
  font-weight: 600;
}

.link-arrow svg {
  width: 15px;
  height: 15px;
  transition: transform 0.2s ease;
}

.link-arrow:hover svg {
  transform: translateX(3px);
}

.start-code {
  display: grid;
  gap: 16px;
}

.code-block {
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 14px;
  background: #0f172a;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.code-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
}

.code-title {
  color: #cbd5e1;
  font-size: 12.5px;
  font-weight: 600;
}

.copy-btn {
  padding: 4px 10px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 6px;
  background: transparent;
  color: #cbd5e1;
  font-family: inherit;
  font-size: 12px;
  cursor: pointer;
  transition: background-color 0.18s ease, color 0.18s ease;
}

.copy-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.copy-btn.is-copied {
  border-color: var(--brand);
  color: #fdba74;
}

.code-block pre {
  margin: 0;
  padding: 16px;
  overflow-x: auto;
  color: #e2e8f0;
  font-size: 13px;
  line-height: 1.85;
  tab-size: 2;
}

.code-block code {
  font-size: inherit;
}

/* ---------- 最终 CTA ---------- */

.final-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  padding: clamp(32px, 4.6vw, 54px);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(120% 140% at 12% 18%, rgba(255, 255, 255, 0.22), transparent 58%),
    linear-gradient(120deg, #fb923c, var(--brand-strong) 62%, #b53c05);
  box-shadow: 0 30px 60px -32px var(--brand-glow);
  color: #fff;
}

.final-cta h2 {
  margin: 0;
  color: #fff;
  font-size: clamp(1.45rem, 2.4vw, 2.05rem);
}

.final-cta p {
  margin-top: 10px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 15px;
}

.final-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  flex: none;
}

/* ---------- 页脚 ---------- */

.site-footer {
  padding-top: 52px;
  border-top: 1px solid var(--border);
  background: var(--bg-soft);
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) repeat(3, minmax(0, 1fr));
  gap: 32px;
  padding-bottom: 40px;
}

.footer-brand p {
  margin-top: 12px;
  color: var(--text-3);
  font-size: 13.5px;
}

.footer-col h3 {
  margin-bottom: 14px;
  color: var(--text-3);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.footer-col a {
  display: block;
  margin-bottom: 10px;
  color: var(--text-2);
  font-size: 13.8px;
  transition: color 0.18s ease;
}

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

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 20px 26px;
  border-top: 1px solid var(--border);
  color: var(--text-3);
  font-size: 12.5px;
}

/* ---------- 灯箱 ---------- */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 150;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(6, 11, 20, 0.72);
  backdrop-filter: blur(6px);
}

.lightbox[hidden] {
  display: none;
}

.lightbox-inner {
  width: min(420px, 92vw);
}

.lightbox-inner .shot-frame {
  width: min(86vw, calc(60vh * 9 / 19.5));
  height: 60vh;
  margin-inline: auto;
  background-image: none;
  background-color: var(--surface);
  box-shadow: var(--shadow-lg);
}

.lightbox-inner .shot-frame--image {
  width: auto;
  height: auto;
  padding: 0;
  border: 0;
  background: none;
  box-shadow: none;
  overflow: visible;
}

.lightbox-inner .shot-frame--image img {
  position: static;
  width: auto;
  max-width: min(88vw, 980px);
  max-height: 76vh;
  border-radius: 12px;
  object-fit: contain;
  box-shadow: var(--shadow-lg);
}

.lightbox-caption {
  margin-top: 14px;
  color: #e8edf5;
  font-size: 13.5px;
  text-align: center;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 22px;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* ---------- 滚动渐显 ---------- */

.js .reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* ---------- 响应式 ---------- */

@media (max-width: 1024px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-visual {
    max-width: 620px;
  }

  .float-card--left {
    left: -12px;
  }

  .float-card--right {
    right: -8px;
  }

  .ai-grid,
  .start-grid {
    grid-template-columns: 1fr;
  }

  .ai-visual {
    order: -1;
  }

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

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

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 860px) {
  .menu-toggle {
    display: inline-flex;
  }

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

  .nav {
    position: absolute;
    top: calc(var(--header-h) - 4px);
    left: 16px;
    right: 16px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow-lg);
  }

  .nav.is-open {
    display: flex;
  }

  .nav a {
    padding: 11px 12px;
    font-size: 15px;
  }

  .hero-meta {
    grid-template-columns: 1fr 1fr;
  }

  .final-cta {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 600px) {
  .container {
    padding-inline: 18px;
  }

  .header-inner {
    gap: 10px;
  }

  .brand {
    gap: 8px;
  }

  .brand-logo {
    width: 30px;
    height: 30px;
  }

  .brand-name {
    font-size: 16.5px;
  }

  .header-actions {
    gap: 8px;
  }

  .header-github {
    display: none;
  }

  .header-actions .icon-btn {
    width: 34px;
    height: 34px;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .float-card--left {
    display: none;
  }

  .float-card--right {
    right: 4px;
    bottom: -18px;
  }

  .window-body {
    padding: 10px;
  }

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

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

  #panel-mobile .shot:last-child {
    grid-column: 1 / -1;
  }

  #panel-mobile .shot:last-child .shot-frame {
    max-width: 168px;
    margin-inline: auto;
  }

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

  .hero-meta {
    gap: 14px;
  }

  .code-block pre {
    padding: 14px 12px;
    font-size: 12px;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 24px;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .lightbox-close {
    top: 12px;
    right: 12px;
  }
}

/* ---------- 无障碍 ---------- */

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

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

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