/* The games' own palette (GamesShared/FAMILY.md, "Colour"): the felt every
   screen sits on, the cream of a card face, the navy and gold of a card back. */
:root {
  --felt: #0d592e;
  --face: #faf6ee;
  --ink: #1f1d1a;
  --ink-soft: #5b564e;
  --red: #c0392b;
  --navy: #1c2550;
  --gold: #d9a93a;
  --on-felt: #ffffff;
  --on-felt-soft: #cfe3d6;
  --radius: 18px;
}

* { box-sizing: border-box; }

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

/* The games' own felt (each game's TableFelt.png, 4095 px square, tiling
   exactly), as WebP at quality 90: 368 KB against the PNG's 10 MB. Drawn at
   half its pixel size, so one image pixel is one screen pixel on a 2x
   display, as the games draw it. The flat felt shows until it loads. */
body {
  margin: 0;
  background: var(--felt) url("/felt.webp") 0 0 / 2047.5px 2047.5px repeat;
  color: var(--on-felt);
  font: 17px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

a { color: inherit; }

main, .top, footer {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header and footer */

.top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
  padding-top: 18px;
  padding-bottom: 18px;
}

.brand {
  display: flex;
  align-items: center;
  font-weight: 700;
  font-size: 1.1rem;
  text-decoration: none;
  white-space: nowrap;
}

/* The Stockfleth arms, cut from src/assets/crest/stockfleth-coa-commons.jpeg:
   Anders Thiset's plate in Danmarks Adels Aarbog, from Wikimedia Commons
   (File:Stockfleth COA.jpeg). A larger scan of the same plate, with its
   caption, is stokfleth-arms.jpg beside it. */
.crest {
  margin-right: 0.6em;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgb(0 0 0 / 0.3);
}

nav { display: flex; gap: 20px; }

nav a {
  text-decoration: none;
  color: var(--on-felt-soft);
}

nav a:hover, nav a:focus-visible { color: var(--on-felt); text-decoration: underline; }

footer {
  margin-top: 72px;
  padding-top: 24px;
  padding-bottom: 40px;
  border-top: 1px solid rgb(255 255 255 / 0.15);
  color: var(--on-felt-soft);
  font-size: 0.9rem;
}

/* Headings and sections */

section { margin-top: 56px; }

h1, h2, h3 { line-height: 1.2; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(2.2rem, 6vw, 3.4rem); letter-spacing: -0.02em; }
h2 { font-size: 1.5rem; margin-bottom: 20px; }
h3 { font-size: 1.05rem; }

.lede { font-size: 1.25rem; color: var(--on-felt-soft); margin: 12px 0 0; text-wrap: balance; }

.platforms, .note, .dated { color: var(--on-felt-soft); font-size: 0.95rem; }

.note { margin-top: 20px; text-align: center; }

/* The hero's fanned hand */

.hero { text-align: center; margin-top: 24px; }

.fan {
  position: relative;
  height: 170px;
  margin-bottom: 28px;
}

.playing-card {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 92px;
  height: 130px;
  margin-left: -46px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid #c9c2b4;
  background: var(--face);
  color: var(--ink);
  box-shadow: 0 6px 14px rgb(0 0 0 / 0.3);
  text-align: left;
  transform-origin: 50% 250%;
  transform: rotate(calc(var(--i) * 9deg));
  transition: transform 0.25s ease;
  animation: deal 0.7s ease backwards;
  animation-delay: calc((var(--i) + 2) * 0.08s);
}

.playing-card.red { color: var(--red); }
.playing-card b { display: block; font: 700 1.5rem/1 Georgia, "Times New Roman", serif; }
.playing-card i { display: block; font-style: normal; font-size: 2.6rem; line-height: 1.5; text-align: center; }

.fan:hover .playing-card { transform: rotate(calc(var(--i) * 11deg)) translateY(-6px); }

@keyframes deal {
  from { transform: rotate(0) translateY(-260px); opacity: 0; }
}

/* The game tiles, a shelf of them for each kind of game */

.shelf + .shelf { margin-top: 44px; }
.after-shelves { margin-top: 0; }

.tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

.tile {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--face);
  color: var(--ink);
  text-decoration: none;
  box-shadow: 0 8px 20px rgb(0 0 0 / 0.28);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

a.tile:hover, a.tile:focus-visible {
  transform: translateY(-6px) rotate(-1deg);
  box-shadow: 0 16px 30px rgb(0 0 0 / 0.36);
}

.tile .art { aspect-ratio: 4 / 3; overflow: hidden; background: var(--felt); }

.tile .art img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 24%;
}

.tile .label {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px 16px;
}

.tile .label p { margin: 2px 0 0; font-size: 0.9rem; line-height: 1.35; color: var(--ink-soft); }

.icon { border-radius: 22%; flex: none; box-shadow: 0 2px 6px rgb(0 0 0 / 0.25); }

/* A game not released yet. The picture is blurred in the file itself and the
   words are scrambled letters; the blur here is what makes them look like a
   name out of focus rather than nonsense. */

.tile.unreleased { cursor: default; user-select: none; -webkit-user-select: none; }
.tile.unreleased .art img { object-position: 50% 50%; transform: scale(1.15); }
.tile.unreleased .label h3, .tile.unreleased .label p { filter: blur(6px); }
.tile.unreleased .art, .tile.unreleased .label { opacity: 0.85; }

.ribbon {
  position: absolute;
  top: 37.5%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-6deg);
  padding: 8px 22px;
  border-radius: 999px;
  border: 2px solid var(--gold);
  background: var(--navy);
  color: var(--gold);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.9rem;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgb(0 0 0 / 0.35);
}

/* Lists of short points */

.promises {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.promises li {
  padding: 18px 20px;
  border-radius: var(--radius);
  background: rgb(0 0 0 / 0.18);
  border: 1px solid rgb(255 255 255 / 0.1);
}

.promises p { margin: 6px 0 0; color: var(--on-felt-soft); font-size: 0.97rem; }

/* A game's own page */

.game-head {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-top: 32px;
}

.badge {
  display: inline-block;
  margin-top: 18px;
  padding: 10px 20px;
  border-radius: 999px;
  background: var(--face);
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
}

.badge.soon { background: var(--navy); color: var(--gold); border: 2px solid var(--gold); }

.intro { font-size: 1.15rem; max-width: 46em; }

.shots { margin-top: 28px; }

.shot { margin: 0; }

.shot img {
  display: block;
  width: 100%;
  height: auto;
  box-shadow: 0 12px 28px rgb(0 0 0 / 0.4);
}

.shot figcaption {
  margin-top: 10px;
  text-align: center;
  color: var(--on-felt-soft);
  font-size: 0.9rem;
}

.shots.phones {
  display: flex;
  gap: 24px;
  padding-bottom: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
}

.shot.iphone { flex: 0 0 min(300px, 72vw); scroll-snap-align: center; }

/* Each device gets the bezel it has: thick and round for the phone and the
   tablet, a thin flat one for the television, none for the Mac's window,
   whose capture brings its own title bar and corners. */
.shot.iphone img { border: 8px solid #101010; border-radius: 40px; background: #101010; }
.shot.ipad img { border: 12px solid #101010; border-radius: 28px; background: #101010; }
.shot.appletv img { border: 6px solid #101010; border-radius: 6px; }
.shot.mac img { border-radius: 12px; }

/* The tablet beside the Mac over the television; the columns are weighted
   so the two sides come out about the same height. */
.shots.bigger {
  display: grid;
  grid-template-columns: 0.84fr 1fr;
  gap: 32px;
  align-items: center;
  margin-top: 40px;
}

.stack { display: grid; gap: 24px; }

.fineprint { color: var(--on-felt-soft); font-size: 0.95rem; }

/* Support and privacy: a page of text on a card */

.prose {
  max-width: 720px;
  margin: 32px auto 0;
  padding: 36px clamp(20px, 5vw, 48px) 40px;
  border-radius: var(--radius);
  background: var(--face);
  color: var(--ink);
  box-shadow: 0 8px 20px rgb(0 0 0 / 0.28);
}

.prose h1 { font-size: 2.2rem; }
.prose h2 { font-size: 1.25rem; margin: 32px 0 8px; }
.prose h3 { margin: 22px 0 4px; }
.prose p { margin: 0 0 12px; }
.prose a { color: #0b6b34; }
.prose .dated { color: var(--ink-soft); }
.prose.center { text-align: center; }

@media (max-width: 760px) {
  .shots.bigger { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .game-head { flex-direction: column; align-items: flex-start; gap: 16px; }
  .fan { height: 140px; transform: scale(0.82); transform-origin: 50% 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .playing-card { animation: none; transition: none; }
  .tile { transition: none; }
  a.tile:hover, a.tile:focus-visible { transform: none; }
}
