/* nnvpn - общие стили лендинга и инструкции.
   Главная страница = значения по умолчанию.
   Инструкция подключает <body class="page-guide"> и переопределяет размеры шапки. */

/* ============ Токены ============ */
:root {
  --bg: #ffffff;
  --surface: #f6f8fb;
  --border: #e4e8ef;
  --text: #101725;
  --muted: #5b6472;
  --accent: #2f6df6;
  --accent-hover: #1f57d6;
  --cyan: #12a5c9;
  --green: #0f9f5e;
  /* Тёмная палитра каркаса - из логотипа, одинакова в обеих темах */
  --ink: #080d18;
  --ink-line: #1e2a42;
  --ink-text: #eaf0fb;
  --ink-muted: #93a3bd;
  --radius: 16px;
  --maxw: 1080px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1120; --surface: #121a2b; --border: #223049;
    --text: #e8eaed; --muted: #9aa4b2;
    --accent: #5b8dff; --accent-hover: #7ba5ff; --cyan: #22d3ee; --green: #34d399;
  }
}
:root[data-theme="light"] {
  --bg: #ffffff; --surface: #f6f8fb; --border: #e4e8ef;
  --text: #101725; --muted: #5b6472;
  --accent: #2f6df6; --accent-hover: #1f57d6; --cyan: #12a5c9; --green: #0f9f5e;
}
:root[data-theme="dark"] {
  --bg: #0b1120; --surface: #121a2b; --border: #223049;
  --text: #e8eaed; --muted: #9aa4b2;
  --accent: #5b8dff; --accent-hover: #7ba5ff; --cyan: #22d3ee; --green: #34d399;
}
/* Инструкция - более узкая колонка под чтение */
body.page-guide { --maxw: 820px; }

/* ============ База ============ */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
/* Общего правила для <a> намеренно нет: цвет задаётся на месте
   (.help a, .back, .foot nav a, .card p a). Глобальное правило перебивало бы
   их по весу селектора - ссылка в .help красилась в акцент и сливалась с градиентом. */

/* ============ Кнопки ============ */
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  background: var(--accent); color: #fff; text-decoration: none;
  font-weight: 600; font-size: 15px;
  padding: 13px 22px; border-radius: 12px;
  border: none; cursor: pointer; white-space: nowrap;
  box-shadow: 0 8px 22px color-mix(in srgb, var(--accent) 32%, transparent);
  transition: background .15s ease, transform .12s ease, box-shadow .15s ease;
}
.btn:hover { background: var(--accent-hover); transform: translateY(-2px); box-shadow: 0 12px 28px color-mix(in srgb, var(--accent) 40%, transparent); }
.btn:active { transform: translateY(0); }
.btn svg { flex: none; }
/* Вторичная кнопка - для тёмного фона */
.btn-quiet {
  background: rgba(255,255,255,.07); color: var(--ink-text);
  border: 1px solid rgba(255,255,255,.16); box-shadow: none;
  backdrop-filter: blur(8px);
}
.btn-quiet:hover { background: rgba(255,255,255,.13); box-shadow: none; }

/* ============ Логотип-подпись ============ */
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand img { display: block; }
.brand span { font-weight: 800; font-size: 17px; letter-spacing: -.01em; color: var(--ink-text); }

/* ============ Тёмная шапка ============ */
.hero {
  position: relative; overflow: hidden;
  background: var(--ink); color: var(--ink-text);
  padding: 80px 0 96px; text-align: center;
}
/* точечная сетка */
.hero::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(rgba(255,255,255,.10) 1px, transparent 1px);
  background-size: 26px 26px;
  mask-image: radial-gradient(70% 60% at 50% 35%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(70% 60% at 50% 35%, #000 20%, transparent 75%);
}
/* акцентное свечение */
.hero::after {
  content: ''; position: absolute; inset: -30% -10% auto -10%; height: 90%;
  pointer-events: none;
  background:
    radial-gradient(45% 55% at 50% 40%, rgba(47,109,246,.40), transparent 70%),
    radial-gradient(35% 45% at 78% 20%, rgba(34,211,238,.20), transparent 70%),
    radial-gradient(35% 45% at 20% 25%, rgba(124,58,237,.18), transparent 70%);
  filter: blur(10px);
}
.hero .wrap { position: relative; z-index: 1; }
.hero-logo {
  width: 116px; height: 116px; margin: 0 auto 28px; display: block;
  filter: drop-shadow(0 16px 40px rgba(47,109,246,.45));
}
.hero h1 {
  font-size: clamp(38px, 6.4vw, 62px);
  line-height: 1.05; letter-spacing: -.03em; font-weight: 800;
  margin: 0 auto 20px; max-width: 15ch;
  background: linear-gradient(180deg, #ffffff 30%, #a9c4f0);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero p.lead {
  font-size: clamp(17px, 2.4vw, 20px); color: var(--ink-muted);
  max-width: 54ch; margin: 0 auto 34px;
}
.hero-cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ============ Адрес почты (раскрывается по кнопке) ============
   mailto не используем: он отдаёт управление системному почтовому клиенту,
   а у большинства людей он не настроен - клик выглядел как «ничего не произошло».
   Адрес - обычный выделяемый текст, копируется мышкой даже без кнопки. */
[hidden] { display: none !important; }
.mailbox {
  margin: 26px auto 0; max-width: 460px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 14px; padding: 18px 20px;
  backdrop-filter: blur(8px);
}
.mailbox-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: center; }
.mailaddr {
  font-size: 17px; font-weight: 700; letter-spacing: -.01em;
  user-select: all; /* клик выделяет адрес целиком */
}
.mailhint { margin: 12px 0 0; font-size: 14px; line-height: 1.5; opacity: .75; }
.copy {
  appearance: none; cursor: pointer; font-family: inherit;
  font-size: 13px; font-weight: 600; white-space: nowrap;
  padding: 7px 13px; border-radius: 9px;
  background: rgba(255,255,255,.14); color: inherit;
  border: 1px solid rgba(255,255,255,.24);
  transition: background .15s ease;
}
.copy:hover { background: rgba(255,255,255,.24); }
/* В инструкции блок помощи на градиенте, но кнопка стоит отдельной строкой */
.help .copy { margin-top: 14px; }
.help .mailaddr { font-weight: 700; }
/* скруглённый стык тёмной шапки со светлой частью */
.hero-fade { height: 40px; background: var(--ink); position: relative; }
.hero-fade::after {
  content: ''; position: absolute; inset: 0;
  background: var(--bg); border-radius: 32px 32px 0 0;
}

/* Шапка инструкции - компактнее, логотип меньше */
body.page-guide .hero, body.page-faq .hero { padding: 26px 0 68px; }
body.page-guide .hero-logo, body.page-faq .hero-logo { width: 76px; height: 76px; margin: 30px auto 20px; clear: both; }
body.page-guide .hero h1, body.page-faq .hero h1 { font-size: clamp(32px, 5.4vw, 46px); line-height: 1.08; margin-bottom: 16px; max-width: none; }
body.page-guide .hero p.lead, body.page-faq .hero p.lead { font-size: 17px; max-width: 62ch; margin-bottom: 0; }
body.page-guide .hero-fade, body.page-faq .hero-fade { height: 36px; }
body.page-guide .hero-fade::after, body.page-faq .hero-fade::after { border-radius: 30px 30px 0 0; }
.back {
  display: inline-flex; align-items: center; gap: 7px; float: left;
  color: var(--ink-muted); text-decoration: none; font-size: 15px; font-weight: 500;
  transition: color .15s ease;
}
.back:hover { color: var(--ink-text); }

/* ============ Секции (главная) ============ */
section { padding: 76px 0; }
section.tinted { background: var(--surface); border-block: 1px solid var(--border); }
.section-head { text-align: center; max-width: 60ch; margin: 0 auto 46px; }
.section-head h2 { font-size: clamp(28px, 4.2vw, 40px); letter-spacing: -.025em; margin: 0 0 12px; font-weight: 800; }
.section-head h2:last-child { margin-bottom: 0; }
.section-head p { color: var(--muted); margin: 0; font-size: 17px; }

/* ============ Карточки «Как устроен» ============ */
/* На телефоне карточки идут по одной в строку: в две колонки они выходили
   узкими и неестественно вытянутыми по высоте. */
.grid { display: grid; grid-template-columns: 1fr; gap: 18px; }
@media (min-width: 560px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 760px) { .grid { grid-template-columns: repeat(4, 1fr); } }
.card {
  position: relative; overflow: hidden;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius); padding: 28px 22px;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
/* цветная полоска сверху - проявляется на hover */
.card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--cyan));
  opacity: 0; transition: opacity .2s ease;
}
.card:hover::before { opacity: 1; }
.card:hover {
  transform: translateY(-5px);
  border-color: color-mix(in srgb, var(--accent) 42%, var(--border));
  box-shadow: 0 18px 38px color-mix(in srgb, var(--accent) 14%, transparent);
}
.card .ic {
  width: 44px; height: 44px; border-radius: 12px;
  display: grid; place-items: center; margin-bottom: 18px;
  background: linear-gradient(140deg,
    color-mix(in srgb, var(--accent) 18%, transparent),
    color-mix(in srgb, var(--cyan) 16%, transparent));
  color: var(--accent);
}
.card h3 { font-size: 17px; margin: 0 0 8px; letter-spacing: -.01em; }
.card p { margin: 0; color: var(--muted); font-size: 15px; }
.card p a { color: var(--accent); text-decoration: none; font-weight: 600; }
.card p a:hover { text-decoration: underline; }

/* ============ Три шага (главная) ============ */
.steps { display: grid; gap: 20px; grid-template-columns: 1fr; position: relative; }
@media (min-width: 760px) {
  .steps { grid-template-columns: repeat(3, 1fr); }
  /* соединительная линия между шагами */
  .steps::before {
    content: ''; position: absolute; top: 27px; left: 16%; right: 16%; height: 2px;
    background: linear-gradient(90deg, var(--accent), var(--cyan), var(--accent));
    opacity: .28;
  }
}
.step { position: relative; text-align: center; padding: 0 12px; }
.step .num {
  width: 54px; height: 54px; border-radius: 50%;
  background: var(--surface);
  border: 2px solid color-mix(in srgb, var(--accent) 55%, transparent);
  color: var(--accent); font-weight: 800; font-size: 19px;
  display: grid; place-items: center; margin: 0 auto 20px;
  box-shadow: 0 0 0 6px color-mix(in srgb, var(--accent) 8%, transparent);
}
.step h3 { margin: 0 0 8px; font-size: 18px; letter-spacing: -.01em; }
.step p { margin: 0; color: var(--muted); font-size: 15px; }
.steps-more { text-align: center; margin: 46px 0 0; }
.steps-more a {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--accent); text-decoration: none; font-weight: 600; font-size: 16px;
}
.steps-more a:hover { text-decoration: underline; }

/* ============ Условия ============ */
.terms { padding: 56px 0; }
.terms-row {
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center;
  gap: 20px 56px; text-align: center;
  padding: 26px 44px; border: 1px solid var(--border);
  border-radius: 18px; background: var(--bg);
  max-width: 720px; margin: 0 auto;
  box-shadow: 0 10px 30px color-mix(in srgb, var(--text) 6%, transparent);
}
.term { display: flex; flex-direction: column; gap: 2px; }
.term strong {
  font-size: 20px; letter-spacing: -.015em;
  background: linear-gradient(100deg, var(--accent), var(--cyan));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.term span { color: var(--muted); font-size: 15px; }
.term-sep { width: 1px; align-self: stretch; background: var(--border); }
@media (max-width: 520px) { .term-sep { display: none; } }

/* ============ Страны ============ */
.countries { display: flex; flex-wrap: wrap; gap: 16px; justify-content: center; }
.country {
  display: flex; align-items: center; gap: 13px;
  background: var(--bg);
  border: 1px solid var(--border); border-radius: 14px;
  padding: 16px 22px; min-width: 200px;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.country:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--accent) 42%, var(--border));
  box-shadow: 0 14px 28px color-mix(in srgb, var(--accent) 12%, transparent);
}
/* Флаги рисуем SVG, а не эмодзи: в Windows нет глифов флагов,
   Chrome под Windows показывал вместо флага буквы «FI». */
.country .cflag {
  width: 30px; height: 20px; flex: none; display: block;
  border-radius: 3px; box-shadow: 0 0 0 1px color-mix(in srgb, var(--text) 14%, transparent);
}
.country .cname { font-weight: 700; font-size: 17px; }
.country .ccode {
  margin-left: auto; font-size: 12px; font-weight: 700; letter-spacing: .06em;
  color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent);
  padding: 4px 9px; border-radius: 999px;
}

/* ============ Финальный блок / «Что-то не получилось?» ============ */
.cta-band { padding-top: 24px; }
.cta-band .inner, .help {
  position: relative; overflow: hidden; text-align: center;
  background: linear-gradient(135deg, #2f6df6 0%, #4f46e5 55%, #0891b2 100%);
  color: #fff;
  box-shadow: 0 24px 52px color-mix(in srgb, var(--accent) 34%, transparent);
}
.cta-band .inner { border-radius: 26px; padding: 62px 32px; }
.help { border-radius: 22px; padding: 40px 30px; margin: 56px 0 0; }
.cta-band .inner::before, .help::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(rgba(255,255,255,.16) 1px, transparent 1px);
  background-size: 24px 24px;
  mask-image: radial-gradient(60% 70% at 50% 40%, #000, transparent 72%);
  -webkit-mask-image: radial-gradient(60% 70% at 50% 40%, #000, transparent 72%);
}
.cta-band .inner > *, .help > * { position: relative; }
.cta-band h2 { margin: 0 0 12px; font-size: clamp(28px, 4.2vw, 40px); letter-spacing: -.025em; }
.cta-band p { margin: 0 0 30px; opacity: .92; font-size: 18px; }
/* подпись в блоке с адресом не должна попадать под .cta-band p:
   иначе она крупнее самого адреса (18px против 17px) */
.cta-band .mailhint { margin: 12px 0 0; font-size: 14px; }
.cta-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.cta-band .btn { background: #fff; color: #1f57d6; box-shadow: 0 8px 20px rgba(0,0,0,.20); }
.cta-band .btn:hover { background: #eef3ff; box-shadow: 0 12px 28px rgba(0,0,0,.26); }
.cta-band .btn-quiet { background: rgba(255,255,255,.14); color: #fff; border-color: rgba(255,255,255,.35); }
.cta-band .btn-quiet:hover { background: rgba(255,255,255,.22); }
.help h2 { margin: 0 0 10px; font-size: 24px; letter-spacing: -.02em; }
.help p { margin: 0; font-size: 16px; opacity: .95; }
.help a { color: #fff; font-weight: 700; }

/* ============ Табы устройств (инструкция) ============ */
.tabs {
  display: flex; gap: 10px; flex-wrap: wrap; justify-content: center;
  position: sticky; top: 0; z-index: 5;
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: saturate(180%) blur(12px);
  margin: 8px -24px 36px; padding: 14px 24px;
  border-bottom: 1px solid var(--border);
}
.tab {
  appearance: none; cursor: pointer;
  display: inline-flex; align-items: center; gap: 9px;
  background: var(--bg); color: var(--text);
  border: 1px solid var(--border); border-radius: 12px;
  padding: 11px 20px; font-size: 15px; font-weight: 600; font-family: inherit;
  transition: background .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease, transform .12s ease;
}
.tab svg { flex: none; }
.tab:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); transform: translateY(-1px); }
.tab[aria-selected="true"] {
  background: linear-gradient(120deg, var(--accent), color-mix(in srgb, var(--cyan) 70%, var(--accent)));
  color: #fff; border-color: transparent;
  box-shadow: 0 8px 20px color-mix(in srgb, var(--accent) 32%, transparent);
}

.panel { display: none; position: relative; }
.panel.active { display: block; }
/* вертикальная нить, соединяющая шаги инструкции */
.panel.active::before {
  content: ''; position: absolute; left: 21px; top: 46px; bottom: 46px; width: 2px;
  background: linear-gradient(180deg, var(--accent), var(--cyan));
  opacity: .2;
}

/* ============ Шаги инструкции ============ */
.gstep { display: grid; grid-template-columns: 44px 1fr; gap: 20px; padding: 28px 0; }
.gstep .num {
  position: relative; z-index: 1;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--bg);
  border: 2px solid color-mix(in srgb, var(--accent) 55%, transparent);
  color: var(--accent); font-weight: 800; font-size: 16px;
  display: grid; place-items: center;
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--accent) 7%, transparent);
}
.gstep h3 { margin: 8px 0 6px; font-size: 19px; letter-spacing: -.015em; }
.gstep p { margin: 0 0 14px; color: var(--muted); font-size: 16px; }
.gstep p:last-child { margin-bottom: 0; }
.gstep .app {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 4px;
  padding: 10px 18px; border: 1px solid var(--border); border-radius: 11px;
  text-decoration: none; color: var(--text); font-weight: 600; font-size: 14px;
  transition: background .15s ease, border-color .15s ease, transform .12s ease;
}
.gstep .app:hover {
  background: var(--surface); transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--accent) 45%, var(--border));
}

.appcard {
  display: flex; align-items: center; gap: 14px; margin: 6px 0 16px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; padding: 12px 14px; max-width: 340px;
}
.appcard .appicon {
  width: 56px; height: 56px; border-radius: 14px; flex: none;
  border: 1px solid var(--border); background: var(--bg);
  overflow: hidden;
}
.appcard .appicon img { width: 100%; height: 100%; object-fit: cover; display: block; }
.appcard .appname { font-weight: 700; font-size: 16px; }
.appcard .appmeta { color: var(--muted); font-size: 14px; }

/* ============ Скриншоты ============ */
.shot-real { margin-top: 14px; position: relative; display: inline-block; line-height: 0; }
.shot-real img {
  max-width: 210px; width: 100%; display: block;
  border: 1px solid var(--border); border-radius: 16px; cursor: zoom-in;
  box-shadow: 0 10px 26px color-mix(in srgb, var(--text) 10%, transparent);
  transition: filter .15s ease, transform .15s ease, box-shadow .15s ease;
}
.shot-real:hover img {
  filter: brightness(.96); transform: translateY(-3px);
  box-shadow: 0 16px 34px color-mix(in srgb, var(--accent) 20%, transparent);
}
.shot-real::after {
  content: ''; position: absolute; right: 8px; bottom: 8px;
  width: 26px; height: 26px; border-radius: 8px; pointer-events: none;
  background: rgba(0,0,0,.55) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' viewBox='0 0 24 24'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M21 21l-4.35-4.35'/%3E%3C/svg%3E") center/15px no-repeat;
}
.shots-row { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 14px; }
.shots-row .shot-real { margin-top: 0; }

/* ============ Лайтбокс ============ */
.lightbox {
  position: fixed; inset: 0; z-index: 50; display: none;
  align-items: center; justify-content: center;
  background: rgba(6,10,18,.92); padding: 20px; cursor: zoom-out;
  touch-action: pan-y;
}
.lightbox.open { display: flex; }
.lb-stage { display: flex; flex-direction: column; align-items: center; gap: 14px; margin: 0; cursor: default; max-width: 96vw; }
.lightbox img { max-width: 96vw; max-height: 82vh; border-radius: 14px; box-shadow: 0 16px 50px rgba(0,0,0,.6); }
.lb-caption { color: #fff; font-size: 15px; font-weight: 600; text-align: center; background: rgba(255,255,255,.14); padding: 8px 16px; border-radius: 999px; }
.lb-nav, .lb-close {
  position: absolute; background: rgba(255,255,255,.15); color: #fff; border: none;
  cursor: pointer; display: grid; place-items: center; line-height: 1;
  transition: background .15s ease;
}
.lb-nav:hover, .lb-close:hover { background: rgba(255,255,255,.3); }
.lb-nav { top: 50%; transform: translateY(-50%); width: 48px; height: 48px; border-radius: 50%; font-size: 30px; }
.lb-prev { left: 16px; } .lb-next { right: 16px; }
.lb-close { top: 16px; right: 16px; width: 40px; height: 40px; border-radius: 50%; font-size: 20px; }

/* ============ Блок с ключом ============ */
.keybox {
  background: var(--surface); border: 1px solid var(--border);
  border-left: 3px solid color-mix(in srgb, var(--accent) 60%, transparent);
  border-radius: 12px;
  padding: 14px 16px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px; color: var(--muted); margin-top: 6px; max-width: 460px;
  white-space: pre-wrap; word-break: break-all; line-height: 1.5;
}
.keynote { margin: 8px 0 0; font-size: 13px; color: var(--muted); font-style: italic; }
/* пометка «это пример» прямо в рамке с ключом — читается как комментарий кода */
.kb-note { display: block; opacity: .6; font-style: italic; word-break: normal; margin-bottom: 4px; }
.keynote a { color: var(--muted); text-decoration: underline; text-underline-offset: 2px; }
.keynote a:hover { color: var(--accent); }

/* «Ваш ключ выглядит иначе?» — раскрывается на месте, редкий fallback [Interface] */
.other-format { margin: 8px 0 0; }
.other-format > summary {
  cursor: pointer; list-style: none;
  font-size: 13px; color: var(--muted);
  text-decoration: underline; text-underline-offset: 2px;
  width: fit-content;
}
.other-format > summary::-webkit-details-marker { display: none; }
.other-format > summary:hover { color: var(--accent); }
.other-format[open] > summary { margin-bottom: 10px; }
.other-format p { margin: 0 0 10px; font-size: 14px; color: var(--muted); max-width: 62ch; }
.other-format .keybox { margin-top: 0; }

/* ============ Футер ============ */
footer {
  background: var(--ink); color: var(--ink-muted);
  padding: 44px 0; margin-top: 76px;
  border-top: 1px solid var(--ink-line);
}
.foot { display: flex; flex-wrap: wrap; gap: 18px; align-items: center; }
/* контакты прижаты вправо; подпись «Остались вопросы:» идёт одной группой
   со ссылками, к которым относится */
.foot { justify-content: flex-end; }
.foot .brand { margin-right: 0; }
.foot .brand .b { font-weight: 800; font-size: 17px; color: var(--ink-text); }
.foot-hint { font-size: 15px; }
.foot nav { display: flex; gap: 24px; flex-wrap: wrap; }
.foot nav a { color: var(--ink-text); text-decoration: none; font-size: 15px; font-weight: 600; }
.foot nav a:hover { color: #6aa8ff; }
body.page-guide footer { padding: 40px 0; margin-top: 68px; }

/* ============ Мобильные ============ */
@media (max-width: 640px) {
  .wrap { padding: 0 20px; }
  .lb-nav { width: 40px; height: 40px; font-size: 24px; }
  .lb-prev { left: 8px; } .lb-next { right: 8px; }
  .lb-caption { font-size: 14px; }

  body.page-guide .hero, body.page-faq .hero { padding: 20px 0 54px; }
  body.page-guide .hero-logo, body.page-faq .hero-logo { width: 64px; height: 64px; margin-top: 26px; }
  .tabs { margin: 8px -20px 28px; padding: 12px 20px; gap: 8px; }
  .tab { padding: 10px 15px; font-size: 14px; }
  .gstep { grid-template-columns: 36px 1fr; gap: 14px; padding: 24px 0; }
  .gstep .num { width: 36px; height: 36px; font-size: 15px; }
  .panel.active::before { left: 17px; }
  .gstep h3 { font-size: 17px; }
  .gstep p { font-size: 15px; }
  .shot-real img { max-width: 190px; }
  .shots-row { gap: 10px; }
  .shots-row .shot-real { flex: 1 1 44%; min-width: 0; }
  .shots-row .shot-real img { max-width: 100%; }
  .keybox { font-size: 12px; }
  .help { padding: 32px 22px; }

  /* На телефоне футер собирается в центрированный столбик: подпись сверху,
     контакты под ней, каждый на своей строке. */
  .foot { flex-direction: column; justify-content: center; gap: 14px; }
  .foot nav { flex-direction: column; align-items: center; gap: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto; }
}
