/* Лендинг «Герои Котла и Мистики».
 *
 * Палитра, радиусы и тон взяты из игры (client/lib/core/theme.dart): тёмный тёплый фон,
 * кремовый текст, карамель как акцент, пряность для «горячего», мята для «хорошего».
 * Ничего лишнего: одна колонка контента, крупная типографика, арт на первом плане.
 */

:root {
  --bg: #1B1410;
  --bg-2: #241A14;
  --surface: #2A201A;
  --surface-2: #3A2C23;
  --line: rgba(246, 231, 211, .12);
  --cream: #F6E7D3;
  --muted: #CDBBA6;
  --caramel: #F2A65A;
  --spice: #E4572E;
  --mint: #7FD1AE;
  --berry: #E06A8A;
  --radius: 24px;
  --radius-sm: 14px;
  --page: 1160px;
  --shadow: 0 24px 60px rgba(0, 0, 0, .45);
  --font-head: 'Baloo 2', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-body: 'Nunito', 'Segoe UI', system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }

/* Атрибут hidden должен побеждать: у `.btn` и других классов задан display,
   и без этого правила скрытая кнопка остаётся на экране (уже случалось). */
[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--cream);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: var(--caramel); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 800;
  line-height: 1.08;
  margin: 0;
  letter-spacing: -.01em;
}

h1 { font-size: clamp(36px, 5.2vw, 66px); }
h2 { font-size: clamp(30px, 4.2vw, 52px); }
h3 { font-size: clamp(20px, 2.2vw, 26px); }

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

.wrap { width: min(100% - 40px, var(--page)); margin-inline: auto; }

.eyebrow {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--caramel);
  margin: 0 0 14px;
}

.lead { font-size: clamp(17px, 1.5vw, 21px); color: var(--muted); max-width: 62ch; }

/* ---------------- кнопки ---------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 30px;
  border-radius: 999px;
  border: 2px solid transparent;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 17px;
  cursor: pointer;
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); text-decoration: none; }
.btn:active { transform: translateY(0); }
.btn-primary {
  background: linear-gradient(180deg, #FFC078, var(--caramel));
  color: #3A2110;
  box-shadow: 0 12px 26px rgba(242, 166, 90, .3);
}
.btn-primary:hover { box-shadow: 0 18px 34px rgba(242, 166, 90, .42); }
.btn-ghost { border-color: var(--line); color: var(--cream); background: rgba(246, 231, 211, .04); }
.btn-ghost:hover { background: rgba(246, 231, 211, .1); }
.btn-big { padding: 19px 40px; font-size: 19px; }

/* Кнопка, которая ещё не работает (сборка не готова). Это не ссылка и не
   button: нажимать нечего, поэтому элемент не получает фокуса и курсора-руки. */
.btn.is-disabled {
  background: rgba(242, 166, 90, .14);
  border-color: rgba(242, 166, 90, .32);
  color: #C79A6A;
  box-shadow: none;
  cursor: default;
  pointer-events: none;
}
.btn-ghost.is-disabled {
  background: rgba(246, 231, 211, .04);
  border-color: var(--line);
  color: var(--muted);
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(42, 32, 26, .7);
  font-size: 14px;
  font-weight: 700;
  color: var(--muted);
}
.pill b { color: var(--cream); }

/* ---------------- шапка ---------------- */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  background: rgba(27, 20, 16, .82);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease, background .2s ease;
}
.header.scrolled { border-color: var(--line); background: rgba(27, 20, 16, .94); }
.header-in {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 76px;
}
.brand { display: flex; align-items: center; gap: 12px; flex: none; }
.brand img { height: 46px; width: auto; }
.header nav { display: flex; gap: 26px; margin-left: auto; }
.header nav a {
  color: var(--muted);
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
}
.header nav a:hover { color: var(--cream); }
.header .btn { padding: 12px 22px; font-size: 15px; }

/* ---------------- герой ---------------- */
.hero {
  position: relative;
  min-height: min(88vh, 800px);
  display: flex;
  align-items: center;
  overflow: hidden;
  margin-top: -76px;
  padding: 150px 0 90px;
}
.hero-art {
  position: absolute;
  inset: 0;
  background: url('assets/hero.jpg') center 30% / cover no-repeat;
  transform: scale(1.02);
}
.hero-art::after {
  content: '';
  position: absolute;
  inset: 0;
  /* Затемнение слева: там логотип и заголовок. Справа арт остаётся видимым —
     именно он продаёт игру, и глушить его до чёрного незачем. */
  background:
    linear-gradient(90deg, rgba(27, 20, 16, .95) 0%, rgba(27, 20, 16, .8) 34%,
                    rgba(27, 20, 16, .38) 58%, rgba(27, 20, 16, .12) 100%),
    linear-gradient(180deg, rgba(27, 20, 16, .88) 0%, rgba(27, 20, 16, .1) 26%,
                    rgba(27, 20, 16, .35) 68%, var(--bg) 100%);
}
.hero-in { position: relative; z-index: 2; max-width: 760px; }
.hero-logo { width: min(400px, 66vw); margin: 0 0 4px -8px; filter: drop-shadow(0 14px 30px rgba(0, 0, 0, .6)); }
.hero h1 { margin: 6px 0 20px; text-shadow: 0 6px 26px rgba(0, 0, 0, .55); }
.hero h1 em { font-style: normal; color: var(--caramel); }
.hero .lead { color: #EBDCC7; text-shadow: 0 2px 12px rgba(0, 0, 0, .6); }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }
.hero-pills { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }

.hero-float { position: absolute; z-index: 1; pointer-events: none; filter: drop-shadow(0 18px 34px rgba(0, 0, 0, .55)); }
.hero-float.a { right: 1%; bottom: 4%; width: 290px; animation: bob 7s ease-in-out infinite; }
.hero-float.b { right: 21%; bottom: 7%; width: 104px; animation: bob 9s ease-in-out infinite reverse; }

@keyframes bob {
  0%, 100% { transform: translateY(0) rotate(-1.5deg); }
  50% { transform: translateY(-18px) rotate(1.5deg); }
}

/* ---------------- секции ---------------- */
section { padding: 96px 0; }
.section-head { max-width: 760px; margin-bottom: 46px; }
.section-head p { color: var(--muted); }

.band { background: var(--bg-2); border-block: 1px solid var(--line); }

/* ---------------- шаги ---------------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; counter-reset: step; }
.step {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px 26px;
  position: relative;
}
.step::before {
  counter-increment: step;
  content: counter(step);
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 40px;
  line-height: 1;
  color: var(--caramel);
  opacity: .35;
  display: block;
  margin-bottom: 10px;
}
.step h3 { margin-bottom: 8px; }
.step p { color: var(--muted); font-size: 16px; }

/* ---------------- карточки «в чём веселье» ---------------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card {
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px 26px;
  transition: transform .18s ease, border-color .18s ease;
}
.card:hover { transform: translateY(-4px); border-color: rgba(242, 166, 90, .4); }
.card .emoji { font-size: 34px; line-height: 1; margin-bottom: 14px; }
.card h3 { margin-bottom: 10px; font-size: 21px; }
.card p { color: var(--muted); font-size: 16px; }

/* ---------------- бойцы ---------------- */
.units { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.unit {
  background: radial-gradient(120% 90% at 50% 0%, #4A382C, var(--surface));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 18px 22px;
  text-align: center;
  transition: transform .18s ease, border-color .18s ease;
}
.unit:hover { transform: translateY(-5px) rotate(-1deg); border-color: rgba(242, 166, 90, .5); }
.unit img { width: 100%; aspect-ratio: 1; object-fit: contain; margin-bottom: 12px; filter: drop-shadow(0 10px 16px rgba(0, 0, 0, .5)); }
/* Подпись книги: карточки двух книг стоят в одной сетке, и по цвету видно,
   кто из какой — это и есть разница стратегий отряда. */
.unit .book {
  display: block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
  margin-bottom: 7px;
}
.book.ember { color: #FF8A63 }
.book.sweet { color: var(--caramel) }
.unit h3 { font-size: 19px; margin-bottom: 8px; }
.unit .role {
  display: inline-block;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 4px 11px;
  border-radius: 999px;
  margin-bottom: 10px;
}
.role-tank { background: rgba(127, 209, 174, .16); color: var(--mint); border: 1px solid rgba(127, 209, 174, .45); }
.role-damage { background: rgba(228, 87, 46, .16); color: #FF8A63; border: 1px solid rgba(228, 87, 46, .45); }
.role-control { background: rgba(224, 106, 138, .16); color: var(--berry); border: 1px solid rgba(224, 106, 138, .45); }
.role-support { background: rgba(242, 166, 90, .16); color: var(--caramel); border: 1px solid rgba(242, 166, 90, .45); }
.unit .recipe { font-size: 14px; color: var(--muted); line-height: 1.45; margin: 0; }

/* ---------------- хижина ---------------- */
.hut { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.hut .item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 18px;
  text-align: center;
}
.hut img { width: 76%; margin: 0 auto 12px; filter: drop-shadow(0 12px 18px rgba(0, 0, 0, .5)); }
.hut h3 { font-size: 18px; margin-bottom: 6px; }
.hut p { color: var(--muted); font-size: 15px; }
.hut-note {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 26px;
}
.hut-note img { width: 90px; flex: none; filter: drop-shadow(0 8px 14px rgba(0, 0, 0, .5)); }
.hut-note p { color: var(--muted); font-size: 16px; }

/* ---------------- заявка на плейтест ---------------- */
.apply {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 46px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 32px;
  padding: 56px 50px;
}
.apply::before {
  content: '';
  position: absolute;
  inset: auto -10% -40% auto;
  width: 560px;
  height: 560px;
  background: radial-gradient(circle, rgba(242, 166, 90, .18), transparent 68%);
  pointer-events: none;
}
.apply-text { position: relative; }
.apply-notes { list-style: none; margin: 22px 0 0; padding: 0; color: var(--muted); font-size: 15px; }
.apply-notes li { position: relative; padding-left: 22px; margin-bottom: 8px; }
.apply-notes li::before { content: '✓'; position: absolute; left: 0; color: var(--caramel); font-weight: 800; }
.apply-art { width: 190px; margin-top: 18px; filter: drop-shadow(0 14px 26px rgba(0, 0, 0, .55)); }

.apply-form { position: relative; display: flex; flex-direction: column; gap: 18px; }
.field { display: flex; flex-direction: column; gap: 8px; border: 0; margin: 0; padding: 0; }
.field-label {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 15px;
  color: var(--cream);
}
.field-label .hint { font-family: var(--font-body); font-weight: 600; font-size: 12px; color: var(--muted); }
.field-row { display: grid; grid-template-columns: 150px 1fr; gap: 18px; align-items: start; }

.apply-form input[type="email"],
.apply-form input[type="number"],
.apply-form input[type="text"] {
  width: 100%;
  padding: 15px 18px;
  border-radius: 14px;
  border: 1px solid rgba(246, 231, 211, .18);
  background: rgba(27, 20, 16, .55);
  color: var(--cream);
  font-family: var(--font-body);
  font-size: 16px;
  transition: border-color .16s ease, box-shadow .16s ease;
}
.apply-form input::placeholder { color: #8C7A69; }
.apply-form input:focus {
  outline: none;
  border-color: var(--caramel);
  box-shadow: 0 0 0 3px rgba(242, 166, 90, .18);
}
.apply-form input[aria-invalid="true"] { border-color: var(--spice); }

.choice-row { display: flex; flex-wrap: wrap; gap: 8px; }
.choice { position: relative; cursor: pointer; }
.choice input { position: absolute; opacity: 0; width: 0; height: 0; }
.choice span {
  display: block;
  padding: 11px 18px;
  border-radius: 999px;
  border: 1px solid rgba(246, 231, 211, .18);
  background: rgba(27, 20, 16, .45);
  color: var(--muted);
  font-size: 15px;
  font-weight: 600;
  transition: border-color .16s ease, background .16s ease, color .16s ease;
}
.choice:hover span { border-color: rgba(246, 231, 211, .35); }
.choice input:focus-visible + span { box-shadow: 0 0 0 3px rgba(242, 166, 90, .25); }
.choice input:checked + span {
  background: rgba(242, 166, 90, .16);
  border-color: var(--caramel);
  color: var(--cream);
}

.consent { display: flex; gap: 12px; align-items: flex-start; color: var(--muted); font-size: 14px; cursor: pointer; }
.consent input { flex: none; width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--caramel); }

/* Ловушка для ботов: поле есть в разметке, но человек его не видит. */
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.apply-submit { align-self: flex-start; }
.form-status { min-height: 22px; font-size: 15px; color: var(--muted); margin: 0; }
.form-status.ok { color: var(--mint); font-weight: 700; }
.form-status.bad { color: var(--spice); font-weight: 700; }

/* Экран подтверждения: показывается вместо полей, поэтому занимает их место
   и не даёт вёрстке прыгнуть. */
.apply-done {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  padding: 30px 28px;
  border-radius: 22px;
  border: 1px solid rgba(127, 209, 174, .45);
  background: linear-gradient(180deg, rgba(127, 209, 174, .16), rgba(127, 209, 174, .05));
  animation: done-in .35s ease both;
}
.apply-done[hidden] { display: none; }
.apply-done h3 { font-size: 26px; color: var(--cream); margin: 0; }
.apply-done p { color: var(--muted); margin: 0; font-size: 16px; }
.apply-done b { color: var(--mint); word-break: break-all; }
.done-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: var(--mint);
  color: #14301F;
  box-shadow: 0 10px 26px rgba(127, 209, 174, .35);
}
.done-mark svg { width: 34px; height: 34px; }
@keyframes done-in {
  from { opacity: 0; transform: translateY(10px) scale(.98); }
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .apply-done { animation: none; }
}

/* Текст только для программ чтения с экрана. */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------------- вопросы ---------------- */
.faq { display: grid; gap: 14px; max-width: 860px; }
details {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 20px 24px;
}
details[open] { border-color: rgba(242, 166, 90, .35); }
summary {
  cursor: pointer;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 19px;
  list-style: none;
}
summary::-webkit-details-marker { display: none; }
summary::after { content: '+'; float: right; color: var(--caramel); font-size: 24px; line-height: 1; }
details[open] summary::after { content: '−'; }
details p { color: var(--muted); margin: 12px 0 0; font-size: 16px; }

/* ---------------- финальный призыв ---------------- */
.cta {
  position: relative;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 32px;
  padding: 64px 56px;
  display: flex;
  align-items: center;
  gap: 40px;
}
.cta::before {
  content: '';
  position: absolute;
  inset: -40% -10% auto auto;
  width: 620px;
  height: 620px;
  background: radial-gradient(circle, rgba(242, 166, 90, .22), transparent 68%);
}
.cta-text { position: relative; flex: 1; }
.cta-art { position: relative; width: 230px; flex: none; filter: drop-shadow(0 16px 30px rgba(0, 0, 0, .55)); }
.dl-status { color: var(--muted); font-size: 15px; margin-top: 14px; }
.dl-status.warn { color: var(--spice); }

/* ---------------- подвал ---------------- */
footer {
  border-top: 1px solid var(--line);
  padding: 48px 0 40px;
  margin-top: 96px;
  color: var(--muted);
  font-size: 15px;
}
.footer-in { display: flex; flex-wrap: wrap; gap: 20px 40px; align-items: center; justify-content: space-between; }
.footer-in img { width: 150px; opacity: .9; }
.footer-links { display: flex; flex-wrap: wrap; gap: 22px; min-width: 0; }
.footer-links a { color: var(--muted); }
.footer-links a:hover { color: var(--cream); }
.copy { width: 100%; padding-top: 22px; margin-top: 6px; border-top: 1px solid var(--line); color: #9A8A79; }

/* ---------------- появление при прокрутке ---------------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero-float { animation: none; }
  html { scroll-behavior: auto; }
}

/* ---------------- адаптив ---------------- */
@media (max-width: 1000px) {
  .units, .hut { grid-template-columns: repeat(2, 1fr); }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .header nav { display: none; }
  .cta { flex-direction: column; align-items: flex-start; padding: 46px 34px; }
  .cta-art { width: 170px; }
  .apply { grid-template-columns: 1fr; gap: 32px; padding: 44px 32px; }
  .apply-art { width: 140px; }
}
@media (max-width: 700px) {
  body { font-size: 16px; }
  section { padding: 68px 0; }
  .steps, .cards { grid-template-columns: 1fr; }
  .units, .hut { grid-template-columns: repeat(2, 1fr); }
  .hero { padding: 130px 0 70px; min-height: auto; }
  /* На узком экране плавающий боец налезает на строку с плашками, поэтому убираем. */
  .hero-float { display: none; }
  .brand img { height: 38px; }
  .header .btn { padding: 10px 16px; font-size: 14px; }
  .hut-note { flex-direction: column; text-align: center; }
  .apply { padding: 32px 20px; border-radius: 24px; }
  .apply-art { display: none; }
  .field-row { grid-template-columns: 1fr; gap: 18px; }
  .choice span { padding: 10px 14px; font-size: 14px; }
  .apply-submit { width: 100%; }
}
