/* ===========================================================
   ОСНОВНЫЕ СТИЛИ — «Дядя Миша». Mobile-first.
   =========================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--c-bg);
  color: var(--c-text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--c-block2-dark); }
h1, h2, h3 { font-family: var(--font-head); font-weight: 700; line-height: 1.25; color: var(--c-text); }
h1 { font-size: 28px; margin: 0 0 16px; }
h2 { font-size: 24px; margin: 0 0 12px; }
h3 { font-size: 19px; margin: 0 0 8px; font-weight: 600; }
p { margin: 0 0 16px; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.section { padding: 48px 0; }
.section--tint { background: var(--c-surface); border-top: 1px solid var(--c-border); border-bottom: 1px solid var(--c-border); }
.section__lead { color: var(--c-text-muted); max-width: 720px; }
.center { text-align: center; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

/* ---------- Шапка ---------- */
.header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(249, 247, 245, 0.94);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--c-border);
}
.header__inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; }
/* Логотип идёт горизонтальной полосой: пропорции не режем, задаём только высоту */
.brand__logo { width: auto; height: 40px; flex: 0 0 auto; }
.brand__sub {
  display: none; font-family: var(--font-body); font-weight: 400;
  font-size: 12px; color: var(--c-text-muted); line-height: 1.3;
  padding-left: 12px; border-left: 1px solid var(--c-border);
}
.nav { display: none; gap: 20px; }
.nav a {
  display: inline-flex; align-items: center; min-height: 48px;
  color: var(--c-text); text-decoration: none; font-size: 15px;
  border-bottom: 2px solid transparent; transition: var(--transition);
}
.nav a:hover, .nav a:focus-visible { color: var(--c-block1-dark); border-bottom-color: var(--c-block1); }

/* ---------- Первый экран ---------- */
.hero { padding: 40px 0 48px; }
.hero__title { max-width: 18ch; }
.hero__subtitle { font-size: 17px; color: var(--c-text-muted); max-width: 640px; }
.hero__chain { font-weight: 600; color: var(--c-block1-dark); }
.hero__media {
  margin-top: 28px; border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow-soft); background: var(--c-surface);
  border: 1px solid var(--c-border);
}
.hero__caption { font-size: 14px; color: var(--c-text-muted); margin: 10px 2px 0; }
.hero__img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.game-card__img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; }

/* Плейсхолдер картинки — заменить на реальный скриншот */
.placeholder {
  display: flex; align-items: center; justify-content: center; text-align: center;
  background: repeating-linear-gradient(45deg, #EDE9E4, #EDE9E4 12px, #E5E0D9 12px, #E5E0D9 24px);
  color: #6B6B6B; font-size: 14px; padding: 16px; min-height: 200px;
}
.placeholder--hero { aspect-ratio: 16 / 9; }
.placeholder--game { aspect-ratio: 1 / 1; }
.placeholder--logo { aspect-ratio: 3 / 1; border-radius: var(--radius-sm); }

/* ---------- Три блока мозга ---------- */
.blocks { display: grid; gap: 20px; margin-top: 28px; }
.block-card {
  background: var(--c-surface); border: 1px solid var(--c-border);
  border-top: 5px solid var(--accent, var(--c-block1));
  border-radius: var(--radius); padding: 24px;
  box-shadow: var(--shadow-soft); transition: var(--transition);
}
.block-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.block-card__icon {
  width: 56px; height: 56px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; margin-bottom: 14px;
  background: color-mix(in srgb, var(--accent) 18%, #fff);
}
.block-card__tag {
  display: inline-block; font-size: 13px; font-weight: 600; letter-spacing: 0.04em;
  text-transform: uppercase; color: var(--accent-dark); margin-bottom: 4px;
}
.block-card p { margin-bottom: 0; color: var(--c-text-muted); }
.b1 { --accent: var(--c-block1); --accent-dark: var(--c-block1-dark); }
.b2 { --accent: var(--c-block2); --accent-dark: var(--c-block2-dark); }
.b3 { --accent: var(--c-block3); --accent-dark: var(--c-block3-dark); }

.house-note {
  margin-top: 28px; padding: 22px 24px; border-radius: var(--radius);
  background: color-mix(in srgb, var(--c-block1) 12%, var(--c-bg));
  border: 1px solid var(--c-border);
}
.house-note p:last-child { margin-bottom: 0; }

/* ---------- Карточки игр ---------- */
.games { display: grid; gap: 22px; margin-top: 28px; }
.game-card {
  background: var(--c-surface); border: 1px solid var(--c-border);
  border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow-soft); transition: var(--transition);
  display: flex; flex-direction: column;
}
.game-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.game-card__body { padding: 18px 20px 22px; display: flex; flex-direction: column; gap: 8px; }
.game-card__meta { display: flex; flex-wrap: wrap; gap: 8px; }
.badge {
  font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 16%, #fff);
  color: var(--accent-dark);
  border: 1px solid color-mix(in srgb, var(--accent) 40%, #fff);
}
.badge--age { background: #F1EEEA; color: #5A5045; border-color: var(--c-border); }
.game-card p { margin: 0; color: var(--c-text-muted); font-size: 15px; }
.game-card__audience { font-size: 14px; color: #5A5045; }

/* ---------- Этапы ---------- */
.steps { display: grid; gap: 18px; margin-top: 28px; counter-reset: step; }
.step {
  position: relative; background: var(--c-surface); border: 1px solid var(--c-border);
  border-radius: var(--radius); padding: 22px 22px 22px 74px; box-shadow: var(--shadow-soft);
}
.step::before {
  counter-increment: step; content: counter(step);
  position: absolute; left: 20px; top: 20px;
  width: 38px; height: 38px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-head); font-weight: 700; color: #fff;
  background: var(--accent, var(--c-block2));
}
.step p { margin: 0; color: var(--c-text-muted); }

/* ---------- Истории ---------- */
.stories { display: grid; gap: 20px; margin-top: 28px; }
.story {
  background: var(--c-surface); border: 1px solid var(--c-border);
  border-left: 5px solid var(--accent, var(--c-block2));
  border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow-soft);
}
.story dl { margin: 0; }
.story dt { font-weight: 600; font-size: 14px; color: var(--accent-dark); margin-top: 10px; }
.story dd { margin: 2px 0 0; color: var(--c-text-muted); }
.story__who { font-size: 14px; color: var(--c-text-muted); margin-bottom: 0; }
.disclaimer { font-size: 14px; color: var(--c-text-muted); margin-top: 20px; font-style: italic; }

/* ---------- Для кого ---------- */
.audience { display: grid; gap: 20px; margin-top: 28px; }
.audience-card {
  background: var(--c-surface); border: 1px solid var(--c-border);
  border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow-soft);
  border-top: 5px solid var(--accent);
}
.audience-card ul { margin: 0; padding-left: 20px; color: var(--c-text-muted); }
.audience-card li { margin-bottom: 8px; }

/* ---------- Отклик ---------- */
.feedback { background: var(--c-surface); border-top: 1px solid var(--c-border); }
.feedback__box {
  max-width: 720px; margin: 0 auto; background: var(--c-bg);
  border: 1px solid var(--c-border); border-radius: var(--radius);
  padding: 28px 22px; box-shadow: var(--shadow-soft);
}
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 600; margin-bottom: 6px; font-size: 15px; }
.field .hint { font-weight: 400; color: var(--c-text-muted); font-size: 14px; }
input[type="text"], textarea {
  width: 100%; font-family: var(--font-body); font-size: 16px; color: var(--c-text);
  background: #fff; border: 1px solid var(--c-border); border-radius: var(--radius-sm);
  padding: 12px 14px; min-height: 48px; transition: var(--transition);
}
textarea { min-height: 140px; resize: vertical; }
input[type="text"]:focus, textarea:focus {
  outline: none; border-color: var(--c-block2); box-shadow: 0 0 0 3px rgba(91, 143, 190, 0.22);
}
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; min-width: 48px; padding: 12px 28px;
  font-family: var(--font-head); font-weight: 600; font-size: 16px; color: #fff;
  background: var(--c-block1); border: none; border-radius: var(--radius-sm);
  cursor: pointer; transition: var(--transition); text-decoration: none;
}
.btn:hover, .btn:focus-visible { background: #D9814A; box-shadow: var(--shadow-hover); }
.privacy-note { font-size: 14px; color: var(--c-text-muted); margin: 14px 0 0; }
.honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status {
  margin-top: 16px; padding: 14px 16px; border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--c-block3) 16%, #fff);
  border: 1px solid var(--c-block3); color: var(--c-block3-dark); font-weight: 600;
}
.form-status[hidden] { display: none; }
.form-status--error { background: color-mix(in srgb, var(--c-block1) 16%, #fff); border-color: var(--c-block1); color: var(--c-block1-dark); }

/* ---------- Вопрос-ответ ---------- */
.qa { margin-top: 24px; display: grid; gap: 12px; }
.qa details {
  background: var(--c-surface); border: 1px solid var(--c-border);
  border-radius: var(--radius-sm); padding: 4px 18px;
}
.qa summary {
  cursor: pointer; font-weight: 600; padding: 14px 0; min-height: 48px;
  display: flex; align-items: center; list-style: none;
}
.qa summary::-webkit-details-marker { display: none; }
.qa summary::before { content: "+"; margin-right: 10px; color: var(--c-block1-dark); font-weight: 700; font-size: 20px; }
.qa details[open] summary::before { content: "\2212"; }
.qa .answer { padding: 0 0 14px; color: var(--c-text-muted); }
.qa .answer p:last-child { margin-bottom: 0; }
.qa__signature { font-size: 14px; color: var(--c-text-muted); margin-top: 16px; }

/* ---------- Подвал ---------- */
.footer { background: #F2EEE9; border-top: 1px solid var(--c-border); padding: 36px 0 28px; }
.footer__inner { display: grid; gap: 16px; justify-items: start; }
.footer__logo { width: 96px; height: 96px; border-radius: 50%; }
.footer p { margin: 0; color: var(--c-text-muted); font-size: 15px; }
.footer .copyright { font-size: 14px; }

/* ---------- Планшет ---------- */
@media (min-width: 768px) {
  h1 { font-size: 40px; }
  h2 { font-size: 30px; }
  .section { padding: var(--section-gap) 0; }
  .hero { padding: 56px 0 64px; }
  .hero__subtitle { font-size: 18px; }
  .blocks { grid-template-columns: repeat(3, 1fr); }
  .games { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(3, 1fr); }
  .stories { grid-template-columns: repeat(2, 1fr); }
  .audience { grid-template-columns: repeat(3, 1fr); }
  .feedback__box { padding: 34px; }
  .brand__logo { height: 48px; }
  .brand__sub { display: block; }
  .footer__inner { grid-template-columns: auto 1fr; align-items: center; column-gap: 24px; }
}

/* ---------- Десктоп ---------- */
@media (min-width: 1024px) {
  h1 { font-size: 46px; }
  .nav { display: flex; }
  .games { grid-template-columns: repeat(3, 1fr); }
  .hero__media { max-width: 900px; }
}

/* ---------- Уважение к настройкам пользователя ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}
:focus-visible { outline: 3px solid var(--c-block2-dark); outline-offset: 2px; }
