/* ==========================================================================
   Компоненты: кнопки, поля, плашки, сетка-панель, карточки, телефон,
   витрина с вкладками, галерея, тарифы, таблица, FAQ, CTA
   ========================================================================== */

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 48px;
    padding: 0 24px;
    border-radius: var(--r-pill);
    font-size: 16px;
    font-weight: 500;
    line-height: 1;
    white-space: nowrap;
    transition: background-color .2s, color .2s, box-shadow .2s, transform .2s;
}
.btn:active { transform: scale(.98); }
.btn--sm { height: 40px; padding: 0 18px; font-size: 15px; }
.btn--lg { height: 56px; padding: 0 30px; font-size: 17px; }
.btn--primary { background: var(--color-accent); color: var(--color-white); }
.btn--primary:hover { background: var(--color-accent-hover); }
.btn--ghost { background: var(--color-surface-tint); color: var(--color-white); box-shadow: var(--edge); }
.btn--ghost:hover { background: var(--color-surface-active); box-shadow: var(--edge-hover); }
.btn svg { width: 18px; height: 18px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

.link-arrow { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; color: var(--color-accent); }
.link-arrow svg { width: 18px; height: 18px; transition: transform .2s; }
.link-arrow:hover svg { transform: translateX(3px); }

/* ---------- Поля и форма листа ожидания ---------- */

.input {
    width: 100%;
    height: 48px;
    padding: 0 18px;
    border: 0;
    border-radius: var(--r-pill);
    background: var(--color-background);
    box-shadow: inset 0 0 0 1px var(--color-border-strong);
    color: var(--color-white);
    outline: none;
    transition: box-shadow .2s;
}
.input::placeholder { color: var(--color-muted); }
.input:focus { box-shadow: inset 0 0 0 1.5px var(--color-accent); }

.waitlist-form { display: grid; grid-template-columns: 1fr auto; gap: 10px; }
.waitlist-form__status { grid-column: 1 / -1; font-size: 14px; min-height: 0; }
.waitlist-form__status:empty { display: none; }
.waitlist-form__status.is-ok { color: var(--color-safe); }
.waitlist-form__status.is-err { color: var(--color-risk); }
@media (max-width: 639px) { .waitlist-form { grid-template-columns: 1fr; } }

/* ---------- Плашки-пилюли (статистика героя, как на ton.org) ---------- */

.pills { display: flex; flex-wrap: wrap; gap: 12px; }
.pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border-radius: var(--r-pill);
    background: var(--color-surface-tint-a);
    box-shadow: var(--edge);
    font-weight: 500;
    line-height: 18px;
    color: var(--color-white);
}
.pill span { color: var(--color-muted); font-weight: 400; }
.pill--accent { color: var(--color-accent); }
.pill--safe { color: var(--color-safe); }
.pill--risk { color: var(--color-risk); }
.pill--sm { padding: 4px 10px; font-size: 13px; line-height: 16px; }

/* ---------- Иконка в карточках ---------- */

.ico { width: 32px; height: 32px; color: var(--color-accent); flex-shrink: 0; }
.ico--lg { width: 40px; height: 40px; }
.ico-tile {
    width: 52px; height: 52px; display: grid; place-items: center;
    border-radius: var(--r-md);
    background: var(--color-accent-soft);
    color: var(--color-accent);
}
.ico-tile svg { width: 26px; height: 26px; }

/* ---------- Сетка-панель с разделителями (Key Features на ton.org) ---------- */

.panel {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1px;
    border-radius: var(--r-lg);
    overflow: hidden;
    background: var(--color-divider);
    box-shadow: var(--edge);
}
.panel--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.panel--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.panel__cell {
    display: grid;
    align-content: start;
    gap: 16px;
    padding: 40px;
    background: var(--color-surface-tint);
    transition: background-color .25s;
}
a.panel__cell:hover { background: var(--color-surface-hover); }
.panel__cell h3 { font-size: 22px; line-height: 1.2; }
.panel__cell p { font-size: 16px; line-height: 1.6; }
.panel__cell p strong { color: var(--color-text); }

@media (max-width: 1023px) {
    .panel, .panel--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .panel__cell { padding: 32px; }
}
@media (max-width: 639px) {
    .panel, .panel--2, .panel--4 { grid-template-columns: 1fr; }
    .panel__cell { padding: 28px 24px; }
}

/* ---------- Карточки без фона (Vision на ton.org) ---------- */

.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.card {
    display: grid;
    align-content: start;
    gap: 20px;
    padding: 40px;
    border-radius: var(--r-lg);
    background: var(--color-surface-tint-a);
    box-shadow: var(--edge);
}
.card h3 { font-size: 24px; line-height: 1.1; }
@media (max-width: 1023px) { .cards { grid-template-columns: 1fr; gap: 16px; } .card { padding: 32px; } }

/* ---------- Телефон с реальным скриншотом ---------- */

.phone {
    position: relative;
    width: 100%;
    max-width: 340px;
    aspect-ratio: 783 / 1526;
    margin-inline: auto;
    filter: drop-shadow(0 40px 60px rgb(0 0 0 / 45%));
}
.phone img { width: 100%; height: 100%; object-fit: contain; }
.phone--sm { max-width: 260px; }
.phone--xs { max-width: 200px; }

/* Мягкое свечение позади телефона */
.glow { position: relative; isolation: isolate; }
.glow::before {
    content: "";
    position: absolute;
    inset: 10% 5%;
    z-index: -1;
    border-radius: 50%;
    background: radial-gradient(closest-side, rgb(30 174 251 / 28%), transparent);
    filter: blur(40px);
}
.glow--safe::before { background: radial-gradient(closest-side, rgb(43 212 125 / 22%), transparent); }
.glow--risk::before { background: radial-gradient(closest-side, rgb(242 66 95 / 22%), transparent); }

/* Подпись под скриншотом */
.shot-caption { margin-top: 18px; text-align: center; font-size: 14px; color: var(--color-muted); }

/* ---------- Витрина с вкладками (In Telegram на ton.org) ---------- */

.showcase {
    display: grid;
    grid-template-columns: 300px 1fr;
    border-radius: var(--r-lg);
    overflow: hidden;
    background: var(--color-surface-tint-a);
    box-shadow: var(--edge);
}
.showcase__tabs { display: grid; align-content: start; border-right: 1px solid var(--color-divider); }
.showcase__tab {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 22px 20px;
    text-align: left;
    color: var(--color-white);
    border-bottom: 1px solid var(--color-divider);
    transition: background-color .2s;
}
.showcase__tab svg { width: 22px; height: 22px; color: var(--color-muted); transition: color .2s; }
.showcase__tab:hover { background: var(--color-surface-hover); }
.showcase__tab[aria-selected="true"] { background: var(--color-surface-active); }
.showcase__tab[aria-selected="true"] svg { color: var(--color-accent); }

.showcase__panel {
    display: grid;
    grid-template-columns: 1fr 300px;
    align-items: center;
    gap: 48px;
    padding: 64px 72px;
    min-height: 640px;
}
.showcase__panel[hidden] { display: none; }
.showcase__text { display: grid; gap: 20px; align-content: center; }
.showcase__text h3 { font-size: 32px; line-height: 1.15; }
.showcase__panel .phone { max-width: 300px; animation: rise .6s var(--ease); }

@keyframes rise { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }

@media (max-width: 1099px) {
    .showcase { grid-template-columns: 1fr; }
    .showcase__tabs { display: flex; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--color-divider); scrollbar-width: none; }
    .showcase__tab { border-bottom: 0; white-space: nowrap; padding: 18px 20px; }
    .showcase__panel { padding: 48px; min-height: 0; }
}
@media (max-width: 767px) {
    .showcase__panel { grid-template-columns: 1fr; padding: 32px 24px 40px; gap: 32px; }
    .showcase__text h3 { font-size: 24px; }
    .showcase__panel .phone { max-width: 260px; }
}

/* ---------- Списки с галочками ---------- */

.checks { display: grid; gap: 12px; }
.checks li { display: grid; grid-template-columns: 22px 1fr; gap: 12px; align-items: start; color: var(--color-text); line-height: 1.5; }
.checks li svg { width: 20px; height: 20px; margin-top: 2px; color: var(--color-accent); }
.checks--muted li { color: var(--color-muted); }

/* ---------- Ряд «текст + телефон» ---------- */

.split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 80px;
}
.split__text { display: grid; gap: 24px; align-content: center; max-width: 560px; }
.split--reverse .split__media { order: -1; }
.split__media { display: flex; justify-content: center; gap: 24px; }
.split__media .phone { margin: 0; }
.split__media .phone:nth-child(2) { margin-top: 80px; }
.split + .split { margin-top: 140px; }

@media (max-width: 1023px) {
    .split { grid-template-columns: 1fr; gap: 48px; }
    .split--reverse .split__media { order: 0; }
    .split + .split { margin-top: 96px; }
}
@media (max-width: 639px) {
    .split__media { gap: 12px; }
    .split__media .phone:nth-child(2) { margin-top: 40px; }
}

/* ---------- Галерея скриншотов (горизонтальная лента) ---------- */

.gallery {
    display: flex;
    gap: 28px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding: 20px var(--pad-inline) 40px;
    margin-inline: calc(var(--pad-inline) * -1);
    scrollbar-width: thin;
    scrollbar-color: var(--color-border-strong) transparent;
}
.gallery figure { flex: 0 0 240px; scroll-snap-align: center; }
.gallery .phone { max-width: 240px; filter: drop-shadow(0 24px 36px rgb(0 0 0 / 40%)); }
.gallery figcaption { margin-top: 16px; text-align: center; font-size: 14px; color: var(--color-muted); }
.gallery-nav { display: flex; gap: 8px; }
.gallery-nav button {
    width: 44px; height: 44px; display: grid; place-items: center;
    border-radius: 50%; background: var(--color-surface-tint); box-shadow: var(--edge); color: var(--color-white);
}
.gallery-nav button:hover { background: var(--color-surface-active); }
.gallery-nav svg { width: 20px; height: 20px; }
.gallery-nav button:first-child svg { transform: scaleX(-1); }
@media (max-width: 639px) { .gallery figure { flex-basis: 200px; } .gallery .phone { max-width: 200px; } }

/* ---------- Шаги ---------- */

.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; border-radius: var(--r-lg); overflow: hidden; background: var(--color-divider); box-shadow: var(--edge); }
.step { padding: 32px; background: var(--color-surface-tint); display: grid; gap: 12px; align-content: start; }
.step__num { font-family: var(--font-mono); font-size: 14px; color: var(--color-accent); }
.step h3 { font-size: 20px; line-height: 1.25; }
.step p { font-size: 15px; }
@media (max-width: 1023px) { .steps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 639px) { .steps { grid-template-columns: 1fr; } }

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

.plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; align-items: stretch; }
.plan {
    position: relative;
    display: grid;
    grid-template-rows: auto auto auto 1fr auto;
    gap: 20px;
    padding: 36px;
    border-radius: var(--r-lg);
    background: var(--color-surface-tint-a);
    box-shadow: var(--edge);
}
.plan--featured { background: linear-gradient(180deg, rgb(30 174 251 / 14%), rgb(29 38 51 / 80%) 45%); box-shadow: inset 0 0 0 1px rgb(30 174 251 / 45%); }
.plan__tag { position: absolute; top: 20px; right: 20px; }
.plan__name { font-size: 22px; font-weight: 500; color: var(--color-white); }
.plan__price { display: flex; align-items: baseline; gap: 8px; }
.plan__price b { font-size: 44px; line-height: 1; font-weight: 500; color: var(--color-white); letter-spacing: -0.02em; }
.plan__price span { color: var(--color-muted); }
.plan__desc { font-size: 15px; }
.plan .btn { width: 100%; }
@media (max-width: 1023px) { .plans { grid-template-columns: 1fr; max-width: 560px; margin-inline: auto; } }

/* Компактные тарифные плашки (пакеты проверок, уровни Protect) */
.tiers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; border-radius: var(--r-lg); overflow: hidden; background: var(--color-divider); box-shadow: var(--edge); }
.tier { display: grid; gap: 10px; padding: 32px; background: var(--color-surface-tint); align-content: start; }
.tier__name { display: flex; align-items: center; gap: 10px; font-size: 18px; font-weight: 500; color: var(--color-white); }
.tier__price { font-size: 32px; font-weight: 500; color: var(--color-white); letter-spacing: -0.02em; }
.tier__price small { font-size: 15px; font-weight: 400; color: var(--color-muted); letter-spacing: 0; }
.tier ul { display: grid; gap: 8px; margin-top: 6px; }
.tier li { font-size: 15px; color: var(--color-muted); padding-left: 18px; position: relative; }
.tier li::before { content: ""; position: absolute; left: 0; top: .62em; width: 6px; height: 6px; border-radius: 50%; background: var(--color-accent); }
@media (max-width: 899px) { .tiers { grid-template-columns: 1fr; } }

/* ---------- Таблица сравнения ---------- */

.table-wrap { overflow-x: auto; border-radius: var(--r-lg); box-shadow: var(--edge); background: var(--color-surface-tint-a); }
.compare { width: 100%; min-width: 620px; border-collapse: collapse; }
.compare th, .compare td { padding: 18px 24px; text-align: left; border-bottom: 1px solid var(--color-divider); }
.compare thead th { font-size: 14px; font-weight: 600; text-transform: uppercase; color: var(--color-muted); background: var(--color-surface-tint); }
.compare thead th:not(:first-child), .compare td:not(:first-child) { text-align: center; width: 18%; }
.compare tbody th { font-weight: 400; color: var(--color-text); }
.compare tbody tr:last-child > * { border-bottom: 0; }
.compare tbody tr:hover > * { background: rgb(255 255 255 / 2%); }
.compare svg { width: 20px; height: 20px; margin-inline: auto; }
.compare .yes { color: var(--color-accent); }
.compare .no { color: var(--color-border-strong); }

/* ---------- FAQ ---------- */

.faq { display: grid; gap: 12px; max-width: 880px; margin-inline: auto; }
.faq details { border-radius: var(--r-lg); background: var(--color-surface-tint-a); box-shadow: var(--edge); }
.faq summary {
    list-style: none;
    display: flex; justify-content: space-between; align-items: center; gap: 20px;
    padding: 24px 28px;
    font-size: 18px; font-weight: 500; color: var(--color-white);
    cursor: pointer;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary svg { width: 22px; height: 22px; flex-shrink: 0; color: var(--color-muted); transition: transform .25s var(--ease); }
.faq details[open] summary svg { transform: rotate(45deg); color: var(--color-accent); }
.faq details > div { padding: 0 28px 26px; display: grid; gap: 10px; }
@media (max-width: 639px) { .faq summary { padding: 20px; font-size: 16px; } .faq details > div { padding: 0 20px 20px; } }

/* ---------- CTA-баннер ---------- */

.cta {
    position: relative;
    overflow: hidden;
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    align-items: center;
    gap: 48px;
    padding: 72px;
    border-radius: var(--r-xl);
    background:
        radial-gradient(60% 90% at 100% 0%, rgb(30 174 251 / 22%), transparent 70%),
        var(--color-surface-tint);
    box-shadow: var(--edge);
}
.cta__text { display: grid; gap: 20px; }
.cta__media { display: flex; justify-content: center; gap: 16px; margin-block: -24px -140px; }
.cta__media .phone { flex: 0 0 220px; max-width: 220px; margin-inline: 0; }
.cta__media .phone:first-child { margin-top: 60px; }
@media (max-width: 1023px) {
    .cta { grid-template-columns: 1fr; padding: 48px 40px 0; }
    .cta__media { margin: 0 0 -120px; }
}
@media (max-width: 639px) {
    .cta { padding: 36px 20px 0; }
    .cta__media .phone { flex-basis: 140px; max-width: 140px; }
    .cta__media .phone:first-child { margin-top: 40px; }
}

/* ---------- Заметка / предупреждение ---------- */

.note {
    display: grid;
    grid-template-columns: 24px 1fr;
    gap: 14px;
    padding: 20px 24px;
    border-radius: var(--r-lg);
    background: var(--color-surface-tint-a);
    box-shadow: var(--edge);
    font-size: 15px;
}
.note svg { width: 22px; height: 22px; color: var(--color-accent); }
.note--risk svg { color: var(--color-risk); }
.note p { color: var(--color-muted); }

/* ---------- Мини-шкала риска (AML) ---------- */

.riskbar { display: grid; gap: 14px; }
.riskbar__row { display: grid; grid-template-columns: 160px 1fr 48px; align-items: center; gap: 16px; font-size: 15px; }
.riskbar__row span:first-child { color: var(--color-text); }
.riskbar__row span:last-child { text-align: right; font-family: var(--font-mono); }
.riskbar__track { height: 6px; border-radius: 3px; background: var(--color-surface-active); overflow: hidden; }
.riskbar__track i { display: block; height: 100%; border-radius: inherit; width: var(--w); background: var(--c, var(--color-accent)); transform-origin: left; transform: scaleX(0); transition: transform 1.1s var(--ease); }
.is-in .riskbar__track i, html:not(.js) .riskbar__track i { transform: scaleX(1); }
@media (max-width: 639px) { .riskbar__row { grid-template-columns: 120px 1fr 40px; gap: 10px; font-size: 14px; } }
