/* Главная страница — витрина сервиса. Всё остальное на сайте отвечает на
   вопрос «сколько осталось»; здесь отвечают на вопрос «что это вообще такое
   и зачем оно мне».

   Приёмы те же, что и в app.css: тёмный фон, один янтарный акцент, никаких
   картинок и внешних шрифтов — страница обязана открываться мгновенно с
   телефона в роуминге. Разница в масштабе: на витрине крупный шрифт и воздух
   работают вместо иллюстраций, которых у нас нет. */

/* ── общий каркас витрины ──────────────────────────────────────────────── */

.land { margin-top: 10px; }
.land section { margin-bottom: 78px; }
.land section:last-child { margin-bottom: 30px; }

/* Полоса фактов — подпись к первому экрану, а не отдельный раздел: между ней
   и заголовком не должно быть провала в полтора экрана. */
.land section.hero-big { margin-bottom: 0; }
.land section.facts-strip { margin-bottom: 78px; }

.land .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--dim);
  margin-bottom: 16px;
}

.land .eyebrow::before {
  content: "";
  width: 18px;
  height: 1px;
  background: var(--accent-line);
}

.land h2.big {
  margin: 0 0 14px;
  font-size: 28px;
  line-height: 1.18;
  font-weight: 600;
  letter-spacing: -0.8px;
  color: #fbfbfc;
  text-transform: none;
}

.land .lead {
  margin: 0;
  max-width: 620px;
  font-size: 15px;
  line-height: 1.65;
  color: var(--muted);
  text-wrap: pretty;
}

/* ── первый экран ──────────────────────────────────────────────────────── */

.hero-big { padding: 46px 0 8px; }

.hero-big h1 {
  margin: 0 0 20px;
  font-size: clamp(34px, 7vw, 60px);
  line-height: 1.04;
  font-weight: 650;
  letter-spacing: -2.2px;
  color: #fcfcfd;
  text-wrap: balance;
}

/* Единственное цветное слово на экране — то, ради чего сюда пришли. */
.hero-big h1 .hl { color: var(--accent); }

.hero-big .sub {
  margin: 0 0 30px;
  max-width: 560px;
  font-size: 16.5px;
  line-height: 1.62;
  color: var(--muted);
  text-wrap: pretty;
}

.hero-big .cta { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.btn.lg { padding: 12px 22px; font-size: 14.5px; border-radius: 11px; }

/* Строка с адресом сервера: её копируют первой, поэтому она отдельным
   предметом, а не абзацем текста. */
.endpoint-line {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 26px;
  padding: 9px 9px 9px 14px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.018);
  max-width: 100%;
}

.endpoint-line .val { font-family: var(--mono); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.endpoint-line .tag { font-size: 11.5px; color: var(--dim); flex: none; }

/* Полоса фактов под первым экраном. Ни рамок, ни плашек — только волосяные
   разделители: это подпись к заголовку, а не отдельный блок. */
.facts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-top: 44px;
  padding-top: 26px;
  border-top: 1px solid var(--line-soft);
}

.facts > div + div { border-left: 1px solid var(--line-soft); padding-left: 20px; }
.facts .k { font-size: 14px; font-weight: 600; color: var(--text); letter-spacing: -0.2px; }
.facts .v { margin-top: 5px; font-size: 12.5px; color: var(--dim); line-height: 1.5; }

@media (max-width: 760px) {
  .facts { grid-template-columns: 1fr 1fr; gap: 16px; }
  .facts > div:nth-child(2n + 1) { border-left: 0; padding-left: 0; }
}

@media (max-width: 420px) {
  .facts { grid-template-columns: 1fr; }
  .facts > div + div { border-left: 0; padding-left: 0; padding-top: 14px; border-top: 1px solid var(--line-soft); }
}

/* ── как это работает: три звена ───────────────────────────────────────── */

.flow {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  align-items: stretch;
  gap: 12px;
  margin-top: 26px;
}

.flow .node {
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 18px;
  background: var(--surface);
}

/* Среднее звено — это мы, и на схеме это должно быть видно без подписи. */
.flow .node.us { border-color: var(--accent-line); background: var(--accent-soft); }
.flow .node .t { font-size: 14px; font-weight: 600; letter-spacing: -0.2px; }
.flow .node.us .t { color: var(--accent); }
.flow .node .d { margin-top: 7px; font-size: 12.5px; color: var(--muted); line-height: 1.55; }

.flow .arrow {
  align-self: center;
  color: var(--dim);
  font-size: 15px;
  padding: 0 2px;
}

@media (max-width: 820px) {
  .flow { grid-template-columns: 1fr; }
  .flow .arrow { transform: rotate(90deg); padding: 2px 0; text-align: center; }
}

/* ── сетка возможностей ────────────────────────────────────────────────── */

.feat { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line-soft); border: 1px solid var(--line-soft); border-radius: 14px; overflow: hidden; margin-top: 26px; }

/* Разделители нарисованы фоном сетки, поэтому у каждой ячейки просто своя
   заливка — так рамки не удваиваются на стыках. */
.feat > div { background: var(--bg); padding: 22px; transition: background 0.16s; }
.feat > div:hover { background: var(--surface); }
.feat .t { font-size: 14.5px; font-weight: 600; letter-spacing: -0.2px; margin-bottom: 8px; }
.feat .d { font-size: 13px; color: var(--muted); line-height: 1.6; }
.feat .d code { font-family: var(--mono); font-size: 12px; color: var(--text); }

@media (max-width: 860px) { .feat { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .feat { grid-template-columns: 1fr; } }

/* ── цена ──────────────────────────────────────────────────────────────── */

.price-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 22px; align-items: start; margin-top: 26px; }
@media (max-width: 780px) { .price-grid { grid-template-columns: 1fr; } }

.formula {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #0b0b0d;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.7;
}

.formula .op { color: var(--dim); }
.formula .x { color: var(--accent); }
/* Слагаемое переносится целиком: «1,25 × запись кэша» разрывать нельзя. */
.formula .term { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }

.rate-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  padding: 11px 0;
  border-top: 1px solid var(--line-soft);
  font-size: 13.5px;
}

.rate-row:first-child { border-top: 0; }
.rate-row .n { font-family: var(--mono); font-variant-numeric: tabular-nums; color: var(--text); }
.rate-row .l { color: var(--muted); }

/* ── вопросы ───────────────────────────────────────────────────────────── */

.qa { margin-top: 22px; border-top: 1px solid var(--line-soft); }

.qa details { border-bottom: 1px solid var(--line-soft); }

.qa summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  cursor: pointer;
  list-style: none;
  user-select: none;
  padding: 17px 2px;
  font-size: 14.5px;
  color: var(--text);
  transition: color 0.15s;
}

.qa summary::-webkit-details-marker { display: none; }
.qa summary:hover { color: var(--accent); }

.qa summary::after {
  content: "+";
  flex: none;
  color: var(--dim);
  font-size: 17px;
  line-height: 1;
  transition: transform 0.2s var(--ease), color 0.15s;
}

.qa details[open] summary::after { transform: rotate(45deg); color: var(--accent); }
.qa details[open] summary { color: var(--text); }
.qa .a { padding: 0 2px 18px; font-size: 13.5px; line-height: 1.68; color: var(--muted); max-width: 700px; }
.qa .a code { font-family: var(--mono); font-size: 12.5px; color: var(--text); }

/* ── итоговый призыв ───────────────────────────────────────────────────── */

.final {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 44px 34px;
  text-align: center;
  background:
    radial-gradient(120% 140% at 50% -30%, rgba(240, 160, 40, 0.07), transparent 60%),
    var(--surface);
}

.final h2 { margin: 0 0 12px; font-size: 26px; font-weight: 600; letter-spacing: -0.7px; color: #fbfbfc; text-transform: none; }
.final p { margin: 0 auto 24px; max-width: 460px; font-size: 14.5px; line-height: 1.6; color: var(--muted); text-wrap: balance; }
.final .cta { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* ── шапка витрины ─────────────────────────────────────────────────────── */
/* На широком экране страница шире карточной вёрстки баланса, поэтому у неё
   свой контейнер: колонка в 620 пикселей для витрины слишком узкая. */

.wrap-site { max-width: 940px; margin: 0 auto; }

/* Витрине нужна широкая колонка, а карточкам баланса и гайду — нет: строка
   длиннее восьмидесяти знаков читается через силу. Поэтому широкий контейнер
   один на всю страницу, а эти три вида сужены внутри него. */
#view-gate, #view-balance, #view-setup { max-width: 640px; margin: 0 auto; }

/* Меню страниц липнет к верху: витрина длинная, и уйти с неё на «Баланс»
   должно быть можно из любого места, не отматывая наверх. Фон непрозрачный, а
   не размытый: размытие под липкой панелью пересчитывается на каждом кадре
   прокрутки и заметно дёргает страницу на слабой видеокарте. */
.site-top {
  position: sticky;
  top: 0;
  z-index: 40;
  margin: -40px -20px 30px;
  padding: 0 20px;
  background: #0a0a0b;
  border-bottom: 1px solid var(--line-soft);
}

.site-top .top { margin-bottom: 0; border-bottom: 0; }

@media (max-width: 560px) {
  .site-top { margin-left: -20px; margin-right: -20px; }
  .hero-big { padding-top: 22px; }
  .land section { margin-bottom: 66px; }
}
