@font-face {
  font-family: "Fredoka";
  src: url("/assets/fonts/Fredoka-SemiBold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "DM Sans";
  src: url("/assets/fonts/DMSans-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "DM Sans";
  src: url("/assets/fonts/DMSans-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #14172b;
  --surface: #1d2140;
  --surface-2: #262b52;
  --line: #343a6b;
  --text: #f4f3fb;
  --muted: #b9bdd6;
  --accent: #ffb547;
  --joker: #a57bff;
  --radius: 16px;
  --gutter: 16px;
  --measure: 44rem;
  color-scheme: dark;
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  overflow-wrap: break-word;
}

h1,
h2,
h3 {
  font-family: "Fredoka", "DM Sans", system-ui, sans-serif;
  font-weight: 600;
  line-height: 1.2;
  margin: 0 0 0.5em;
}

h1 {
  font-size: clamp(2rem, 7vw, 2.75rem);
}

h2 {
  font-size: 1.5rem;
  margin-top: 2rem;
}

h3 {
  font-size: 1.15rem;
  margin-top: 1.25rem;
}

p,
ul,
ol,
dl {
  margin: 0 0 1rem;
}

ul,
ol {
  padding-left: 1.25rem;
}

li + li {
  margin-top: 0.35rem;
}

a {
  color: var(--accent);
  text-underline-offset: 0.18em;
}

a:hover {
  text-decoration-thickness: 2px;
}

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

img {
  max-width: 100%;
  height: auto;
}

code {
  font-size: 0.9em;
  background: var(--surface-2);
  padding: 0.1em 0.35em;
  border-radius: 6px;
}

/* Hidden on screen, still read by screen readers and search engines. */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  background: var(--accent);
  color: var(--bg);
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-weight: 700;
  z-index: 10;
}

.skip:focus {
  top: var(--gutter);
}

.wrap {
  width: 100%;
  max-width: calc(var(--measure) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* Header */

.site-header {
  border-bottom: 1px solid var(--line);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4rem;
}

.brand {
  font-family: "Fredoka", "DM Sans", system-ui, sans-serif;
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--text);
  text-decoration: none;
}

.lang {
  display: flex;
  gap: 0.25rem;
  font-size: 0.95rem;
  font-weight: 700;
}

.lang a,
.lang span {
  display: inline-block;
  padding: 0.45rem 0.7rem;
  min-width: 44px;
  text-align: center;
  border-radius: 999px;
  text-decoration: none;
}

.lang span {
  background: var(--surface-2);
  color: var(--text);
}

.lang a {
  color: var(--muted);
}

.lang a:hover {
  color: var(--accent);
}

main.wrap {
  padding-top: 2rem;
  padding-bottom: 4rem;
}

.lede {
  font-size: 1.15rem;
  color: var(--muted);
}

.muted {
  color: var(--muted);
}

/* Game card (home) */

.games {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0 0;
}

.game-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.game-card:hover {
  border-color: var(--joker);
}

.game-card picture {
  flex: none;
  line-height: 0;
}

.game-card img {
  width: 72px;
  height: 72px;
  border-radius: 18px;
}

.game-card h2,
.game-card h3 {
  margin: 0 0 0.2rem;
  font-size: 1.35rem;
}

.game-card p {
  margin: 0;
  color: var(--muted);
}

.game-card a {
  color: var(--text);
  text-decoration: none;
}

.game-card a::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
}

/* Game page */

.hero {
  text-align: center;
}

.hero .app-icon {
  width: 144px;
  height: 144px;
  border-radius: 32px;
  box-shadow: 0 0 0 1px var(--line), 0 12px 40px rgb(165 123 255 / 0.25);
  margin-bottom: 1rem;
}

.hero h1 {
  margin-bottom: 0.25rem;
}

.tag {
  display: inline-block;
  color: var(--joker);
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

.badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin: 1.5rem 0 0;
}

.badges a {
  display: inline-block;
  line-height: 0;
}

/* Visible badge height matches across stores: Apple's SVG is the badge itself,
   Google's PNG carries transparent padding (192 of its 250 px are the badge). */
.badge-apple {
  height: 48px;
  width: auto;
}

.badge-google {
  height: 62px;
  width: auto;
}

.features {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 0.75rem;
  margin: 2rem 0;
}

.features li {
  margin: 0;
  padding: 1rem 1rem 1rem 3rem;
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.features li::before {
  content: "";
  position: absolute;
  left: 1rem;
  top: 1.3rem;
  width: 1rem;
  height: 1rem;
  border-radius: 4px;
  background: var(--accent);
  box-shadow: 0.35rem 0.35rem 0 var(--joker);
}

.features strong {
  display: block;
  font-family: "Fredoka", "DM Sans", system-ui, sans-serif;
  font-weight: 600;
  font-size: 1.1rem;
}

.shots {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  list-style: none;
  padding: 0;
  margin: 1rem 0 2rem;
}

.shots li {
  margin: 0;
}

.shot {
  aspect-ratio: 9 / 19.5;
  display: grid;
  place-items: center;
  border-radius: 20px;
  border: 2px dashed var(--line);
  background: linear-gradient(160deg, var(--surface), var(--bg));
  color: var(--muted);
  font-size: 0.85rem;
  text-align: center;
  padding: 0.5rem;
}

.links {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.links li {
  margin: 0;
}

.links a {
  display: inline-block;
  padding: 0.6rem 1rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
}

.links a:hover {
  border-color: var(--accent);
}

/* Policy pages */

.doc h2 {
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 4px solid var(--joker);
  border-radius: var(--radius);
  padding: 1rem 1rem 0.25rem;
  margin: 1rem 0;
}

.card h3 {
  margin-top: 0;
}

.card dl {
  display: grid;
  gap: 0.25rem 0;
}

.card dt {
  font-weight: 700;
  color: var(--accent);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.card dd {
  margin: 0 0 0.6rem;
}

.summary {
  background: var(--surface-2);
  border-radius: var(--radius);
  padding: 1rem 1rem 0.25rem;
}

.meta {
  color: var(--muted);
  font-size: 0.95rem;
}

.ph {
  background: rgb(255 181 71 / 0.15);
  color: var(--accent);
  border: 1px dashed var(--accent);
  border-radius: 6px;
  padding: 0 0.3em;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.85em;
}

.button {
  display: inline-block;
  background: var(--accent);
  color: var(--bg);
  font-weight: 700;
  text-decoration: none;
  padding: 0.8rem 1.4rem;
  border-radius: 999px;
}

.button:hover {
  background: #ffc670;
}

/* FAQ */

details {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin: 0.75rem 0;
}

summary {
  cursor: pointer;
  padding: 1rem;
  font-weight: 700;
  list-style-position: inside;
}

details > div {
  padding: 0 1rem 0.25rem;
}

/* Footer */

.site-footer {
  border-top: 1px solid var(--line);
  padding: 1.5rem 0 2rem;
  font-size: 0.95rem;
  color: var(--muted);
}

.site-footer nav ul {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
}

.site-footer nav li {
  margin: 0;
}

.site-footer nav a {
  display: inline-block;
  padding: 0.35rem 0;
}

.site-footer p {
  margin: 0 0 0.5rem;
}

.fine {
  font-size: 0.8rem;
}

@media (min-width: 640px) {
  .shots {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .card dl {
    grid-template-columns: 9rem 1fr;
    gap: 0 1rem;
  }

  .card dd {
    margin-bottom: 0.6rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
