/* Shared styles for the app web pages. Replace the colour tokens with the app theme (light + dark). */
/* Language hiding is done by site.js (one injected rule), not here. */
:root {
  --bg: #f7f8fa;
  --bg-2: #e4ecfc;
  --card: #ffffff;
  --line: #d3d8df;
  --text: #1a1d23;
  --muted: #5f6773;
  --accent: #2f6feb;
  --accent-ink: #fff;
  --warm: #f2a93b;
  --shadow: 0 10px 30px rgba(26, 29, 35, 0.1);
  --radius: 20px;
  color-scheme: light;
  --font: 'Nunito'; /* use the app font; Google Fonts link must include every script (cyrillic, vietnamese…) */
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121418;
    --bg-2: #17213a;
    --card: #1c1f25;
    --line: #363b44;
    --text: #eceef2;
    --muted: #9aa2ae;
    --accent: #5b8ff5;
    --accent-ink: #0b1530;
    --warm: #f2b451;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
    color-scheme: dark;
  }
}

* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font:
    16px/1.65 var(--font),
    system-ui,
    -apple-system,
    'Segoe UI',
    Roboto,
    sans-serif;
  -webkit-font-smoothing: antialiased;
}
a {
  color: var(--accent);
  font-weight: 700;
  text-underline-offset: 3px;
}
img {
  max-width: 100%;
  height: auto;
  display: block;
}
:focus-visible {
  outline: 3px solid var(--warm);
  outline-offset: 2px;
  border-radius: 8px;
}
.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 16px;
}
.narrow {
  max-width: 780px;
}

/* Header */
.top {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.top .wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 60px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-weight: 900;
  min-width: 0;
}
.brand img {
  width: 34px;
  height: 34px;
  border-radius: 9px;
}
.brand span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.top nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 4px;
}
.top nav a.link {
  padding: 6px 10px;
  border-radius: 10px;
  color: var(--muted);
  text-decoration: none;
  font-size: 15px;
}
.top nav a.link:hover {
  color: var(--text);
  background: var(--card);
}
@media (max-width: 640px) {
  .top nav a.link {
    display: none;
  }
}

.lang {
  display: inline-flex;
  padding: 3px;
  gap: 2px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px;
}
.lang button {
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.03em;
  min-width: 40px;
  min-height: 32px;
  padding: 0 10px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.lang button:hover {
  color: var(--text);
}
.lang button[aria-pressed='true'] {
  background: var(--accent);
  color: var(--accent-ink);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  min-height: 52px;
  border-radius: 16px;
  background: var(--text);
  color: var(--bg);
  text-decoration: none;
  font-weight: 800;
  line-height: 1.15;
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease;
}
.btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.btn svg {
  width: 24px;
  height: 24px;
  flex: none;
}
.btn small {
  display: block;
  font-size: 11px;
  font-weight: 700;
  opacity: 0.75;
}
.btn.ghost {
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--line);
}

/* Landing */
.hero {
  background: linear-gradient(180deg, var(--bg-2), var(--bg));
  padding: 48px 0 56px;
  overflow: hidden;
}
.hero .wrap {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 40px;
  align-items: center;
}
.hero h1 {
  font-size: clamp(34px, 5vw, 54px);
  line-height: 1.08;
  margin: 12px 0 14px;
  font-weight: 900;
  letter-spacing: -0.01em;
}
.hero p.lead {
  font-size: 19px;
  color: var(--muted);
  margin: 0 0 26px;
  max-width: 34em;
}
.pill {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--card);
  border: 1px solid var(--line);
  font-size: 14px;
  font-weight: 800;
  color: var(--accent);
}
.cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.hero-art {
  justify-self: center;
  width: min(300px, 72vw);
  border-radius: 28px;
  box-shadow: var(--shadow);
  border: 4px solid var(--card);
  transform: rotate(1.5deg);
}
.facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin-top: 22px;
  color: var(--muted);
  font-size: 15px;
  font-weight: 700;
}
@media (max-width: 820px) {
  .hero {
    padding-top: 28px;
  }
  .hero .wrap {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .hero-art {
    transform: none;
  }
}

section.block {
  padding: 56px 0;
}
section.block h2 {
  font-size: clamp(26px, 3.4vw, 36px);
  font-weight: 900;
  margin: 0 0 8px;
  line-height: 1.2;
}
section.block p.sub {
  color: var(--muted);
  margin: 0 0 28px;
  font-size: 17px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 16px;
}
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
}
.card .ico {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-size: 26px;
  background: var(--bg-2);
  margin-bottom: 12px;
}
.card h3 {
  margin: 0 0 6px;
  font-size: 18px;
  font-weight: 800;
}
.card p {
  margin: 0;
  color: var(--muted);
}

.shots {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: min(240px, 62vw);
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 4px 4px 16px;
  margin: 0 -4px;
  scrollbar-width: thin;
}
.shots img {
  width: 100%;
  aspect-ratio: 416 / 900;
  object-fit: cover;
  border-radius: 22px;
  scroll-snap-align: start;
  box-shadow: var(--shadow);
  background: var(--bg-2);
}

.support {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
@media (max-width: 720px) {
  .support {
    grid-template-columns: 1fr;
  }
}
.support ol {
  margin: 8px 0 0;
  padding-left: 20px;
  color: var(--muted);
}
details {
  border-top: 1px solid var(--line);
  padding: 12px 0;
}
details:first-of-type {
  border-top: 0;
}
summary {
  cursor: pointer;
  font-weight: 800;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
summary::-webkit-details-marker {
  display: none;
}
summary::after {
  content: '+';
  color: var(--accent);
  font-weight: 900;
}
details[open] summary::after {
  content: '–';
}
details p {
  margin: 8px 0 0;
  color: var(--muted);
}

/* Legal pages */
.doc {
  padding: 32px 0 40px;
}
.doc article {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 8px clamp(18px, 4vw, 40px) 28px;
  box-shadow: var(--shadow);
}
.doc h1 {
  font-size: clamp(26px, 4vw, 34px);
  line-height: 1.2;
  font-weight: 900;
  margin: 24px 0 6px;
}
.doc h2 {
  font-size: 19px;
  margin: 28px 0 6px;
  font-weight: 800;
}
.doc ol li {
  margin-bottom: 10px;
}
.muted {
  color: var(--muted);
}
.doc .meta {
  font-size: 14px;
  color: var(--muted);
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

/* Footer */
footer {
  border-top: 1px solid var(--line);
  padding: 28px 0 40px;
  color: var(--muted);
  font-size: 14px;
}
footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  align-items: center;
  justify-content: space-between;
}
footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
}
footer a {
  color: var(--muted);
  font-weight: 700;
  text-decoration: none;
}
footer a:hover {
  color: var(--text);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .btn {
    transition: none;
  }
  .btn:hover {
    transform: none;
  }
}
.doc article + article {
  margin-top: 24px;
}
[hidden] {
  display: none !important;
}
/* Store link still {{...}} in config.js and no data-hide-empty: the button turns into a "Coming soon" label. */
.btn:not([href]) {
  background: transparent;
  color: var(--muted);
  border: 1px dashed var(--line);
  cursor: default;
}
.btn:not([href]):hover {
  transform: none;
  box-shadow: none;
}
.btn[href] .soon,
.btn:not([href]) .get {
  display: none;
}

/* More games from the studio (cards rendered by ../more-games.js, see templates/studio/) */
.more-games {
  margin-top: 20px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}
.mg-card {
  display: grid;
  grid-template-columns: 56px 1fr;
  grid-template-rows: auto 1fr;
  gap: 4px 14px;
  align-items: start;
  padding: 16px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  text-decoration: none;
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease;
}
.mg-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.mg-icon {
  grid-row: 1 / 3;
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-size: 30px;
  background: var(--bg-2);
  object-fit: cover;
}
.mg-text {
  color: var(--muted);
  font-weight: 500;
  font-size: 14px;
  line-height: 1.45;
}

/* Six language buttons: tighter on phones so the brand keeps some room. */
@media (max-width: 480px) {
  .top .wrap {
    gap: 8px;
  }
  .brand > span {
    display: none;
  }
  .lang button {
    min-width: 34px;
    padding: 0 6px;
    font-size: 12px;
  }
}
