@font-face {
  font-family: "Acrom";
  src: url("/shared/fonts/acrom/Acrom-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Acrom";
  src: url("/shared/fonts/acrom/Acrom-Bold.ttf") format("truetype");
  font-weight: 700 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "e-Ukraine";
  src: url("/shared/fonts/e-ukraine/e-Ukraine-Regular.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "e-Ukraine";
  src: url("/shared/fonts/e-ukraine/e-Ukraine-Medium.otf") format("opentype");
  font-weight: 500 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --paper: #f4f0e8;
  --paper-strong: #fffaf1;
  --ink: #161616;
  --muted: #4f5654;
  --purple: #741278;
  --teal: #075b60;
  --brand: #0b6e7a;
  --object-shadow: 0 18px 34px rgba(20, 16, 10, 0.15);
  color-scheme: light;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  color: var(--ink);
  font-family: "e-Ukraine", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

img { max-width: 100%; display: block; }
a { color: inherit; }
[hidden] { display: none !important; }

.page-shell {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
}

.site-header,
.section-inner {
  width: min(1120px, calc(100vw - 32px));
  margin: 0 auto;
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.brand-name {
  font-family: "Acrom", sans-serif;
  color: var(--brand);
  font-size: 28px;
  font-weight: 900;
  line-height: 1;
}

.header-actions {
  --header-divider-gap: 20px;
  display: inline-flex;
  align-items: center;
  gap: 0;
}

.language-switcher {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  position: relative;
  margin-left: var(--header-divider-gap);
  padding-left: var(--header-divider-gap);
  min-height: 32px;
}

.language-switcher::before {
  content: "";
  position: absolute;
  left: 0;
  top: 4px;
  bottom: 4px;
  width: 1px;
  border-radius: 999px;
  background: rgba(22, 22, 22, 0.24);
}

.language-switcher a,
.language-switcher span {
  display: inline-grid;
  place-items: center;
  min-width: auto;
  height: auto;
  text-decoration: none;
  font-size: 23px;
  font-weight: 800;
  line-height: 1;
  color: var(--ink);
  opacity: 0.58;
  transition: color 160ms ease, opacity 160ms ease;
  cursor: pointer;
}

.language-switcher a:hover {
  color: var(--ink);
  opacity: 1;
}

.language-switcher [aria-current="page"] {
  color: var(--ink);
  opacity: 1;
  cursor: default;
}

.social-links {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.social-links a {
  overflow: hidden;
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 0;
  background: transparent;
  text-decoration: none;
  transition: opacity 160ms ease, transform 160ms ease;
}

.social-links img {
  /* Compensate for the transparent padding in the shared Unity sprites. */
  transform: scale(2.5);
  pointer-events: none;
  width: 23px;
  height: 23px;
  object-fit: contain;
}

.social-links a:hover {
  opacity: 0.72;
  transform: translateY(-1px);
}

.page-content {
  --home-columns-width: 464px;
  --home-columns-gap: clamp(28px, 7vw, 64px);
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 16px 48px;
  text-align: center;
}

.tagline {
  margin: 0;
  font-family: "Acrom", sans-serif;
  font-size: clamp(34px, 8vw, 58px);
  font-weight: 900;
  line-height: 1.1;
  color: var(--brand);
  white-space: nowrap;
}

.subtitle {
  margin: 14px 0 0;
  font-size: clamp(17px, 3vw, 24px);
  font-weight: 500;
  line-height: 1.4;
  color: var(--muted);
}

.games {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: min(100%, var(--home-columns-width));
  gap: var(--home-columns-gap);
  margin-top: clamp(38px, 7vw, 64px);
  align-items: flex-start;
  justify-content: center;
}

.game-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  transition: transform 200ms ease;
}

.game-link:hover {
  transform: translateY(-4px);
}

.game-icon {
  width: clamp(120px, 24vw, 200px);
  height: clamp(120px, 24vw, 200px);
  border-radius: 24%;
  box-shadow: var(--object-shadow);
  transition: box-shadow 200ms ease;
}

.game-link:hover .game-icon {
  box-shadow: 0 22px 44px rgba(20, 16, 10, 0.22);
}

.game-name {
  font-family: "Acrom", sans-serif;
  font-size: clamp(20px, 3.8vw, 30px);
  font-weight: 900;
  line-height: 1.1;
  color: var(--ink);
}

.game-copy {
  display: grid;
  gap: 4px;
  justify-items: center;
}

.game-desc {
  margin: 0;
  font-size: clamp(12px, 2vw, 15px);
  font-weight: 500;
  line-height: 1.4;
  color: var(--muted);
  max-width: 200px;
}

.site-footer {
  padding: 34px 0;
  background: var(--ink);
  color: white;
  font-size: 16px;
  font-weight: 800;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.site-footer .social-links a {
  background: transparent;
}

.site-footer .social-links img {
  filter: brightness(0) saturate(100%) invert(95%) sepia(8%) saturate(319%) hue-rotate(334deg) brightness(107%) contrast(95%);
}

@media (max-width: 520px) {
  .site-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "brand language"
      ". social";
    align-items: center;
    column-gap: 14px;
    row-gap: 11px;
    padding-top: 16px;
  }

  .header-actions {
    --header-divider-gap: 16px;
    width: 100%;
    display: contents;
  }

  .site-header .brand {
    grid-area: brand;
    min-width: 0;
  }

  .site-header .social-links {
    grid-area: social;
    justify-self: end;
    gap: 7px;
  }

  .site-header .social-links a {
    width: 24px;
    height: 28px;
  }

  .site-header .social-links img {
    width: 21px;
    height: 21px;
  }

  .site-header .social-links a[aria-label="Telegram"] img {
    width: 28px;
    height: 28px;
  }

  .site-header .language-switcher {
    grid-area: language;
    justify-self: end;
    margin-left: 0;
    padding-left: 0;
    gap: 8px;
  }

  .site-header .language-switcher::before {
    display: none;
  }

  .site-header .language-switcher > * + * {
    min-height: 26px;
    padding-left: 8px;
    border-left: 1px solid rgba(22, 22, 22, 0.24);
  }

  .page-content {
    --home-columns-gap: 24px;
  }

  .game-icon {
    border-radius: 22%;
  }

  .footer-inner {
    flex-direction: column;
    align-items: center;
  }

  .site-footer {
    padding: 24px 0;
  }

  .site-footer .social-links {
    gap: 7px;
  }

  .site-footer .social-links a {
    width: 24px;
    height: 28px;
  }

  .site-footer .social-links img {
    width: 21px;
    height: 21px;
  }

  .site-footer .social-links a[aria-label="Telegram"] img {
    width: 28px;
    height: 28px;
  }
}
