/* Twemoji-флаги, чтобы эмодзи стран рендерились даже на Windows */
@font-face {
  font-family: "Twemoji Country Flags";
  unicode-range: U+1F1E6-1F1FF;
  src: url("https://cdn.jsdelivr.net/npm/country-flag-emoji-polyfill@0.1/dist/TwemojiCountryFlags.woff2") format("woff2");
}

/* Палитра и шрифты — как на red1rect.ru */
:root {
  --bg: #0b0b0f;
  --bg-2: #121217;
  --panel: rgba(255, 255, 255, 0.03);
  --panel-2: rgba(22, 22, 28, 0.85);
  --border: rgba(255, 255, 255, 0.08);
  --border-hi: rgba(210, 30, 30, 0.45);
  --text: #ffffff;
  --muted: rgba(255, 255, 255, 0.72);
  --muted-2: rgba(255, 255, 255, 0.45);
  --brand: #d21e1e;
  --brand-2: #ff4a3d;
  --brand-ink: #ff9d92;
  --radius: 14px;
  --radius-lg: 20px;
  --wrap: 1120px;
  --font: "Twemoji Country Flags", "Onest", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-head: "Unbounded", "Onest", system-ui, sans-serif;
}

h1, h2, .hero__title, .section__title, .trial__title, .plan__now { font-family: var(--font-head); }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(900px 480px at 78% -80px, rgba(210, 30, 30, 0.18), transparent 70%),
    radial-gradient(700px 420px at 8% 4%, rgba(210, 30, 30, 0.12), transparent 65%),
    var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.wrap--narrow { max-width: 760px; }

/* ---------- Кнопки ---------- */
.btn {
  --pad-y: 11px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: var(--pad-y) 20px;
  border-radius: 12px;
  font-weight: 700; font-size: 15px; line-height: 1;
  border: 1px solid transparent;
  cursor: pointer; transition: transform .12s ease, background .18s ease, border-color .18s ease, box-shadow .18s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn--primary {
  background: linear-gradient(180deg, #e0352b, var(--brand));
  color: #fff;
  box-shadow: 0 8px 24px rgba(210, 30, 30, 0.35);
}
.btn--primary:hover { box-shadow: 0 12px 30px rgba(210, 30, 30, 0.45); }
.btn--ghost {
  background: var(--panel-2);
  color: var(--text);
  border-color: var(--border);
  backdrop-filter: blur(8px);
}
.btn--ghost:hover { border-color: var(--border-hi); }
.btn--lg { --pad-y: 15px; padding-left: 26px; padding-right: 26px; font-size: 16px; border-radius: 14px; }
.btn--block { width: 100%; }

/* ---------- Промо-бар ---------- */
.promo {
  display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap;
  padding: 9px 16px; font-size: 14px;
  background: linear-gradient(90deg, rgba(210, 30, 30, 0.16), rgba(210, 30, 30, 0.16));
  border-bottom: 1px solid var(--border);
  color: var(--brand-ink);
}
.promo b { color: #fff; }
.promo__fire { filter: drop-shadow(0 0 8px rgba(255, 140, 0, .6)); }
.promo__btn {
  padding: 5px 14px; border-radius: 999px; font-weight: 700; font-size: 13px;
  background: var(--brand); color: #fff;
}
.promo__btn:hover { background: #b81818; }

/* ---------- Навигация ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(11, 11, 15, 0.72);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.nav__inner { display: flex; align-items: center; gap: 20px; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.brand__logo { height: 26px; width: auto; }
.brand__tag {
  font-family: var(--font-head); font-size: 11px; font-weight: 700; letter-spacing: .06em;
  padding: 4px 7px; border-radius: 6px; color: #fff; background: var(--brand);
  box-shadow: 0 4px 14px rgba(210, 30, 30, .35);
}
.nav__links { display: flex; gap: 26px; margin-left: 14px; }
.nav__links a { color: var(--muted); font-size: 15px; font-weight: 500; }
.nav__links a:hover { color: #fff; }
.nav__actions { display: flex; gap: 10px; margin-left: auto; }
.nav__burger {
  display: none; margin-left: auto; background: none; border: 0; color: #fff; font-size: 22px; cursor: pointer;
}

/* ---------- HERO ---------- */
.hero { position: relative; padding: 84px 0 64px; overflow: hidden; }
.hero__glow {
  position: absolute; inset: -20% 0 auto 0; height: 620px; pointer-events: none;
  background: radial-gradient(circle at 62% 30%, rgba(210, 30, 30, 0.30), rgba(210, 30, 30, 0.10) 42%, transparent 66%);
}
.hero__inner { position: relative; text-align: center; }
.pill {
  display: inline-block; padding: 7px 15px; border-radius: 999px; font-size: 13px; font-weight: 600;
  color: var(--brand-ink); background: rgba(210, 30, 30, 0.14); border: 1px solid var(--border-hi);
}
.hero__title { margin: 22px 0 0; font-size: clamp(28px, 5.2vw, 52px); line-height: 1.12; font-weight: 700; }
.hero__sub { margin: 20px auto 0; max-width: 620px; font-size: clamp(16px, 2.3vw, 19px); color: var(--muted); }
.hero__cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 30px; }
.hero__note { margin-top: 14px; font-size: 13px; color: var(--muted-2); }
.hero__badges {
  display: flex; gap: 10px 24px; justify-content: center; flex-wrap: wrap;
  list-style: none; padding: 0; margin: 34px 0 0; font-size: 14px; color: var(--muted);
}
.hero__badges b { color: #fff; }

/* ---------- Секции ---------- */
.section { padding: 64px 0; }
.section--tight { padding-bottom: 40px; }
.eyebrow {
  display: block; text-align: center; font-size: 12.5px; font-weight: 700; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--brand); margin-bottom: 12px;
}
.section__title { text-align: center; margin: 0; font-size: clamp(22px, 3.8vw, 34px); font-weight: 700; line-height: 1.2; }
.section__lead { text-align: center; max-width: 620px; margin: 14px auto 0; color: var(--muted); }

/* ---------- Шаги ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 40px; }
.step {
  position: relative; padding: 26px 24px; border-radius: var(--radius-lg);
  background: var(--panel); border: 1px solid var(--border);
}
.step__num {
  display: inline-block; font-size: 13px; font-weight: 800; color: var(--brand);
  background: rgba(210, 30, 30, 0.12); border-radius: 8px; padding: 4px 9px; margin-bottom: 14px;
}
.step h3 { margin: 0 0 8px; font-size: 18px; }
.step p { margin: 0; color: var(--muted); font-size: 15px; }

/* ---------- Локации: глобус + карточки ---------- */
.geo {
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 36px;
  align-items: center; margin-top: 36px;
}
.geo__globe { position: relative; width: 100%; max-width: 540px; margin: 0 auto; aspect-ratio: 1; }
.geo__globe canvas { width: 100%; height: 100%; display: block; cursor: grab; touch-action: pan-y; }
.geo__globe canvas:active { cursor: grabbing; }
.geo__list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.loc {
  display: flex; align-items: center; gap: 12px; padding: 14px 16px;
  border-radius: var(--radius); background: var(--panel); border: 1px solid var(--border);
  transition: border-color .18s ease;
}
.loc:hover { border-color: var(--border-hi); }
.loc__flag { font-size: 26px; line-height: 1; }
.loc__text { display: grid; line-height: 1.25; min-width: 0; }
.loc__text b, .loc__text small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.loc__text b { font-size: 15px; }
.loc__text small { font-size: 13px; color: var(--muted-2); }
.loc__status {
  margin-left: auto; font-size: 12px; font-weight: 700; color: #4ade80; white-space: nowrap;
  display: inline-flex; align-items: center; gap: 6px;
}
.loc__status::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%; background: #4ade80;
  box-shadow: 0 0 0 0 rgba(74, 222, 128, .6); animation: ping 2s infinite;
}
@keyframes ping { 70% { box-shadow: 0 0 0 7px rgba(74, 222, 128, 0); } 100% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0); } }

/* ---------- Характеристики ---------- */
.spec {
  max-width: 880px; margin: 40px auto 0; border-radius: var(--radius-lg); overflow: hidden;
  background: var(--panel); border: 1px solid var(--border);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
}
.spec__head {
  display: flex; align-items: center; gap: 8px; padding: 13px 18px;
  background: rgba(22, 22, 28, 0.85); border-bottom: 1px solid var(--border);
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; font-size: 13px; color: var(--muted-2);
}
.spec__dot { width: 11px; height: 11px; border-radius: 50%; background: #334155; }
.spec__dot:nth-child(1) { background: #f87171; }
.spec__dot:nth-child(2) { background: #fbbf24; }
.spec__dot:nth-child(3) { background: #4ade80; }
.spec__title { margin-left: 10px; }
.spec__status { margin-left: auto; color: #4ade80; }
.spec__grid { display: grid; grid-template-columns: repeat(3, 1fr); margin: 0; }
.spec__grid > div { padding: 20px 22px; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.spec__grid > div:nth-child(3n) { border-right: 0; }
.spec__grid > div:nth-last-child(-n + 3) { border-bottom: 0; }
.spec__grid dt { font-size: 13px; color: var(--muted-2); margin-bottom: 6px; }
.spec__grid dd { margin: 0; font-size: 20px; font-weight: 800; }

/* ---------- Карточки преимуществ ---------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 40px; }
.card {
  padding: 26px 24px; border-radius: var(--radius-lg);
  background: var(--panel); border: 1px solid var(--border);
  transition: border-color .18s ease, transform .18s ease;
}
.card:hover { border-color: var(--border-hi); transform: translateY(-2px); }
.card__ico {
  display: inline-grid; place-items: center; width: 46px; height: 46px; border-radius: 12px; font-size: 22px;
  background: rgba(210, 30, 30, 0.12); border: 1px solid var(--border-hi); margin-bottom: 16px;
}
.card h3 { margin: 0 0 8px; font-size: 18px; }
.card p { margin: 0; color: var(--muted); font-size: 15px; }

/* ---------- Тарифы ---------- */
.plans { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 40px; align-items: stretch; }
.plan {
  position: relative; display: flex; flex-direction: column; padding: 26px 22px;
  border-radius: var(--radius-lg); background: var(--panel); border: 1px solid var(--border);
}
.plan--featured { border-color: var(--border-hi); box-shadow: 0 12px 40px rgba(210, 30, 30, 0.18); background: linear-gradient(180deg, rgba(210, 30, 30, 0.08), var(--panel)); }
.plan__badge {
  position: absolute; top: -11px; left: 50%; transform: translateX(-50%);
  padding: 4px 12px; border-radius: 999px; font-size: 12px; font-weight: 700; color: #fff;
  background: var(--brand); white-space: nowrap;
}
.plan__name { margin: 0; font-size: 16px; color: var(--muted); font-weight: 600; }
.plan__price { display: flex; align-items: baseline; gap: 10px; margin: 12px 0 2px; }
.plan__now { font-size: 26px; font-weight: 700; }
.plan__old { font-size: 15px; color: var(--muted-2); text-decoration: line-through; }
.plan__per { margin: 0 0 18px; font-size: 13px; color: var(--brand-ink); min-height: 18px; }
.plan__list { list-style: none; padding: 0; margin: 0 0 22px; display: grid; gap: 10px; font-size: 14px; color: var(--muted); flex: 1; }
.plan__list li { position: relative; padding-left: 24px; }
.plan__list li::before {
  content: "✓"; position: absolute; left: 0; top: -1px; color: var(--brand); font-weight: 800;
}

/* ---------- Триал-баннер ---------- */
.trial {
  position: relative; overflow: hidden; text-align: center;
  padding: 54px 24px; border-radius: 26px;
  background: linear-gradient(180deg, rgba(210, 30, 30, 0.14), rgba(22, 22, 28, 0.5));
  border: 1px solid var(--border-hi);
}
.trial__glow {
  position: absolute; inset: auto 0 -60% 0; height: 380px; pointer-events: none;
  background: radial-gradient(circle at 50% 20%, rgba(210, 30, 30, 0.35), transparent 60%);
}
.trial__badge { position: relative; display: inline-block; font-size: 13px; font-weight: 700; color: var(--brand-ink); }
.trial__title { position: relative; margin: 14px 0 0; font-size: clamp(22px, 3.8vw, 34px); font-weight: 700; line-height: 1.2; }
.trial__title [data-brand] { color: var(--brand-ink); }
.trial__sub { position: relative; max-width: 520px; margin: 14px auto 26px; color: var(--muted); }
.trial__note { position: relative; margin: 14px 0 0; font-size: 13px; color: var(--muted-2); }

/* ---------- FAQ ---------- */
.faq { margin-top: 34px; display: grid; gap: 12px; }
.faq__item {
  border-radius: var(--radius); background: var(--panel); border: 1px solid var(--border);
  padding: 4px 20px;
}
.faq__item summary {
  cursor: pointer; list-style: none; padding: 16px 0; font-weight: 600; font-size: 16px;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after { content: "+"; color: var(--brand); font-size: 22px; font-weight: 400; transition: transform .2s ease; }
.faq__item[open] summary::after { transform: rotate(45deg); }
.faq__item p { margin: 0 0 18px; color: var(--muted); font-size: 15px; }

/* ---------- Футер ---------- */
.footer { border-top: 1px solid var(--border); padding: 40px 0; margin-top: 20px; }
.footer__inner { display: grid; gap: 16px; text-align: center; justify-items: center; }
.footer__brand { display: inline-flex; align-items: center; gap: 8px; }
.footer__legal { display: flex; flex-wrap: wrap; gap: 8px 22px; justify-content: center; font-size: 14px; }
.footer__legal a { color: var(--muted); }
.footer__legal a:hover { color: #fff; }
.footer__support { font-size: 14px; color: var(--muted); margin: 0; }
.footer__support a { color: var(--brand-ink); }
.footer__copy { font-size: 13px; color: var(--muted-2); margin: 0; }

/* ---------- Адаптив ---------- */
@media (max-width: 940px) {
  .steps, .cards { grid-template-columns: 1fr 1fr; }
  .plans { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .geo__list { grid-template-columns: 1fr; }
  .spec__grid { grid-template-columns: 1fr 1fr; }
  .spec__grid > div, .spec__grid > div:nth-child(3n), .spec__grid > div:nth-last-child(-n + 3) {
    border-right: 1px solid var(--border); border-bottom: 1px solid var(--border);
  }
  .spec__grid > div:nth-child(2n) { border-right: 0; }
  .spec__grid > div:last-child { border-bottom: 0; }
  .spec__grid dd { font-size: 17px; }
  .spec__title { display: none; }
}
@media (max-width: 1100px) {
  .geo { grid-template-columns: 1fr; gap: 24px; }
  .geo__globe { max-width: 460px; }
  .nav__links, .nav__actions { display: none; }
  .nav__burger { display: block; }
  .nav.is-open .nav__inner { flex-wrap: wrap; height: auto; padding-bottom: 18px; }
  .nav.is-open .brand, .nav.is-open .nav__burger { height: 64px; }
  .nav.is-open .nav__links { display: flex; flex-direction: column; flex-basis: 100%; gap: 16px; margin: 4px 0 0; }
  .nav.is-open .nav__actions { display: flex; flex-basis: 100%; gap: 10px; margin: 18px 0 0; }
  .nav.is-open .nav__actions .btn { flex: 1; }
}
@media (max-width: 720px) {
  .steps, .cards, .plans { grid-template-columns: 1fr; }
  .hero { padding-top: 56px; }
}

/* ---------- Страница /connect ---------- */
.page-auth { min-height: 100vh; display: flex; flex-direction: column; }
.auth__back { margin-left: auto; color: var(--muted); font-size: 14px; }
.auth__back:hover { color: #fff; }
.auth { position: relative; flex: 1; display: flex; justify-content: center; align-items: flex-start; padding: 48px 16px 80px; overflow: hidden; }
.auth__glow {
  position: absolute; top: -120px; left: 50%; width: 760px; height: 520px; transform: translateX(-50%); pointer-events: none;
  background: radial-gradient(circle at 50% 40%, rgba(210, 30, 30, 0.22), transparent 65%);
}
.auth__card {
  position: relative; width: 100%; max-width: 460px; padding: 30px 28px 26px; border-radius: 22px;
  background: rgba(22, 22, 28, 0.72); border: 1px solid var(--border); backdrop-filter: blur(12px);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
}
.auth__steps { display: flex; gap: 8px; list-style: none; margin: 0 0 26px; padding: 0; counter-reset: st; }
.auth__steps li {
  flex: 1; counter-increment: st; font-size: 12px; font-weight: 600; color: var(--muted-2);
  padding-top: 10px; border-top: 3px solid rgba(255, 255, 255, 0.1); transition: color .2s, border-color .2s;
}
.auth__steps li::before { content: counter(st) ". "; }
.auth__steps li.is-active { color: #fff; border-color: var(--brand); }
.auth__steps li.is-done { color: var(--muted); border-color: rgba(210, 30, 30, 0.5); }
.auth__step { display: none; }
.auth__step.is-active { display: block; animation: fadeUp .25s ease; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.auth__title { font-family: var(--font-head); font-size: 22px; font-weight: 700; margin: 0; line-height: 1.25; }
.auth__sub { color: var(--muted); font-size: 15px; margin: 10px 0 22px; }
.auth__sub b { color: #fff; }
.auth__sub a { color: var(--brand-ink); }
.auth__error { min-height: 20px; margin: 10px 0 12px; font-size: 14px; color: #ff7b70; }
.auth__error:empty { min-height: 0; margin: 6px 0; }
.auth__row { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 16px; }
.auth__row--center { justify-content: center; gap: 20px; margin-top: 18px; }
.auth__ok {
  width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; margin-bottom: 16px;
  font-size: 26px; font-weight: 800; color: #4ade80; background: rgba(74, 222, 128, 0.12); border: 1px solid rgba(74, 222, 128, 0.35);
}
.auth__loading { display: flex; align-items: center; gap: 12px; padding: 16px; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--border); color: var(--muted); font-size: 14px; }
.auth__loading[hidden] { display: none; }
.spinner { flex: 0 0 auto; width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, 0.15); border-top-color: var(--brand); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.field { display: block; margin-bottom: 14px; }
.field__label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 7px; }
.field__input {
  width: 100%; padding: 14px 16px; border-radius: 12px; font: inherit; font-size: 16px; color: #fff;
  background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.12); outline: none; transition: border-color .15s, background .15s;
}
.field__input:focus { border-color: rgba(210, 30, 30, 0.6); background: rgba(255, 255, 255, 0.07); }
.field__input--code { font-family: var(--font-head); font-size: 24px; letter-spacing: .4em; text-align: center; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--muted); cursor: pointer; }
.check input { margin-top: 2px; width: 16px; height: 16px; accent-color: var(--brand); flex: 0 0 auto; }
.check a { color: var(--brand-ink); }
.linkbtn { background: none; border: 0; padding: 0; font: inherit; font-size: 14px; color: var(--muted); cursor: pointer; }
.linkbtn:hover:not(:disabled) { color: #fff; }
.linkbtn:disabled { opacity: .55; cursor: default; }
.btn:disabled { opacity: .6; cursor: default; transform: none; }

.cfg[hidden], .cfg__qr[hidden], .btn[hidden] { display: none; }
.cfg__hint { font-size: 13px; color: var(--muted-2); margin: 10px 0 22px; text-align: center; }
.cfg__hint a { color: var(--brand-ink); }
.cfg__block { margin-bottom: 20px; }
.copy { display: flex; gap: 8px; }
.copy__input { font-size: 13px; padding: 12px 14px; text-overflow: ellipsis; }
.copy__btn { flex: 0 0 auto; }
.cfg__qr { display: flex; gap: 16px; align-items: center; padding: 16px; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--border); }
.cfg__qr p { margin: 0; font-size: 13px; color: var(--muted); }
.qr { flex: 0 0 auto; width: 128px; height: 128px; padding: 6px; border-radius: 10px; background: #fff; }
.qr svg { width: 100%; height: 100%; display: block; }
@media (max-width: 420px) {
  .auth__card { padding: 24px 18px 20px; }
  .cfg__qr { flex-direction: column; text-align: center; }
  .auth__back { display: none; }
}
