/* Страница «Как купить» — editorial process layout (референс OUR PROCESS) */

.nfs-how-to-buy-page {
  background: #fafaf9;
  color: #1c1917;
}

.nfs-how-to-buy-page main {
  background: #fafaf9;
}

.nfs-buy-page {
  width: 100%;
}

.nfs-buy-page__shell {
  min-height: calc(100svh - 120px);
  max-width: 1280px;
  margin: 0 auto;
  padding: 48px 24px 80px;
  color: #1c1917;
  display: grid;
  place-content: start center;
  gap: 0;
}

@media (min-width: 1280px) {
  .nfs-buy-page__shell {
    padding-left: 48px;
    padding-right: 48px;
  }
}

/* Intro */
.nfs-buy-intro {
  max-width: 720px;
  margin: 0 auto 56px;
  text-align: center;
}

.nfs-buy-intro__eyebrow {
  margin: 0 0 12px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #78716c;
}

.nfs-buy-intro__title {
  margin: 0 0 20px;
  font-size: clamp(2rem, 4.5vw, 3rem);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.02em;
  color: #1c1917;
}

.nfs-buy-intro__accent {
  background: linear-gradient(135deg, var(--nfs-blue, #1a5fd9), var(--nfs-red, #ed1c24));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nfs-buy-intro__lead {
  margin: 0;
  font-size: clamp(1rem, 2vw, 1.125rem);
  line-height: 1.65;
  color: #57534e;
}

/* Sticky stack — карточки с blur наезжают при скролле */
.nfs-buy-process {
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
}

.nfs-buy-phases-stack {
  position: relative;
  width: 100%;
  perspective: 1000px;
  padding: 48px 0 12vh;
}

@media (min-width: 768px) {
  .nfs-buy-phases-stack {
    /* Доп. высота прокрутки после последней карточки */
    padding-bottom: 35vh;
  }
}

.nfs-buy-phase-card {
  --stack-top: calc(20px + var(--nfs-stack-i, 0) * 10px);
  --stack-depth: calc(20px + var(--nfs-stack-i, 0) * 10px);
  position: sticky;
  top: var(--stack-top);
  z-index: calc(var(--nfs-stack-i, 0) + 1);
  margin-bottom: 16px;
  padding: 32px;
  border-radius: 16px;
  border: 1px solid rgba(231, 229, 228, 0.9);
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow:
    0 4px 6px rgba(28, 25, 23, 0.04),
    0 12px 32px rgba(28, 25, 23, 0.08);
  backface-visibility: hidden;
  transform: translateZ(var(--stack-depth));
  will-change: transform;
}

.nfs-buy-phase-card:last-child {
  margin-bottom: 0;
}

@media (min-width: 768px) {
  .nfs-buy-phase-card {
    /* ~55vh прокрутки на каждый этап — карточка «наезжает» на предыдущую */
    margin-bottom: calc(55vh - var(--stack-top) - 80px);
  }

  .nfs-buy-phase-card:last-child {
    margin-bottom: 0;
  }
}

.nfs-buy-phase-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.nfs-buy-phase-card__head-main {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
}

.nfs-buy-phase-card__icon {
  flex-shrink: 0;
  font-size: 1.25rem;
  line-height: 1.4;
}

.nfs-buy-phase-card__title {
  margin: 0;
  font-size: clamp(1.125rem, 2.2vw, 1.375rem);
  font-weight: 700;
  line-height: 1.35;
  color: #1c1917;
}

.nfs-buy-phase-card__num {
  flex-shrink: 0;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
  color: #d6d3d1;
  font-variant-numeric: tabular-nums;
}

.nfs-buy-phase-card__text {
  margin: 0;
  font-size: 1rem;
  line-height: 1.65;
  color: #57534e;
}

.nfs-buy-phase-split {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-top: 16px;
}

@media (min-width: 560px) {
  .nfs-buy-phase-split {
    grid-template-columns: 1fr 1fr;
  }
}

.nfs-buy-phase-split__item {
  padding: 14px 16px;
  border-radius: 12px;
  font-size: 0.9375rem;
  line-height: 1.5;
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid #e7e5e4;
}

.nfs-buy-phase-split__item strong {
  display: block;
  margin-bottom: 6px;
  font-size: 0.9375rem;
  color: #1c1917;
}

.nfs-buy-phase-split__item p {
  margin: 0;
  color: #57534e;
}

.nfs-buy-phase-split__item--ok {
  border-color: rgba(34, 197, 94, 0.25);
  background: rgba(240, 253, 244, 0.75);
}

.nfs-buy-phase-split__item--no {
  border-color: rgba(239, 68, 68, 0.2);
  background: rgba(254, 242, 242, 0.75);
}

@media (max-width: 767px) {
  .nfs-buy-phases-stack {
    perspective: none;
    min-height: auto;
    padding-top: 24px;
  }

  .nfs-buy-phase-card {
    position: relative;
    top: auto;
    transform: none;
    margin-bottom: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .nfs-buy-phases-stack {
    min-height: auto;
    perspective: none;
  }

  .nfs-buy-phase-card {
    position: relative;
    top: auto;
    transform: none;
  }
}

/* CTA */
.nfs-buy-process__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-top: 48px;
  padding-top: 8px;
}

.nfs-buy-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 24px;
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.nfs-buy-btn--primary {
  background: var(--nfs-blue-g, linear-gradient(90deg, #1a5fd9, #3b7fff));
  color: #fff;
  box-shadow: 0 4px 14px rgba(26, 95, 217, 0.28);
}

.nfs-buy-btn--primary:hover {
  color: #fff;
  transform: translateY(-1px);
}

.nfs-buy-btn--ghost {
  background: #fff;
  color: var(--nfs-blue, #1a5fd9);
  border: 1px solid #d6d3d1;
}

.nfs-buy-btn--ghost:hover {
  background: #f5f5f4;
}

/* Контакты */
.nfs-buy-contact {
  width: 100%;
  max-width: 960px;
  margin: 72px auto 0;
  padding-top: 48px;
  border-top: 1px solid #e7e5e4;
}

.nfs-buy-contact__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
}

.nfs-buy-contact__eyebrow {
  margin: 0 0 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #78716c;
}

.nfs-buy-contact__title {
  margin: 0;
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  font-weight: 800;
  color: #1c1917;
}

.nfs-buy-clocks {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.nfs-buy-clock {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nfs-buy-clock__city {
  font-size: 11px;
  font-weight: 600;
  color: #78716c;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.nfs-buy-clock__time {
  font-size: 1.25rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: #1c1917;
}

.nfs-buy-contact__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

@media (min-width: 900px) {
  .nfs-buy-contact__grid {
    grid-template-columns: 1.1fr 0.9fr;
  }
}

.nfs-buy-contact__form-wrap {
  background: #fff;
  border-radius: 16px;
  border: 1px solid #e7e5e4;
  padding: 24px;
}

.nfs-buy-contact-form .nfs-ds4-modal-inp,
.nfs-buy-contact-select {
  width: 100%;
  margin-bottom: 10px;
}

.nfs-buy-contact-card {
  height: 100%;
  padding: 24px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid #e7e5e4;
}

.nfs-buy-contact-card__icon {
  color: var(--nfs-blue, #1a5fd9);
  margin-bottom: 12px;
}

.nfs-buy-contact-card__title {
  margin: 0 0 8px;
  font-size: 1.125rem;
  font-weight: 700;
}

.nfs-buy-contact-card__text {
  margin: 0 0 16px;
  font-size: 0.9375rem;
  line-height: 1.55;
  color: #57534e;
}

.nfs-buy-contact-card__phone {
  display: block;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--nfs-blue, #1a5fd9);
  text-decoration: none;
  margin-bottom: 6px;
}

.nfs-buy-contact-card__hours {
  margin: 0;
  font-size: 0.875rem;
  color: #78716c;
}

.nfs-buy-messengers {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 20px;
}

.nfs-buy-messenger {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.9375rem;
  text-decoration: none;
  color: #fff;
}

.nfs-buy-messenger--tg {
  background: linear-gradient(135deg, #2aabee, #229ed9);
}

.nfs-buy-messenger--wa {
  background: linear-gradient(135deg, #25d366, #128c7e);
}

.nfs-how-to-buy-page .import-lead-message.success {
  color: #15803d;
}

.nfs-how-to-buy-page .import-lead-message.error {
  color: #b91c1c;
}

.nfs-how-to-buy-page .nfs-import-lead-modal-overlay {
  z-index: 1300;
}
