/* =========================================================
   Ключница — стили одностраничника

   Содержание:
   1.  Переменные (цвета, шрифты, радиусы)
   2.  Базовые стили
   3.  Общие элементы: контейнер, секции, кнопки, карточки
   4.  Шапка и меню
   5.  Первый экран и демо-кейс
   6.  Кейсы
   7.  Популярные игры и обложки
   8.  Жанры
   9.  Как это работает
   10. Вопросы и гарантии
   11. Оплата и поддержка
   12. Подвал
   13. Адаптив (телефоны)
   ========================================================= */


/* ---------- 1. Переменные ---------- */

:root {
  /* Фон и поверхности */
  --color-bg: #0f1014;
  --color-bg-alt: #14161b;
  --color-surface: #191b21;
  --color-surface-2: #23262e;
  --color-line: #2b2e36;
  --color-line-strong: #3a3e48;

  /* Текст */
  --color-text: #f3f3ef;
  --color-text-soft: #c9cbd1;
  --color-text-muted: #a4a7af;

  /* Фирменный акцент: меняется в одном месте */
  --color-accent: #c6f135;
  --color-on-accent: #0f1014;

  /* Цвета уровней кейсов */
  --tier-start: #6ea8ff;
  --tier-game: #b48cff;
  --tier-hit: #ff9f5a;
  --tier-legend: #ffc23d;

  /* Шрифты */
  --font-display: "Dela Gothic One", "Arial Black", sans-serif;
  --font-body: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* Размеры */
  --container: 1200px;
  --radius-s: 12px;
  --radius-m: 18px;
  --radius-l: 24px;
}


/* ---------- 2. Базовые стили ---------- */

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, p {
  margin: 0;
}

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

a {
  color: inherit;
}

button {
  font: inherit;
  cursor: pointer;
}

:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 3px;
}

/* Текст только для скринридеров */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* Ссылка «Перейти к содержимому» видна только при фокусе с клавиатуры */
.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 10;
  padding: 12px 18px;
  border-radius: var(--radius-s);
  background: var(--color-accent);
  color: var(--color-on-accent);
  font-weight: 800;
  text-decoration: none;
}

.skip-link:focus {
  top: 16px;
}


/* ---------- 3. Общие элементы ---------- */

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 96px 0;
}

.section--alt {
  padding: 88px 0;
  background: var(--color-bg-alt);
  border-top: 1px solid var(--color-line);
  border-bottom: 1px solid var(--color-line);
}

.section--tight-top {
  padding-top: 0;
}

.section__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px 40px;
  margin-bottom: 36px;
}

.section__title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.05;
}

.section__title--spaced {
  margin-bottom: 32px;
}

.section__lead {
  max-width: 480px;
  font-size: 17px;
  color: var(--color-text-soft);
}

/* Карточка: общая подложка для блоков */
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-m);
}

/* Кнопки */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 26px;
  border: 2px solid transparent;
  border-radius: 14px;
  font-size: 16px;
  font-weight: 800;
  text-decoration: none;
  transition: transform 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn[disabled] {
  opacity: 0.6;
  cursor: default;
  transform: none;
}

.btn--primary {
  background: var(--color-accent);
  color: var(--color-on-accent);
}

.btn--outline {
  background: transparent;
  border-color: var(--color-line-strong);
  color: var(--color-text);
}

.btn--outline:hover {
  border-color: var(--color-text-muted);
}

.btn--dark {
  background: var(--color-bg);
  color: #ffffff;
}

.btn--outline-dark {
  background: transparent;
  border-color: var(--color-bg);
  color: var(--color-bg);
}

.btn--sm {
  min-height: 44px;
  padding: 0 22px;
  border-radius: var(--radius-s);
  font-size: 15px;
}

.btn--lg {
  min-height: 56px;
  padding: 0 28px;
  font-size: 17px;
}

.btn--block {
  width: 100%;
}


/* ---------- 4. Шапка и меню ---------- */

.site-header {
  border-bottom: 1px solid var(--color-line);
}

.site-header__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  padding-top: 14px;
  padding-bottom: 14px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  font-family: var(--font-display);
  font-size: 20px;
  text-decoration: none;
}

.logo__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-s);
  background: var(--color-accent);
  color: var(--color-on-accent);
}

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

.nav__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 22px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav__link {
  display: block;
  padding: 10px 0;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
}

.nav__link:hover {
  color: var(--color-accent);
}

/* Кнопка меню видна только на телефонах (см. раздел 13) */
.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 2px solid var(--color-line-strong);
  border-radius: var(--radius-s);
  background: transparent;
  color: var(--color-text);
}


/* ---------- 5. Первый экран и демо-кейс ---------- */

.hero {
  padding: 72px 0 96px;
}

.hero__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 56px;
}

.hero__content {
  display: flex;
  flex: 1 1 520px;
  flex-direction: column;
  gap: 26px;
  min-width: 0;
}

.hero__badge {
  align-self: flex-start;
  padding: 6px 14px;
  border: 1px solid var(--color-line);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  color: var(--color-text-soft);
}

.hero__title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(36px, 5vw, 68px);
  line-height: 1.05;
}

.hero__title-accent {
  color: var(--color-accent);
}

.hero__text {
  max-width: 540px;
  font-size: 19px;
  color: var(--color-text-soft);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* Три коротких факта под кнопками */
.facts {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 40px;
  margin: 0;
  padding: 24px 0 0;
  border-top: 1px solid var(--color-line);
  list-style: none;
}

.fact {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.fact__value {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 22px;
}

.fact__label {
  font-size: 14px;
  color: var(--color-text-muted);
}

/* Карточка демо-кейса */
.demo-card {
  display: flex;
  flex: 1 1 400px;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  min-width: 0;
  padding: 32px 28px;
  border-radius: var(--radius-l);
  text-align: center;
}

.demo-card__label {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--tier-legend);
}

.demo-card__image {
  width: 100%;
  max-width: 320px;
}

/* Покачивание кейса во время демо-открытия */
.demo-card__image.is-opening {
  animation: case-shake 0.5s ease-in-out infinite;
}

@keyframes case-shake {
  0%, 100% { transform: rotate(0); }
  25%      { transform: rotate(-3deg); }
  75%      { transform: rotate(3deg); }
}

.demo-card__text {
  max-width: 340px;
  font-size: 16px;
  color: var(--color-text-muted);
}

.demo-card__result {
  min-height: 24px;
  font-weight: 700;
  color: var(--color-accent);
}

.demo-card__link {
  font-size: 15px;
  font-weight: 600;
  color: var(--color-text-soft);
}


/* ---------- 6. Кейсы ---------- */

.cases-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.case-card {
  display: flex;
  flex: 1 1 250px;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
  padding: 22px;
  border-radius: 20px;
}

.case-card--legend {
  border: 2px solid var(--tier-legend);
}

.case-card__title {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.case-card__title--start  { color: var(--tier-start); }
.case-card__title--game   { color: var(--tier-game); }
.case-card__title--hit    { color: var(--tier-hit); }
.case-card__title--legend { color: var(--tier-legend); }

.case-card__image {
  align-self: center;
  width: 100%;
  max-width: 200px;
}

.case-card__text {
  font-size: 16px;
  color: var(--color-text-soft);
}

.case-card__price {
  font-family: var(--font-display);
  font-size: 28px;
}


/* ---------- 7. Популярные игры и обложки ---------- */

.games-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.game-card {
  display: flex;
  flex: 1 1 250px;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
  padding: 10px;
}

/* Обложка: цветной фон + декоративные фигуры через ::before и ::after */
.game-card__cover {
  position: relative;
  display: flex;
  align-items: flex-end;
  height: 180px;
  padding: 16px;
  overflow: hidden;
  border-radius: var(--radius-s);
}

.game-card__cover::before,
.game-card__cover::after {
  content: "";
  position: absolute;
}

.game-card__title {
  position: relative;
  z-index: 1;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 22px;
  line-height: 1.1;
  color: #ffffff;
}

/* Cyberpunk 2077 */
.game-card__cover--cyberpunk { background: #2b1b46; }
.game-card__cover--cyberpunk::before {
  top: -30px; right: -30px;
  width: 150px; height: 150px;
  border-radius: 50%;
  background: #ff4fa3;
}

/* Red Dead Redemption 2 */
.game-card__cover--rdr2 { background: #4a1e16; }
.game-card__cover--rdr2::before {
  top: -40px; right: -40px;
  width: 170px; height: 170px;
  border: 18px solid #e0603c;
  border-radius: 50%;
}

/* The Witcher 3 */
.game-card__cover--witcher { background: #1d2e2a; }
.game-card__cover--witcher::before {
  top: -30px; right: -10px;
  width: 120px; height: 120px;
  background: #6fb59b;
  transform: rotate(45deg);
}

/* Elden Ring */
.game-card__cover--elden { background: #2e2614; }
.game-card__cover--elden::before {
  top: -60px; right: -50px;
  width: 200px; height: 200px;
  border: 6px solid #e8c15a;
  border-radius: 50%;
}
.game-card__cover--elden::after {
  top: 10px; right: 10px;
  width: 80px; height: 80px;
  border: 6px solid #e8c15a;
  border-radius: 50%;
}

/* Grand Theft Auto V */
.game-card__cover--gta { background: #12324a; }
.game-card__cover--gta::before {
  top: -20px; right: -20px;
  width: 130px; height: 130px;
  border-radius: 50%;
  background: #4fc3f7;
}

/* Hollow Knight: полумесяц из двух кругов */
.game-card__cover--hollow { background: #161c2c; }
.game-card__cover--hollow::before {
  top: 18px; right: 20px;
  width: 70px; height: 70px;
  border-radius: 50%;
  background: #e9eef7;
}
.game-card__cover--hollow::after {
  top: 8px; right: 6px;
  width: 60px; height: 60px;
  border-radius: 50%;
  background: #161c2c;
}

/* Stardew Valley: солнце и холм */
.game-card__cover--stardew { background: #24401e; }
.game-card__cover--stardew::before {
  top: 18px; right: 18px;
  width: 64px; height: 64px;
  border-radius: 50%;
  background: #f4c542;
}
.game-card__cover--stardew::after {
  right: -20px; bottom: -60px; left: -20px;
  height: 120px;
  border-radius: 50%;
  background: #3b6a2f;
}

/* It Takes Two: два круга */
.game-card__cover--ittakestwo { background: #3b2a12; }
.game-card__cover--ittakestwo::before {
  top: -24px; right: 50px;
  width: 110px; height: 110px;
  border-radius: 50%;
  background: #f28c38;
}
.game-card__cover--ittakestwo::after {
  top: 10px; right: -24px;
  width: 110px; height: 110px;
  border-radius: 50%;
  background: #4fa3f7;
}

.game-card__body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 0 8px 8px;
}

.game-card__genre {
  font-size: 13px;
  font-weight: 700;
  color: var(--color-text-muted);
}

.game-card .btn {
  min-height: 46px;
  font-size: 15px;
}

/* Цена: текущая, старая, скидка */
.price {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 10px;
}

.price__current {
  font-size: 22px;
  font-weight: 800;
}

.price__old {
  font-size: 15px;
  color: var(--color-text-muted);
}

.price__discount {
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--color-accent);
  color: var(--color-on-accent);
  font-size: 13px;
  font-weight: 800;
}


/* ---------- 8. Жанры ---------- */

.genres-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.genres-grid > li {
  flex: 1 1 260px;
  min-width: 0;
}

.genre-link {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 76px;
  padding: 16px 18px;
  border-radius: 16px;
  font-size: 18px;
  font-weight: 700;
  text-decoration: none;
  transition: border-color 0.15s ease;
}

.genre-link:hover {
  border-color: var(--color-accent);
}

.genre-link__icon {
  display: flex;
  flex: 0 0 44px;
  align-items: center;
  justify-content: center;
  height: 44px;
  border-radius: var(--radius-s);
  background: var(--color-surface-2);
  color: var(--color-accent);
}


/* ---------- 9. Как это работает ---------- */

.steps {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.step {
  display: flex;
  flex: 1 1 300px;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  padding: 28px;
  border-radius: 20px;
}

.step__num {
  font-family: var(--font-display);
  font-size: 52px;
  line-height: 1;
  color: var(--color-accent);
}

.step__title {
  font-size: 22px;
  font-weight: 800;
}

.step__text {
  font-size: 17px;
  color: var(--color-text-soft);
}


/* ---------- 10. Вопросы и гарантии ---------- */

.faq {
  display: flex;
  flex-wrap: wrap;
  gap: 32px 64px;
}

.faq__intro {
  display: flex;
  flex: 1 1 320px;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

.faq__lead {
  font-size: 17px;
  color: var(--color-text-soft);
}

.faq__list {
  flex: 999 1 560px;
  min-width: 0;
}

.faq__item {
  padding: 22px 0;
  border-bottom: 1px solid var(--color-line);
}

.faq__item:first-child {
  padding-top: 0;
}

.faq__item:last-child {
  padding-bottom: 0;
  border-bottom: none;
}

.faq__question {
  margin-bottom: 8px;
  font-size: 19px;
  font-weight: 800;
}

.faq__answer {
  font-size: 17px;
  color: var(--color-text-soft);
}


/* ---------- 11. Оплата и поддержка ---------- */

.info-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.info-card {
  display: flex;
  flex: 1 1 440px;
  flex-direction: column;
  gap: 18px;
  min-width: 0;
  padding: 32px;
  border-radius: var(--radius-l);
}

.info-card--accent {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: var(--color-on-accent);
}

.info-card__title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 28px;
  line-height: 1.1;
}

.info-card__text {
  font-size: 16px;
}

.info-card__text--muted {
  color: var(--color-text-muted);
}

.info-card__text--strong {
  font-size: 17px;
  font-weight: 600;
}

.info-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.chip {
  padding: 10px 16px;
  border-radius: var(--radius-s);
  background: var(--color-surface-2);
  font-size: 15px;
  font-weight: 700;
}


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

.site-footer {
  border-top: 1px solid var(--color-line);
  font-size: 14px;
  color: var(--color-text-muted);
}

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 20px 40px;
  padding-top: 36px;
  padding-bottom: 44px;
}

.site-footer__about {
  display: flex;
  flex: 1 1 420px;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.site-footer__brand {
  font-family: var(--font-display);
  font-size: 18px;
  color: var(--color-text);
}

.site-footer__links {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer__links a {
  color: var(--color-text-soft);
}


/* ---------- 13. Адаптив (телефоны) ---------- */

@media (max-width: 760px) {
  .section {
    padding: 64px 0;
  }

  .section--alt {
    padding: 64px 0;
  }

  .section--tight-top {
    padding-top: 0;
  }

  .hero {
    padding: 48px 0 64px;
  }

  /* Меню сворачивается в кнопку; открывает его js/main.js */
  .nav-toggle {
    display: inline-flex;
  }

  .nav {
    display: none;
    flex-basis: 100%;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding-bottom: 8px;
  }

  .nav.is-open {
    display: flex;
  }

  .nav__list {
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
  }

  .info-card {
    padding: 24px;
  }
}

/* Для тех, у кого в системе отключена анимация */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
