/* MechRunner — one stylesheet, no framework. Dark by design (the art is dark). */

:root {
  --bg: #0d0e10;
  --bg-2: #15171b;
  --panel: #1c1f24;
  --line: #2c3038;
  --text: #e9e6df;
  --muted: #a7a39b;
  --red: #c4262e;
  --red-bright: #e0353d;
  --red-dark: #8c161c;
  --steel: #8d98a6;
  --glow: #4fb6ff;
  --radius: 8px;
  --wrap: 1160px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --display: "Impact", "Haettenschweiler", "Arial Narrow Bold", "Franklin Gothic Medium", var(--font);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 17px/1.65 var(--font); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--red-bright); text-underline-offset: 2px; }
a:hover { color: #ff5a61; }
:focus-visible { outline: 3px solid var(--glow); outline-offset: 2px; }
h1, h2, h3 { margin: 0 0 .5em; line-height: 1.15; color: #fff; }
h2 { font-family: var(--display); font-weight: 400; text-transform: uppercase; letter-spacing: .03em; font-size: clamp(2rem, 5vw, 3rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
@media (min-width: 700px) { .wrap { padding: 0 32px; } }
.section { padding: 72px 0; position: relative; }
.band { background: var(--bg-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.eyebrow { text-transform: uppercase; letter-spacing: .14em; font-size: .8rem; font-weight: 700; color: var(--red-bright); margin-bottom: .4em; }
.lede { font-size: 1.15rem; color: #d4d0c8; max-width: 44em; }
.note { color: var(--muted); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: #fff; color: #000; padding: 8px 12px; z-index: 20; }
.skip:focus { left: 8px; }

/* ---------- header ---------- */
.site-header { position: sticky; top: 0; z-index: 10; background: rgb(13 14 16 / .92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.brand img { width: 120px; }
.nav-toggle { display: none; }
#site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 2px; }
#site-nav a { display: block; padding: 8px 11px; color: var(--text); text-decoration: none; font-weight: 600; font-size: .93rem; text-transform: uppercase; letter-spacing: .05em; border-radius: 6px; }
#site-nav a:hover { color: #fff; background: var(--panel); }
#site-nav a.nav-cta { background: var(--red); color: #fff; margin-left: 8px; }
#site-nav a.nav-cta:hover { background: var(--red-bright); }
@media (max-width: 1000px) {
  .js .nav-toggle { display: block; font: inherit; font-weight: 700; color: var(--text); background: none; border: 1px solid var(--line); border-radius: 6px; padding: 6px 14px; cursor: pointer; }
  .js #site-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--bg-2); border-bottom: 1px solid var(--line); }
  .js #site-nav.open { display: block; }
  #site-nav ul { flex-direction: column; align-items: stretch; padding: 8px 16px 16px; }
  #site-nav a.nav-cta { margin: 8px 0 0; text-align: center; }
  html:not(.js) .header-row { flex-wrap: wrap; }
  html:not(.js) #site-nav ul { flex-direction: row; flex-wrap: wrap; padding: 0 0 8px; }
}

/* ---------- buttons ---------- */
.buttons { display: flex; flex-wrap: wrap; gap: 12px; margin: 1.6em 0 1em; }
.btn { display: inline-block; padding: 12px 22px; border-radius: 6px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; text-decoration: none; border: 2px solid var(--red); color: #fff; }
.btn-primary { background: var(--red); box-shadow: 0 0 24px rgb(196 38 46 / .35); }
.btn-primary:hover { background: var(--red-bright); border-color: var(--red-bright); color: #fff; }
.btn-ghost { background: rgb(0 0 0 / .35); border-color: rgb(255 255 255 / .55); }
.btn-ghost:hover { background: #fff; color: #000; border-color: #fff; }

/* ---------- backgrounds ---------- */
.bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: left center; z-index: 0; }
.hero, .backdrop { overflow: hidden; }
.hero::after, .backdrop::after { content: ""; position: absolute; inset: 0; z-index: 0; }
.hero::after { background: linear-gradient(90deg, rgb(13 14 16 / .15) 0%, rgb(13 14 16 / .55) 45%, rgb(13 14 16 / .9) 75%); }
.backdrop::after { background: linear-gradient(90deg, rgb(13 14 16 / .55) 0%, rgb(13 14 16 / .88) 40%, rgb(13 14 16 / .94) 100%); }
.hero > .wrap, .backdrop > .wrap { position: relative; z-index: 1; }
@media (max-width: 800px) {
  .bg { object-position: 15% center; }
  .hero::after { background: linear-gradient(180deg, rgb(13 14 16 / .25) 0%, rgb(13 14 16 / .6) 35%, rgb(13 14 16 / .88) 70%); }
  .backdrop::after { background: rgb(13 14 16 / .84); }
}

/* ---------- hero ---------- */
.hero { position: relative; min-height: min(88vh, 760px); display: flex; align-items: center; }
.hero-text { width: 100%; display: flex; flex-direction: column; align-items: flex-end; text-align: right; padding-top: 64px; padding-bottom: 64px; }
.hero-text > * { max-width: 34em; }
.hero h1 { margin: 0; }
.hero h1 img { width: min(440px, 80vw); filter: drop-shadow(0 8px 24px rgb(0 0 0 / .8)); }
.tagline { font-family: var(--display); text-transform: uppercase; font-size: clamp(1.3rem, 3vw, 1.8rem); letter-spacing: .03em; color: #fff; margin: .6em 0 .4em; }
.hero .lede { margin-left: auto; }
.hero .buttons { justify-content: flex-end; }
.platforms { color: var(--muted); font-size: .92rem; }
@media (max-width: 800px) {
  .hero-text { align-items: flex-start; text-align: left; }
  .hero .buttons { justify-content: flex-start; }
  .hero .lede { margin-left: 0; }
}

/* ---------- the game ---------- */
.two-col { display: grid; gap: 40px; }
@media (min-width: 860px) { .two-col { grid-template-columns: 1.1fr 1fr; align-items: start; } }
.features { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.features li { background: var(--panel); border-left: 3px solid var(--red); padding: 10px 14px; border-radius: 0 6px 6px 0; }

/* ---------- XP-41 ---------- */
.modes { display: grid; gap: 24px; margin-top: 32px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); }
.mode { background: var(--panel); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.mode img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.mode h3, .mode p { padding: 0 20px; }
.mode h3 { margin-top: 18px; text-transform: uppercase; letter-spacing: .06em; color: var(--red-bright); }
.mode p { color: #d4d0c8; padding-bottom: 8px; }

/* ---------- story ---------- */
.story { max-width: 820px; margin-left: auto; }
.story figure { margin: 1.6em 0; }
.story figure img { border-radius: var(--radius); border: 1px solid var(--line); }
@media (max-width: 800px) { .story { margin-left: 0; } }

/* ---------- characters ---------- */
.characters { display: grid; gap: 20px; margin-top: 28px; }
.character { display: grid; grid-template-columns: 120px 1fr; gap: 20px; background: rgb(28 31 36 / .9); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.character img { width: 120px; border-radius: 6px; border: 2px solid var(--red-dark); }
.character p { color: #d4d0c8; }
.character p:last-child { margin-bottom: 0; }
@media (min-width: 900px) { .character { grid-template-columns: 180px 1fr; } .character img { width: 180px; } }
@media (max-width: 520px) { .character { grid-template-columns: 1fr; } }

/* ---------- screenshots ---------- */
.gallery { list-style: none; padding: 0; margin: 24px 0 40px; display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); }
.gallery img { width: 100%; aspect-ratio: 16 / 9.5; object-fit: cover; border-radius: 6px; background: var(--panel); transition: transform .15s ease, filter .15s ease; }
.shot { display: block; border-radius: 6px; }
.shot:hover img { transform: scale(1.02); filter: brightness(1.1); }
h3.sub { margin-top: 8px; text-transform: uppercase; letter-spacing: .06em; }

/* ---------- soundtrack ---------- */
.soundtrack { display: grid; gap: 32px; align-items: start; }
@media (min-width: 760px) { .soundtrack { grid-template-columns: 256px 1fr; } }
.soundtrack > img { border-radius: var(--radius); box-shadow: 0 10px 30px rgb(0 0 0 / .6); width: 100%; max-width: 256px; }
.tracks { padding: 0; margin: 16px 0 0; list-style: none; counter-reset: t; display: grid; gap: 12px; max-width: 560px; }
.tracks li { counter-increment: t; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; display: grid; gap: 8px; }
.tracks span::before { content: counter(t, decimal-leading-zero) ".  "; color: var(--red-bright); font-weight: 700; }
.tracks span { font-weight: 700; }
.tracks audio { width: 100%; }

/* ---------- call to action ---------- */
.cta-band { text-align: center; background: radial-gradient(ellipse at center, rgb(196 38 46 / .25), transparent 70%), var(--bg); }
.cta-band .buttons { justify-content: center; }

/* ---------- lightbox ---------- */
.lightbox { border: 0; padding: 0; background: transparent; max-width: 96vw; max-height: 96vh; overflow: visible; }
.lightbox::backdrop { background: rgb(0 0 0 / .9); }
.lightbox img { max-width: 92vw; max-height: 84vh; width: auto; border-radius: 6px; margin: 0 auto; }
.lightbox p { color: var(--text); text-align: center; margin: 10px auto 0; font-size: .95rem; }
.lightbox button { position: fixed; background: rgb(0 0 0 / .6); color: #fff; border: 1px solid rgb(255 255 255 / .3); border-radius: 999px; width: 44px; height: 44px; font-size: 22px; cursor: pointer; }
.lightbox .lb-close { top: 16px; right: 16px; }
.lightbox .lb-prev { left: 12px; top: 50%; }
.lightbox .lb-next { right: 12px; top: 50%; }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--line); background: #08090a; }
.footer-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 32px; padding-top: 32px; padding-bottom: 32px; }
.spg img { width: 200px; }
.footer-links { list-style: none; margin: 0; padding: 0; display: flex; gap: 20px; flex-wrap: wrap; }
.footer-links a { color: var(--text); text-decoration: none; font-weight: 600; }
.footer-links a:hover { color: var(--red-bright); }
.copyright { width: 100%; margin: 0; color: #7d7a73; font-size: .85rem; }

/* ---------- simple pages (privacy, 404) ---------- */
.page { padding: 56px 0 72px; }
.page .prose { max-width: 46em; }
.prose h1 { font-family: var(--display); font-weight: 400; text-transform: uppercase; font-size: clamp(2.2rem, 6vw, 3.4rem); }
.prose h2 { font-size: 1.6rem; margin-top: 1.6em; }
.prose h3 { margin-top: 1.4em; }
.prose li { margin-bottom: .4em; }
.game404 { text-align: center; }
.game404 .lede { margin: 0 auto 24px; }
.runner { position: relative; max-width: 760px; margin: 0 auto 16px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: var(--bg-2); }
.runner canvas { display: block; width: 100%; height: auto; cursor: pointer; touch-action: manipulation; }
.runner-help { color: var(--muted); font-size: .92rem; }
.game404 .buttons { justify-content: center; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
