/* Вариант 2 «Платежи»: структура как у Плати по миру, стиль Tangem.
   Анимации только transform и opacity, кривая var(--ease). */

/* ---------- Тон страницы ----------
   Текст и плашки идут за тоном всей страницы и перетекают вместе с фоном.
   Так заголовок следующей секции никогда не оказывается белым на белом.
   Весь текст наследует цвет body (он плавно меняется в base.css), серый текст
   получается из того же цвета через color-mix. Отдельные transition на тексте
   не ставим: вложенные переходы цвета в Chrome запаздывают на секунду и больше. */
section[data-tone] { color: inherit; }
.lead, .lead b, .lead strong, .render-slot, .render-slot b { color: inherit; }
.g,
.prices dt,
.step p,
.steps-cta p,
.render-slot em {
  color: var(--fg-2);
  color: color-mix(in srgb, currentColor 56%, transparent);
}
.render-slot em { display: block; font-style: normal; }
.prices, .svc, .step, .step-slot { transition: background-color var(--tone-dur) var(--ease-io); }
html[data-tone="dark"] .eyebrow { color: var(--blue-hi); }

/* ---------- Шапка ---------- */
.hdr {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  transition: background-color var(--tone-dur) var(--ease-io);
}
.hdr-in { height: 60px; display: flex; align-items: center; justify-content: space-between; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-size: 19px; font-weight: 600; letter-spacing: -0.025em; }
.brand-ic { width: 30px; height: 30px; border-radius: 23%; transition: box-shadow var(--tone-dur) var(--ease-io); }
html[data-tone="dark"] .brand-ic { box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.18); }
.btn-tg-icon { fill: currentColor; }
.btn-sm { height: 36px; padding: 0 16px; font-size: 15px; }
.btn-sm.btn-primary::before { inset: 1px 14% auto; }
.btn-sm.btn-primary { box-shadow: inset 0 1px 0.5px rgba(255, 255, 255, 0.55), inset 0 -1px 1px rgba(0, 20, 80, 0.25), 0 6px 16px -6px rgba(52, 123, 246, 0.7); }

/* ---------- Первый экран ---------- */
.hero { padding: 22px 0 64px; text-align: center; }
.hero-h { font-size: clamp(36px, 10.4vw, 84px); line-height: 1.02; max-width: 11.5em; margin: 0 auto; }
.hero-lead { max-width: 25em; margin: 16px auto 0; }
.lead-split b { display: block; }
.hero-cta { margin-top: 26px; }
.hero-cta .btn { min-width: 264px; }

/* Цены сразу под кнопкой: три цифры в одной плашке */
.prices {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  max-width: 344px;
  margin: 18px auto 0;
  padding: 14px 4px 13px;
  background: var(--card);
}
.prices > div { position: relative; display: flex; flex-direction: column-reverse; align-items: center; gap: 3px; min-width: 0; }
.prices > div + div::before { content: ""; position: absolute; left: 0; top: 6px; bottom: 6px; width: 1px; background: var(--line); }
.prices dd { margin: 0; font-size: 24px; font-weight: 600; letter-spacing: -0.03em; line-height: 1.05; font-variant-numeric: tabular-nums; }
.prices dt { font-size: 13px; line-height: 1.2; color: var(--fg-2); white-space: nowrap; }

/* появление первого экрана при загрузке */
@keyframes ow-rise { from { opacity: 0; transform: translate3d(0, 18px, 0); } }
@keyframes ow-phone { from { opacity: 0; transform: translate3d(0, 64px, 0) scale(0.96); } }
@keyframes ow-drop { from { opacity: 0; transform: translate3d(0, -26px, 0) scale(0.9); } }
.hero-h, .hero-lead, .hero-cta, .prices { animation: ow-rise 1s var(--ease) both; }
.hero-h { animation-delay: 0.04s; }
.hero-lead { animation-delay: 0.12s; }
.hero-cta { animation-delay: 0.2s; }
.prices { animation-delay: 0.28s; }

/* ---------- Сцена с телефоном ---------- */
.stage {
  --pw: 288px;
  --pt: calc(var(--pw) / 432);
  position: relative;
  height: calc(904 * var(--pt));
  margin: 72px auto 0;
  max-width: 1120px;
}
.ph-par { position: absolute; top: 0; left: 50%; width: var(--pw); margin-left: calc(var(--pw) / -2); }

.phone {
  position: relative;
  display: flex;
  flex-direction: column;
  width: var(--pw);
  height: calc(904 * var(--pt));
  padding: calc(4 * var(--pt));
  border-radius: calc(74 * var(--pt));
  background: linear-gradient(140deg, #8a8a90 0%, #3a3a3e 9%, #1d1d20 28%, #2e2e32 52%, #18181a 76%, #4a4a4f 94%, #77777c);
  box-shadow:
    inset 0 0 0 calc(0.8 * var(--pt)) rgba(255, 255, 255, 0.35),
    inset 0 0 calc(2 * var(--pt)) calc(1.4 * var(--pt)) rgba(0, 0, 0, 0.55),
    0 1px 2px rgba(0, 0, 0, 0.12),
    0 18px 36px -18px rgba(12, 18, 32, 0.45);
  animation: ow-phone 1.25s var(--ease) 0.3s both;
}
/* мягкая тень под телефоном: градиент вместо огромного box-shadow */
.ph-shadow {
  position: absolute;
  left: -16%;
  right: -16%;
  top: 30%;
  bottom: -9%;
  background:
    radial-gradient(closest-side, rgba(12, 18, 32, 0.13), rgba(12, 18, 32, 0.05) 55%, transparent),
    radial-gradient(38% 7% at 50% 88%, rgba(12, 18, 32, 0.22), transparent);
  pointer-events: none;
  animation: ow-rise 1.4s var(--ease) 0.45s both;
}
.ph-key { position: absolute; width: calc(4 * var(--pt)); border-radius: calc(2 * var(--pt)); background: linear-gradient(90deg, #6b6b70, #2a2a2d 60%, #49494d); }
.ph-key-a { left: calc(-2.6 * var(--pt)); top: calc(190 * var(--pt)); height: calc(34 * var(--pt)); }
.ph-key-u { left: calc(-2.6 * var(--pt)); top: calc(252 * var(--pt)); height: calc(60 * var(--pt)); }
.ph-key-d { left: calc(-2.6 * var(--pt)); top: calc(326 * var(--pt)); height: calc(60 * var(--pt)); }
.ph-key-p { right: calc(-2.6 * var(--pt)); top: calc(282 * var(--pt)); height: calc(96 * var(--pt)); background: linear-gradient(270deg, #6b6b70, #2a2a2d 60%, #49494d); }

.ph-bezel { position: relative; flex: 1; display: flex; flex-direction: column; padding: calc(11 * var(--pt)); border-radius: calc(70 * var(--pt)); background: #000; }
.ph-island { position: absolute; top: calc(22 * var(--pt)); left: 50%; width: calc(124 * var(--pt)); height: calc(36 * var(--pt)); margin-left: calc(-62 * var(--pt)); border-radius: calc(18 * var(--pt)); background: #000; }
.ph-ui {
  position: relative;
  flex: 1;
  overflow: hidden;
  border-radius: calc(59 * var(--pt));
  background: #f2f2f7;
  color: #000;
  text-align: left;
  font-size: calc(17 * var(--pt));
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.ph-sb { display: flex; align-items: center; justify-content: space-between; height: calc(54 * var(--pt)); padding: calc(4 * var(--pt)) calc(30 * var(--pt)) 0 calc(50 * var(--pt)); }
.ph-time { font-weight: 600; font-size: calc(17 * var(--pt)); letter-spacing: -0.02em; }
.ph-sys { display: flex; align-items: center; gap: calc(6 * var(--pt)); }
.ph-sys svg { fill: currentColor; height: calc(12 * var(--pt)); width: auto; }

.ph-c { padding: 0 calc(16 * var(--pt)); }
.ph-tr { display: flex; align-items: center; justify-content: space-between; margin-top: calc(10 * var(--pt)); }
.ph-title { font-size: calc(34 * var(--pt)); font-weight: 700; letter-spacing: 0.005em; line-height: 1.2; }
.ph-plus { display: grid; place-items: center; width: calc(38 * var(--pt)); height: calc(38 * var(--pt)); border-radius: 50%; background: #fff; box-shadow: 0 calc(2 * var(--pt)) calc(8 * var(--pt)) rgba(0, 0, 0, 0.08); }
.ph-plus svg { width: calc(20 * var(--pt)); fill: none; stroke: #000; stroke-width: 2.2; stroke-linecap: round; }

.ph-card { margin-top: calc(14 * var(--pt)); border-radius: calc(17 * var(--pt)); box-shadow: 0 calc(16 * var(--pt)) calc(28 * var(--pt)) calc(-14 * var(--pt)) rgba(0, 0, 0, 0.55); }
.ph-card img { height: auto; }

.ph-bal { margin-top: calc(22 * var(--pt)); text-align: center; font-size: calc(48 * var(--pt)); font-weight: 600; letter-spacing: -0.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.ph-cur, .ph-dec { font-size: 0.62em; letter-spacing: -0.01em; }
.ph-cur { color: #8e8e93; margin-right: 0.06em; }
.ph-cap { margin-top: calc(6 * var(--pt)); text-align: center; font-size: calc(15 * var(--pt)); color: #8e8e93; }

.ph-sec { display: flex; align-items: baseline; justify-content: space-between; margin: calc(24 * var(--pt)) calc(4 * var(--pt)) calc(10 * var(--pt)); }
.ph-sec span { font-size: calc(20 * var(--pt)); font-weight: 600; letter-spacing: -0.015em; }
.ph-sec em { font-style: normal; color: var(--blue); }

.ph-list { list-style: none; margin: 0; padding: 0 0 0 calc(16 * var(--pt)); background: #fff; border-radius: calc(26 * var(--pt)); }
.ph-row { position: relative; display: flex; align-items: center; gap: calc(12 * var(--pt)); height: calc(62 * var(--pt)); padding-right: calc(16 * var(--pt)); }
.ph-row + .ph-row::before { content: ""; position: absolute; top: 0; left: calc(50 * var(--pt)); right: 0; height: 1px; transform: scaleY(0.5); transform-origin: top; background: rgba(60, 60, 67, 0.22); }
.ph-ic { flex: none; display: grid; place-items: center; width: calc(38 * var(--pt)); height: calc(38 * var(--pt)); }
.ph-ic svg:not(.sq-stroke) { width: 58%; height: 58%; fill: currentColor; }
.ph-ic.is-wide svg:not(.sq-stroke) { width: 80%; }
.ph-nm { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ph-nm b { font-weight: 500; }
.ph-nm small { font-size: calc(13 * var(--pt)); color: #8e8e93; margin-top: calc(1 * var(--pt)); }
.ph-amt { font-variant-numeric: tabular-nums; font-weight: 500; }

/* строки списка въезжают по одной */
html:not(.no-js) .ph-list:not(.go) .ph-row { opacity: 0; transform: translate3d(calc(36 * var(--pt)), 0, 0); }
.ph-row { transition: opacity 0.7s var(--ease), transform 0.9s var(--ease); transition-delay: calc(0.15s + var(--i) * 0.09s); }

.ph-tab {
  position: absolute;
  left: calc(16 * var(--pt));
  right: calc(16 * var(--pt));
  bottom: calc(24 * var(--pt));
  height: calc(62 * var(--pt));
  display: flex;
  padding: calc(4 * var(--pt));
  border-radius: calc(31 * var(--pt));
  background: rgba(255, 255, 255, 0.66);
  -webkit-backdrop-filter: blur(10px) saturate(180%);
  backdrop-filter: blur(10px) saturate(180%);
  box-shadow: 0 calc(8 * var(--pt)) calc(24 * var(--pt)) rgba(0, 0, 0, 0.1), inset 0 0 0 0.5px rgba(0, 0, 0, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}
.ph-tab span { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: calc(2 * var(--pt)); border-radius: calc(27 * var(--pt)); font-size: calc(10 * var(--pt)); font-weight: 600; color: #1c1c1e; letter-spacing: 0; }
.ph-tab span.on { background: rgba(0, 0, 0, 0.06); color: var(--blue); }
.ph-tab svg { width: calc(24 * var(--pt)); height: calc(24 * var(--pt)); fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ph-home { position: absolute; bottom: calc(8 * var(--pt)); left: 50%; width: calc(140 * var(--pt)); height: calc(5 * var(--pt)); margin-left: calc(-70 * var(--pt)); border-radius: 99px; background: #000; }

/* место под уведомление над телефоном */
.stage { margin-top: 100px; }

/* ---------- Плавающие стеклянные карточки ---------- */
.fl { position: absolute; z-index: 2; text-align: left; color: var(--l-fg); }
.fl-sh { position: absolute; inset: 0; border-radius: 24px; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06), 0 24px 48px -18px rgba(12, 18, 32, 0.34); }
.fl-card {
  position: relative;
  background: rgba(252, 252, 254, 0.93);
  -webkit-backdrop-filter: blur(24px) saturate(190%);
  backdrop-filter: blur(24px) saturate(190%);
}
.fl-sh, .fl-card { transition: opacity 0.8s var(--ease), transform 1s var(--ease); transition-delay: var(--fd, 0s); }

/* уведомление из бота: выпадает из-под верхней кромки телефона */
.fl-notif { top: -70px; left: 50%; width: calc(var(--pw) + 24px); margin-left: calc((var(--pw) + 24px) / -2); }
.fl-notif .fl-sh, .fl-notif .fl-card { animation: ow-drop 0.95s var(--ease) 1.1s both; }
.fl-notif.is-out .fl-sh, .fl-notif.is-out .fl-card { opacity: 0; transform: translate3d(0, -14px, 0) scale(0.96); transition-duration: 0.5s, 0.6s; }
.nt { display: flex; align-items: center; gap: 12px; padding: 12px 14px; }
.nt-av { position: relative; flex: none; width: 40px; height: 40px; }
.nt-av img { width: 40px; height: 40px; }
.nt-tg { position: absolute; right: -3px; bottom: -3px; width: 17px; height: 17px; border-radius: 50%; background: #fff; display: grid; place-items: center; }
.nt-tg svg { width: 15px; height: 15px; fill: #2aabee; }
.nt-tx { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.28; }
.nt-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-size: 15px; }
.nt-top b { font-weight: 600; }
.nt-top time { font-size: 13px; color: rgba(60, 60, 67, 0.6); }
.nt-body { font-size: 15px; white-space: nowrap; }
.nt-body b { font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: 0.01em; }
.nt-sub { font-size: 13px; color: rgba(60, 60, 67, 0.6); }

/* пополнение криптой (только на широком экране) */
.fl-top { display: none; }
.tu { display: flex; align-items: center; gap: 12px; padding: 14px 18px 14px 14px; }
.tu-coin { width: 42px; height: 42px; flex: none; }
.tu-tx { display: flex; flex-direction: column; line-height: 1.28; }
.tu-tx small { font-size: 13px; color: rgba(60, 60, 67, 0.6); }
.tu-tx b { font-size: 19px; font-weight: 600; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.tu-tx em { font-style: normal; font-size: 13px; font-weight: 500; color: #1f9d55; }

/* Apple Pay и Google Pay */
.fl-pay { top: 88.5%; right: max(0px, calc(50% - var(--pw) / 2 - 22px)); width: 216px; }
.pay { display: flex; flex-direction: column; padding: 14px 16px 15px; line-height: 1.28; }
.pay-mk { display: flex; gap: 6px; margin-bottom: 10px; }
.mk { display: inline-flex; align-items: center; height: 28px; padding: 0 10px; border-radius: 8px; font-size: 15px; font-weight: 600; letter-spacing: -0.02em; }
.mk-a { background: #000; color: #fff; gap: 2px; }
.mk-a svg { width: 14px; height: 14px; fill: #fff; margin-top: -2px; }
.mk-g { background: #fff; color: #3c4043; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.14); }
.mk-g b { font-weight: 700; color: #4285f4; }
.pay-t { font-size: 15px; font-weight: 600; }
.pay-s { font-size: 13px; color: rgba(60, 60, 67, 0.6); }

/* появление карточек по прокрутке */
html:not(.no-js) .fl-pay:not(.go) > * { opacity: 0; transform: translate3d(24px, 16px, 0) scale(0.96); }
html:not(.no-js) .fl-top:not(.go) > * { opacity: 0; transform: translate3d(-24px, 16px, 0) scale(0.96); }
.fl-pay { --fd: 0.35s; }
.fl-top { --fd: 0.6s; }

/* ---------- Где работает карта ---------- */
.svc-sec { padding: 120px 0 104px; text-align: center; }
.svc-lead { max-width: 26em; margin: 16px auto 0; }

.mq { margin-top: 40px; display: grid; gap: 10px; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.mq-track { display: flex; width: max-content; }
.mq-l .mq-track { animation: ow-mq-l 72s linear infinite; }
.mq-r .mq-track { animation: ow-mq-r 80s linear infinite; }
@keyframes ow-mq-l { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(-50%, 0, 0); } }
@keyframes ow-mq-r { from { transform: translate3d(-50%, 0, 0); } to { transform: translate3d(0, 0, 0); } }
@media (hover: hover) { .mq:hover .mq-track { animation-play-state: paused; } }
.mq-set { list-style: none; display: flex; gap: 10px; margin: 0; padding: 0 10px 0 0; }
.svc {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 64px;
  padding: 0 22px 0 12px;
  background: var(--card);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.015em;
  white-space: nowrap;
}
.svc-ic { width: 40px; height: 40px; flex: none; display: grid; place-items: center; }
.svc-ic svg:not(.sq-stroke) { width: 24px; height: 24px; fill: currentColor; }
.svc-ic.is-wide svg:not(.sq-stroke) { width: 32px; }
.svc-ic.is-full svg:not(.sq-stroke) { width: inherit; height: inherit; }
/* сервисы без логотипа: нейтральная плитка с первой буквой */
.svc-mono { background: linear-gradient(160deg, #3a3a40, #1b1b1f); color: #fff; font-size: 19px; font-weight: 600; letter-spacing: -0.02em; line-height: 1; }

/* объемная карта: мягкий верхний свет, как у предметной съемки */
.c3-wrap { --cw: min(112vw, 470px); position: relative; left: 50%; width: var(--cw); margin: calc(var(--cw) * -0.06) 0 calc(var(--cw) * -0.13) calc(var(--cw) / -2); }
.c3-wrap::before {
  content: "";
  position: absolute;
  inset: 4% 6% 0;
  background: radial-gradient(50% 46% at 50% 48%, rgba(170, 190, 255, 0.13), rgba(170, 190, 255, 0.04) 55%, transparent 75%);
  pointer-events: none;
  opacity: 0;
  transition: opacity 1.2s var(--ease-io);
}
html[data-tone="dark"] .c3-wrap::before { opacity: 1; }
.c3 { position: relative; height: auto; will-change: transform; }
.c3-cap { position: relative; max-width: 22em; margin: 0 auto; }

/* ---------- Три шага ---------- */
.steps-sec { padding: 120px 0 112px; text-align: center; }
.eb-orange, html[data-tone="dark"] .eb-orange { color: #f2682a; }
.steps-lead { max-width: 26em; margin: 16px auto 0; }
.steps { list-style: none; display: grid; gap: 12px; margin: 40px 0 0; padding: 0; text-align: left; }
.step { display: flex; flex-direction: column; padding: 26px 8px 8px; background: var(--card); }
.step-b { padding: 0 16px 22px; }
.step-n { display: block; font-size: 15px; font-weight: 600; color: var(--blue); margin-bottom: 6px; }
.step h3 { margin: 0; font-size: 24px; font-weight: 600; letter-spacing: -0.025em; line-height: 1.15; }
.step p { margin: 8px 0 0; font-size: 16px; line-height: 1.42; color: var(--fg-2); text-wrap: pretty; }
.step-slot { margin-top: auto; aspect-ratio: 16 / 10; background-color: var(--bg); transition: background-color var(--tone-dur) var(--ease-io); }
.step-slot span { max-width: 20em; }
.steps-cta { margin-top: 40px; }
.steps-cta .btn { min-width: 264px; }
.steps-cta p { margin: 14px auto 0; max-width: 22em; font-size: 15px; text-wrap: balance; }

/* ---------- Ширина 380+ ---------- */
@media (min-width: 380px) {
  .stage { --pw: 300px; }
}

/* ---------- Планшет и компьютер ---------- */
@media (min-width: 768px) {
  .hero { padding: 28px 0 96px; }
  .hero-lead { margin-top: 22px; }
  .hero-cta { margin-top: 34px; }
  .prices { max-width: 480px; margin-top: 22px; padding: 18px 8px 16px; }
  .prices dd { font-size: 30px; }
  .prices dt { font-size: 14px; }
  .stage { --pw: 340px; margin-top: 60px; }
  .fl-notif { top: 8%; left: calc(50% - 512px); width: 348px; margin-left: 0; }
  .fl-top { display: block; top: 47%; left: calc(50% - 436px); width: 256px; }
  .fl-pay { top: 24%; right: auto; left: calc(50% + 150px); width: 244px; }
  .nt { padding: 14px 16px; gap: 13px; }
  .svc-sec { padding: 168px 0 128px; }
  .svc-lead, .steps-lead { max-width: 34em; }
  .c3-cap { max-width: 32em; }
  .steps-cta p { max-width: none; }
  .mq { margin-top: 64px; gap: 12px; }
  .mq-set { gap: 12px; padding-right: 12px; }
  .svc { height: 72px; font-size: 19px; padding: 0 26px 0 14px; gap: 14px; }
  .svc-ic { width: 44px; height: 44px; }
  .c3-wrap { --cw: 680px; }
  .steps-sec { padding: 152px 0 168px; }
  .steps { margin-top: 64px; }
  .steps-cta { margin-top: 56px; }
}
@media (min-width: 768px) and (max-width: 1023px) {
  .fl-notif { left: calc(50% - 380px); width: 304px; }
  .fl-top { left: calc(50% - 356px); }
  .fl-pay { left: calc(50% + 120px); }
}
@media (min-width: 1000px) {
  .steps { grid-template-columns: repeat(3, 1fr); gap: 20px; }
  .step-slot { aspect-ratio: 4 / 3; }
}
@media (min-width: 1200px) {
  .stage { --pw: 360px; }
}

/* ---------- Без анимаций ---------- */
@media (prefers-reduced-motion: reduce) {
  .mq-track { animation: none !important; }
  .mq-row { overflow-x: auto; scrollbar-width: none; }
  .c3 { will-change: auto; }
}

/* Без JS тон страницы не переключается: черный блок красим сам */
html.no-js section[data-tone="dark"] { background: var(--d-bg); color: var(--d-fg); --fg: var(--d-fg); --fg-2: var(--d-fg-2); --card: var(--d-card); --line: var(--d-line); --bg: var(--d-bg); }
