/* Self-hosted fonts (SIL Open Font License, see fonts/OFL-*.txt). No remote loading. */
@font-face {
  font-family: "Press Start 2P";
  src: url("fonts/press-start-2p.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "VT323";
  src: url("fonts/vt323.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/*
  Pixel-font sizes: both fonts only render crisp on their pixel grid.
  Press Start 2P is drawn on an 8 px grid, so use 8, 16, 24, 32, 40 px.
  VT323 is drawn on a 25 px grid, so use 25 px.
  Letter-spacing and line-heights are whole pixels for the same reason.

  The site is one printed sheet. Ink on black, ruled columns, and the
  studio colors as spot inks with fixed jobs:
    green   = what you can click
    yellow  = the lead headline
    salmon  = notices, bosses, "to be announced"
    violet  = structure: rules, frames
    blue    = captions, datelines, labels
*/

:root {
  --black: #000000;
  --ink: #f0f0f0;
  --green: #CAE7B9;
  --yellow: #F3DE8A;
  --salmon: #EB9486;
  --violet: #7E7F9A;
  --blue: #97A7B3;
  --font-display: "Press Start 2P", "Courier New", monospace;
  --font-body: "VT323", "Courier New", monospace;
}

* { box-sizing: border-box; }

html {
  background: var(--black);
  scroll-behavior: smooth;
  scrollbar-color: var(--violet) var(--black);
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--black);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 25px;
  line-height: 32px;
}

::selection { background: var(--green); color: var(--black); }

h1, h2, h3 { margin: 0; font-weight: 400; }
p { margin: 0 0 16px; }

a {
  color: var(--green);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

/* hover = the ink inverts, like a negative print */
a:hover { background: var(--green); color: var(--black); }

a:focus-visible {
  outline: 2px solid var(--yellow);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* ------------------------------------------------------------------ */
/* Shared pieces                                                       */
/* ------------------------------------------------------------------ */

.sheet {
  flex: 1;
  width: 100%;
  max-width: 72rem;
  margin: 0 auto;
  padding: 0 24px 48px;
}

/* Plates: screenshots, hard-edged, framed by a thin rule */
.plate img,
.plates img {
  display: block;
  width: 100%;
  height: auto;
  border: 2px solid var(--violet);
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.plate a,
.plates a { display: block; text-decoration: none; }
.plate a:hover,
.plates a:hover { background: none; }

.plate a:hover img,
.plates a:hover img { border-color: var(--green); }

.cap {
  display: block;
  margin-top: 4px;
  color: var(--blue);
  font-size: 25px;
  line-height: 32px;
}

.plate a:hover .cap,
.plates a:hover .cap { color: var(--green); }

/* Spec list: label, dotted leader, value, like a manual */
.spec { margin: 0; padding: 0; }

.spec > div {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  column-gap: 8px;
  padding: 8px 0;
}

.spec dt {
  display: flex;
  flex: 1;
  align-items: baseline;
  gap: 8px;
  color: var(--blue);
  letter-spacing: 1px;
  text-transform: uppercase;
}

.spec dt::after {
  content: "";
  flex: 1;
  min-width: 16px;
  border-bottom: 2px dotted var(--violet);
}

.spec dd { margin: 0; color: var(--ink); }
.spec .note { flex: 0 0 100%; margin: 0; color: var(--blue); }
.spec .tba { color: var(--salmon); }

/* ------------------------------------------------------------------ */
/* Front page                                                          */
/* ------------------------------------------------------------------ */

.masthead { border-top: 4px solid var(--ink); }

.dateline {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0 24px;
  padding: 4px 0;
  border-bottom: 2px solid var(--violet);
  color: var(--blue);
  letter-spacing: 2px;
  text-transform: uppercase;
}

.masthead h1 { padding: 24px 0; }

.logo {
  display: block;
  width: min(100%, 480px);
  height: auto;
  margin: 0 auto;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.masthead::after {
  content: "";
  display: block;
  border-top: 6px double var(--ink);
}

/* the double rule is drawn once when the page opens */
@media (prefers-reduced-motion: no-preference) {
  .masthead::after { animation: rule-draw 700ms cubic-bezier(0.16, 1, 0.3, 1) both; }
  @keyframes rule-draw {
    from { clip-path: inset(0 100% 0 0); }
    to   { clip-path: inset(0 0 0 0); }
  }
}

.front {
  display: grid;
  grid-template-columns: minmax(0, 8fr) minmax(0, 4fr);
  column-gap: 32px;
  padding-top: 40px;
}

.lead-title {
  margin-bottom: 16px;
  color: var(--yellow);
  font-family: var(--font-display);
  font-size: 40px;
  line-height: 48px;
  text-transform: uppercase;
}

.deck { max-width: 36rem; margin-bottom: 24px; }

.front .plate { max-width: 640px; margin: 0 0 24px; }

.more { display: inline-block; margin-bottom: 16px; }

.col {
  padding-left: 32px;
  border-left: 2px solid var(--violet);
}

.col-title {
  margin: 0 0 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--violet);
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 16px;
  line-height: 24px;
  text-transform: uppercase;
}

.col section + section { margin-top: 40px; }

/* ------------------------------------------------------------------ */
/* Footer: the colophon                                                */
/* ------------------------------------------------------------------ */

footer { border-top: 6px double var(--ink); }

.foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 48px;
  max-width: 72rem;
  margin: 0 auto;
  padding: 24px;
  color: var(--blue);
}

.foot p { margin: 0; max-width: 40rem; }

.foot nav { display: flex; gap: 24px; }

.game-page .foot { max-width: 80rem; }

.foot nav a { display: inline-block; padding: 4px 0; color: var(--green); }
.foot nav a:hover { color: var(--black); }

/* ------------------------------------------------------------------ */
/* Game page                                                           */
/* ------------------------------------------------------------------ */

.layout {
  flex: 1;
  display: grid;
  grid-template-columns: 14rem minmax(0, 1fr);
  column-gap: 48px;
  width: 100%;
  max-width: 80rem;
  margin: 0 auto;
  padding: 32px 24px 48px;
}

.layout > main { min-width: 0; }

.sidebar {
  position: sticky;
  top: 32px;
  align-self: start;
  max-height: calc(100vh - 64px);
  overflow-y: auto;
}

.side-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  color: var(--ink);
  letter-spacing: 1px;
  line-height: 25px;
  text-decoration: none;
  text-transform: uppercase;
}

.side-brand:hover { background: none; color: var(--yellow); }

.side-brand img {
  flex: none;
  width: 48px;
  height: 48px;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.side-nav {
  padding-top: 8px;
  border-top: 4px solid var(--ink);
}

.side-nav ul { margin: 0; padding: 0; list-style: none; }

.side-nav a {
  display: block;
  padding: 0 8px;
  color: var(--blue);
  letter-spacing: 1px;
  text-decoration: none;
  text-transform: uppercase;
}

.side-nav a:hover { background: none; color: var(--ink); }

.side-nav a[aria-current="location"] {
  background: var(--green);
  color: var(--black);
}

.side-nav .sub { margin: 0 0 8px 16px; }
.side-nav .sub a { color: var(--violet); }
.side-nav .sub a:hover { color: var(--ink); }
.side-nav .sub a[aria-current="location"] { color: var(--black); }

.side-back { margin: 24px 0 0; padding-top: 8px; border-top: 2px solid var(--violet); }

/* Head of the issue */
.game-title {
  margin-bottom: 24px;
  color: var(--yellow);
  font-family: var(--font-display);
  font-size: 40px;
  line-height: 48px;
  text-transform: uppercase;
}

.lead { max-width: 40rem; margin-bottom: 24px; }

.strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0 24px;
  margin: 0;
  padding: 4px 0;
  border-top: 2px solid var(--violet);
  border-bottom: 2px solid var(--violet);
  color: var(--blue);
  letter-spacing: 2px;
  list-style: none;
  text-transform: uppercase;
}

.strip .tba { color: var(--salmon); }

/* Sections */
.sec { margin-top: 64px; scroll-margin-top: 32px; }

.sec-title {
  margin: 0 0 24px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--violet);
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 16px;
  line-height: 24px;
  text-transform: uppercase;
}

.sec > p { max-width: 40rem; }

.cols {
  columns: 2;
  column-gap: 48px;
  column-rule: 2px solid var(--violet);
}

.cols p { break-inside: avoid; }
.cols p:last-child { margin-bottom: 0; }

/* Trailer: click-to-load video, notice first */
.video-note {
  max-width: 48rem;
  margin: 0 0 16px;
  padding: 8px 16px;
  border: 2px solid var(--salmon);
}

.video-note strong {
  color: var(--salmon);
  font-weight: 400;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.video-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  border: 2px solid var(--violet);
  background: #000;
}

.video-play { position: absolute; inset: 0; display: block; text-decoration: none; }
.video-play:hover { background: none; }

.video-play img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  opacity: 0.85;
}

.video-play:hover img { opacity: 1; }
.video-play:focus-visible { outline: 3px solid var(--yellow); outline-offset: -7px; }

.play-icon {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  place-items: center;
  width: 96px;
  height: 96px;
  margin: -48px 0 0 -48px;
  background: var(--green);
  color: var(--black);
}

.play-icon svg { display: block; fill: currentColor; shape-rendering: crispEdges; }
.video-play:hover .play-icon { background: var(--yellow); }

.video-play .tag {
  position: absolute;
  left: 0;
  bottom: 0;
  padding: 0 12px;
  background: var(--black);
  color: var(--green);
  letter-spacing: 1px;
  text-transform: uppercase;
}

.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* Areas: one ruled row each */
.area {
  display: grid;
  grid-template-columns: 11rem repeat(2, minmax(0, 1fr));
  gap: 0 24px;
  padding: 24px 0;
  border-top: 2px dotted var(--violet);
}

.area:first-of-type { padding-top: 0; border-top: 0; }

.area-name {
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 16px;
  line-height: 24px;
  text-transform: uppercase;
}

.area-no { margin: 0 0 8px; color: var(--blue); letter-spacing: 1px; text-transform: uppercase; }
.area-boss { margin: 8px 0 0; color: var(--salmon); }

.bosses { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; margin-top: 24px; }

/* Screenshot viewer */
dialog.lightbox {
  width: min(96vw, 1280px);
  max-width: 96vw;
  padding: 16px;
  border: 2px solid var(--violet);
  background: #000;
  color: var(--ink);
}

dialog.lightbox::backdrop { background: rgba(0, 0, 0, 0.92); }

dialog.lightbox figure { margin: 0; }

dialog.lightbox img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 72vh;
  object-fit: contain;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

dialog.lightbox figcaption {
  padding-top: 12px;
  color: var(--blue);
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.lb-controls {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 16px;
}

.lb-controls button {
  padding: 8px 24px;
  border: 2px solid var(--green);
  background: #000;
  color: var(--green);
  font-family: var(--font-display);
  font-size: 16px;
  line-height: 24px;
  cursor: pointer;
}

.lb-controls button:hover { background: var(--green); color: #000; }

.lb-controls button:focus-visible {
  outline: 2px solid var(--yellow);
  outline-offset: 3px;
}

/* ------------------------------------------------------------------ */
/* Imprint and privacy                                                 */
/* ------------------------------------------------------------------ */

.legal { max-width: 46rem; margin: 0 auto; padding: 32px 24px 48px; flex: 1; }

.legal h1 {
  margin: 24px 0 8px;
  padding-bottom: 16px;
  border-bottom: 6px double var(--ink);
  color: var(--yellow);
  font-family: var(--font-display);
  font-size: 24px;
  line-height: 32px;
  text-transform: uppercase;
}

.legal h2 {
  margin: 40px 0 8px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--violet);
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 16px;
  line-height: 24px;
  text-transform: uppercase;
}

.legal p, .legal ul { margin: 8px 0; }
.legal address { font-style: normal; }
.legal .back { display: inline-block; }
.legal .updated { color: var(--blue); }

/* ------------------------------------------------------------------ */
/* Responsive                                                          */
/* ------------------------------------------------------------------ */

/* Sidebar becomes a sticky bar at the top */
@media (max-width: 60rem) {
  html { scroll-padding-top: 72px; }

  .layout { display: block; padding: 0 16px 40px; }

  .sidebar {
    position: sticky;
    top: 0;
    z-index: 5;
    display: flex;
    align-items: center;
    gap: 12px;
    max-height: none;
    margin: 0 -16px 32px;
    padding: 8px 16px;
    overflow: visible;
    border-bottom: 2px solid var(--violet);
    background: var(--black);
  }

  .side-brand { margin: 0; }
  .side-brand span { display: none; }

  .side-nav {
    flex: 1;
    min-width: 0;
    padding: 0;
    overflow-x: auto;
    border-top: 0;
    scrollbar-width: none;
  }

  .side-nav::-webkit-scrollbar { display: none; }
  .side-nav > ul { display: flex; gap: 4px; white-space: nowrap; }
  .side-nav .sub { display: none; }
  .side-back { display: none; }

  .sec { scroll-margin-top: 72px; }

  .area { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .area-head { grid-column: 1 / -1; margin-bottom: 16px; }
}

@media (max-width: 48rem) {
  .front { display: block; }
  .col { margin-top: 40px; padding: 24px 0 0; border-left: 0; border-top: 2px solid var(--violet); }
  .cols { columns: 1; }
}

@media (max-width: 38rem) {
  .area { grid-template-columns: 1fr; gap: 16px 0; }
  .bosses { grid-template-columns: 1fr; }
  .dateline { justify-content: center; text-align: center; }
}

@media (max-width: 480px) {
  .lead-title, .game-title { font-size: 24px; line-height: 32px; }
  .legal h1 { font-size: 16px; line-height: 24px; }
  .sheet { padding: 0 16px 40px; }
  .foot { padding: 24px 16px; }
}
