/* 无限之战安装器 官网
   视觉方向来自 Claude Design 稿：等宽字标签、硬边框、巨标题、网格底纹。
   中文走系统字（国内零请求），等宽字自托拉丁子集（fonts/，OFL 见同目录）。 */

@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 700;          /* 可变字重：一个文件覆盖正文与加粗 */
  font-display: swap;
  src: url('fonts/jetbrains-mono-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
                 U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122,
                 U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg: #08090b;
  --panel: #0b0d11;
  --panel-hi: #0e1218;
  --line: #1c2026;
  --line-soft: #171b21;

  --fg: #e8eaed;
  --fg-2: #8b93a1;
  --fg-3: #6b7280;
  --fg-4: #4b5563;

  /* 两行是有意的：不认 oklch 的浏览器停在上一行 */
  --accent: #35c9e0;
  --accent: oklch(0.80 0.14 200);
  --accent-hi: #5fd8ea;
  --accent-hi: oklch(0.88 0.14 200);
  --accent-ink: #06181c;

  --danger: #f87171;

  --wrap: 1440px;
  --pad: 72px;

  --mono: 'JetBrains Mono', ui-monospace, Consolas, 'Cascadia Mono', monospace;
  --sans: 'PingFang SC', 'Microsoft YaHei', 'Hiragino Sans GB', 'Noto Sans CJK SC',
          system-ui, -apple-system, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }

/* 下面给 .btn / .dl-error 设了 display，会盖掉 UA 的 [hidden]{display:none}。
   JS 靠 hidden 属性控制错误提示与复制按钮的显隐，这条得压回来。 */
[hidden] { display: none !important; }

html { scroll-behavior: smooth; scroll-padding-top: 90px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 15px/1.75 var(--sans);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hi); }

code {
  font-family: var(--mono);
  font-size: .92em;
  color: var(--fg-2);
  background: rgba(255, 255, 255, .04);
  border: 1px solid var(--line);
  padding: .1em .4em;
  word-break: break-all;
}

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--pad); }

/* 等宽小标签：编号、meta、导航之外的一切「机器味」文字 */
.mono {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .32em;
  color: var(--accent);
}

/* ───────────────────────────── 顶栏 ───────────────────────────── */

.topbar {
  position: sticky; top: 0; z-index: 30;
  background: rgba(8, 9, 11, .82);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line-soft);
}
.topbar-inner {
  max-width: var(--wrap); margin: 0 auto;
  padding: 18px var(--pad);
  display: flex; align-items: center; gap: 28px;
  font-family: var(--mono); font-size: 13px;
}
.brand { display: flex; align-items: center; gap: 12px; color: var(--fg); }
.brand img { height: 24px; width: auto; }
/* 字标之后跟一道竖线再跟「安装器」全称，别让人以为下载的是游戏本体 */
.brand-name {
  font-family: var(--mono); font-size: 13px; font-weight: 600; letter-spacing: .02em;
  padding-left: 12px; border-left: 1px solid var(--line);
  color: var(--fg-2); white-space: nowrap;
}
.topnav { display: flex; gap: 28px; margin-left: auto; }
.topnav a { color: var(--fg-2); }
.topnav a:hover { color: var(--fg); }

/* ───────────────────────────── 按钮 ───────────────────────────── */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 12px 24px;
  background: var(--accent);
  color: var(--accent-ink);
  font: 600 14px/1 var(--sans);
  border: 1px solid var(--accent);
  cursor: pointer;
  transition: background .15s ease, box-shadow .15s ease, color .15s ease;
  white-space: nowrap;
}
.btn:hover { background: var(--accent-hi); color: var(--accent-ink); box-shadow: 0 0 28px rgba(53, 201, 224, .45); }

.btn-lg { padding: 18px 34px; font-size: 17px; letter-spacing: .03em; }
.btn-sm { padding: 8px 16px; font-size: 12.5px; }

.btn-ghost {
  background: transparent;
  color: var(--fg);
  border-color: var(--line);
}
.btn-ghost:hover { background: rgba(255, 255, 255, .04); color: var(--fg); box-shadow: none; }

.btn-line {
  background: transparent;
  color: var(--accent);
  border-color: var(--accent);
  font-family: var(--mono);
}
.btn-line:hover { background: var(--accent); color: var(--accent-ink); }

/* 还没从清单里拿到地址时的按钮：可见但点不动，避免指向一个过期链接 */
.btn.is-pending {
  background: transparent;
  color: var(--fg-3);
  border-color: var(--line);
  cursor: default;
  pointer-events: none;
  box-shadow: none;
}

.btn .ext { font-family: var(--mono); font-size: 13px; opacity: .65; }

/* ───────────────────────────── 首屏 ───────────────────────────── */

.hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--line); }
.hero canvas {
  position: absolute; inset: 0; width: 100%; height: 100%;
  pointer-events: none;
}
.hero .fade {
  position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(120% 80% at 20% 0%, rgba(0, 0, 0, 0) 30%, var(--bg) 100%);
}
/* 文案在左、主截图在右。截图列略宽：那张图本身就是 16:9 的窗口截图，
   给它多一点宽度才看得清左侧导航。 */
.hero-inner {
  position: relative;
  max-width: var(--wrap); margin: 0 auto;
  padding: 104px var(--pad);
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: 56px; align-items: center;
}
.hero-copy { display: flex; flex-direction: column; gap: 26px; min-width: 0; }

h1 {
  margin: 0;
  font-size: clamp(44px, 5vw, 78px);
  line-height: .98;
  font-weight: 900;
  letter-spacing: -.02em;
}
h1 .accent { color: var(--accent); text-shadow: 0 0 40px rgba(53, 201, 224, .35); }

.lede {
  margin: 0; max-width: 660px;
  font-size: clamp(15px, 1.6vw, 19px); line-height: 1.7;
  color: var(--fg-2);
  text-wrap: pretty;
}

.cta { display: flex; flex-wrap: wrap; gap: 18px; align-items: center; padding-top: 10px; }
.cta-meta { font-family: var(--mono); font-size: 13px; line-height: 1.8; color: var(--fg-3); }

.nojs {
  max-width: 660px; margin-top: 8px; padding: 14px 16px;
  font-size: 13px; color: var(--fg-2);
  border: 1px solid var(--line);
  background: var(--panel);
}

/* 截图窗口 */
.shot { margin: 0; border: 1px solid var(--line); background: var(--panel); }
.shot img { width: 100%; display: block; }

.hero-shot { box-shadow: 0 40px 90px -40px #000; }

/* ───────────────────────────── 分区骨架 ───────────────────────────── */

.section { padding: 120px 0; }
.section-head { display: flex; flex-direction: column; gap: 14px; margin-bottom: 56px; }
h2 {
  margin: 0;
  font-size: clamp(30px, 4.2vw, 52px);
  font-weight: 900; letter-spacing: -.02em; line-height: 1.15;
}
.section-sub { margin: 0; color: var(--fg-2); max-width: 760px; }

.note {
  margin-top: 28px; padding-left: 14px;
  border-left: 1px solid var(--line);
  font-size: 13px; color: var(--fg-3);
}

/* 揭示动画：只在支持滚动驱动时启用，否则内容直接可见 */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    @keyframes revealUp { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
    .reveal {
      animation: revealUp .7s ease both;
      animation-timeline: view();
      animation-range: entry 0% cover 32%;
    }
  }
}

/* ───────────────────────────── 功能格 ───────────────────────────── */

/* 1px 间隙露出底色，形成硬分隔线，不用圆角卡片 */
.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.cell {
  background: var(--panel);
  padding: 40px 34px;
  display: flex; flex-direction: column; gap: 14px;
  min-height: 220px;
  transition: background .15s ease;
}
.cell:hover { background: var(--panel-hi); }
.cell .no { font-family: var(--mono); font-size: 12px; letter-spacing: .2em; color: var(--accent); }
.cell h3 { margin: 0; font-size: 21px; font-weight: 700; }
.cell p { margin: 0; font-size: 15px; line-height: 1.8; color: var(--fg-2); text-wrap: pretty; }

/* ───────────────────────────── 三步 ───────────────────────────── */

.steps {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px;
}
.steps li {
  border-top: 2px solid var(--accent);
  padding-top: 26px;
  display: flex; flex-direction: column; gap: 12px;
}
.steps .no { font-family: var(--mono); font-size: 44px; font-weight: 700; color: #2a3038; line-height: 1; }
.steps h3 { margin: 0; font-size: 20px; font-weight: 700; }
.steps p { margin: 0; font-size: 15px; line-height: 1.8; color: var(--fg-2); }

/* ───────────────────────────── 下载 ───────────────────────────── */

.dl { border: 1px solid var(--line); background: linear-gradient(120deg, #0b0f14, #0a0c0f); }
.dl-main {
  display: flex; align-items: center; gap: 28px; flex-wrap: wrap;
  padding: 44px;
}
.dl-main img { width: 76px; height: 76px; flex: none; }
.dl-main > .dl-id { flex: 1 1 280px; display: flex; flex-direction: column; gap: 8px; }
.dl-main h3 { margin: 0; font-size: 26px; font-weight: 900; letter-spacing: -.01em; }
.dl-sub { margin: 0; font-family: var(--mono); font-size: 13px; color: var(--fg-3); }

.dl-hash {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 22px 44px;
  border-top: 1px solid var(--line);
}
.dl-hash .label { font-family: var(--mono); font-size: 11px; letter-spacing: .24em; color: var(--fg-4); }
.dl-hash code {
  flex: 1 1 340px;
  font-size: 12.5px; background: transparent; border: none; padding: 0;
  color: var(--fg-2);
}
.dl-error {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  margin: 0 44px 26px; padding: 14px 16px;
  font-size: 13px; color: var(--danger);
  border: 1px solid rgba(248, 113, 113, .35);
  background: rgba(248, 113, 113, .07);
}
.dl-error .btn { color: var(--fg); }

.two {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px;
  background: var(--line); border: 1px solid var(--line); border-top: none;
}
.two.single { grid-template-columns: 1fr; }
.two .cell { min-height: 0; }
.two ul { margin: 0; padding-left: 18px; font-size: 14.5px; line-height: 1.9; color: var(--fg-2); }

/* ───────────────────────────── FAQ ───────────────────────────── */

.faq { border-top: 1px solid var(--line); }
details { border-bottom: 1px solid var(--line); }
summary {
  cursor: pointer; list-style: none;
  display: flex; justify-content: space-between; align-items: center; gap: 24px;
  padding: 26px 4px;
  font-size: 18px; font-weight: 500;
  transition: color .15s ease;
}
summary::-webkit-details-marker { display: none; }
summary:hover { color: var(--accent-hi); }
summary::after {
  content: "+";
  font-family: var(--mono); font-size: 22px; color: var(--accent); line-height: 1;
}
details[open] summary::after { content: "−"; }
details p { margin: 0 4px 28px; font-size: 15.5px; line-height: 1.85; color: var(--fg-2); max-width: 860px; text-wrap: pretty; }

/* ───────────────────────────── CTA 条 ───────────────────────────── */

.band {
  border: 1px solid var(--line);
  background: linear-gradient(120deg, #0b0f14, #0a0c0f);
  padding: 60px 56px;
  display: flex; align-items: center; justify-content: space-between; gap: 40px; flex-wrap: wrap;
}
.band h2 { font-size: clamp(26px, 3.4vw, 44px); }
.band .sub { font-family: var(--mono); font-size: 13px; color: var(--fg-3); margin: 12px 0 0; }

/* ───────────────────────────── 页脚 ───────────────────────────── */

.footer { border-top: 1px solid var(--line); }
.footer-grid {
  max-width: var(--wrap); margin: 0 auto;
  padding: 56px var(--pad);
  display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px;
  font-size: 14px; color: var(--fg-2);
}
.footer-grid h4 {
  margin: 0 0 4px;
  font: 500 11px/1 var(--mono); letter-spacing: .24em; color: var(--fg-4);
}
.footer-col { display: flex; flex-direction: column; gap: 12px; }
.footer-col a { color: var(--fg-2); }
.footer-col a:hover { color: var(--accent); }
.footer-brand { display: flex; align-items: center; gap: 12px; }
.footer-brand img { height: 24px; width: auto; }
.footer-desc { line-height: 1.9; max-width: 400px; margin: 0; }
.footer-bar { border-top: 1px solid var(--line); }
.footer-bar-inner {
  max-width: var(--wrap); margin: 0 auto;
  padding: 22px var(--pad);
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  font-family: var(--mono); font-size: 12px; color: var(--fg-4);
}

/* ───────────────────────────── 窄屏 ───────────────────────────── */

@media (max-width: 1080px) {
  :root { --pad: 40px; }
  /* 再窄下去左右两栏都不够宽，文案先于截图挤成一条：改回上下 */
  .hero-inner { grid-template-columns: 1fr; gap: 48px; }
  .grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  :root { --pad: 20px; }
  .topnav { display: none; }
  .hero-inner { padding: 72px var(--pad); gap: 40px; }
  .section { padding: 72px 0; }
  .section-head { margin-bottom: 36px; }
  .grid, .two { grid-template-columns: 1fr; }
  .cell { padding: 28px 24px; min-height: 0; }
  .dl-main, .dl-hash { padding: 24px; }
  .dl-error { margin: 0 24px 22px; padding-inline: 24px; }
  .band { padding: 36px 24px; }
  .footer-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .cell { transition: none; }
}
