@font-face {
  font-family: 'Workbench';
  src: url('../static/workbench.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

/* ─────────────────────────────────────────────────────────────────────────
   Myth/OS.

   The one page that runs its own typeface and its own near-monochrome
   palette — that is the point of it. Everything else it shares with the rest
   of the site: the same measure, the same margins, the same footer.
   ───────────────────────────────────────────────────────────────────────── */
body.mythos-page {
  color: var(--m-text);
  font-family: 'Workbench', monospace;
  scrollbar-color: var(--m-text) var(--bg);
}

body.mythos-page ::-webkit-scrollbar-thumb {
  background: var(--m-text);
}

/* CRT Shader Effect */
body.mythos-page::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background:
    linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(var(--bg-rgb), 0.25) 50%),
    linear-gradient(90deg, rgba(255, 0, 0, 0.06), rgba(var(--fg-rgb), 0.02), rgba(0, 0, 255, 0.06));
  background-size: 100% 2px, 3px 100%;
  pointer-events: none;
  z-index: 1000;
}

/* CRT Screen curvature and glow */
body.mythos-page::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(ellipse at center, transparent 60%, rgba(var(--bg-rgb), 0.8) 100%);
  pointer-events: none;
  z-index: 999;
}

/* The footer bar keeps its shape here — one hairline along the top, flush to
   the edges — and only changes palette. It used to draw a full box around
   itself on this page alone. */
.mythos-page .nav-container {
  border-top-color: var(--m-line);
}

.mythos-page .nav-btn {
  color: var(--m-faint);
  border-color: transparent;
}

.mythos-page .nav-btn:is(:hover, .is-hover) {
  color: var(--m-text);
  border-color: var(--m-line);
  background-color: rgba(var(--m-text-rgb), 0.08);
}

.mythos-page .nav-btn.active {
  color: var(--m-text);
  border-color: var(--m-line);
  background-color: rgba(var(--m-text-rgb), 0.12);
}

/* The page frame: the same measure, margins and footer clearance as every
   other page, from page.css. The title block is centred; that is Myth/OS's
   own character, not a different set of margins. */
.mythos-page .container {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: var(--page-pad-top) var(--page-pad-x) var(--page-pad-bottom);
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.mythos-page .title-area {
  text-align: center;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0 0 0.5rem;
}

.mythos-page .title-wrapper {
  display: flex;
  width: 100%;
  justify-content: center;
}

/* The wordmark. Set in Workbench, which is wide and heavily textured, so it
   is held a step below the size it used to run at — at 7rem it was the only
   thing on the site that did not sit on the shared scale. */
.mythos-page .mythos-title {
  font-family: 'Workbench', monospace;
  font-size: clamp(2.4rem, 8vw, 4.6rem);
  line-height: 1;
  color: var(--m-text);
  text-align: center;
  margin: 0;
  letter-spacing: 0.08em;
  text-shadow: 0 0 18px rgba(var(--m-text-rgb), 0.45);
  font-weight: normal;
}

/* ───── Grid ─────
   Both grids share one definition and one measure. The cards are a fixed
   width laid out centre-out, so a row of three and a row of two line up on
   the same centre line rather than each finding its own. */
.games-grid,
.games-grid-sub {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(0, 240px));
  justify-content: center;
  gap: 2.5rem 2rem;
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
}

.section-headline {
  font-family: 'Workbench', monospace;
  font-size: var(--t-sect);
  color: var(--m-text);
  text-align: center;
  letter-spacing: 0.12em;
  margin: 4rem auto 1.75rem;
  width: 100%;
  max-width: 800px;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--m-line);
}

.section-headline--first {
  margin-top: 2.5rem;
}

.game-card {
  background-color: transparent;
  border: none;
  padding: 0;
  text-align: center;
  width: 100%;
  transition: transform 0.3s ease-in-out;
  cursor: pointer;
}

.game-card:is(:hover, .is-hover) {
  transform: scale(1.04);
}

.game-image {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
  background-color: rgba(var(--m-text-rgb), 0.06);
  border: 2px solid var(--m-text);
  margin-bottom: 1rem;
  overflow: hidden;
  transition: box-shadow 0.3s ease-in-out;
}

.game-art {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  filter: saturate(0.6) brightness(0.85);
  transition: filter 0.3s ease-in-out;
}

.game-card:is(:hover, .is-hover) .game-art {
  filter: saturate(1) brightness(1);
}

.game-card:is(:hover, .is-hover) .game-image {
  box-shadow: 0 0 15px rgba(var(--m-text-rgb), 0.5);
}

.game-art-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--m-faint);
  font-size: var(--t-small);
  font-family: 'Workbench', monospace;
}

/* Card type sits on the shared scale, in Workbench. The titles used to run
   at 2rem against a 1.25rem description — larger than anything on any other
   page, and the reason this page read as a different site on a phone. */
.game-title {
  font-family: 'Workbench', monospace;
  font-size: var(--t-lead);
  color: var(--m-text);
  margin: 0 0 0.35rem;
  letter-spacing: 0.05em;
  line-height: 1.25;
  text-transform: uppercase;
}

.game-subtitle {
  font-family: 'Workbench', monospace;
  font-size: var(--t-label);
  color: var(--m-dim);
  margin: 0 0 0.5rem;
  letter-spacing: 0.05em;
  font-weight: normal;
}

.game-description {
  font-family: 'Workbench', monospace;
  font-size: var(--t-small);
  color: var(--m-dim);
  line-height: 1.5;
  margin: 0;
}

/* Two up on a tablet, two up on a phone. A single column turned three cards
   into three screenfuls of scrolling. */
@media (max-width: 720px) {
  .games-grid,
  .games-grid-sub {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.75rem 0.9rem;
  }

  .section-headline {
    margin: 2.5rem auto 1.25rem;
  }
}

/* Links in the page body take the Myth/OS palette rather than the site's
   phosphor green. (This used to be `.mythos-page * { color: inherit }`, which
   also flattened the award badges to plain white.) */
.mythos-page .container a {
  color: var(--m-text);
  text-shadow: none;
}

.mythos-page .container a:is(:hover, .is-hover) {
  color: var(--bg);
  background-color: var(--m-text);
  text-shadow: none;
}

/* ───── Award badges ───── */
/* Awards read as metal, not as more interface: the phosphor green belongs to
   the site's chrome, while a trophy should look struck rather than rendered. */
.award-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  width: clamp(44px, 26%, 64px);
  aspect-ratio: 1;
  height: auto;
  color: var(--metal);
  pointer-events: none;
  filter: drop-shadow(0 0 7px rgba(var(--metal-rgb), 0.65))
          drop-shadow(0 1px 1px rgba(var(--bg-rgb), 0.8));
  /* A disc behind the wreath so it stays legible over busy key art. */
  background: radial-gradient(circle, rgba(var(--bg-rgb), 0.82) 55%, rgba(var(--bg-rgb), 0) 72%);
  transition: transform 0.25s ease;
}

.award-badge svg {
  width: 100%;
  height: 100%;
  display: block;
}

.game-card:is(:hover, .is-hover) .award-badge {
  transform: scale(1.08);
}

.award-rank {
  font-family: inherit;
  font-size: 19px;
  font-weight: bold;
  fill: url(#award-metal);
  letter-spacing: 0.02em;
}

.award-event {
  font-family: inherit;
  font-size: 9px;
  fill: rgba(var(--metal-rgb), 0.82);
  letter-spacing: 0.08em;
}

.game-award {
  font-size: var(--t-label);
  letter-spacing: 0.1em;
  color: var(--metal);
  text-shadow: 0 0 8px rgba(var(--metal-rgb), 0.4);
  margin: 0.2rem 0 0.35rem;
}

.game-award--sponsor {
  color: rgba(var(--metal-rgb), 0.82);
}

/* The struck-metal gradient is built from whites, which vanish on paper.
   In light mode the rank falls back to the solid dark metal token. */
:root[data-theme="light"] .award-rank {
  fill: var(--metal);
}

:root[data-theme="light"] .award-badge {
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.25));
  background: radial-gradient(circle, rgba(var(--bg-rgb), 0.9) 55%, rgba(var(--bg-rgb), 0) 72%);
}
