/* ============================================================
   Qapitala — Landing Page
   Vanilla CSS, tokens taken from the Figma mockup
   ============================================================ */

:root {
  /* Brand */
  --teal-deep: #155554;      /* hero / dark sections */
  --teal-header: #175755;    /* header bar */
  --teal-accent: #15baaa;    /* primary buttons */
  --teal-accent-dark: #109c8e;
  --cyan: #00efd8;           /* logo mark */
  --green-grad-1: #1c9e87;   /* security panel gradient */
  --green-grad-2: #166b6e;
  --icon-grad-1: #cdf2b1;    /* icon gradient lime → aqua */
  --icon-grad-2: #7adcd2;

  /* Surfaces */
  --bg: #ffffff;
  --bg-alt: #f7f7f7;
  --bg-footer: #f7f7f8;
  --border: #dee0e3;
  --border-soft: rgba(222, 224, 227, 0.5);

  /* Text */
  --text: #14151a;
  --text-heading: #343434;
  --text-secondary: rgba(15, 19, 36, 0.6);
  --text-tertiary: rgba(13, 17, 38, 0.4);
  --text-on-dark-secondary: rgba(255, 255, 255, 0.6);
  --text-on-dark-faint: rgba(255, 255, 255, 0.46);

  /* Semantic */
  --success: #26bd6c;
  --success-bg: rgba(209, 250, 228, 0.6);
  --success-text: #166b6e;

  /* Shape & shadow */
  --r-card: 24px;
  --r-btn: 12px;
  --shadow-card: 0 1px 2px rgba(20, 21, 26, 0.05);
  --shadow-pop: 0 1px 2px rgba(20, 21, 26, 0.06), 0 1px 3px rgba(20, 21, 26, 0.1);

  --container: 1400px;
  --gutter: clamp(16px, 4vw, 60px);

  --font: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
}

/* ---------- Reset ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }

h1, h2, h3, p { margin: 0; }

a { color: inherit; text-decoration: none; }

button { font-family: inherit; cursor: pointer; }

:focus-visible {
  outline: 2px solid var(--teal-accent);
  outline-offset: 2px;
  border-radius: 4px;
}

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 48px;
  padding: 12px 16px;
  border-radius: var(--r-btn);
  border: 1px solid transparent;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: -0.2px;
  box-shadow: var(--shadow-card);
  transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
  touch-action: manipulation;
}

.btn:active { transform: scale(0.97); }

.btn--primary {
  background: var(--teal-accent);
  color: #fff;
}
.btn--primary:hover { background: var(--teal-accent-dark); }

.btn--secondary {
  background: #fff;
  color: var(--text);
  border-color: var(--border);
}
.btn--secondary:hover { background: #f2f4f5; }

.btn--wide { padding-inline: 40px; }

/* ============================================================
   Badges & captions
   ============================================================ */
.topic-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--border);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.35;
  color: var(--text-secondary);
  width: fit-content;
}

.topic-badge--dark {
  background: rgba(22, 69, 71, 0.32);
  border-color: transparent;
  color: #fff;
}

.caption-chip {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 9px;
  background: #e9eaec;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  color: var(--text);
  white-space: nowrap;
}

/* Gradient icon tile */
.icon-tile {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  background: linear-gradient(160deg, var(--icon-grad-1), var(--icon-grad-2));
  box-shadow: var(--shadow-pop);
  color: #fff;
}
.icon-tile svg { width: 55%; height: 55%; }
.icon-tile--sm { width: 40px; height: 40px; border-radius: 9px; }
.icon-tile--md { width: 48px; height: 48px; border-radius: 50%; }
.icon-tile--lg { width: 56px; height: 56px; border-radius: 12px; }
.icon-tile--xl { width: 80px; height: 80px; border-radius: 50%; }

/* White icon tile with gradient glyph */
.icon-tile--white {
  background: linear-gradient(180deg, #ffffff 25%, #f7f7f8 100%);
  color: #4cc4ae;
  width: 60px; height: 60px; border-radius: 16px;
}

/* ============================================================
   Section scaffolding
   ============================================================ */
.section { position: relative; }

.section--alt { background: var(--bg-alt); }

.section__inner {
  max-width: var(--container);
  margin-inline: auto;
  padding: clamp(40px, 5vw, 60px) var(--gutter);
}

/* Split layout: text one side, media other side */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(24px, 4vw, 60px);
  align-items: center;
}

.section-head {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.section-head--center {
  align-items: center;
  text-align: center;
  max-width: 900px;
  margin-inline: auto;
}

.section-title {
  font-size: clamp(24px, 3.4vw, 56px);
  line-height: 1.12;
  font-weight: 500;
  color: var(--text-heading);
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.section-sub {
  font-size: clamp(15px, 1.3vw, 20px);
  font-weight: 300;
  line-height: 1.4;
  color: var(--text-secondary);
  max-width: 640px;
}

.section-microcopy {
  font-size: 14px;
  color: var(--text-tertiary);
}

/* Generic white card */
.card {
  background: #fff;
  border: 1px solid var(--border-soft);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

@media (hover: hover) {
  .card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(20, 60, 56, 0.1);
  }
}

/* Soft green glow on light sections (mockup blops) */
.section--glow { overflow: hidden; }

.section--glow::before {
  content: "";
  position: absolute;
  width: 980px;
  height: 640px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(102, 231, 208, 0.16), rgba(233, 254, 171, 0.07) 62%, transparent);
  pointer-events: none;
}

.section--glow-left::before { left: -280px; bottom: -180px; }
.section--glow-right::before { right: -280px; top: -140px; }
.section--glow-center::before { left: 50%; top: 30%; translate: -50% 0; }

/* Decorative gradient blob */
.blop {
  position: absolute;
  pointer-events: none;
  background: linear-gradient(120deg, #e9feab, #00efd8);
  opacity: 0.4;
  filter: blur(100px);
  border-radius: 50%;
  z-index: 0;
}

/* ============================================================
   Header
   ============================================================ */
.header {
  background: var(--teal-header);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header__inner {
  max-width: var(--container);
  margin-inline: auto;
  padding: 14px var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 72px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  flex: none;
}

.logo__img { display: block; height: 40px; width: auto; }

.footer .logo__img { height: 47px; }

.nav {
  display: flex;
  align-items: center;
  gap: clamp(4px, 1.5vw, 24px);
}

.nav__link {
  display: inline-block;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: clamp(15px, 1.1vw, 18px);
  font-weight: 500;
  color: rgba(255, 255, 255, 0.74);
  transition: color 0.2s ease, background-color 0.2s ease;
}

.nav__link:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

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

.burger {
  display: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
}

/* Mobile menu */
.mobile-menu {
  display: none;
  background: var(--teal-header);
  padding: 8px 16px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.mobile-menu.is-open { display: block; }

.mobile-menu__link {
  display: block;
  padding: 12px 8px;
  font-size: 17px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.85);
  border-radius: 8px;
}
.mobile-menu__link:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }

.mobile-menu__actions {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

/* ============================================================
   Hero
   ============================================================ */
.hero {
  background: var(--teal-deep);
  color: #fff;
  position: relative;
  overflow: hidden;
}

.hero__inner {
  max-width: var(--container);
  margin-inline: auto;
  padding: clamp(48px, 7vw, 116px) var(--gutter) clamp(56px, 7vw, 120px);
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 60px);
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero__blop-1 { width: 680px; height: 340px; left: 20%; bottom: -10%; opacity: 0.57; filter: blur(160px); }
.hero__blop-2 { width: 880px; height: 560px; right: -10%; bottom: -30%; opacity: 0.57; filter: blur(160px); }

.hero__info {
  display: flex;
  flex-direction: column;
  gap: 32px;
  min-width: 0;
}

.hero__title {
  font-size: clamp(30px, 4vw, 64px);
  line-height: 1.06;
  font-weight: 500;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

.hero__sub {
  font-size: clamp(15px, 1.3vw, 20px);
  font-weight: 400;
  line-height: 1.45;
  color: var(--text-on-dark-secondary);
  max-width: 640px;
}

.hero__actions {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: flex-start;
}

.hero__microcopy {
  font-size: 14px;
  line-height: 1.45;
  color: var(--text-on-dark-faint);
}

/* Hero mock composition */
.hero__mock {
  position: relative;
  min-height: 460px;
  min-width: 0;
}

.mock-window {
  position: absolute;
  left: 18%;
  top: 20%;
  width: min(420px, 88%);
  background: #fff;
  border-radius: 20px;
  color: var(--text);
  box-shadow: 0 24px 60px rgba(0, 20, 18, 0.35);
  overflow: hidden;
  z-index: 2;
}

.mock-window__bar {
  display: flex;
  gap: 8px;
  padding: 14px 24px;
  background: #f8fafc;
}

.mock-window__dot {
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--icon-grad-2);
}

.mock-window__body {
  padding: 24px;
  display: grid;
  gap: 16px;
}

.mock-field { display: grid; gap: 6px; }

.mock-field__label {
  font-size: 14px;
  font-weight: 500;
}
.mock-field__label em {
  color: #e6483d;
  font-style: normal;
}

.mock-field__input {
  height: 40px;
  display: flex;
  align-items: center;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow-card);
  font-size: 14px;
  color: var(--text-tertiary);
  background: rgba(255, 255, 255, 0.95);
}

.mock-field__hint {
  font-size: 12px;
  color: var(--text-tertiary);
}

.mock-window__cta {
  height: 40px;
  border-radius: 12px;
  background: var(--teal-accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 500;
}

/* Chart card */
.mock-chart {
  position: absolute;
  right: 0;
  top: 0;
  width: min(304px, 62%);
  background: #fff;
  border-radius: 20px;
  padding: 20px;
  color: var(--text);
  box-shadow: 0 12px 40px rgba(0, 20, 18, 0.28);
  z-index: 3;
}

.mock-chart__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 11px;
  color: var(--text-tertiary);
}

.mock-chart__badge {
  background: #d1fae4;
  color: var(--success-text);
  font-size: 10px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 4px;
}

.mock-chart__value {
  margin-top: 6px;
  font-size: 15px;
}
.mock-chart__value b {
  font-weight: 500;
  color: var(--text);
}
.mock-chart__value span { color: var(--text-tertiary); }

.mock-chart svg { width: 100%; height: auto; margin-top: 10px; }

.mock-chart__axis {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: var(--text-tertiary);
  margin-top: 4px;
}

/* Operation mini-cards (shared) */
.op-stack {
  position: absolute;
  left: 0;
  bottom: 0;
  width: min(260px, 60%);
  z-index: 4;
  display: grid;
}

.op-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 10px 12px;
  color: var(--text);
  box-shadow: 0 8px 24px rgba(0, 20, 18, 0.18);
}

.op-card + .op-card { margin-top: -22px; }
.op-stack .op-card:nth-child(1) { width: 82%; margin-left: 12%; }
.op-stack .op-card:nth-child(2) { width: 92%; margin-left: 5%; position: relative; }
.op-stack .op-card:nth-child(3) { position: relative; }

.op-card__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.op-card__sum {
  font-size: 12px;
  font-weight: 500;
  color: var(--success);
}

.op-card__badge {
  display: inline-flex;
  align-items: center;
  background: var(--success-bg);
  color: var(--success-text);
  font-size: 10px;
  font-weight: 500;
  padding: 2px 6px;
  border-radius: 4px;
}

.op-card__meta {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: var(--text-tertiary);
  margin-top: 6px;
}

/* ============================================================
   Features (chat-payment) section
   ============================================================ */
.features__media img {
  width: 100%;
  max-width: 620px;
  height: auto;
  margin-inline: auto;
}

/* ============================================================
   Payment methods
   ============================================================ */
.methods-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: clamp(24px, 3vw, 40px);
}

.method-card__media {
  position: relative;
  overflow: hidden;
}

.method-card__media img {
  width: 100%;
  height: auto;
}

.method-card__text,
.info-card__text {
  padding: 28px 32px 32px;
  display: grid;
  gap: 12px;
}

.card-title {
  font-size: clamp(22px, 1.8vw, 28px);
  line-height: 1.15;
  font-weight: 500;
  color: #333;
}

.card-sub {
  font-size: clamp(15px, 1.2vw, 18px);
  font-weight: 300;
  line-height: 1.35;
  color: var(--text-secondary);
}

/* Messenger flow illustration */

/* Pay pill illustration */

/* Phone mockup */

/* API wide card */
.method-card--api {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  align-items: center;
  gap: 24px;
}

.method-card--api .method-card__text { padding: 32px; }

.code-demo {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  border-left: 1px solid #e9eaec;
  background: rgba(248, 250, 252, 0.8);
  font-size: 12px;
  min-height: 100%;
}

.code-demo__pane { border-right: 1px solid #e9eaec; min-width: 0; }
.code-demo__pane:last-child { border-right: 0; background: #fff; }

.code-demo__head {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 13px 20px;
  border-bottom: 1px solid #e9eaec;
  font-size: 13px;
  color: #141e12;
}

.code-demo__head--center { justify-content: center; color: #64748b; font-weight: 500; letter-spacing: 0.12em; }

.code-demo__head svg { width: 18px; height: 18px; color: #1c9e87; }

.code-demo__code {
  margin: 0;
  padding: 20px;
  font-family: ui-monospace, "Cascadia Mono", "JetBrains Mono", Consolas, monospace;
  font-size: 12px;
  line-height: 1.7;
  color: #1e293b;
  overflow-x: auto;
}

.code-demo__code .ln {
  display: inline-block;
  width: 2ch;
  margin-right: 1.5ch;
  color: #94a3b8;
  text-align: right;
  user-select: none;
}

.code-demo__resp { padding: 20px; display: grid; gap: 14px; align-content: start; }

.code-demo__resp-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 15px;
  font-weight: 500;
  color: #141e12;
}

.code-demo__resp-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
}
.code-demo__resp-row dt { color: #94a3b8; }
.code-demo__resp-row dd { margin: 0; color: #141e12; }

/* ============================================================
   After payment / payouts / cabinet cards
   ============================================================ */
.grid-2x2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.info-card { display: flex; flex-direction: column; }

.info-card__media {
  position: relative;
  flex: 1;
  min-height: 130px;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
}

.info-card__pic {
  width: 100%;
  height: auto;
}


/* Payouts cards */
.payouts-cards { display: grid; gap: 16px; }
.payouts-cards__top { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.payout-card { padding: 32px; display: grid; gap: 24px; align-content: start; }

.payout-card__text { display: grid; gap: 12px; }

.payout-card--wide {
  grid-template-columns: auto 1fr;
  align-items: start;
  column-gap: 24px;
}
.payout-card--wide .payout-card__text { max-width: 480px; }

/* Personal cabinet */
.cabinet__img {
  width: 100%;
  height: auto;
  margin-top: clamp(24px, 3vw, 40px);
}

/* Chip flow used instead of the wide render on small screens */
.cabinet__media { display: none; }

.cabinet-feature {
  display: grid;
  justify-items: center;
  gap: 9px;
}

.cabinet__fade { display: none; }

/* ============================================================
   API integration diagram
   ============================================================ */
.api-diagram img {
  width: 100%;
  max-width: 700px;
  height: auto;
  margin-inline: auto;
}

/* ============================================================
   Security
   ============================================================ */
.security-panel {
  position: relative;
  border-radius: var(--r-card);
  background: linear-gradient(135deg, var(--green-grad-1), var(--green-grad-2));
  color: #fff;
  padding: clamp(28px, 4vw, 60px);
  overflow: hidden;
}

.security-panel__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.07) 1px, transparent 1px);
  background-size: 250px 148px;
  pointer-events: none;
}

.security-panel__top {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 60px);
  align-items: center;
}

.security-panel__info { display: grid; gap: 24px; justify-items: start; }

.security-panel__title {
  font-size: clamp(26px, 3.4vw, 64px);
  line-height: 1.12;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: #fff;
  text-wrap: balance;
}

.security-panel__sub {
  font-size: clamp(15px, 1.3vw, 20px);
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.6);
  max-width: 640px;
}

.security-panel__shield {
  justify-self: center;
  width: clamp(180px, 22vw, 300px);
  filter: drop-shadow(0 18px 40px rgba(6, 46, 44, 0.45));
}

.security-list {
  position: relative;
  list-style: none;
  margin: clamp(32px, 4vw, 56px) 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.security-list__item {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: clamp(15px, 1.2vw, 20px);
  font-weight: 500;
}

.security-list__item svg {
  width: 24px; height: 24px;
  flex: none;
  color: #aef0e2;
}

/* ============================================================
   For whom
   ============================================================ */
.forwhom-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: clamp(24px, 3vw, 40px);
}

.forwhom-card__media--img img {
  width: 100%;
  height: auto;
}

/* ============================================================
   Connection steps
   ============================================================ */
.steps-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.step-card {
  padding: 32px;
  display: grid;
  gap: 16px;
  align-content: start;
  position: relative;
  overflow: hidden;
}

.step-card__num {
  width: 32px; height: 32px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
}

.step-card__title {
  font-size: 16px;
  font-weight: 500;
  color: var(--text-heading);
}

.step-card__sub {
  font-size: 14px;
  color: var(--text-secondary);
  margin-top: 4px;
}

.step-card__waves {
  position: absolute;
  right: -40px;
  bottom: -46px;
  width: 220px;
  color: rgba(22, 107, 110, 0.12);
  pointer-events: none;
}

/* ============================================================
   CTA (Integrations)
   ============================================================ */
.cta {
  background: var(--teal-deep);
  color: #fff;
  position: relative;
  overflow: hidden;
}

.cta__inner {
  position: relative;
  z-index: 1;
  max-width: 900px;
  margin-inline: auto;
  padding: clamp(48px, 6vw, 80px) var(--gutter) 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 24px;
}

.cta__title {
  font-size: clamp(24px, 3vw, 56px);
  font-weight: 600;
  line-height: 1.12;
  color: #fff;
  text-wrap: balance;
}

.cta__sub {
  font-size: clamp(15px, 1.2vw, 20px);
  font-weight: 300;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.8);
  max-width: 620px;
}

.cta__microcopy {
  font-size: 14px;
  color: var(--text-on-dark-faint);
}

/* Glow blops sit above the network render so its opaque edges stay invisible */
.cta__blop-1 { width: 640px; height: 400px; right: -15%; top: 30%; opacity: 0.45; filter: blur(180px); z-index: 2; }
.cta__blop-2 { width: 680px; height: 340px; left: -10%; top: -20%; opacity: 0.45; filter: blur(180px); z-index: 2; }

.cta__viz {
  position: relative;
  max-width: 1440px;
  margin-inline: auto;
  margin-top: clamp(12px, 2vw, 28px);
}

.cta__viz img {
  width: 100%;
  height: auto;
}

/* ============================================================
   Footer
   ============================================================ */
.footer {
  background: var(--bg-footer);
  padding: clamp(48px, 6vw, 96px) 0 48px;
}

.footer__inner {
  max-width: 1760px;
  margin-inline: auto;
  padding-inline: clamp(16px, 4vw, 80px);
}

.footer__cols {
  display: flex;
  justify-content: space-between;
  gap: 48px;
  flex-wrap: wrap;
}

.footer__brand {
  max-width: 430px;
  display: grid;
  gap: 20px;
  justify-items: start;
}

.footer__desc {
  font-size: 18px;
  line-height: 1.5;
  color: var(--text-secondary);
}

.footer__actions { display: flex; gap: 12px; flex-wrap: wrap; }

.footer__links {
  display: flex;
  gap: clamp(40px, 6vw, 86px);
}

.footer-col { display: grid; gap: 16px; align-content: start; }

.footer-col__title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 4px;
}

.footer-col a {
  font-size: 18px;
  color: var(--text-secondary);
  transition: color 0.2s ease;
}
.footer-col a:hover { color: var(--text); }

/* Legal requisites */
.footer__legal {
  margin-top: clamp(32px, 4vw, 53px);
  border-top: 1px solid var(--border);
  padding-top: clamp(24px, 3vw, 36px);
}

.footer__requisites {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(0, 1.4fr);
  gap: 24px 40px;
}

.req dt {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  margin-bottom: 8px;
}

.req dd {
  margin: 0;
  font-size: 15px;
  line-height: 1.55;
  color: var(--text-secondary);
}

.req dd a {
  color: var(--text);
  font-weight: 500;
  transition: color 0.2s ease;
}
.req dd a:hover { color: var(--teal-accent-dark); }

.footer__copyright {
  margin-top: clamp(24px, 3vw, 36px);
  padding-top: 20px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-tertiary);
}

/* ============================================================
   Documents page
   ============================================================ */
.page-head {
  padding: clamp(40px, 6vw, 80px) 0 clamp(24px, 3vw, 40px);
}

.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
}

.breadcrumbs svg { width: 16px; height: 16px; color: var(--text-tertiary); }

.breadcrumbs [aria-current] { color: var(--text); }

.page-title {
  margin-top: 16px;
  font-size: clamp(30px, 3.4vw, 48px);
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--text);
}

.docs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
  padding-bottom: clamp(56px, 8vw, 120px);
}

.doc-card {
  padding: 32px;
  display: grid;
  gap: 22px;
  align-content: start;
  color: inherit;
}

.doc-card__badge {
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--teal-accent);
}
.doc-card__badge svg { width: 20px; height: 20px; }

.doc-card__type {
  font-size: 14px;
  color: #a6a6a6;
}

.doc-card__name {
  font-size: 16px;
  font-weight: 500;
  line-height: 1.5;
  color: var(--text);
  margin-top: 2px;
}

/* ============================================================
   Reveal animation
   ============================================================ */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity 0.55s ease, transform 0.55s ease;
  }
  .reveal.is-visible {
    opacity: 1;
    transform: none;
  }
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 1200px) {
  .methods-grid { grid-template-columns: repeat(2, 1fr); }
  .method-card--api { grid-template-columns: 1fr; }
  .code-demo { border-left: 0; border-top: 1px solid #e9eaec; }
  .forwhom-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 1024px) {
  .nav { display: none; }
  .header__actions .btn { display: none; }
  .burger { display: inline-flex; }

  .hero__inner { grid-template-columns: 1fr; }
  .hero__mock { max-width: 560px; width: 100%; margin-inline: auto; }

  .split { grid-template-columns: 1fr; }
  .split--media-first .split__media { order: -1; }

  .security-panel__top { grid-template-columns: 1fr; }
  .footer__requisites { grid-template-columns: 1fr 1fr; }
  .security-panel__shield { order: -1; }
  .security-list { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 760px) {
  .methods-grid { grid-template-columns: 1fr; }
  .forwhom-grid { grid-template-columns: 1fr; }
  .grid-2x2 { grid-template-columns: 1fr; }
  .payouts-cards__top { grid-template-columns: 1fr; }
  .payout-card--wide { grid-template-columns: 1fr; row-gap: 16px; }
  .steps-grid { grid-template-columns: 1fr; }
  .security-list { grid-template-columns: 1fr; gap: 14px; }

  .section-head { gap: 16px; }
  .section-head--center { text-align: center; }

  .hero__actions { align-items: stretch; }
  .hero__actions .btn { width: 100%; }

  /* Wide cabinet render is unreadable on small screens — show a chip flow instead */
  .cabinet__img { display: none; }
  .cabinet__media {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-start;
    gap: 20px 14px;
    padding: 28px 16px 8px;
  }

  .code-demo { grid-template-columns: 1fr; }
  .code-demo__pane { border-right: 0; border-bottom: 1px solid #e9eaec; }
  .code-demo__pane:last-child { border-bottom: 0; }

  .footer__cols { flex-direction: column; }
  .footer__links { flex-wrap: wrap; }
  .footer__requisites { grid-template-columns: 1fr; gap: 20px; }
}

@media (max-width: 480px) {
  .hero__mock { min-height: 470px; }
  .mock-window { left: 0; width: 100%; }
  .mock-chart { width: 200px; }
}
