:root {
  --pearl-core: #fffdf8;
  --pearl-ivory: #fcf5ea;
  --pearl-body: #f2e3ce;
  --pearl-warm: #e6cfb1;
  --pearl-edge: #d0b08d;
  --pearl-edge-dark: #ba9472;
  --pearl-stroke: rgba(250, 239, 224, 0.76);
  --pearl-thread: rgba(223, 191, 152, 0.56);
  --pearl-highlight-shadow: rgba(255, 248, 234, 0.24);
}


/* ======================================================
   Pearl necklace integration
   Отдельный слой для жемчужных нитей.
   Сначала правим только этот файл + js/pearls.js.
   ====================================================== */

html {
  scroll-padding-top: 108px;
}

#fit,
#process,
#support,
#faq,
#contact {
  scroll-margin-top: 108px;
}

/* --- Общий SVG-жемчуг --- */
.pearl-necklace {
  width: min(100vw, 1640px);
  max-width: none;
  margin: 0 auto;
  position: relative;
}

.pearl-necklace-svg {
  width: 100%;
  height: auto;
  display: block;
  overflow: visible;
}

.necklace-guide {
  fill: none;
  stroke: var(--pearl-thread);
  opacity: 0.92;
  stroke-width: 2.2;
  stroke-linecap: round;
}

.small-pearl {
  fill: url(#trustPearlSmall);
  stroke: var(--pearl-stroke);
  stroke-width: 1;
  filter: drop-shadow(0 1px 3px rgba(255,249,240,0.22)) drop-shadow(0 0 3px rgba(255,236,210,0.08));
}

.big-pearl {
  fill: url(#trustPearlBig);
  stroke: rgba(249, 240, 228, 0.82);
  stroke-width: 1.5;
  filter:
    drop-shadow(0 0 10px rgba(255, 244, 228, 0.16))
    drop-shadow(0 6px 18px rgba(0,0,0,0.18));
}

.process-small-pearl {
  fill: url(#processPearlSmall);
}

.process-big-pearl {
  fill: url(#processPearlBig);
}

.pearl-label-title {
  font-size: 21px;
  font-weight: 800;
  fill: #fcf2e6;
  text-anchor: middle;
  font-family: Arial, sans-serif;
  paint-order: stroke;
  stroke: rgba(5, 8, 14, 0.65);
  stroke-width: 3px;
}

.pearl-label-subtitle {
  font-size: 13px;
  fill: rgba(248, 234, 214, 0.84);
  text-anchor: middle;
  font-family: Arial, sans-serif;
  paint-order: stroke;
  stroke: rgba(5, 8, 14, 0.55);
  stroke-width: 2px;
}

.process-label-title {
  font-size: 16px;
  font-weight: 800;
  fill: #fcf2e6;
  text-anchor: middle;
  font-family: Arial, sans-serif;
  paint-order: stroke;
  stroke: rgba(5, 8, 14, 0.72);
  stroke-width: 3px;
}

.process-label-text {
  font-size: 12px;
  fill: rgba(248, 234, 214, 0.86);
  text-anchor: middle;
  font-family: Arial, sans-serif;
  paint-order: stroke;
  stroke: rgba(5, 8, 14, 0.65);
  stroke-width: 2px;
}

/* --- Блок доверия --- */
.trust {
  position: relative;
  padding: 0 0 34px;
  margin-top: 0;
  z-index: 2;
  overflow: hidden;
}

.pearl-necklace-trust {
  width: min(100vw, 1680px);
}

.trust .pearl-necklace-svg {
  min-height: 205px;
}

/* Выключаем старую сеточную нить из первого варианта */
.pearl-line,
.pearl-line::before,
.trust-pearl,
.trust-pearl::before {
  all: unset;
}

/* --- Блок Как это работает --- */
.process {
  padding: 82px clamp(20px,5vw,70px) 62px;
}

.process-desktop.pearl-process {
  position: relative;
  min-height: auto;
  margin: 24px auto 22px;
  width: min(100vw, 1680px);
  max-width: none;
}

.process-desktop.pearl-process .pearl-necklace-svg {
  min-height: 355px;
}

/* старую пунктирную дугу и старые absolute-steps выключаем на всякий случай */
.process-arc,
.process-step {
  display: none !important;
}

@media (max-width: 760px) {
  html {
    scroll-padding-top: 88px;
  }

  #fit,
  #process,
  #support,
  #faq,
  #contact {
    scroll-margin-top: 88px;
  }

  .trust {
    padding: 5px 0 34px;
    margin-top: -18px;
  }

  .trust .pearl-necklace {
    overflow-x: auto;
    padding: 0 18px;
  }

  .trust .pearl-necklace-svg {
    min-width: 880px;
    min-height: 205px;
  }

  .process-desktop.pearl-process {
    display: none;
  }
}


/* ======================================================
   First fold tuning
   Цель: чтобы жемчужная нить была видна уже на первом экране,
   а не пряталась ниже fold.
   ====================================================== */

.hero {
  min-height: clamp(650px, 76vh, 720px);
  padding-top: clamp(105px, 10vh, 126px);
  padding-bottom: 118px;
}

.hero::after {
  height: 170px;
}

h1 {
  font-size: clamp(42px, 4.25vw, 68px);
  line-height: 1.04;
}

.lead {
  font-size: 17px;
}

.hero-actions {
  margin: 26px 0 16px;
}

.micro-note {
  max-width: 470px;
  color: rgba(255,250,242,.76);
}

.hero-art {
  min-height: 440px;
}

.galatea-card {
  height: min(510px, 54vh);
  top: 2%;
}

/* Жемчуг теперь часть первого впечатления, а не следующий экран. */
.trust {
  margin-top: -112px;
  padding-bottom: 32px;
}

.pearl-necklace,
.pearl-necklace-trust,
.process-desktop.pearl-process {
  width: 100vw;
  max-width: none;
}

.trust .pearl-necklace-svg {
  min-height: 220px;
}

/* Чтобы следующий блок не налезал слишком резко после подтяжки жемчуга вверх. */
.fit {
  padding-top: 86px;
}

/* Кнопка “Как это работает” теперь визуально равна ghost-кнопкам. */
.process-link {
  border: 1px solid rgba(255,250,242,.36) !important;
  color: var(--milk) !important;
  border-bottom: 1px solid rgba(255,250,242,.36) !important;
  padding: 13px 22px !important;
}

.process-link:hover {
  border-color: rgba(255,250,242,.58) !important;
}

@media (max-width: 1000px) {
  .hero {
    min-height: auto;
    padding-top: 108px;
    padding-bottom: 105px;
  }

  h1 {
    font-size: clamp(40px, 6.2vw, 62px);
  }

  .hero-art {
    min-height: 340px;
  }

  .trust {
    margin-top: -92px;
  }
}

@media (max-width: 760px) {
  .hero {
    padding-top: 98px;
    padding-bottom: 84px;
  }

  h1 {
    font-size: clamp(36px, 10vw, 44px);
  }

  .hero-art {
    min-height: 300px;
  }

  .trust {
    margin-top: -54px;
  }
}


/* ======================================================
   Anchor + section fit tuning
   Цель: при клике в хедере заголовок блока должен быть выше,
   а крупные блоки должны лучше помещаться в экран.
   ====================================================== */

/* Раньше было 108px — из-за этого блоки вставали слишком низко. */
html {
  scroll-padding-top: 78px;
}

#fit,
#process,
#support,
#faq,
#contact {
  scroll-margin-top: 78px;
}

/* Для "Как это работает" даём меньше верхнего воздуха,
   чтобы заголовок и жемчужная нить попадали в экран лучше. */
.process {
  padding-top: 56px;
  padding-bottom: 48px;
}

.process .section-intro {
  margin-bottom: 18px;
}

.process-desktop.pearl-process {
  margin-top: 6px;
  margin-bottom: 8px;
}

.process-desktop.pearl-process .pearl-necklace-svg {
  min-height: 318px;
}

.process-note {
  margin-top: -8px;
}

/* Блок "Что нужно / Поддержка" делаем компактнее,
   чтобы при переходе по пункту "Поддержка" он лучше входил в экран. */
.needs-support {
  padding-top: 48px;
  padding-bottom: 52px;
}

.two-columns {
  gap: 18px;
}

.panel {
  padding: 26px;
}

.panel h2 {
  font-size: clamp(30px, 2.55vw, 43px);
  line-height: 1.08;
}

.panel-lead {
  margin-top: 14px;
  margin-bottom: 20px;
  line-height: 1.45;
}

.support-grid {
  gap: 12px;
}

.support-grid article {
  padding: 16px 17px;
  min-height: auto;
}

.support-grid h3 {
  font-size: 18px;
  line-height: 1.12;
}

.support-grid p {
  line-height: 1.42;
  font-size: 14px;
}

/* Чуть компактнее левый список условий. */
.reveal-card button {
  padding: 14px 16px;
}

.reveal-card p {
  padding: 0 16px 14px;
  line-height: 1.42;
}

/* На очень низких экранах дополнительно ужимаем hero/процесс без поломки дизайна. */
@media (max-height: 820px) and (min-width: 900px) {
  html {
    scroll-padding-top: 70px;
  }

  #fit,
  #process,
  #support,
  #faq,
  #contact {
    scroll-margin-top: 70px;
  }

  .process {
    padding-top: 44px;
    padding-bottom: 42px;
  }

  .process-desktop.pearl-process .pearl-necklace-svg {
    min-height: 300px;
  }

  .needs-support {
    padding-top: 40px;
    padding-bottom: 44px;
  }

  .panel {
    padding: 22px;
  }

  .support-grid article {
    padding: 14px 15px;
  }
}

@media (max-width: 760px) {
  html {
    scroll-padding-top: 82px;
  }

  #fit,
  #process,
  #support,
  #faq,
  #contact {
    scroll-margin-top: 82px;
  }

  .process {
    padding-top: 50px;
    padding-bottom: 48px;
  }

  .needs-support {
    padding-top: 46px;
    padding-bottom: 46px;
  }
}
