/*
 * Разделы /card/ и /atm/ — макеты PgCard и PgCash (docs/redesign-1910/design).
 * Зона card+atm. Классы — с приставкой ca-, цвета — только токенами r26.css
 * (иначе светлая тема разъедется). Значения — из макета; где у элемента в
 * макете рамка и content-box, высота здесь на 2 px больше написанной там.
 */

/* Свои оттенки, которых нет в общем слое (пары тёмная / светлая из макета). */
:root {
  --ca-art-glow: rgba(91, 63, 235, 0.3);
  --ca-num: rgba(255, 255, 255, 0.08);
  --ca-bar-bg: rgba(255, 255, 255, 0.06);
}
:root[data-theme="light"] {
  --ca-art-glow: rgba(91, 63, 235, 0.14);
  --ca-num: rgba(21, 19, 31, 0.08);
  --ca-bar-bg: rgba(21, 19, 31, 0.06);
}

.ca-top { padding-top: 12px; }
.ca-green { color: var(--r-green); }
.ca-red { color: var(--r-red); }

/* Галочка в зелёном кружке (размер — в разметке). */
.ca-ok {
  flex: none; border-radius: 999px; background: var(--r-green-tint); color: var(--r-green);
  display: flex; align-items: center; justify-content: center;
}

/* ══ Первый экран ════════════════════════════════════════════════════════ */
.ca-hero {
  /* min-height 520 + поля 80 + рамка 2 — в макете content-box. */
  min-height: 602px; padding: 40px 56px; box-sizing: border-box;
  display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 32px; align-items: center;
}
.ca-glow {
  position: absolute; inset-inline-end: -120px; top: -160px; width: 720px; height: 720px;
  border-radius: 999px; pointer-events: none;
  background: radial-gradient(circle, var(--r-glow) 0%, rgba(91, 63, 235, 0) 62%);
}
.ca-hero-txt { position: relative; display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.ca-h1 { margin: 0; font-size: 60px; font-weight: 800; line-height: 1.02; letter-spacing: -0.035em; }
.ca-lead { font-size: 18px; max-width: 540px; }
.ca-btns { padding-top: 6px; }
/* Главная кнопка в макете без рамки (у общей .r-btn — прозрачная в 1 px). */
.ca-btns .r-btn:not(.r-btn--ghost) { border: 0; }
.ca-chips { padding-top: 8px; }

.ca-hero-art { position: relative; display: flex; justify-content: center; align-items: center; min-height: 380px; min-width: 0; }
.ca-art { position: relative; width: 100%; }
.ca-art--card { max-width: 520px; }

.ca-photo { position: relative; display: block; overflow: hidden; border-radius: 28px; background: var(--r-bg); }
.ca-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.ca-photo--hero { height: 420px; border-radius: 32px; }

/* Всплывающая карточка слева снизу и фиолетовый бейдж справа сверху. */
.ca-pop {
  position: absolute; inset-inline-start: -28px; bottom: 36px;
  display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 18px;
  background: var(--r-surface-3); border: 1px solid var(--r-line-2); box-shadow: var(--r-pop-shadow);
}
.ca-pop .ca-ok { border-radius: 12px; }
.ca-pop-tx { display: flex; flex-direction: column; gap: 2px; }
.ca-pop-b { font-size: 14px; font-weight: 800; }
.ca-pop-s { font-size: 12px; color: var(--r-muted); }
.ca-pop--cash { inset-inline-start: -26px; bottom: 34px; padding: 14px 18px; flex-direction: column; align-items: flex-start; gap: 2px; }
.ca-pop--cash .ca-pop-s { font-weight: 700; }
.ca-pop-v { font-size: 28px; font-weight: 800; letter-spacing: -0.02em; color: var(--r-green); }

.ca-badge {
  position: absolute; inset-inline-end: -18px; top: 28px;
  display: flex; flex-direction: column; gap: 2px; padding: 12px 16px; border-radius: 16px;
  background: var(--r-brand); color: #FFFFFF; box-shadow: 0 16px 36px rgba(91, 63, 235, 0.45);
}
.ca-badge-v { font-size: 24px; font-weight: 800; letter-spacing: -0.02em; }
.ca-badge-s { font-size: 12px; font-weight: 700; opacity: 0.85; }
.ca-badge--cash { inset-inline-end: -16px; top: 26px; gap: 0; }
.ca-badge--cash .ca-badge-v { font-size: 22px; letter-spacing: 0; }
.ca-badge--cash .ca-badge-s { font-weight: 500; }

/* ══ Шапки секций и сетки ════════════════════════════════════════════════ */
.ca-sec-row { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; }
.ca-sec22 { gap: 22px; }
.ca-sec48 { padding-top: 48px; }
.ca-g3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.ca-g4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.ca-note { font-size: 13px; color: var(--r-faint); line-height: 1.5; }

/* ══ Тарифы карты ════════════════════════════════════════════════════════ */
.ca-tiers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.ca-tier {
  position: relative; overflow: hidden; border-radius: 28px; background: var(--r-surface);
  border: 1px solid var(--r-line); padding: 22px; display: flex; flex-direction: column; gap: 18px; min-width: 0;
}
.ca-tier--pop { border-color: var(--r-brand-2); box-shadow: 0 24px 60px rgba(91, 63, 235, 0.25); }
.ca-tier-badge {
  position: absolute; top: 18px; inset-inline-end: 18px; z-index: 1;
  font-size: 11px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 5px 10px; border-radius: 999px; background: var(--r-brand); color: #FFFFFF;
}
.ca-tier-art {
  display: flex; justify-content: center; padding: 18px 0 6px;
  background: radial-gradient(circle at 50% 60%, var(--ca-art-glow) 0%, rgba(91, 63, 235, 0) 62%);
}
.ca-tier-art img { width: 300px; height: 228px; max-width: 100%; flex: none; object-fit: contain; transform: rotate(-4deg); }
.ca-tier-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; }
.ca-tier-name { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ca-tier-n { font-size: 24px; font-weight: 800; }
.ca-tier-s { font-size: 13px; color: var(--r-muted); }
.ca-tier-price { display: flex; flex-direction: column; align-items: flex-end; flex: none; }
.ca-tier-v { font-size: 30px; font-weight: 800; letter-spacing: -0.02em; color: var(--r-link); }
.ca-tier-u { font-size: 12px; color: var(--r-muted); white-space: nowrap; }
.ca-tier-list {
  margin: 0; padding: 16px 0 0; list-style: none; display: flex; flex-direction: column; gap: 10px;
  border-top: 1px solid var(--r-line);
}
.ca-tier-list li { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--r-text-2); line-height: 1.45; }
.ca-tier-btn {
  margin-top: auto; height: 52px; border-radius: 14px; box-sizing: border-box;
  background: var(--r-fill-3); color: var(--r-text); border: 1px solid var(--r-line-2);
  font-size: 15px; font-weight: 800; display: flex; align-items: center; justify-content: center; text-decoration: none;
  transition: background .16s ease;
}
.ca-tier-btn:hover { background: var(--r-hover); color: var(--r-text); }
.ca-tier--pop .ca-tier-btn { background: var(--r-brand); border-color: var(--r-brand); color: #FFFFFF; }
.ca-tier--pop .ca-tier-btn:hover { background: var(--r-brand-2); border-color: var(--r-brand-2); }

/* ══ «Сколько стоит» ═════════════════════════════════════════════════════ */
.ca-stat { padding: 26px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.ca-stat-v { font-size: 44px; font-weight: 800; letter-spacing: -0.03em; line-height: 1; color: var(--r-link); }
.ca-stat-v.ca-green { color: var(--r-green); }
.ca-stat-t { font-size: 15px; font-weight: 800; }
.ca-stat-p { font-size: 13px; color: var(--r-muted); line-height: 1.45; }

/* ══ Фото с подписью ═════════════════════════════════════════════════════ */
.ca-where { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 16px; }
.ca-shot { text-decoration: none; color: #FFFFFF; }
.ca-shot-dim {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(10, 10, 15, 0.88) 0%, rgba(10, 10, 15, 0.5) 34%, rgba(10, 10, 15, 0) 62%);
}
.ca-shot-cap {
  position: absolute; inset-inline: 28px; bottom: 24px; display: flex; flex-direction: column; gap: 6px; color: #FFFFFF;
}
.ca-shot-t { font-size: 22px; font-weight: 800; }
.ca-shot-p { font-size: 14px; line-height: 1.5; color: rgba(255, 255, 255, 0.82); }
a.ca-shot img { transition: transform .4s ease; }
a.ca-shot:hover img { transform: scale(1.03); }

/* ══ Шаги ════════════════════════════════════════════════════════════════ */
.ca-step { position: relative; padding: 24px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.ca-step-n {
  width: 44px; height: 44px; border-radius: 14px; background: var(--r-brand); color: #FFFFFF;
  font-size: 18px; font-weight: 800; display: flex; align-items: center; justify-content: center;
}
.ca-step-t { font-size: 18px; font-weight: 800; }
.ca-step-p { font-size: 14px; color: var(--r-muted); line-height: 1.5; }

.ca-st { padding: 24px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.ca-st-top { display: flex; justify-content: space-between; align-items: center; }
.ca-st-ic {
  width: 48px; height: 48px; border-radius: 15px; background: var(--r-brand-tint); color: var(--r-link);
  display: flex; align-items: center; justify-content: center;
}
.ca-st-ic--warn { background: var(--r-red-line); color: var(--r-red); }
.ca-st-n { font-size: 32px; font-weight: 800; color: var(--ca-num); }

/* ══ «Контроль» ══════════════════════════════════════════════════════════ */
.ca-ctl { padding: 44px 56px; display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 32px; align-items: center; }
.ca-ctl-txt { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.ca-ctl-list { display: flex; flex-direction: column; gap: 12px; padding-top: 4px; }
.ca-ctl-it { display: flex; gap: 12px; align-items: flex-start; }
.ca-ctl-p { font-size: 15px; line-height: 1.5; color: var(--r-text-2); }
.ca-ctl-p strong { color: var(--r-text); font-weight: 800; }
.ca-ctl-art { display: flex; justify-content: center; }
.ca-ctl-art img { width: 300px; height: 300px; max-width: 100%; object-fit: contain; }

/* ══ Формула ═════════════════════════════════════════════════════════════ */
.ca-fxb { padding: 40px 48px; display: flex; flex-direction: column; gap: 26px; }
.ca-fxb > .r-sec-head { position: relative; }
.ca-glow--fx { inset-inline-end: -220px; top: -300px; background: radial-gradient(circle, rgba(91, 63, 235, 0.25) 0%, rgba(91, 63, 235, 0) 62%); }
.ca-fx-row { position: relative; display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.ca-fx {
  padding: 22px 26px; border-radius: 22px; background: var(--r-surface-3); border: 1px solid var(--r-line-2);
  display: flex; flex-direction: column; gap: 4px; min-width: 0;
}
.ca-fx-l { font-size: 12px; font-weight: 800; letter-spacing: 0.1em; color: var(--r-muted); text-transform: uppercase; }
.ca-fx-v { font-size: 40px; font-weight: 800; letter-spacing: -0.03em; }
.ca-fx--acc .ca-fx-v { color: var(--r-link); }
.ca-fx--on { background: var(--r-brand); border-color: transparent; color: #FFFFFF; border-width: 0; }
.ca-fx--on .ca-fx-l { color: #FFFFFF; opacity: 0.8; }
.ca-fx-op { font-size: 40px; font-weight: 800; color: var(--r-faint); }

/* ══ Примеры ═════════════════════════════════════════════════════════════ */
.ca-ex { padding: 8px 28px 10px; }
.ca-ex-row {
  display: grid; grid-template-columns: 140px 1fr 150px; gap: 20px; align-items: center;
  padding: 18px 0; border-top: 1px solid var(--r-line);
}
.ca-ex-a { font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ca-ex-bar { position: relative; height: 14px; border-radius: 999px; background: var(--ca-bar-bg); overflow: hidden; display: flex; }
.ca-ex-bar > span:first-child { background: linear-gradient(90deg, var(--r-brand), var(--r-accent)); }
.ca-ex-bar > span:last-child { flex: 1; background: rgba(229, 72, 77, 0.5); }
[dir="rtl"] .ca-ex-bar > span:first-child { background: linear-gradient(-90deg, var(--r-brand), var(--r-accent)); }
.ca-ex-out { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.ca-ex-v { font-size: 20px; font-weight: 800; color: var(--r-green); font-variant-numeric: tabular-nums; }
.ca-ex-f { font-size: 12px; color: var(--r-muted); white-space: nowrap; }

/* ══ Лимиты ══════════════════════════════════════════════════════════════ */
.ca-lim { padding: 22px; display: flex; align-items: center; gap: 18px; min-width: 0; }
.ca-lim img { width: 110px; height: 83px; flex: none; object-fit: contain; }
.ca-lim-n { flex: 1; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ca-lim-t { font-size: 17px; font-weight: 800; }
.ca-lim-s { font-size: 13px; color: var(--r-muted); }
.ca-lim-v { font-size: 22px; font-weight: 800; color: var(--r-link); text-align: end; white-space: nowrap; }
/* Вместо числа — «в приложении» (лимитов Signature и Physical на сайте нет). */
.ca-lim-v--txt { font-size: 15px; }

/* ══ «Важно» ═════════════════════════════════════════════════════════════ */
.ca-warn { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 16px; }
.ca-warn-txt { padding: 36px 40px; display: flex; flex-direction: column; gap: 14px; }
.ca-h2-34 { font-size: 34px; }

/* ══ Частые вопросы ══════════════════════════════════════════════════════ */
.ca-faq { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 48px; align-items: start; }
.ca-qa { display: flex; flex-direction: column; border-bottom: 1px solid var(--r-line-2); min-width: 0; }
.ca-q { border-top: 1px solid var(--r-line-2); padding: 20px 0; }
.ca-q summary {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  cursor: pointer; list-style: none;
}
.ca-q summary::-webkit-details-marker { display: none; }
.ca-q-t { font-size: 18px; font-weight: 800; }
.ca-q-ic {
  width: 34px; height: 34px; flex: none; border-radius: 999px; background: var(--r-fill-3); color: var(--r-text-2);
  display: flex; align-items: center; justify-content: center; transition: background .16s ease;
}
.ca-q summary:hover .ca-q-ic { background: var(--r-hover); color: var(--r-text); }
.ca-q[open] .ca-q-ic { background: var(--r-brand); color: #FFFFFF; }
.ca-q[open] .ca-v { display: none; }
.ca-q p { margin: 10px 0 0; font-size: 15px; color: var(--r-muted); line-height: 1.6; max-width: 760px; }

/* ══ Планшет ═════════════════════════════════════════════════════════════ */
@media (max-width: 1199px) {
  .ca-h1 { font-size: clamp(34px, 4.4vw + 4px, 60px); }
  .ca-fx-v { font-size: 34px; }
  .ca-fx-op { font-size: 34px; }
}
@media (max-width: 1023px) {
  .ca-tiers { grid-template-columns: 1fr; max-width: 520px; }
  .ca-g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ca-g3 { grid-template-columns: 1fr; }
  .ca-faq { grid-template-columns: 1fr; gap: 24px; }
}
@media (max-width: 899px) {
  .ca-hero { grid-template-columns: 1fr; min-height: 0; padding: 32px 28px; gap: 28px; }
  .ca-hero-art { min-height: 0; }
  .ca-photo--hero { height: 360px; }
  .ca-pop { inset-inline-start: -8px; }
  .ca-badge { inset-inline-end: -8px; }
  .ca-where, .ca-warn { grid-template-columns: 1fr; }
  .ca-ctl { grid-template-columns: 1fr; padding: 32px 28px; gap: 8px; }
  .ca-ctl-art img { width: 220px; height: 220px; }
  .ca-fxb { padding: 32px 28px; }
}

/* ══ Телефон ═════════════════════════════════════════════════════════════ */
@media (max-width: 719px) {
  .ca-hero { padding: 26px 20px; gap: 22px; }
  .ca-hero-txt { gap: 14px; }
  .ca-lead { font-size: 16px; }
  .ca-btns { padding-top: 2px; }
  .ca-btns .r-btn { flex: 1 1 auto; }
  .ca-chips { padding-top: 2px; }
  .ca-photo--hero { height: 260px; border-radius: 24px; }
  .ca-art { margin-bottom: 26px; }
  .ca-pop { inset-inline-start: 10px; bottom: -26px; padding: 10px 14px; }
  .ca-pop-v { font-size: 22px; }
  .ca-badge { inset-inline-end: 10px; top: 12px; padding: 10px 14px; }
  .ca-badge-v { font-size: 20px; }

  .ca-sec-row { align-items: flex-start; flex-direction: column; gap: 16px; }
  .ca-sec22 { gap: 18px; }
  .ca-sec48 { padding-top: 36px; }
  .ca-tier { border-radius: 24px; padding: 18px; gap: 16px; }
  .ca-tier-art img { width: 240px; height: 182px; }
  .ca-g4 { grid-template-columns: 1fr; gap: 12px; }
  .ca-g3, .ca-tiers { gap: 12px; }
  .ca-stat { padding: 22px; }
  .ca-stat-v { font-size: 38px; }
  .ca-step, .ca-st { padding: 20px; }
  .ca-shot { border-radius: 24px; }
  .ca-where .ca-shot { height: 280px !important; }
  .ca-warn .ca-shot { height: 260px !important; }
  .ca-shot-cap { inset-inline: 20px; bottom: 18px; }
  .ca-shot-t { font-size: 19px; }
  .ca-ctl { padding: 26px 20px; }
  .ca-ctl-art img { width: 180px; height: 180px; }

  .ca-fxb { padding: 26px 20px; gap: 20px; }
  .ca-fx-row { gap: 10px; }
  .ca-fx { padding: 16px 18px; border-radius: 18px; }
  .ca-fx-v, .ca-fx-op { font-size: 28px; }
  .ca-fx--on { flex: 1 1 100%; }

  .ca-ex { padding: 4px 18px 6px; }
  .ca-ex-row { grid-template-columns: 1fr auto; gap: 10px 16px; padding: 16px 0; }
  .ca-ex-bar { grid-column: 1 / -1; grid-row: 2; height: 10px; }
  .ca-ex-a, .ca-ex-v { font-size: 18px; }

  .ca-lim { padding: 18px; gap: 14px; }
  .ca-lim img { width: 80px; height: 60px; }
  .ca-lim-v { font-size: 18px; }
  .ca-lim-v.ca-lim-v--txt { font-size: 14px; }

  .ca-warn-txt { padding: 26px 20px; }
  .ca-h2-34 { font-size: 28px; }

  .ca-q { padding: 18px 0; }
  .ca-q-t { font-size: 16px; }
}
@media (max-width: 359px) {
  .ca-hero { padding: 22px 16px; }
  .ca-tier { padding: 16px; }
  .ca-tier-n { font-size: 21px; }
  .ca-tier-v { font-size: 26px; }
  .ca-fx-v, .ca-fx-op { font-size: 24px; }
  .ca-lim img { width: 64px; height: 48px; }
  .ca-ex { padding: 4px 14px 6px; }
}

/* Перенос заголовков — как в макете (обычный, без text-wrap: balance общего
   слоя): иначе «Четыре шага без лишних комиссий» ломается на строку раньше. */
@media (min-width: 720px) {
  .ca-top h1, main .r-h2 { text-wrap: wrap; }
}

/* Цифры «Сколько стоит» на телефоне — два на два, а не столбиком в четыре экрана. */
@media (max-width: 719px) {
  .ca-g4--stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ca-g4--stats .ca-stat { padding: 18px; }
  .ca-g4--stats .ca-stat-v { font-size: 32px; }
}
@media (max-width: 359px) {
  .ca-g4--stats .ca-stat { padding: 16px 14px; }
  .ca-g4--stats .ca-stat-v { font-size: 28px; }
}

/* RTL: самолётик в кнопке и стрелка формулы смотрят по ходу письма. */
[dir="rtl"] .ca-btns .r-btn svg, [dir="rtl"] .ca-arr { transform: scaleX(-1); }
.ca-arr { display: inline-block; }
