@font-face {
  font-display: swap;
  font-family: "Inknut Antiqua";
  font-style: normal;
  font-weight: 700;
  src: url("fonts/inknut-antiqua-latin-700-normal.woff2") format("woff2");
}

@font-face {
  font-display: swap;
  font-family: "Junicode";
  font-style: normal;
  font-weight: 400;
  src: url("fonts/forest-junicode-latin-400.woff2") format("woff2");
}

@font-face {
  font-display: swap;
  font-family: "Inter";
  font-style: normal;
  font-weight: 400;
  src: url("fonts/inter-latin-400-normal.woff2") format("woff2");
}

@font-face {
  font-display: swap;
  font-family: "Inter";
  font-style: normal;
  font-weight: 600;
  src: url("fonts/inter-latin-600-normal.woff2") format("woff2");
}

@font-face {
  font-display: swap;
  font-family: "Inter";
  font-style: normal;
  font-weight: 700;
  src: url("fonts/inter-latin-700-normal.woff2") format("woff2");
}

:root {
  --cream: #f5ebda;
  --gold: #d7ad64;
  --ink: #0d0c10;
  --line: rgba(236, 218, 186, 0.16);
  --paper: #beb3a3;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  overflow: hidden;
}

body {
  background:
    radial-gradient(circle at 50% -15%, rgba(124, 79, 40, 0.24), transparent 42rem),
    var(--ink);
  color: var(--cream);
  display: grid;
  font-family: "Inter", ui-sans-serif, system-ui, sans-serif;
  grid-template-rows: auto minmax(0, 1fr) auto;
  margin: 0;
  min-width: 280px;
}

.page-glow {
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.022) 1px, transparent 1px);
  background-size: 64px 64px;
  inset: 0;
  mask-image: linear-gradient(to bottom, black, transparent 82%);
  pointer-events: none;
  position: fixed;
}

.topbar,
main,
footer {
  margin: 0 auto;
  max-width: 1680px;
  position: relative;
  width: 100%;
}

.topbar {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  min-height: clamp(52px, 7.5vh, 70px);
  padding: 7px clamp(14px, 3vw, 48px);
}

.brand {
  align-items: center;
  color: var(--cream);
  display: flex;
  gap: 10px;
  text-decoration: none;
}

.brand img {
  filter: drop-shadow(0 0 14px rgba(210, 168, 94, 0.2));
  height: clamp(36px, 5vh, 46px);
  object-fit: contain;
  width: auto;
}

.brand-name {
  display: grid;
}

.brand strong {
  font-family: "Morris Roman Black", "Inknut Antiqua", Georgia, serif;
  font-size: clamp(17px, 1.7vw, 22px);
  font-weight: 400;
  line-height: 1;
}

.brand small,
.company-door {
  color: var(--gold);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.company-door {
  color: var(--paper);
  letter-spacing: 0.14em;
}

.topbar-actions {
  align-items: center;
  display: flex;
  gap: clamp(9px, 1.4vw, 18px);
}

.release-versions {
  align-items: stretch;
  display: flex;
  gap: 7px;
}

.release-version {
  border-left: 1px solid rgba(215, 173, 100, 0.32);
  display: grid;
  gap: 1px;
  min-width: 72px;
  padding-left: 7px;
}

.release-version small {
  color: var(--paper);
  font-size: 6px;
  font-weight: 700;
  letter-spacing: 0.11em;
  line-height: 1;
  text-transform: uppercase;
}

.release-version strong {
  color: var(--gold);
  font-family: "Inter", ui-sans-serif, system-ui, sans-serif;
  font-size: 8px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}

.admission-control {
  align-items: center;
  background: rgba(245, 235, 218, 0.035);
  border: 1px solid rgba(215, 173, 100, 0.32);
  border-radius: 999px;
  color: var(--cream);
  display: inline-flex;
  font-size: 8px;
  font-weight: 700;
  gap: 7px;
  letter-spacing: 0.1em;
  min-height: 30px;
  padding: 6px 10px;
  text-decoration: none;
  text-transform: uppercase;
  white-space: nowrap;
}

.admission-control i {
  background: #8ebd7c;
  border-radius: 50%;
  box-shadow: 0 0 8px rgba(142, 189, 124, 0.5);
  height: 6px;
  width: 6px;
}

.admission-control[data-state="checking"] i,
.admission-control[data-state="unavailable"] i {
  background: transparent;
  border: 1px solid #a49889;
  box-shadow: none;
}

.admission-control[data-state="locked"] i,
.admission-control[data-state="remote"] i {
  background: var(--gold);
  box-shadow: 0 0 8px rgba(215, 173, 100, 0.42);
}

.admission-control[href]:hover,
.admission-control[href]:focus-visible {
  background: rgba(215, 173, 100, 0.11);
  border-color: rgba(236, 197, 125, 0.72);
}

.admission-control:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

main {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-height: 0;
}

.intro {
  align-items: end;
  display: grid;
  gap: 5px 28px;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: clamp(10px, 2vh, 20px) clamp(14px, 3vw, 48px) clamp(9px, 1.5vh, 16px);
}

.eyebrow {
  color: var(--gold);
  font-size: 8px;
  font-weight: 700;
  grid-column: 1 / -1;
  letter-spacing: 0.23em;
  margin: 0;
  text-transform: uppercase;
}

.intro h1 {
  font-family: "Morris Roman Black", "Inknut Antiqua", Georgia, serif;
  font-size: clamp(24px, 2.8vw, 40px);
  font-weight: 400;
  letter-spacing: -0.035em;
  line-height: 1.03;
  margin: 0;
}

.intro h1 em {
  color: var(--gold);
  display: block;
  font-family: "Junicode", Georgia, serif;
  font-size: clamp(14px, 1.25vw, 19px);
  font-style: italic;
  font-weight: 400;
  letter-spacing: 0.01em;
  line-height: 1.35;
  margin-top: 0.18em;
}

.lede {
  color: var(--paper);
  font-family: "Junicode", Georgia, serif;
  font-size: clamp(14px, 1.3vw, 18px);
  line-height: 1.2;
  margin: 3px 0 0;
}

.availability {
  align-items: center;
  display: flex;
  gap: 17px;
  grid-column: 2;
  grid-row: 2 / span 2;
}

.availability span {
  align-items: center;
  color: #d8cec0;
  display: flex;
  font-size: 8px;
  font-weight: 700;
  gap: 7px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  white-space: nowrap;
}

.availability i {
  border-radius: 50%;
  display: inline-block;
  height: 6px;
  width: 6px;
}

.live-dot {
  background: #8ebd7c;
  box-shadow: 0 0 10px rgba(142, 189, 124, 0.62);
}

.future-dot {
  border: 1px solid var(--gold);
}

.game-grid {
  align-self: center;
  display: grid;
  gap: clamp(6px, 0.8vw, 12px);
  grid-template-columns: repeat(6, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
  height: 100%;
  justify-self: center;
  max-height: min(100%, 68vh);
  min-height: 0;
  padding: 0 0 clamp(8px, 1.5vh, 16px);
  width: min(78%, 1280px);
}

.game-card {
  --card-glow: rgba(121, 86, 54, 0.28);
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.035), transparent 48%),
    rgba(17, 15, 18, 0.72);
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--cream);
  display: flex;
  flex-direction: column;
  grid-column: span 2;
  min-height: 0;
  overflow: hidden;
  padding: clamp(8px, 1vw, 14px);
  position: relative;
  text-decoration: none;
}

.game-card::before {
  background: radial-gradient(circle at 50% 36%, var(--card-glow), transparent 68%);
  content: "";
  inset: 0;
  opacity: 0.48;
  pointer-events: none;
  position: absolute;
  transition: opacity 180ms ease;
}

.game-card.live {
  cursor: pointer;
}

.game-card.live:hover,
.game-card.live:focus-visible {
  border-color: rgba(236, 197, 125, 0.58);
  transform: translateY(-2px);
}

.game-card.live:hover::before,
.game-card.live:focus-visible::before {
  opacity: 0.9;
}

.game-card.live:hover .card-action,
.game-card.live:focus-visible .card-action {
  color: #fff7e8;
}

.game-card.live:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.game-card--dwarf {
  --card-glow: rgba(152, 78, 35, 0.38);
}

.game-card--spelunk {
  --card-glow: rgba(36, 108, 91, 0.4);
}

.game-card--reliquary {
  --card-glow: rgba(106, 111, 142, 0.38);
}

.game-card--talisman {
  --card-glow: rgba(145, 97, 37, 0.3);
}

.game-card--slice {
  --card-glow: rgba(113, 68, 122, 0.28);
}

.game-card--thirty {
  --card-glow: rgba(92, 111, 108, 0.34);
}

.card-number,
.card-art,
.card-copy,
.card-action {
  position: relative;
  z-index: 1;
}

.card-number {
  color: rgba(244, 234, 216, 0.5);
  font-family: "Junicode", Georgia, serif;
  font-size: 9px;
  font-style: italic;
  line-height: 1;
}

.card-art {
  align-items: center;
  display: flex;
  flex: 1 1 60%;
  justify-content: center;
  margin: 5px 0 6px;
  min-height: 34px;
  overflow: hidden;
}

.card-art--image {
  border: 1px solid rgba(236, 218, 186, 0.12);
  border-radius: 8px;
}

.card-art--image::after {
  background: linear-gradient(to bottom, transparent 66%, rgba(13, 12, 16, 0.36));
  content: "";
  inset: 0;
  pointer-events: none;
  position: absolute;
}

.card-art--image img {
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.card-copy {
  display: grid;
  gap: 2px;
}

.card-state {
  color: var(--gold);
  font-size: 6px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.card-copy strong {
  font-family: "Morris Roman Black", "Inknut Antiqua", Georgia, serif;
  font-size: clamp(19px, 2vw, 31px);
  font-weight: 400;
  letter-spacing: -0.025em;
  line-height: 1;
}

.card-copy > span:last-child {
  color: var(--paper);
  font-family: "Junicode", Georgia, serif;
  font-size: clamp(10px, 0.86vw, 12px);
  line-height: 1.25;
}

.card-action {
  align-items: center;
  border-top: 1px solid var(--line);
  color: var(--gold);
  display: flex;
  font-size: 7px;
  font-weight: 700;
  justify-content: space-between;
  letter-spacing: 0.14em;
  margin-top: 5px;
  padding-top: 5px;
  text-transform: uppercase;
}

.future .card-state,
.future .card-action,
.preview .card-action,
.tassy-only .card-action {
  color: #9b9184;
}

.future .card-art,
.future .card-copy,
.preview .card-art,
.tassy-only:not(.live) .card-copy {
  opacity: 0.78;
}

.card-art--dwarf img {
  object-position: 50% 48%;
}

.card-art--talisman img {
  filter: grayscale(0.25) drop-shadow(0 12px 24px rgba(0, 0, 0, 0.4));
  max-height: 92%;
  max-width: min(70%, 220px);
  object-fit: contain;
}

.card-art--slice img {
  object-position: 50% 52%;
}

.card-art--thirty img {
  object-position: 50% 48%;
}

footer {
  align-items: center;
  border-top: 1px solid var(--line);
  color: #8c8276;
  display: flex;
  font-size: 8px;
  justify-content: space-between;
  letter-spacing: 0.13em;
  min-height: clamp(25px, 3.5vh, 34px);
  padding: 4px clamp(14px, 3vw, 48px);
  text-transform: uppercase;
}

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

footer i {
  color: var(--gold);
  font-style: normal;
}

@media (max-width: 900px) {
  .intro {
    grid-template-columns: 1fr;
  }

  .availability {
    grid-column: 1;
    grid-row: auto;
  }

  .game-card {
    padding: 8px;
  }

  .card-copy > span:last-child {
    display: none;
  }
}

@media (max-width: 620px) {
  .company-door,
  .lede {
    display: none;
  }

  .admission-control {
    font-size: 7px;
    min-height: 28px;
    padding-inline: 8px;
  }

  .topbar-actions {
    gap: 6px;
  }

  .release-versions {
    gap: 4px;
  }

  .release-version {
    min-width: 58px;
    padding-left: 5px;
  }

  .release-version small {
    font-size: 5px;
    letter-spacing: 0.07em;
  }

  .release-version strong {
    font-size: 7px;
  }

  .intro {
    gap: 4px;
    padding-block: 7px;
  }

  .intro h1 {
    font-size: clamp(22px, 6.5vw, 30px);
  }

  .availability {
    gap: 10px;
  }

  .availability span {
    font-size: 6px;
  }

  .game-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: repeat(3, minmax(0, 1fr));
    max-height: none;
    width: calc(100% - 20px);
  }

  .game-card {
    grid-column: span 1;
  }

  .card-art {
    margin: 3px 0;
  }

  .card-copy strong {
    font-size: clamp(17px, 5.8vw, 23px);
  }

  .card-action {
    border: 0;
    margin-top: 2px;
    padding-top: 0;
  }

  footer {
    min-height: 24px;
  }

  footer span:last-child {
    display: none;
  }
}

@media (max-height: 600px) and (min-width: 621px) {
  .topbar {
    min-height: 44px;
  }

  .brand img {
    height: 32px;
  }

  .intro {
    padding-block: 5px;
  }

  .eyebrow,
  .lede,
  .availability,
  .card-copy > span:last-child,
  .card-action {
    display: none;
  }

  .intro h1 {
    font-size: clamp(21px, 3.4vw, 29px);
  }

  .game-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    grid-template-rows: minmax(0, 1fr);
    max-height: none;
    width: calc(100% - 28px);
  }

  .game-card {
    grid-column: span 1;
  }

  .card-art {
    margin-block: 3px;
  }

  .card-copy strong {
    font-size: clamp(16px, 2.3vw, 23px);
  }
}

@media (max-height: 660px) and (max-width: 620px) {
  .brand img {
    height: 30px;
  }

  .topbar {
    min-height: 42px;
  }

  .eyebrow,
  .availability,
  .card-number,
  .card-action,
  footer span:last-child {
    display: none;
  }

  .intro h1 {
    font-size: clamp(20px, 6.2vw, 26px);
  }

  .card-copy strong {
    font-size: clamp(15px, 5.4vw, 20px);
  }
}

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

  .admission-control {
    gap: 5px;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
  }
}
