/* Theme taken from www.ai2b.co.uk: Archivo type, deep navy and indigo, pink and blue accents, cyan details. */

@font-face {
  font-family: "Archivo";
  src: url("/fonts/archivo.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

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

:root {
  --navy: #0f042b;
  --indigo: #160554;
  --pink: #ff1a97;
  --blue: #1840ff;
  --cyan: #00ffff;
  --white: #ffffff;
  --mist: #e0e0e0;
  --ink: #0f042b;
  --ink-soft: #4a4660;
  --rule: #e4e2ec;
  --radius: 8px;
  --gutter: clamp(18px, 4vw, 40px);
  --slant: clamp(28px, 6vw, 88px);
  --font: "Archivo", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-black: "Archivo Black", "Archivo", system-ui, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--white);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.55;
}

main {
  flex: 1;
}

.wrap {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

a {
  color: inherit;
}

:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
  border-radius: 4px;
}

.top :focus-visible,
.shelf :focus-visible,
.foot :focus-visible {
  outline-color: var(--cyan);
}

.skip {
  position: absolute;
  left: 12px;
  top: -64px;
  z-index: 10;
  background: var(--white);
  color: var(--navy);
  padding: 10px 14px;
  border-radius: var(--radius);
  font-weight: 700;
  text-decoration: none;
}

.skip:focus {
  top: 12px;
}

.slashes {
  color: var(--blue);
}

/* Header */

.top {
  background: var(--navy);
  color: var(--mist);
}

.top-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 76px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
}

.brand img {
  display: block;
  height: auto;
}

.brand-tag {
  padding-left: 14px;
  border-left: 1px solid rgba(255, 255, 255, 0.28);
  color: var(--white);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.nav {
  display: flex;
  align-items: center;
  gap: clamp(6px, 2vw, 22px);
}

.nav a {
  padding: 12px 8px;
  color: var(--mist);
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-decoration: none;
}

.nav a:hover {
  color: var(--white);
  text-decoration: underline;
  text-decoration-color: var(--pink);
  text-decoration-thickness: 2px;
  text-underline-offset: 8px;
}

/* Hero */

.hero {
  background: var(--white);
  padding: clamp(64px, 10vw, 136px) 0 calc(clamp(64px, 9vw, 120px) + var(--slant));
}

.eyebrow {
  margin: 0 0 22px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  max-width: 14em;
  color: var(--ink);
  font-size: clamp(38px, 7vw, 76px);
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  text-wrap: balance;
}

.lede {
  margin: 30px 0 0;
  max-width: 36em;
  color: var(--ink-soft);
  font-size: clamp(17px, 1.9vw, 20px);
  letter-spacing: 0.01em;
}

.hero-actions {
  margin: 44px 0 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px 32px;
}

.shelf-count {
  color: var(--ink-soft);
  font-size: 15px;
  font-weight: 500;
}

/* The AI2B call-to-action: pink, with the blue block set behind it. */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 14px 30px;
  border-radius: var(--radius);
  background: var(--pink);
  box-shadow: 5px -5px 0 var(--blue);
  color: var(--white);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.4;
  text-decoration: none;
  text-transform: uppercase;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn:hover {
  transform: translate(2px, -2px);
  box-shadow: 3px -3px 0 var(--blue);
}

/* Games section: the navy band, cut on the diagonal as on the main site. */

.shelf {
  margin-top: calc(var(--slant) * -1);
  padding: calc(var(--slant) + clamp(56px, 8vw, 112px)) 0 clamp(80px, 11vw, 160px);
  background: linear-gradient(180deg, var(--navy) 0%, var(--indigo) 55%, var(--navy) 100%);
  clip-path: polygon(0 var(--slant), 100% 0, 100% 100%, 0 100%);
  color: var(--mist);
}

.section-title {
  margin: 0 0 clamp(28px, 4vw, 48px);
  color: rgba(255, 255, 255, 0.5);
  font-family: var(--font-black);
  font-size: clamp(36px, 6.4vw, 76px);
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 clamp(36px, 5vw, 64px);
}

.filters[hidden] {
  display: none;
}

.chip {
  appearance: none;
  min-height: 40px;
  padding: 8px 16px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: var(--radius);
  background: transparent;
  color: var(--mist);
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
}

.chip:hover {
  border-color: var(--white);
  color: var(--white);
}

.chip[aria-pressed="true"] {
  border-color: var(--white);
  background: var(--white);
  color: var(--navy);
}

.grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(28px, 4vw, 56px);
}

/* One game per row: screenshot on the left, details on the right. */
.card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(20px, 3vw, 28px);
  padding: clamp(16px, 2.4vw, 32px);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--ink);
  box-shadow: 0 16px 40px -24px rgba(0, 0, 0, 0.8);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card[hidden] {
  display: none;
}

.card:not(.is-locked):hover,
.card:not(.is-locked):focus-within {
  transform: translateY(-3px);
  box-shadow: 0 26px 52px -24px rgba(24, 64, 255, 0.8);
}

.shot {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 5px;
  background: var(--navy);
}

.shot img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card.is-locked .shot img {
  filter: grayscale(0.6);
}

.body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  padding: 4px clamp(0px, 1vw, 8px) 8px;
}

.meta {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 16px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
}

/* Hexagon marker, as used for the bullet points on the main site. */
.status::before {
  content: "";
  width: 12px;
  height: 13px;
  background: var(--blue);
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
}

.status.is-early::before {
  background: var(--pink);
}

.status.is-soon::before {
  background: #a4a4a4;
}

.kind {
  color: var(--ink-soft);
  font-weight: 500;
}

h3 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(26px, 3.2vw, 38px);
  font-weight: 700;
  line-height: 1.1;
  text-transform: uppercase;
}

.card-link {
  text-decoration: none;
}

/* The title link covers the whole row, so the row is one target. */
.card-link::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
}

.card-link:focus-visible {
  outline: none;
}

.card-link:focus-visible::after {
  outline: 3px solid var(--cyan);
  outline-offset: 3px;
}

.description {
  margin: 0;
  max-width: 34em;
  color: var(--ink-soft);
  font-size: 17px;
  line-height: 1.6;
}

.tags {
  list-style: none;
  margin: 4px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tags li {
  padding: 4px 11px;
  border: 1px solid var(--rule);
  border-radius: 4px;
  background: #f7f6fb;
  color: var(--ink);
  font-size: 13px;
  font-weight: 500;
}

.play {
  margin-top: 14px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 13px 24px;
  border-radius: var(--radius);
  background: var(--blue);
  color: var(--white);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.4;
  text-transform: uppercase;
  transition: background-color 0.15s ease;
}

.card:hover .play:not(.is-disabled),
.card:focus-within .play:not(.is-disabled) {
  background: var(--navy);
}

.play.is-disabled {
  border: 1px dashed #a4a4a4;
  background: transparent;
  color: var(--ink-soft);
}

.empty {
  padding: 24px 0;
  color: var(--mist);
}

@media (min-width: 860px) {
  .card {
    grid-template-columns: minmax(0, 11fr) minmax(0, 9fr);
    align-items: center;
    gap: clamp(32px, 4.5vw, 64px);
  }

  .body {
    padding: 16px clamp(8px, 2vw, 32px) 16px 0;
  }
}

/* Footer: full width, with the logo, note and copyright spread left, centre and right. */

.foot {
  background: var(--navy);
  color: var(--mist);
  font-size: 15px;
}

.foot-inner {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: center;
  gap: 16px 24px;
  padding: clamp(32px, 4vw, 48px) clamp(18px, 4vw, 56px);
}

.foot p {
  margin: 0;
}

.foot-left {
  justify-self: start;
}

.foot-centre {
  justify-self: center;
  text-align: center;
}

.foot-right {
  justify-self: end;
  text-align: right;
}

.foot a:not(.brand) {
  color: var(--white);
  text-decoration-color: var(--pink);
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

@media (max-width: 720px) {
  .foot-inner {
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
    gap: 18px;
  }

  .foot-left,
  .foot-centre,
  .foot-right {
    justify-self: center;
    text-align: center;
  }
}

/* 404 */

.lost {
  flex: 1;
  display: grid;
  place-content: center;
  justify-items: start;
  gap: 8px;
  padding: 64px var(--gutter);
}

.lost .btn {
  margin-top: 22px;
}

@media (max-width: 520px) {
  .brand-tag {
    display: none;
  }

  .nav a {
    font-size: 15px;
    letter-spacing: 0.06em;
  }

}

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

  .card,
  .btn,
  .play {
    transition: none;
  }

  .card:not(.is-locked):hover,
  .card:not(.is-locked):focus-within,
  .btn:hover {
    transform: none;
  }
}
