/* Manaraga Games. Все ресурсы локальные: ни одного запроса на чужие серверы. */

@font-face {
  font-family: "Nunito";
  src: url("fonts/Nunito.ttf") format("truetype");
  font-weight: 200 1000;
  font-style: normal;
  font-display: swap;
}

/* ---------- Оформление: тёплая бумага, тушь, фирменная мята; коралл только для главной кнопки ---------- */

:root {
  --bg: #fff8ee;          /* бумага */
  --bg-2: #e3f5ea;        /* светлая мята */
  --surface: #ffffff;
  --ink: #2e3438;         /* тушь */
  --ink-soft: #5b656b;
  --mint: #94dbb5;        /* фирменный, цвет персонажа */
  --pine: #1f6f5c;        /* хвоя: ссылки и мелкие акценты */
  --primary: #ff7a59;     /* коралл */
  --primary-ink: #2e3438;
  --sun: #ffc94a;
  --accent: #1f6f5c;
  --line: #2e3438;
  --chip: #e3f5ea;
  --shadow: 6px 6px 0 #2e3438;
  --border-w: 3px;
  --radius: 22px;
  --font: "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-head: var(--font);
}

/* ---------- Основа ---------- */

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 18px;
  line-height: 1.6;
  font-weight: 500;
  /* подвал прижат к низу окна даже на короткой странице (404, сведения о владельце) */
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

body > main { flex: 1 0 auto; }
body > .top, body > .foot { flex: none; }

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

a { color: inherit; text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:focus-visible, .lang a:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

h1, h2, h3 { font-family: var(--font-head); line-height: 1.15; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(34px, 6vw, 60px); font-weight: 900; letter-spacing: -0.01em; }
h2 { font-size: clamp(26px, 4vw, 38px); font-weight: 900; }
h3 { font-size: 21px; font-weight: 800; }
p { margin: 0; }

.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 20px; }

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

.top { position: relative; z-index: 2; }
.top .wrap { display: flex; align-items: center; gap: 16px; padding-top: 16px; padding-bottom: 16px; flex-wrap: wrap; }

.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; margin-right: auto; }
.brand img { width: 64px; }
.brand-name { display: flex; flex-direction: column; line-height: 1; font-family: var(--font-head); }
.brand-name b { font-size: 24px; font-weight: 900; }
.brand-name span { font-size: 12px; font-weight: 800; letter-spacing: 0.32em; margin-top: 5px; color: var(--ink-soft); }

.nav { display: flex; gap: 6px; flex-wrap: wrap; }
.nav a { text-decoration: none; font-weight: 800; padding: 8px 12px; border-radius: 999px; }
.nav a:hover, .nav a[aria-current="page"] { background: var(--chip); }

.lang { display: flex; border-radius: 999px; background: var(--chip); padding: 4px; border: var(--border-w) solid var(--line); }
.lang a { text-decoration: none; font-weight: 800; font-size: 15px; padding: 4px 12px; border-radius: 999px; }
.lang a[aria-current="true"] { background: var(--ink); color: var(--bg); }

/* ---------- Первый экран ---------- */

.hero .wrap { padding-top: 12px; padding-bottom: 28px; max-width: 820px; text-align: center; }
.hero-logo { width: min(420px, 78vw); margin: 16px auto 24px; }
.hero p { font-size: clamp(18px, 2.4vw, 22px); margin-top: 18px; }
.promise { font-family: var(--font-head); font-weight: 900; font-size: clamp(20px, 3vw, 26px); color: var(--pine); }
.hero p.story { color: var(--ink-soft); font-size: 17px; }

.trust { list-style: none; margin: 28px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.trust li { background: var(--mint); border: var(--border-w) solid var(--line); border-radius: 18px; padding: 14px 10px; font-weight: 900; font-size: 17px; line-height: 1.25; text-align: center; }

/* ---------- Карточка игры ---------- */

section { padding: 56px 0; }
.eyebrow { font-weight: 900; font-size: 14px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 10px; }

.game {
  background: var(--surface);
  border: var(--border-w) solid var(--line);
  border-radius: calc(var(--radius) + 8px);
  box-shadow: var(--shadow);
  padding: clamp(20px, 4vw, 40px);
}
.game-head { display: grid; grid-template-columns: 112px 1fr; gap: 20px; align-items: center; }
.game-icon { width: 112px; height: 112px; border-radius: 26px; object-fit: cover; border: var(--border-w) solid var(--line); }
.game-head p { color: var(--ink-soft); margin-top: 8px; }

.facts { list-style: none; padding: 0; margin: 24px 0 0; display: flex; flex-wrap: wrap; gap: 10px; }
.facts li { background: var(--chip); border: var(--border-w) solid var(--line); border-radius: 999px; padding: 6px 16px; font-weight: 800; font-size: 16px; }

.stores { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.store-btn {
  display: inline-flex; flex-direction: column; justify-content: center;
  min-width: 210px; min-height: 64px; padding: 10px 24px;
  border-radius: 18px; text-decoration: none; line-height: 1.2;
  background: var(--primary); color: var(--primary-ink);
  border: var(--border-w) solid var(--line);
  font-family: var(--font-head);
}
.store-btn small { font-size: 13px; font-weight: 700; opacity: 0.9; }
.store-btn b { font-size: 21px; font-weight: 900; }
a.store-btn:hover { filter: brightness(1.06); transform: translateY(-1px); }
.store-btn.is-soon { background: var(--chip); color: var(--ink-soft); border: 2px dashed var(--ink-soft); cursor: default; }
.stores-note { margin-top: 12px; font-size: 15px; color: var(--ink-soft); }

.shots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 32px; }
.shots img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 16px; border: var(--border-w) solid var(--line); background: var(--bg-2); }

.groups { list-style: none; padding: 0; margin: 20px 0 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.groups li { text-align: center; font-weight: 800; font-size: 16px; }
.groups img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 16px; border: var(--border-w) solid var(--line); margin-bottom: 6px; background: var(--bg-2); }
.groups .free { display: inline-block; background: var(--sun); border-radius: 999px; padding: 0 10px; font-size: 13px; font-weight: 900; }
.sub { margin-top: 36px; }

.points { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 28px; }
.point { background: var(--bg-2); border: var(--border-w) solid var(--line); border-radius: var(--radius); padding: 22px; }
.point p { margin-top: 8px; color: var(--ink-soft); font-size: 17px; }

.qas { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; margin-top: 28px; }
.qa { background: var(--surface); border: var(--border-w) solid var(--line); border-radius: var(--radius); padding: 22px; }
.qa p { margin-top: 8px; color: var(--ink-soft); font-size: 17px; }

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

.doc { max-width: 760px; padding-top: 40px; padding-bottom: 72px; }
.doc h1 { font-size: clamp(30px, 5vw, 46px); }
.doc .lead { font-size: 20px; margin-top: 16px; }
.doc h2 { font-size: 24px; margin-top: 36px; }
.doc p, .doc ul { margin-top: 12px; }
.doc ul { padding-left: 22px; }
.doc li { margin-top: 6px; }
.doc a { color: var(--pine); }
.doc .meta { color: var(--ink-soft); font-size: 16px; margin-top: 10px; }
.card { background: var(--surface); border: var(--border-w) solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; margin-top: 24px; }
.mail { font-size: clamp(22px, 4vw, 30px); font-weight: 900; font-family: var(--font-head); word-break: break-word; }
.eyebrow.gap { margin-top: 48px; }
.nf { margin-top: 32px; }
mark.todo { background: #ffe14d; color: #1e1b2e; padding: 1px 6px; border-radius: 6px; font-weight: 700; }

/* ---------- Подвал ---------- */

/* содержимое подвала центрируется по высоте флексом, а не подбором отступов */
.foot { border-top: max(1px, var(--border-w)) solid var(--line); display: flex; align-items: center; min-height: 96px; padding: 16px 0; box-sizing: border-box; font-size: 16px; color: var(--ink-soft); }
.foot > .wrap { width: 100%; }
.foot .wrap { display: flex; flex-wrap: wrap; gap: 10px 24px; align-items: center; }
.foot nav { display: flex; flex-wrap: wrap; gap: 6px 20px; margin-left: auto; }

/* ---------- Телефон ---------- */

@media (max-width: 760px) {
  body { font-size: 17px; }
  .top .wrap { gap: 10px; }
  .brand img { width: 54px; }
  .brand-name b { font-size: 20px; }
  .nav { order: 3; width: 100%; justify-content: center; flex-wrap: nowrap; gap: 0; }
  .nav a { font-size: 15px; padding: 6px 8px; white-space: nowrap; }
  .nav { flex-wrap: wrap; row-gap: 2px; }
  section { padding: 40px 0; }
  .game-head { grid-template-columns: 76px 1fr; gap: 14px; }
  .game-icon { width: 76px; height: 76px; border-radius: 18px; }
  .store-btn { flex: 1 1 100%; }
  .shots { grid-auto-flow: column; grid-template-columns: none; grid-auto-columns: 84%; overflow-x: auto; scroll-snap-type: x mandatory; margin-left: -20px; margin-right: -20px; padding: 0 20px 8px; }
  .shots img { scroll-snap-align: center; }
  .groups { grid-template-columns: repeat(2, 1fr); }
  .trust { grid-template-columns: repeat(2, 1fr); }
  .trust li { font-size: 16px; }
  .points { grid-template-columns: 1fr; }
  .qas { grid-template-columns: 1fr; }
  .foot nav { margin-left: 0; }
}

@media (prefers-reduced-motion: no-preference) {
  .store-btn { transition: transform 0.15s, filter 0.15s; }
}

/* ====================== Вариант b: мятный первый экран, мягкие карточки ====================== */

.v-b { --border-w: 0px; --shadow: 0 14px 36px rgba(46, 52, 56, 0.10); --radius: 28px; --chip: #ffffff; }
.v-b .top { background: var(--mint); }
.v-b .nav a:hover, .v-b .nav a[aria-current="page"] { background: rgba(255, 255, 255, 0.6); }
.v-b .foot { border-top: 0; background: var(--bg-2); }

.hero-b { background: var(--mint); border-radius: 0 0 56px 56px; padding: 24px 0 64px; }
.hero-b .wrap { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 40px; align-items: center; }
.hero-b p { font-size: clamp(18px, 2vw, 21px); margin-top: 16px; }
.hero-b .promise { color: var(--ink); background: #fff; display: inline-block; border-radius: 999px; padding: 6px 18px; font-size: clamp(16px, 2vw, 20px); }
.hero-mascot { width: 100%; background: #fff; border-radius: 48px; padding: 8% 14%; box-shadow: var(--shadow); }
.v-b .store-btn { border-radius: 999px; box-shadow: var(--shadow); }
.v-b .store-btn.is-soon { background: #fff; box-shadow: none; }

.stats-b { padding: 0; margin-top: -36px; }
.stats { list-style: none; margin: 0; padding: 22px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); }
.stats li { text-align: center; }
.stats b { display: block; font-family: var(--font-head); font-size: clamp(34px, 5vw, 52px); font-weight: 900; line-height: 1; color: var(--pine); }
.stats span { font-weight: 800; font-size: 15px; color: var(--ink-soft); }

.lead-b { font-size: 20px; max-width: 760px; margin-top: 12px; color: var(--ink-soft); }
.rows { display: grid; gap: 40px; margin-top: 40px; }
.row { display: grid; grid-template-columns: 1.2fr 1fr; gap: 36px; align-items: center; }
.row:nth-child(even) img { order: 2; }
.row img { border-radius: var(--radius); box-shadow: var(--shadow); aspect-ratio: 16 / 9; object-fit: cover; width: 100%; }
.row h3 { font-size: clamp(24px, 3vw, 32px); font-weight: 900; }
.row p { margin-top: 10px; color: var(--ink-soft); }
.v-b .groups.strip { grid-template-columns: repeat(5, 1fr); }  /* все группы видны сразу, без прокрутки */
.v-b .groups img { box-shadow: 0 6px 16px rgba(46, 52, 56, 0.10); }

.wrap.narrow { max-width: 780px; }
.acc { margin-top: 24px; display: grid; gap: 12px; }
.acc details { background: #fff; border-radius: 20px; box-shadow: 0 6px 16px rgba(46, 52, 56, 0.07); padding: 4px 22px; }
.acc summary { cursor: pointer; font-family: var(--font-head); font-weight: 900; font-size: 19px; padding: 14px 0; }
.acc details p { padding-bottom: 18px; color: var(--ink-soft); }
.story-b { margin-top: 32px; text-align: center; color: var(--ink-soft); font-size: 17px; }

.cta-b { background: var(--pine); color: #fff; border-radius: 56px 56px 0 0; text-align: center; padding: 64px 0; }
.cta-b p { margin-top: 10px; font-size: 20px; opacity: 0.9; }
.cta-b .stores { justify-content: center; }
.cta-b .store-btn.is-soon { color: var(--ink-soft); }
.v-b .cta-b + * , .v-b main + .foot { margin-top: 0; }

@media (max-width: 760px) {
  .hero-b { border-radius: 0 0 32px 32px; padding-bottom: 56px; }
  .hero-b .wrap { grid-template-columns: 1fr; gap: 20px; text-align: center; }
  .hero-mascot { order: -1; max-width: 300px; margin: 0 auto; border-radius: 32px; }
  .hero-b .stores { justify-content: center; }
  .stats { grid-template-columns: repeat(2, 1fr); gap: 18px 12px; }
  .v-b .groups.strip { grid-template-columns: repeat(3, 1fr); gap: 10px; }
  .v-b .groups.strip li { font-size: 14px; }
  .row { grid-template-columns: 1fr; gap: 14px; }
  .row:nth-child(even) img { order: 0; }
  .cta-b { border-radius: 32px 32px 0 0; padding: 44px 0; }
}

/* ---------- Блок «Для родителей» ---------- */
.parents-b { background: var(--bg-2); border-radius: 56px; margin: 24px 0; }
.par-shots { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 32px; }
.par-shots img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius); box-shadow: var(--shadow); }
.pars { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 28px; }
.par { background: #fff; border-radius: 22px; padding: 22px; box-shadow: 0 6px 16px rgba(46, 52, 56, 0.07); }
.par p { margin-top: 8px; color: var(--ink-soft); font-size: 16px; }
.doc dl.legal { display: grid; grid-template-columns: max-content 1fr; gap: 10px 24px; }
.doc dl.legal dt { font-weight: 900; }
.doc dl.legal dd { margin: 0; }
@media (max-width: 1000px) { .pars { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 760px) {
  .parents-b { border-radius: 32px; }
  .par-shots { grid-template-columns: 1fr; gap: 14px; }
  .pars { grid-template-columns: 1fr; }
  .doc dl.legal { grid-template-columns: 1fr; gap: 2px; }
  .doc dl.legal dd { margin-bottom: 10px; }
}
