:root {
  --gold: #e9b445;
  --gold-light: #ffe9a8;
  --ink: #efe6d6;
  --muted: #b3a48c;
  --panel: #1a1228;
  --line: #ffffff1c;
  font-family: Georgia, 'Times New Roman', serif;
  color: var(--ink);
}

* {
  box-sizing: border-box;
}

html {
  background: #0b0812;
}

body {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: radial-gradient(1200px 620px at 50% -120px, #34204f 0%, #130b20 55%, #0b0812 100%) no-repeat, #0b0812;
  line-height: 1.6;
}

body.no-scroll {
  overflow: hidden;
}

a {
  color: var(--gold-light);
}

h1,
h2,
h3,
.brand-name,
.foot-brand {
  font-family: 'Cinzel', 'Trajan Pro', 'Palatino Linotype', 'Book Antiqua', Georgia, serif;
  letter-spacing: 0.08em;
}

/* ------------------------------------------------------------------ header */

.site-head {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px clamp(16px, 4vw, 40px);
  background: #0e0918e6;
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(8px);
}

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

.brand-mark {
  width: 34px;
  height: 34px;
  object-fit: contain;
  filter: drop-shadow(0 0 8px #8a3dff88);
}

.brand-name {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 0.2em;
  background: linear-gradient(180deg, #ffe9a8, #c8922e);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.site-nav a {
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 14px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink);
  border: 1px solid var(--line);
}

.site-nav a:hover {
  border-color: var(--gold);
  color: var(--gold-light);
}

/* -------------------------------------------------------------------- page */

.page {
  flex: 1;
  width: min(100%, 1180px);
  margin: 0 auto;
  padding: 22px clamp(14px, 3vw, 28px) 56px;
}

.hero {
  padding: 26px 0 18px;
  text-align: center;
}

.hero h1 {
  margin: 0 0 6px;
  font-size: clamp(28px, 5vw, 44px);
  background: linear-gradient(180deg, #ffe9a8, #c8922e);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero p {
  margin: 0;
  color: var(--muted);
}

.game-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: 22px;
  margin-top: 18px;
}

.game-card {
  position: relative;
  display: block;
  aspect-ratio: 4 / 3;
  border-radius: 16px;
  overflow: hidden;
  text-decoration: none;
  color: #f3ecdf;
  background: var(--art) center / cover;
  border: 2px solid color-mix(in srgb, var(--accent) 65%, transparent);
  box-shadow: 0 14px 36px #000a;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.game-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 46px #000c, 0 0 0 2px var(--accent);
}

.game-card-body {
  position: absolute;
  inset: auto 0 0 0;
  padding: 44px 16px 14px;
  background: linear-gradient(180deg, transparent, #000d 55%);
}

.game-card h3 {
  margin: 0 0 2px;
  font-size: 22px;
  color: var(--accent);
}

.game-card p {
  margin: 0 0 8px;
  font-size: 14px;
  opacity: 0.88;
}

.chip {
  display: inline-block;
  margin-right: 6px;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 12px;
  background: #ffffff1c;
  border: 1px solid #ffffff30;
}

/* --------------------------------------------------------------- game page */

.back {
  display: inline-block;
  margin-bottom: 12px;
  font-size: 14px;
  letter-spacing: 0.06em;
  text-decoration: none;
  color: var(--muted);
}

.back:hover {
  color: var(--gold-light);
}

.frame-wrap {
  /* As wide as the game's 16:10 stage can be while it fits the screen. */
  width: min(100%, calc((100dvh - 190px) * 1.6));
  margin: 0 auto;
  border-radius: 14px;
  overflow: hidden;
  background: #05030a;
  border: 1px solid #e9b44566;
  box-shadow: 0 22px 60px #000c, 0 0 0 1px #000;
}

/* On desktop the game's stage keeps the game's own 16:10 shape at every width
   (the game scales inside it), as large as fits the screen. Touch phones get
   a tall stage for the game's phone layout. */
.frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  background: #05030a;
}

@media (max-width: 700px) and (pointer: coarse) {
  .frame-wrap {
    width: 100%;
  }
  .frame {
    width: 100%;
    aspect-ratio: auto;
    height: calc(100dvh - 150px);
    min-height: 520px;
    max-height: 860px;
  }
}

.frame-game {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.frame-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 14px;
  background: linear-gradient(180deg, #1c1330, #120b20);
  border-top: 1px solid #e9b44544;
  font-size: 14px;
}

.frame-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
}

.frame-label strong {
  color: var(--gold-light);
  letter-spacing: 0.06em;
}

.frame:fullscreen,
.frame.frame-max {
  width: 100vw;
  height: 100dvh;
  max-height: none;
  aspect-ratio: auto;
}

.frame.frame-max {
  position: fixed;
  inset: 0;
  z-index: 60;
}

.game-intro {
  margin-top: 30px;
}

.game-intro h1 {
  margin: 0;
  font-size: clamp(28px, 5vw, 42px);
  background: linear-gradient(180deg, #ffe9a8, #c8922e);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lead {
  margin: 4px 0 14px;
  font-size: 19px;
  font-style: italic;
  color: var(--gold-light);
}

.game-intro p {
  max-width: 76ch;
}

.game-block {
  margin-top: 30px;
}

.game-block h2 {
  margin: 0 0 12px;
  padding-bottom: 8px;
  font-size: 20px;
  color: var(--gold);
  border-bottom: 1px solid var(--line);
}

.expect {
  margin: 0;
  padding-left: 22px;
  max-width: 82ch;
}

.expect li {
  margin-bottom: 8px;
}

.expect li::marker {
  color: var(--gold);
}

.facts {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr));
  gap: 12px;
  margin: 0;
}

.fact {
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--panel);
  border: 1px solid var(--line);
}

.fact dt {
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.fact dd {
  margin: 2px 0 0;
  font-size: 18px;
  color: var(--gold-light);
}

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

.site-foot {
  padding: 26px clamp(16px, 4vw, 40px) 34px;
  text-align: center;
  font-size: 14px;
  color: var(--muted);
  background: #08050fd9;
  border-top: 1px solid var(--line);
}

.foot-brand {
  margin-bottom: 6px;
  font-size: 16px;
  letter-spacing: 0.22em;
  color: var(--gold);
}

.site-foot p {
  max-width: 70ch;
  margin: 0 auto 4px;
}

.foot-small {
  font-size: 12px;
  opacity: 0.75;
}
