/* Voxtrics Games: one stylesheet for every page. Colours are the game's own (ui/kit.gd in aktualno). */

:root {
  color-scheme: light dark;
  --bg: #f2f1dd;
  --surface: #e8e7c3;
  --card: #f9f9f0;
  --line: #cdcd9e;
  --ink: #0f0f1d;
  --muted: #666658;
  --brand: #2049b7;
  --brand-ink: #ffffff;
  --brand-soft: #d6e8f2;
  --accent: #a6530f;
  --edge: #2b2a33;
  --radius: 10px;
  --wrap: 880px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans", "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1b1a21;
    --surface: #24232c;
    --card: #2a2932;
    --line: #3b3946;
    --ink: #ece9e1;
    --muted: #a9a6b3;
    --brand: #8fb4ea;
    --brand-ink: #10131c;
    --brand-soft: #24324d;
    --accent: #e3a36b;
    --edge: #0c0c12;
  }
}

* { box-sizing: border-box; }
/* hidden wins over a class's display (.btn is inline-block). */
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.6 var(--font);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--brand); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }

img { max-width: 100%; height: auto; }
.pixel { image-rendering: pixelated; image-rendering: crisp-edges; }

h1, h2, h3 { line-height: 1.2; margin: 0; }
h1 { font-size: clamp(28px, 6vw, 40px); letter-spacing: -0.01em; }
h2 { font-size: 22px; margin: 40px 0 12px; }
h3 { font-size: 17px; margin: 22px 0 6px; }
p { margin: 0 0 12px; }
ul { margin: 0 0 12px; padding-left: 20px; }
li { margin: 4px 0; }

/* Which language shows on the all-languages pages: l10n.css, generated by tools/build.py. */

/* Korean breaks lines between words, not inside them. */
:lang(ko) { word-break: keep-all; }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 16px;
}

/* --- Top bar ------------------------------------------------------------- */

.top {
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}
.top .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 56px;
}
.brand {
  font-weight: 800;
  font-size: 18px;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}
.brand b { color: var(--brand); }

/* The language menu needs JavaScript, so it only shows with it. */
.lang { display: none; align-items: center; gap: 6px; color: var(--muted); }
.js .lang { display: flex; }
.lang select {
  font: 600 14px/1.2 var(--font);
  color: var(--ink);
  background: var(--card);
  /* --muted, not --line: a control's edge needs 3:1 against the page (5.1:1 light, 7.2:1 dark). */
  border: 1px solid var(--muted);
  border-radius: 8px;
  padding: 6px 8px;
  cursor: pointer;
}
/* A finger needs a 44px target. */
@media (pointer: coarse) { .lang select { min-height: 44px; } }

main { flex: 1; padding: 32px 0 56px; }

/* --- Bits ---------------------------------------------------------------- */

.lead { font-size: 18px; color: var(--muted); max-width: 640px; }

.muted { color: var(--muted); }
.small { font-size: 14px; }

.crumbs { font-size: 14px; margin-bottom: 18px; color: var(--muted); }
.crumbs a { color: var(--muted); }

.btn {
  display: inline-block;
  font: 700 16px/1 var(--font);
  text-decoration: none;
  color: var(--brand-ink);
  background: var(--brand);
  border: 2px solid var(--edge);
  border-radius: 6px;
  box-shadow: 0 3px 0 var(--edge);
  padding: 12px 18px;
}
button.btn { cursor: pointer; }
.btn:disabled { opacity: 0.6; cursor: progress; }
.btn:hover { filter: brightness(1.08); text-decoration: none; }
.btn:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--edge); }
.btn.plain { color: var(--ink); background: var(--card); }

.row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
}

.badge {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
}
.badge.soon { background: var(--brand-soft); border-color: transparent; }

/* --- Home ---------------------------------------------------------------- */

.hello { margin-bottom: 32px; }
.hello h1 { margin-bottom: 10px; }

/* The capsule art keeps its whole picture: full width on top, the text under it. */
.game { overflow: hidden; padding: 0; }
.game > img { display: block; width: 100%; height: auto; border-bottom: 1px solid var(--line); }
.game .body { padding: 20px; }
.game h2 { margin: 0; }
.game .sub { color: var(--muted); font-weight: 600; margin: 2px 0 12px; }
.game .row { margin-top: 16px; }
@media (min-width: 760px) { .game .body { padding: 24px 28px 28px; } }

.hello .lead { margin-bottom: 6px; }
.hello .studio { margin: 0 0 14px; font-weight: 600; }
.badge.made { display: inline-flex; align-items: center; gap: 8px; }
.badge.made svg { flex: none; border: 1px solid var(--line); border-radius: 2px; }

/* A peek into the game: screenshots with their captions, side by side and scrolling. */
.look figure { flex: none; width: 210px; margin: 0; scroll-snap-align: start; }
.look figure img { width: 100%; display: block; }
.look figcaption { margin-top: 8px; font-size: 13px; color: var(--muted); }
@media (max-width: 480px) { .look figure { width: 62vw; } }

/* Who the game is for, and where to play it: cards in a grid. */
.audience, .where { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .audience, .where { grid-template-columns: 1fr 1fr; } }
@media (min-width: 900px) { .audience, .where { grid-template-columns: 1fr 1fr 1fr; } }
.audience h3, .where h3 { margin: 0 0 6px; font-size: 17px; }
.audience p { margin: 0; color: var(--muted); }
.where p { margin: 0 0 12px; }

.about > p { max-width: 700px; }

.contact > p { margin: 0 0 16px; }

/* The feedback form (public/feedback.js): a button, the survey under it once pressed, a note on what
   it sends. Without JavaScript the button and the note stay hidden. */
html:not(.js) .fb-js { display: none !important; }
.card + .fb { margin-top: 16px; }
.fb-form { margin-top: 20px; padding-top: 4px; border-top: 1px solid var(--line); }
.fb-note { margin: 12px 0 0; max-width: 700px; }
.fb-error { margin: 12px 0 0; color: var(--accent); font-weight: 600; }

/* --- Game page ----------------------------------------------------------- */

.hero {
  display: block;
  width: 100%;
  border: 2px solid var(--edge);
  border-radius: var(--radius);
  box-shadow: 0 4px 0 var(--edge);
  margin-bottom: 28px;
}

.title { display: flex; gap: 16px; align-items: center; margin-bottom: 14px; }
.title img { width: 72px; height: 72px; border-radius: 16px; border: 2px solid var(--edge); flex: none; }
.title p { margin: 4px 0 0; color: var(--muted); font-size: 18px; }

.platforms { margin: 18px 0 8px; }

.shots {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 4px 2px 14px;
  margin: 0 -2px;
  -webkit-overflow-scrolling: touch;
}
.shots img {
  flex: none;
  width: 210px;
  aspect-ratio: 460 / 1000;
  object-fit: cover;
  border-radius: 12px;
  border: 2px solid var(--edge);
  background: var(--surface);
  scroll-snap-align: start;
}
@media (max-width: 480px) { .shots img { width: 62vw; } }

.features {
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr;
}
@media (min-width: 640px) { .features { grid-template-columns: 1fr 1fr; } }
.features .card h3 { margin-top: 0; color: var(--brand); font-size: 14px; letter-spacing: 0.06em; text-transform: uppercase; }
.features ul { margin: 0; }

.facts { display: grid; gap: 8px; padding: 0; list-style: none; }
.facts li { padding-left: 26px; position: relative; margin: 0; }
.facts li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 0.55em;
  width: 10px;
  height: 10px;
  background: var(--accent);
  border: 2px solid var(--edge);
}

/* --- Text pages (support, privacy) --------------------------------------- */

.text { max-width: 700px; }
.text h1 { margin-bottom: 10px; }

.mail {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  align-items: center;
  justify-content: space-between;
  margin: 20px 0 8px;
}
.mail a.addr { font-size: 20px; font-weight: 700; }

details {
  border-top: 1px solid var(--line);
  padding: 14px 0;
}
details:last-of-type { border-bottom: 1px solid var(--line); }
summary {
  cursor: pointer;
  font-weight: 700;
  list-style-position: outside;
}
details > div { padding-top: 8px; }
details p:last-child { margin-bottom: 0; }

.langnav {
  font-size: 14px;
  line-height: 2;
  margin: 18px 0 8px;
  padding: 10px 14px;
  background: var(--surface);
  border-radius: var(--radius);
}
/* Without JavaScript the policy shows in every language, one after another, with links to each. */
.js .langnav { display: none; }
.policy section { scroll-margin-top: 12px; }
.policy .l10n + .l10n > section { border-top: 1px solid var(--line); margin-top: 32px; padding-top: 24px; }
.policy h1 { margin-bottom: 6px; }
.policy .upd { color: var(--muted); font-size: 14px; }
.policy p { overflow-wrap: anywhere; }

/* --- Footer -------------------------------------------------------------- */

.foot {
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
  padding: 20px 0 28px;
}
.foot .wrap { display: flex; flex-wrap: wrap; gap: 6px 18px; justify-content: space-between; }
.foot a { color: var(--muted); }
.foot nav { display: flex; flex-wrap: wrap; gap: 6px 16px; }
/* The company behind the site, on a line of its own under the rest. */
.foot .legal { flex-basis: 100%; font-size: 13px; }
