/* Оформление сайтов «Румб».
 *
 * ОДИН ФАЙЛ НА ОБА САЙТА, без фреймворков и без единого внешнего запроса.
 * Причина простая: страницы должны открываться там, где со связью плохо, —
 * это ровно те люди, ради которых продукт и делается. Каждая библиотека
 * с чужого адреса — ещё одна причина увидеть пустой экран.
 *
 * Палитра взята из приложения (`ui/theme/Color.kt`) один в один: человек
 * приходит с сайта в приложение и должен узнать то же место.
 *
 * ГАРНИТУРЫ ДВЕ И ТОЛЬКО ДВЕ. Manrope — заголовки, кнопки, цифры:
 * лежит у нас, 39 КиБ на два поддиапазона. Всё остальное — системным
 * шрифтом устройства: он уже загружен и ничего не стоит.
 */

@font-face {
    font-family: "Manrope";
    font-style: normal;
    font-weight: 200 800;
    font-display: swap;
    src: url("/static/fonts/manrope-cyrillic.woff2") format("woff2");
    unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
    font-family: "Manrope";
    font-style: normal;
    font-weight: 200 800;
    font-display: swap;
    src: url("/static/fonts/manrope-latin.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6,
        U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122,
        U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
    --navy: #0f1720;
    --navy-deep: #0a1118;
    --surface: #141d28;
    --raised: #1a2431;
    --line: #22303f;
    --line-strong: #33475c;

    --azure: #5a93cc;
    --azure-bright: #7aacdb;
    --azure-deep: #3a6c99;
    --teal: #52b8ac;
    --green: #63bc90;
    --amber: #d8a45c;
    --coral: #d57878;

    --text: #e8eef5;
    --text-2: #aebbc9;
    --text-3: #8496a8;

    --display: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI",
        Roboto, sans-serif;
    --body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
        "Helvetica Neue", Arial, sans-serif;

    --radius: 18px;
    --radius-sm: 12px;
    --page: 1120px;
    --shadow: 0 18px 40px -24px rgba(0, 0, 0, 0.9);
    --ease: cubic-bezier(0.2, 0.7, 0.3, 1);
}

* { box-sizing: border-box; }

html {
    -webkit-text-size-adjust: 100%;
    /* Плавный переход к якорю: разделы на лендинге связаны ссылками,
       и прыжок через пол-страницы сбивает с толку. */
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    margin: 0;
    background: var(--navy);
    color: var(--text);
    font-family: var(--body);
    font-size: 17px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* Свечение за героем — единственное украшение на весь сайт. Стоковых
   картинок нет намеренно: чужие улыбающиеся люди не имеют отношения
   к тому, что здесь продаётся. */
body::before {
    content: "";
    position: fixed;
    inset: -35vh 0 auto 0;
    height: 80vh;
    background:
        radial-gradient(ellipse 60% 55% at 30% 0%, rgba(90, 147, 204, 0.20), transparent 70%),
        radial-gradient(ellipse 50% 45% at 78% 5%, rgba(82, 184, 172, 0.13), transparent 70%);
    pointer-events: none;
    z-index: 0;
}

.wrap {
    position: relative;
    z-index: 1;
    max-width: var(--page);
    margin: 0 auto;
    padding: 0 20px;
}

.narrow { max-width: 760px; }

a { color: var(--azure-bright); text-decoration: none; }
a:hover { color: var(--text); }

/* ССЫЛКА ВНУТРИ ТЕКСТА ПОДЧЁРКНУТА, А НЕ ТОЛЬКО ОКРАШЕНА.
   Цвет один не годится: людям с нарушением цветовосприятия ссылка
   в абзаце неотличима от обычного слова. Кнопки, карточки и меню
   этого не касаются — они и так читаются как нажимаемые. */
p a:not(.btn), li a:not(.btn), .doc a, .answer a, footer nav a {
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-thickness: 1px;
    text-decoration-color: rgba(122, 172, 219, 0.45);
}
p a:not(.btn):hover, li a:not(.btn):hover, .doc a:hover,
.answer a:hover, footer nav a:hover { text-decoration-color: currentColor; }

svg { display: block; }
.ico { width: 22px; height: 22px; stroke-width: 1.6; fill: none; stroke: currentColor; }

/* --- шапка ------------------------------------------------------------ */

.top {
    position: sticky;
    top: 0;
    z-index: 10;
    backdrop-filter: blur(12px);
    background: rgba(15, 23, 32, 0.82);
    border-bottom: 1px solid var(--line);
}

.top .bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    height: 64px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--display);
    font-size: 21px;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--text);
}
.brand:hover { color: var(--text); }

.top nav {
    display: none;
    gap: 26px;
    font-size: 15px;
}
.top nav a { color: var(--text-2); transition: color 0.15s var(--ease); }
.top nav a:hover { color: var(--text); }

@media (min-width: 720px) { .top nav { display: flex; } }

.top .cta { display: none; }
@media (min-width: 900px) { .top .cta { display: inline-flex; } }

/* --- крупные куски ---------------------------------------------------- */

section { padding: 64px 0; position: relative; }
section.tight { padding: 40px 0; }
.rule { border-top: 1px solid var(--line); }

h1, h2, h3, .price, .big {
    font-family: var(--display);
    letter-spacing: -0.03em;
    font-weight: 800;
}

h1 {
    font-size: clamp(34px, 8vw, 60px);
    line-height: 1.05;
    margin: 0 0 20px;
}

h2 {
    font-size: clamp(26px, 5vw, 38px);
    line-height: 1.15;
    margin: 0 0 12px;
}

h3 {
    font-size: 19px;
    line-height: 1.3;
    letter-spacing: -0.02em;
    margin: 0 0 8px;
    font-weight: 700;
}

.lead {
    font-size: clamp(17px, 2.2vw, 20px);
    color: var(--text-2);
    margin: 0 0 28px;
    max-width: 56ch;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--display);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--teal);
    margin-bottom: 18px;
}
.eyebrow::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--teal);
    box-shadow: 0 0 0 4px rgba(82, 184, 172, 0.18);
}

.muted { color: var(--text-3); }
.small { font-size: 14px; line-height: 1.55; }
.center { text-align: center; }

/* --- кнопки ----------------------------------------------------------- */

.buttons { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 15px 28px;
    border-radius: 999px;
    border: 1px solid transparent;
    background: var(--azure);
    color: #071019;
    font-family: var(--display);
    font-size: 16px;
    font-weight: 700;
    letter-spacing: -0.01em;
    cursor: pointer;
    transition: transform 0.18s var(--ease), box-shadow 0.18s var(--ease),
        background 0.18s var(--ease);
    box-shadow: 0 10px 26px -14px rgba(90, 147, 204, 0.9);
}
.btn:hover {
    background: var(--azure-bright);
    color: #071019;
    transform: translateY(-2px);
    box-shadow: 0 16px 32px -14px rgba(122, 172, 219, 0.95);
}
.btn:active { transform: translateY(0); }

.btn.ghost {
    background: transparent;
    border-color: var(--line-strong);
    color: var(--text);
    box-shadow: none;
}
.btn.ghost:hover { background: var(--raised); color: var(--text); }

.btn.wide { width: 100%; }
.btn[disabled] { opacity: 0.5; cursor: default; transform: none; }
.btn .ico { width: 19px; height: 19px; }

/* --- герой ------------------------------------------------------------ */

.hero { padding: 56px 0 40px; }
.hero-grid { display: grid; gap: 44px; align-items: center; }
@media (min-width: 940px) {
    .hero { padding: 88px 0 64px; }
    .hero-grid { grid-template-columns: 1.05fr 0.95fr; gap: 56px; }
}

/* Круг «Подключиться» — тот же жест, что в приложении. Он и есть
   главный образ продукта: одна кнопка, и связь работает. */
.dial {
    position: relative;
    width: min(300px, 74vw);
    aspect-ratio: 1;
    margin: 0 auto;
    display: grid;
    place-items: center;
}
.dial .ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 1px solid var(--line-strong);
}
.dial .ring.two { inset: 26px; border-color: rgba(90, 147, 204, 0.35); }
.dial .ring.three {
    inset: 52px;
    border: 2px solid transparent;
    border-top-color: var(--teal);
    border-right-color: var(--azure);
    animation: spin 9s linear infinite;
}
.dial .core {
    width: 54%;
    aspect-ratio: 1;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: radial-gradient(circle at 35% 30%, #6fa5da, var(--azure-deep));
    box-shadow: 0 0 60px -10px rgba(90, 147, 204, 0.55),
        inset 0 -10px 30px rgba(0, 0, 0, 0.35);
    color: #eaf3fb;
    font-family: var(--display);
    font-weight: 800;
    font-size: clamp(15px, 3.4vw, 19px);
    letter-spacing: -0.02em;
    text-align: center;
    line-height: 1.2;
}
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
    .dial .ring.three { animation: none; }
    html { scroll-behavior: auto; }
}

/* Рамка телефона под настоящий снимок экрана приложения. */
.phone {
    width: min(300px, 74vw);
    margin: 0 auto;
    padding: 10px;
    border-radius: 42px;
    background: linear-gradient(160deg, #26323f, #131c26);
    border: 1px solid var(--line-strong);
    box-shadow: var(--shadow);
}
.phone img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 32px;
    background: var(--navy-deep);
}

/* --- карточки --------------------------------------------------------- */

.grid { display: grid; gap: 16px; }
.grid.two { grid-template-columns: 1fr; }
.grid.three { grid-template-columns: 1fr; }

@media (min-width: 700px) { .grid.two { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 880px) { .grid.three { grid-template-columns: repeat(3, 1fr); } }

.card {
    background: linear-gradient(180deg, var(--surface), rgba(20, 29, 40, 0.6));
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 26px;
    transition: transform 0.2s var(--ease), border-color 0.2s var(--ease),
        box-shadow 0.2s var(--ease);
}
.card:hover {
    transform: translateY(-3px);
    border-color: var(--line-strong);
    box-shadow: var(--shadow);
}
.card p { margin: 0; color: var(--text-2); }

.card .ico-box {
    width: 42px;
    height: 42px;
    border-radius: var(--radius-sm);
    display: grid;
    place-items: center;
    background: rgba(90, 147, 204, 0.12);
    border: 1px solid rgba(90, 147, 204, 0.22);
    color: var(--azure-bright);
    margin-bottom: 16px;
}

/* Три цифры героя. */
.numbers { display: grid; gap: 12px; grid-template-columns: repeat(3, 1fr); }
.numbers .n {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 22px 14px;
    text-align: center;
}
.numbers .big {
    display: block;
    /* На узком экране колонка — треть от 390 px. «1 кнопка» в две строки
       читается как две разные мысли, поэтому размер подобран так, чтобы
       строка помещалась целиком. */
    font-size: clamp(19px, 5vw, 38px);
    line-height: 1.05;
    white-space: nowrap;
    color: var(--azure-bright);
}
.numbers .cap {
    display: block;
    font-size: 13px;
    color: var(--text-2);
    margin-top: 8px;
    line-height: 1.35;
}

/* --- шаги ------------------------------------------------------------- */

.steps { display: grid; gap: 16px; counter-reset: step; }
@media (min-width: 880px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.step {
    position: relative;
    padding: 26px 26px 26px 26px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}
.step::before {
    counter-increment: step;
    content: counter(step);
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    margin-bottom: 14px;
    border-radius: 50%;
    background: rgba(82, 184, 172, 0.14);
    border: 1px solid rgba(82, 184, 172, 0.35);
    color: var(--teal);
    font-family: var(--display);
    font-weight: 800;
    font-size: 15px;
}

/* --- тарифы ----------------------------------------------------------- */

.tariff {
    display: flex;
    flex-direction: column;
    position: relative;
    background: linear-gradient(180deg, var(--surface), rgba(20, 29, 40, 0.55));
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 28px;
    transition: transform 0.2s var(--ease), border-color 0.2s var(--ease),
        box-shadow 0.2s var(--ease);
}
.tariff:hover {
    transform: translateY(-3px);
    border-color: var(--line-strong);
    box-shadow: var(--shadow);
}
.tariff.pick {
    border-color: var(--azure-deep);
    box-shadow: 0 0 0 1px rgba(58, 108, 153, 0.35), var(--shadow);
}
.tariff .tag {
    position: absolute;
    top: -11px;
    left: 28px;
    padding: 3px 12px;
    border-radius: 999px;
    background: var(--azure);
    color: #071019;
    font-family: var(--display);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.02em;
}
.tariff .price { font-size: 40px; line-height: 1.05; margin: 10px 0 4px; }
.tariff .price span {
    font-size: 15px;
    font-weight: 500;
    letter-spacing: 0;
    color: var(--text-3);
    font-family: var(--body);
}
.tariff ul { list-style: none; padding: 0; margin: 16px 0 22px; }
.tariff li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    color: var(--text-2);
    border-top: 1px solid var(--line);
}
.tariff li:first-child { border-top: 0; }
.tariff li .ico { width: 17px; height: 17px; color: var(--teal); flex: none; }
.tariff .btn { margin-top: auto; }

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

.faq { display: grid; gap: 10px; }
.faq details {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    padding: 4px 20px;
    transition: border-color 0.2s var(--ease);
}
.faq details[open] { border-color: var(--line-strong); }
.faq summary {
    cursor: pointer;
    list-style: none;
    padding: 16px 30px 16px 0;
    position: relative;
    font-family: var(--display);
    font-weight: 700;
    font-size: 17px;
    letter-spacing: -0.01em;
    color: var(--text);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
    content: "";
    position: absolute;
    right: 4px;
    top: 50%;
    width: 9px;
    height: 9px;
    border-right: 2px solid var(--text-3);
    border-bottom: 2px solid var(--text-3);
    transform: translateY(-70%) rotate(45deg);
    transition: transform 0.2s var(--ease);
}
.faq details[open] summary::after { transform: translateY(-30%) rotate(225deg); }
.faq .answer { padding: 0 0 18px; color: var(--text-2); margin: 0; }
.faq .answer p { margin: 0 0 8px; }
.faq .answer p:last-child { margin: 0; }

/* --- формы ------------------------------------------------------------ */

form.box { max-width: 540px; }

label { display: block; margin: 20px 0 7px; font-size: 15px; color: var(--text-2); }

input[type="text"], input[type="email"], select, textarea {
    width: 100%;
    padding: 14px 16px;
    font-size: 17px;
    font-family: inherit;
    color: var(--text);
    background: var(--raised);
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-sm);
    transition: border-color 0.15s var(--ease);
}
input:hover, textarea:hover { border-color: var(--azure-deep); }
input:focus, select:focus, textarea:focus {
    outline: 2px solid var(--azure-deep);
    outline-offset: 1px;
    border-color: var(--azure);
}

.check {
    display: flex;
    gap: 11px;
    align-items: flex-start;
    margin: 22px 0;
    font-size: 15px;
    color: var(--text-2);
}
.check input { margin-top: 3px; width: 18px; height: 18px; flex: none; accent-color: var(--azure); }

.choice { display: grid; gap: 10px; }
.choice label {
    display: flex;
    align-items: center;
    gap: 13px;
    margin: 0;
    padding: 15px 17px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    color: var(--text);
    cursor: pointer;
    transition: border-color 0.15s var(--ease), background 0.15s var(--ease);
}
.choice label:hover { border-color: var(--line-strong); background: var(--raised); }
.choice label:has(input:checked) { border-color: var(--azure); background: var(--raised); }
.choice input { width: 18px; height: 18px; flex: none; accent-color: var(--azure); }
.choice .t { flex: 1; }
.choice .t b { display: block; font-family: var(--display); font-weight: 700; }
.choice .t span { font-size: 14px; color: var(--text-3); }
.choice .p { font-family: var(--display); font-weight: 800; white-space: nowrap; }

/* --- заметные плашки -------------------------------------------------- */

.note {
    border: 1px solid var(--line-strong);
    background: var(--surface);
    border-radius: var(--radius);
    padding: 20px 22px;
    color: var(--text-2);
}
.note.warn { border-color: #5a4326; background: #1d1912; color: #e8d6ba; }
.note.ok { border-color: #2c5443; background: #111f1a; color: #cfe8dc; }
.note p { margin: 0 0 8px; }
.note p:last-child { margin: 0; }

.key {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: clamp(20px, 5vw, 30px);
    letter-spacing: 0.08em;
    color: var(--teal);
    word-break: break-all;
}

.hash {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 12.5px;
    color: var(--text-3);
    word-break: break-all;
    margin: 8px 0 0;
}

/* Мелочь для проверки файла: спрятана, пока не понадобилась. */
details.tech { margin-top: 14px; }
details.tech summary {
    cursor: pointer;
    color: var(--text-3);
    font-size: 14px;
    list-style: none;
}
details.tech summary::-webkit-details-marker { display: none; }
details.tech summary::before { content: "▸ "; }
details.tech[open] summary::before { content: "▾ "; }

/* --- бейджи магазинов ------------------------------------------------- */

.badges { display: flex; flex-wrap: wrap; gap: 12px; }
.badge {
    display: inline-flex;
    transition: transform 0.18s var(--ease), opacity 0.18s var(--ease);
}
.badge:hover { transform: translateY(-2px); opacity: 0.9; }
.badge svg { height: 54px; width: auto; }

/* --- документы -------------------------------------------------------- */

.doc { max-width: 76ch; }
.doc h2 { margin-top: 44px; font-size: clamp(21px, 3.4vw, 26px); }
.doc h3 { margin-top: 28px; font-size: 18px; color: var(--text-2); }
.doc p, .doc li { color: var(--text-2); }
.doc ol, .doc ul { padding-left: 22px; }
.doc li { margin: 7px 0; }
.doc table { width: 100%; border-collapse: collapse; margin: 18px 0; font-size: 15px; }
.doc th, .doc td {
    text-align: left;
    padding: 11px 13px;
    border: 1px solid var(--line);
    color: var(--text-2);
    vertical-align: top;
}
.doc th { background: var(--surface); color: var(--text); font-weight: 600; }
.ph { color: var(--amber); }

.table-scroll { overflow-x: auto; }

/* --- подвал ----------------------------------------------------------- */

footer {
    border-top: 1px solid var(--line);
    padding: 44px 0 64px;
    color: var(--text-3);
    font-size: 14px;
    line-height: 1.6;
    background: var(--navy-deep);
}
footer .cols { display: grid; gap: 26px; margin-bottom: 26px; }
@media (min-width: 760px) { footer .cols { grid-template-columns: 1.4fr 1fr 1fr; } }
footer .head {
    font-family: var(--display);
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    margin: 0 0 12px;
    letter-spacing: -0.01em;
}
footer nav { display: grid; gap: 9px; }
footer a { color: var(--text-2); }
footer a:hover { color: var(--text); }
footer p { margin: 8px 0; max-width: 92ch; }

/* --- плашка про cookie ------------------------------------------------ */

#cookie {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: 12px;
    z-index: 20;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    padding: 15px 19px;
    background: rgba(26, 36, 49, 0.96);
    backdrop-filter: blur(10px);
    border: 1px solid var(--line-strong);
    border-radius: var(--radius);
    font-size: 14px;
    color: var(--text-2);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.5);
}
#cookie p { margin: 0; flex: 1 1 320px; }
#cookie button {
    padding: 11px 22px;
    font-family: var(--display);
    font-size: 15px;
    font-weight: 700;
    border-radius: 999px;
    border: 0;
    background: var(--azure);
    color: #071019;
    cursor: pointer;
}
@media (min-width: 640px) { #cookie { left: auto; right: 20px; max-width: 560px; } }
