/* The page for choosing a game. Colours and type come from core/base.css. */

html:has(.hub),
body.hub {
  height: auto;
  min-height: 100%;
  overflow: auto;
}

body.hub {
  background: linear-gradient(#58b7ff, #d6f0ff 70%);
}

.hub-main {
  width: min(960px, 100%);
  min-height: 100dvh;
  margin: 0 auto;
  padding: clamp(24px, 5vh, 56px) 20px 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
}

.hub-lead {
  font-size: clamp(18px, 2.3vw, 26px);
  font-weight: 500;
}

.game-cards {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: clamp(16px, 3vw, 28px);
  margin: clamp(16px, 3vh, 32px) 0 clamp(14px, 2vh, 24px);
}

.game-card {
  display: block;
  overflow: hidden;
  padding-bottom: 22px;
  background: var(--surface);
  border-radius: 28px;
  box-shadow: var(--shadow);
  color: inherit;
  text-decoration: none;
  transition: transform 0.15s ease;
}

.game-card:hover { transform: translateY(-5px); }

.game-card h2 { margin-top: 16px; }

.game-card p {
  margin-top: 4px;
  padding: 0 18px;
  font-size: clamp(16px, 1.8vw, 20px);
  color: var(--ink-soft);
}

.game-art svg {
  display: block;
  width: 100%;
}

.game-art-racers { background: linear-gradient(#7cc8ff, #d6f0ff); }
.game-art-balloons { background: linear-gradient(#58b7ff, #bfe6ff); }

.art-hill { fill: #7bd65b; }
.art-road { fill: #5d6b7c; }
.art-dash { fill: #f4f7fa; }
.art-car rect { fill: #ff5a4f; }
.art-car .art-glass { fill: #1f3247; }
.art-car .art-lamp { fill: #ffe066; }
.art-car .art-tyre { fill: #2b3340; }

.art-string {
  fill: none;
  stroke: #12304d;
  stroke-opacity: 0.45;
  stroke-width: 2;
  stroke-linecap: round;
}

.art-balloon-red path { fill: #ff5a4f; }
.art-balloon-yellow path { fill: #ffc21a; }
.art-balloon-blue path { fill: #3b82f6; }
.art-shine { fill: #ffffff; opacity: 0.45; }

.game-art-moves { background: linear-gradient(#58b7ff, #d9f2ff 70%); }
.art-mat { fill: #ffd66b; }
.art-pig ellipse, .art-pig circle { fill: #ffa6bf; stroke: #4a1f3d; stroke-width: 3; }
.art-arm { fill: none; stroke: #ffa6bf; stroke-width: 15; stroke-linecap: round; }
.art-strip { fill: #2f6fed; }
.art-snout { fill: #ff8bab; stroke: #4a1f3d; stroke-width: 2.5; }
.art-eye { fill: #1c1630; }
.art-star { fill: #ffc21a; stroke: #dba500; stroke-width: 2; }
.art-figure circle { fill: #12304d; }
.art-figure path { fill: none; stroke: #12304d; stroke-width: 7; stroke-linecap: round; stroke-linejoin: round; }

.game-art-trail { background: linear-gradient(#7cc8ff, #e4f6ff 66%); }
.game-art-sky { background: linear-gradient(#3f9fe8, #d9f2ff); }
.art-cloud { fill: #fff; opacity: 0.9; }
.art-ring { fill: none; stroke: #ffd23f; stroke-width: 9; }
.art-wing { fill: #ff5a4f; stroke: #12304d; stroke-width: 3; }
.art-fuselage { fill: #a855f7; stroke: #12304d; stroke-width: 3; }
.art-tail { fill: #3b82f6; stroke: #12304d; stroke-width: 3; }
.art-pilot { fill: #ffd23f; stroke: #12304d; stroke-width: 3; }
.art-trail { fill: #e4bf85; }
.art-log rect { fill: #8a5a2b; }
.art-log ellipse { fill: #d9b277; }
.art-giraffe ellipse { fill: #f5c451; stroke: #4a2c10; stroke-width: 2.5; }
.art-neck { fill: none; stroke: #f5c451; stroke-width: 11; stroke-linecap: round; }
.art-legs { fill: none; stroke: #f5c451; stroke-width: 8; stroke-linecap: round; }
.art-spot { fill: #b4682c; }
.art-hop { fill: none; stroke: #ffffff; stroke-width: 3; stroke-dasharray: 2 8; stroke-linecap: round; }

.hub-print { max-width: 640px; }

@media (prefers-reduced-motion: reduce) {
  .game-card { transition: none; }
  .game-card:hover { transform: none; }
}

.art-sky-sea { fill: #2a9fd6; }
.art-sky-island { fill: #63bd58; }
.art-sky-top { fill: #7e7268; }
.art-wing-small { fill: #ff5a4f; }
.art-fuselage-small { fill: #3b3b48; }

/* The new games' pictures. */
.game-art-walk { background: linear-gradient(#ffd9a0, #fff1d6 70%); }
.game-art-walk .art-hill { fill: #d8a860; }
.art-tree path { fill: #7a5531; }
.art-tree ellipse { fill: #6f8f3f; }
.art-fruit { fill: #e8433f; stroke: var(--ink); stroke-width: 2; }
.art-carry { fill: none; stroke: #fff; stroke-width: 5; stroke-linecap: round; stroke-dasharray: 2 12; }

.game-art-smoothie { background: linear-gradient(#8fd2fa, #e6f7ff 75%); }
.art-stand { fill: #c98d4e; }
.art-glass-cup path:first-child { fill: #f4fbff; stroke: var(--ink); stroke-width: 3; }
.art-drink { fill: #ff8fa8; }
.art-straw { fill: none; stroke: #e8433f; stroke-width: 6; stroke-linecap: round; }
.art-sliced path { fill: #e8433f; stroke: var(--ink); stroke-width: 3; }
.art-swipe { fill: none; stroke: #fff; stroke-width: 8; stroke-linecap: round; }
.art-orange { fill: #ff9f2e; stroke: var(--ink); stroke-width: 3; }

.game-art-lighthouse { background: linear-gradient(#2c4663, #6d8aa6 76%); }
.art-beam { fill: #ffe996; opacity: 0.55; }
.art-rock { fill: #4b4f58; }
.art-tower { fill: #f4f1e8; stroke: var(--ink); stroke-width: 3; }
.art-tower-band { fill: #e8433f; }
.art-lamp-room { fill: #ffd23f; stroke: var(--ink); stroke-width: 3; }
.art-tower-roof { fill: #e8433f; stroke: var(--ink); stroke-width: 3; }
.art-boat path:first-child { fill: #ff9a5c; stroke: var(--ink); stroke-width: 3; }
.art-boat path:last-child { fill: #fff4e0; stroke: var(--ink); stroke-width: 3; }
.art-wave { fill: #23435f; }

/* The film of a game being played, over its card while the pointer rests there. */
.game-demo {
  display: none;
  position: fixed;
  z-index: 10;
  width: min(60vw, 560px);
  overflow: hidden;
  background: var(--surface);
  border: 5px solid var(--sun);
  border-radius: 24px;
  box-shadow: 0 16px 44px rgba(18, 48, 77, 0.35);
  pointer-events: none;
}

.game-demo.is-showing { display: block; }

#game-demo-film {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #dbeefc;
}

.game-demo-moves {
  margin: 0;
  padding: 10px 16px 12px;
  font-size: clamp(16px, 1.7vw, 20px);
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
}
