/* ── Fonts ── */
@font-face { font-family: "Press Start 2P"; src: url("assets/fonts/PressStart2P.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "VT323"; src: url("assets/fonts/VT323.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Russo One"; src: url("assets/fonts/RussoOne-v18.woff2") format("woff2"); font-display: swap; }

/* ── Design tokens ── */
:root {
  --bg: #000;
  --bg-deep: #000;
  --panel: #17171f;
  --panel-2: #1f1f2a;
  --accent: #4ade80;
  --accent-dim: #22a35a;
  --accent-glow: rgba(74, 222, 128, .15);
  --text: #e8e8f0;
  --text-dim: #9a9ab0;
  --text-mute: #6a6a80;
  --border: rgba(255, 255, 255, .08);
  --border-hi: rgba(74, 222, 128, .35);
  --warn: #f59e0b;

  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-display: "Russo One", var(--font-sans);
  --font-pixel: "Press Start 2P", monospace;
  --font-retro: "VT323", monospace;

  --maxw: 1200px;
  --radius: 14px;
  --radius-lg: 22px;
  --section-pad: 120px;
}

/* ── Base ── */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { color-scheme: dark; scroll-behavior: smooth; }
html.pre-lang body { visibility: hidden; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
img, video { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.muted { color: var(--text-mute); }

/* 文本换行平衡:消除中文段落末行孤字(1-2 字单独成行),短段各行长度自动接近。
   浏览器不支持时静默退化为普通换行;仅对少数行文本生效,长段落不受影响。 */
h1, h2, h3, h4, p, li { text-wrap: balance; }

.container { max-width: var(--maxw); margin-inline: auto; padding-inline: 24px; }
section[id] { scroll-margin-top: 72px; } /* 锚点跳转时给 sticky nav 留位 */
section { padding-block: var(--section-pad); }

/* ── Section head ── */
.sec-head { text-align: center; margin-bottom: 56px; }
.kicker {
  font-family: var(--font-pixel);
  font-size: 16px; /* 像素字体 8px 网格的整数倍,最清晰;14px 仍偏小且半网格模糊 */
  letter-spacing: .08em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 16px;
}
.sec-head h2 { font-size: clamp(1.7rem, 3.4vw, 2.6rem); font-weight: 700; letter-spacing: .01em; }
.sec-head .lead { margin: 14px auto 0; font-size: 16px; color: var(--text-dim); max-width: 62ch; }

/* ── Nav ── */
.nav {
  position: sticky; top: 0; z-index: 50;
  border-bottom: 1px solid transparent;
  transition: background .3s, border-color .3s;
}
.nav.scrolled {
  background: rgba(0, 0, 0, .72);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-bottom-color: var(--border);
}
.nav-inner { display: flex; align-items: center; gap: 28px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand img { border-radius: 8px; }
.brand-name { font-family: var(--font-display); font-size: 18px; letter-spacing: .02em; }
.links { display: flex; gap: 24px; flex: 1; }
.links a { color: var(--text-dim); font-size: 15px; }
.links a:hover { color: var(--text); text-decoration: none; }
.nav-actions { display: flex; align-items: center; gap: 14px; }

.lang-switch {
  display: flex; border: 1px solid var(--border); border-radius: 999px; overflow: hidden;
}
.lang-switch button {
  background: transparent; border: 0; color: var(--text-dim);
  font-size: 14px; padding: 5px 12px; cursor: pointer;
}
.lang-switch button.active { background: var(--accent); color: #10220f; font-weight: 700; }

.btn-gh {
  display: inline-flex; align-items: center; gap: 7px;
  border: 1px solid var(--border); border-radius: 8px;
  padding: 6px 12px; font-size: 14px; color: var(--text-dim);
  background: var(--panel);
}
.btn-gh:hover { color: var(--text); border-color: var(--border-hi); text-decoration: none; }

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 12px; padding: 13px 28px; font-size: 16px; font-weight: 600;
  border: 1px solid transparent; transition: transform .15s, box-shadow .15s, background .15s;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: #10220f; box-shadow: 0 0 32px var(--accent-glow); }
.btn-primary:hover { background: #6ce79a; }
.btn-ghost { border-color: var(--border-hi); color: var(--accent); background: transparent; }
.btn-ghost:hover { background: var(--accent-glow); }
.btn-lg { padding: 16px 40px; font-size: 17px; }

/* ── S1 Hero ── */
/* 3D mockup 即头部:player 撑满整个 hero(4:3 居中,高度吃满),文案浮于场景上方空黑区,背景纯黑 */
.hero {
  position: relative; overflow: hidden;
  min-height: calc(100vh - 64px); /* nav 高 64px,hero 底边正好落在首屏 */
  min-height: calc(100svh - 64px);
  padding-block: 0; /* 抵消 section 通用段距,hero 由 min-height 控制 */
  background: #000;
}
/* 顶部黑渐变 scrim:场景构图随鼠标视差变化,渐变保证文案在任何相位都可读 */
.hero::before {
  content: ""; position: absolute; z-index: 1;
  inset: 0 0 auto 0; height: 66%;
  background: linear-gradient(to bottom, rgba(0,0,0,.8), rgba(0,0,0,.42) 55%, rgba(0,0,0,0));
  pointer-events: none;
}
/* 左侧水平 scrim:文案左对齐后保护左侧,画面中心保持通透 */
.hero::after {
  content: ""; position: absolute; z-index: 1;
  inset: 0 auto 0 0; width: 46%;
  background: linear-gradient(to right, rgba(0,0,0,.72), rgba(0,0,0,.35) 55%, rgba(0,0,0,0));
  pointer-events: none;
}
.hero-copy {
  position: relative; z-index: 2;
  max-width: 960px;
  margin-inline: 0; /* 覆盖 .container 的居中,文案贴左,画面中心留给 3D 主体 */
  padding-block: 40px 0;
  padding-inline: clamp(32px, 4vw, 64px); /* 左侧留呼吸边距,不贴死 */
  text-align: left;
  pointer-events: none; /* 让 3D 场景可点击;交互元素单独恢复 */
}
.hero-copy a, .hero-copy button { pointer-events: auto; }
.hero-stage {
  position: absolute; inset: 0; z-index: 0;
  display: flex; align-items: center; justify-content: center;
}
.hero-fallback {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
}
/* 16:9 画布 cover:wrapper 放大到至少铺满 hero(mckp 在其内按 16:9 contain,恰好填满),溢出由 .hero 裁掉 → 无黑边 */
.hero-player {
  position: absolute; left: 50%; top: 50%; z-index: 1;
  width: max(100%, calc((100vh - 64px) * 16 / 9));
  width: max(100%, calc((100svh - 64px) * 16 / 9));
  height: max(100%, calc(100vw * 9 / 16));
  transform: translate(-50%, -50%);
}
.hero-player mockup-player { display: block; width: 100%; height: 100%; }

.hero h1 { font-size: clamp(2.2rem, 3.4vw, 3rem); line-height: 1.18; font-weight: 700; letter-spacing: .005em; }
.hero h1 .hl { color: var(--accent); }
.hero .sub { margin: 14px 0 0; font-size: 16px; color: var(--text-dim); max-width: 62ch; }
.cta-row { display: flex; gap: 14px; margin-top: 22px; flex-wrap: wrap; justify-content: flex-start; }
.facts {
  display: flex; gap: 16px; flex-wrap: wrap; list-style: none; margin-top: 16px;
  justify-content: flex-start;
}
.facts li { font-size: 15px; color: var(--text-mute); display: flex; align-items: center; gap: 8px; }
.facts li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); flex: none; }

/* ── S2 Problem ── */
.problem { background: var(--bg-deep); }
.cards-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.card {
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 18px 18px 26px; transition: border-color .2s, transform .2s;
}
.card:hover { border-color: var(--border-hi); transform: translateY(-2px); }
.card img { border-radius: var(--radius); margin-bottom: 18px; width: 100%; }
.card h3 { font-size: 18px; margin-bottom: 10px; }
.card p { color: var(--text-dim); font-size: 15px; }

/* ── S3 Reveal ── */
.rv { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.rv-body { color: var(--text-dim); font-size: 18px; margin-top: 16px; max-width: 56ch; }
.rv .big { font-size: clamp(1.9rem, 3.6vw, 2.9rem); margin-top: 26px; color: var(--text); }
.rv .big::after { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); margin-left: 12px; }
.flow { display: flex; align-items: center; gap: 12px; margin-top: 30px; flex-wrap: wrap; }
.flow-node {
  border: 1px solid var(--border); background: var(--panel); border-radius: 10px;
  padding: 8px 16px; font-family: var(--font-retro); font-size: 22px; color: var(--text-dim);
}
.flow-node.hl { border-color: var(--border-hi); color: var(--accent); }
.flow-arrow { color: var(--text-mute); font-family: var(--font-retro); font-size: 20px; }
.rv-note { margin-top: 14px; color: var(--accent); font-size: 15px; }
.rv-img img { border-radius: var(--radius-lg); border: 1px solid var(--border); }

/* ── S4 Bento ── */
.bento { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.b-cell {
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 26px; display: flex; flex-direction: column; gap: 10px; min-height: 150px;
  transition: border-color .2s, transform .2s;
}
.b-cell:hover { border-color: var(--border-hi); transform: translateY(-2px); }
.b-cell h3 { font-size: 18px; }
.b-cell p { color: var(--text-dim); font-size: 15px; }
.b-wide { grid-column: span 4; }
.b-wide img, .b-wide video { border-radius: var(--radius); margin-top: auto; }
.b-wide video { width: 100%; height: auto; display: block; }
.b-icon { color: var(--accent); display: inline-flex; }
.b-icon svg { width: 26px; height: 26px; }
/* 桌面 4 列下最后两个小格各占半行,避免 4+2 缺角 */
.b-cell:nth-last-child(-n+2) { grid-column: span 2; }

/* ── S5 Scenarios ── */
.scenarios { background: var(--bg-deep); }
.scene {
  display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center;
  padding-block: 56px; border-bottom: 1px solid var(--border);
}
.scene:last-child { border-bottom: 0; }
.scene.rev .scene-media { order: 2; }
.scene-media { display: flex; flex-direction: column; gap: 16px; align-items: center; }
.scene-media img, .scene-media video {
  border-radius: var(--radius-lg); border: 1px solid var(--border);
  box-shadow: 0 18px 48px rgba(0,0,0,.35);
}
.scene-media .media-sub { max-width: 58%; align-self: flex-end; }
.scene-copy h3 { font-size: clamp(1.4rem, 2.4vw, 1.9rem); margin-bottom: 18px; }
.scene-copy p { color: var(--text-dim); margin-bottom: 14px; font-size: 16px; }
.scene-q {
  color: var(--accent) !important; border-left: 3px solid var(--accent);
  padding-left: 14px; font-weight: 600;
}

/* ── S6 Setup ── */
.steps {
  list-style: none; display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 18px; counter-reset: step;
}
.step {
  display: flex; gap: 16px; align-items: flex-start;
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 22px;
}
.step-num {
  font-family: var(--font-pixel); font-size: 16px; color: var(--accent);
  border: 1px solid var(--border-hi); border-radius: 10px;
  width: 40px; height: 40px; flex: none;
  display: flex; align-items: center; justify-content: center;
}
.step h4 { font-size: 16px; margin-bottom: 6px; }
.step p { color: var(--text-dim); font-size: 15px; }
.gate {
  margin-top: 30px; border: 1px dashed rgba(245, 158, 11, .45); border-radius: var(--radius-lg);
  background: rgba(245, 158, 11, .06); padding: 22px 28px;
}
.gate-title { color: var(--warn); font-weight: 700; margin-bottom: 6px; }
.gate p { color: var(--text-dim); font-size: 15px; }

/* ── S7 Download ── */
.download { background: var(--bg-deep); }
.dl { text-align: center; }
.dl h2 { font-size: clamp(1.9rem, 3.6vw, 2.8rem); }
.dl-sub { color: var(--text-dim); margin-top: 12px; font-size: 17px; }
/* 两张下载卡片:GitHub 直链 + 百度网盘镜像,并列同重 */
.dl-cards {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px;
  max-width: 760px; margin: 36px auto 0;
}
.dl-card {
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 30px 26px; display: flex; flex-direction: column; align-items: center;
  gap: 10px; text-align: center;
}
.dl-card h3 { font-size: 1.25rem; letter-spacing: .01em; }
.dl-card p { color: var(--text-dim); font-size: 15px; margin: 0; }
.dl-card .btn { margin-top: 8px; width: 100%; }
.dl-link { margin-top: 4px; color: var(--text-dim); font-size: 14px; }
.dl-link:hover { color: var(--accent); }
.btn-baidu { background: #06a7ff; color: #04121f; box-shadow: 0 0 32px rgba(6, 167, 255, .18); }
.btn-baidu:hover { background: #3db8ff; }
.dl-code {
  margin-top: 2px; color: var(--warn);
  font-family: var(--font-retro); font-size: 17px; letter-spacing: .05em;
  border: 1px dashed var(--border); border-radius: 8px; padding: 6px 16px;
}
.dl-note { margin-top: 22px; color: var(--text-dim); font-size: 15px; line-height: 1.9; }

/* ── S7.5 双 iPad 3D(下载区上方)── */
.duo { background: #000; padding-bottom: 0; }
.download { padding-top: 28px; } /* 紧贴上方 3D 场景 */
.duo-stage { position: relative; max-width: 900px; margin-inline: auto; }
.duo-fallback { display: block; width: 100%; height: auto; border-radius: var(--radius-lg); }
.duo-player { position: absolute; inset: 0; z-index: 1; }
.duo-player mockup-player { display: block; width: 100%; height: 100%; }

/* ── S8 FAQ ── */
.faq-list { max-width: 780px; margin-inline: auto; display: flex; flex-direction: column; gap: 12px; }
details {
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 4px 22px;
}
details summary { cursor: pointer; font-weight: 600; padding: 14px 0; font-size: 16px; list-style: none; }
details summary::before { content: "+ "; color: var(--accent); font-family: var(--font-retro); font-size: 20px; }
details[open] summary::before { content: "− "; }
details p { color: var(--text-dim); padding-bottom: 16px; font-size: 15px; }

/* ── Footer ── */
.foot { background: var(--bg-deep); border-top: 1px solid var(--border); padding-block: 60px 34px; }
.foot-inner { display: grid; gap: 26px; }
.foot-brand { display: flex; gap: 16px; align-items: flex-start; }
.foot-brand img { border-radius: 10px; }
.foot-name { font-family: var(--font-display); font-size: 19px; }
.foot-tagline { font-family: var(--font-retro); font-size: 24px; color: var(--accent); }
.foot-links { display: flex; gap: 22px; flex-wrap: wrap; font-size: 14px; }
.foot-links a { color: var(--text-dim); }
.foot-links a:hover { color: var(--accent); }
.foot-bottom { font-size: 14px; color: var(--text-dim); border-top: 1px solid var(--border); padding-top: 20px; }

/* ── Reveal animation ── */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .6s cubic-bezier(.16,1,.3,1), transform .6s cubic-bezier(.16,1,.3,1); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn, .card, .b-cell { transition: none; }
}

/* ── Responsive ── */
@media (max-width: 1024px) {
  :root { --section-pad: 84px; }
  /* 窄屏:文案与 3D 改为上下排布(文案在正常流内,stage 占剩余高度),避免互相遮挡 */
  .hero { display: flex; flex-direction: column; }
  .hero::before, .hero::after { display: none; } /* 上下排布无叠加,不需要 scrim */
  .hero-copy { padding-block: 40px 8px; }
  .hero-stage { position: relative; inset: auto; flex: 1; min-height: 320px; }
  /* 窄屏按宽度定尺寸:百分比高度在 flex 链上不可靠,宽→高由 aspect-ratio 推出;cover 不适用,回到完整 16:9 */
  .hero-player { position: static; inset: auto; display: block; height: auto; width: 100%; transform: none; }
  .hero-player mockup-player { width: 100%; height: auto; }
  .hero h1 { font-size: clamp(1.25rem, 5.6vw, 2.2rem); } /* 移动端按视口缩放,保证 Slogan 单行(新文案 14 字) */
  .bento { grid-template-columns: repeat(2, 1fr); }
  .b-wide { grid-column: span 2; }
  .b-cell:nth-last-child(-n+2) { grid-column: span 1; }
  .scene { grid-template-columns: 1fr; gap: 28px; padding-block: 44px; }
  .scene.rev .scene-media { order: 0; }
  .scene-media { align-items: center; }
  .rv { grid-template-columns: 1fr; gap: 36px; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .links { display: none; }
}
@media (max-width: 768px) {
  :root { --section-pad: 64px; }
  .cards-3 { grid-template-columns: 1fr; }
  .bento { grid-template-columns: 1fr; }
  .b-wide, .b-cell:nth-last-child(-n+2) { grid-column: span 1; }
  .steps { grid-template-columns: 1fr; }
  .dl-cards { grid-template-columns: 1fr; }
  .nav-actions .btn-gh span { display: none; }
  .nav-actions .btn-gh { padding: 6px 9px; }
  .brand-name { font-size: 16px; }
  .facts { gap: 12px 16px; }
  .flow-node { font-size: 18px; padding: 6px 12px; }
}
@media (orientation: landscape) and (max-height: 500px) {
  .hero-copy { padding-block: 24px 8px; }
  .hero-stage { min-height: 220px; }
  .hero h1 { font-size: 1.7rem; }
  .hero .sub { margin-top: 12px; }
  .cta-row { margin-top: 18px; }
  .facts { margin-top: 14px; }
}
