/* Лендинг и публичная зона (SPEC-landing §4; визуальная основа — прототип,
   ADR-006). Все стили — в файле: CSP публичной зоны запрещает inline
   (SPEC-landing §7.2). Шрифты self-hosted (IBM Plex, OFL) — без внешних
   хостов и утечки IP посетителей третьим сторонам. */

@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/static/fonts/ibm-plex-sans-latin-400-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/static/fonts/ibm-plex-sans-latin-500-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/static/fonts/ibm-plex-sans-latin-600-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/static/fonts/ibm-plex-mono-latin-400-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/static/fonts/ibm-plex-mono-latin-500-normal.woff2') format('woff2');
}

:root {
  color-scheme: light;
  --bg: #f6f7f9;
  --surface: #fff;
  --surface-2: #f8f9fb;
  --text: #1c1f24;
  --text-secondary: #5b616b;
  --text-muted: #9aa0aa;
  --border: #e7e9ee;
  --border-strong: #d5d9de;
  --divider: #f2f3f5;
  --accent: #2f6bff;
  --accent-dark: #1f4fd6;
  --green: #22b364;
  --green-dark: #167c4a;
  --green-bg: #eafaf0;
  --error: #c2372f;
  --font-mono: 'IBM Plex Mono', ui-monospace, Menlo, monospace;
  --shadow-card: 0 1px 2px rgba(20, 24, 33, 0.04);
}

* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
}
body {
  font-family: 'IBM Plex Sans', system-ui, sans-serif;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-size: 14px;
  line-height: 1.5;
}
a {
  color: var(--accent);
  text-decoration: none;
}
a:hover {
  color: var(--accent-dark);
}
button,
input,
textarea {
  font-family: inherit;
  font-size: inherit;
}

@keyframes livePulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(0.72);
    opacity: 0.55;
  }
}

.page {
  max-width: 1000px;
  margin: 0 auto;
  padding: 20px clamp(12px, 3vw, 28px) 64px;
}

/* ---------- topbar ---------- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 6px 2px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
}
.brand-center {
  justify-content: center;
  margin-bottom: 20px;
}
.brand-logo {
  position: relative;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.brand-letter {
  font-family: var(--font-mono);
  font-weight: 500;
  color: #fff;
  font-size: 15px;
}
.brand-dot {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--green);
  border: 2px solid var(--bg);
  animation: livePulse 1.8s ease-in-out infinite;
}
.brand-name {
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.2px;
}
.topnav {
  display: flex;
  gap: 3px;
  flex-wrap: wrap;
}
.navlink {
  color: var(--text-secondary);
  font-size: 13px;
  padding: 7px 13px;
  border-radius: 8px;
}
.navlink:hover {
  background: #eef0f3;
  color: var(--text);
}
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  height: 36px;
  padding: 0 16px;
  cursor: pointer;
  font-size: 13px;
  border: none;
}
.btn-primary {
  background: var(--text);
  color: #fff;
  font-weight: 500;
}
.btn-primary:hover {
  background: #000;
  color: #fff;
}
.btn-secondary {
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text);
}
.btn-secondary:hover {
  background: #fafbfc;
  color: var(--text);
}
.btn-lg {
  height: 44px;
  padding: 0 24px;
  font-size: 14px;
  border-radius: 10px;
}
.btn-block {
  width: 100%;
  height: 40px;
  font-size: 13.5px;
}
.btn[disabled] {
  opacity: 0.6;
  cursor: default;
}

/* ---------- hero ---------- */
.hero {
  text-align: center;
  padding: 64px 12px 52px;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--green-bg);
  color: var(--green-dark);
  font-size: 12px;
  font-weight: 500;
  padding: 5px 12px;
  border-radius: 20px;
  margin-bottom: 20px;
}
.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  animation: livePulse 1.6s ease-in-out infinite;
}
.hero-title {
  margin: 0 0 14px;
  font-size: clamp(30px, 5vw, 46px);
  font-weight: 600;
  letter-spacing: -1.5px;
  line-height: 1.08;
}
.hero-sub {
  max-width: 560px;
  margin: 0 auto 26px;
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.55;
}
.hero-cta {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ---------- cards ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px 26px;
  box-shadow: var(--shadow-card);
  margin-top: 16px;
}
.card-title {
  margin: 0 0 6px;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.4px;
}
.card-sub {
  margin: 0 0 20px;
  font-size: 13px;
  color: var(--text-muted);
}
.card-note {
  margin: 14px 0 0;
  font-size: 12px;
  color: var(--text-muted);
}

/* ---------- how it works ---------- */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}
.step {
  background: var(--surface-2);
  border-radius: 12px;
  padding: 16px 17px;
}
.step-num {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.step-title {
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 6px;
}
.step-text {
  margin: 0;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.55;
}
.key {
  font-family: var(--font-mono);
  background: var(--green-bg);
  color: var(--green-dark);
  padding: 1px 6px;
  border-radius: 5px;
  font-size: 11.5px;
}

/* ---------- coverage & pricing ---------- */
.two-col {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 14px;
}
.two-col .card {
  margin-top: 16px;
  padding: 24px;
  /* Растянутая гридом карточка (stretch) держит содержимое прижатым к
     верху — под ценами Pricing не появляется пустого поля (ADR-041) */
  display: flex;
  flex-direction: column;
}
/* Выравнивание строк двух карточек (задача TASK-landing-coverage-pricing-align).
   Заголовок, подзаголовок, список и примечание — четыре ряда СЕКЦИИ, которые
   карточки делят через subgrid. Поэтому списки стартуют и заканчиваются на
   одной высоте при любой ширине: ряд подзаголовка сам подстраивается под
   более высокий из двух, сколько бы строк ни занял текст.

   Фиксированный минимум высоты подзаголовка (первая редакция) этого не
   давал: он выравнивал только пока Coverage укладывался в две строки, а в
   одну колонку создавал под однострочным Pricing пустую полосу
   (AUD-128-P3-02). У subgrid обеих болезней нет — в одну колонку карточки
   попадают в разные полосы рядов и выравниваются каждая по себе.

   Браузер без subgrid просто не применит блок и получит прежний вид без
   выравнивания: карточки остаются flex-колонками. */
@supports (grid-template-rows: subgrid) {
  .two-col {
    grid-template-rows: auto auto auto auto;
  }
  .two-col .card {
    display: grid;
    grid-row: span 4;
    grid-template-rows: subgrid;
    /* зазор секции (14px) разделяет карточки, но не ряды внутри карточки —
       внутренние отступы задают маргины заголовка и подзаголовка */
    row-gap: 0;
  }
}
/* Списки занимают остаток карточки, строки делят его поровну — нижняя кромка
   обоих списков оказывается на одной высоте */
.coverage-list,
.pricing-list {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
}
/* Примечание прижато к низу и оформлено одинаково в обеих карточках */
.two-col .card-note {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--divider);
}
.coverage-region {
  border-top: 1px solid var(--divider);
  flex: 1 1 0;
  min-height: 42px;
  display: flex;
  flex-direction: column;
}
/* Раскрытый регион — по содержимому: список стран не делит высоту с соседями
   и не обрезается (высота карточки в этом состоянии растёт, это нормально) */
.coverage-region[open] {
  flex: 0 0 auto;
}
.coverage-region-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  /* высоту свёрнутой строки задаёт flex (min-height 42px), паддинги нужны
     только раскрытому региону, где строка сжимается до содержимого */
  flex: 1 1 auto;
  padding: 8px 0;
  cursor: pointer;
  list-style: none;
}
.coverage-region-head::-webkit-details-marker {
  display: none;
}
.coverage-region-head:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.coverage-region-name {
  font-size: 13px;
  font-weight: 500;
}
.coverage-region-meta {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-muted);
}
.coverage-region-countries {
  font-size: 12.5px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0 0 12px;
}
.pricing-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  /* как у .coverage-region: высоту строки задаёт flex, а не паддинги */
  flex: 1 1 0;
  min-height: 42px;
  border-top: 1px solid var(--divider);
}
.pricing-window {
  font-size: 14px;
}
.pricing-price {
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 500;
}

/* ---------- request access ---------- */
.request-access {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 22px;
  align-items: start;
  padding: 26px;
}
.request-text {
  margin: 0 0 8px;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.55;
}
.mono {
  font-family: var(--font-mono);
  font-size: 12.5px;
}
.request-form-wrap {
  background: var(--surface-2);
  border-radius: 12px;
  padding: 18px;
}
.field-label {
  display: block;
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 4px;
}
.optional {
  color: var(--text-muted);
}
.field {
  width: 100%;
  height: 38px;
  border: 1px solid var(--border-strong);
  border-radius: 9px;
  padding: 0 12px;
  margin-bottom: 10px;
  background: var(--surface);
  color: var(--text);
}
.field-area {
  height: auto;
  padding: 8px 12px;
  margin-bottom: 12px;
  resize: vertical;
}
.field-error {
  margin: -6px 0 10px;
  font-size: 12px;
  color: var(--error);
}
/* Honeypot (§4.5): визуально скрыт, но присутствует в DOM для ботов */
.hp-wrap {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.request-done {
  text-align: center;
  padding: 24px 8px;
}
.request-done-title {
  margin: 0 0 6px;
  font-size: 16px;
  font-weight: 600;
  color: var(--green-dark);
}

/* ---------- footer ---------- */
.footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 22px 2px 0;
  color: var(--text-muted);
  font-size: 12px;
}
.footer a {
  color: var(--text-muted);
  text-decoration: underline;
}
.footer a:hover {
  color: var(--text-secondary);
}
