/* ==========================================================
   SCRAPHEAD — game page
   Visual language lifted from the game: Lilita One titles,
   Balsamiq Sans body, a thick #141414 ink contour on everything,
   dark junkyard greens, parchment route maps and gold buttons.
   ========================================================== */

:root {
  --ink: #141414;
  --bg: #1b2118;
  --bg-2: #222a1e;
  --bg-deep: #12160f;
  --panel: #2a2c28;
  --panel-2: #353831;
  --gold: #f6cf4c;
  --gold-btn: #e9c064;
  --cream: #f4eedb;
  --muted: #b7bba8;
  --dim: #868b79;
  --up: #7fe07f;
  --down: #f36a5c;
  --swarm: #a3d25b;
  --parch: #d9d19f;
  --parch-ink: #4b4a33;
  --parch-icon: #74724f;
  --display: 'Lilita One', 'Arial Black', system-ui, sans-serif;
  --body: 'Balsamiq Sans', 'Comic Sans MS', system-ui, sans-serif;
  --line: 4px;

  /* Outline for chunky display type, in em so it scales with the text. */
  --outline:
    -.04em -.04em 0 var(--ink), .04em -.04em 0 var(--ink),
    -.04em .04em 0 var(--ink), .04em .04em 0 var(--ink),
    0 -.055em 0 var(--ink), 0 .055em 0 var(--ink),
    -.055em 0 0 var(--ink), .055em 0 0 var(--ink);

  --crosshair: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'%3E%3Cg fill='none' stroke-linecap='round'%3E%3Ccircle cx='16' cy='16' r='8.5' stroke='%23141414' stroke-width='5'/%3E%3Cpath d='M16 2.5v6M16 23.5v6M2.5 16h6M23.5 16h6' stroke='%23141414' stroke-width='5'/%3E%3Ccircle cx='16' cy='16' r='8.5' stroke='%23f6cf4c' stroke-width='2.2'/%3E%3Cpath d='M16 2.5v6M16 23.5v6M2.5 16h6M23.5 16h6' stroke='%23f6cf4c' stroke-width='2.2'/%3E%3C/g%3E%3C/svg%3E") 16 16, crosshair;
  --crosshair-lock: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'%3E%3Cg fill='none' stroke-linecap='round'%3E%3Ccircle cx='16' cy='16' r='8.5' stroke='%23141414' stroke-width='5'/%3E%3Cpath d='M16 2.5v6M16 23.5v6M2.5 16h6M23.5 16h6' stroke='%23141414' stroke-width='5'/%3E%3Ccircle cx='16' cy='16' r='8.5' stroke='%23f36a5c' stroke-width='2.2'/%3E%3Cpath d='M16 2.5v6M16 23.5v6M2.5 16h6M23.5 16h6' stroke='%23f36a5c' stroke-width='2.2'/%3E%3C/g%3E%3Ccircle cx='16' cy='16' r='3.2' fill='%23f36a5c' stroke='%23141414' stroke-width='1.5'/%3E%3C/svg%3E") 16 16, pointer;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--cream);
  font-family: var(--body);
  font-size: 18px;
  line-height: 1.55;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  cursor: var(--crosshair);
}
a, button, [role="radio"] { cursor: var(--crosshair-lock); }
img { max-width: 100%; }
::selection { background: var(--gold); color: var(--ink); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 4px; border-radius: 8px; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--gold); color: var(--ink); padding: 8px 14px; border-radius: 8px; font-family: var(--display); }
.skip:focus { left: 8px; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 20px; }
section { position: relative; padding: 110px 0; }

/* ---------- Hand-drawn ink panels ----------
   The fill and contour sit on a wobbled pseudo-element so text stays crisp. */
.ink { position: relative; isolation: isolate; }
.ink::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: var(--fill, var(--panel));
  border: var(--line) solid var(--ink);
  border-radius: 18px;
  box-shadow: 0 8px 0 rgba(0, 0, 0, .35);
  filter: url(#wobble);
}

/* ---------- Buttons (the game's menu buttons) ---------- */
.btn {
  --fill: #30332d;
  position: relative; isolation: isolate;
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  padding: .7em 1.3em;
  font-family: var(--display); font-size: 1.1rem; letter-spacing: .02em; line-height: 1;
  color: var(--cream); text-decoration: none;
  background: none; border: 0;
  transition: transform .15s ease;
}
.btn::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: var(--fill);
  border: var(--line) solid var(--ink); border-radius: 12px;
  box-shadow: inset 0 3px 0 rgba(255, 255, 255, .1), 0 5px 0 var(--ink);
  filter: url(#wobble);
  transition: box-shadow .15s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn:hover::before { box-shadow: inset 0 3px 0 rgba(255, 255, 255, .14), 0 7px 0 var(--ink); }
.btn:active { transform: translateY(3px); }
.btn:active::before { box-shadow: inset 0 3px 0 rgba(255, 255, 255, .1), 0 2px 0 var(--ink); }
.btn-gold { --fill: var(--gold-btn); color: #2a2410; }
.btn svg { width: 1.25em; height: 1.25em; flex: none; }
.btn-sm { font-size: .95rem; padding: .55em .95em; }
.btn-lg { font-size: 1.3rem; padding: .8em 1.5em; }
.btn-block { width: 100%; }

/* ---------- Type ---------- */
.kicker {
  font-family: var(--display); text-transform: uppercase; letter-spacing: .14em;
  color: var(--muted); font-size: .92rem; margin: 0 0 10px;
}
.title {
  font-family: var(--display); font-weight: 400;
  font-size: clamp(2.3rem, 5vw, 3.8rem); line-height: 1.02;
  color: var(--gold); margin: 0 0 .35em;
  text-shadow: var(--outline), 0 .1em 0 var(--ink);
}
.lede { font-size: 1.2rem; color: var(--muted); margin: 0; }
.sec-head { max-width: 740px; margin-bottom: 52px; }
.sec-head.center { text-align: center; margin-inline: auto; }

.logo-title {
  display: flex; white-space: nowrap;
  font-family: var(--display); font-weight: 400;
  font-size: clamp(3.3rem, 8.4vw, 7rem); line-height: .95;
  color: var(--gold); margin: 0; letter-spacing: .005em;
  text-shadow: var(--outline), 0 .1em 0 var(--ink);
}
.logo-title span { display: inline-block; transition: transform .2s; }
.logo-title span:hover { transform: translateY(-.08em) rotate(-4deg); }
.js .hero .logo-title span { animation: drop-in .8s cubic-bezier(.3, 1.6, .5, 1) both; }
.hero .logo-title span:nth-child(2) { animation-delay: .05s; }
.hero .logo-title span:nth-child(3) { animation-delay: .1s; }
.hero .logo-title span:nth-child(4) { animation-delay: .15s; }
.hero .logo-title span:nth-child(5) { animation-delay: .2s; }
.hero .logo-title span:nth-child(6) { animation-delay: .25s; }
.hero .logo-title span:nth-child(7) { animation-delay: .3s; }
.hero .logo-title span:nth-child(8) { animation-delay: .35s; }
.hero .logo-title span:nth-child(9) { animation-delay: .4s; }
@keyframes drop-in {
  0% { transform: translateY(-1.2em) rotate(-10deg); opacity: 0; }
  60% { opacity: 1; }
  100% { transform: none; opacity: 1; }
}

/* ---------- Nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; align-items: center; gap: 18px;
  padding: 12px 20px;
  transition: background .25s, box-shadow .25s;
}
.nav.scrolled { background: rgba(20, 25, 17, .94); box-shadow: 0 4px 0 var(--ink); }
.nav-back {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 5px 13px 5px 6px;
  background: #fff6e6; color: #2a1d10;
  border: 3px solid var(--ink); border-radius: 999px;
  font-family: 'Fredoka', var(--body); font-weight: 700; font-size: .92rem; text-decoration: none;
  box-shadow: 0 3px 0 var(--ink);
  transition: transform .15s;
}
.nav-back:hover { transform: translateY(-2px) rotate(-2deg); }
.nav-back img { display: block; }
.nav-logo {
  font-family: var(--display); color: var(--gold); font-size: 1.55rem; text-decoration: none;
  text-shadow: var(--outline), 0 .09em 0 var(--ink);
}
.nav-links { display: flex; gap: 2px; margin: 0 auto; }
.nav-links a {
  color: var(--cream); text-decoration: none; font-family: var(--display);
  padding: 6px 11px; border-radius: 8px; opacity: .85; transition: background .15s, opacity .15s;
}
.nav-links a:hover { background: rgba(255, 255, 255, .08); opacity: 1; }
.nav-right { display: flex; align-items: center; gap: 14px; margin-left: auto; }
.nav-links + .nav-right { margin-left: 0; }
.scrap-hud {
  display: flex; align-items: center; gap: 6px;
  font-family: var(--display); font-size: 1.35rem; color: var(--gold);
  text-shadow: var(--outline);
}
.scrap-hud svg { width: 28px; height: 28px; }
.scrap-hud.bump { animation: pop .4s cubic-bezier(.3, 1.6, .5, 1); }

/* ---------- Hero ---------- */
.hero {
  min-height: 100vh; min-height: 100svh;
  display: flex; align-items: center;
  padding: 120px 0 140px;
  background: radial-gradient(ellipse 70% 80% at 72% 50%, #34422d 0%, #252e21 48%, #171d14 100%);
  overflow: hidden;
}
.hero-tracks {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 34% 22% at 68% 64%, transparent 88%, rgba(0, 0, 0, .12) 89% 92%, transparent 93%),
    radial-gradient(ellipse 46% 30% at 64% 60%, transparent 90%, rgba(0, 0, 0, .1) 91% 93%, transparent 94%),
    radial-gradient(ellipse 26% 18% at 22% 30%, transparent 86%, rgba(0, 0, 0, .1) 87% 91%, transparent 92%);
}
.hero-grid { display: grid; grid-template-columns: 1fr 1.08fr; align-items: center; gap: 30px; position: relative; width: 100%; }
.by { font-family: var(--display); color: var(--muted); font-size: 1.45rem; margin: .45em 0 1.1em; }
.hero-tag { font-family: var(--display); font-size: clamp(1.6rem, 3vw, 2.3rem); line-height: 1.12; margin: 0 0 .5em; }
.hero-tag em { font-style: normal; color: var(--swarm); }
.hero-sub { color: var(--muted); max-width: 32em; margin: 0; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 16px; margin: 30px 0 24px; }
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 0; }
.chips li {
  font-family: var(--display); font-size: .92rem;
  padding: 4px 13px; border: 3px solid var(--ink); border-radius: 999px;
  background: var(--panel-2); color: var(--cream);
}
.hero-art { position: relative; }
.hero-robot { display: block; width: 100%; height: auto; filter: drop-shadow(0 26px 30px rgba(0, 0, 0, .35)); }

/* Aliens are targets: click them for scrap. */
.alien {
  position: absolute; z-index: 3; padding: 0; border: 0; background: none;
  animation: alien-bob 2.6s ease-in-out infinite;
}
.alien img { display: block; width: 100%; height: auto; filter: drop-shadow(0 10px 6px rgba(0, 0, 0, .35)); transition: transform .15s; }
.alien:hover img { transform: scale(1.08) rotate(-4deg); }
.alien.dead { animation: alien-die .7s cubic-bezier(.5, 0, .8, .4) forwards; pointer-events: none; }
.alien.dead img { filter: brightness(2.2) saturate(0); }
.alien.respawn { animation: alien-in .5s cubic-bezier(.3, 1.6, .5, 1) both, alien-bob 2.6s ease-in-out .5s infinite; }
@keyframes alien-bob { 0%, 100% { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(-12px) rotate(3deg); } }
@keyframes alien-die {
  0% { transform: scale(1); }
  18% { transform: scale(1.25, .75); opacity: 1; }
  100% { transform: translateY(90px) rotate(220deg) scale(.3); opacity: 0; }
}
@keyframes alien-in { from { transform: scale(0) rotate(-90deg); opacity: 0; } to { transform: none; opacity: 1; } }
.alien-hero-a { width: 16%; right: 2%; top: -8%; animation-delay: -.8s; }
.alien-hero-b { width: 21%; left: -4%; top: 2%; animation-delay: -1.6s; }
.peek-swarm { width: 110px; right: 4%; top: 40px; }
.peek-chassis { width: 104px; left: 3%; top: 60px; animation-delay: -1s; }
.peek-loot { width: 96px; right: 6%; top: 70px; animation-delay: -2s; }
.peek-bounty { width: 112px; left: 4%; bottom: 40px; animation-delay: -.4s; }

.nut {
  position: absolute; width: 30px; height: 30px; pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'%3E%3Cpath d='M20 3 35 11.5 35 28.5 20 37 5 28.5 5 11.5Z' fill='%23a9b3b6' stroke='%23141414' stroke-width='4' stroke-linejoin='round'/%3E%3Cpath d='M20 8 30 13.5' stroke='%23dfe6e8' stroke-width='3' stroke-linecap='round'/%3E%3Ccircle cx='20' cy='20' r='6' fill='%23353831' stroke='%23141414' stroke-width='3'/%3E%3C/svg%3E") center / contain no-repeat;
  animation: nut-float 6s ease-in-out infinite;
}
.n1 { left: 6%; bottom: 6%; animation-delay: -1s; }
.n2 { right: 10%; bottom: 0; width: 22px; height: 22px; animation-delay: -3s; }
.n3 { left: 44%; top: -4%; width: 20px; height: 20px; animation-delay: -4.5s; }
@keyframes nut-float { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-16px) rotate(80deg); } }

/* Rocky arena rim used between sections. */
.rock-edge {
  position: absolute; left: 0; right: 0; bottom: -1px; height: 46px; pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='46' viewBox='0 0 240 46'%3E%3Cpath d='M0 22 L18 13 36 24 58 9 82 19 104 7 128 21 150 11 174 25 198 13 220 19 240 22 V46 H0Z' fill='%231b2118'/%3E%3Cpath d='M0 22 L18 13 36 24 58 9 82 19 104 7 128 21 150 11 174 25 198 13 220 19 240 22' fill='none' stroke='%23141414' stroke-width='5' stroke-linejoin='round'/%3E%3C/svg%3E") repeat-x left bottom / 240px 46px;
}
.rock-edge.top {
  top: -45px; bottom: auto;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='46' viewBox='0 0 240 46'%3E%3Cpath d='M0 22 L18 13 36 24 58 9 82 19 104 7 128 21 150 11 174 25 198 13 220 19 240 22 V46 H0Z' fill='%2312160f'/%3E%3Cpath d='M0 22 L18 13 36 24 58 9 82 19 104 7 128 21 150 11 174 25 198 13 220 19 240 22' fill='none' stroke='%23141414' stroke-width='5' stroke-linejoin='round'/%3E%3C/svg%3E");
}

/* ---------- The pitch ---------- */
.swarm { background: var(--bg); }
.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.pillar { padding: 32px 28px 30px; }
.pillar-icon {
  width: 78px; height: 78px; display: grid; place-items: center;
  background: var(--swarm); color: var(--ink);
  border: 4px solid var(--ink); border-radius: 50%;
  box-shadow: 0 5px 0 var(--ink);
  margin-bottom: 18px; transform: rotate(-6deg);
}
.pillar:nth-child(2) .pillar-icon { background: var(--gold-btn); transform: rotate(5deg); }
.pillar:nth-child(3) .pillar-icon { background: #ec7b5f; transform: rotate(-3deg); }
.pillar-icon svg { width: 46px; height: 46px; }
.pillar h3 { font-family: var(--display); font-weight: 400; font-size: 1.7rem; line-height: 1.1; margin: 0 0 .35em; }
.pillar p { margin: 0; color: var(--muted); }

.screen { margin: 70px 0 0; }
.screen-frame {
  border: 5px solid var(--ink); border-radius: 18px; overflow: hidden;
  box-shadow: 0 10px 0 var(--ink), 0 40px 70px rgba(0, 0, 0, .45);
  transform: rotate(-1deg);
}
.screen-frame img { display: block; width: 100%; height: auto; }
.screen figcaption { font-family: var(--display); color: var(--muted); text-align: center; margin-top: 22px; font-size: 1.1rem; }

/* ---------- Route map ---------- */
.run { background: var(--bg); padding-top: 40px; }
.map { --fill: var(--parch); color: var(--parch-ink); padding: 48px 44px 44px; }
.map::before {
  background:
    radial-gradient(circle at 30% 40%, rgba(90, 80, 30, .07) 0 2px, transparent 3px) 0 0 / 37px 41px,
    radial-gradient(circle at 70% 70%, rgba(90, 80, 30, .06) 0 1.5px, transparent 2.5px) 0 0 / 23px 29px,
    radial-gradient(ellipse at 50% 0%, #e3dcab, transparent 70%),
    var(--parch);
}
.map-head { text-align: center; margin-bottom: 30px; }
.map-zone { font-family: var(--display); color: #56702f; letter-spacing: .16em; text-transform: uppercase; margin: 0; font-size: 1rem; }
.map-title { font-family: var(--display); font-weight: 400; color: var(--ink); font-size: clamp(2.3rem, 5vw, 3.7rem); line-height: 1.05; margin: 0; text-transform: uppercase; }
.map-sub { max-width: 620px; margin: .6em auto 0; color: var(--parch-ink); font-size: 1.08rem; }

.route {
  list-style: none; margin: 0; padding: 96px 0 50px; position: relative;
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px;
}
.route-lines { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.route-lines path { fill: none; stroke: rgba(70, 66, 40, .5); stroke-width: 3.5; stroke-dasharray: 9 10; stroke-linecap: round; }
.node { position: relative; z-index: 1; text-align: center; }
.node:nth-child(even) { transform: translateY(54px); }
.node-btn {
  width: 92px; height: 92px; margin: 0 auto 12px;
  display: grid; place-items: center;
  background: var(--parch); color: var(--parch-icon);
  border: 0; border-radius: 50%;
  transition: transform .25s cubic-bezier(.3, 1.6, .5, 1), color .2s, box-shadow .2s;
}
.node-btn svg { width: 56px; height: 56px; }
.node-btn:hover { transform: scale(1.1) rotate(-5deg); color: #3d3b27; }
.node-btn[aria-pressed="true"] {
  color: var(--ink); transform: scale(1.06);
  box-shadow: 0 0 0 6px var(--parch), 0 0 0 11px var(--ink);
}
.node h3 { font-family: var(--display); font-weight: 400; color: var(--ink); margin: 0; font-size: 1.22rem; text-transform: uppercase; letter-spacing: .03em; }
.node p { margin: .25em auto 0; max-width: 16em; font-size: .95rem; color: var(--parch-ink); opacity: .6; transition: opacity .3s; }
.node.is-active p { opacity: 1; }
.route-robot {
  position: absolute; left: 0; top: 0; z-index: 2; width: 72px; height: auto;
  pointer-events: none; opacity: 0;
  transition: transform 1s cubic-bezier(.55, 0, .3, 1), opacity .4s;
}
.route-robot.ready { opacity: 1; }
.route-robot.walking { animation: waddle .25s ease-in-out infinite alternate; }
@keyframes waddle { from { rotate: -5deg; } to { rotate: 5deg; } }

.map-shots { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; margin-top: 70px; }
.map-shots img {
  display: block; width: 100%; height: auto;
  border: 4px solid var(--ink); border-radius: 12px;
  box-shadow: 0 6px 0 var(--ink); transform: rotate(-1.2deg);
}
.map-shots img + img { transform: rotate(1.4deg); }

/* ---------- Chassis ---------- */
.chassis { background: var(--bg-deep); }
.chassis-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; align-items: start; }
.chassis-card {
  --fill: #3a3b39; --tag: #d8d8cf;
  position: relative; isolation: isolate;
  display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: 18px 22px 24px;
  font: inherit; color: var(--cream); background: none; border: 0;
  transition: transform .2s ease;
}
.chassis-card::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: var(--fill); border: var(--line) solid var(--ink); border-radius: 18px;
  box-shadow: 0 8px 0 rgba(0, 0, 0, .45); filter: url(#wobble);
}
.chassis-card[data-tone="hauler"] { --fill: #46381f; --tag: #eab86f; }
.chassis-card[data-tone="scout"] { --fill: #4b2a2c; --tag: #f28a7b; }
.chassis-card:hover { transform: translateY(-6px) rotate(-.6deg); }
.chassis-card.is-picked::after {
  content: ""; position: absolute; inset: -10px; pointer-events: none;
  border: 6px solid var(--gold); border-radius: 26px; filter: url(#wobble);
}
.chassis-art { width: 70%; height: auto; margin: -8px 0 -10px; }
.chassis-card.hop .chassis-art { animation: hop .55s cubic-bezier(.3, 1.4, .5, 1); }
@keyframes hop {
  0% { transform: none; }
  30% { transform: translateY(-22px) scale(.94, 1.07); }
  62% { transform: translateY(0) scale(1.07, .92); }
  100% { transform: none; }
}
.chassis-name { font-family: var(--display); font-size: 2.1rem; line-height: 1; }
.chassis-tag { font-size: 1rem; color: var(--tag); margin: .4em 0 .9em; min-height: 3.1em; }
.traits { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; width: 100%; padding-top: 14px; border-top: 3px solid rgba(255, 255, 255, .16); }
.traits span { font-family: var(--display); font-size: 1rem; padding: 4px 12px; border-radius: 999px; background: rgba(0, 0, 0, .28); color: var(--tag); }
.note { text-align: center; color: var(--dim); margin: 44px 0 0; }

/* ---------- Loot ---------- */
.loot { background: var(--bg-2); overflow: hidden; }
.marquee {
  overflow: hidden; padding: 12px 0 18px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
}
.marquee-track { display: flex; width: max-content; animation: marquee 70s linear infinite; }
.marquee.reverse .marquee-track { animation-direction: reverse; animation-duration: 80s; }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }
.item {
  flex: none; width: 176px; margin-right: 18px; padding: 14px 12px 12px;
  background: #1e1f1b; border: 4px solid var(--ink); border-radius: 14px;
  text-align: center; box-shadow: 0 5px 0 rgba(0, 0, 0, .4);
  transition: transform .2s;
}
.item:hover { transform: translateY(-5px) rotate(-2deg); }
.item img { display: block; width: 100%; height: 76px; object-fit: contain; margin: 4px 0 12px; }
.item b { display: block; font-family: var(--display); font-weight: 400; font-size: 1.06rem; color: var(--cream); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item small { font-family: var(--display); font-size: .88rem; color: #7d879e; }
.item small.melee { color: #ad7f55; }
.item small.trinket { color: #9b86c4; }
.item.trinket { background: #22241f; }

/* ---------- Making-of teaser ---------- */
.story-teaser { background: var(--bg); }
.story-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; align-items: center; }
.story-card {
  display: block; padding: 28px;
  background: #f5efdf linear-gradient(rgba(70, 110, 160, .12) 1px, transparent 1px) 0 0 / 26px 26px;
  border: 4px solid var(--ink); border-radius: 8px; box-shadow: 0 10px 0 var(--ink);
  transform: rotate(-2deg); transition: transform .25s ease;
}
.story-card:hover { transform: rotate(0) translateY(-6px); }
.story-card img { display: block; width: 100%; height: auto; }
.story-copy .btn { margin-top: 28px; }

/* ---------- Bosses: a secret, so just a shadow ---------- */
.bosses { background: var(--bg-deep); }
.lair {
  position: relative; isolation: isolate; overflow: hidden;
  aspect-ratio: 16 / 9;
  background: radial-gradient(ellipse 60% 58% at 50% 36%, #57462f 0%, #2e261c 45%, #13100c 86%);
  border: 4px solid var(--ink); border-radius: 22px;
  box-shadow: 0 10px 0 var(--ink), 0 40px 80px rgba(0, 0, 0, .5);
}
.lair.rumble { animation: rumble .5s linear; }
@keyframes rumble {
  10%, 50%, 90% { transform: translate(-4px, 2px); }
  30%, 70% { transform: translate(4px, -2px); }
}
.lair::after {
  content: ""; position: absolute; left: -6%; bottom: -12%; width: 56%; height: 74%; z-index: 3; pointer-events: none;
  background: radial-gradient(ellipse at 45% 70%, rgba(255, 226, 160, .2), transparent 64%);
}
.boss-hud {
  position: absolute; top: 20px; left: 50%; z-index: 5; width: min(440px, 72%);
  transform: translateX(-50%); text-align: center;
}
.boss-hud-tag { display: block; font-family: var(--display); font-size: .82rem; letter-spacing: .28em; text-transform: uppercase; color: #eba65c; text-shadow: var(--outline); }
.boss-hud-name { display: block; font-family: var(--display); font-size: clamp(1.3rem, 2.4vw, 1.8rem); letter-spacing: .3em; color: var(--cream); text-shadow: var(--outline); margin: 2px 0 6px; }
.boss-hud-bar { display: block; height: 16px; background: #2b1f17; border: 4px solid var(--ink); border-radius: 8px; overflow: hidden; }
.boss-hud-bar i { display: block; height: 100%; background: linear-gradient(#f6ac62, #d9722c); box-shadow: inset 0 3px 0 rgba(255, 255, 255, .25); }

.beast {
  position: absolute; left: 50%; top: 9%; z-index: 1; width: 92%;
  padding: 0; border: 0; background: none;
  transform: translateX(-50%);
}
.beast svg { display: block; width: 100%; height: auto; overflow: visible; }
.beast-body { transform-box: fill-box; transform-origin: 50% 100%; animation: breathe 5s ease-in-out infinite; }
@keyframes breathe { 50% { transform: scale(1.012, 1.028); } }
.beast-eye { transform-box: fill-box; transform-origin: center; animation: beast-blink 6.5s infinite; }
.beast-eye.small { animation-duration: 4.8s; animation-delay: -2s; }
.beast-eye:nth-child(2) { animation-delay: .06s; }
@keyframes beast-blink { 0%, 90%, 100% { transform: scaleY(1); } 93% { transform: scaleY(.08); } }
.beast-maw { opacity: .45; transition: opacity .25s; }
.beast.angry .beast-maw { opacity: .95; }
.beast.angry .beast-eye { animation: none; transform: scaleY(.45); }
.beast.angry .beast-eye ellipse, .beast.angry .beast-eye circle:first-child { fill: #ff5a3c; }

.fog {
  position: absolute; inset: auto 0 0 0; height: 46%; z-index: 2; pointer-events: none;
  background: linear-gradient(transparent, rgba(19, 16, 12, .88) 58%, #13100c);
}
.motes { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.motes i {
  position: absolute; bottom: -10px; width: 5px; height: 5px; border-radius: 50%;
  background: rgba(255, 220, 150, .55); box-shadow: 0 0 8px rgba(255, 210, 130, .6);
  animation: mote 9s linear infinite;
}
.motes i:nth-child(1) { left: 12%; animation-delay: -1s; }
.motes i:nth-child(2) { left: 26%; animation-delay: -4s; animation-duration: 11s; }
.motes i:nth-child(3) { left: 38%; animation-delay: -7s; }
.motes i:nth-child(4) { left: 52%; animation-delay: -2.5s; animation-duration: 12s; }
.motes i:nth-child(5) { left: 63%; animation-delay: -6s; }
.motes i:nth-child(6) { left: 74%; animation-delay: -3s; animation-duration: 10s; }
.motes i:nth-child(7) { left: 85%; animation-delay: -8s; }
.motes i:nth-child(8) { left: 93%; animation-delay: -5s; animation-duration: 13s; }
@keyframes mote {
  0% { transform: translate(0, 0); opacity: 0; }
  15% { opacity: 1; }
  100% { transform: translate(30px, -560px); opacity: 0; }
}
.lair-hero { position: absolute; left: 3%; bottom: -3%; z-index: 4; width: 42%; }
.lair-hero img { display: block; width: 100%; height: auto; filter: drop-shadow(0 20px 20px rgba(0, 0, 0, .5)); }
.gasp {
  position: absolute; left: 47%; top: -9%;
  font-family: var(--display); font-size: clamp(2.2rem, 4.4vw, 3.6rem); line-height: 1; color: var(--gold);
  text-shadow: var(--outline), 0 .08em 0 var(--ink);
  transform-origin: 50% 100%;
}
.js .lair .gasp { transform: scale(0); }
.js .lair.in .gasp { animation: gasp .6s .7s cubic-bezier(.3, 1.8, .5, 1) forwards, gasp-wobble 2.4s 1.4s ease-in-out infinite; }
@keyframes gasp { to { transform: scale(1) rotate(8deg); } }
@keyframes gasp-wobble { 0%, 100% { transform: scale(1) rotate(8deg); } 50% { transform: scale(1.08) rotate(-4deg); } }

/* ---------- Bounties: also a secret ---------- */
.bounties { background: radial-gradient(ellipse 80% 70% at 50% 0%, #3b3022, #221c15 75%); overflow: hidden; }
.you { color: var(--down); }
.bounty-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.bounty-copy .lede + .lede { margin-top: 14px; }
.bounty-chips { margin-top: 26px; }
.bounty-art { position: relative; display: grid; place-items: center; min-height: 540px; }
.gunslinger {
  position: absolute; right: -6%; bottom: 0; z-index: 0; width: 64%; height: auto;
  filter: drop-shadow(0 0 22px rgba(255, 179, 71, .12));
  animation: slinger 6s ease-in-out infinite;
}
@keyframes slinger { 50% { transform: translateX(-10px); } }
.slinger-eyes { animation: beast-blink 5s infinite; transform-box: fill-box; transform-origin: center; }

.poster {
  --tilt: -4deg;
  position: relative; isolation: isolate; z-index: 1;
  display: block; width: min(330px, 82%); margin-right: 26%;
  padding: 32px 22px 24px; text-align: center; color: #3b2b1a;
  font: inherit; background: none; border: 0;
  transform: rotate(var(--tilt));
  filter: drop-shadow(0 14px 0 rgba(0, 0, 0, .35));
  transition: transform .25s ease;
}
.poster::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(ellipse at 50% 40%, #f2e3b6 40%, #dcc58e 100%);
  border: 3px solid #2a1f14; border-radius: 6px;
  box-shadow: inset 0 0 36px rgba(120, 76, 24, .35);
  filter: url(#wobble);
}
.poster::after {
  content: ""; position: absolute; top: 10px; left: 50%; width: 18px; height: 18px; margin-left: -9px;
  border-radius: 50%; border: 3px solid var(--ink);
  background: radial-gradient(circle at 35% 35%, #d9d9d0, #6c6c62);
}
.poster:hover { transform: rotate(-2deg) translateY(-6px); }
.poster.shot { animation: poster-hit .3s; }
@keyframes poster-hit { 30% { transform: rotate(-6deg) translateX(-6px); } 60% { transform: rotate(-3deg) translateX(4px); } }
.poster > span { display: block; }
.poster-head { font-family: var(--display); font-size: 2.7rem; line-height: 1; letter-spacing: .06em; text-transform: uppercase; color: #8a2f1b; margin: 4px 0 12px; }
.mug {
  padding: 16px 10px 0; border: 4px solid #2a1f14; border-radius: 3px;
  background: repeating-linear-gradient(to bottom, #36332b 0 26px, #4a463b 26px 28px);
}
.mug img { display: block; width: 62%; height: auto; margin: 0 auto; filter: sepia(.2) contrast(1.05); }
.poster-name { font-family: var(--display); font-size: 1.9rem; line-height: 1.1; color: #2a1f14; margin: .45em 0 .1em; }
.poster-crime { font-size: .98rem; color: #5b4630; }
.poster-reward {
  margin-top: 14px; padding: 8px 10px;
  border: 2px dashed rgba(70, 45, 20, .45); border-radius: 8px;
  font-family: var(--display); font-size: .82rem; letter-spacing: .14em; text-transform: uppercase; color: #6b5234;
}
.poster-reward b { display: block; font-weight: 400; font-size: 1.3rem; letter-spacing: .02em; text-transform: none; color: #8a2f1b; }
.poster .hole {
  position: absolute; z-index: 2; width: 18px; height: 18px; margin: -9px 0 0 -9px; border-radius: 50%;
  background: radial-gradient(circle, #0f0a06 0 38%, #4a3520 44% 58%, rgba(74, 53, 32, 0) 64%);
  pointer-events: none;
}

/* ---------- Hat locker ---------- */
.hats { background: var(--bg); }
.hats-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 44px; align-items: center; }
.hat-stage { position: relative; display: grid; place-items: center; }
.hat-spot {
  position: absolute; bottom: 7%; width: 72%; aspect-ratio: 4 / 1; border-radius: 50%;
  background: radial-gradient(ellipse at 50% 45%, #6a5a3d 0 52%, #574a33 53% 68%, rgba(30, 36, 26, 0) 70%);
}
.hat-robot { position: relative; display: block; width: min(420px, 92%); height: auto; transform-origin: 50% 90%; }
.hat-robot.pop { animation: pop .5s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes pop { 0% { transform: none; } 35% { transform: scale(1.09, .9); } 70% { transform: scale(.96, 1.05); } 100% { transform: none; } }
.locker { --fill: #22231f; padding: 32px 28px 28px; }
.locker-title { font-family: var(--display); font-weight: 400; font-size: clamp(1.7rem, 6.4vw, 2.3rem); line-height: 1.05; text-align: center; text-transform: uppercase; margin: 0; }
.nowrap { white-space: nowrap; }
.locker-sub { font-family: var(--display); text-align: center; margin: .3em 0 1.3em; }
.hat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 14px; }
.hat-grid button {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 14px 6px 11px;
  background: #2d2f2b; color: var(--cream);
  border: 4px solid #121311; border-radius: 12px;
  font-family: var(--display); font-size: .96rem; line-height: 1.1;
  transition: transform .15s, background .15s;
}
.hat-grid button:hover { transform: translateY(-3px); background: #363932; }
.hat-grid button img { width: 100%; height: 62px; object-fit: contain; transition: transform .2s; }
.hat-grid button:hover img { transform: rotate(-8deg) scale(1.08); }
.hat-grid button[aria-checked="true"] { color: var(--up); background: #30342c; }
.hat-grid button[aria-checked="true"]::after {
  content: ""; position: absolute; top: 6px; right: 7px; width: 20px; height: 20px;
  background: var(--up);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 13 L9.5 18 L20 5' fill='none' stroke='black' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 13 L9.5 18 L20 5' fill='none' stroke='black' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* ---------- Co-op ---------- */
.coop { background: var(--bg-2); }
.coop-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center; }
.coop-art { position: relative; height: 340px; }
.coop-art img { position: absolute; bottom: 0; height: auto; animation: alien-bob 3.2s ease-in-out infinite; }
.coop-a { left: -4%; width: 60%; }
.coop-b { right: -4%; width: 56%; animation-delay: -1.6s !important; }
.coop-heart {
  position: absolute; left: 50%; top: 18%; transform: translateX(-50%);
  font-family: var(--display); font-size: 4.4rem; line-height: 1; color: var(--gold);
  text-shadow: var(--outline), 0 .09em 0 var(--ink);
}

/* ---------- Gallery ---------- */
.gallery { background: var(--bg); }
.shots { display: grid; grid-template-columns: repeat(3, 1fr); grid-auto-rows: 210px; gap: 20px; }
.shot {
  padding: 0; overflow: hidden; background: #000;
  border: 4px solid var(--ink); border-radius: 14px;
  box-shadow: 0 6px 0 var(--ink);
  transition: transform .2s ease;
}
.shot.big { grid-column: span 2; grid-row: span 2; }
.shot img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.shot:hover { transform: translateY(-4px) rotate(-.6deg); }
.shot:hover img { transform: scale(1.04); }

.lightbox {
  padding: 0; border: 5px solid var(--ink); border-radius: 16px; background: #000;
  width: min(1200px, 94vw); max-height: 92vh; overflow: hidden;
}
.lightbox::backdrop { background: rgba(10, 12, 8, .88); }
.lightbox img { display: block; width: 100%; height: auto; max-height: calc(92vh - 10px); object-fit: contain; }
.lb-close { position: absolute; top: 14px; right: 14px; }

/* ---------- Wishlist ---------- */
.wishlist { background: radial-gradient(ellipse 70% 70% at 50% 60%, #34422d, #1b2118 75%); padding-top: 30px; padding-bottom: 130px; }
.cta { --fill: #252f20; display: grid; grid-template-columns: 1.05fr 1fr; align-items: center; gap: 34px; padding: 44px 48px 48px 30px; }
.cta-art { display: block; width: 100%; height: auto; }
.logo-title.small { font-size: clamp(2.8rem, 6.4vw, 5rem); }
.cta-line { font-family: var(--display); font-size: clamp(1.5rem, 2.6vw, 2rem); line-height: 1.15; margin: .4em 0 .3em; }
.cta p { color: var(--muted); margin: 0 0 26px; }

/* ---------- Footer ---------- */
.foot { background: #0f120c; border-top: 4px solid var(--ink); padding: 40px 0; }
.foot-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; }
.foot-studio { display: flex; align-items: center; gap: 12px; color: var(--cream); text-decoration: none; font-size: 1.1rem; }
.foot-studio b { color: #ffa62b; }
.foot-studio:hover img { transform: rotate(-12deg) scale(1.1); }
.foot-studio img { transition: transform .25s; }
.foot-link { color: var(--gold); font-family: var(--display); text-decoration: none; }
.foot-link:hover { text-decoration: underline; }
.foot-small { color: var(--dim); margin: 0; font-size: .92rem; }

/* ---------- Little bits of juice ---------- */
.pop-scrap {
  position: fixed; z-index: 90; pointer-events: none;
  font-family: var(--display); font-size: 1.8rem; color: var(--gold);
  text-shadow: var(--outline), 0 .08em 0 var(--ink);
  animation: rise .9s ease-out forwards;
}
@keyframes rise { from { transform: translate(-50%, -50%) scale(.6); opacity: 1; } to { transform: translate(-50%, -160%) scale(1.15); opacity: 0; } }
.toast {
  position: fixed; left: 50%; bottom: 28px; z-index: 95;
  translate: -50% 140%; opacity: 0;
  padding: 14px 22px; max-width: calc(100vw - 32px);
  background: var(--gold-btn); color: #2a2410; font-family: var(--display); font-size: 1.1rem;
  border: 4px solid var(--ink); border-radius: 14px; box-shadow: 0 6px 0 var(--ink);
  transition: translate .35s cubic-bezier(.3, 1.5, .5, 1), opacity .25s;
}
.toast.show { translate: -50% 0; opacity: 1; }

/* ---------- Scroll reveal (only when JS is running) ---------- */
.js .reveal { opacity: 0; translate: 0 28px; transition: opacity .6s ease, translate .7s cubic-bezier(.2, .8, .2, 1); }
.js .reveal.in { opacity: 1; translate: 0 0; }

/* ---------- Responsive ---------- */
@media (max-width: 1060px) {
  .nav-links { display: none; }
  .nav-links + .nav-right { margin-left: auto; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero { padding-top: 110px; }
  .hero-art { max-width: 660px; margin: 10px auto 0; width: 100%; }
  .pillars { grid-template-columns: 1fr; max-width: 640px; }
  .counters { grid-template-columns: repeat(3, 1fr); row-gap: 34px; }
  .chassis-row { grid-template-columns: 1fr; max-width: 440px; margin: 0 auto; gap: 40px; }
  .chassis-tag { min-height: 0; }
  .bounty-grid { grid-template-columns: 1fr; }
  .bounty-art { min-height: 500px; max-width: 560px; width: 100%; margin: 0 auto; }
  .hats-grid, .coop-grid, .story-grid { grid-template-columns: 1fr; }
  .hat-stage { max-width: 380px; margin: 0 auto; }
  .coop-art { max-width: 460px; width: 100%; margin: 0 auto; }
  .cta { grid-template-columns: 1fr; padding: 32px 26px 36px; text-align: center; }
  .cta .logo-title { justify-content: center; }
  .cta-art { max-width: 520px; margin: 0 auto; }
}
@media (max-width: 760px) {
  body { font-size: 17px; }
  section { padding: 84px 0; }
  .nav { gap: 10px; padding: 10px 14px; }
  .nav-logo { font-size: 1.25rem; }
  .map { padding: 34px 20px 26px; }
  .route { grid-template-columns: 1fr; padding: 10px 0 0; gap: 18px; }
  .node { display: grid; grid-template-columns: 76px 1fr; column-gap: 16px; align-items: center; text-align: left; }
  .node:nth-child(even) { transform: none; }
  .node-btn { width: 70px; height: 70px; margin: 0; grid-row: span 2; }
  .node-btn svg { width: 44px; height: 44px; }
  .node h3 { align-self: end; }
  .node p { margin: 0; align-self: start; max-width: none; }
  .route-robot { display: none; }
  .map-shots { grid-template-columns: 1fr; margin-top: 44px; }
  .shots { grid-template-columns: 1fr 1fr; grid-auto-rows: 150px; }
  .shot.big { grid-column: span 2; grid-row: span 2; }
  .merge-card { width: 128px; }
  .peek-swarm, .peek-chassis, .peek-loot, .peek-bounty { width: 70px; }
}
@media (max-width: 520px) {
  .nav-back span, .scrap-hud { display: none; }
  .counters { grid-template-columns: repeat(2, 1fr); }
  .lair { aspect-ratio: 4 / 5; }
  .beast { width: 160%; top: 16%; }
  .lair-hero { width: 86%; left: 2%; }
  .boss-hud { width: 84%; }
  .bounty-art { min-height: 440px; }
  .poster { margin-right: 18%; width: 78%; }
  .gunslinger { width: 70%; right: -14%; }
  .hat-grid { grid-template-columns: repeat(2, 1fr); }
  .merge { gap: 10px; }
  .merge-card { width: 104px; }
  .merge-card span { font-size: .9rem; }
  .merge-op { font-size: 2rem; }
  .btn-lg { font-size: 1.12rem; }
  .hero-cta .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; translate: none; }
}
