/*
 * The game's website (card game-website). The game's own font (VT323,
 * game/assets/fonts/vt323) and colours: the night sky, magenta and cyan of the
 * key art and logo, the HUD's cream and the kill counter's red. Panels and
 * keys are drawn like the game's HUD box and menu keys.
 */
@font-face {
  font-family: "VT323";
  src: url("fonts/VT323-Regular.ttf") format("truetype");
  font-display: swap;
}

:root {
  --night: #120a22;
  --dusk: #22123f;
  --violet: #3a1d6b;
  --magenta: #ff3aa8;
  --cyan: #35e3ff;
  --moon: #e8f3ff;
  --cream: #f4d79b;
  --blood: #ff6b7a;
  --key: #c9ccd6;
  --key-ink: #16121f;
  --measure: 40rem;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 4rem; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--night);
  color: var(--moon);
  font-family: "VT323", ui-monospace, monospace;
  font-size: 1.5rem;
  line-height: 1.25;
  -webkit-font-smoothing: none;
}

img, video { display: block; max-width: 100%; height: auto; image-rendering: pixelated; }

a { color: var(--cyan); text-underline-offset: 0.15em; }
a:hover { color: var(--moon); }
:focus-visible { outline: 3px solid var(--magenta); outline-offset: 3px; }

.skip { position: absolute; left: -999px; }
.skip:focus { left: 1rem; top: 1rem; z-index: 10; background: var(--key); color: var(--key-ink); padding: 0.25rem 0.75rem; }

/* The top bar, drawn like the game's HUD box: a light double rule on dark glass. */
.hud {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.5rem;
  align-items: baseline;
  margin: 0 auto;
  padding: 0.5rem 1rem;
  background: rgba(18, 10, 34, 0.88);
  border-bottom: 2px solid var(--key);
  box-shadow: 0 2px 0 var(--night), 0 4px 0 rgba(201, 204, 214, 0.35);
  font-size: 1.6rem;
}
.hud a { color: var(--moon); text-decoration: none; }
.hud a:hover { color: var(--cream); }
.hud .hud-title { color: var(--cream); margin-right: auto; }

/* The key art, full width, with the logo standing on it. */
.hero { position: relative; background: var(--night); }
.hero-art { width: 100%; min-height: 16rem; object-fit: cover; object-position: 40% 50%; }
.hero-logo {
  position: absolute;
  left: 50%;
  bottom: 12%;
  transform: translateX(-50%);
  width: min(42rem, 80%);
  margin: 0;
}
.hero-logo img { width: 100%; filter: drop-shadow(0 6px 0 var(--night)); }
.hero > .placeholder { position: absolute; left: 1rem; bottom: 0.75rem; margin: 0; }

/* The label the game's own footage carries, as a chip. */
.placeholder {
  display: inline-block;
  margin: 0.75rem 0 0;
  padding: 0.1rem 0.6rem;
  background: rgba(40, 36, 52, 0.92);
  color: var(--moon);
  font-size: 1.15rem;
}

main { padding: 0 1rem 4rem; }
section { max-width: var(--measure); margin: 0 auto; padding-top: 3.5rem; }
section.trailer, section.shots { max-width: 62rem; }

h2, h3 { font-weight: normal; color: var(--cream); line-height: 1.05; }
h2 { font-size: 3rem; margin: 0 0 1rem; }
h3 { font-size: 2rem; margin: 2.25rem 0 0.5rem; }
p { margin: 0 0 0.9rem; }
ul { margin: 0 0 0.9rem; padding-left: 1.25rem; }
li { margin-bottom: 0.4rem; }
li::marker { color: var(--magenta); content: "\25A0  "; }

.intro { padding-top: 2.5rem; }
.lede { font-size: 2rem; line-height: 1.15; color: var(--moon); }

/* A framed screen, like the game's room on its dark wall. */
.screen {
  padding: 6px;
  background: var(--key);
  box-shadow: 0 0 0 4px var(--night), 0 0 0 6px var(--violet), 0 14px 0 6px rgba(0, 0, 0, 0.35);
}
.screen video { width: 100%; background: #000; }

/* The cast: each name in the colour the game gives the counters it moves. */
.cast { list-style: none; padding: 0; }
.cast li { padding-left: 0.9rem; border-left: 4px solid var(--violet); margin-bottom: 0.9rem; }
.cast li::marker { content: none; }
.cast strong { font-weight: normal; color: var(--cream); }
.survivors li { border-left-color: var(--cyan); }
.killers li { border-left-color: var(--blood); }
.killers strong { color: var(--blood); }

.shot-grid {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 28rem), 1fr));
  gap: 1.25rem;
}
.shot-grid li { margin: 0; }
.shot-grid li::marker { content: none; }
.shot-grid a { display: block; border: 2px solid var(--key); }
.shot-grid a:hover { border-color: var(--cream); }

.facts { display: grid; grid-template-columns: max-content 1fr; gap: 0.2rem 1.5rem; margin: 0 0 1rem; }
.facts div { display: contents; }
.facts dt { color: var(--cream); }
.facts dd { margin: 0; }

/* The game's menu keys: grey caps with a red mark in the corner. */
.keys { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 0.9rem; }
.keys li::marker { content: none; }
.key {
  position: relative;
  display: inline-block;
  padding: 0.3rem 1rem 0.3rem 1.3rem;
  background: var(--key);
  color: var(--key-ink);
  text-decoration: none;
  border: 2px solid #f0f1f5;
  box-shadow: inset -2px -2px 0 #8d90a0, 0 0 0 2px var(--night), 0 0 0 4px var(--key);
}
.key::before { content: ""; position: absolute; left: 4px; top: 4px; width: 6px; height: 4px; background: #a0182a; }
.key:hover { background: var(--cream); color: var(--key-ink); }
.key:active { box-shadow: inset 2px 2px 0 #8d90a0, 0 0 0 2px var(--night), 0 0 0 4px var(--key); }
.key.wishlist { font-size: 1.9rem; margin-top: 0.5rem; }

.footer {
  border-top: 2px solid var(--violet);
  padding: 1.5rem 1rem 2.5rem;
  text-align: center;
  color: var(--key);
}
.footer p { margin: 0.2rem 0; }

/* The privacy policy: long reading, so a little more room between lines. */
.policy { max-width: var(--measure); margin: 0 auto; padding-top: 2.5rem; line-height: 1.3; }
.policy h1 { font-weight: normal; font-size: 3rem; color: var(--cream); margin: 0 0 1rem; line-height: 1.05; }
.policy h2 { font-size: 2.2rem; margin-top: 2.5rem; }
.policy code { font-family: inherit; color: var(--cream); }
.policy strong { font-weight: normal; color: var(--cream); }
.policy table { border-collapse: collapse; width: 100%; margin: 0 0 1rem; font-size: 1.25rem; }
.policy th, .policy td { text-align: left; vertical-align: top; padding: 0.4rem 0.6rem; border: 2px solid var(--violet); }
.policy th { color: var(--cream); font-weight: normal; background: var(--dusk); }
.policy-table { overflow-x: auto; }

@media (max-width: 40rem) {
  body { font-size: 1.35rem; }
  .hud { font-size: 1.3rem; gap: 0.1rem 1rem; }
  .hud .hud-title { flex-basis: 100%; }
  h2 { font-size: 2.4rem; }
  .lede { font-size: 1.6rem; }
  .hero-logo { bottom: 22%; width: 88%; }
  .hero > .placeholder { position: static; margin: 0.5rem 1rem 0; }
}
