:root {
  --ink: #16302b;
  --ink-soft: #3d5a54;
  --bg: #f7f4ee;
  --card: #ffffff;
  --accent: #e8873a;
  --accent-dark: #c96a1e;
  --teal: #14655a;
  --line: #e3ddd0;
  --radius: 16px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
}
.wrap { max-width: 760px; margin: 0 auto; padding: 0 18px 48px; }
a { color: var(--teal); }

/* Header */
header.site {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 0 8px;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand .logo { width: 44px; height: 34px; flex: none; }
.brand .names { line-height: 1.15; }
.brand .names .company { font-weight: 800; letter-spacing: .14em; font-size: 15px; }
.brand .names .product { font-size: 14px; color: var(--ink-soft); font-weight: 600; }
.lang-switch { display: flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; background: var(--card); }
.lang-switch a {
  padding: 7px 14px; font-size: 14px; font-weight: 700; text-decoration: none; color: var(--ink-soft);
}
.lang-switch a.active { background: var(--teal); color: #fff; }

/* Hero */
.hero {
  background: linear-gradient(160deg, #0e3a34 0%, #14655a 55%, #1d7a68 100%);
  border-radius: 24px;
  color: #fff;
  padding: 28px 22px 30px;
  margin-top: 10px;
  text-align: center;
  overflow: hidden;
}
.hero .globe { width: 190px; height: 190px; margin: 2px auto 10px; display: block; }
.hero h1 { font-size: 27px; line-height: 1.25; margin: 6px 0 12px; font-weight: 800; }
.hero p { margin: 0 auto 20px; max-width: 520px; color: #d9efe9; font-size: 16px; }
.btn {
  display: inline-block; background: var(--accent); color: #fff; text-decoration: none;
  font-weight: 800; font-size: 17px; padding: 14px 30px; border-radius: 999px;
  border: none; cursor: pointer;
}
.btn:hover { background: var(--accent-dark); }
.btn.block { display: block; width: 100%; text-align: center; }

/* Hero with live globe */
.hero-map {
  position: relative; padding: 0; text-align: left;
  min-height: 560px;
}
#globe { position: absolute; inset: 0; border-radius: 24px; overflow: hidden; background: #0b2e29; }
#globe canvas { outline: none; }
/* Переделка главного экрана (решение владельца, 20.11.2026): экран карты —
   ЧИСТАЯ карта: на ней только глобус, легенда статусов и контролы карты.
   В блоке СРАЗУ ПОД картой (.hero-caption) первым рядом идёт поиск целиком,
   под ним — заголовок, текст и кнопка регистрации. Поэтому вращению глобуса
   по всей площади карты ничто не мешает.
   Правила правки №1 при этом сохранены: текст на карте нельзя выделить
   (user-select: none), легенда пропускает перетаскивание сквозь себя
   (pointer-events: none). */
.hero-map, .map-legend {
  -webkit-user-select: none;
  user-select: none;
}
.map-legend { pointer-events: none; }
.map-search input { -webkit-user-select: text; user-select: text; }

/* Блок-подпись под картой: обычный светлый блок в стиле соседних секций. */
.hero-caption h1 { font-size: 27px; line-height: 1.25; margin: 0 0 12px; font-weight: 800; }
.hero-caption p { margin: 0 0 16px; max-width: 560px; color: var(--ink-soft); }
.map-search { display: flex; gap: 8px; margin: 0 0 16px; width: 100%; max-width: none; flex-wrap: nowrap; }
.map-search input {
  flex: 1; min-width: 0; padding: 13px 16px; font-size: 16px;
  border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--ink);
}
.map-search button {
  flex: none; cursor: pointer; border-radius: 999px;
  padding: 0 18px; font-size: 15px; font-weight: 800;
  background: #eef3f1; color: var(--teal); border: 1px solid var(--line);
}
.map-search button.go { background: var(--accent); border-color: var(--accent); color: #fff; }
.map-search-hint { min-height: 18px; font-size: 13px; color: var(--accent-dark); margin: -6px 0 10px; }
.maplibregl-ctrl-attrib { font-size: 10px; }
.map-legend {
  position: absolute; top: 12px; left: 12px; z-index: 3;
  background: rgba(9, 36, 31, .74); backdrop-filter: blur(4px);
  border-radius: 12px; padding: 9px 12px; color: #eaf5f1;
  font-size: 12.5px; line-height: 1.35; max-width: 240px;
}
.map-legend .lg-item { display: flex; align-items: center; gap: 8px; padding: 2.5px 0; }
.map-legend .dot { flex: none; width: 11px; height: 11px; border-radius: 50%; border: 1.5px solid rgba(255,255,255,.75); }
.map-legend .dot-sleep { background: #93a7a2; opacity: .75; }
.map-legend .dot-ready { background: #2fe673; box-shadow: 0 0 9px 3px rgba(47, 230, 115, .85); }
.map-legend .dot-busy { background: #ffb020; }

/* Sections */
section.block {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; margin-top: 18px;
}
section.block h2 { margin: 0 0 14px; font-size: 21px; }
section.block p { margin: 0 0 10px; }
.steps { display: grid; gap: 12px; }
.step { display: flex; gap: 14px; align-items: flex-start; }
.step .num {
  flex: none; width: 34px; height: 34px; border-radius: 50%;
  background: var(--teal); color: #fff; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
}
.step .step-title { font-weight: 700; }
.step .step-text { color: var(--ink-soft); font-size: 15px; }

table.rates { width: 100%; border-collapse: collapse; font-size: 15px; }
table.rates th, table.rates td { padding: 10px 8px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
table.rates th { color: var(--ink-soft); font-size: 11.5px; text-transform: uppercase; letter-spacing: .02em; }
table.rates td.rate { font-weight: 800; white-space: nowrap; }
.note { color: var(--ink-soft); font-size: 14px; }

ul.rules { margin: 0; padding-left: 20px; }
ul.rules li { margin-bottom: 8px; }

section.block.warm { background: #fdf3e7; border-color: #f0dcbf; }

details.faq { border-bottom: 1px solid var(--line); padding: 10px 0; }
details.faq:last-child { border-bottom: none; }
details.faq summary { font-weight: 700; cursor: pointer; padding: 4px 0; }
details.faq p { color: var(--ink-soft); margin: 6px 0 8px; }

/* Form */
form.reg { display: grid; gap: 14px; }
.field label { display: block; font-weight: 700; margin-bottom: 6px; font-size: 15px; }
.field .hint { font-weight: 400; color: var(--ink-soft); font-size: 13px; }
.field input[type="text"], .field input[type="email"] {
  width: 100%; padding: 13px 14px; font-size: 16px;
  border: 1px solid var(--line); border-radius: 12px; background: #fff; color: var(--ink);
}
.radio-row { display: flex; flex-wrap: wrap; gap: 8px; }
.radio-row label {
  display: inline-flex; align-items: center; gap: 7px;
  border: 1px solid var(--line); border-radius: 999px; padding: 9px 15px;
  font-weight: 600; cursor: pointer; background: #fff; margin: 0;
}
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; }
.check input { width: 20px; height: 20px; margin-top: 2px; flex: none; }
.error { color: #b3261e; font-size: 14px; min-height: 18px; }
.field.invalid input { border-color: #b3261e; }

.thanks { text-align: center; padding: 40px 22px; }
.thanks .mark {
  width: 72px; height: 72px; border-radius: 50%; background: var(--teal); color: #fff;
  font-size: 38px; display: flex; align-items: center; justify-content: center; margin: 0 auto 16px;
}

footer.site { margin-top: 26px; text-align: center; color: var(--ink-soft); font-size: 14px; }
footer.site .slogan { font-weight: 700; color: var(--ink); }

@media (max-width: 699px) {
  .hero-map { min-height: 480px; }
  .map-legend { font-size: 11.5px; max-width: 208px; padding: 7px 10px; }
  .hero-caption h1 { font-size: 24px; }
  .map-search { gap: 6px; }
  .map-search input { padding: 12px 13px; }
  .map-search button { padding: 0 12px; }
}

@media (min-width: 700px) {
  .hero-caption h1 { font-size: 32px; }
  .hero .globe { width: 230px; height: 230px; }
  .steps { grid-template-columns: 1fr 1fr 1fr; }
  .step { flex-direction: column; }
}

/* Широкая карта на компьютере (решение директора, 20.11.2026): на широких
   экранах блок карты выходит за пределы текстовой колонки (760px) симметрично
   по центру — до 1240px, но никогда не ближе ~24px к краям окна; высота
   соразмерно увеличена, чтобы планета выглядела крупной. Блок-подпись и все
   секции остаются в обычной колонке. На телефоне и планшете — без изменений:
   карта во всю ширину колонки, как раньше. */
@media (min-width: 1024px) {
  .hero-map {
    width: min(1240px, calc(100vw - 48px));
    position: relative;
    left: 50%;
    transform: translateX(-50%);
    min-height: 680px;
  }
}

/* Навигация по дверям сайта (заказчик / вопрос) — одна строка под шапкой. */
.page-nav {
  display: flex; gap: 20px; justify-content: flex-end;
  padding: 4px 2px 0; font-size: 14.5px; font-weight: 600;
}

/* Модуль вопросов: форма «Задать вопрос» (partials/question-form.html +
   assets/question.js). Свои классы поверх общих стилей форм. */
.field textarea {
  width: 100%; padding: 13px 14px; font-size: 16px;
  border: 1px solid var(--line); border-radius: 12px; background: #fff; color: var(--ink);
  font-family: inherit; line-height: 1.5; resize: vertical;
}
.field.invalid textarea { border-color: #b3261e; }
form.qform[hidden] { display: none; }
.q-sent { text-align: center; padding: 18px 0 8px; }
.q-sent .mark {
  width: 64px; height: 64px; border-radius: 50%; background: var(--teal); color: #fff;
  font-size: 34px; display: flex; align-items: center; justify-content: center; margin: 0 auto 12px;
}
.q-sent h3 { margin: 0 0 8px; font-size: 19px; }
.q-sent p { color: var(--ink-soft); margin: 0; }
