@font-face {
  font-family: "Bricolage Grotesque";
  src: url("../fonts/bricolage-grotesque-latin-wght.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}

:root {
  color-scheme: light;
  --sky: #00a6ff;        /* the "apps" blue in the logo */
  --night: #0a1a2a;
  --ink: #0c2230;
  --ink-soft: #40566a;
  --paper: #ffffff;
  --mist: #e6f6ff;
  --link: #005f94;
  --line: #c9dbe6;
  --bingo: #0a0f3f;
  --bingo-accent: #ffd93b;
  --poker: #0d442f;
  --poker-accent: #edd28a;
  --error: #a3161b;
  --gutter: clamp(16px, 4vw, 56px);
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.55 "Bricolage Grotesque", system-ui, sans-serif;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; height: auto; }
ul { margin: 0; padding: 0; list-style: none; }
a { color: var(--link); text-underline-offset: 0.16em; }
h1, h2, h3 { margin: 0; font-weight: 800; letter-spacing: -0.02em; line-height: 1.05; }
h2 { font-size: clamp(2rem, 4.4vw, 3.5rem); }

:focus-visible { outline: 3px solid currentColor; outline-offset: 3px; border-radius: 2px; }

.skip { position: absolute; left: -999px; top: 8px; z-index: 5; background: var(--paper); padding: 8px 14px; }
.skip:focus { left: 8px; }

/* Header */
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px var(--gutter);
}
.top nav { display: flex; gap: clamp(16px, 3vw, 32px); }
.top nav a { color: var(--ink); font-weight: 600; text-decoration: none; padding: 8px 0; }
.top nav a:hover { text-decoration: underline; }

/* Masthead: night blue so the app icons supply the colour */
.masthead { position: relative; overflow: hidden; background: var(--night); color: #fff; }
.masthead .top nav a { color: #fff; }
.masthead > * { position: relative; z-index: 1; }
.masthead::before {
  content: "";
  position: absolute;
  top: -14%;
  left: 44%;
  width: clamp(240px, 27vw, 420px);
  aspect-ratio: 200 / 520;
  background: url("../img/feather.svg") center / contain no-repeat;
  opacity: 0.32;
  transform: rotate(16deg);
}
.owned {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 clamp(18px, 2.2vw, 28px);
  color: #f3c2a8;
  font-size: clamp(1.1875rem, 1.9vw, 1.625rem);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.2;
}
.owned img { flex: none; width: auto; height: 2.5em; transform: rotate(10deg); }
.hero {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  align-items: center;
  gap: clamp(32px, 5vw, 88px);
  padding: clamp(40px, 6vw, 88px) var(--gutter) clamp(56px, 7vw, 104px);
}
.hero h1 {
  max-width: 15ch;
  font-size: clamp(2.625rem, 5.6vw, 5.25rem);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.03em;
}
.intro {
  max-width: 28em;
  margin: clamp(20px, 2.4vw, 32px) 0 0;
  color: #c4d3de;
  font-size: clamp(1.125rem, 1.5vw, 1.3125rem);
  line-height: 1.45;
}

.home-screen {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(20px, 2.6vw, 36px) clamp(16px, 2.2vw, 32px);
}
.home-screen a {
  display: block;
  color: #fff;
  font-size: 0.9375rem;
  line-height: 1.25;
  text-align: center;
  text-decoration: none;
}
.home-screen img {
  width: min(100%, 124px);
  margin: 0 auto 10px;
  border-radius: 22.5%;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1);
  transition: transform 160ms ease;
}
.home-screen a:hover img { transform: translateY(-3px); }
.home-screen a:hover span { text-decoration: underline; }

/* Game night posters, each in its own product's colours */
.game-night h2 { padding: clamp(48px, 7vw, 88px) var(--gutter) clamp(24px, 3vw, 40px); }
.poster {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  align-items: center;
  color: #fff;
}
.poster > img {
  width: 100%;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 9%);
  mask-image: linear-gradient(to right, transparent, #000 9%);
}
.poster-copy { padding: clamp(32px, 5vw, 72px) var(--gutter); }
.poster h3 { font-size: clamp(2.25rem, 4vw, 3.5rem); }
.poster h3 a { color: inherit; text-decoration: none; }
.poster h3 a:hover { text-decoration: underline; text-decoration-thickness: 3px; }
.poster p { max-width: 34em; margin: 16px 0 0; }
.poster .fine { font-size: 0.9375rem; opacity: 0.86; }
.poster a { color: var(--accent); }
.poster .actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; margin-top: 24px; }
.button {
  display: inline-block;
  padding: 12px 22px;
  border-radius: 999px;
  background: var(--accent);
  font-weight: 700;
  text-decoration: none;
}
.poster .button { color: var(--on-accent); }
.poster .button:hover { background: #fff; }
.deep { display: flex; flex-wrap: wrap; gap: 6px 20px; margin-top: 24px; font-size: 0.9375rem; }
.deep a { display: inline-block; padding: 4px 0; }
.poster-bingo { background: var(--bingo); --accent: var(--bingo-accent); --on-accent: var(--bingo); }
.poster-poker { background: var(--poker); --accent: var(--poker-accent); --on-accent: var(--poker); }

/* App shelf: a group name in the margin, with its apps beside it */
.shelf { padding: clamp(56px, 8vw, 104px) var(--gutter); }
.shelf > h2 { margin-bottom: clamp(24px, 4vw, 48px); }
.shelf-group {
  display: grid;
  grid-template-columns: minmax(140px, 2fr) minmax(0, 8fr);
  gap: 16px clamp(16px, 3vw, 40px);
  padding: 28px 0;
  border-top: 1px solid var(--line);
}
.shelf-group h3 { font-size: 1.375rem; letter-spacing: -0.01em; line-height: 1.2; }
.shelf-group ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px clamp(20px, 3vw, 40px); }
.shelf-group li { display: flex; gap: 14px; align-items: flex-start; }
.shelf-group img { flex: none; width: 64px; height: 64px; border-radius: 22.5%; box-shadow: 0 0 0 1px rgba(12, 34, 48, 0.1); }
.shelf-group a { display: inline-block; font-weight: 700; font-size: 1.125rem; line-height: 1.4; }
.shelf-group p { margin: 2px 0 0; color: var(--ink-soft); font-size: 1rem; line-height: 1.4; }
.shelf-more { margin: 0; padding-top: 28px; border-top: 1px solid var(--line); font-weight: 600; }

/* Support */
.support {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(32px, 6vw, 96px);
  padding: clamp(56px, 8vw, 104px) var(--gutter);
  background: var(--mist);
}
.support-copy p { max-width: 30em; margin: 20px 0 0; }
.support form { display: flex; flex-direction: column; align-items: flex-start; }
.support label { margin: 18px 0 6px; font-weight: 600; }
.support label:first-of-type { margin-top: 0; }
.support input, .support select, .support textarea {
  width: 100%;
  min-height: 48px;
  padding: 10px 14px;
  border: 1px solid #6c8496;
  border-radius: 8px;
  background: var(--paper);
  color: inherit;
  font: inherit;
}
.support textarea { resize: vertical; }
.cf-turnstile { min-height: 65px; margin-top: 24px; }
.support noscript .notice { margin: 16px 0 0; }
.support button {
  margin-top: 24px;
  padding: 13px 28px;
  border: 0;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.support button:hover { background: var(--link); }
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.notice { width: 100%; margin: 0 0 20px; padding: 14px 18px; border-radius: 8px; font-weight: 600; }
.notice-ok { align-self: start; background: var(--paper); border-left: 5px solid var(--sky); }
.notice-error { background: #fdeced; border-left: 5px solid var(--error); color: var(--error); }

/* Footer */
.foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 32px;
  padding: 28px var(--gutter);
  background: var(--ink);
  color: #fff;
}
.foot p { margin: 0; }
.foot-owned img { display: inline-block; width: auto; height: 1.5em; margin-left: 2px; vertical-align: -0.3em; transform: rotate(10deg); }
.foot ul { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.foot a { color: #fff; }

/* Simple pages */
.plain { max-width: 40em; padding: clamp(48px, 8vw, 96px) var(--gutter); }
.plain h1 { font-size: clamp(2.5rem, 6vw, 4.5rem); }
.plain p { margin: 20px 0 0; font-size: 1.125rem; }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; }
  .home-screen { width: min(100%, 520px); }
  .masthead::before { top: 2%; left: auto; right: -8%; width: 190px; }
  .poster, .support { grid-template-columns: 1fr; }
  .poster > img {
    -webkit-mask-image: linear-gradient(to bottom, transparent, #000 9%);
    mask-image: linear-gradient(to bottom, transparent, #000 9%);
  }
}

@media (max-width: 640px) {
  .shelf-group { grid-template-columns: 1fr; }
  .shelf-group ul { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .home-screen img { transition: none; }
}
