/* Monex — публичный лендинг (светлая схема) */
:root {
  --mx-blue: #528ff0;
  --mx-blue-hover: #3d7de8;
  --mx-blue-deep: #072654;
  --mx-ink: #192839;
  --mx-muted: #6b7c93;
  --mx-border: #e3e8f0;
  --mx-bg: #ffffff;
  --mx-bg-soft: #f4f7fe;
  --mx-bg-hero: linear-gradient(135deg, #f0f5ff 0%, #fafbff 42%, #fff8f4 100%);
  --mx-radius: 12px;
  --mx-radius-lg: 20px;
  --mx-shadow: 0 8px 32px rgba(7, 38, 84, 0.08);
  --mx-container: 1040px;
  --mx-font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  scroll-behavior: smooth;
}

body.mx-page {
  min-height: 100dvh;
  font-family: var(--mx-font);
  font-size: 16px;
  line-height: 1.55;
  color: var(--mx-ink);
  background: var(--mx-bg);
  display: flex;
  flex-direction: column;
}

.mx-container {
  width: min(100% - 2.5rem, var(--mx-container));
  margin-inline: auto;
}

/* Header */
.mx-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--mx-border);
}

.mx-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4rem;
  padding: 0.65rem 0;
}

.mx-brand {
  display: inline-flex;
  align-items: center;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--mx-blue-deep);
  text-decoration: none;
}

.mx-brand span {
  color: var(--mx-blue);
}

.mx-header__nav {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.mx-header__nav a:not(.mx-btn) {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--mx-muted);
  text-decoration: none;
}

.mx-header__nav a:not(.mx-btn):hover {
  color: var(--mx-blue);
}

.mx-header__link--auth {
  margin-left: 0.25rem;
}

/* Buttons */
.mx-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.2;
  padding: 0.7rem 1.25rem;
  border-radius: var(--mx-radius);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s, color 0.15s, box-shadow 0.15s;
}

.mx-btn--sm {
  font-size: 0.85rem;
  padding: 0.5rem 0.9rem;
}

.mx-btn--lg {
  font-size: 1rem;
  padding: 0.85rem 1.5rem;
}

.mx-btn--on-dark {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.35);
}

.mx-btn--on-dark:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.5);
  color: #fff;
}

.mx-btn--primary {
  color: #fff;
  background: var(--mx-blue);
  box-shadow: 0 4px 14px rgba(82, 143, 240, 0.28);
}

.mx-btn--primary:hover {
  background: var(--mx-blue-hover);
}

.mx-btn--ghost {
  color: var(--mx-blue);
  background: #fff;
  border-color: var(--mx-border);
}

.mx-btn--ghost:hover {
  border-color: rgba(82, 143, 240, 0.45);
  background: var(--mx-bg-soft);
}

.mx-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

/* Hero */
.mx-main {
  flex: 1;
}

.mx-hero,
.mx-section,
#calc {
  scroll-margin-top: 5rem;
}

.mx-hero {
  position: relative;
  overflow: hidden;
  background: var(--mx-bg-hero);
  padding: 3rem 0 4rem;
}

.mx-hero::before,
.mx-hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(60px);
}

.mx-hero::before {
  width: 420px;
  height: 420px;
  top: -80px;
  right: 8%;
  background: rgba(82, 143, 240, 0.22);
}

.mx-hero::after {
  width: 280px;
  height: 280px;
  bottom: 10%;
  left: -4%;
  background: rgba(255, 160, 120, 0.18);
}

.mx-hero .mx-container {
  position: relative;
  z-index: 1;
}

.mx-hero__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: center;
}

.mx-eyebrow {
  display: inline-block;
  margin-bottom: 0.75rem;
  padding: 0.28rem 0.75rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mx-blue);
  background: rgba(82, 143, 240, 0.12);
}

.mx-hero h1 {
  margin-bottom: 1rem;
  font-size: clamp(1.85rem, 4vw, 2.75rem);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.03em;
  color: var(--mx-blue-deep);
}

.mx-lead {
  margin-bottom: 1.5rem;
  font-size: 1.05rem;
  color: var(--mx-muted);
  max-width: 34rem;
}

.mx-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.75rem;
  padding: 0;
  list-style: none;
}

.mx-tags li {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--mx-muted);
  padding: 0.35rem 0.7rem;
  background: #fff;
  border: 1px solid var(--mx-border);
  border-radius: 999px;
}

/* Calculator */
.mx-hero__visual {
  display: flex;
  justify-content: flex-end;
  align-items: flex-start;
  width: 100%;
}

.mx-calc {
  width: min(100%, 560px);
  padding: 1.35rem;
  background: #fff;
  border-radius: var(--mx-radius-lg);
  box-shadow: var(--mx-shadow);
  border: 1px solid var(--mx-border);
}

.mx-calc__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.15rem;
}

.mx-calc__title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--mx-blue-deep);
}

.mx-calc__badge {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--mx-blue);
  padding: 0.2rem 0.55rem;
  background: rgba(82, 143, 240, 0.12);
  border-radius: 999px;
}

.mx-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--mx-muted);
  margin-bottom: 0.4rem;
}

.mx-input,
.mx-select {
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  color: var(--mx-ink);
  background: var(--mx-bg-soft);
  border: 1px solid var(--mx-border);
  border-radius: 10px;
  padding: 0.65rem 0.75rem;
  width: 100%;
}

.mx-input:focus,
.mx-select:focus {
  outline: none;
  border-color: rgba(82, 143, 240, 0.55);
  box-shadow: 0 0 0 3px rgba(82, 143, 240, 0.15);
}

.mx-input--readonly {
  background: #fff;
  color: var(--mx-blue-deep);
}

.mx-calc__fields {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.mx-calc__fields-col {
  flex: 1;
  min-width: 0;
}

.mx-calc__field {
  margin-bottom: 0.75rem;
}

.mx-calc__field:last-child {
  margin-bottom: 0;
}

.mx-calc__row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.5rem;
  align-items: stretch;
}

.mx-calc__row .mx-input {
  min-width: 0;
}

.mx-select {
  min-width: 5.5rem;
  cursor: pointer;
}

.mx-calc__swap-wrap {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
}

.mx-calc__swap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  border: 1px solid var(--mx-border);
  background: #fff;
  color: var(--mx-blue);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.15s;
}

.mx-calc__swap:hover {
  background: var(--mx-bg-soft);
  border-color: rgba(82, 143, 240, 0.45);
}

.mx-calc__swap:active {
  transform: scale(0.96);
}

.mx-calc__details {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--mx-border);
}

.mx-calc__detail-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  font-size: 0.82rem;
  margin-bottom: 0.45rem;
}

.mx-calc__detail-row span {
  color: var(--mx-muted);
}

.mx-calc__detail-row strong {
  font-weight: 700;
  color: var(--mx-blue-deep);
  text-align: right;
}

.mx-calc__detail-row--muted strong {
  font-weight: 600;
  color: var(--mx-muted);
}

.mx-calc__note {
  font-size: 0.75rem;
  color: var(--mx-muted);
  margin: 0.85rem 0 1rem;
  line-height: 1.45;
}

.mx-calc__submit {
  width: 100%;
}

/* Sections */
.mx-section {
  padding: 3.5rem 0;
}

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

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

.mx-section--pairs {
  padding-top: 2.5rem;
  padding-bottom: 3rem;
  border-top: 1px solid var(--mx-border);
}

.mx-section__head {
  max-width: 36rem;
  margin-bottom: 2rem;
}

.mx-section__head--compact {
  margin-bottom: 1.25rem;
}

.mx-section__title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--mx-blue-deep);
  margin-bottom: 0.65rem;
}

.mx-section__lead {
  font-size: 1rem;
  color: var(--mx-muted);
  line-height: 1.55;
}

/* Steps */
.mx-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  list-style: none;
  padding: 0;
  counter-reset: none;
}

.mx-step {
  position: relative;
  padding: 1.5rem;
  background: #fff;
  border: 1px solid var(--mx-border);
  border-radius: var(--mx-radius-lg);
  box-shadow: 0 2px 12px rgba(7, 38, 84, 0.04);
}

.mx-section--soft .mx-step {
  background: #fff;
}

.mx-step__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  margin-bottom: 1rem;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--mx-blue);
  background: rgba(82, 143, 240, 0.12);
}

.mx-step__title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--mx-blue-deep);
  margin-bottom: 0.5rem;
}

.mx-step__text {
  font-size: 0.9rem;
  color: var(--mx-muted);
  line-height: 1.55;
  margin-bottom: 1rem;
}

.mx-step__link {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--mx-blue);
  text-decoration: none;
}

.mx-step__link:hover {
  text-decoration: underline;
}

.mx-kyc-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.5rem;
  padding: 1.15rem 1.25rem;
  margin-top: 2rem;
  border-radius: var(--mx-radius);
  background: rgba(82, 143, 240, 0.1);
  border: 1px solid rgba(82, 143, 240, 0.25);
}

.mx-kyc-banner p {
  flex: 1;
  min-width: 200px;
  font-size: 0.88rem;
  color: var(--mx-ink);
  margin: 0;
}

/* Features */
.mx-features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.mx-features--four {
  grid-template-columns: repeat(2, 1fr);
}

.mx-section--plain .mx-feature {
  background: var(--mx-bg-soft);
}

.mx-feature {
  padding: 1.5rem;
  border-radius: var(--mx-radius-lg);
  border: 1px solid var(--mx-border);
  background: var(--mx-bg-soft);
  transition: box-shadow 0.15s, border-color 0.15s;
}

.mx-feature:hover {
  border-color: rgba(82, 143, 240, 0.35);
  box-shadow: var(--mx-shadow);
}

.mx-feature__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  margin-bottom: 1rem;
  border-radius: 12px;
  color: var(--mx-blue);
  background: rgba(82, 143, 240, 0.12);
}

.mx-feature__title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--mx-blue-deep);
  margin-bottom: 0.45rem;
}

.mx-feature__text {
  font-size: 0.88rem;
  color: var(--mx-muted);
  line-height: 1.55;
}

/* FAQ */
.mx-faq {
  width: 100%;
}

.mx-section--soft .mx-faq {
  padding: 0 1.5rem;
  background: var(--mx-bg);
  border: 1px solid var(--mx-border);
  border-radius: var(--mx-radius-lg);
}

#faq .mx-section__head {
  max-width: none;
}

.mx-faq__item {
  border-bottom: 1px solid var(--mx-border);
}

.mx-faq__item:first-child {
  border-top: 1px solid var(--mx-border);
}

.mx-faq__q {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--mx-blue-deep);
  text-align: left;
  background: none;
  border: none;
  cursor: pointer;
}

.mx-faq__q:hover {
  color: var(--mx-blue);
}

.mx-faq__icon {
  flex-shrink: 0;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  border: 1px solid var(--mx-border);
  position: relative;
  font-size: 0;
  line-height: 0;
  color: var(--mx-muted);
  transition: transform 0.2s, border-color 0.2s, color 0.2s;
}

.mx-faq__icon::before,
.mx-faq__icon::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  background: currentColor;
  border-radius: 1px;
  transform: translate(-50%, -50%);
}

.mx-faq__icon::before {
  width: 0.6rem;
  height: 1.5px;
}

.mx-faq__icon::after {
  width: 1.5px;
  height: 0.6rem;
}

.mx-faq__item.is-open .mx-faq__icon {
  transform: rotate(45deg);
  border-color: var(--mx-blue);
  color: var(--mx-blue);
}

.mx-faq__a {
  display: none;
  padding: 0 0 1rem;
  font-size: 0.88rem;
  color: var(--mx-muted);
  line-height: 1.6;
}

.mx-faq__item.is-open .mx-faq__a {
  display: block;
}

/* Pair chips */
.mx-pairs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.mx-pair-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.55rem 1rem;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--mx-blue-deep);
  background: #fff;
  border: 1px solid var(--mx-border);
  border-radius: 999px;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.mx-pair-chip:hover {
  color: var(--mx-blue);
  border-color: rgba(82, 143, 240, 0.45);
  background: rgba(82, 143, 240, 0.08);
}

/* CTA band */
.mx-cta {
  background: linear-gradient(135deg, var(--mx-blue-deep) 0%, #0c3d7a 100%);
  padding: 3rem 0;
}

.mx-cta__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}

.mx-cta__title {
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #fff;
  margin-bottom: 0.4rem;
}

.mx-cta__lead {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.78);
  max-width: 28rem;
}

.mx-cta__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

/* Footer */
.mx-footer {
  border-top: 1px solid var(--mx-border);
  background: var(--mx-bg);
  padding: 1.75rem 0 2rem;
}

.mx-footer__trust {
  font-size: 0.88rem;
  color: var(--mx-muted);
  line-height: 1.55;
  margin-bottom: 1.25rem;
  max-width: 42rem;
}

.mx-footer__trust a {
  color: var(--mx-blue);
  font-weight: 600;
  text-decoration: none;
}

.mx-footer__trust a:hover {
  text-decoration: underline;
}

.mx-footer__docs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  margin-bottom: 1rem;
}

.mx-footer__docs a {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--mx-blue);
  text-decoration: none;
}

.mx-footer__docs a:hover {
  text-decoration: underline;
}

.mx-footer__copy {
  font-size: 0.9rem;
  color: var(--mx-muted);
  margin-bottom: 0.35rem;
}

.mx-footer__note {
  font-size: 0.85rem;
  color: rgba(107, 124, 147, 0.85);
}

.mx-footer__link {
  color: var(--mx-blue);
  font-weight: 600;
  text-decoration: none;
}

.mx-footer__link:hover {
  text-decoration: underline;
}

@media (max-width: 900px) {
  .mx-steps,
  .mx-features,
  .mx-features--four {
    grid-template-columns: 1fr;
  }

  .mx-cta__inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .mx-cta__actions {
    width: 100%;
  }

  .mx-cta__actions .mx-btn {
    flex: 1;
    min-width: 10rem;
  }
}

@media (max-width: 768px) {
  .mx-hero__grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .mx-hero__visual {
    order: -1;
    justify-content: center;
  }

  .mx-hero {
    padding: 2rem 0 3rem;
  }

  .mx-section {
    padding: 2.5rem 0;
  }

  .mx-header__link:not(.mx-header__link--auth) {
    display: none;
  }
}

@media (max-width: 480px) {
  .mx-container {
    width: min(100% - 2rem, var(--mx-container));
  }

  .mx-calc__row {
    grid-template-columns: 1fr;
  }

  .mx-select {
    min-width: 0;
  }

  .mx-hero__actions {
    flex-direction: column;
  }

  .mx-hero__actions .mx-btn {
    width: 100%;
  }

  .mx-cta__actions {
    flex-direction: column;
  }

  .mx-cta__actions .mx-btn {
    width: 100%;
  }
}
