/* Fommi promo site — палитра и типографика из спеки 016 */

:root {
  --bg: #FFF8EC;
  --text: #3B2E22;
  --muted: #7A6A5A;
  --white: #FFFFFF;
  --border: #E3D9CB;
  --shadow: #D9CDB8;

  --explore-bg: #FFF0D2;  --explore-ac: #F0930E;
  --quiz-bg: #E8F4DC;     --quiz-ac: #5FB14A;
  --alphabet-bg: #DFF1F8; --alphabet-ac: #219EBC;
  --lquiz-bg: #F0E9FA;    --lquiz-ac: #7B5FCB;

  --danger-bg: #FFE0D2;   --danger-ac: #E4572E;
  --food-bg: #FFE6E0;     --food-ac: #EF6F4E;
  --color-bg: #FDE8F2;    --color-ac: #D64F8E;

  --gold: #FFC93C;
  --gold-border: #E8961E;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Nunito', 'Segoe UI', system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.6;
}

img { max-width: 100%; height: auto; }
a { color: var(--alphabet-ac); }

.wrap { max-width: 1060px; margin: 0 auto; padding: 0 20px; }

/* ---------- Шапка ---------- */

header {
  background: var(--bg);
  border-bottom: 3px solid var(--border);
}

.topbar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 0;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  font-weight: 800;
  font-size: 26px;
}

.logo img { width: 44px; height: 44px; border-radius: 12px; }

.topbar nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.topbar nav a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 700;
}

.topbar nav a:hover { color: var(--text); }

/* Переключатель языка: шесть локалей (спека 019 §10) — шесть полноразмерных
   пилюль не помещаются в шапку, поэтому в группе они мельче. */
.langs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.langs .lang {
  padding: 4px 11px;
  font-size: 14px;
  border-width: 2px;
  box-shadow: 0 3px 0 var(--shadow);
}

.langs .lang.current {
  background: var(--explore-bg);
  border-color: var(--explore-ac);
  color: var(--explore-ac) !important;
}

.lang {
  background: var(--white);
  border: 3px solid var(--border);
  box-shadow: 0 4px 0 var(--shadow);
  border-radius: 999px;
  padding: 5px 16px;
  font-weight: 800;
  color: var(--text) !important;
  text-decoration: none;
}

/* ---------- Хиро ---------- */

.hero {
  background: linear-gradient(160deg, #FFE7AE 0%, #FFF3D2 45%, var(--bg) 100%);
  overflow: hidden;
}

.hero .wrap {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 32px;
  align-items: center;
  padding-top: 48px;
  padding-bottom: 48px;
}

.hero h1 {
  font-size: 46px;
  font-weight: 800;
  line-height: 1.15;
  margin: 0 0 16px;
}

.hero h1 span { color: var(--explore-ac); }

.hero p.lead {
  font-size: 20px;
  color: var(--muted);
  margin: 0 0 28px;
}

.hero .mascot { text-align: center; }
.hero .mascot img { width: min(340px, 80%); filter: drop-shadow(0 10px 24px rgba(59, 46, 34, .18)); }

/* Кнопки сторов */

.stores { display: flex; gap: 14px; flex-wrap: wrap; }

.store {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--text);
  color: var(--white);
  text-decoration: none;
  border-radius: 14px;
  padding: 10px 18px;
  box-shadow: 0 4px 0 rgba(59, 46, 34, .35);
}

.store[hidden] { display: none; }
.store svg { width: 26px; height: 26px; flex: none; }

.store small { display: block; font-size: 11px; opacity: .75; line-height: 1.2; }
.store b { display: block; font-size: 17px; line-height: 1.25; }

.soon {
  margin-top: 12px;
  font-size: 14px;
  color: var(--muted);
}

/* ---------- Секции ---------- */

section { padding: 56px 0; }

h2 {
  font-size: 34px;
  font-weight: 800;
  text-align: center;
  margin: 0 0 10px;
}

.sub {
  text-align: center;
  color: var(--muted);
  max-width: 640px;
  margin: 0 auto 40px;
}

/* Режимы */

.modes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 22px;
}

.mode {
  border-radius: 26px;
  padding: 26px 22px;
  text-align: center;
}

.mode img { width: 130px; height: 130px; object-fit: contain; }

.mode h3 { font-size: 21px; font-weight: 800; margin: 12px 0 8px; }
.mode p { margin: 0; color: var(--muted); font-size: 15.5px; }

.mode.explore  { background: var(--explore-bg); }
.mode.explore h3 { color: var(--explore-ac); }
.mode.quiz     { background: var(--quiz-bg); }
.mode.quiz h3 { color: var(--quiz-ac); }
.mode.alphabet { background: var(--alphabet-bg); }
.mode.alphabet h3 { color: var(--alphabet-ac); }
.mode.lquiz    { background: var(--lquiz-bg); }
.mode.lquiz h3 { color: var(--lquiz-ac); }

/* Скриншоты */

.shots {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 18px;
}

.shot { text-align: center; }

.shot img {
  display: block;
  width: 100%;
  border-radius: 22px;
  border: 3px solid var(--border);
  box-shadow: 0 5px 0 var(--shadow);
  background: var(--bg);
}

.shot p {
  margin: 12px 0 0;
  font-weight: 800;
  font-size: 15px;
  color: var(--muted);
}

/* Опасно/безопасно */

.danger-band { background: var(--danger-bg); }

.danger-band .wrap {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 40px;
  align-items: center;
}

.danger-band img { width: 220px; }

.danger-band h2 { text-align: left; color: var(--danger-ac); }
.danger-band p { margin: 0 0 12px; max-width: 560px; }

/* Что внутри */

.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 22px;
}

.fact {
  background: var(--white);
  border: 3px solid var(--border);
  border-radius: 26px;
  padding: 24px;
  text-align: center;
}

.fact .big {
  font-size: 40px;
  font-weight: 800;
  line-height: 1.1;
  display: block;
}

.fact p { margin: 8px 0 0; color: var(--muted); font-size: 15.5px; }

.fact:nth-child(1) .big { color: var(--explore-ac); }
.fact:nth-child(2) .big { color: var(--quiz-ac); }
.fact:nth-child(3) .big { color: var(--alphabet-ac); }
.fact:nth-child(4) .big { color: var(--lquiz-ac); }

.cats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-top: 34px;
}

.cat {
  border-radius: 999px;
  padding: 7px 18px;
  font-weight: 800;
  font-size: 15px;
}

/* Родителям (тизер) */

.parents-teaser {
  background: var(--white);
  border: 3px solid var(--border);
  border-radius: 26px;
  padding: 36px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 32px;
  align-items: center;
}

.parents-teaser img { width: 170px; }
.parents-teaser h2 { text-align: left; margin-top: 0; }
.parents-teaser ul { margin: 0 0 18px; padding-left: 22px; color: var(--muted); }
.parents-teaser li { margin: 4px 0; }

.btn {
  display: inline-block;
  background: var(--explore-ac);
  color: var(--white);
  text-decoration: none;
  font-weight: 800;
  border-radius: 999px;
  padding: 12px 28px;
  box-shadow: 0 4px 0 #C77607;
}

/* ---------- Футер ---------- */

footer {
  border-top: 3px solid var(--border);
  padding: 32px 0 44px;
  color: var(--muted);
  font-size: 15px;
}

footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
  align-items: center;
}

footer a { color: var(--muted); }
footer .copy { margin-left: auto; }

/* ---------- Текстовые страницы ---------- */

.doc { max-width: 760px; margin: 0 auto; padding: 40px 20px 72px; }
.doc h1 { font-size: 36px; font-weight: 800; line-height: 1.2; }
.doc h2 { text-align: left; font-size: 24px; margin-top: 36px; }
.doc .updated { color: var(--muted); font-size: 15px; }
.doc ul { padding-left: 22px; }
.doc li { margin: 6px 0; }

/* ---------- Мобильная вёрстка ---------- */

@media (max-width: 760px) {
  .hero .wrap { grid-template-columns: 1fr; text-align: center; }
  .shots {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 12px;
  }
  .shot { flex: 0 0 58%; scroll-snap-align: center; }
  .hero h1 { font-size: 34px; }
  .stores { justify-content: center; }
  .hero .mascot { order: -1; }
  .hero .mascot img { width: min(240px, 65%); }
  .danger-band .wrap { grid-template-columns: 1fr; text-align: center; }
  .danger-band img { margin: 0 auto; }
  .danger-band h2 { text-align: center; }
  .parents-teaser { grid-template-columns: 1fr; text-align: center; }
  .parents-teaser img { margin: 0 auto; }
  .parents-teaser h2 { text-align: center; }
  .topbar nav { gap: 12px; font-size: 15px; }
  /* Шесть языков в ряд на телефоне не помещаются и наезжали на логотип
     (спека 019 §10): на узком экране шапка складывается в две строки. */
  .topbar { flex-wrap: wrap; justify-content: center; }
  .topbar nav { margin-left: 0; width: 100%; justify-content: center; }
  .langs { justify-content: center; }
}
