/*
 * Hellsplit: Labyrinth — game hub. Design: mockups/r3/claude/v4 (round 3).
 * One font: Jost (OFL, see LICENSE-jost-OFL.txt), self-hosted Latin subset.
 * Every text colour pair below is >= 4.5:1 (tests/test_site.py checks it).
 */
@font-face {
  font-family: "Jost";
  src: url("/fonts/jost-latin.woff2") format("woff2");
  font-weight: 300 500;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --bg: #000000;
  --fg: #ffffff;
  --plate: #0b0b0b;
  --plate-hover: #111111;
  --label: #8f8f8f;
  --label-hover: #dcdcdc;
  --small: #858585;
  --small-link: #a6a6a6;
  --small-size: 12px;
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--bg); }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--bg);
  color: var(--fg);
  font-family: "Jost", "Futura", "Century Gothic", sans-serif;
  -webkit-font-smoothing: antialiased;
}

main {
  flex: 1 0 auto;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 36px 24px 26px;
}

h1 { margin: 0; line-height: 0; }
.logo { display: block; height: min(31svh, 220px); width: auto; }
.home { display: block; line-height: 0; border-radius: 50%; }

.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
}

/* Store badges: plates with cut corners, like the stone segments of the emblem ring */
.stores {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: clamp(30px, 6.5svh, 64px);
}
.badge {
  --c: 11px;
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: 66px 1px 168px;   /* Steam logo 168 px wide = 51 px tall (Valve: >= 50 px) */
  column-gap: 15px;
  align-items: center;
  justify-content: center;
  width: 304px;
  height: 74px;
  text-decoration: none;
  color: var(--label);
  outline: none;
}
.badge::before,
.badge::after {
  content: "";
  position: absolute;
  z-index: -1;
  clip-path: polygon(
    var(--k) 0, calc(100% - var(--k)) 0, 100% var(--k),
    100% calc(100% - var(--k)), calc(100% - var(--k)) 100%,
    var(--k) 100%, 0 calc(100% - var(--k)), 0 var(--k));
  transition: background-color .3s ease;
}
.badge::before { inset: 0; --k: var(--c); background: rgb(255 255 255 / .19); }
.badge::after  { inset: 1px; --k: calc(var(--c) - .59px); background: var(--plate); }
.badge:hover::before { background: rgb(255 255 255 / .55); }
.badge:hover::after  { background: var(--plate-hover); }
.badge:focus-visible::before { background: var(--fg); }   /* visible focus: the whole frame turns white */

.label {
  font-size: 13px;
  font-weight: 400;
  line-height: 1;
  white-space: nowrap;
  transition: color .3s ease;
}
.badge:hover .label, .badge:focus-visible .label { color: var(--label-hover); }
.rule { width: 1px; height: 30px; background: rgb(255 255 255 / .14); }
.mark { display: flex; align-items: center; }
.mark img { display: block; width: 100%; height: auto; }

footer {
  width: 100%;
  padding: 0 20px max(20px, env(safe-area-inset-bottom));
  text-align: center;
  font-size: var(--small-size);
  font-weight: 400;
  line-height: 1.5;
  color: var(--small);
}
footer p { margin: 0 auto; max-width: 340px; text-wrap: balance; }
footer p + p { margin-top: 3px; }
footer a {
  display: inline-block;
  padding: 15px 4px;          /* >= 48 px tap target without moving the text */
  margin: -15px 0;
  color: var(--small-link);
  text-decoration: none;
  transition: color .2s;
}
footer a:hover { color: var(--fg); }
footer a:focus-visible, .home:focus-visible { outline: 1px solid var(--fg); outline-offset: 2px; }

/* Short phones (e.g. 320×568): keep everything on one screen */
@media (max-height: 600px) {
  main { padding: 20px 20px 14px; }
  .logo { height: 24svh; }
  .stores { margin-top: 22px; gap: 10px; }
  .badge { height: 66px; }
}

@media (min-width: 700px) {
  main { padding: 48px 40px 32px; }
  .logo { height: min(36svh, 340px); }
  .stores { flex-direction: row; gap: 16px; }
  .badge {
    --c: 12px;
    width: 316px;
    height: 80px;
    grid-template-columns: 70px 1px 176px;
    column-gap: 16px;
  }
  .label { font-size: 14px; }
  footer { padding-bottom: 28px; }
  footer p { max-width: 900px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}
