@charset "UTF-8";
/* MusicWars.browsergamebots.com — чистый адаптивный стиль без внешних зависимостей.
   Палитра — от ключевого арта игры: тёмный бирюзовый фон, золотой акцент колонок. */

:root {
  --bg: #f4f6f8;
  --card: #ffffff;
  --text: #23272e;
  --muted: #67707d;
  --accent: #d98f2b;
  --accent-dark: #b4741a;
  --header-1: #0d1b21;
  --header-2: #12333d;
  --nav-bg: #16282e;
  --border: #e3e7ec;
  --radius: 12px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.65 -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  -webkit-text-size-adjust: 100%;
}

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

picture { display: block; }

a { color: var(--accent-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { max-width: 1080px; margin: 0 auto; padding: 0 20px; }

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

.site-header {
  position: relative;
  color: #fff;
  background-color: var(--header-1);
  background-image:
    linear-gradient(100deg, rgba(8, 18, 23, 0.82) 0%, rgba(13, 27, 33, 0.6) 45%, rgba(18, 51, 61, 0.45) 100%),
    url("../img/header-a-keyart.jpg");
  background-position: center top, center top;
  background-size: cover, cover;
  background-repeat: no-repeat, no-repeat;
}

/* WebP-версия фона: легче JPEG на ~50 % */
@supports (background-image: image-set(url("x") type("image/webp"))) {
  .site-header {
    background-image:
      linear-gradient(100deg, rgba(8, 18, 23, 0.82) 0%, rgba(13, 27, 33, 0.6) 45%, rgba(18, 51, 61, 0.45) 100%),
      image-set(url("../img/header-a-keyart.webp") type("image/webp"));
  }
}


.header-inner {
  padding: 34px 20px 26px;
}

.brand-name {
  margin: 0 0 6px;
  font-size: clamp(22px, 3.4vw, 34px);
  line-height: 1.2;
  letter-spacing: 0.2px;
  font-weight: 700;
}

.brand-name a { color: #fff; }
.brand-name a:hover { text-decoration: none; }

.brand-tagline {
  margin: 0;
  max-width: 640px;
  color: rgba(255, 255, 255, 0.85);
  font-size: clamp(14px, 2vw, 17px);
}

/* FAQ */

.faq-item { margin-bottom: 18px; }
.faq-item:last-child { margin-bottom: 0; }
.faq-item h3 { margin: 0 0 6px; font-size: 17px; line-height: 1.35; }
.faq-item p { margin: 0; color: #3c4550; }

/* Пропуск навигации для клавиатуры */

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: #fff;
  padding: 10px 16px;
  border-radius: 0 0 8px 0;
  z-index: 200;
}

.skip-link:focus { left: 0; }

/* ---------- Меню ---------- */

.main-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--nav-bg);
  box-shadow: 0 2px 10px rgba(10, 16, 22, 0.25);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  color: #fff;
  font-size: 15px;
  letter-spacing: 0.4px;
  padding: 12px 0;
  cursor: pointer;
}

.nav-toggle:focus { outline: 2px solid var(--accent); outline-offset: 2px; }

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

.nav-list a {
  display: block;
  padding: 13px 18px;
  color: #c3ced9;
  font-size: 15px;
  border-bottom: 3px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}

.nav-list a:hover { color: #fff; text-decoration: none; }

.nav-list a.active {
  color: #fff;
  border-bottom-color: var(--accent);
}

/* ---------- Контент ---------- */

main.container { padding: 32px 20px; }

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 30px;
  margin-bottom: 24px;
}

/* Отступ от меню до первого блока равен отступу от последнего блока до футера */
.card:last-of-type { margin-bottom: 0; }

.page-title {
  margin: 0 0 14px;
  font-size: clamp(21px, 3vw, 28px);
  line-height: 1.25;
}

.lead { color: var(--muted); font-size: 17px; margin: 0 0 18px; }

.card p { margin: 0 0 14px; }
.card p:last-child { margin-bottom: 0; }

/* Отступ перед абзацем, который идёт сразу после списка (напр. «Это не весь список…») */
.card ul + p { margin-top: 18px; }

/* Подзаголовки внутри текстовых блоков (Контакты, Напомнить ключ) */
.card h2:not(.page-title) {
  margin: 26px 0 10px;
  font-size: 19px;
  line-height: 1.3;
}
.card h2:not(.page-title):first-of-type { margin-top: 20px; }

/* Список возможностей */

.features {
  list-style: none;
  margin: 16px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 28px;
}

.features li {
  position: relative;
  padding-left: 26px;
  margin: 0;
}

.features li::before {
  content: "\2714";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--accent);
  font-weight: 700;
}

.features.wide { grid-template-columns: 1fr; }

/* Кнопки */

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 22px 0 6px;
}

/* Отступ после ряда кнопок перед следующим текстом */
.btn-row + p { margin-top: 18px; }

/* Кнопка онлайн-магазина в обычной строке текста (страница «Приобрести ключ») */
.buy-line { margin: 18px 0 6px; }

.buy-line .btn { padding: 11px 22px; }


.btn {
  display: inline-block;
  padding: 11px 22px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 15px;
  text-align: center;
  transition: background 0.15s, transform 0.1s;
}

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

.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); color: #fff; }

.btn-ghost { background: transparent; color: var(--accent-dark); border: 1.5px solid var(--accent); }
.btn-ghost:hover { background: rgba(232, 112, 26, 0.08); }

/* ---------- Карусель ---------- */

.carousel { position: relative; }

.car-viewport {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  border-radius: var(--radius);
  background: #eef1f4;
  border: 1px solid var(--border);
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.car-viewport::-webkit-scrollbar { display: none; }

.car-slide {
  flex: 0 0 100%;
  scroll-snap-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 220px;
  max-height: 560px;
}

.car-slide img {
  max-height: 560px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
}

.car-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: var(--nav-bg);
  box-shadow: 0 2px 10px rgba(20, 30, 40, 0.18);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}

.car-arrow:hover { background: #fff; }
.car-arrow.prev { left: 12px; }
.car-arrow.next { right: 12px; }

.car-dots {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 7px;
  padding: 14px 8px 4px;
}

.car-dots button {
  width: 9px;
  height: 9px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #c8cfd8;
  cursor: pointer;
  transition: background 0.15s, transform 0.15s;
}

.car-dots button.active { background: var(--accent); transform: scale(1.25); }

.car-caption {
  text-align: center;
  color: var(--muted);
  font-size: 14px;
  margin-top: 10px;
  min-height: 1.4em;
}

/* Лента миниатюр */

.car-thumbs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 12px 2px 2px;
  scrollbar-width: thin;
}

.car-thumbs button {
  flex: 0 0 auto;
  width: 96px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 6px;
  background: none;
  cursor: pointer;
  opacity: 0.75;
  transition: opacity 0.15s, border-color 0.15s;
}

.car-thumbs button img { width: 100%; height: 68px; object-fit: cover; border-radius: 4px; }

.car-thumbs button:hover { opacity: 1; }
.car-thumbs button.active { border-color: var(--accent); opacity: 1; }

/* ---------- Галерея ---------- */

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}

.gallery button {
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  cursor: pointer;
  transition: box-shadow 0.15s, transform 0.15s;
}

.gallery button:hover {
  box-shadow: 0 4px 16px rgba(20, 30, 40, 0.14);
  transform: translateY(-2px);
}

.gallery img { width: 100%; height: 160px; object-fit: cover; }

/* ---------- Лайтбокс ---------- */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(10, 14, 18, 0.92);
}

.lightbox.open { display: flex; }

.lightbox img {
  max-width: min(92vw, 1100px);
  max-height: 86vh;
  object-fit: contain;
  border-radius: 6px;
}

.lb-btn {
  position: absolute;
  border: 0;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  cursor: pointer;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}

.lb-btn:hover { background: rgba(255, 255, 255, 0.28); }

.lb-close { top: 18px; right: 18px; width: 40px; height: 40px; font-size: 20px; }
.lb-prev, .lb-next { top: 50%; transform: translateY(-50%); width: 48px; height: 48px; font-size: 22px; }
.lb-prev { left: 14px; }
.lb-next { right: 14px; }

.lb-count {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.8);
  font-size: 14px;
}

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

.site-footer {
  background: var(--nav-bg);
  color: #9aa7b4;
  padding: 20px 0;
  font-size: 14px;
}

.site-footer .container {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 24px;
  justify-content: space-between;
}

.site-footer a { color: #c3ced9; }

/* ---------- Адаптив ---------- */

@media (max-width: 720px) {
  .header-inner { padding: 24px 20px 20px; }

  .nav-toggle { display: block; }

  .nav-list {
    display: none;
    flex-direction: column;
    padding: 4px 0 10px;
  }

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

  .nav-list a {
    border-bottom: 0;
    border-left: 3px solid transparent;
    padding: 11px 18px;
  }

  .nav-list a.active { border-left-color: var(--accent); }

  .card { padding: 20px 18px; }

  .features { grid-template-columns: 1fr; }

  .car-slide { min-height: 180px; }
  .car-slide img { max-height: 420px; }

  .car-arrow { width: 36px; height: 36px; }
  .car-arrow.prev { left: 6px; }
  .car-arrow.next { right: 6px; }

  .site-footer .container { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .gallery button, .car-arrow { transition: none; }
}
