/* SUSPECIES — the website's look: the game's own "Style Q · Pixel Arcade" UI (night-navy panels, a 2 px lime outline,
   gold for the main action, stair-step pixel corners, a hard drop, pixel type: Jersey 15 and Silkscreen) around the
   painted key art. The colours are the UI package's Wireframe.uss variables; the frames are its 9-slices, redrawn as
   SVG by tools/make_assets.py. Like the game: no rounding, no glow, nothing loops. */

@font-face {
  font-family: "Jersey 15";
  src: url("/assets/fonts/Jersey15-Regular.ttf") format("truetype");
  font-display: swap;
}
@font-face {
  font-family: "Silkscreen";
  src: url("/assets/fonts/Silkscreen-Regular.ttf") format("truetype");
  font-display: swap;
}

:root {
  --night: #070919;
  --pine: #0d1027;
  --well: #181c3a;
  --cap: #262b50;
  --key: #2e3558;
  --key-hover: #404a7a;
  --ink: #f4f6fb;
  --ink-2: #9aa2c2;
  --lime: #a8e65a;
  --gold: #ffd23f;
  --gold-hover: #ffe680;

  --display: "Jersey 15", "Arial Black", sans-serif;
  --label: "Silkscreen", "Courier New", monospace;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;

  --wrap: 1120px;
  --gutter: clamp(16px, 4vw, 40px);
  --bar: 72px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--bar) + 16px); -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; } }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--night);
  /* space outside the saucer: a few pixel stars over the night, the key art's cold blue far off */
  background-image: url("/assets/img/stars.svg"), radial-gradient(60vw 40vw at 0% 0%, rgba(30, 79, 143, 0.25), transparent 70%);
  background-size: 480px 480px, 100% 100%;
  color: var(--ink);
  font: 400 1.0625rem/1.65 var(--body);
  overflow-x: hidden;
}
main { flex: 1; }

img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: var(--gold); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { color: var(--gold-hover); }
:focus-visible { outline: 2px solid var(--lime); outline-offset: 3px; }
::selection { background: var(--lime); color: var(--night); }
p { margin: 0 0 1em; }

.skip {
  position: absolute; left: 16px; top: -100px; z-index: 100;
  padding: 10px 16px; background: var(--lime); color: var(--night); font: 16px var(--label); text-decoration: none;
}
.skip:focus { top: 16px; }

.wrap { width: 100%; max-width: calc(var(--wrap) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }

.h-display {
  margin: 0 0 24px;
  font: 400 80px/0.9 var(--display);
  color: var(--ink);
  text-shadow: 0 4px 0 var(--night);
}
@media (max-width: 760px) { .h-display { font-size: 60px; } }
@media (max-width: 420px) { .h-display { font-size: 40px; text-shadow: 0 2px 0 var(--night); } }

/* ---- the game's panels and keys ---------------------------------------------------------------------------------- */

.frame {
  border: 8px solid transparent;
  border-image: url("/assets/img/frames/panel-quiet.svg") 4 fill / 8px / 0 stretch;
  filter: drop-shadow(0 4px 0 var(--night));
}
.frame--lit { border-image-source: url("/assets/img/frames/cap.svg"); }

.btn {
  --frame: url("/assets/img/frames/gold.svg");
  --frame-hover: url("/assets/img/frames/gold-hover.svg");
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 56px; padding: 6px 20px 8px;
  border: 8px solid transparent;
  border-image: var(--frame) 4 fill / 8px / 0 stretch;
  filter: drop-shadow(0 4px 0 var(--night));
  color: var(--night);
  font: 400 30px/1 var(--display);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 80ms steps(2), filter 80ms steps(2);
}
.btn:hover { border-image-source: var(--frame-hover); color: var(--night); }
.btn:active { transform: translateY(2px); filter: drop-shadow(0 2px 0 var(--night)); }
.btn__icon { width: 24px; height: 24px; flex: none; }
.btn--small { min-height: 44px; padding: 2px 12px 4px; font-size: 20px; }
.btn--small .btn__icon { width: 18px; height: 18px; }
.btn--big { min-height: 72px; padding: 8px 32px 10px; font-size: 40px; }
.btn--big .btn__icon { width: 30px; height: 30px; }
@media (max-width: 560px) {
  .btn--big { min-height: 60px; padding: 6px 18px 8px; font-size: 30px; }
  .btn--big .btn__icon { width: 24px; height: 24px; }
}

/* the small links under the main key: a light outline over the art (trailer, press kit, Discord, FAQ, support) */
.pill {
  display: inline-flex; align-items: center; min-height: 44px; padding: 4px 14px 6px;
  border: 6px solid transparent;
  border-image: url("/assets/img/frames/ghost.svg") 4 fill / 6px / 0 stretch;
  color: var(--ink); text-decoration: none;
  font: 400 20px/1 var(--display); letter-spacing: 0.02em;
  transition: transform 80ms steps(2);
}
.pill:hover { color: var(--gold); border-image-source: url("/assets/img/frames/ghost-hover.svg"); }
.pill:active { transform: translateY(2px); }

/* ---- the home page: one screen, as PEAK's ------------------------------------------------------------------------ */

/* the landing fills the screen above the footer: body is a column at least the screen's height */
.home { min-height: 100svh; }
.home main { display: flex; }
.home .bar { display: none; }
.landing {
  position: relative; isolation: isolate; flex: 1;
  display: flex; align-items: flex-start;
  /* the words stay on the blue wall, above the hunter who stands bottom left */
  padding: clamp(28px, 7vh, 88px) 0 24px;
}
.landing__art { position: fixed; inset: 0; z-index: -1; background: var(--night); }
/* one picture, the whole key art: a wide window loses some floor at the bottom, a narrow one some gym on the left */
.landing__art img { width: 100%; height: 100%; object-fit: cover; object-position: 58% 22%; }
.landing__art::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(7, 9, 25, 0.8) 0%, rgba(7, 9, 25, 0.45) 30%, rgba(7, 9, 25, 0) 52%),
    linear-gradient(180deg, rgba(7, 9, 25, 0.35) 0%, rgba(7, 9, 25, 0) 30%, rgba(7, 9, 25, 0) 76%, rgba(7, 9, 25, 0.8) 100%);
}
.landing__inner { width: 100%; max-width: calc(var(--wrap) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }
/* (the logo's drawing starts 3% into its picture: pulled back so its left edge meets the others') */
.landing__logo { margin: 0 0 12px -14px; max-width: 470px; }
.landing__logo img { width: 100%; filter: drop-shadow(0 6px 0 rgba(7, 9, 25, 0.6)); }
.landing__tag {
  max-width: 480px; margin: 0 0 24px;
  font: 400 30px/1.05 var(--display); color: var(--gold); text-shadow: 0 3px 0 var(--night);
}
/* the main key with the small links beside it, clear of the hunter below */
.landing__row { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 20px; }
.links { display: flex; flex-wrap: wrap; gap: 10px 12px; }

.home .foot { position: relative; z-index: 1; background: transparent; box-shadow: none; }
.home .foot__more, .home .foot__note { display: none; }
.nobreak { white-space: nowrap; }
.home .foot p, .home .foot a { text-shadow: 0 1px 2px var(--night); }

/* a squarer window (an old monitor, a tablet): the whole art across the bottom, the night above it, so it keeps both
   the hunter and the alien's eye instead of losing its sides */
@media (min-width: 761px) and (min-aspect-ratio: 1001/1000) and (max-aspect-ratio: 16/10) {
  .landing__art img {
    position: absolute; left: 0; bottom: 0; height: auto; aspect-ratio: 16 / 9;
    mask-image: linear-gradient(180deg, transparent 0, #000 22%);
  }
}
/* a short laptop screen: a smaller logo, so the words end above the hunter's head */
@media (min-width: 761px) and (max-height: 820px) {
  .landing__logo { max-width: 360px; margin-left: -11px; }
  .landing__tag { font-size: 24px; margin-bottom: 18px; }
}
/* a phone, or any upright screen: the art on top in a 4:3 box (the alien in its line and the hunter both in it), the
   words under it */
@media (max-width: 760px), (max-aspect-ratio: 1/1) {
  .landing { flex-direction: column; align-items: stretch; padding: 0 0 8px; }
  .landing__art { position: relative; inset: auto; z-index: 0; aspect-ratio: 4 / 3; }
  .landing__art img { object-position: 52% 50%; }
  .landing__art::after { background: linear-gradient(180deg, rgba(7, 9, 25, 0) 55%, var(--night) 100%); }
  .landing__inner { position: relative; z-index: 1; margin-top: -40px; }
  .landing__logo { max-width: 330px; margin-left: -10px; }
  .landing__tag { font-size: 24px; margin-bottom: 18px; }
  .landing__row .btn--big { width: 100%; }
}

.bar__short { display: none; }

/* ---- the bar on the other pages ---------------------------------------------------------------------------------- */

.bar {
  position: sticky; top: 0; z-index: 50; height: var(--bar);
  background: rgba(13, 16, 39, 0.94);
  box-shadow: 0 2px 0 var(--key), 0 4px 0 var(--night);
}
.bar__inner {
  height: 100%; max-width: calc(var(--wrap) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter);
  display: flex; align-items: center; gap: 16px;
}
.bar__logo img { width: 140px; filter: drop-shadow(0 2px 0 var(--night)); }
.bar__nav { display: flex; gap: 4px; margin-left: auto; }
.bar__nav a { padding: 10px 12px; color: var(--ink); text-decoration: none; font: 400 20px/1 var(--display); }
.bar__nav a:hover { color: var(--gold); }
@media (max-width: 560px) {
  .bar__logo img { width: 104px; }
  .bar__nav a { padding: 10px 6px; font-size: 18px; }
  .bar__long { display: none; }
  .bar__short { display: inline; }
  .bar .btn--small { padding: 2px 8px 4px; }
}

/* ---- pages: FAQ, support, legal ---------------------------------------------------------------------------------- */

/* a dimmed strip of the key art on top, then the night; one column whose left edge is the bar's */
.page main {
  padding: 72px 0 96px;
  background:
    linear-gradient(180deg, rgba(7, 9, 25, 0.62) 0, rgba(7, 9, 25, 0.86) 200px, var(--night) 380px),
    url("/assets/img/hero.webp") center top / max(100%, 1200px) auto no-repeat,
    var(--night);
}
.column { max-width: 780px; }
.lead { font-size: 1.1875rem; color: var(--ink); max-width: 620px; }
.column .btn { margin-top: 8px; white-space: normal; overflow-wrap: anywhere; }
@media (max-width: 560px) { .column .btn { font-size: 20px; } }

.faq { display: grid; gap: 14px; }
.faq summary {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px 16px 14px 18px; cursor: pointer; list-style: none;
  font: 400 30px/1 var(--display); color: var(--ink);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; width: 20px; height: 20px; flex: none; background: var(--gold);
  -webkit-mask: url("/assets/img/plus.svg") center / contain no-repeat; mask: url("/assets/img/plus.svg") center / contain no-repeat;
}
.faq details[open] summary { color: var(--gold); }
.faq details[open] summary::after { -webkit-mask-image: url("/assets/img/minus.svg"); mask-image: url("/assets/img/minus.svg"); }
.faq details p { margin: 0; padding: 0 18px 16px; color: var(--ink-2); }
@media (max-width: 560px) { .faq summary { font-size: 20px; } }

.page-head { padding-bottom: 32px; }
.page-head .h-display { margin-bottom: 12px; }
.page-head p { max-width: 760px; color: var(--ink-2); font-size: 1.125rem; }
.page-meta { display: flex; flex-wrap: wrap; gap: 4px 0; margin-top: 4px; color: var(--ink-2); font-size: 0.9375rem; }
.page-meta > * + *::before { content: "·"; display: inline-block; margin: 0 10px; color: var(--key-hover); }
.page-meta a { color: var(--gold); }

.doc { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 48px; align-items: start; }
.doc > * { min-width: 0; }
.toc { position: sticky; top: calc(var(--bar) + 24px); padding: 16px 16px 12px; max-height: calc(100vh - var(--bar) - 48px); overflow: auto; }
.toc h2 { margin: 0 0 10px; font: 400 16px/1 var(--label); text-transform: uppercase; color: var(--gold); }
.toc ol { margin: 0; padding: 0; list-style: none; counter-reset: toc; }
.toc li { counter-increment: toc; }
.toc a { display: flex; gap: 8px; padding: 5px 0; color: var(--ink-2); text-decoration: none; font-size: 0.875rem; line-height: 1.35; }
.toc a::before { content: counter(toc) "."; color: var(--key-hover); min-width: 1.4em; }
.toc a:hover { color: var(--gold); }
@media (max-width: 960px) { .doc { grid-template-columns: minmax(0, 1fr); gap: 32px; } .toc { position: static; max-height: none; } }

.kicker { margin: 0 0 16px; font: 400 16px/1 var(--label); text-transform: uppercase; color: var(--gold); letter-spacing: 0.04em; }
.prose { max-width: 780px; }
.prose > section { margin: 0 0 56px; scroll-margin-top: calc(var(--bar) + 16px); }
.prose h2 { margin: 0 0 16px; font: 400 40px/1 var(--display); color: var(--gold); text-shadow: 0 3px 0 var(--night); }
.prose h3 { margin: 28px 0 8px; font: 400 30px/1 var(--display); }
.prose p, .prose li { color: #d6dbee; }
.prose ul, .prose ol { padding-left: 1.25em; margin: 0 0 1em; }
.prose li { margin-bottom: 0.4em; }
.prose li::marker { color: var(--gold); }
.prose .lead { font-size: 1.1875rem; color: var(--ink); }
.prose code { font: 0.9em ui-monospace, SFMono-Regular, Consolas, monospace; color: var(--ink); background: var(--well); padding: 0 4px; overflow-wrap: anywhere; }
.prose .note { padding: 16px 20px 6px; margin: 0 0 1.25em; }
.prose .note p { color: var(--ink); }

.table { width: 100%; overflow-x: auto; margin: 0 0 1.5em; }
.table table { width: 100%; min-width: 620px; border-collapse: collapse; font-size: 0.9375rem; background: rgba(13, 16, 39, 0.88); }
.table th, .table td { text-align: left; vertical-align: top; padding: 12px 14px; border-bottom: 2px solid var(--well); }
.table th { font: 400 16px/1.2 var(--label); text-transform: uppercase; color: var(--gold); background: var(--pine); }
.table td { color: #d6dbee; }
.table td:first-child { color: var(--ink); font-weight: 600; }

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

.foot { background: var(--pine); box-shadow: 0 -2px 0 var(--key); }
.foot__inner {
  max-width: calc(var(--wrap) + 2 * var(--gutter)); margin: 0 auto; padding: 16px var(--gutter) 20px;
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 24px;
  color: var(--ink-2); font-size: 0.8125rem;
}
.foot__inner p { margin: 0; }
.foot__inner nav { display: flex; gap: 16px; margin-left: auto; }
.foot__inner a { color: var(--ink-2); }
.foot__inner a:hover { color: var(--gold); }
.foot__note { flex-basis: 100%; opacity: 0.8; }
@media (max-width: 760px) { .foot__inner nav { margin-left: 0; } }

/* ---- 404 ---------------------------------------------------------------------------------------------------------- */

.lost { display: grid; place-items: center; text-align: center; padding: 0 var(--gutter); }
.lost img { width: 260px; margin: 0 auto 24px; }
.lost p { color: var(--ink-2); max-width: 460px; margin: 0 auto 28px; }
