:root {
  --void: #04091a;
  --void-deep: #02050f;
  --panel: #08101f;
  --panel-lift: #0c1729;
  --green: #00e58c;
  --teal: #00b5b9;
  --blue: #0f7cfa;
  --blue-soft: #6fb4ff;
  --green-dim: #0a8f68;
  --current: linear-gradient(100deg, var(--green), var(--teal) 48%, var(--blue));
  --line: rgba(0, 181, 185, .16);
  --line-strong: rgba(0, 181, 185, .36);
  --ink: #e4edf9;
  --muted: #8296b3;
  --display: "Chakra Petch", "Eurostile", Impact, sans-serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  /* The chamfer, cut off two opposite corners the way the monogram's own
     planes are. Sized per element by overriding --cut. */
  --cut: 14px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--void);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* Two fixed layers under everything: the green-to-blue current bleeding in from
   the top corners the way it lights the logo, and a faint circuit grid so flat
   areas still have a weave in them. */
body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}
body::before {
  background:
    radial-gradient(760px 540px at 12% -6%, rgba(0, 229, 140, .16), transparent 70%),
    radial-gradient(820px 560px at 88% -4%, rgba(15, 124, 250, .18), transparent 70%),
    radial-gradient(900px 600px at 50% 18%, rgba(0, 181, 185, .07), transparent 72%);
}
body::after {
  background-image:
    linear-gradient(rgba(0, 181, 185, .05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 181, 185, .05) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(circle at 50% 0%, #000 0%, transparent 68%);
}

a { color: inherit; text-decoration: none; }

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

::selection { background: rgba(15, 124, 250, .38); }

/* height:auto so the width/height attributes stay as an aspect-ratio hint and
   stop acting as a fixed height once CSS resizes an image. */
img { max-width: 100%; height: auto; }

.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 clamp(20px, 5vw, 48px); }

section { padding: clamp(48px, 7vw, 88px) 0; }

/* Small mono caps behind a circuit node — the little soldered dot that sits on
   the traces running through the monogram. */
.eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 20px;
  color: var(--green);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .28em;
  text-transform: uppercase;
}
.eyebrow::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 12px var(--green);
}

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: .01em;
  line-height: 1.12;
  color: #f4f8ff;
}

/* Headings that carry the current instead of flat white. */
.charged {
  background: var(--current);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.section-head { max-width: 660px; margin: 0 0 clamp(32px, 5vw, 56px); }
.section-head h2 { margin: 0; font-size: clamp(28px, 4.2vw, 46px); }
.section-head p { color: var(--muted); margin: 18px 0 0; }

/* The divider from the logo: a hairline that fades in green, out blue, with the
   node set into the middle of it. */
.rule {
  display: block;
  position: relative;
  height: 1px;
  margin: 0 auto 40px;
  max-width: 460px;
  background: linear-gradient(90deg, transparent, var(--green) 22%, var(--blue) 78%, transparent);
  opacity: .6;
}
.rule::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 8px;
  height: 8px;
  translate: -50% -50%;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 14px rgba(0, 229, 140, .9);
}

/* ---- buttons ---- */

.btn {
  display: inline-block;
  padding: 13px 26px;
  border: 0;
  background: var(--current);
  color: #01121f;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
  /* Chamfered on the two corners the monogram cuts, and drawn with a filter
     shadow rather than box-shadow so the glow follows the cut edge. */
  --cut: 10px;
  clip-path: polygon(var(--cut) 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%, 0 var(--cut));
  transition: filter .25s, translate .25s;
}
.btn:hover {
  translate: 0 -2px;
  filter: drop-shadow(0 10px 20px rgba(15, 124, 250, .45));
}

/* The ghost button has no border property to chamfer, so its outline is a
   gradient background showing through a 1px inset of the panel colour. */
.btn-ghost {
  position: relative;
  background: linear-gradient(100deg, rgba(0, 229, 140, .55), rgba(15, 124, 250, .55));
  color: var(--ink);
  isolation: isolate;
}
.btn-ghost::before {
  content: "";
  position: absolute;
  inset: 1px;
  z-index: -1;
  background: var(--void);
  clip-path: inherit;
}
.btn-ghost:hover {
  color: #fff;
  filter: drop-shadow(0 10px 20px rgba(0, 229, 140, .35));
}

/* ---- top bar ---- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(4, 9, 26, .74);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.topbar .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 68px;
}

/* The monogram itself, with GAMES set as type beside it the way the logo sets
   it underneath. */
.lockup { display: flex; align-items: center; gap: 12px; }
.lockup img { width: 50px; height: 26px; object-fit: contain; }
.lockup span {
  font-family: var(--display);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .42em;
  text-indent: .42em;
  text-transform: uppercase;
  color: var(--ink);
}

.catalogue-count {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--muted);
}

/* The panel edge is a gradient showing through an inset — a border would be
   sliced off by the chamfer. */
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  padding: 1px;
  background: linear-gradient(150deg, rgba(0, 229, 140, .34), rgba(15, 124, 250, .3));
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  clip-path: inherit;
  transition: background .25s;
}
.card:hover::before { background: linear-gradient(150deg, var(--green), var(--blue)); }

/* ---- catalogue masthead ---- */

.catalogue-head { padding: clamp(30px, 5vw, 64px) 0 clamp(28px, 4vw, 48px); }

.masthead {
  position: relative;
  display: grid;
  min-height: clamp(320px, 49vw, 520px);
  place-items: center;
  overflow: hidden;
  border-block: 1px solid var(--line-strong);
  background:
    linear-gradient(90deg, transparent 49.9%, rgba(0, 181, 185, .12) 50%, transparent 50.1%),
    linear-gradient(transparent 49.9%, rgba(0, 181, 185, .12) 50%, transparent 50.1%),
    radial-gradient(circle at 50% 46%, rgba(0, 181, 185, .16), transparent 42%);
}
.masthead::before,
.masthead::after {
  content: "";
  position: absolute;
  width: min(48vw, 520px);
  aspect-ratio: 1;
  border: 1px solid rgba(0, 181, 185, .12);
  rotate: 45deg;
}
.masthead::before { left: max(-32vw, -350px); }
.masthead::after { right: max(-32vw, -350px); }

.masthead h1 {
  position: relative;
  z-index: 1;
  margin: 0;
  line-height: 0;
}
.masthead h1::before {
  content: "";
  position: absolute;
  inset: 12% 2%;
  z-index: -1;
  background: radial-gradient(closest-side, rgba(0, 229, 140, .18), rgba(15, 124, 250, .1) 48%, transparent 74%);
  filter: blur(26px);
}
.masthead h1 img {
  width: min(400px, 67vw);
  filter: drop-shadow(0 20px 40px rgba(0, 0, 0, .42));
}

.masthead-code,
.masthead-readout {
  position: absolute;
  z-index: 2;
  font-family: var(--mono);
  text-transform: uppercase;
}
.masthead-code {
  top: 18px;
  left: 20px;
  font-size: 10px;
  letter-spacing: .24em;
  color: var(--green);
}
.masthead-readout {
  right: 20px;
  bottom: 18px;
  display: flex;
  align-items: baseline;
  gap: 9px;
  color: var(--muted);
}
.masthead-readout strong {
  font-family: var(--display);
  font-size: 30px;
  line-height: 1;
  color: var(--blue-soft);
}
.masthead-readout span { font-size: 10px; letter-spacing: .22em; }

/* ---- game catalogue ---- */

.catalogue-head + .wrap { position: relative; }
.catalogue-head + .wrap::before {
  content: "";
  position: absolute;
  top: 0;
  left: clamp(20px, 5vw, 48px);
  width: 7px;
  height: 7px;
  translate: 0 -3px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 12px var(--green);
}

/* Filter bar — one button per genre found in the catalogue, plus All. */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding-bottom: 28px;
}

.filter {
  --cut: 8px;
  padding: 9px 16px;
  border: 1px solid var(--line-strong);
  background: var(--panel);
  clip-path: polygon(var(--cut) 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%, 0 var(--cut));
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted);
  cursor: pointer;
  transition: color .2s, border-color .2s, background .2s;
}
.filter:hover { color: var(--ink); border-color: var(--blue); }
.filter .count { margin-left: 6px; color: var(--green-dim); }
.filter.is-active {
  background: var(--current);
  border-color: transparent;
  color: #01121f;
}
.filter.is-active .count { color: rgba(1, 18, 31, .65); }

.no-match {
  padding-bottom: clamp(64px, 9vw, 120px);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 13px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 22px;
  padding-bottom: clamp(64px, 9vw, 120px);
}

/* The display: flex below would otherwise beat the hidden attribute that the
   genre filter sets. */
.card[hidden] { display: none; }

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: linear-gradient(180deg, var(--panel-lift), var(--panel));
  clip-path: polygon(var(--cut) 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%, 0 var(--cut));
  transition: filter .25s, translate .25s;
}

.card .index {
  position: absolute;
  z-index: 2;
  top: 10px;
  right: 10px;
  padding: 3px 8px;
  background: rgba(2, 5, 15, .82);
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .1em;
  color: var(--green);
}

.shot {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 8 / 5;
  object-fit: cover;
  filter: saturate(.85) brightness(.7);
  transition: filter .35s, scale .5s;
}
.shot-empty { background: radial-gradient(120% 100% at 50% 0%, rgba(15, 124, 250, .16), transparent 70%), var(--panel); }

.card-body { display: flex; flex-direction: column; flex: 1; padding: 20px 22px 22px; }
.card h2 { margin: 0; font-size: 21px; }
.card .tagline {
  margin: 10px 0 0;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--teal);
}
/* Blurbs run long and vary in length; showing them whole is the point of this
   page, and the grid keeps rows aligned regardless. */
.card .blurb {
  margin: 12px 0 16px;
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.55;
}
.card .genre {
  align-self: flex-start;
  margin: 0 0 16px;
  padding: 4px 10px;
  border: 1px solid var(--line-strong);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--blue-soft);
}
.card .play {
  margin-top: auto;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--green);
}
.card .play span { display: inline-block; margin-left: 4px; transition: translate .25s; }
.card:hover {
  translate: 0 -3px;
  filter: drop-shadow(0 20px 40px rgba(0, 181, 185, .3));
}
.card:hover .shot { filter: saturate(1) brightness(.95); scale: 1.04; }
.card:hover .play { color: var(--blue-soft); }
.card:hover .play span { translate: 5px 0; }

/* ---- footer ---- */

footer { border-top: 1px solid var(--line); padding: 40px 0 56px; }
footer .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 24px;
}
footer .mark { width: 42px; height: 22px; object-fit: contain; opacity: .75; }
footer p {
  margin: 0;
  margin-right: auto;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .12em;
}
@media (max-width: 620px) {
  .topbar .wrap { height: 60px; }
  .masthead { min-height: 310px; }
  .masthead-code { top: 14px; left: 14px; }
  .masthead-readout { right: 14px; bottom: 14px; }
}

/* Nothing here needs to move for the page to work, so when motion is turned
   down everything simply sits still. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
