/* 砂城阻击 · 首页样式（游戏本体在 /game/，样式互不相干） */
:root {
  --bg: #16130f;
  --bg2: #1e1a14;
  --panel: #241f18;
  --ink: #efe4d0;
  --muted: #a8977b;
  --line: #3a3226;
  --sand: #e0a458;
  --sand-dark: #b07a35;
  --rust: #c4552f;
  --ok: #8fb35a;
  --mono: "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
h1, h2, h3 { margin: 0; line-height: 1.25; }
main { overflow-x: clip; }
section { scroll-margin-top: 64px; }

/* ---------- 顶栏 ---------- */
.top {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px max(16px, calc((100% - 1120px) / 2));
  background: rgba(22, 19, 15, .82);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 18px; letter-spacing: 3px; text-decoration: none; white-space: nowrap; }
.top-nav { display: flex; align-items: center; gap: 22px; font-size: 14px; }
.top-nav a:not(.btn) { text-decoration: none; color: var(--muted); }
.top-nav a:not(.btn):hover { color: var(--ink); }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-block; text-decoration: none; font-weight: 800;
  background: var(--sand); color: #1a140c;
  clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
  transition: background .15s, transform .12s;
}
.btn:hover { background: #ebb470; }
.btn:active { transform: translateY(2px); }
.btn:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; }
.btn.small { padding: 6px 16px; font-size: 14px; clip-path: polygon(6px 0, 100% 0, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0 100%, 0 6px); }
.btn.big { padding: 15px 44px; font-size: 19px; letter-spacing: 4px; }

/* ---------- 首屏 ---------- */
.hero {
  position: relative;
  min-height: min(88vh, 760px);
  display: flex; align-items: center;
  padding: 72px max(16px, calc((100% - 1120px) / 2)) 160px;
  background: linear-gradient(180deg, #2a1d14 0%, #6b3b1f 48%, #c4703a 78%, #d99556 100%);
  overflow: hidden;
  cursor: crosshair;
}
.dust { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 2; }
.skyline { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 72%; z-index: 1; }
.skyline .far { fill: #8a4a26; opacity: .75; }
.skyline .near { fill: #3a2416; }
.skyline .ground { fill: var(--bg); }
.skyline .flare line { stroke: #ff6a3d; stroke-width: 2; stroke-dasharray: 3 5; opacity: .7; }
.skyline .flare circle { fill: #ff6a3d; animation: blink 1.4s steps(2, end) infinite; }
@keyframes blink { 50% { opacity: .15; } }

.scope {
  position: absolute; z-index: 3; left: 0; top: 0;
  width: 180px; height: 180px; margin: -90px 0 0 -90px;
  border: 2px solid rgba(255, 236, 205, .55); border-radius: 50%;
  box-shadow: 0 0 0 2000px rgba(10, 7, 4, .0);
  pointer-events: none; opacity: 0;
  transition: opacity .25s;
  background:
    linear-gradient(rgba(255, 236, 205, .55), rgba(255, 236, 205, .55)) center / 1px 100% no-repeat,
    linear-gradient(rgba(255, 236, 205, .55), rgba(255, 236, 205, .55)) center / 100% 1px no-repeat;
}
.scope i { position: absolute; left: 50%; top: 50%; width: 6px; height: 6px; margin: -3px; border-radius: 50%; background: #ff5a36; }
.hero.aiming .scope { opacity: 1; }

.hero-text { position: relative; z-index: 4; max-width: 600px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  margin: 0 0 18px; padding: 4px 10px;
  font-family: var(--mono); font-size: 12px; letter-spacing: 2px; color: #ffd9a8;
  background: rgba(0, 0, 0, .28); border: 1px solid rgba(255, 217, 168, .25);
}
.dot { width: 7px; height: 7px; border-radius: 50%; background: #ff6a3d; animation: blink 1.4s steps(2, end) infinite; }
.hero h1 { font-size: clamp(38px, 6vw, 68px); letter-spacing: 4px; text-shadow: 0 3px 24px rgba(0, 0, 0, .35); }
.lead { margin: 20px 0 32px; font-size: 17px; color: #f4dcc0; }
.cta { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 20px; }
.note { font-size: 13px; color: #f0d2ad; }

.hud {
  position: absolute; z-index: 4; right: max(16px, calc((100% - 1120px) / 2)); bottom: 40px;
  display: flex; gap: 2px; margin: 0;
  font-family: var(--mono); font-size: 12px;
}
.hud div { padding: 8px 14px; background: rgba(14, 11, 8, .72); border-top: 2px solid var(--sand); }
.hud dt { color: var(--muted); letter-spacing: 2px; font-size: 11px; }
.hud dd { margin: 2px 0 0; color: var(--ink); white-space: nowrap; }

/* ---------- 通用段落 ---------- */
.loop, .zones, .news, .plan-sec, .stakes { max-width: 1120px; margin: 0 auto; padding: 96px 16px 0; }
.kicker { margin: 0 0 8px; font-family: var(--mono); font-size: 12px; letter-spacing: 3px; color: var(--sand); }
.kicker::before { content: "// "; opacity: .6; }
h2 { font-size: clamp(28px, 4vw, 40px); letter-spacing: 2px; }
.sub { margin: 10px 0 0; color: var(--muted); }

/* ---------- 三步 ---------- */
.steps { list-style: none; margin: 36px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.steps li { position: relative; padding: 26px 24px 28px; background: var(--panel); border: 1px solid var(--line); }
.steps li::after { content: ""; position: absolute; left: 0; top: 0; width: 40px; height: 3px; background: var(--sand); }
.num { font-family: var(--mono); font-size: 13px; color: var(--sand); }
.steps h3 { margin: 10px 0 8px; font-size: 20px; }
.steps p { margin: 0; color: var(--muted); font-size: 15px; }

/* ---------- 背包 ---------- */
.stakes { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.stakes-text h3 { font-size: clamp(26px, 3.4vw, 34px); letter-spacing: 2px; }
.stakes-text p { color: var(--muted); }
.facts { margin: 16px 0 0; padding: 0; list-style: none; }
.facts li { position: relative; padding: 6px 0 6px 22px; border-bottom: 1px dashed var(--line); font-size: 15px; }
.facts li::before { content: ""; position: absolute; left: 2px; top: 15px; width: 8px; height: 8px; background: var(--sand); transform: rotate(45deg); }

.stakes-art { background: var(--panel); border: 1px solid var(--line); padding: 18px; }
.grid {
  position: relative;
  display: grid; grid-template-columns: repeat(8, 1fr); grid-auto-rows: 1fr; gap: 3px;
  aspect-ratio: 8 / 6;
}
.grid .cell { background: #1a1611; border: 1px solid #2e271d; }
.grid .item {
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 4px 6px; font-size: 11px; line-height: 1.2;
  border: 1px solid; cursor: default; overflow: hidden;
  transition: transform .15s, filter .15s;
}
.grid .item:hover { transform: scale(1.03); filter: brightness(1.15); z-index: 1; }
.grid .item b { font-weight: 700; color: var(--ink); }
.grid .item span { font-family: var(--mono); color: var(--muted); font-size: 10px; text-align: right; }
.grid .item.weapon { background: #2b2a22; border-color: #5c5a44; }
.grid .item.ammo { background: #2e2616; border-color: #6e5826; }
.grid .item.med { background: #2b1b19; border-color: #7a3a30; }
.grid .item.loot { background: #2f2512; border-color: var(--sand-dark); }
.grid .item.rare { background: #33220f; border-color: var(--sand); box-shadow: inset 0 0 18px rgba(224, 164, 88, .25); }
.grid-cap { display: flex; justify-content: space-between; margin-top: 10px; font-family: var(--mono); font-size: 12px; color: var(--muted); }
.grid-cap b { color: var(--sand); font-weight: 600; }

/* ---------- 地图 ---------- */
.zone-wrap { margin-top: 32px; display: grid; grid-template-columns: 1.35fr 1fr; gap: 16px; }
.map {
  position: relative; aspect-ratio: 4 / 3;
  background:
    linear-gradient(rgba(224, 164, 88, .06) 1px, transparent 1px) 0 0 / 40px 40px,
    linear-gradient(90deg, rgba(224, 164, 88, .06) 1px, transparent 1px) 0 0 / 40px 40px,
    radial-gradient(ellipse at 60% 40%, #3a2c1c, #1d1812 75%);
  border: 1px solid var(--line);
  overflow: hidden;
}
.map svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.map svg .road { fill: none; stroke: #5a4630; stroke-width: 6; stroke-linecap: round; }
.map svg .wall { fill: none; stroke: #7a5f3c; stroke-width: 2; stroke-dasharray: 6 4; }
.pin {
  position: absolute; transform: translate(-50%, -50%);
  display: flex; align-items: center; gap: 6px;
  padding: 3px 8px 3px 6px; border: 1px solid var(--line);
  background: rgba(20, 16, 12, .85); color: var(--ink);
  font: inherit; font-size: 13px; cursor: pointer; white-space: nowrap;
}
.pin::before { content: ""; width: 8px; height: 8px; background: var(--muted); transform: rotate(45deg); }
.pin.exfil::before { background: var(--ok); }
.pin.danger::before { background: var(--rust); }
.pin[aria-selected="true"] { border-color: var(--sand); color: var(--sand); }
.pin:focus-visible { outline: 2px solid var(--sand); outline-offset: 2px; }

.zone-card { padding: 24px; background: var(--panel); border: 1px solid var(--line); display: flex; flex-direction: column; }
.zone-card .tag { align-self: flex-start; font-family: var(--mono); font-size: 11px; letter-spacing: 2px; padding: 2px 8px; border: 1px solid currentColor; color: var(--muted); }
.zone-card .tag.exfil { color: var(--ok); }
.zone-card .tag.danger { color: var(--rust); }
.zone-card h3 { margin: 12px 0 6px; font-size: 24px; }
.zone-card p { margin: 0; color: var(--muted); font-size: 15px; }
.meters { margin: auto 0 0; padding-top: 20px; display: grid; gap: 10px; }
.meters div { display: grid; grid-template-columns: 56px 1fr; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); }
.bar { height: 6px; background: #3a3226; }
.bar i { display: block; height: 100%; background: var(--sand); transition: width .35s; }
.bar.risk i { background: var(--rust); }

/* ---------- 日志 / 日程 ---------- */
.log, .plan { list-style: none; margin: 28px 0 0; padding: 0; }
.log > li { display: grid; grid-template-columns: 110px 1fr; gap: 20px; padding: 18px 0; border-top: 1px solid var(--line); }
.log time { font-family: var(--mono); color: var(--sand); font-size: 14px; }
.log h3 { font-size: 18px; }
.log ul { margin: 6px 0 0; padding-left: 18px; color: var(--muted); font-size: 15px; }

.plan { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.plan li { padding: 18px 20px; background: var(--panel); border: 1px solid var(--line); border-left: 3px solid var(--line); }
.plan li.st-doing { border-left-color: var(--sand); }
.plan .when { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.plan .tag { margin-left: 8px; font-size: 12px; color: var(--muted); }
.plan li.st-doing .tag { color: var(--sand); }
.plan h3 { margin: 6px 0 4px; font-size: 17px; }
.plan p { margin: 0; color: var(--muted); font-size: 14px; }

/* ---------- 结尾 ---------- */
.final { margin-top: 110px; padding: 90px 16px 100px; text-align: center; background: linear-gradient(180deg, var(--bg) 0%, #3b2414 100%); }
.final-line { margin: 0 0 8px; font-family: var(--mono); font-size: 13px; color: var(--muted); letter-spacing: 1px; }
.final-line b { color: var(--rust); font-weight: 600; }
.final h2 { margin-bottom: 30px; }

footer { padding: 22px 16px 32px; text-align: center; font-size: 13px; color: var(--muted); background: #3b2414; }

/* ---------- 窄屏 ---------- */
@media (max-width: 860px) {
  .steps { grid-template-columns: 1fr; }
  .stakes { grid-template-columns: 1fr; gap: 28px; }
  .stakes-art { order: 2; }
  .zone-wrap { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .top-nav a:not(.btn) { display: none; }
  .hero { padding-top: 56px; padding-bottom: 190px; cursor: auto; }
  .hud { left: 16px; right: 16px; bottom: 24px; }
  .hud div { flex: 1; padding: 6px 8px; }
  .hud dd { white-space: normal; }
  .lead br { display: none; }
  .loop, .zones, .news, .plan-sec, .stakes { padding-top: 72px; }
  .log > li { grid-template-columns: 1fr; gap: 4px; }
  .pin { font-size: 12px; padding: 2px 6px 2px 5px; }
  .grid .item b { font-size: 10px; }
  .grid .item span { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .dot, .skyline .flare circle { animation: none; }
}
