@font-face {
  font-family: "Pixelify Sans";
  src: url("fonts/pixelify-latin.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}
@font-face {
  font-family: "Silkscreen";
  src: url("fonts/silkscreen-latin.woff2") format("woff2");
  font-display: swap;
}

/* 底色 = 像素宝石成片背景（221,217,214）经 H.264 编解码后的实际值 (222,218,215)，视频和页面才无缝 */
:root {
  --bg: #dedad7;
  --bg-2: #d3cecb;
  --bg-3: #e8e5e2;
  --ink: #26232e;
  --ink-2: #5f5966;
  --ink-3: #8b8590;
  --line: #c4bfbb;
  --paper: #f6f4f1;
  --pink: #e0779f;
  --night: #161a3f;
  --amber: #f4b93a;
  --pixel: "Pixelify Sans", "Silkscreen", ui-monospace, monospace;
  --tagfont: "Silkscreen", ui-monospace, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 17px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  -webkit-text-size-adjust: 100%; overflow-x: hidden;
  font-variant-ligatures: none; /* Pixelify 的 fi 连字很怪 */
}
img, video { display: block; max-width: 100%; height: auto; }
video { image-rendering: pixelated; }
a { color: var(--ink); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: #000; }
h1, h2, h3 { margin: 0; line-height: 1.1; font-weight: 600; }
p { margin: 0 0 1rem; }
mark { background: #ffe08a; color: var(--ink); padding: 0 .3em; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.muted { color: var(--ink-3); font-size: .9rem; }

.eyebrow {
  font-family: var(--tagfont); font-size: .72rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink-2); margin: 0 0 1rem;
}
.section-head { max-width: 720px; margin-bottom: 48px; }
.section-title { font-family: var(--pixel); font-size: clamp(2rem, 4.2vw, 3.2rem); font-weight: 600; letter-spacing: -.01em; margin-bottom: 1rem; }
.section-title.small { font-size: clamp(1.5rem, 2.6vw, 2rem); margin: 0 0 .8rem; }
.sub { color: var(--ink-2); font-size: 1.08rem; max-width: 40em; }
.lead { font-size: 1.15rem; color: var(--ink-2); max-width: 32em; }

.draft { position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; background: #c8323a; color: #fff; text-align: center; font: 600 .78rem/2.2 system-ui, sans-serif; letter-spacing: .08em; }

/* ---------- 标本标签（照成片左上角） ---------- */
.tag { display: grid; gap: .15rem; justify-items: start; }
.tag-name { font-family: var(--pixel); font-weight: 600; font-size: 1.08rem; line-height: 1.2; padding-bottom: .3rem; border-bottom: 2px solid var(--accent, var(--ink)); }
.tag-sub { font-size: .82rem; color: var(--ink-2); margin-top: .25rem; }
.formula { font-size: .82rem; color: var(--accent, var(--ink-2)); font-weight: 500; letter-spacing: .01em; }

/* ---------- 页头 ---------- */
.top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1.5rem; max-width: 1180px; margin: 0 auto; padding: 22px 24px; }
.brand { display: flex; align-items: center; gap: .6rem; font-family: var(--pixel); font-weight: 600; font-size: 1.2rem; color: var(--ink); text-decoration: none; }
.brand img { image-rendering: pixelated; }
.top nav { display: flex; flex-wrap: wrap; gap: .25rem 1.4rem; }
.top nav a { color: var(--ink-2); text-decoration: none; font-size: .95rem; }
.top nav a:hover { color: var(--ink); }

/* ---------- 首屏 ---------- */
.hero { padding: 24px 0 72px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 40px; align-items: center; }
.hero h1 { font-family: var(--pixel); font-weight: 600; font-size: clamp(3rem, 7vw, 5.6rem); line-height: .98; letter-spacing: -.02em; max-width: 8em; }
.rule { display: block; width: 120px; height: 4px; background: var(--pink); margin: 1.6rem 0 1.4rem; }
.actions { display: flex; flex-wrap: wrap; gap: .8rem 1.2rem; align-items: center; margin: 1.6rem 0 0; }
.btn {
  display: inline-block; text-decoration: none; font-family: var(--pixel); font-weight: 600; font-size: 1rem;
  background: var(--ink); color: var(--bg); padding: .75rem 1.3rem; box-shadow: 4px 4px 0 var(--pink);
  transition: transform .12s ease, box-shadow .12s ease;
}
.btn:hover { color: #fff; transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--pink); }
.btn.ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 2px var(--ink); }
.btn.ghost:hover { background: var(--ink); color: var(--bg); }
.text-link { color: var(--ink-2); font-size: .95rem; }
.stats { display: flex; gap: 36px; margin: 2.4rem 0 0; padding-top: 1.4rem; border-top: 1px solid var(--line); }
.stats div { display: grid; }
.stats dt { font-family: var(--pixel); font-weight: 600; font-size: 1.9rem; line-height: 1; }
.stats dd { margin: .35rem 0 0; color: var(--ink-2); font-size: .85rem; }
.hero-film { margin: 0; position: relative; }
.hero-film video { width: 100%; max-width: 560px; margin-left: auto; aspect-ratio: 3 / 4; }
.hero-film figcaption { position: absolute; left: 8%; top: 4%; }

/* ---------- 区块 ---------- */
.block { padding: 96px 0; border-top: 1px solid var(--line); }

/* 宝石墙 */
.wall { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px 28px; }
.cell { margin: 0; }
.cell video { width: 100%; aspect-ratio: 1; }
.cell figcaption { padding: 0 6% 24px; margin-top: -6%; position: relative; }

/* 原石 → 切 → 出火彩 */
.process { background: var(--bg-2); padding: 56px 0; }
.process-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.process figure { margin: 0; background: var(--bg); }
.process img { width: 100%; aspect-ratio: 1; image-rendering: pixelated; }
.process figcaption { font-family: var(--pixel); font-weight: 600; font-size: 1.1rem; padding: 12px 16px 16px; display: flex; gap: .8rem; align-items: baseline; }
.process figcaption span { font-family: var(--tagfont); font-size: .75rem; color: var(--ink-3); }

/* 成片 */
.films { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px; }
.film { margin: 0; }
.film video { width: 100%; aspect-ratio: 3 / 4; background: var(--bg); }
.film figcaption { padding-top: 8px; }
.film p { color: var(--ink-2); font-size: .92rem; margin-top: .8rem; }

/* ---------- 游戏 ---------- */
.game { padding-bottom: 96px; background: var(--bg); }
.game-hero { position: relative; min-height: 560px; display: flex; align-items: flex-end; overflow: hidden; color: #fff; isolation: isolate; }
.game-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; z-index: -2; }
.game-hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(22,26,63,.82) 0%, rgba(22,26,63,.45) 42%, rgba(22,26,63,0) 70%), linear-gradient(180deg, rgba(22,26,63,0) 55%, rgba(22,26,63,.55) 100%); }
.game-head { width: 100%; padding-top: 96px; padding-bottom: 56px; }
.game-hero .eyebrow { color: var(--amber); }
.game-hero .lead { color: #ece9f6; }
.logo { font-family: var(--pixel); font-weight: 700; font-size: clamp(3.4rem, 9vw, 6.4rem); line-height: .9; letter-spacing: .01em; color: var(--amber); text-shadow: 4px 4px 0 var(--night); margin-bottom: 1.2rem; }
.logo small { display: block; font-size: .3em; letter-spacing: .3em; text-transform: uppercase; color: #ffd0e2; text-shadow: 2px 2px 0 var(--night); margin-top: .6rem; }
.chips { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0; }
.chip { display: inline-flex; align-items: center; gap: .5rem; font-size: .82rem; font-weight: 600; background: rgba(22,26,63,.7); color: #fff; padding: .4rem .8rem; border: 1px solid rgba(255,255,255,.3); }
.chip i { width: 8px; height: 8px; background: var(--amber); box-shadow: 0 0 8px var(--amber); }
.game-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; align-items: center; padding-top: 64px; padding-bottom: 64px; }
.case { margin: 0; }
.case video { width: 100%; max-width: 480px; aspect-ratio: 3 / 4; background: var(--bg); }
.case figcaption { margin-top: .8rem; color: var(--ink-2); font-size: .92rem; }
.game-text p { color: var(--ink-2); }
.feats { list-style: none; padding: 0; margin: 1.2rem 0; display: grid; gap: .6rem; }
.feats li { padding-left: 1.4rem; position: relative; }
.feats li::before { content: ""; position: absolute; left: 0; top: .62em; width: 8px; height: 8px; background: var(--pink); transform: rotate(45deg); }
.scene-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-top: 1.6rem; }
.scene { margin: 0; position: relative; }
.scene img { width: 100%; aspect-ratio: 402 / 560; object-fit: cover; object-position: 50% 25%; }
.scene figcaption { position: absolute; left: 12px; bottom: 12px; font-family: var(--tagfont); font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; background: var(--ink); color: var(--bg); padding: .3rem .6rem; }

/* ---------- 联系 ---------- */
.contact-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 56px; align-items: center; }
.contact p { color: var(--ink-2); }
.contact-card { background: var(--paper); padding: 28px 32px; border: 1px solid var(--line); }
.contact-card .mail { font-size: 1.25rem; font-weight: 600; word-break: break-all; color: var(--ink); margin-bottom: .4rem; }

/* ---------- 页脚 ---------- */
footer { border-top: 1px solid var(--line); background: var(--bg-2); color: var(--ink-2); font-size: .88rem; padding: 48px 0 64px; }
.foot { max-width: 1180px; margin: 0 auto; padding: 0 24px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px 48px; }
.foot-brand { display: flex; gap: .6rem; align-items: center; font-family: var(--pixel); font-weight: 600; color: var(--ink); font-size: 1.05rem; }
.foot-brand img { image-rendering: pixelated; }
footer a { color: var(--ink-2); }
.copy { max-width: 1180px; margin: 24px auto 0; padding: 0 24px; color: var(--ink-3); }

/* ---------- 文档页 ---------- */
.doc-wrap { padding: 16px 24px 96px; }
.paper { max-width: 820px; margin: 0 auto; background: var(--paper); padding: clamp(28px, 5vw, 64px); border: 1px solid var(--line); }
.prose h1 { font-family: var(--pixel); font-size: clamp(1.8rem, 4vw, 2.5rem); margin-bottom: .6rem; }
.prose h2 { font-size: 1.18rem; margin: 2.4rem 0 .8rem; }
.prose h3 { font-size: 1.03rem; margin: 1.6rem 0 .5rem; }
.prose ul { padding-left: 1.3rem; }
.prose li { margin-bottom: .4rem; }
.summary { background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--pink); padding: 18px 22px 6px; margin: 1.6rem 0; }
.summary ul { margin: 0 0 1rem; }
table { width: 100%; border-collapse: collapse; font-size: .95rem; margin: .6rem 0 1.2rem; display: block; overflow-x: auto; }
th, td { text-align: left; vertical-align: top; padding: .65rem .8rem; border-bottom: 1px solid var(--line); }
th { background: var(--bg-3); }
.game-links { padding: 0 24px 64px; color: var(--ink-2); background: var(--bg); margin: 0; max-width: none; text-align: center; }
body.game .game { padding-bottom: 32px; }

/* ---------- 窄屏 ---------- */
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
@media (max-width: 980px) {
  .wall { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .films { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 820px) {
  .hero-grid, .game-body, .contact-grid { grid-template-columns: 1fr; gap: 32px; }
  .hero-film { order: -1; }
  .hero-film video { margin: 0 auto; max-width: 420px; }
  .block { padding: 72px 0; }
}
@media (max-width: 600px) {
  body { font-size: 16px; }
  .wrap, .top, .foot, .copy { padding-left: 16px; padding-right: 16px; }
  .wall { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 12px; }
  .tag-name { font-size: .95rem; }
  .process-grid { gap: 8px; }
  .process figcaption { font-size: .85rem; padding: 8px 10px 10px; flex-direction: column; gap: .1rem; }
  .films { grid-template-columns: 1fr 1fr; gap: 16px; }
  .film p { font-size: .85rem; }
  .stats { gap: 22px; }
  .game-hero { min-height: 520px; }
  .game-hero::after { background: linear-gradient(180deg, rgba(22,26,63,.1) 0%, rgba(22,26,63,.35) 40%, rgba(22,26,63,.88) 100%); }
  .scene-row { grid-template-columns: repeat(3, 72%); overflow-x: auto; scroll-snap-type: x mandatory; }
  .scene { scroll-snap-align: start; }
}

/* ---------- 品牌（Oldcircle：墨 #1F1E1D、陶土橙 #D97757） ---------- */
:root { --brand: #d97757; --brand-ink: #1f1e1d; --pink: var(--brand); }
.brand img { height: 40px; width: auto; image-rendering: auto; }
.foot-brand img { height: 36px; width: auto; image-rendering: auto; }

/* ---------- 资料页 ---------- */
.press .section-title.small { margin-top: 56px; }
.press-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; }
.press-grid .section-title.small { margin-top: 0; }
.facts { margin: 0; display: grid; gap: 0; border-top: 1px solid var(--line); }
.facts div { display: grid; grid-template-columns: 9.5em minmax(0, 1fr); gap: 1rem; padding: .7rem 0; border-bottom: 1px solid var(--line); }
.facts dt { font-family: var(--tagfont); font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); padding-top: .25rem; }
.facts dd { margin: 0; }
.press p { color: var(--ink-2); }
.logos { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 1rem; }
.logo-tile { display: grid; gap: .6rem; text-decoration: none; color: var(--ink-2); font-size: .82rem; }
.logo-tile img { width: 100%; aspect-ratio: 16 / 10; object-fit: contain; background: var(--paper); border: 1px solid var(--line); padding: 18px; }
.logo-tile.dark img { background: var(--brand-ink); }
.press-gems { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 8px; }
.press-gem { display: grid; gap: .2rem; text-decoration: none; color: var(--ink-2); font-size: .75rem; text-align: center; }
.press-gem img { width: 100%; image-rendering: pixelated; }
.press-films { padding-left: 1.2rem; color: var(--ink-2); }
@media (max-width: 820px) {
  .press-grid { grid-template-columns: 1fr; }
  .logos { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .press-gems { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .facts div { grid-template-columns: 1fr; gap: .1rem; }
}
