/* Scrap Heap — scrapheap.thenextbeacon.com
 *
 * Palette and type are lifted from the game's own UiPalette resource
 * (data/config/ui_palette.tres) so the site and the app read as one product:
 * bg_deep #0E1416, surface #182124, accent #E8722D, ink #E6DFD2.
 *
 * No build step, no framework, no web fonts. The store review pages have to be
 * reachable and legible on a bad connection from a reviewer's phone, and every
 * kilobyte of that is a liability rather than a feature.
 */

:root {
  --bg: #0e1416;
  --surface: #182124;
  --raised: #222e31;
  --border: #33444a;
  --ink: #e6dfd2;
  --muted: #9aa8a6;
  --accent: #e8722d;
  --accent-hot: #ff8f4a;
  --gold: #e8b83d;
  --measure: 68ch;
  --radius: 10px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  overflow-wrap: break-word;
}

.wrap { width: min(100% - 2.5rem, 74ch); margin-inline: auto; }

a { color: var(--accent-hot); }
a:focus-visible,
button:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

/* ---- header ---- */

header.site {
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, #0e1416, #121a1d);
}
header.site .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  align-items: baseline;
  padding: 1.1rem 0;
}
.brand {
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
  font-size: 1.05rem;
}
.brand span { color: var(--accent); }
nav.site { margin-left: auto; display: flex; gap: 1.1rem; flex-wrap: wrap; }
nav.site a { color: var(--muted); text-decoration: none; font-size: 0.95rem; }
nav.site a:hover, nav.site a[aria-current="page"] { color: var(--ink); }

/* ---- hero ---- */

.hero { padding: 3.5rem 0 2.5rem; }
.rule { width: 132px; height: 8px; border-radius: 4px; background: var(--accent); }
.hero h1 {
  font-size: clamp(2.1rem, 7vw, 3.4rem);
  line-height: 1.05;
  margin: 1.4rem 0 0.8rem;
  letter-spacing: -0.01em;
}
.hero p.lead { font-size: 1.2rem; color: var(--muted); margin: 0 0 1.6rem; max-width: 54ch; }

.badges { display: flex; flex-wrap: wrap; gap: 0.6rem; padding: 0; margin: 0 0 1rem; list-style: none; }
.badges li {
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 999px;
  padding: 0.35rem 0.85rem;
  font-size: 0.88rem;
  color: var(--muted);
}

/* ---- sections ---- */

main { padding-bottom: 4rem; }
section { padding: 2rem 0; border-top: 1px solid var(--border); }
section:first-of-type { border-top: 0; }
h2 { font-size: 1.5rem; margin: 0 0 0.9rem; }
h3 { font-size: 1.1rem; margin: 1.8rem 0 0.5rem; }
p, li { max-width: var(--measure); }

.cards { display: grid; gap: 1rem; grid-template-columns: 1fr; padding: 0; list-style: none; margin: 0; }
@media (min-width: 40rem) { .cards { grid-template-columns: 1fr 1fr; } }
.cards li {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.15rem;
  max-width: none;
}
.cards strong { display: block; margin-bottom: 0.25rem; }
.cards span { color: var(--muted); font-size: 0.96rem; }

.shots { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.shots img {
  width: 100%; height: auto; display: block;
  border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface);
}

table { border-collapse: collapse; width: 100%; margin: 1rem 0; font-size: 0.96rem; }
th, td { text-align: left; padding: 0.55rem 0.7rem; border-bottom: 1px solid var(--border); vertical-align: top; }
th { color: var(--ink); }
td { color: var(--muted); }
code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.92em; background: var(--raised); border-radius: 4px; padding: 0.1em 0.35em;
}

.note {
  border-left: 3px solid var(--accent);
  background: var(--surface);
  padding: 0.85rem 1rem;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 1.4rem 0;
}
.note p { margin: 0; }

.updated { color: var(--muted); font-size: 0.92rem; }

/* ---- footer ---- */

footer.site {
  border-top: 1px solid var(--border);
  padding: 2rem 0 3rem;
  color: var(--muted);
  font-size: 0.93rem;
}
footer.site nav { display: flex; flex-wrap: wrap; gap: 1rem; margin-bottom: 0.9rem; }
footer.site a { color: var(--muted); }

@media (prefers-reduced-motion: no-preference) {
  a, nav.site a { transition: color 120ms ease; }
}

/* ---- hero: the game's own hangar plate, wordmark on top ---- */

.hero-art { position: relative; overflow: hidden; border-bottom: 1px solid var(--border); }
.hero-bg {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: center 38%;
  /* Dimmed so type stays readable over it. The art is atmosphere, not the
     content -- if the wordmark competes with the backdrop, both lose. */
  opacity: 0.55; filter: saturate(0.95);
}
.hero-art::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(14,20,22,0.35) 0%, rgba(14,20,22,0.75) 62%, var(--bg) 100%);
}
.hero-inner { position: relative; z-index: 1; padding: 3.2rem 0 3rem; text-align: center; }
.wordmark { width: min(78%, 460px); height: auto; display: block; margin: 0 auto 1.3rem; }
.tagline {
  font-size: clamp(1.6rem, 5.6vw, 2.5rem); font-weight: 700;
  margin: 0 0 0.5rem; letter-spacing: -0.01em;
}
.hero-inner .sub { color: var(--muted); font-size: 1.08rem; margin: 0 auto 1.4rem; max-width: 42ch; }
.soon {
  display: inline-block; margin: 0;
  border: 1px solid var(--border); border-radius: 999px;
  padding: 0.4rem 1rem; font-size: 0.9rem; color: var(--muted);
  background: rgba(14, 20, 22, 0.6);
}

/* ---- item and hero strips: pixel art, so no smoothing ---- */

.loot, .roster {
  list-style: none; padding: 0; margin: 0 0 1.4rem;
  display: grid; gap: 0.9rem;
  grid-template-columns: repeat(auto-fit, minmax(84px, 1fr));
}
.roster { grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); }
.loot li, .roster li {
  display: flex; flex-direction: column; align-items: center; gap: 0.45rem;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 0.7rem 0.4rem; max-width: none;
}
.loot img, .roster img {
  width: 64px; height: 64px;
  /* These are hand-drawn at small sizes. Bilinear smoothing turns them to
     mush, which is exactly the complaint that got the icon bank reverted. */
  image-rendering: pixelated;
}
.roster img { width: 88px; height: 88px; }
.loot span, .roster span { font-size: 0.82rem; color: var(--muted); text-align: center; }

.shot {
  display: block; width: min(100%, 300px); height: auto; margin: 0 auto;
  border: 1px solid var(--border); border-radius: var(--radius);
}

.flat { color: var(--ink); font-weight: 600; }

/* The header carries the real wordmark, not a text stand-in. A separate
   96px-tall copy (12KB) rather than the 263KB hero art, because this one loads
   on every page including the two a store reviewer opens. */
.brand img { display: block; height: 30px; width: auto; }
@media (min-width: 40rem) { .brand img { height: 34px; } }
