/* play.glitchandgloomstudios.org: the list of games you can play in the browser. Same tokens as the website. */
@font-face { font-family: Michroma; src: url(/michroma.woff2) format('woff2'); font-display: swap; }

:root {
  --bg: #050506;
  --surface: #121317;
  --line: #26282e;
  --line-hi: #3a3d45;
  --text: #e9ebee;
  --text-muted: #a6abb3;
  --text-faint: #7d828b;
  --text-strong: #ffffff;
  --metal-btn: linear-gradient(180deg, #ffffff 0%, #d4d7db 55%, #9a9ea6 100%);
  --on-metal: #08090b;
  --blood: #ff4d55;
  --btn-blood: #d4121d;
  --btn-blood-hi: #e8262f;
  --btn-blood-line: #ff5a62;
  --koi-panel: radial-gradient(90% 120% at 15% 50%, rgba(212, 18, 29, 0.22), transparent 60%), linear-gradient(180deg, #120507, #070203);
  --koi-line: #3a1014;
  --shadow-hi: 0 12px 36px rgba(0, 0, 0, 0.6), 0 0 0 1px var(--line-hi);
  --focus: #7fe8ff;
  --logo-filter: none;           /* the silver emblem, as is */
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root {
    --bg: #f4f4f2;
    --surface: #ffffff;
    --line: #d9dadd;
    --line-hi: #b9bbc0;
    --text: #1d1f23;
    --text-muted: #4a4e55;
    --text-faint: #5f636b;
    --text-strong: #000000;
    --metal-btn: linear-gradient(180deg, #2a2c31 0%, #16171a 100%);
    --on-metal: #ffffff;
    --blood: #b30d17;
    --koi-panel: radial-gradient(90% 120% at 15% 50%, rgba(212, 18, 29, 0.10), transparent 60%), linear-gradient(180deg, #fff6f6, #ffffff);
    --koi-line: #f0c9cb;
    --shadow-hi: 0 10px 28px rgba(0, 0, 0, 0.12), 0 0 0 1px var(--line-hi);
    --focus: #0a6fa3;
    --logo-filter: invert(1) contrast(1.1);
    color-scheme: light;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }   /* no blue flash on taps (Android) */
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
a { color: inherit; }
a:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 4px; }
.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }

header { padding: max(20px, env(safe-area-inset-top)) 0 20px; border-bottom: 1px solid var(--line); }
header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; font: 13px Michroma, system-ui, sans-serif; letter-spacing: .18em; color: var(--text-strong); }
.brand img { width: 36px; height: 36px; filter: var(--logo-filter); }
.brand span b { color: var(--blood); font-weight: 400; }
.site { font-size: 14px; color: var(--text-muted); text-underline-offset: 3px; }

.intro { padding: 56px 0 28px; }
.intro h1 { margin: 0 0 12px; font: 400 clamp(28px, 5vw, 44px)/1.15 Michroma, system-ui, sans-serif; letter-spacing: .04em; color: var(--text-strong); }
.intro p { margin: 0; max-width: 60ch; color: var(--text-muted); }

.games { display: grid; gap: 24px; padding: 12px 0 64px; margin-block: 0; list-style: none; }
.game { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); overflow: hidden; border-radius: 16px; background: var(--surface); box-shadow: var(--shadow-hi); }
.game.skin-koi { background: var(--koi-panel); box-shadow: var(--shadow-hi), 0 0 0 1px var(--koi-line); }
.game-shot { position: relative; display: block; min-height: 100%; }
.game-shot img { display: block; width: 100%; height: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.game-body { display: flex; flex-direction: column; gap: 12px; padding: 28px; }
.game-meta { margin: 0; font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--blood); }
.game h2 { margin: 0; font: 400 clamp(22px, 3vw, 30px)/1.2 Michroma, system-ui, sans-serif; color: var(--text-strong); }
.game-line { margin: 0; font-style: italic; color: var(--text); }
.game-facts { margin: 0; padding: 0; list-style: none; font-size: 14px; color: var(--text-muted); }
.game-facts li::before { content: '— '; color: var(--text-faint); }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: auto; padding-top: 8px; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 22px; border-radius: 10px; text-decoration: none;
  font: 13px Michroma, system-ui, sans-serif; letter-spacing: .14em; text-transform: uppercase; border: 1px solid var(--line-hi); color: var(--text); }
.btn-play { background: var(--btn-blood); border-color: var(--btn-blood-line); color: #ffffff; }
.btn-play:hover { background: var(--btn-blood-hi); }
.btn:not(.btn-play):hover { border-color: var(--text-muted); color: var(--text-strong); }
/* Installing happens on the game's own page (its manifest covers its folder): this opens it on the install guide.
   Phones and tablets only, and not when this page is itself running installed. */
.btn-install { display: none; }
@media (pointer: coarse) { .btn-install { display: inline-flex; } }
@media (display-mode: standalone), (display-mode: fullscreen) { .btn-install { display: none; } }

footer { padding: 24px 0 max(28px, env(safe-area-inset-bottom)); border-top: 1px solid var(--line); font-size: 14px; color: var(--text-faint); }
footer .wrap { display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: space-between; }
footer nav { display: flex; gap: 18px; }

.lost { padding: 96px 0; }

@media (max-width: 760px) {
  .intro { padding: 36px 0 20px; }
  .game { grid-template-columns: 1fr; }
  .game-body { padding: 22px; }
  .btn { flex: 1 1 auto; }
  .site { display: none; }
}

/* Phones held sideways: a short intro, and the card side by side again so its buttons are on the first screen. */
@media (max-height: 500px) and (min-width: 540px) {
  header { padding-block: max(10px, env(safe-area-inset-top)) 10px; }
  .intro { padding: 18px 0 12px; }
  .intro h1 { font-size: 24px; margin-bottom: 6px; }
  .intro p { font-size: 14px; line-height: 1.5; }
  .game { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); }
  .game-body { padding: 16px 18px; gap: 8px; }
  .game h2 { font-size: 20px; }
  .game-line, .game-facts { font-size: 13px; }
  .btn { min-height: 40px; padding: 0 14px; font-size: 11px; flex: 0 1 auto; }
  .site { display: none; }
}
/* Keep the page clear of the notch and the rounded corners when it's sideways. */
.wrap { padding-inline: env(safe-area-inset-left) env(safe-area-inset-right); }
