/* PayFlow — тема v2: собственные шрифты, стеклянные поверхности, тёмная форма.
   Подключается после styles.css (и auth.css / cabinet.css) и переопределяет внешний вид. */

/* ---------- шрифты (локально, OFL) ---------- */
@font-face {
  font-family: "Inter Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("/fonts/inter-cyrillic-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: "Inter Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("/fonts/inter-latin-wght-normal.woff2") format("woff2-variations");
  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;
}

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

@font-face {
  font-family: "Manrope Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url("/fonts/manrope-latin-wght-normal.woff2") format("woff2-variations");
  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 {
  --bg: #05080c;
  --bg-soft: #080c12;
  --bg-elev: #0c121a;
  --ink-1: #0e151e;
  --ink-2: #131c27;
  --surface: rgba(255, 255, 255, 0.03);
  --surface-2: rgba(255, 255, 255, 0.055);
  --surface-3: rgba(255, 255, 255, 0.085);
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);
  --text: #eef3f8;
  --muted: #9aa7b8;
  --dim: #677486;
  --lime: #c9f45a;
  --lime-strong: #b6ec32;
  --lime-soft: rgba(201, 244, 90, 0.1);
  --teal: #5eead4;
  --grad: linear-gradient(120deg, #5eead4 0%, #89edb8 45%, #c9f45a 100%);
  --radius: 20px;
  --radius-lg: 28px;
  --font: "Inter Variable", "Inter", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Manrope Variable", "Inter Variable", "Segoe UI", system-ui, sans-serif;
  --shadow-lg: 0 40px 100px -20px rgba(0, 0, 0, 0.6);
  --header-h: 76px;
}

/* письменности, для которых Manrope/Inter не годятся: заголовки берут стек языка из styles.css */
html[lang="zh-CN"],
html[lang="hi"],
html[lang="ar"],
html[lang="ur"] {
  --font-display: var(--font);
}

html[lang="zh-CN"] {
  --font: "Inter Variable", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", "Noto Sans CJK SC", "WenQuanYi Zen Hei", system-ui, sans-serif;
}

html[lang="hi"] {
  --font: "Inter Variable", "Noto Sans Devanagari", "Nirmala UI", "Mangal", "Kohinoor Devanagari", system-ui, sans-serif;
}

html[lang="ar"] {
  --font: "Inter Variable", "Noto Sans Arabic", "Segoe UI", "Geeza Pro", "Tahoma", system-ui, sans-serif;
}

html[lang="ur"] {
  --font: "Inter Variable", "Noto Naskh Arabic", "Noto Sans Arabic", "Segoe UI", "Geeza Pro", "Tahoma", system-ui, sans-serif;
}

body {
  background:
    radial-gradient(1200px 700px at 85% -10%, rgba(201, 244, 90, 0.07), transparent 60%),
    radial-gradient(900px 600px at -10% 20%, rgba(94, 234, 212, 0.06), transparent 60%),
    var(--bg);
  font-feature-settings: "cv11", "ss01";
}

/* лёгкое зерно поверх фона */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

h1,
h2,
h3,
.brand-name,
.form-title,
.stat strong,
.geo-highlights strong {
  font-family: var(--font-display);
}

::selection {
  background: rgba(201, 244, 90, 0.3);
  color: #fff;
}

/* ---------- шапка ---------- */
.site-header {
  top: 12px;
  inset-inline: 0;
  height: var(--header-h);
  border-bottom: 0;
  background: transparent;
}

.site-header .header-inner {
  height: 60px;
  padding-inline: 10px 10px;
  padding-inline-start: 16px;
  border: 1px solid transparent;
  border-radius: 999px;
  transition: background 0.25s, border-color 0.25s, box-shadow 0.25s;
}

.site-header.is-scrolled {
  background: transparent;
  backdrop-filter: none;
  border-bottom-color: transparent;
}

.site-header.is-scrolled .header-inner {
  background: rgba(10, 15, 22, 0.78);
  border-color: var(--border);
  box-shadow: 0 18px 50px -20px rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(18px) saturate(140%);
}

.nav a {
  position: relative;
  padding: 6px 2px;
}

.nav a::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  height: 1px;
  background: var(--lime);
  transform: scaleX(0);
  transition: transform 0.2s;
}

.nav a:hover::after {
  transform: scaleX(1);
}

.btn {
  font-weight: 650;
  letter-spacing: -0.005em;
}

.btn-primary {
  background: var(--lime);
  box-shadow: 0 0 0 1px rgba(201, 244, 90, 0.5) inset, 0 12px 34px -8px rgba(201, 244, 90, 0.45);
}

.btn-primary:hover {
  background: #d8ff74;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.5) inset, 0 16px 40px -8px rgba(201, 244, 90, 0.6);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(8px);
}

/* ---------- hero ---------- */
.hero {
  padding-top: calc(var(--header-h) + 84px);
}

.hero::before {
  background: radial-gradient(circle, rgba(201, 244, 90, 0.16), transparent 62%);
}

.hero-grid-bg {
  background-size: 64px 64px;
  opacity: 0.45;
}

.hero-inner {
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 0.6fr);
  gap: 24px;
  padding-bottom: 40px;
}

.hero h1 {
  font-size: clamp(40px, 5.2vw, 76px);
  line-height: 0.98;
  font-weight: 700;
  letter-spacing: -0.045em;
  text-wrap: balance;
}

.hero h1 .accent {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-lead {
  max-width: 560px;
  font-size: 18px;
  color: var(--muted);
}

.eyebrow {
  background: rgba(255, 255, 255, 0.035);
  border-color: var(--border-strong);
  backdrop-filter: blur(8px);
}

.hero-visual {
  position: relative;
}

.hero-visual::before {
  content: "";
  position: absolute;
  inset: 8% 8%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(94, 234, 212, 0.18), transparent 65%);
  filter: blur(30px);
  pointer-events: none;
}

.globe-wrap {
  max-width: 520px;
}

.globe-wrap::after {
  content: "";
  position: absolute;
  inset: -4%;
  border-radius: 50%;
  border: 1px dashed rgba(201, 244, 90, 0.16);
  animation: orbit 60s linear infinite;
  pointer-events: none;
}

@keyframes orbit {
  to { rotate: 360deg; }
}

/* статистика — стеклянные плитки под hero */
.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  padding-bottom: 56px;
}

.hero-stats .stat,
.hero-stats .stat:first-child,
.hero-stats .stat:nth-child(odd) {
  padding: 22px 24px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.015));
  backdrop-filter: blur(10px);
}

.hero-stats .stat strong {
  font-size: clamp(28px, 2.8vw, 40px);
  font-weight: 700;
  background: linear-gradient(180deg, #fff, #b7c3d1);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-stats .stat:first-child strong {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
}

.hero-stats .stat span {
  color: var(--muted);
}

.ticker {
  border-block: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.015);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

/* ---------- секции и нумерация ---------- */
main {
  counter-reset: section;
}

.section {
  padding: 104px 0;
  border-top: 0;
  background: transparent;
}

.section--catalog,
.section--benefits,
.section--apply {
  background: linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.018) 30%, rgba(255, 255, 255, 0.018) 70%, transparent);
}

.section-head .kicker,
.geo-copy .kicker,
.apply-copy .kicker {
  counter-increment: section;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--lime);
}

.section-head .kicker::before,
.geo-copy .kicker::before,
.apply-copy .kicker::before {
  content: counter(section, decimal-leading-zero);
  display: inline-grid;
  place-items: center;
  min-width: 30px;
  height: 22px;
  padding: 0 6px;
  border: 1px solid rgba(201, 244, 90, 0.35);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0;
  color: var(--lime);
}

.section-head h2,
.geo-copy h2,
.apply-copy h2 {
  font-size: clamp(32px, 4vw, 56px);
  line-height: 1.02;
  font-weight: 700;
  letter-spacing: -0.04em;
  text-wrap: balance;
}

.section-head p {
  font-size: 17px;
}

.section--benefits .section-head,
.section-head {
  max-width: 860px;
}

/* ---------- шаги: таймлайн ---------- */
.steps {
  position: relative;
  gap: 16px;
}

.steps::before {
  content: "";
  position: absolute;
  top: 44px;
  inset-inline: 40px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(201, 244, 90, 0.5), rgba(94, 234, 212, 0.5), transparent);
}

.step-card {
  position: relative;
  padding: 26px 24px 28px;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: linear-gradient(180deg, var(--ink-1), rgba(14, 21, 30, 0.5));
}

.step-num {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  margin-bottom: 26px;
  border-radius: 12px;
  border: 1px solid rgba(201, 244, 90, 0.4);
  background: #0b1209;
  color: var(--lime);
  font-size: 13px;
  box-shadow: 0 0 0 6px var(--bg), 0 0 24px rgba(201, 244, 90, 0.25);
}

.step-card h3 {
  font-size: 20px;
  font-weight: 700;
}

.step-card:hover {
  border-color: rgba(201, 244, 90, 0.3);
  transform: translateY(-3px);
}

.step-card {
  transition: transform 0.25s, border-color 0.25s;
}

/* ---------- каталог ---------- */
.catalog-count {
  border-color: var(--border-strong);
  background: var(--surface);
}

.catalog-controls {
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.02);
}

.select-field select {
  border-radius: 12px;
  background-color: var(--ink-1);
}

.chip {
  border-radius: 12px;
}

.chip.is-active {
  box-shadow: 0 8px 24px -10px rgba(201, 244, 90, 0.6);
}

.method-card {
  border-radius: 20px;
  border-color: var(--border);
  background: linear-gradient(180deg, var(--ink-1), var(--bg-elev));
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.method-card:hover {
  transform: translateY(-3px);
  border-color: rgba(201, 244, 90, 0.28);
  box-shadow: 0 24px 50px -24px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(201, 244, 90, 0.08);
}

.mc-logo {
  background: var(--lime-soft);
  border: 1px solid rgba(201, 244, 90, 0.25);
  color: var(--lime);
  font-family: var(--mono);
}

.mc-name strong {
  font-family: var(--font-display);
  font-weight: 700;
}

.method-rate {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 800;
  color: var(--lime);
}

.mini-badge {
  border-radius: 7px;
}

.method-meta {
  flex-wrap: wrap;
  row-gap: 4px;
}

.method-meta > span:not(.dot) {
  white-space: nowrap;
}

/* ---------- гео ---------- */
.geo-cloud {
  border-radius: 26px;
  background:
    radial-gradient(500px 260px at 100% 0%, rgba(94, 234, 212, 0.08), transparent 70%),
    linear-gradient(180deg, var(--ink-1), var(--bg-elev));
}

.geo-chip {
  border-radius: 12px;
  transition: transform 0.15s, border-color 0.15s, background 0.15s;
}

.geo-chip:hover {
  transform: translateY(-2px);
}

.geo-highlights strong {
  font-size: 44px;
  font-weight: 700;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- преимущества: bento ---------- */
.benefit-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 16px;
}

.benefit {
  grid-column: span 2;
  padding: 30px;
  border-radius: 24px;
  border-color: var(--border);
  background: linear-gradient(180deg, var(--ink-1), var(--bg-elev));
}

.benefit:nth-child(1) {
  grid-column: span 4;
  background:
    radial-gradient(600px 300px at 0% 0%, rgba(201, 244, 90, 0.12), transparent 70%),
    linear-gradient(180deg, var(--ink-2), var(--bg-elev));
}

.benefit:nth-child(4) {
  grid-column: span 4;
  background:
    radial-gradient(600px 300px at 100% 100%, rgba(94, 234, 212, 0.12), transparent 70%),
    linear-gradient(180deg, var(--ink-2), var(--bg-elev));
}

.benefit:nth-child(1) h3,
.benefit:nth-child(4) h3 {
  font-size: 26px;
}

.benefit:nth-child(1) p,
.benefit:nth-child(4) p {
  max-width: 520px;
  font-size: 16px;
}

.benefit h3 {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.benefit-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--lime-soft);
  border: 1px solid rgba(201, 244, 90, 0.25);
}

/* ---------- FAQ ---------- */
.faq-item {
  border-radius: 18px;
  border: 1px solid transparent;
  padding-inline: 18px;
  transition: background 0.2s, border-color 0.2s;
}

.faq-item[open] {
  background: var(--surface);
  border-color: var(--border);
}

.faq-item summary {
  font-family: var(--font-display);
  font-weight: 650;
  font-size: 17px;
}

/* ---------- заявка: тёмная форма ---------- */
.apply-copy h2 {
  margin-top: 14px;
}

.apply-note {
  border-radius: 18px;
}

.form-card {
  padding: 32px;
  border-radius: 28px;
  color: var(--text);
  background:
    linear-gradient(var(--ink-1), var(--ink-1)) padding-box,
    linear-gradient(140deg, rgba(201, 244, 90, 0.55), rgba(94, 234, 212, 0.25) 35%, rgba(255, 255, 255, 0.06) 70%) border-box;
  border: 1px solid transparent;
  box-shadow: var(--shadow-lg), 0 0 120px -40px rgba(201, 244, 90, 0.25);
}

.fp-step { color: var(--dim); }
.fp-step span { background: transparent; border-color: var(--border-strong); color: var(--muted); }
.fp-step.is-active { color: var(--text); }
.fp-step.is-active span { background: var(--lime); border-color: var(--lime); color: #0b1207; }
.fp-step.is-done span { background: rgba(201, 244, 90, 0.16); border-color: rgba(201, 244, 90, 0.4); color: var(--lime); }
.fp-line { background: var(--border-strong); }

.form-title { color: var(--text); font-weight: 700; }
.field-label { color: #c4cfdc; }
.field-label b { color: #ff8f80; }
.field-hint { color: var(--dim); }

.field input,
.field textarea,
.field select {
  border-color: var(--border-strong);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
}

.field input::placeholder,
.field textarea::placeholder { color: #5f6c7d; }

.field input:focus,
.field textarea:focus,
.field select:focus {
  border-color: rgba(201, 244, 90, 0.7);
  box-shadow: 0 0 0 4px rgba(201, 244, 90, 0.12);
  background: rgba(255, 255, 255, 0.05);
}

.field.has-error input,
.field.has-error textarea {
  border-color: #ff7a6b;
  background: rgba(255, 122, 107, 0.06);
}

.field-error { color: #ff8f80; }

.option span {
  border-color: var(--border-strong);
  background: rgba(255, 255, 255, 0.025);
  color: #cdd6e1;
}

.option:hover span { border-color: rgba(255, 255, 255, 0.3); }

.option input:checked + span {
  background: var(--lime-soft);
  border-color: var(--lime);
  color: var(--lime);
  box-shadow: 0 0 0 1px var(--lime) inset;
}

.option input:focus-visible + span { outline-color: var(--lime); }

.check-card {
  border-color: var(--border-strong);
  background: rgba(255, 255, 255, 0.025);
}

.check-card:has(input:checked) {
  border-color: rgba(201, 244, 90, 0.6);
  background: var(--lime-soft);
}

.check-box { border-color: rgba(255, 255, 255, 0.3); background: transparent; }
.check-card strong { color: var(--text); }
.check-card em { color: var(--dim); }

.currency-chip span {
  border-color: var(--border-strong);
  background: rgba(255, 255, 255, 0.025);
  color: #cdd6e1;
}

.currency-chip input:checked + span {
  background: var(--lime-soft);
  border-color: var(--lime);
  color: var(--lime);
}

.summary-chip { background: rgba(255, 255, 255, 0.05); color: var(--muted); }
.summary-chip b { color: var(--text); }
.consent { color: var(--muted); }
.consent input { accent-color: var(--lime); }

.form-actions .btn-ghost { border-color: var(--border-strong); color: var(--text); }
.form-actions .btn-ghost:hover { background: var(--surface-2); border-color: rgba(255, 255, 255, 0.3); }
.form-actions .btn-primary { background: var(--lime); color: #0b1207; box-shadow: 0 12px 30px -10px rgba(201, 244, 90, 0.6); }
.form-actions .btn-primary:hover { background: #d8ff74; }
.form-legal { color: var(--dim); }

.success-icon { color: var(--lime); }
.form-success p { color: var(--muted); }
.form-success .success-hint { color: var(--dim); }
.form-success .btn { background: var(--lime); color: #0b1207; }

/* ---------- футер ---------- */
.site-footer {
  background: transparent;
  border-top: 1px solid var(--border);
  overflow: hidden;
}

.footer-wordmark {
  margin-top: 40px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(64px, 17vw, 250px);
  line-height: 0.8;
  letter-spacing: -0.06em;
  text-align: center;
  white-space: nowrap;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  user-select: none;
  direction: ltr;
}

.footer-bottom {
  border-top: 0;
}

/* ---------- toast и переключатель ---------- */
.toast {
  border-radius: 14px;
  backdrop-filter: blur(14px);
}

.lang-menu {
  border-radius: 16px;
  background: rgba(10, 15, 22, 0.96);
}

/* ---------- вход ---------- */
.auth-side {
  background:
    radial-gradient(ellipse 70% 55% at 15% 15%, rgba(201, 244, 90, 0.14), transparent 62%),
    radial-gradient(ellipse 60% 50% at 90% 85%, rgba(94, 234, 212, 0.1), transparent 60%),
    var(--bg-soft);
}

.auth-side-content h1 {
  font-weight: 700;
}

.auth-card {
  border-radius: 28px;
}

/* ---------- кабинет ---------- */
.cab-header {
  background: rgba(8, 12, 18, 0.8);
  backdrop-filter: blur(16px);
}

.cab-hero h1 {
  font-weight: 700;
  letter-spacing: -0.04em;
}

.card,
.pm-card {
  border-radius: 22px;
  background: linear-gradient(180deg, var(--ink-1), var(--bg-elev));
}

.progress-track span {
  background: var(--grad);
}

/* ---------- адаптив ---------- */
@media (max-width: 1080px) {
  .hero-inner {
    grid-template-columns: 1fr;
  }

  .hero-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .steps::before {
    display: none;
  }

  .benefit-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .benefit,
  .benefit:nth-child(1),
  .benefit:nth-child(4) {
    grid-column: span 1;
  }
}

@media (max-width: 760px) {
  .site-header {
    top: 8px;
  }

  .site-header .header-inner {
    height: 54px;
    padding-inline-start: 12px;
  }

  .hero {
    padding-top: calc(var(--header-h) + 36px);
  }

  .hero-lead {
    font-size: 16px;
  }

  .hero-stats {
    gap: 8px;
    padding-bottom: 36px;
  }

  .hero-stats .stat,
  .hero-stats .stat:first-child,
  .hero-stats .stat:nth-child(odd) {
    padding: 16px;
    border-radius: 16px;
  }

  .stats-grid .stat:nth-child(3),
  .stats-grid .stat:nth-child(4) {
    border-top: 1px solid var(--border);
  }

  .section {
    padding: 80px 0;
  }

  .benefit-grid {
    grid-template-columns: 1fr;
  }

  .benefit {
    padding: 24px;
  }

  .benefit:nth-child(1) h3,
  .benefit:nth-child(4) h3 {
    font-size: 21px;
  }

  .form-card {
    padding: 22px 18px;
  }

  .faq-item {
    padding-inline: 12px;
  }
}

@media (max-width: 760px) {
  .step-card {
    padding: 20px;
  }

  .step-num {
    margin-bottom: 14px;
  }
}
