/* perogkerger.com: one stylesheet, no build step.
   Colours follow Salvage 47: dark station plates, orange the only accent, cold echo-white for the alien's sight,
   yellow-black hazard only for warnings. One font everywhere, the game's own VT323 (self-hosted, SIL OFL 1.1). */

@font-face {
  font-family: "VT323";
  src: url("../fonts/VT323-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #0b0e12;
  --bg-2: #10151b;
  --plate: #151b22;
  --plate-2: #1b222b;
  --line: #27303a;
  --line-2: #36414d;
  --text: #d6d0c4;
  --text-dim: #9a968d;
  --text-faint: #6c6a65;
  --orange: #e0732f;
  --orange-hi: #ff9a3c;
  --orange-lo: #9c4a20;
  --echo: #bfeaf0;
  --hazard: #e0a128;
  --pixel: "VT323", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --body: var(--pixel);
  --gutter: 16px;
  --max: 1160px;
  --notch: 10px;
  color-scheme: dark;
}
@media (min-width: 720px) { :root { --gutter: 32px; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1.375rem/1.4 var(--body);
  font-synthesis: none; /* VT323 has one weight: no fake bold */
  overflow-x: hidden;
}
img, video { display: block; max-width: 100%; height: auto; }
a { color: var(--orange-hi); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: #ffc07a; }
:focus-visible { outline: 2px solid var(--orange-hi); outline-offset: 3px; }
::selection { background: rgba(224, 115, 47, .45); color: #fff; }

h1, h2, h3 { font-family: var(--pixel); font-weight: 400; line-height: 1; letter-spacing: .01em; color: #f1ece2; margin: 0 0 .4em; }
h1 { font-size: clamp(3rem, 9vw, 5.75rem); }
h2 { font-size: clamp(2.25rem, 5.5vw, 3.25rem); }
h3 { font-size: 1.85rem; }
p { margin: 0 0 1em; }
strong { color: #f1ece2; font-weight: 700; }

.skip { position: absolute; left: -9999px; top: 8px; z-index: 50; background: var(--orange); color: #111; padding: 8px 14px; font-weight: 700; }
.skip:focus { left: 8px; }

.wrap { width: 100%; max-width: calc(var(--max) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: calc(760px + 2 * var(--gutter)); }

/* ---- Header ---- */
.site-header { position: sticky; top: 0; z-index: 20; background: rgba(11, 14, 18, .92); border-bottom: 1px solid var(--line); }
@supports (backdrop-filter: blur(6px)) { .site-header { background: rgba(11, 14, 18, .78); backdrop-filter: blur(8px); } }
.site-header .wrap { display: flex; align-items: center; gap: 12px 24px; min-height: 60px; flex-wrap: wrap; padding-top: 6px; padding-bottom: 6px; }
.brand { font: 1.9rem/1 var(--pixel); color: #f1ece2; text-decoration: none; display: inline-flex; align-items: center; gap: 2px; margin-right: auto; }
.brand::after { content: ""; width: .45em; height: .8em; background: var(--orange); margin-left: 3px; animation: blink 1.2s steps(1) infinite; }
.brand:hover { color: #fff; }
@keyframes blink { 50% { opacity: 0; } }
.icon-links { display: flex; gap: 8px; list-style: none; margin: 0; padding: 0; }
.icon-link {
  position: relative; display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 12px;
  border: 1px solid var(--line-2); color: var(--text); text-decoration: none; font: 1.35rem/1 var(--pixel);
}
.icon-link svg { width: 20px; height: 20px; flex: none; }
.text-link { display: inline-flex; align-items: center; min-height: 40px; padding: 0 12px; color: var(--text);
  text-decoration: none; font: 1.35rem/1 var(--pixel); }
.text-link:hover, .text-link[aria-current] { color: var(--orange-hi); }
.icon-link[data-link="discord"] svg { width: 22px; height: 22px; } /* optical match: the Discord mark is wide and short */
.icon-link[data-link="steam"] svg { width: 19px; height: 19px; }
.icon-link[href]:hover { border-color: var(--orange); color: #fff; background: var(--plate); }
.icon-link[href]:hover svg { color: var(--orange-hi); }
.icon-link[aria-disabled] { color: var(--text-faint); border-color: var(--line); cursor: default; }
.icon-link[aria-disabled]::after { /* the "soon" tooltip */
  content: "soon"; position: absolute; top: calc(100% + 6px); left: 50%; transform: translateX(-50%);
  padding: 3px 8px; background: var(--plate-2); border: 1px solid var(--line-2); color: var(--echo);
  font: 1.1rem/1 var(--pixel); white-space: nowrap; pointer-events: none; opacity: 0; transition: opacity .15s;
}
.icon-link[aria-disabled]:hover::after, .icon-link[aria-disabled]:focus-visible::after { opacity: 1; }
@media (max-width: 560px) {
  .site-header { position: static; }
  .icon-link { padding: 0 10px; min-width: 44px; justify-content: center; }
  .icon-link span { display: none; }
}

/* ---- Labels, buttons, small pixel details ---- */
.label { font: 1.3rem/1 var(--pixel); color: var(--orange); letter-spacing: .06em; text-transform: uppercase; margin: 0 0 14px; display: flex; align-items: center; gap: 10px; }
.label::before { content: ""; width: 8px; height: 8px; background: var(--orange); flex: none; }
.label.echo { color: var(--echo); }
.label.echo::before { background: var(--echo); }

.btn {
  --c: var(--orange);
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 10px 22px;
  font: 1.5rem/1 var(--pixel); letter-spacing: .03em; text-decoration: none;
  color: #120b06; background: var(--c); border: 0; cursor: pointer;
  clip-path: polygon(var(--notch) 0, 100% 0, 100% calc(100% - var(--notch)), calc(100% - var(--notch)) 100%, 0 100%, 0 var(--notch));
}
.btn:hover { --c: var(--orange-hi); color: #120b06; }
.btn.ghost { color: var(--text); background: transparent; box-shadow: inset 0 0 0 1px var(--line-2); clip-path: none; }
.btn.ghost:hover { color: #fff; box-shadow: inset 0 0 0 1px var(--text-dim); }
.btn.soon { color: var(--text-dim); background: var(--plate-2); cursor: default; }
.btn.soon:hover { --c: var(--plate-2); }
.btn svg { width: 22px; height: 22px; flex: none; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

/* ---- Hero ---- */
.hero { position: relative; isolation: isolate; min-height: min(86vh, 760px); display: flex; align-items: flex-end; border-bottom: 1px solid var(--line); overflow: hidden; }
.hero picture, .hero picture img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(180deg, rgba(11, 14, 18, .25) 0%, rgba(11, 14, 18, 0) 30%, rgba(11, 14, 18, .35) 70%, var(--bg) 100%),
    linear-gradient(90deg, rgba(11, 14, 18, .7) 0%, rgba(11, 14, 18, .15) 55%, rgba(11, 14, 18, 0) 100%);
}
.hero::after { /* faint scanlines: the only place they appear */
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: .22;
  background: repeating-linear-gradient(0deg, rgba(0, 0, 0, .35) 0 1px, transparent 1px 3px);
}
.hero .wrap { padding-top: 120px; padding-bottom: 56px; }
.hero h1 { max-width: 12ch; text-shadow: 0 2px 24px rgba(0, 0, 0, .6); }
.hero .lead { font-size: 1.56rem; max-width: 36em; color: #e4dfd5; text-shadow: 0 1px 12px rgba(0, 0, 0, .8); }
.hero.short { min-height: min(70vh, 620px); }

.lead { font-size: 1.56rem; color: #e4dfd5; }

/* ---- Sections ---- */
.section { padding: 72px 0; }
.section + .section { border-top: 1px solid var(--line); }
.section.alt { background: var(--bg-2); }
@media (min-width: 900px) { .section { padding: 104px 0; } }
.section-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 12px 32px; margin-bottom: 36px; }
.section-head h2 { margin: 0; }
.section-head p { margin: 0; color: var(--text-dim); max-width: 34em; }

/* ---- Game cards ---- */
.games { display: grid; gap: 24px; grid-template-columns: 1fr; }
@media (min-width: 900px) { .games { grid-template-columns: 2fr 1fr; } }
.card { position: relative; background: var(--plate); border: 1px solid var(--line); display: flex; flex-direction: column; }
.card::before { /* notch tick in the top-left corner */
  content: ""; position: absolute; top: -1px; left: -1px; width: 22px; height: 22px; z-index: 2;
  border-top: 2px solid var(--orange); border-left: 2px solid var(--orange); pointer-events: none;
}
.card-media { aspect-ratio: 16 / 9; overflow: hidden; background: #000; }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.card:hover .card-media img { transform: scale(1.03); }
.card-body { padding: 24px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.card-body h3 { font-size: 2.4rem; margin: 0; }
.card-body h3 a { color: inherit; text-decoration: none; }
.card-body h3 a::after { content: ""; position: absolute; inset: 0; } /* the whole card is the link */
.card-body p { color: var(--text-dim); margin: 0; }
.card .meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.tag { font: 1.15rem/1 var(--pixel); color: var(--text-dim); border: 1px solid var(--line-2); padding: 4px 8px; }
.tag.hot { color: var(--orange-hi); border-color: var(--orange-lo); }
.card.empty { border-style: dashed; background: transparent; justify-content: center; align-items: center; text-align: center; min-height: 220px; }
.card.empty::before { display: none; }
.card.empty p { font: 1.6rem/1.2 var(--pixel); color: var(--text-faint); margin: 0; padding: 24px; }

/* ---- Contact ---- */
.contact h2 { margin-bottom: .3em; }
.contact p { margin: 0; }
.contact .mail { font: clamp(1.7rem, 5vw, 2.6rem)/1.1 var(--pixel); color: var(--echo); text-decoration: none; border-bottom: 2px solid var(--orange); overflow-wrap: anywhere; }
.contact .mail:hover { color: #fff; }

/* ---- Features ---- */
.features { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); grid-template-columns: 1fr; }
@media (min-width: 720px) { .features { grid-template-columns: 1fr 1fr; } }
.feature { background: var(--plate); padding: 28px 24px 30px; }
.feature .num { font: 1.3rem/1 var(--pixel); color: var(--orange); display: block; margin-bottom: 14px; }
.feature h3 { margin-bottom: .35em; }
.feature p { color: var(--text-dim); margin: 0; }
.feature.echo .num { color: var(--echo); }

/* ---- Split blocks (text + image) ---- */
.split { display: grid; gap: 32px; grid-template-columns: 1fr; align-items: center; }
@media (min-width: 900px) { .split { grid-template-columns: 5fr 6fr; gap: 56px; } .split.flip > :first-child { order: 2; } }
.frame { position: relative; border: 1px solid var(--line-2); background: #000; }
.frame::after { content: ""; position: absolute; right: -1px; bottom: -1px; width: 22px; height: 22px; border-right: 2px solid var(--orange); border-bottom: 2px solid var(--orange); pointer-events: none; }
.frame img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }

.facts-inline { display: flex; flex-wrap: wrap; gap: 10px 28px; margin: 20px 0 28px; padding: 0; list-style: none; }
.facts-inline li { display: flex; flex-direction: column; }
.facts-inline b { font: 400 .8rem/1.2 var(--body); letter-spacing: .12em; text-transform: uppercase; color: var(--text-faint); }
.facts-inline span { font: 1.6rem/1.1 var(--pixel); color: #f1ece2; }

/* ---- Gallery ---- */
.gallery { display: grid; gap: 12px; grid-template-columns: 1fr; list-style: none; margin: 0; padding: 0; }
@media (min-width: 640px) { .gallery { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1000px) { .gallery { grid-template-columns: repeat(3, 1fr); } .gallery li.wide { grid-column: span 2; grid-row: span 2; } .gallery li:last-child:nth-child(3n+2) { grid-column: span 2; } .gallery li:last-child:nth-child(3n+2) img { aspect-ratio: 32 / 9; } }
.gallery a { display: block; position: relative; border: 1px solid var(--line); background: #000; overflow: hidden; height: 100%; }
.gallery a:hover { border-color: var(--orange); }
.gallery img { width: 100%; height: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.gallery figcaption { position: absolute; left: 0; bottom: 0; padding: 4px 10px; font: 1.15rem/1.2 var(--pixel); color: #e9e4da; background: rgba(8, 10, 13, .75); }

/* ---- Trailer ---- */
.trailer video { width: 100%; aspect-ratio: 16 / 9; background: #000; border: 1px solid var(--line-2); }

/* ---- Press kit ---- */
.fact-sheet { display: grid; grid-template-columns: max-content 1fr; margin: 0; border: 1px solid var(--line); background: var(--plate); }
.fact-sheet dt, .fact-sheet dd { margin: 0; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.fact-sheet dt { font: 1.3rem/1.3 var(--pixel); color: var(--text-dim); text-transform: uppercase; letter-spacing: .04em; }
.fact-sheet dd { color: #f1ece2; }
.fact-sheet dt:last-of-type, .fact-sheet dd:last-of-type { border-bottom: 0; }
@media (max-width: 480px) {
  .fact-sheet { grid-template-columns: 1fr; }
  .fact-sheet dt { border-bottom: 0; padding-bottom: 0; }
}
.press-grid { display: grid; gap: 40px; grid-template-columns: 1fr; }
@media (min-width: 900px) { .press-grid { grid-template-columns: 1fr 1.4fr; gap: 64px; } }
.press-games { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.press-games a { display: block; padding: 12px 16px; border: 1px solid var(--line); background: var(--plate); font: 1.8rem/1 var(--pixel); color: #f1ece2; text-decoration: none; }
.press-games a:hover { border-color: var(--orange); }
.downloads { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); }
.downloads a { display: block; text-decoration: none; color: var(--text); border: 1px solid var(--line); background: var(--plate); height: 100%; }
.downloads a:hover { border-color: var(--orange); color: #fff; }
.downloads img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: #000; }
.downloads img.contain { object-fit: contain; padding: 16px; background: #07090c; }
.downloads span { display: block; padding: 8px 12px; font: 1.2rem/1.2 var(--pixel); }
.downloads small { color: var(--text-faint); font: .85rem/1 var(--body); }

/* ---- Long text (privacy) ---- */
.prose h2 { font-size: 2.2rem; margin-top: 1.6em; padding-top: .6em; border-top: 1px solid var(--line); }
.prose h2:first-of-type { margin-top: 1em; }
.prose ul { padding-left: 1.2em; margin: 0 0 1em; }
.prose li { margin: .3em 0; }
.prose li::marker { color: var(--orange); }
.tldr { position: relative; background: var(--plate); border: 1px solid var(--line-2); border-left: 4px solid var(--orange); padding: 20px 22px; font-size: 1.495rem; color: #f1ece2; margin: 0 0 24px; }
.muted { color: var(--text-dim); }
.small { font-size: 1.196rem; }

/* ---- Download page steps ---- */
.steps { list-style: none; counter-reset: step; margin: 32px 0; padding: 0; display: grid; gap: 16px; }
.steps li { counter-increment: step; position: relative; background: var(--plate); border: 1px solid var(--line); padding: 20px 20px 20px 76px; min-height: 76px; }
.steps li::before { content: counter(step); position: absolute; left: 0; top: 0; bottom: 0; width: 56px; display: grid; place-items: center; font: 2.4rem/1 var(--pixel); color: #120b06; background: var(--orange); }
.warn p:last-child { margin: 0; }
.h3 { font-size: 1.85rem; }
.steps .h3 { font-size: 1.7rem; margin: 0 0 .2em; }
.steps p { margin: 0; color: var(--text-dim); }
.warn { border: 1px solid var(--line-2); background: var(--plate); padding: 16px 18px 16px 18px; position: relative; overflow: hidden; }
.warn::before { content: ""; display: block; height: 6px; margin: -16px -18px 14px; background: repeating-linear-gradient(-45deg, var(--hazard) 0 10px, #111 10px 20px); }
kbd { font: 1.15rem/1 var(--pixel); background: var(--plate-2); border: 1px solid var(--line-2); padding: 1px 6px; color: #f1ece2; white-space: nowrap; }

/* ---- Footer ---- */
.site-footer { border-top: 1px solid var(--line); padding: 28px 0 36px; color: var(--text-faint); font: 1.25rem/1 var(--pixel); }
.site-footer p { margin: 0; }
.site-footer a { color: var(--text-dim); text-decoration: none; }
.site-footer a:hover, .site-footer a[aria-current] { color: #f1ece2; }

/* ---- 404 ---- */
.lost { min-height: 70vh; display: flex; align-items: center; }
.lost h1 { color: var(--echo); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
[hidden] { display: none !important; }

/* ---- Teaser and page tops ---- */
.gallery figure { margin: 0; height: 100%; }
.page-top { padding-bottom: 0; }
.page-top + .section { border-top: 0; }
.studio-line { margin-top: 28px; padding-top: 18px; border-top: 1px solid rgba(214, 208, 196, .18); max-width: 34em; color: var(--text-dim); font-size: 1.3rem; }
.hero.teaser picture img { inset: auto 0 0 0; height: 141.7%; object-position: 64% 61.9%; } /* the tunnel (61.9% down the photo) lands 46% down the hero on every screen size */
.hero.teaser h1 { font-size: clamp(3.5rem, 13vw, 8.5rem); max-width: none; }
.hero.teaser .lead { font: 400 clamp(1.6rem, 4vw, 2.2rem)/1.15 var(--pixel); color: var(--echo); text-shadow: 0 0 18px rgba(191, 234, 240, .35); }
.card.upcoming { background: linear-gradient(160deg, var(--plate-2), var(--plate) 60%); min-height: 220px; }
.card.upcoming .card-body { justify-content: center; }
