/* Plut Games: the hub at /games/ and the play pages. Same colours and type as the home page. */
:root {
  --bg: #140e1a;
  --bg-2: #1a1321;
  --bg-3: #231a2c;
  --line: #2f2539;
  --text: #f3f0ea;
  --text-2: #c2b9cc;
  --muted: #9389a0;
  --yellow: #ffcc00;
  --yellow-2: #ffd633;
  --yellow-ink: #1c1500;
  --violet: #9c81f7;
  --game-bg: #0b0a14;
  --f-display: "Bricolage Grotesque", "Archivo", system-ui, sans-serif;
  --f-body: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --gutter: clamp(16px, 4vw, 40px);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.5 var(--f-body);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
img { display: block; max-width: 100%; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  font: 700 15px/1 var(--f-display);
  text-decoration: none;
  white-space: nowrap;
  transition: transform .2s var(--ease-out), background-color .2s;
}
.btn--yellow { background: var(--yellow); color: var(--yellow-ink); }
.btn--yellow:hover { background: var(--yellow-2); }
.btn--ghost { border: 1px solid var(--line); color: var(--text); }
.btn--ghost:hover { border-color: var(--muted); }
.btn:active { transform: scale(.97); }

/* ---- hub */

.wrap { width: min(1080px, 100%); margin: 0 auto; padding: 0 var(--gutter); }

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 68px;
}
.top__logo { display: inline-flex; }

.intro { padding: clamp(28px, 7vw, 72px) 0 clamp(24px, 5vw, 48px); max-width: 720px; }
.kicker {
  margin: 0 0 12px;
  font: 500 13px/1 var(--f-mono);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--yellow);
}
.intro h1 {
  margin: 0;
  font: 800 clamp(34px, 7vw, 64px)/1.02 var(--f-display);
  letter-spacing: -.02em;
}
.intro p.lede { margin: 16px 0 0; font-size: clamp(16px, 2.2vw, 19px); color: var(--text-2); max-width: 560px; }

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
  gap: clamp(16px, 3vw, 28px);
}
.card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--bg-2);
  text-decoration: none;
  transition: transform .35s var(--ease-out), border-color .25s;
}
.card:hover { transform: translateY(-4px); border-color: #4a3d5a; }
.card:focus-visible { outline: 3px solid var(--yellow); outline-offset: 3px; }
.card__cover { width: 100%; height: auto; aspect-ratio: 15 / 8; object-fit: cover; background: var(--bg-3); }
.card__body { display: flex; flex-direction: column; gap: 14px; padding: 20px 20px 22px; flex: 1; }
.card h2 { margin: 0; font: 800 26px/1.1 var(--f-display); letter-spacing: -.01em; }
.card__tagline { margin: -8px 0 0; color: var(--text-2); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.tags li {
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--bg-3);
  color: var(--text-2);
  font: 500 12px/1.2 var(--f-mono);
}
.card .btn { align-self: flex-start; margin-top: auto; }
.card--football .btn { background: var(--violet); color: #160f2a; }

.note { margin: 20px 0 0; color: var(--muted); font-size: 14px; }

.get {
  display: grid;
  gap: 16px;
  margin: clamp(40px, 8vw, 88px) 0 0;
  padding: clamp(24px, 5vw, 44px);
  border-radius: 28px;
  background: var(--bg-3);
}
.get h2 { margin: 0; font: 800 clamp(26px, 4.5vw, 40px)/1.08 var(--f-display); letter-spacing: -.01em; }
.get p { margin: 0; color: var(--text-2); max-width: 600px; }
.stores { display: flex; flex-wrap: wrap; gap: 10px; }

.foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  padding-top: 32px;
  padding-bottom: 40px;
  color: var(--muted);
  font-size: 14px;
}
.foot a { color: var(--text-2); }

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

/* ---- play pages: the game fills the window; the loader sits on top until the game is up */

html.play, html.play body { height: 100%; overflow: hidden; }
html.play body {
  background: var(--game-bg);
  overscroll-behavior: none;
  touch-action: none;
}

.game {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: var(--game-bg);
}

.loader {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: var(--game-bg);
  transition: opacity .45s var(--ease-out), visibility .45s;
  touch-action: auto;
}
.loader.is-done { opacity: 0; visibility: hidden; pointer-events: none; }
.loader__art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .35;
  filter: blur(2px) saturate(1.1);
}
.loader__panel {
  position: relative;
  width: min(360px, 100%);
  padding: 24px;
  border-radius: 24px;
  background: rgba(20, 14, 26, .86);
  border: 1px solid var(--line);
  text-align: center;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.loader__title { margin: 0 0 18px; font: 800 30px/1.05 var(--f-display); letter-spacing: -.01em; }
.loader__bar { height: 6px; overflow: hidden; border-radius: 99px; background: var(--bg-3); }
.loader__bar i {
  display: block;
  height: 100%;
  background: var(--yellow);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .2s linear;
}
.loader__status { margin: 14px 0 18px; min-height: 3em; color: var(--text-2); font-size: 14px; }
.loader.is-failed .loader__bar { display: none; }
.loader.is-failed .loader__status { color: var(--yellow); }
.loader__links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }

.noscript { position: fixed; inset: auto 0 24px; margin: 0; text-align: center; color: var(--yellow); }
