/*
 * Moeex Games. A navy and gold arcade look shared with Tray Rush: a navy
 * hero band on every theme, then content pages that follow the visitor's
 * light or dark setting. One accent (gold) for actions.
 */
:root {
  --bg: #f3f5fb;
  --surface: #ffffff;
  --ink: #10183a;
  --ink-soft: #4a5578;
  --line: #d9dfee;
  --band: #0b1027;
  --band-ink: #eef1ff;
  --band-soft: #b9c2e6;
  --gold: #ffc021;
  --gold-deep: #e0a106;
  --gold-ink: #10183a;
  --gold-text: #845900;
  --chip: #e7ebf7;
  --display: 'Bricolage Grotesque', 'Arial Black', system-ui, sans-serif;
  --body: 'Outfit', 'Segoe UI', system-ui, sans-serif;
  --radius: 18px;
  --shadow: 0 14px 34px rgba(16, 24, 58, 0.12);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1027;
    --surface: #151c3d;
    --ink: #eef1ff;
    --ink-soft: #aab3d8;
    --line: #273059;
    --chip: #202a52;
    --gold-text: #ffcb45;
    --shadow: 0 14px 34px rgba(0, 0, 0, 0.35);
    color-scheme: dark;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.6 var(--body);
}
img {
  max-width: 100%;
  height: auto;
  display: block;
}
a {
  color: inherit;
}
h1,
h2,
h3 {
  font-family: var(--display);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.025em;
  margin: 0;
  text-wrap: balance;
}
h2 {
  font-size: clamp(30px, 4vw, 44px);
}
h3 {
  font-size: 24px;
}
p {
  margin: 0;
}
:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
  border-radius: 6px;
}

.wrap {
  width: min(1160px, 100%);
  margin: 0 auto;
  padding-inline: 20px;
}
.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 20;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--gold);
  color: var(--gold-ink);
  font-weight: 700;
}
.skip-link:focus {
  top: 12px;
}

/* ---------- header ---------- */
.site-header {
  background: var(--band);
  color: var(--band-ink);
}
.site-header__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 24px;
  padding-block: 18px;
}
.wordmark {
  font-family: var(--display);
  font-weight: 800;
  font-size: 26px;
  letter-spacing: -0.03em;
  text-decoration: none;
  white-space: nowrap;
}
.wordmark span {
  color: var(--gold);
}
.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.nav a {
  display: inline-block;
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--band-soft);
  font-weight: 600;
  text-decoration: none;
  transition:
    color 0.15s ease,
    background-color 0.15s ease;
}
.nav a:hover {
  color: var(--band-ink);
  background: rgba(255, 255, 255, 0.08);
}
.nav a[aria-current='page'] {
  color: var(--gold-ink);
  background: var(--gold);
}

/* ---------- buttons and small parts ---------- */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 24px;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  transition:
    transform 0.15s ease,
    background-color 0.15s ease;
}
.button--gold {
  background: var(--gold);
  color: var(--gold-ink);
  box-shadow: 0 4px 0 var(--gold-deep);
}
.button--ghost {
  border: 2px solid rgba(255, 255, 255, 0.28);
  color: var(--band-ink);
}
.button--ghost:hover {
  border-color: var(--band-ink);
}
.button:active {
  transform: translateY(2px);
}
.eyebrow {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.text-link {
  font-weight: 600;
  text-underline-offset: 3px;
}
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.tags li {
  padding: 3px 11px;
  border-radius: 999px;
  background: var(--chip);
  font-size: 14px;
  font-weight: 600;
}
.tags .tags__plain {
  background: none;
  color: var(--ink-soft);
  padding-inline: 4px;
}

/* ---------- hero ---------- */
.hero {
  background: var(--band);
  color: var(--band-ink);
  overflow: hidden;
}
.hero__inner {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  align-items: center;
  gap: 40px;
  padding-block: 56px 72px;
}
.hero .eyebrow {
  color: var(--gold);
}
.hero h1 {
  margin-top: 14px;
  font-size: clamp(44px, 6.4vw, 82px);
  line-height: 0.98;
  letter-spacing: -0.035em;
}
.hero h1 em {
  font-style: normal;
  color: var(--gold);
}
.hero__lede {
  margin-top: 20px;
  max-width: 34ch;
  color: var(--band-soft);
  font-size: 19px;
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}
.collage {
  position: relative;
  aspect-ratio: 1 / 0.98;
  max-width: 100%;
}
.collage img {
  position: absolute;
  width: 54%;
  border-radius: 22px;
  border: 5px solid #1c2752;
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.45);
}
.collage img:first-child {
  left: 0;
  top: 4%;
  transform: rotate(-5deg);
}
.collage img:nth-child(2) {
  right: 0;
  bottom: 0;
  transform: rotate(4deg);
}
.collage__sticker {
  position: absolute;
  right: 4%;
  top: 0;
  padding: 10px 16px;
  border-radius: 14px;
  background: var(--gold);
  color: var(--gold-ink);
  font-weight: 700;
  transform: rotate(5deg);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
}

/* ---------- sections ---------- */
.section {
  padding-block: 64px;
}
.section + .section {
  padding-top: 8px;
}
.section__head {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 8px 20px;
  margin-bottom: 26px;
}
.section__head p {
  color: var(--ink-soft);
  max-width: 52ch;
}
.page-head {
  background: var(--band);
  color: var(--band-ink);
}
.page-head .wrap {
  padding-block: 48px 56px;
}
.page-head h1 {
  font-size: clamp(40px, 5.5vw, 64px);
}
.page-head p {
  margin-top: 14px;
  max-width: 56ch;
  color: var(--band-soft);
  font-size: 19px;
}
.page-head .crumbs {
  margin: 0 0 12px;
  font-size: 15px;
  font-weight: 600;
}
.crumbs a {
  color: var(--band-ink);
  text-underline-offset: 3px;
}

/* ---------- game cards ---------- */
.game-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 22px;
}
.game-grid--compact {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr));
}
.game-card {
  position: relative;
  display: grid;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.2s ease;
}
.game-card:hover {
  transform: translateY(-3px);
}
.game-card__art {
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #bfe4f8;
}
.game-card__art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.game-card__body {
  display: grid;
  gap: 12px;
  justify-items: start;
  padding: 22px 24px 26px;
}
.game-card__title {
  font-family: var(--display);
  font-weight: 800;
  font-size: 30px;
  line-height: 1;
  letter-spacing: -0.025em;
}
.game-card__blurb {
  color: var(--ink-soft);
}
.game-card__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 22px;
  margin-top: 6px;
}
/* the Play link covers the whole card; the guide link sits above it */
.game-card__play::after {
  content: '';
  position: absolute;
  inset: 0;
}
/* a transform would make the button the overlay's box mid-press, and the click would land outside it */
.game-card__play:active {
  transform: none;
  box-shadow: 0 2px 0 var(--gold-deep);
}
.game-card__guide {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}
.game-card--lead {
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
}
.game-card--lead .game-card__body {
  align-content: center;
  padding: 28px 36px;
}
.shots {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.shots figure {
  margin: 0;
}
.shots img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.shots figcaption {
  margin-top: 10px;
  color: var(--ink-soft);
  font-weight: 600;
}
.soon-card {
  display: grid;
  align-content: center;
  gap: 10px;
  min-width: 0;
  padding: 28px;
  border: 2px dashed var(--line);
  border-radius: var(--radius);
}
.soon-card p {
  color: var(--ink-soft);
}

/* ---------- categories ---------- */
.category-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.category-links a {
  display: grid;
  gap: 6px;
  height: 100%;
  padding: 20px 22px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface);
  text-decoration: none;
  transition: border-color 0.15s ease;
}
.category-links a:hover {
  border-color: var(--gold-deep);
}
.category-links__name {
  font-family: var(--display);
  font-weight: 800;
  font-size: 23px;
  letter-spacing: -0.02em;
}
.category-links__count {
  font-weight: 700;
  font-size: 14px;
  color: var(--gold-text);
}
.category-links__about {
  color: var(--ink-soft);
  font-size: 15px;
}
.category {
  padding-block: 40px;
  border-top: 1px solid var(--line);
  scroll-margin-top: 20px;
}
.category:first-child {
  border-top: 0;
}
.category__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 16px;
}
.category__count {
  font-weight: 700;
  color: var(--gold-text);
}
.category__about {
  margin: 8px 0 22px;
  color: var(--ink-soft);
}

/* ---------- about strip and prose pages ---------- */
.split {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: 32px;
  align-items: start;
}
.split h2 + p {
  margin-top: 16px;
}
.split p + p {
  margin-top: 14px;
}
.maker {
  display: grid;
  gap: 12px;
  justify-items: start;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--band);
  color: var(--band-ink);
}
.maker p {
  color: var(--band-soft);
}
.maker__who {
  display: flex;
  align-items: center;
  gap: 14px;
}
.maker__who .eyebrow {
  margin-bottom: 2px;
}
.maker__photo {
  flex: none;
  width: 64px;
  height: 64px;
  border: 3px solid var(--gold);
  border-radius: 50%;
  object-fit: cover;
}
.prose .maker {
  max-width: 440px;
  margin-top: 22px;
}
.prose .maker p {
  margin: 0;
}
.prose {
  max-width: 68ch;
  padding-block: 48px 72px;
}
.prose h2 {
  margin: 38px 0 12px;
  font-size: 28px;
}
.prose p,
.prose ul {
  margin: 0 0 14px;
}
.prose ul {
  padding-left: 22px;
}
.prose li + li {
  margin-top: 6px;
}
.prose .updated {
  color: var(--ink-soft);
  font-size: 15px;
}
.prose code {
  font-size: 15px;
  padding: 1px 6px;
  border-radius: 6px;
  background: var(--chip);
}
.prose h3 {
  margin: 24px 0 8px;
  font-size: 22px;
}
.prose ol {
  margin: 0 0 14px;
  padding-left: 24px;
}
.prose kbd {
  display: inline-block;
  min-width: 26px;
  padding: 1px 7px;
  border: 1px solid var(--line);
  border-bottom-width: 3px;
  border-radius: 7px;
  background: var(--surface);
  font: 600 14px/1.5 var(--body);
  text-align: center;
}
.guide-art {
  max-width: 360px;
  margin: 0 0 8px;
}
.guide-art img {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
/* wide tables scroll inside their box instead of widening the page on phones */
.table-scroll {
  clear: both;
  margin: 0 0 14px;
  overflow-x: auto;
}
.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 16px;
}
.prose th,
.prose td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}
.prose thead th {
  color: var(--ink-soft);
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}
.prose tbody th {
  font-weight: 700;
}

/* ---------- footer ---------- */
.site-footer {
  margin-top: 40px;
  background: var(--band);
  color: var(--band-soft);
}
.site-footer__inner {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 28px 40px;
  padding-block: 44px 36px;
}
.site-footer .wordmark {
  color: var(--band-ink);
}
.site-footer__brand {
  display: grid;
  align-content: start;
  gap: 8px;
  justify-items: start;
}
.site-footer__brand .text-link {
  color: var(--band-ink);
}
.site-footer__links {
  display: flex;
  flex-wrap: wrap;
  align-items: start;
  gap: 0 48px;
}
.site-footer__links ul {
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
}
/* full-height rows so each link is a comfortable tap target on phones */
.site-footer__links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  text-decoration: none;
}
.site-footer__links a:hover {
  color: var(--band-ink);
  text-decoration: underline;
}
.site-footer__legal {
  grid-column: 1 / -1;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 14px;
}

/* ---------- narrow screens ---------- */
@media (max-width: 860px) {
  .hero__inner,
  .split,
  .site-footer__inner {
    grid-template-columns: 1fr;
  }
  .hero__inner {
    padding-block: 36px 48px;
  }
  .collage {
    width: min(100%, 460px);
  }
  .game-card--lead,
  .shots {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 520px) {
  .wrap {
    padding-inline: 16px;
  }
  .nav {
    flex-wrap: nowrap;
    justify-content: space-between;
    width: 100%;
  }
  .nav a {
    padding: 11px 8px;
    font-size: 15px;
  }
  .section {
    padding-block: 44px;
  }
}
@media (max-width: 380px) {
  .nav a {
    padding-inline: 6px;
  }
}
@media (min-width: 861px) {
  .guide-art {
    float: right;
    width: 300px;
    margin: 38px 0 16px 32px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
  }
}
