/* slovospad.com: цвета и шрифт игры. Цвета — знак «slovo / spad» (games/logo.html, тема «Звірі»):
   тёмно-коричневые буквы, рыжий «spad», тёплый фон с мягкими пятнами. Шрифт поля — Fixel (slovopad/fonts/). */
@font-face {
  font-family: "Fixel";
  src: url("/fonts/FixelVariable.ttf") format("truetype");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --ink: #2e1b12;
  --text: #3d2a20;
  --muted: #7a5f50;
  --accent: #cf5f22;
  --accent-ink: #b44d16;
  --top: #f6e8d8;
  --bottom: #ecc9a6;
  --b1: #f2ae72;
  --b2: #f8dfbd;
  --b3: #d99a86;
  --card: rgba(255, 250, 244, 0.62);
  --line: rgba(46, 27, 18, 0.12);
  --gutter: 20px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--bottom); }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: linear-gradient(var(--top), var(--bottom)) fixed;
  color: var(--text);
  font: 400 17px/1.6 "Fixel", system-ui, -apple-system, "Segoe UI", sans-serif;
  display: flex;
  flex-direction: column;
}

/* Фон игры: три мягких пятна, как на заставке */
.sky { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.sky i { position: absolute; border-radius: 50%; filter: blur(60px); opacity: 0.7; }
.sky i:nth-child(1) { width: 60vmax; aspect-ratio: 1; right: -22vmax; top: 18%; background: var(--b1); opacity: 0.5; }
.sky i:nth-child(2) { width: 64vmax; aspect-ratio: 1; left: -28vmax; top: -12vmax; background: var(--b2); }
.sky i:nth-child(3) { width: 60vmax; aspect-ratio: 1; left: 10%; bottom: -30vmax; background: var(--b3); opacity: 0.45; }

a { color: var(--accent-ink); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--ink); }

h1, h2 { color: var(--ink); line-height: 1.15; }
h1 { font-weight: 800; letter-spacing: -0.01em; }
h2 { font-weight: 700; font-size: 1.15rem; margin: 2em 0 0.4em; }

/* Шапка: знак и переключатель языка */
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  max-width: 760px;
  width: 100%;
  margin: 0 auto;
  padding: max(16px, env(safe-area-inset-top)) var(--gutter) 0;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 800;
  font-size: 19px;
}
.brand img { width: 36px; height: 36px; border-radius: 22.37%; box-shadow: 0 2px 8px rgba(46, 27, 18, 0.18); }
.brand .spad { color: var(--accent); }

.langs { display: inline-flex; gap: 4px; padding: 3px; border-radius: 999px; background: rgba(46, 27, 18, 0.07); }
.langs a {
  min-width: 46px;
  padding: 5px 12px;
  border-radius: 999px;
  color: var(--ink);
  text-align: center;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  line-height: 1.4;
}
.langs a[aria-current="true"] { background: var(--ink); color: #fbf6ef; }

main { flex: 1; width: 100%; max-width: 760px; margin: 0 auto; padding: 0 var(--gutter); }

/* Главная */
.hero { text-align: center; padding: 9vh 0 6vh; }
.hero .icon {
  width: 168px;
  height: 168px;
  border-radius: 22.37%;
  box-shadow: 0 18px 50px rgba(120, 60, 25, 0.28), 0 2px 6px rgba(46, 27, 18, 0.15);
}
.hero h1 { font-size: clamp(40px, 9vw, 60px); margin: 28px 0 12px; }
.hero p { max-width: 30em; margin: 0 auto; font-size: 19px; }
.soon {
  display: inline-block;
  margin-top: 28px;
  padding: 9px 20px;
  border-radius: 999px;
  border: 1.5px solid rgba(46, 27, 18, 0.35);
  color: var(--ink);
  font-weight: 600;
  font-size: 16px;
}

/* Политика и поддержка */
.doc {
  margin: 28px 0 20px;
  padding: 26px 26px 30px;
  border-radius: 22px;
  background: var(--card);
  border: 1px solid var(--line);
}
.doc h1 { font-size: clamp(28px, 6vw, 36px); margin: 0 0 6px; }
.doc ul { padding-left: 1.2em; }
.doc li { margin: 0.35em 0; }
.updated { color: var(--muted); font-size: 15px; margin-top: 0; }
.mail {
  display: inline-block;
  margin: 6px 0 4px;
  padding: 12px 22px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 18px;
  overflow-wrap: anywhere;
}
.mail:hover { background: var(--accent-ink); color: #fff; }

footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 22px;
  padding: 24px var(--gutter) max(26px, env(safe-area-inset-bottom));
  color: var(--muted);
  font-size: 15px;
}
footer a { color: var(--muted); }

/* Два языка на странице. Скрипт lang.js ставит data-lang до показа; без скрипта видны оба. */
html[data-lang="uk"] [lang="en"]:not(html),
html[data-lang="en"] [lang="uk"]:not(html) { display: none !important; }

@media (max-width: 480px) {
  :root { --gutter: 16px; }
  body { font-size: 16px; }
  .doc { padding: 20px 18px 24px; border-radius: 18px; }
  .hero { padding-top: 7vh; }
  .hero .icon { width: 136px; height: 136px; }
  .hero p { font-size: 17px; }
}

/* Слова через дефис не рвём на конце строки */
.nw { white-space: nowrap; }
