/* Лендинг PREPISKA DayZ Launcher.
   Нейтральная серо-белая палитра соответствует интерфейсу лаунчера.
   Все блоки стоят на одной сетке из трёх колонок (.grid). */

/* Шрифты Inter и Oswald (SIL Open Font License 1.1), локальные копии. */
@font-face { font-family: 'Inter'; font-weight: 400 700; font-display: swap; src: url('fonts/inter-cyrillic.woff2') format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Inter'; font-weight: 400 700; font-display: swap; src: url('fonts/inter-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Oswald'; font-weight: 500 700; font-display: swap; src: url('fonts/oswald-cyrillic.woff2') format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Oswald'; font-weight: 500 700; font-display: swap; src: url('fonts/oswald-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --bg: #141414;
  --bg-deep: #111111;
  --line: #303030;
  --line-strong: #606060;
  --text: #eeeeee;
  --text-2: #c4c4c4;
  --muted: #a6a6a6;
  --accent: #eeeeee;
  --accent-hover: #cccccc;
  --accent-focus: #eeeeee;
  --display: 'Oswald', 'Arial Narrow', sans-serif;
  --gap: 48px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.6 Inter, system-ui, -apple-system, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3, p, ol { margin: 0; }
h1, h2 { font-family: var(--display); font-weight: 700; text-transform: uppercase; text-wrap: balance; }
h2 { margin-bottom: 48px; font-size: clamp(30px, 3.2vw, 44px); line-height: 1.02; }
h3 { font-size: 20px; font-weight: 650; line-height: 1.3; }
p, li { text-wrap: pretty; }
table { border-collapse: collapse; }
.num { white-space: nowrap; font-variant-numeric: tabular-nums; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--accent-focus); outline-offset: 3px; }

.container { width: min(100% - 64px, 1240px); margin-inline: auto; }
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: var(--gap); }
.section { padding-block: 112px; border-top: 1px solid var(--line); }

/* Белая основная кнопка и нейтральная второстепенная. */
.button {
  display: inline-flex; align-items: center; justify-content: center;
  height: 48px; padding: 0 22px;
  border: 1.5px solid transparent; border-radius: 10px;
  font: 600 16px/1 Inter, system-ui, sans-serif; text-decoration: none; white-space: nowrap;
  transition: background-color .15s, border-color .15s;
}
.button-primary { background: var(--accent); color: var(--bg); }
.button-primary:hover { background: var(--accent-hover); }
.button-outline { border-color: var(--line-strong); color: var(--text); }
.button-outline:hover { background: #242424; border-color: var(--accent); }
.button-large { height: 60px; padding: 0 34px; border-radius: 12px; font-size: 18px; }
.button-small { height: 40px; padding: 0 18px; font-size: 15px; }
.button.is-disabled { border-color: var(--line); background: none; color: var(--muted); cursor: default; }

/* Шапка */
.topbar { position: sticky; top: 0; z-index: 10; background: rgb(20 20 20 / .96); border-bottom: 1px solid var(--line); }
.topbar-inner { display: flex; align-items: center; gap: 32px; height: 68px; }
.logo { display: flex; align-items: center; gap: 10px; line-height: 1; text-decoration: none; }
.logo-mark { width: 44px; height: 44px; flex-shrink: 0; border-radius: 4px; }
.logo-type { display: flex; flex-direction: column; }
.logo-title { font: 700 23px/1 var(--display); letter-spacing: .04em; }
.logo-subtitle { margin-top: 4px; font: 500 10px/1 var(--display); letter-spacing: .34em; color: var(--muted); }
.topnav { display: flex; gap: 20px; margin-left: auto; }
.topnav a { color: var(--text-2); font-size: 15px; font-weight: 500; text-decoration: none; }
.topnav a:hover { color: var(--text); }

/* Первый экран: заголовок на две колонки, справа кнопка, подпись под ней — на базовой линии последней строки заголовка. */
.hero { padding-top: 80px; }
.hero .grid { align-items: last baseline; }
.hero h1 { grid-column: 1 / 3; margin-left: -.035em; font-size: clamp(44px, 6.2vw, 90px); line-height: .94; }
.hero-side { grid-column: 3; }
.lead { color: var(--text-2); font-size: 18px; line-height: 1.55; }
.hero-side .button { margin-top: 28px; }
.hero-meta { margin-top: 12px; color: var(--muted); font-size: 14px; }
.hero-shot { margin-top: 64px; }

/* Скриншоты всегда целиком, в своих пропорциях; по клику открываются в полном размере. */
.shot-link { display: block; border-radius: 12px; }
.shot { width: 100%; border: 1px solid var(--line-strong); border-radius: 12px; }

/* Сейчас в каталоге: живое число и самые населённые серверы */
.now { padding-block: 120px 112px; }
/* Подпись стоит на базовой линии цифр; пробел между разрядами ужат, иначе «4 229» читается как два числа. */
.now-head { align-items: last baseline; }
.now-number { grid-column: 1 / 3; margin-left: -.02em; font: 700 clamp(120px, 19vw, 280px)/.8 var(--display); word-spacing: -.14em; }
.now-caption { grid-column: 3; }
.live-stats { color: var(--text-2); font-size: 21px; line-height: 1.45; }
.live-stats .num { color: var(--text); font-weight: 650; }
.now-note { margin-top: 12px; color: var(--muted); font-size: 14px; }

/* Таблицы: строки — сетки по осям страницы (у <col> ширины через calc() браузеры не считают). */
.top, .top thead, .top tbody, .compare, .compare thead, .compare tbody { display: block; }
.top th, .compare th { text-align: left; }

.top-title { margin: 96px 0 20px; }
.top-title span { margin-left: 12px; color: var(--muted); font-size: 15px; font-weight: 400; }
/* «Карта» начинается на третьей оси; --c — ширина колонки сетки. */
.top tr {
  --c: calc((100% - 2 * var(--gap)) / 3);
  display: grid; grid-template-columns: 48px minmax(0, 1fr) calc(var(--c) * .46) calc(var(--c) * .3) calc(var(--c) * .24);
  border-bottom: 1px solid var(--line);
  font-variant-numeric: tabular-nums;
}
.top th { padding-bottom: 12px; color: var(--muted); font-size: 14px; font-weight: 500; }
.top td { padding-block: 16px; }
.top-rank { color: var(--muted); }
.top-name { padding-right: var(--gap); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.top-map { color: var(--text-2); }
.top .top-n { text-align: right; }

.compare tr { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: var(--gap); }
.compare tbody tr { border-top: 1px solid var(--line); }
.compare tbody tr:last-child { border-bottom: 1px solid var(--line); }
.compare thead th { padding-bottom: 16px; color: var(--muted); font-size: 15px; font-weight: 600; }
.compare thead th:last-child { color: var(--text); }
.compare tbody th { padding-block: 23px 20px; color: var(--muted); font-size: 15px; font-weight: 600; }
.compare td { padding-block: 20px; color: var(--muted); font-size: 18px; }
.compare td:last-child { color: var(--text); }

/* Возможности */
.tour-item + .tour-item { margin-top: 64px; }
.tour-text h3 { margin-bottom: 10px; }
.tour-text p { max-width: 38em; color: var(--text-2); }
.tour-tab { padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.tour-shot { margin-top: 24px; }
@media (min-width: 961px) {
  .tour.is-ready { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: repeat(4, auto) 1fr; gap: 12px var(--gap); }
  .tour.is-ready .tour-item { display: contents; }
  /* Обводка вынесена в поле, чтобы текст стоял на оси колонки. */
  .tour.is-ready .tour-text { grid-column: 1; margin-left: -29.5px; padding: 20px 28px; border: 1.5px solid var(--line-strong); border-radius: 14px; cursor: pointer; transition: border-color .15s; }
  .tour.is-ready .tour-item:nth-child(1) .tour-text { grid-row: 1; }
  .tour.is-ready .tour-item:nth-child(2) .tour-text { grid-row: 2; }
  .tour.is-ready .tour-item:nth-child(3) .tour-text { grid-row: 3; }
  .tour.is-ready .tour-item:nth-child(4) .tour-text { grid-row: 4; }
  .tour.is-ready .tour-item:not(.is-active) .tour-text:hover { border-color: #777777; }
  .tour.is-ready .tour-item:not(.is-active) .tour-text h3 { margin: 0; color: var(--text-2); }
  .tour.is-ready .tour-item:not(.is-active) .tour-text p { display: none; }
  .tour.is-ready .is-active .tour-text { border-color: var(--accent); }
  .tour.is-ready .tour-shot { grid-column: 2 / 4; grid-row: 1 / -1; align-self: start; margin: 0; opacity: 0; visibility: hidden; transition: opacity .2s, visibility 0s .2s; }
  .tour.is-ready .is-active .tour-shot { opacity: 1; visibility: visible; transition: opacity .2s; }
}
/* Пока поля страницы узкие (32 px), обводка выносится в них только наполовину. */
@media (min-width: 961px) and (max-width: 1303px) {
  .tour.is-ready .tour-text { margin-left: -16px; padding-left: 14.5px; }
}

/* Вопросы */
#faq h2, #download h2 { margin-bottom: 0; }
.faq-list { grid-column: 2 / 4; }
details { border-bottom: 1px solid var(--line); }
details:first-of-type { border-top: 1px solid var(--line); }
summary { position: relative; padding: 20px 48px 20px 0; cursor: pointer; list-style: none; font-size: 18px; font-weight: 600; }
summary::-webkit-details-marker { display: none; }
summary::after {
  content: ''; position: absolute; right: 8px; top: 50%; width: 10px; height: 10px;
  border-right: 1.5px solid var(--muted); border-bottom: 1.5px solid var(--muted);
  transform: translateY(-75%) rotate(45deg); transition: transform .2s;
}
details[open] summary::after { transform: translateY(-25%) rotate(-135deg); }
details p { max-width: 38em; padding-bottom: 24px; color: var(--text-2); }

/* Установка */
.download-main { grid-column: 2 / 4; }
.cta-meta { margin-top: 12px; color: var(--muted); font-size: 14px; }
.steps { margin-top: 48px; padding: 0; list-style: none; counter-reset: step; }
.steps li { position: relative; padding: 18px 0 18px 36px; border-top: 1px solid var(--line); color: var(--text-2); counter-increment: step; }
.steps li:last-child { border-bottom: 1px solid var(--line); }
.steps li::before { content: counter(step); position: absolute; left: 0; color: var(--text); font-weight: 650; }
.checksum { margin-top: 24px; color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.checksum code { color: var(--text-2); font: 13px/1.5 ui-monospace, 'Cascadia Mono', Consolas, monospace; }

/* Подвал */
.footer { padding-block: 28px; background: var(--bg-deep); border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; }

/* Адаптив */
@media (max-width: 1199px) {
  /* Заголовку нужны две полные колонки; на экране поуже кнопка уходит под него. */
  .hero .grid { grid-template-columns: minmax(0, 1fr); }
  .hero h1, .hero-side { grid-column: 1; }
  .hero-side { max-width: 34em; margin-top: 28px; }
  .hero-shot { margin-top: 48px; }
}
@media (max-width: 960px) {
  .topbar-inner { height: auto; min-height: 68px; flex-wrap: wrap; padding-block: 12px; }
  .topnav { display: flex; order: 3; width: 100%; margin: 0; flex-wrap: wrap; gap: 12px 20px; }
  .topbar-inner > .button { margin-left: auto; }
  .topbar-inner { justify-content: space-between; }
  .grid { grid-template-columns: minmax(0, 1fr); }
  .now-number, .now-caption, .faq-list, .download-main { grid-column: 1; }
  .hero { padding-top: 56px; }
  .now-caption { max-width: 30em; margin-top: 24px; }
  #faq h2, #download h2 { margin-bottom: 32px; }
  .top tr { grid-template-columns: 40px minmax(0, 1fr) 132px 96px 64px; }
  .compare tr { grid-template-columns: minmax(0, .8fr) minmax(0, 1fr) minmax(0, 1fr); column-gap: 32px; }
}
@media (max-width: 640px) {
  :root { --gap: 16px; }
  .container { width: calc(100% - 32px); }
  body { font-size: 16px; }
  h2 { margin-bottom: 32px; }
  .section { padding-block: 80px; }
  .hero { padding-top: 44px; }
  .hero-side .button, .download-main .button { width: 100%; }
  .now { padding-block: 72px; }
  .live-stats { font-size: 19px; }
  /* На телефоне скриншоты от края до края: так интерфейс на них ещё можно разглядеть. */
  .shot-link { margin-inline: -16px; border-radius: 0; }
  .shot { border-inline: 0; border-radius: 0; }
  .tour-item + .tour-item { margin-top: 56px; }
  summary { font-size: 17px; }

  /* Таблицы на телефоне: у строки две строчки, к значениям подписи вместо шапки. */
  .top-title { margin-top: 64px; }
  .top-title span { display: block; margin: 4px 0 0; }
  .top thead, .compare thead { display: none; }
  .top tr { grid-template-columns: 24px minmax(0, 1fr) auto auto; gap: 2px 16px; padding-block: 14px; }
  .top tbody tr:first-child { border-top: 1px solid var(--line); }
  .top td { padding: 0; }
  .top-rank { grid-row: 1 / 3; }
  .top-name { grid-column: 2 / 5; padding-right: 0; }
  .top-map { grid-row: 2; grid-column: 2; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: var(--muted); font-size: 14px; }
  .top .top-n { grid-row: 2; color: var(--muted); font-size: 14px; text-align: left; }
  .top .top-n::before { content: attr(data-label) ' '; }
  .compare tr { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 6px 16px; padding-block: 16px; }
  .compare tbody th, .compare td { padding: 0; }
  .compare tbody th { grid-column: 1 / -1; font-size: 14px; }
  .compare td { font-size: 16px; }
  .compare td::before { content: attr(data-label); display: block; color: var(--muted); font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
