:root {
  --bg: #f7f9fc;
  --surface: #ffffff;
  --surface-strong: #edf4ff;
  --text: #172033;
  --muted: #637084;
  --line: #dce5f2;
  --primary: #2563eb;
  --primary-dark: #1747ad;
  --accent: #12b981;
  --warning: #f59e0b;
  --shadow: 0 18px 48px rgba(24, 39, 75, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    linear-gradient(180deg, #ffffff 0, var(--bg) 420px),
    var(--bg);
  font-family: "Google Sans", "Product Sans", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
}

a {
  color: var(--primary);
  text-decoration: none;
}

a:hover {
  color: var(--primary-dark);
}

.site-header,
.site-footer,
.hero,
.page {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  color: var(--text);
  font-weight: 800;
}

.brand-logo {
  display: block;
  width: auto;
  height: 80px;
  max-width: min(440px, 58vw);
  object-fit: contain;
}

.brand-fallback {
  color: var(--text);
  font-size: 1.05rem;
  line-height: 1;
  white-space: nowrap;
}

.language-switch {
  display: inline-flex;
  align-items: center;
}

.language-switch button {
  position: relative;
  min-width: 0;
  min-height: 0;
  padding: 0;
  border: 0;
  color: var(--muted);
  background: transparent;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
}

.language-switch button + button {
  margin-left: 18px;
}

.language-switch button + button::before {
  position: absolute;
  top: 50%;
  left: -11px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--muted);
  content: "";
  transform: translateY(-50%);
}

.language-switch button.is-active {
  color: var(--primary);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 460px);
  align-items: center;
  gap: 56px;
  padding: 40px 0 54px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0;
  max-width: 840px;
  font-size: 4.75rem;
  line-height: 0.98;
  letter-spacing: 0;
}

h2 {
  margin: 0 0 20px;
  font-size: 2.15rem;
  line-height: 1.1;
}

h3 {
  margin: 30px 0 8px;
  font-size: 1.15rem;
}

.lead {
  max-width: 680px;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: 1.2rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  margin-top: 32px;
  padding: 0 22px;
  border-radius: 8px;
  color: #ffffff;
  background: var(--primary);
  font-weight: 800;
  box-shadow: 0 14px 30px rgba(37, 99, 235, 0.24);
}

.button:hover {
  color: #ffffff;
  background: var(--primary-dark);
}

.hero-image {
  display: block;
  width: min(100%, 430px);
  justify-self: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  transform: rotate(-3deg);
  height: auto;
}

.site-footer {
  padding: 24px 0 36px;
  color: var(--muted);
  font-size: 0.92rem;
}

.games-section {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 54px 0 78px;
  border-top: 1px solid var(--line);
}

.game-card {
  display: grid;
  grid-template-columns: minmax(130px, 22%) minmax(0, 1fr);
  gap: 28px;
  align-items: center;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 14px 38px rgba(24, 39, 75, 0.08);
}

.game-card-image {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--surface-strong);
}

.game-card-copy h3 {
  margin-top: 0;
  font-size: 1.65rem;
}

.game-card-copy p {
  max-width: 560px;
  margin: 0;
  color: var(--muted);
}

.page {
  padding: 36px 0 72px;
}

.back-link {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  margin-bottom: 28px;
  font-weight: 800;
}

.game-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  padding: 36px 0 22px;
}

.game-hero .button {
  flex: 0 0 auto;
  margin-top: 0;
}

.section {
  margin-top: 56px;
}

.screenshot-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
  gap: 22px;
}

.screenshot {
  margin: 0;
}

.screenshot figcaption {
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.95rem;
}

.screenshot-image {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 14px 38px rgba(24, 39, 75, 0.1);
}

.text-panel {
  max-width: 820px;
}

.text-panel p {
  color: var(--muted);
}

.link-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.link-row a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  font-weight: 800;
}

.subtitle {
  margin: 14px 0 32px;
  color: var(--muted);
  font-size: 1.25rem;
  font-weight: 800;
}

.markdown-body {
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 12px 34px rgba(24, 39, 75, 0.08);
}

.markdown-body h2:first-child {
  margin-top: 0;
}

.markdown-body p,
.markdown-body li {
  color: var(--muted);
}

.markdown-body ul {
  padding-left: 22px;
}

@media (max-width: 760px) {
  .site-header {
    min-height: 64px;
  }

  .brand {
    font-size: 0.96rem;
  }

  .header-actions {
    gap: 12px;
  }

  .hero {
    min-height: auto;
    grid-template-columns: 1fr;
    gap: 30px;
    padding: 36px 0 50px;
  }

  .hero-image {
    max-width: 340px;
    justify-self: start;
  }

  .games-section {
    width: min(100% - 24px, 1120px);
    padding: 38px 0 56px;
  }

  .game-card {
    grid-template-columns: 1fr;
    padding: 14px;
  }

  .game-card-image {
    width: 50%;
  }

  .game-hero {
    display: block;
  }

  .game-hero .button {
    margin-top: 28px;
    width: 100%;
  }

  .screenshot-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .markdown-body {
    padding: 22px;
  }

  .site-header,
  .site-footer,
  .hero,
  .page {
    width: min(100% - 24px, 1120px);
  }

  h1 {
    font-size: 3.25rem;
  }

  h2 {
    font-size: 1.85rem;
  }

  .lead {
    font-size: 1.1rem;
  }
}

@media (max-width: 420px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
    padding: 14px 0;
  }

  .header-actions {
    width: 100%;
    justify-content: space-between;
  }

  .button,
  .link-row a {
    width: 100%;
  }

  .screenshot-grid {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: 2.45rem;
  }
}
