/* The shared Playable Things navigation that scripts/build.mjs adds to every game page: a bar at
   the top (.pt-bar) and a block above the end of the page (.pt-foot). Each game's site has its own
   styles, so everything here starts from the browser's defaults (all: revert) and sets what it
   needs; nothing may depend on, or leak into, the page around it. */

.pt-bar, .pt-foot {
  --pt-bg: #0c0d0f;
  --pt-raised: #17191d;
  --pt-line: #2b2e35;
  --pt-text: #f2f1ec;
  --pt-dim: #a4a7b0;
  --pt-accent: #c6f24e;
  all: revert;
  display: block;
  box-sizing: border-box;
  margin: 0;
  background: var(--pt-bg);
  color: var(--pt-text);
  font: 400 14px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-style: normal;
  letter-spacing: normal;
  word-spacing: normal;
  text-align: left;
  text-transform: none;
  text-shadow: none;
  text-indent: 0;
  -webkit-font-smoothing: antialiased;
  color-scheme: dark;
}
/* Not inside the mark: an SVG's geometry attributes are properties too, and would be reverted. */
.pt-bar :not(svg, svg *), .pt-foot :not(svg, svg *) { all: revert; box-sizing: border-box; }
.pt-bar :focus-visible, .pt-foot :focus-visible { outline: 2px solid var(--pt-accent); outline-offset: 2px; }

.pt-mark { flex: none; display: block; width: 16px; height: 16px; }
.pt-mark rect { fill: var(--pt-accent); }
.pt-mark path { fill: var(--pt-bg); }

/* ---- The bar ---- */

.pt-bar {
  position: relative;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 36px;
  padding: 0 clamp(12px, 3vw, 28px);
  border-bottom: 1px solid var(--pt-line);
  font-size: 12px;
  line-height: 1;
}
.pt-bar a { color: var(--pt-dim); text-decoration: none; }
.pt-bar a:hover { color: var(--pt-text); }
.pt-bar .pt-bar__home {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 0;
  color: var(--pt-text);
  font-weight: 650;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
}
.pt-bar ul { list-style: none; margin: 0; padding: 0; }
.pt-bar li { margin: 0; padding: 0; }
.pt-bar .pt-bar__links { display: flex; gap: clamp(12px, 2vw, 24px); }
.pt-bar .pt-bar__links a { display: block; padding: 12px 0; letter-spacing: 0.04em; white-space: nowrap; }
.pt-bar a[aria-current] { color: var(--pt-text); box-shadow: inset 0 -2px var(--pt-accent); }

.pt-bar .pt-bar__menu { display: none; position: relative; }
.pt-bar summary {
  display: block; list-style: none; cursor: pointer;
  padding: 11px 0; color: var(--pt-dim); letter-spacing: 0.04em;
}
.pt-bar summary::-webkit-details-marker { display: none; }
.pt-bar summary::after { content: " \25BE"; }
.pt-bar .pt-bar__menu[open] summary { color: var(--pt-text); }
.pt-bar .pt-bar__menu ul {
  position: absolute; right: -4px; top: 100%;
  min-width: 190px; padding: 6px;
  background: var(--pt-raised); border: 1px solid var(--pt-line); border-radius: 8px;
  box-shadow: 0 12px 32px rgb(0 0 0 / 0.5);
}
.pt-bar .pt-bar__menu a { display: block; padding: 11px 12px; border-radius: 5px; font-size: 14px; color: var(--pt-text); }
.pt-bar .pt-bar__menu a:hover { background: var(--pt-line); }
.pt-bar .pt-bar__menu a[aria-current] { box-shadow: inset 2px 0 var(--pt-accent); }

@media (max-width: 760px) {
  .pt-bar .pt-bar__links { display: none; }
  .pt-bar .pt-bar__menu { display: block; }
}

/* ---- Fixes for one game's page ---- */

/* Annhexation's own header is fixed to the top of the window: keep the bar there too, above it. */
.pt-bar.pt-bar--annhexation { position: sticky; top: 0; }
.pt-bar--annhexation ~ .top-nav, .pt-bar--annhexation ~ .site-nav { top: 36px; }
.pt-bar--annhexation ~ .mobile-menu { top: calc(4rem + 36px); }

/* ---- The block at the end of the page ---- */

.pt-foot { position: relative; z-index: 5; border-top: 1px solid var(--pt-line); padding: 44px clamp(16px, 4vw, 40px) 28px; }
.pt-foot .pt-foot__in { max-width: 1120px; margin: 0 auto; }
.pt-foot p { margin: 0; }
.pt-foot a { color: inherit; text-decoration: none; }

.pt-foot .pt-foot__label {
  margin: 0 0 16px;
  color: var(--pt-dim);
  font-size: 12px; font-weight: 650; letter-spacing: 0.16em; text-transform: uppercase;
}

.pt-foot .pt-foot__games {
  list-style: none; margin: 0 0 36px; padding: 0;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px;
}
.pt-foot .pt-foot__games li { margin: 0; padding: 0; }
.pt-foot .pt-foot__games a { display: block; }
.pt-foot .pt-foot__games img {
  display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover;
  border-radius: 6px; border: 1px solid var(--pt-line); background: var(--pt-raised);
  transition: border-color 0.15s;
}
.pt-foot .pt-foot__games a:hover img { border-color: var(--pt-accent); }
.pt-foot .pt-foot__title { display: block; margin-top: 10px; font-size: 15px; font-weight: 650; }
.pt-foot .pt-foot__genre { display: block; color: var(--pt-dim); font-size: 13px; }

.pt-foot .pt-foot__news {
  display: flex; align-items: center; justify-content: space-between; gap: 20px 40px; flex-wrap: wrap;
  margin: 0; padding: 22px 24px;
  background: var(--pt-raised); border: 1px solid var(--pt-line); border-radius: 10px;
}
.pt-foot .pt-foot__pitch { flex: 1 1 320px; }
.pt-foot .pt-foot__news label { display: block; margin-bottom: 4px; font-size: 16px; font-weight: 650; }
.pt-foot .pt-foot__news p { color: var(--pt-dim); max-width: 52ch; }
.pt-foot .pt-foot__field { flex: 1 1 320px; display: flex; gap: 8px; max-width: 460px; }
.pt-foot .pt-foot__news input[type="email"] {
  flex: 1 1 auto; min-width: 0; height: 44px; padding: 0 14px;
  background: var(--pt-bg); color: var(--pt-text);
  border: 1px solid #4a4e58; border-radius: 6px;
  font: inherit; font-size: 16px;
}
.pt-foot .pt-foot__news input[type="email"]::placeholder { color: #8a8d96; opacity: 1; }
.pt-foot .pt-foot__news button {
  flex: none; height: 44px; padding: 0 18px;
  background: var(--pt-accent); color: #10130a;
  border: 0; border-radius: 6px; cursor: pointer;
  font: inherit; font-size: 15px; font-weight: 650;
}
.pt-foot .pt-foot__news button:hover { background: #d8ff6b; }

.pt-foot .pt-foot__legal { margin-top: 26px; color: var(--pt-dim); font-size: 13px; }
.pt-foot .pt-foot__legal a { display: inline-flex; align-items: center; gap: 8px; }
.pt-foot .pt-foot__legal a:hover { color: var(--pt-text); }

@media (max-width: 760px) {
  .pt-foot .pt-foot__games { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pt-foot .pt-foot__field { max-width: none; }
}
@media (max-width: 420px) {
  .pt-foot .pt-foot__field { flex-wrap: wrap; }
  .pt-foot .pt-foot__news button { flex: 1 1 100%; }
}
