/* ==========================================================================
   Factoring — main styles (Hero + Header)
   ========================================================================== */

@font-face {
  font-family: "Manrope";
  src: url("../fonts/Manrope-VariableFont_wght.ttf") format("truetype");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg-deep: #05060a;
  --bg-hero: #06070b;
  --text: #ffffff;
  --text-muted: rgba(255, 255, 255, 0.72);
  --accent: #755cff;
  --accent-2: #695bfa;
  --grad: radial-gradient(50% 50% at 50% 50%, #7067ff 0%, #4d36ec 100%);
  --grad-border: linear-gradient(117.13deg, #06070b -7.11%, rgba(105, 91, 250, 0.4) 104.71%);
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 18px;
  --radius-pill: 999px;
  --header-h: 84px;
  --font: "Manrope", system-ui, -apple-system, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  /*
   * Адаптивный масштаб: ~1 на 1920, растёт к 2K/4K.
   * База макета — Full HD; на больших мониторах всё пропорционально крупнеет.
   */
  --ui-scale: clamp(1, 100vw / 1920px, 1.32);
  --container: calc(1360px * var(--ui-scale));
  --hero-content-w: calc(677px * var(--ui-scale));
  --hero-visual-w: calc(640px * var(--ui-scale));
  --hero-title-size: clamp(34px, calc(2.7vw + 0.4rem), calc(56px * var(--ui-scale)));
  --hero-stat-pad-y: calc(20px * var(--ui-scale));
  --hero-stat-pad-x: calc(20px * var(--ui-scale));
  --hero-stat-gap: calc(16px * var(--ui-scale));
  --hero-stat-icon: calc(50px * var(--ui-scale));
  --hero-stat-value: calc(22px * var(--ui-scale));
  --hero-stat-label: calc(14px * var(--ui-scale));
  --hero-stat-radius: calc(14px * var(--ui-scale));
  --nav-link-size: calc(15px * var(--ui-scale));
  --btn-pad-y: calc(12px * var(--ui-scale));
  --btn-pad-x: calc(22px * var(--ui-scale));
  --btn-font: calc(15px * var(--ui-scale));
  --side-gap: clamp(40px, 6.25vw, calc(90px * var(--ui-scale)));
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  font-weight: 500;
  color: var(--text);
  background: var(--bg-deep);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

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

button {
  font-family: inherit;
  cursor: pointer;
  border: 0;
  background: none;
  color: inherit;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.container {
  width: min(calc(100% - var(--side-gap) * 2), var(--container));
  margin-inline: auto;
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: var(--btn-pad-y) var(--btn-pad-x);
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: var(--btn-font);
  line-height: 1.2;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), filter 0.25s var(--ease);
  white-space: nowrap;
}

.btn--gradient {
  background: var(--grad);
  color: #fff;
  box-shadow: 0 8px 28px rgba(77, 54, 236, 0.4);
}

.btn--gradient:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
  box-shadow: 0 12px 34px rgba(77, 54, 236, 0.5);
}

.btn--lg {
  padding: calc(16px * var(--ui-scale)) calc(28px * var(--ui-scale));
  font-size: calc(16px * var(--ui-scale));
  border-radius: calc(12px * var(--ui-scale));
}

/* --------------------------------------------------------------------------
   Header — transparent over hero, glass on scroll
   -------------------------------------------------------------------------- */

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background 0.35s var(--ease), border-color 0.35s var(--ease), backdrop-filter 0.35s var(--ease), box-shadow 0.35s var(--ease);
}

.admin-bar .site-header {
  top: 32px;
}

@media (max-width: 782px) {
  .admin-bar .site-header {
    top: 46px;
  }

  .admin-bar .site-nav {
    top: calc(var(--header-h) + 46px + 10px);
  }
}

.site-header.is-scrolled {
  background: rgba(7, 8, 15, 0.72);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom-color: rgba(255, 255, 255, 0.06);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
}

.site-header__inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: calc(32px * var(--ui-scale));
  width: min(calc(100% - var(--side-gap) * 2), var(--container));
  margin-inline: auto;
}

.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #fff;
}

.site-logo__icon {
  display: grid;
  place-items: center;
  color: #fff;
}

.site-logo__text {
  font-weight: 800;
  font-size: calc(18px * var(--ui-scale));
  letter-spacing: 0.06em;
}

.site-nav {
  justify-self: center;
}

.site-nav__inner {
  display: contents;
}

.site-nav__cta {
  display: none;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-menu__link {
  font-size: var(--nav-link-size);
  font-weight: 500;
  color: rgba(255, 255, 255, 0.9);
  transition: color 0.2s ease;
}

.nav-menu__link:hover {
  color: #fff;
}

.site-header__cta {
  justify-self: end;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 12px;
  overflow: hidden;
  flex-shrink: 0;
}

.nav-toggle__icon {
  width: 44px;
  height: 44px;
  object-fit: contain;
  display: block;
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */

.hero {
  position: relative;
  min-height: 100svh;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: var(--header-h) 0 48px;
  overflow: hidden;
  background: var(--bg-hero);
  isolation: isolate;
  box-sizing: border-box;
}

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  background-color: var(--bg-hero);
  background-image: var(--hero-bg);
  background-repeat: no-repeat;
  background-position: center right;
  background-size: cover;
}

.hero__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(5, 6, 10, 0.55) 0%, rgba(5, 6, 10, 0.18) 48%, rgba(5, 6, 10, 0.05) 100%);
  pointer-events: none;
}

.hero__container {
  position: relative;
  z-index: 1;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: clamp(28px, 4vh, calc(52px * var(--ui-scale)));
  width: min(calc(100% - var(--side-gap) * 2), var(--container));
  margin-inline: auto;
  min-height: 0;
}

.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, var(--hero-content-w)) minmax(0, 1fr);
  gap: clamp(16px, 2.5vw, calc(40px * var(--ui-scale)));
  align-items: center;
  min-height: 0;
}

.hero__content {
  width: 100%;
  max-width: var(--hero-content-w);
  padding-top: 0;
  min-height: 0;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: calc(9px * var(--ui-scale)) calc(16px * var(--ui-scale)) calc(9px * var(--ui-scale)) calc(12px * var(--ui-scale));
  border-radius: var(--radius-pill);
  border: 1px solid #303542;
  background: rgba(6, 7, 11, 0.45);
  font-size: calc(14px * var(--ui-scale));
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fff;
  margin-top: calc(-18px * var(--ui-scale));
  margin-bottom: calc(22px * var(--ui-scale));
}

.hero-badge__icon {
  width: 18px;
  height: 18px;
  object-fit: contain;
}

.hero__title {
  margin: 0 0 calc(22px * var(--ui-scale));
  font-size: var(--hero-title-size);
  line-height: 1.12;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #fff;
}

.text-accent {
  color: #755cff;
  background: none;
}

.hero-list {
  display: grid;
  gap: calc(12px * var(--ui-scale));
  margin-bottom: calc(32px * var(--ui-scale));
}

.hero-list__item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--text-muted);
  font-size: calc(16px * var(--ui-scale));
  font-weight: 500;
  line-height: 1.45;
}

.hero-list__item img {
  width: 18px;
  height: 18px;
  margin-top: 3px;
  flex-shrink: 0;
}

.hero__actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 18px 22px;
}

.hero-play {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.hero-play:hover {
  transform: translateY(-1px);
}

.hero-play__icon {
  width: calc(48px * var(--ui-scale));
  height: calc(48px * var(--ui-scale));
  border-radius: 50%;
  transition: box-shadow 0.25s var(--ease), transform 0.25s var(--ease);
}

.hero-play:hover .hero-play__icon {
  transform: scale(1.05);
  box-shadow: 0 0 0 6px rgba(124, 108, 255, 0.18);
}

.hero-play__text {
  font-size: calc(16px * var(--ui-scale));
  font-weight: 600;
  color: #fff;
}

/* Visual / animation */

.hero__visual {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  position: relative;
  padding-top: 0;
}

.hero-visual {
  position: relative;
  width: min(100%, var(--hero-visual-w));
  max-width: 100%;
  aspect-ratio: 579 / 530;
  display: grid;
  place-items: center;
}

.hero-visual__glow {
  position: absolute;
  width: 72%;
  height: 72%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(120, 90, 255, 0.45) 0%, rgba(80, 60, 200, 0.12) 45%, transparent 70%);
  filter: blur(8px);
  animation: glowPulse 4.5s ease-in-out infinite;
  z-index: 0;
}

.hero-visual__img {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: none;
  height: auto;
  aspect-ratio: 579 / 530;
  object-fit: contain;
  animation: floatY 5.5s ease-in-out infinite;
  filter: drop-shadow(0 30px 50px rgba(90, 60, 200, 0.35));
  will-change: transform;
  /* Убирает чёрный фон экспорта, если PNG без прозрачности */
  mix-blend-mode: lighten;
}

@keyframes floatY {
  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(-14px) rotate(-1.2deg);
  }
}

@keyframes glowPulse {
  0%,
  100% {
    opacity: 0.75;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.06);
  }
}

/* Stats cards */

.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--hero-stat-gap);
  margin-top: 0;
  flex-shrink: 0;
}

.hero-stat {
  position: relative;
  display: flex;
  align-items: center;
  gap: calc(14px * var(--ui-scale));
  padding: var(--hero-stat-pad-y) var(--hero-stat-pad-x);
  border-radius: var(--hero-stat-radius);
  overflow: hidden;
  isolation: isolate;
  background: transparent;
  border: 0;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  transition: transform 0.25s var(--ease), filter 0.25s ease;
}

/* Стеклышко: затенение по углам */
.hero-stat::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background:
    radial-gradient(120% 90% at 0% 0%, rgba(0, 0, 0, 0.55) 0%, transparent 55%),
    radial-gradient(120% 90% at 100% 100%, rgba(0, 0, 0, 0.45) 0%, transparent 55%),
    radial-gradient(90% 80% at 100% 0%, rgba(0, 0, 0, 0.28) 0%, transparent 50%),
    radial-gradient(90% 80% at 0% 100%, rgba(0, 0, 0, 0.28) 0%, transparent 50%),
    rgba(6, 7, 11, 0.12);
  pointer-events: none;
}

/* Градиентная обводка с сохранением скруглений (border-image ломает radius) */
.hero-stat::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(117.13deg, #06070b -7.11%, rgba(105, 91, 250, 0.4) 104.71%);
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.hero-stat:hover {
  transform: translateY(-2px);
  filter: brightness(1.06);
}

.hero-stat__icon,
.hero-stat__text {
  position: relative;
  z-index: 1;
}

.hero-stat__icon {
  width: var(--hero-stat-icon);
  height: var(--hero-stat-icon);
  flex-shrink: 0;
  object-fit: contain;
  border-radius: calc(10px * var(--ui-scale));
}

.hero-stat__text {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.hero-stat__value {
  font-size: var(--hero-stat-value);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: #fff;
}

.hero-stat__label {
  font-size: var(--hero-stat-label);
  font-weight: 500;
  color: rgba(255, 255, 255, 0.55);
  line-height: 1.3;
}

/* --------------------------------------------------------------------------
   When section — «Решение для роста бизнеса»
   -------------------------------------------------------------------------- */

.section--when {
  background: #fff;
  padding: clamp(64px, 8vw, calc(100px * var(--ui-scale))) 0;
  color: #181a21;
}

.when__header {
  max-width: calc(720px * var(--ui-scale));
  margin-bottom: clamp(36px, 5vw, calc(56px * var(--ui-scale)));
}

.when-badge {
  display: inline-flex;
  align-items: center;
  padding: calc(8px * var(--ui-scale)) calc(14px * var(--ui-scale));
  border-radius: calc(8px * var(--ui-scale));
  background: #695bfa14;
  color: #695bfa;
  font-size: calc(12px * var(--ui-scale));
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: calc(18px * var(--ui-scale));
}

.when__title {
  margin: 0 0 calc(16px * var(--ui-scale));
  font-size: clamp(28px, 3.2vw, calc(42px * var(--ui-scale)));
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: #181a21;
}

.section--when .text-accent {
  color: transparent;
  background: linear-gradient(90deg, #786fd4 0%, #5b6cff 100%);
  -webkit-background-clip: text;
  background-clip: text;
}

.when__lead {
  margin: 0;
  max-width: calc(560px * var(--ui-scale));
  font-family: var(--font);
  font-size: calc(16px * var(--ui-scale));
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: 0;
  color: #626572;
}

.when-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: calc(24px * var(--ui-scale));
}

.when-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: calc(18px * var(--ui-scale));
  width: 100%;
  min-height: calc(245px * var(--ui-scale));
  padding: calc(28px * var(--ui-scale)) calc(20px * var(--ui-scale)) calc(24px * var(--ui-scale));
  border-radius: calc(12px * var(--ui-scale));
  border: 1px solid #e9e4ff;
  background: linear-gradient(180deg, #ffffff 0%, #faf8ff 100%);
  overflow: hidden;
  box-sizing: border-box;
}

/* Линия слева + цифра справа в одной верхней зоне */
.when-card__head {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  min-height: calc(56px * var(--ui-scale));
  padding-right: calc(4px * var(--ui-scale));
}

.when-card__bar {
  display: block;
  flex-shrink: 0;
  width: calc(80px * var(--ui-scale));
  height: calc(8px * var(--ui-scale));
  margin-top: calc(6px * var(--ui-scale));
  border-radius: 20px;
  background: linear-gradient(90deg, #786fd4 0%, #e1deff 100%);
}

.when-card__num {
  position: absolute;
  top: calc(-6px * var(--ui-scale));
  right: 0;
  font-family: var(--font);
  font-size: calc(72px * var(--ui-scale));
  font-weight: 300;
  line-height: 0.85;
  letter-spacing: 0;
  color: #8d82ff33;
  pointer-events: none;
  user-select: none;
}

.when-card__body {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: calc(12px * var(--ui-scale));
  /* оставляем место под цифру справа */
  padding-right: calc(64px * var(--ui-scale));
  margin-top: calc(-28px * var(--ui-scale));
  min-width: 0;
}

.when-card__title {
  margin: 0;
  font-family: var(--font);
  font-size: calc(22px * var(--ui-scale));
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: 0;
  color: #181a21;
}

.when-card__text {
  margin: 0;
  font-family: var(--font);
  font-size: calc(18px * var(--ui-scale));
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: 0;
  color: #626572;
}

.when__more {
  display: none;
  width: 100%;
  margin-top: 24px;
}

/* --------------------------------------------------------------------------
   Calc — условия + форма расчета
   -------------------------------------------------------------------------- */

.section--calc {
  background: #ffffff;
  padding: clamp(64px, 8vw, calc(100px * var(--ui-scale))) 0;
}

.calc-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: calc(24px * var(--ui-scale));
  align-items: stretch;
}

.calc-card {
  width: 100%;
  min-height: calc(465px * var(--ui-scale));
  border-radius: calc(16px * var(--ui-scale));
  box-sizing: border-box;
}

.calc-card--conditions {
  background: linear-gradient(180deg, #ffffff 0%, #faf8ff 100%);
  border: 1px solid #e9e4ff;
  padding: calc(36px * var(--ui-scale)) calc(32px * var(--ui-scale)) calc(28px * var(--ui-scale));
  display: flex;
  flex-direction: column;
}

.calc-card__title {
  margin: 0 0 calc(28px * var(--ui-scale));
  text-align: left;
  font-family: var(--font);
  font-size: calc(42px * var(--ui-scale));
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0;
  color: #181a21;
}

.calc-card--conditions .text-accent {
  color: #695bfa;
  background: none;
}

.cond-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: calc(22px * var(--ui-scale)) calc(20px * var(--ui-scale));
  flex: 1;
}

.cond-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.cond-item__icon {
  width: calc(46px * var(--ui-scale));
  height: calc(46px * var(--ui-scale));
  flex-shrink: 0;
  object-fit: contain;
  border-radius: 10px;
}

.cond-item__text {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.cond-item__title {
  font-family: var(--font);
  font-size: calc(18px * var(--ui-scale));
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0;
  color: #181a21;
}

.cond-item__desc {
  font-family: var(--font);
  font-size: calc(16px * var(--ui-scale));
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0;
  color: #626572;
}

.cond-note {
  margin-top: calc(24px * var(--ui-scale));
  display: flex;
  align-items: center;
  gap: 10px;
  padding: calc(14px * var(--ui-scale)) calc(16px * var(--ui-scale));
  border-radius: 12px;
  background: #ffffff;
  border: 1px solid #e9e4ff;
}

.cond-note__icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  margin-top: 0;
  object-fit: contain;
}

.cond-note__text {
  margin: 0;
  font-size: calc(13px * var(--ui-scale));
  line-height: 1.4;
  color: #62657299;
}

.calc-card--form {
  position: relative;
  overflow: hidden;
  color: #fff;
  background-color: #0b1224;
  background-image: var(--calc-bg);
  background-repeat: no-repeat;
  background-position: right top;
  background-size: cover;
  padding: calc(36px * var(--ui-scale)) calc(32px * var(--ui-scale)) calc(28px * var(--ui-scale));
  display: flex;
  flex-direction: column;
}

.calc-card--form::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(8, 12, 28, 0.92) 0%, rgba(12, 18, 40, 0.78) 55%, rgba(20, 24, 60, 0.55) 100%);
  pointer-events: none;
}

.calc-form__header,
.calc-form {
  position: relative;
  z-index: 1;
}

.calc-form__header {
  margin-bottom: calc(24px * var(--ui-scale));
}

.calc-form__title {
  margin: 0 0 8px;
  font-size: calc(28px * var(--ui-scale));
  font-weight: 800;
  line-height: 1.2;
  color: #fff;
}

.calc-form__lead {
  margin: 0;
  font-size: calc(15px * var(--ui-scale));
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.72);
}

.calc-form {
  display: flex;
  flex-direction: column;
  gap: calc(16px * var(--ui-scale));
  flex: 1;
}

.calc-form__row--3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.calc-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.calc-field__label {
  font-size: calc(13px * var(--ui-scale));
  font-weight: 500;
  color: rgba(255, 255, 255, 0.78);
}

.calc-field__control {
  position: relative;
  display: block;
}

.calc-field__control input {
  width: 100%;
  height: calc(48px * var(--ui-scale));
  padding: 0 calc(52px * var(--ui-scale)) 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-family: var(--font);
  font-size: calc(15px * var(--ui-scale));
  font-weight: 600;
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.calc-field__control input::placeholder {
  color: rgba(255, 255, 255, 0.4);
  font-weight: 500;
}

.calc-field__control input:focus {
  border-color: rgba(121, 108, 255, 0.7);
  background: rgba(255, 255, 255, 0.12);
}

#calc-inn,
#calc-phone {
  padding-right: 14px;
}

.calc-field__suffix {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: calc(14px * var(--ui-scale));
  font-weight: 600;
  color: rgba(255, 255, 255, 0.55);
  pointer-events: none;
}

.calc-agree {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: calc(13px * var(--ui-scale));
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.78);
  cursor: pointer;
}

.calc-agree input {
  appearance: none;
  -webkit-appearance: none;
  margin-top: 2px;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  border: 1.5px solid rgba(255, 255, 255, 0.55);
  border-radius: 4px;
  background: transparent;
  box-sizing: border-box;
  cursor: pointer;
}

.calc-agree input:checked {
  border-color: #8d82ff;
  background-color: transparent;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath fill='none' stroke='%238d82ff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='M2.5 6.2 4.8 8.5 9.5 3.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 12px 12px;
}

.calc-agree a {
  color: #a99bff;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.calc-form__submit {
  width: 100%;
  margin-top: 4px;
}

.calc-form__submit.is-loading {
  opacity: 0.7;
  pointer-events: none;
}

.calc-form__secure {
  margin: auto 0 0;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  font-size: calc(12px * var(--ui-scale));
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.55);
  text-align: left;
}

.calc-form__secure img {
  width: 16px;
  height: 16px;
  object-fit: contain;
}

.calc-form__error {
  margin: 0;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(255, 80, 80, 0.15);
  color: #ffb4b4;
  font-size: 13px;
  line-height: 1.4;
}

.calc-form__error[hidden] {
  display: none !important;
}

/* Calc modal */
.calc-modal[hidden] {
  display: none !important;
}

.calc-modal {
  position: fixed;
  inset: 0;
  z-index: 220;
  display: grid;
  place-items: center;
  padding: 24px;
}

.calc-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(6px);
}

.calc-modal__dialog {
  position: relative;
  z-index: 1;
  width: min(480px, 100%);
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
  overflow: hidden;
}

.calc-modal__close {
  position: absolute;
  top: 10px;
  right: 14px;
  width: 40px;
  height: 40px;
  font-size: 28px;
  line-height: 1;
  color: #181a21;
  opacity: 0.55;
}

.calc-modal__close:hover {
  opacity: 1;
}

.calc-modal__body {
  padding: 32px 28px 28px;
}

.calc-modal__badge {
  display: inline-flex;
  padding: 6px 12px;
  border-radius: 999px;
  background: #695bfa14;
  color: #695bfa;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.calc-modal__title {
  margin: 0 0 10px;
  font-size: 24px;
  font-weight: 800;
  line-height: 1.2;
  color: #181a21;
}

.calc-modal__text {
  margin: 0 0 20px;
  font-size: 15px;
  line-height: 1.45;
  color: #626572;
}

.calc-modal__stats {
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
  display: grid;
  gap: 10px;
}

.calc-modal__stats li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #f7f6fb;
}

.calc-modal__stats span {
  font-size: 13px;
  color: #626572;
}

.calc-modal__stats strong {
  font-size: 16px;
  font-weight: 800;
  color: #181a21;
  white-space: nowrap;
}

.calc-modal__stats strong.is-accent {
  color: #695bfa;
}

.calc-modal__note {
  margin: 0 0 18px;
  font-size: 12px;
  line-height: 1.4;
  color: #8a8b98;
}

.calc-modal__ok {
  width: 100%;
}

/* --------------------------------------------------------------------------
   How it works — «Как это работает»
   -------------------------------------------------------------------------- */

.section--how {
  background: #fbfafc;
  padding: clamp(64px, 8vw, calc(100px * var(--ui-scale))) 0 calc(80px * var(--ui-scale));
}

.how__header {
  max-width: calc(720px * var(--ui-scale));
  margin-bottom: clamp(24px, 3vw, calc(36px * var(--ui-scale)));
}

.how-badge {
  display: inline-flex;
  align-items: center;
  padding: calc(8px * var(--ui-scale)) calc(14px * var(--ui-scale));
  border-radius: calc(8px * var(--ui-scale));
  background: #695bfa14;
  color: #695bfa;
  font-size: calc(12px * var(--ui-scale));
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: calc(18px * var(--ui-scale));
}

.how__title {
  margin: 0 0 calc(16px * var(--ui-scale));
  font-size: clamp(28px, 3.2vw, calc(42px * var(--ui-scale)));
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: #181a21;
}

.section--how .text-accent {
  color: transparent;
  background: linear-gradient(90deg, #786fd4 0%, #5b6cff 100%);
  -webkit-background-clip: text;
  background-clip: text;
}

.how__lead {
  margin: 0;
  max-width: calc(560px * var(--ui-scale));
  font-size: calc(16px * var(--ui-scale));
  font-weight: 400;
  line-height: 1.35;
  color: #626572;
}

.how-steps {
  --how-gap: calc(20px * var(--ui-scale));
  --how-icon: calc(140px * var(--ui-scale));
  --how-arrow-nudge: calc(14px * var(--ui-scale));
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--how-gap);
  align-items: start;
}

.how-step {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.how-step__visual {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: center;
  margin-bottom: calc(-56px * var(--ui-scale));
  overflow: visible;
}

.how-step__icon {
  position: relative;
  z-index: 2;
  width: var(--how-icon);
  height: var(--how-icon);
  border-radius: 50%;
  object-fit: contain;
  display: block;
}

.how-step__arrow {
  position: absolute;
  left: calc(50% + (var(--how-icon) / 2) + var(--how-arrow-nudge));
  top: 50%;
  width: calc(100% - var(--how-icon) + var(--how-gap) - var(--how-arrow-nudge));
  height: auto;
  transform: translateY(-50%);
  object-fit: contain;
  pointer-events: none;
  z-index: 1;
}

.how-step__card {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: calc(12px * var(--ui-scale));
  width: 100%;
  min-height: calc(246px * var(--ui-scale));
  padding: calc(40px * var(--ui-scale)) calc(20px * var(--ui-scale)) calc(20px * var(--ui-scale));
  border-radius: calc(12px * var(--ui-scale));
  background: #ffffff;
  box-shadow: 2px 2px 16.6px 0 #8d82ff40;
  box-sizing: border-box;
}

.how-step__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: calc(42px * var(--ui-scale));
  height: calc(42px * var(--ui-scale));
  border-radius: calc(10px * var(--ui-scale));
  background: #eeebff;
  font-size: calc(14px * var(--ui-scale));
  font-weight: 700;
  color: #695bfa;
  line-height: 1;
}

.how-step__title {
  margin: 0;
  font-family: var(--font);
  font-size: calc(22px * var(--ui-scale));
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: 0;
  color: #181a21;
}

.how-step__text {
  margin: 0;
  font-family: var(--font);
  font-size: calc(16px * var(--ui-scale));
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: 0;
  color: #626572;
}

/* --------------------------------------------------------------------------
   Why — «Почему выбирают нас»
   -------------------------------------------------------------------------- */

.section--why {
  background: #ffffff;
  padding: clamp(64px, 8vw, calc(100px * var(--ui-scale))) 0 calc(80px * var(--ui-scale));
  color: #181a21;
}

.why__header {
  max-width: calc(720px * var(--ui-scale));
  margin-bottom: clamp(28px, 3.5vw, calc(40px * var(--ui-scale)));
}

.why-badge {
  display: inline-flex;
  align-items: center;
  padding: calc(8px * var(--ui-scale)) calc(14px * var(--ui-scale));
  border-radius: calc(8px * var(--ui-scale));
  background: #695bfa14;
  color: #695bfa;
  font-size: calc(12px * var(--ui-scale));
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: calc(18px * var(--ui-scale));
}

.why__title {
  margin: 0 0 calc(16px * var(--ui-scale));
  font-size: clamp(28px, 3.2vw, calc(42px * var(--ui-scale)));
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: #181a21;
}

.section--why .text-accent {
  color: transparent;
  background: linear-gradient(90deg, #786fd4 0%, #5b6cff 100%);
  -webkit-background-clip: text;
  background-clip: text;
}

.why__lead {
  margin: 0;
  max-width: calc(640px * var(--ui-scale));
  font-size: calc(16px * var(--ui-scale));
  font-weight: 400;
  line-height: 1.35;
  color: #626572;
}

.why-points {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: calc(28px * var(--ui-scale)) calc(32px * var(--ui-scale));
  padding: calc(36px * var(--ui-scale)) calc(40px * var(--ui-scale));
  border-radius: calc(16px * var(--ui-scale));
  border: 1px solid #e9e4ff;
  background: linear-gradient(180deg, #ffffff 0%, #faf8ff 100%);
  margin-bottom: calc(28px * var(--ui-scale));
}

.why-point {
  display: flex;
  align-items: flex-start;
  gap: calc(12px * var(--ui-scale));
  min-width: 0;
}

.why-point__icon {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: calc(30px * var(--ui-scale));
  height: calc(30px * var(--ui-scale));
  border-radius: 50%;
  background: #8d82ff33;
}

.why-point__icon img {
  width: calc(16px * var(--ui-scale));
  height: calc(16px * var(--ui-scale));
  object-fit: contain;
}

.why-point__text {
  margin: 0;
  font-family: var(--font);
  font-size: calc(16px * var(--ui-scale));
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: 0;
  color: #181a21;
  padding-top: calc(6px * var(--ui-scale));
}

.why-benefits {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: calc(20px * var(--ui-scale));
  margin-bottom: calc(48px * var(--ui-scale));
}

.why-benefit {
  display: flex;
  align-items: center;
  gap: calc(18px * var(--ui-scale));
  min-height: calc(120px * var(--ui-scale));
  padding: calc(20px * var(--ui-scale));
  border-radius: calc(8px * var(--ui-scale));
  border: 1px solid #e9e4ff;
  background: #ffffff;
  box-sizing: border-box;
}

.why-benefit__bar {
  flex: 0 0 auto;
  width: 4px;
  height: calc(80px * var(--ui-scale));
  border-radius: 20px;
  background: linear-gradient(180deg, #786fd4 0%, #e1deff 100%);
}

.why-benefit__body {
  display: flex;
  flex-direction: column;
  gap: calc(8px * var(--ui-scale));
  min-width: 0;
}

.why-benefit__value {
  font-family: var(--font);
  font-size: calc(42px * var(--ui-scale));
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0;
  color: transparent;
  background: linear-gradient(90deg, #786fd4 0%, #e1deff 100%);
  -webkit-background-clip: text;
  background-clip: text;
}

.why-benefit__label {
  margin: 0;
  font-family: var(--font);
  font-size: calc(14px * var(--ui-scale));
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0;
  color: rgba(98, 101, 114, 0.6);
}

.why-cta {
  display: flex;
  align-items: center;
  gap: calc(28px * var(--ui-scale)) calc(24px * var(--ui-scale));
  min-height: calc(166px * var(--ui-scale));
  padding: calc(28px * var(--ui-scale)) calc(36px * var(--ui-scale));
  border-radius: calc(16px * var(--ui-scale));
  background-color: #0b1020;
  background-image: var(--why-cta-bg);
  background-size: cover;
  background-position: center;
  box-sizing: border-box;
  overflow: hidden;
}

.why-cta__title {
  margin: 0;
  flex: 0 1 calc(300px * var(--ui-scale));
  max-width: calc(320px * var(--ui-scale));
  font-family: var(--font);
  font-size: calc(26px * var(--ui-scale));
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0;
  color: #ffffff;
}

.why-cta__form {
  display: flex;
  align-items: flex-start;
  flex: 1 1 auto;
  gap: calc(16px * var(--ui-scale));
  min-width: 0;
  flex-wrap: wrap;
}

.why-cta__field {
  display: flex;
  flex-direction: column;
  gap: calc(10px * var(--ui-scale));
  flex: 0 0 calc(220px * var(--ui-scale));
  min-width: 0;
}

.why-cta__label {
  font-family: var(--font);
  font-size: calc(14px * var(--ui-scale));
  font-weight: 500;
  line-height: 1;
  color: #ffffff;
}

.why-cta__input {
  width: 100%;
  height: calc(46px * var(--ui-scale));
  padding: calc(12px * var(--ui-scale));
  border: 0;
  border-radius: calc(8px * var(--ui-scale));
  background: #d9d9d933;
  color: #ffffff;
  font-family: var(--font);
  font-size: calc(14px * var(--ui-scale));
  font-weight: 400;
  line-height: 1.2;
  outline: none;
  box-sizing: border-box;
}

.why-cta__input::placeholder {
  color: rgba(255, 255, 255, 0.45);
}

.why-cta__input:focus {
  box-shadow: 0 0 0 1px rgba(141, 130, 255, 0.7);
}

.why-cta__actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: calc(10px * var(--ui-scale));
  flex: 0 0 calc(377px * var(--ui-scale));
  width: calc(377px * var(--ui-scale));
  max-width: 100%;
  margin-left: calc(12px * var(--ui-scale));
  /* label 14px + field gap 10px — кнопка на одной линии с инпутами */
  padding-top: calc(24px * var(--ui-scale));
}

.why-cta__submit {
  width: 100%;
  height: calc(46px * var(--ui-scale));
  min-height: calc(46px * var(--ui-scale));
  border-radius: calc(12px * var(--ui-scale));
  padding: calc(10px * var(--ui-scale));
  gap: 10px;
  font-size: calc(15px * var(--ui-scale));
}

.why-cta__submit.is-loading {
  opacity: 0.7;
  pointer-events: none;
}

.why-cta__agree {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: calc(12px * var(--ui-scale));
  line-height: 1.25;
  color: rgba(255, 255, 255, 0.72);
  cursor: pointer;
}

.why-cta__agree input {
  appearance: none;
  -webkit-appearance: none;
  margin-top: 1px;
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  border: 1.5px solid rgba(255, 255, 255, 0.55);
  border-radius: 4px;
  background: transparent;
  box-sizing: border-box;
  cursor: pointer;
}

.why-cta__agree input:checked {
  border-color: #8d82ff;
  background-color: transparent;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath fill='none' stroke='%238d82ff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='M2.5 6.2 4.8 8.5 9.5 3.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 12px 12px;
}

.why-cta__agree a {
  color: #ffffff;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.why-cta__error {
  flex: 1 0 100%;
  margin: 0;
  font-size: calc(13px * var(--ui-scale));
  line-height: 1.3;
  color: #ff8f8f;
}

.site-footer-wrap {
  background: #fbfafc;
}

.site-footer {
  position: relative;
  overflow: hidden;
  margin: 0;
  padding: calc(48px * var(--ui-scale)) 0 calc(28px * var(--ui-scale));
  border-radius: 8px 8px 0 0;
  background-color: #0b1020;
  background-image: var(--footer-bg);
  background-size: cover;
  background-position: center right;
  color: #ffffff;
}

.site-footer__inner {
  position: relative;
  z-index: 1;
}

.site-footer__grid {
  display: grid;
  grid-template-columns: minmax(140px, 0.9fr) minmax(120px, 0.7fr) minmax(140px, 0.85fr) minmax(220px, 1.2fr);
  gap: calc(28px * var(--ui-scale)) calc(32px * var(--ui-scale));
  align-items: start;
  margin-bottom: calc(36px * var(--ui-scale));
}

.site-footer__brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #ffffff;
  text-decoration: none;
}

.site-footer__logo-icon {
  display: grid;
  place-items: center;
  color: #fff;
}

.site-footer__logo-text {
  font-weight: 800;
  font-size: calc(18px * var(--ui-scale));
  letter-spacing: 0.06em;
}

.site-footer__heading {
  margin: 0 0 calc(16px * var(--ui-scale));
  font-family: var(--font);
  font-size: calc(16px * var(--ui-scale));
  font-weight: 700;
  line-height: 1.2;
  color: #ffffff;
}

.site-footer__links,
.site-footer__contacts {
  display: flex;
  flex-direction: column;
  gap: calc(10px * var(--ui-scale));
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer__links a,
.site-footer__contacts a {
  color: rgba(255, 255, 255, 0.78);
  font-size: calc(14px * var(--ui-scale));
  line-height: 1.3;
  text-decoration: none;
  transition: color 0.2s ease;
}

.site-footer__links a:hover,
.site-footer__contacts a:hover {
  color: #ffffff;
}

.site-footer__contacts li {
  color: rgba(255, 255, 255, 0.78);
  font-size: calc(14px * var(--ui-scale));
  line-height: 1.3;
}

.site-footer__cta-title {
  margin: 0 0 calc(10px * var(--ui-scale));
  font-family: var(--font);
  font-size: calc(18px * var(--ui-scale));
  font-weight: 700;
  line-height: 1.25;
  color: #ffffff;
  max-width: calc(320px * var(--ui-scale));
}

.site-footer__cta-text {
  margin: 0 0 calc(18px * var(--ui-scale));
  max-width: calc(320px * var(--ui-scale));
  font-size: calc(14px * var(--ui-scale));
  font-weight: 400;
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.7);
}

.site-footer__cta-btn {
  display: inline-flex;
  min-height: calc(44px * var(--ui-scale));
  padding: calc(10px * var(--ui-scale)) calc(22px * var(--ui-scale));
  border-radius: calc(12px * var(--ui-scale));
}

.site-footer__copy {
  margin: 0;
  padding-top: calc(20px * var(--ui-scale));
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  text-align: center;
  font-size: calc(13px * var(--ui-scale));
  line-height: 1.3;
  color: rgba(255, 255, 255, 0.45);
}

/* --------------------------------------------------------------------------
   FAQ
   -------------------------------------------------------------------------- */

.section--faq {
  background: #fbfafc;
  padding: clamp(64px, 8vw, calc(100px * var(--ui-scale))) 0 clamp(48px, 6vw, calc(72px * var(--ui-scale)));
  color: #181a21;
}

.faq__header {
  margin-bottom: clamp(28px, 3.5vw, calc(40px * var(--ui-scale)));
}

.faq__title {
  margin: 0;
  font-size: clamp(28px, 3.2vw, calc(42px * var(--ui-scale)));
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: #181a21;
}

.section--faq .text-accent {
  color: transparent;
  background: linear-gradient(90deg, #786fd4 0%, #5b6cff 100%);
  -webkit-background-clip: text;
  background-clip: text;
}

.faq-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: calc(16px * var(--ui-scale));
  align-items: start;
}

.faq-item {
  border: 1px solid #e9e4ff;
  border-radius: calc(8px * var(--ui-scale));
  background: #ffffff;
  overflow: hidden;
  transition: box-shadow 0.25s var(--ease), border-color 0.25s ease;
}

.faq-item.is-open {
  box-shadow: 0 8px 24px rgba(141, 130, 255, 0.12);
  border-color: #d7d0ff;
}

.faq-item__trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: calc(12px * var(--ui-scale));
  width: 100%;
  min-height: calc(51px * var(--ui-scale));
  padding: calc(14px * var(--ui-scale)) calc(16px * var(--ui-scale));
  text-align: left;
  cursor: pointer;
}

.faq-item__question {
  font-family: var(--font);
  font-size: calc(15px * var(--ui-scale));
  font-weight: 500;
  line-height: 1.25;
  color: #181a21;
}

.faq-item__icon {
  position: relative;
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
}

.faq-item__icon::before,
.faq-item__icon::after {
  content: "";
  position: absolute;
  inset: 50% auto auto 50%;
  width: 12px;
  height: 2px;
  border-radius: 2px;
  background: #695bfa;
  transform: translate(-50%, -50%);
  transition: transform 0.25s var(--ease), opacity 0.2s ease;
}

.faq-item__icon::after {
  transform: translate(-50%, -50%) rotate(90deg);
}

.faq-item.is-open .faq-item__icon::before {
  transform: translate(-50%, -50%) rotate(180deg);
}

.faq-item.is-open .faq-item__icon::after {
  opacity: 0;
  transform: translate(-50%, -50%) rotate(180deg);
}

.faq-item__panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.32s var(--ease);
}

.faq-item.is-open .faq-item__panel {
  grid-template-rows: 1fr;
}

.faq-item__panel-inner {
  overflow: hidden;
  min-height: 0;
}

.faq-item__answer {
  margin: 0;
  padding: 0 calc(16px * var(--ui-scale)) calc(16px * var(--ui-scale));
  font-size: calc(14px * var(--ui-scale));
  font-weight: 400;
  line-height: 1.45;
  color: #626572;
}

/* --------------------------------------------------------------------------
   Services — «Какие услуги мы предлагаем»
   -------------------------------------------------------------------------- */

.section--services {
  background: #fbfafc;
  padding: clamp(64px, 8vw, calc(100px * var(--ui-scale))) 0;
  color: #181a21;
}

.services__header {
  max-width: calc(720px * var(--ui-scale));
  margin-bottom: clamp(36px, 5vw, calc(48px * var(--ui-scale)));
}

.services-badge {
  display: inline-flex;
  align-items: center;
  padding: calc(8px * var(--ui-scale)) calc(14px * var(--ui-scale));
  border-radius: calc(8px * var(--ui-scale));
  background: #695bfa14;
  color: #695bfa;
  font-size: calc(12px * var(--ui-scale));
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: calc(18px * var(--ui-scale));
}

.services__title {
  margin: 0 0 calc(16px * var(--ui-scale));
  font-size: clamp(28px, 3.2vw, calc(42px * var(--ui-scale)));
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: #181a21;
}

.section--services .text-accent {
  color: transparent;
  background: linear-gradient(90deg, #786fd4 0%, #5b6cff 100%);
  -webkit-background-clip: text;
  background-clip: text;
}

.services__lead {
  margin: 0;
  max-width: calc(640px * var(--ui-scale));
  font-size: calc(16px * var(--ui-scale));
  font-weight: 400;
  line-height: 1.35;
  color: #626572;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: calc(24px * var(--ui-scale));
}

.service-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: calc(28px * var(--ui-scale));
  align-items: center;
  padding: calc(32px * var(--ui-scale)) calc(32px * var(--ui-scale));
  background: #ffffff;
  border: 0;
  border-radius: calc(12px * var(--ui-scale));
  box-sizing: border-box;
  min-height: calc(280px * var(--ui-scale));
}

.service-card__icon {
  flex-shrink: 0;
  width: calc(200px * var(--ui-scale));
  height: calc(200px * var(--ui-scale));
  border-radius: 115px;
  overflow: hidden;
}

.service-card__icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 115px;
}

.service-card__content {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: calc(12px * var(--ui-scale));
}

.service-card__title {
  margin: 0;
  font-size: calc(22px * var(--ui-scale));
  font-weight: 600;
  line-height: 1.2;
  color: #181a21;
}

.service-card__text {
  margin: 0;
  font-size: calc(16px * var(--ui-scale));
  font-weight: 400;
  line-height: 1.4;
  color: #626572;
}

/* --------------------------------------------------------------------------
   Video modal
   -------------------------------------------------------------------------- */

.video-modal[hidden] {
  display: none !important;
}

.video-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 24px;
}

.video-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(6px);
}

.video-modal__dialog {
  position: relative;
  z-index: 1;
  width: min(920px, 100%);
  background: #0d0e16;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
}

.video-modal__close {
  position: absolute;
  top: 10px;
  right: 14px;
  z-index: 2;
  width: 40px;
  height: 40px;
  font-size: 28px;
  line-height: 1;
  color: #fff;
  opacity: 0.8;
}

.video-modal__close:hover {
  opacity: 1;
}

.video-modal__body {
  aspect-ratio: 16 / 9;
  background: #000;
}

.video-modal__player {
  width: 100%;
  height: 100%;
  display: block;
  background: #000;
}

.video-modal__empty {
  height: 100%;
  display: grid;
  place-items: center;
  padding: 32px;
  text-align: center;
  color: rgba(255, 255, 255, 0.7);
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 1280px) {
  :root {
    --side-gap: 32px;
    --hero-visual-w: calc(520px * var(--ui-scale));
  }

  .hero__grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.95fr);
  }

  .hero__content {
    max-width: none;
  }

  .hero-visual {
    max-width: 100%;
    width: min(100%, var(--hero-visual-w));
  }

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

  .when-card {
    min-height: calc(245px * var(--ui-scale));
  }
}

@media (max-width: 1100px) {
  .calc-grid {
    grid-template-columns: 1fr;
  }

  .calc-card {
    min-height: 0;
  }

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

  .how-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: 48px;
  }

  .how-step__arrow {
    display: none;
  }

  .why-points {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 28px 24px;
    gap: 22px 20px;
  }

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

  .why-cta {
    flex-wrap: wrap;
    gap: 22px;
    padding: 28px 24px;
  }

  .why-cta__title {
    flex: 1 1 240px;
    max-width: none;
  }

  .why-cta__form {
    flex: 1 1 100%;
  }

  .why-cta__field {
    flex: 1 1 180px;
  }

  .why-cta__actions {
    flex: 1 1 280px;
    width: auto;
    margin-left: 8px;
  }

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

  .site-footer__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px 24px;
  }

  .site-footer__brand {
    grid-column: 1 / -1;
  }

  .site-footer__cta {
    grid-column: 1 / -1;
  }
}

@media (max-width: 960px) {
  :root {
    --ui-scale: 1;
    --side-gap: 20px;
  }

  .site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
  }

  .site-header__cta {
    display: none;
  }

  .nav-toggle {
    display: inline-flex;
    margin-left: auto;
    position: relative;
    z-index: 101;
  }

  .site-nav-backdrop {
    position: fixed;
    inset: 0;
    z-index: 98;
    background: rgba(5, 6, 14, 0.55);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s var(--ease);
  }

  .site-nav-backdrop.is-open {
    opacity: 1;
    pointer-events: auto;
  }

  .site-nav {
    position: fixed;
    top: calc(var(--header-h) + 10px);
    left: 16px;
    right: 16px;
    width: auto;
    justify-self: stretch;
    padding: 0;
    background: transparent;
    border: 0;
    transform: translateY(-18px) scale(0.98);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.35s var(--ease), opacity 0.28s var(--ease);
    z-index: 100;
  }

  .admin-bar .site-nav {
    top: calc(var(--header-h) + 32px + 10px);
  }

  .site-nav.is-open {
    transform: translateY(0) scale(1);
    opacity: 1;
    pointer-events: auto;
  }

  .site-nav__inner {
    display: block;
    padding: 12px 12px 18px;
    border-radius: 20px;
    background:
      linear-gradient(165deg, rgba(48, 40, 92, 0.55) 0%, rgba(12, 12, 22, 0.2) 42%, transparent 70%),
      linear-gradient(180deg, rgba(18, 16, 32, 0.97) 0%, rgba(8, 9, 16, 0.98) 100%);
    border: 1px solid rgba(141, 130, 255, 0.28);
    box-shadow:
      0 24px 60px rgba(0, 0, 0, 0.45),
      inset 0 1px 0 rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
  }

  .nav-menu {
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
  }

  .nav-menu__item {
    opacity: 0;
    transform: translateY(10px);
  }

  .site-nav.is-open .nav-menu__item {
    animation: factoring-nav-item-in 0.38s var(--ease) forwards;
  }

  .site-nav.is-open .nav-menu__item:nth-child(1) { animation-delay: 0.04s; }
  .site-nav.is-open .nav-menu__item:nth-child(2) { animation-delay: 0.08s; }
  .site-nav.is-open .nav-menu__item:nth-child(3) { animation-delay: 0.12s; }
  .site-nav.is-open .nav-menu__item:nth-child(4) { animation-delay: 0.16s; }
  .site-nav.is-open .nav-menu__item:nth-child(5) { animation-delay: 0.2s; }
  .site-nav.is-open .nav-menu__item:nth-child(6) { animation-delay: 0.24s; }

  .nav-menu__link {
    display: block;
    padding: 14px 14px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.88);
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
  }

  .nav-menu__link:hover,
  .nav-menu__link:focus-visible {
    background: rgba(141, 130, 255, 0.14);
    color: #ffffff;
  }

  .nav-menu__link:active {
    transform: scale(0.98);
  }

  .site-nav__cta {
    display: inline-flex;
    width: 100%;
    margin-top: 12px;
    min-height: 48px;
    border-radius: 12px;
    font-size: 15px;
    opacity: 0;
    transform: translateY(10px);
  }

  .site-nav.is-open .site-nav__cta {
    animation: factoring-nav-item-in 0.38s var(--ease) 0.22s forwards;
  }

  body.nav-open {
    overflow: hidden;
  }

  @keyframes factoring-nav-item-in {
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  .hero {
    display: block;
    min-height: auto;
    padding: calc(var(--header-h) + 8px) 0 36px;
  }

  .hero__container {
    display: block;
    justify-content: flex-start;
    gap: 0;
  }

  .hero__grid {
    display: block;
    position: static;
    min-height: 0;
  }

  .hero__content {
    position: relative;
    z-index: 2;
    max-width: none;
    min-height: 0;
    padding-top: 0;
  }

  /* Макет 375: calculator left 211 / top 198 / 221x203 — относительно .hero */
  .hero__visual {
    position: absolute;
    z-index: 1;
    top: 114px;
    left: 179px;
    width: 221px;
    height: 203px;
    padding-top: 0;
    pointer-events: none;
    justify-content: flex-start;
    align-items: flex-start;
  }

  .hero-visual {
    width: 221px;
    height: 203px;
    aspect-ratio: 221 / 203;
  }

  .hero-visual__img {
    width: 221px;
    height: 203px;
    max-width: none;
    aspect-ratio: 221 / 203;
    object-fit: contain;
    animation: none;
    will-change: auto;
  }

  .hero-visual__glow {
    opacity: 0.8;
    animation: none;
  }

  .hero-badge {
    margin-top: 0;
    margin-bottom: 14px;
  }

  /* Title поверх калькулятора: 335x136, Manrope 500 / 28 / 120% */
  .hero__title {
    width: 335px;
    max-width: 100%;
    margin: 0 0 12px;
    font-weight: 500;
    font-size: 28px;
    line-height: 120%;
    letter-spacing: 0;
  }

  /* Bullets: 217 wide, Manrope 400 / 14 / 100% */
  .hero-list {
    width: 217px;
    max-width: 100%;
    gap: 10px;
    margin-bottom: 22px;
  }

  .hero-list__item {
    font-weight: 400;
    font-size: 14px;
    line-height: 100%;
    color: rgba(255, 255, 255, 0.78);
  }

  .hero-list__item img {
    margin-top: 0;
  }

  .hero__actions {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
    margin-top: 8px;
  }

  .btn--lg {
    width: 100%;
  }

  .hero-play {
    justify-content: flex-start;
  }

  .hero-stats {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    margin-top: 28px;
    margin-right: -20px;
    padding-right: 20px;
    scrollbar-width: none;
  }

  .hero-stats::-webkit-scrollbar {
    display: none;
  }

  .hero-stat {
    flex: 0 0 min(78%, 280px);
    scroll-snap-align: start;
  }

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

  .when-card {
    min-height: 0;
    gap: 16px;
    padding: 24px 18px 20px;
  }

  .when-card__body {
    margin-top: -12px;
    padding-right: 28px;
  }

  .when-card__title {
    font-size: 20px;
    line-height: 1.2;
  }

  .when-card__text {
    font-size: 16px;
    line-height: 1.3;
  }

  .when-card__num {
    font-size: 48px;
    top: 0;
    opacity: 0.9;
  }

  /* На мобилке сначала 3 карточки */
  .when:not(.is-expanded) .when-card--extra {
    display: none;
  }

  .when__more {
    display: inline-flex;
  }

  .when__more[hidden] {
    display: none !important;
  }

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

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

  .calc-card {
    min-height: 0;
  }

  .calc-form__row--3 {
    grid-template-columns: 1fr;
  }

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

  .calc-card--conditions,
  .calc-card--form {
    padding: 28px 20px 24px;
  }

  .calc-card__title,
  .calc-form__title {
    font-size: 28px;
    text-align: left;
  }

  .how-steps {
    display: flex;
    align-items: stretch;
    --how-gap: 28px;
    --how-icon: 112px;
    --how-arrow-nudge: 8px;
    gap: var(--how-gap);
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    margin-right: -20px;
    margin-left: -6px;
    padding: 8px 20px 28px 6px;
    scrollbar-width: none;
  }

  .how-steps::-webkit-scrollbar {
    display: none;
  }

  .how-step {
    flex: 0 0 min(78%, 280px);
    scroll-snap-align: start;
    height: auto;
    overflow: visible;
  }

  .how-step__card {
    flex: 1;
    min-height: 0;
  }

  .how-step__visual {
    margin-bottom: -40px;
  }

  .how-step__arrow {
    display: block;
  }

  .why__header {
    margin-bottom: 24px;
  }

  .why-points {
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 24px 18px;
    margin-bottom: 20px;
  }

  .why-point__text {
    line-height: 1.25;
    padding-top: 5px;
  }

  .why-benefits {
    display: flex;
    align-items: stretch;
    gap: 12px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    margin-right: -20px;
    margin-left: -6px;
    margin-bottom: 28px;
    padding: 4px 20px 12px 6px;
    scrollbar-width: none;
  }

  .why-benefits::-webkit-scrollbar {
    display: none;
  }

  .why-benefit {
    flex: 0 0 min(78%, 280px);
    scroll-snap-align: start;
    min-height: 100px;
  }

  .why-benefit__value {
    font-size: 36px;
  }

  .why-cta {
    flex-direction: column;
    align-items: stretch;
    gap: 20px;
    min-height: 0;
    padding: 24px 18px;
    background-image: var(--why-cta-bg-mobile);
  }

  .why-cta__title {
    flex: none;
    max-width: none;
    font-size: 22px;
    line-height: 1.3;
  }

  .why-cta__form {
    flex-direction: column;
    align-items: center;
    gap: 14px;
  }

  .why-cta__field,
  .why-cta__actions {
    flex: none;
    width: 100%;
    max-width: 295px;
  }

  .why-cta__actions {
    flex-direction: column-reverse;
    margin-left: 0;
    padding-top: 0;
  }

  .why-cta__input {
    width: 100%;
  }

  .why-cta__submit {
    height: 44px;
  }

  .faq__header {
    margin-bottom: 24px;
  }

  .faq-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .faq-item__question {
    font-size: 14px;
  }

  .site-footer {
    padding: 28px 0 20px;
    border-radius: 8px 8px 0 0;
    background-image: var(--footer-bg-mobile);
    background-position: center;
  }

  .site-footer__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px 16px;
    margin-bottom: 28px;
  }

  .site-footer__brand {
    grid-column: 1 / -1;
  }

  .site-footer__col--nav,
  .site-footer__col--contacts {
    grid-column: auto;
  }

  .site-footer__cta {
    grid-column: 1 / -1;
  }

  .site-footer__cta-title {
    max-width: none;
    font-size: 18px;
  }

  .site-footer__cta-text {
    max-width: none;
  }

  .site-footer__cta-btn {
    width: 100%;
  }

  .service-card {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 20px;
    min-height: 0;
    align-items: start;
    justify-items: start;
  }

  .service-card__icon {
    width: 140px;
    height: 140px;
    border-radius: 115px;
  }

  .service-card__content {
    width: 100%;
    align-items: flex-start;
    text-align: left;
  }

  .service-card__title {
    font-size: 18px;
    text-align: left;
  }

  .service-card__text {
    font-size: 14px;
    text-align: left;
  }
}

@media (max-width: 640px) {
  :root {
    --header-h: 68px;
    --ui-scale: 1;
    --side-gap: 20px;
  }

  .hero {
    padding-top: calc(var(--header-h) + 8px);
    padding-bottom: 36px;
    min-height: auto;
  }

  .hero-badge {
    font-size: 12px;
    padding: 8px 14px 8px 10px;
    margin-top: 0;
    margin-bottom: 12px;
  }

  .hero__visual {
    top: 114px;
    left: 179px;
    right: auto;
    width: 221px;
    height: 203px;
  }

  .hero__title {
    width: 335px;
    max-width: calc(100vw - 40px);
    font-weight: 500;
    font-size: 28px;
    line-height: 120%;
    letter-spacing: 0;
  }

  .hero-list {
    width: 217px;
  }

  .hero-list__item {
    font-weight: 400;
    font-size: 14px;
    line-height: 100%;
  }

  .hero-play__icon {
    width: 40px;
    height: 40px;
  }

  .hero-play__text {
    font-size: 15px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.85);
  }

  .hero-stat {
    flex-basis: min(82%, 260px);
    padding: 16px;
  }

  .hero-stat__value {
    font-size: 18px;
  }
}

@media (max-width: 375px) {
  .hero__visual {
    top: 114px;
    left: 179px;
  }
}

@media (max-height: 820px) and (min-width: 961px) {
  .hero-visual {
    width: min(var(--hero-visual-w), 62vh);
  }

  .hero-visual__img {
    width: 100%;
  }

  .hero__title {
    font-size: clamp(30px, 3.6vw, calc(48px * var(--ui-scale)));
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-visual__img,
  .hero-visual__glow {
    animation: none;
  }

  html {
    scroll-behavior: auto;
  }
}