.contact-section {
  position: relative;
  overflow: hidden;
  padding: clamp(85px, 7vw, 135px) var(--page-gap) 0;
  background: #fbfbfb;
  color: #3d2d56;
}

.contact-section__inner {
  width: min(100%, 2200px);
  margin: 0 auto;
}

.contact-section__title {
  position: relative;
  z-index: 4;
  width: 54%;
  margin: clamp(18px, 1.4vw, 28px) 0 0 clamp(44px, 3.8vw, 72px);
  font-family: "Oswald Local", "Arial Narrow", sans-serif;
  font-size: clamp(45px, 3.7vw, 72px);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.05;
  text-transform: uppercase;
}

.contact-section__title strong {
  color: #ff9fa4;
  font-weight: inherit;
}

.callback-stage {
  isolation: isolate;
  position: relative;
  min-height: clamp(700px, 47vw, 900px);
  margin-top: clamp(44px, 4vw, 78px);
}

.callback-form {
  position: relative;
  z-index: 4;
  display: flex;
  width: 52%;
  min-height: 0;
  flex-direction: column;
  margin: clamp(88px, 6vw, 122px) 0 0 clamp(24px, 2vw, 44px);
  padding: clamp(54px, 3.6vw, 72px);
  border-radius: clamp(28px, 2vw, 40px);
  overflow: hidden;
  background: #9f7ec6;
  color: #fff;
}

.callback-form h3 {
  width: 100%;
  margin: 0 0 clamp(28px, 2.5vw, 48px);
  font-family: "Oswald Local", "Arial Narrow", sans-serif;
  font-size: clamp(36px, 3vw, 58px);
  font-weight: 600;
  line-height: 1;
  text-transform: uppercase;
}

.callback-form > label:not(.callback-form__consent) {
  display: block;
  width: 100%;
  margin-top: 18px;
}

.callback-form__label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.callback-form input[type="text"],
.callback-form input[type="tel"] {
  width: 100%;
  min-height: clamp(66px, 5vw, 92px);
  padding: 0 clamp(24px, 2vw, 38px);
  border: 2px solid rgba(255, 255, 255, 0.92);
  border-radius: 999px;
  outline: 0;
  background: transparent;
  color: #fff;
  font: inherit;
  font-size: clamp(18px, 1.4vw, 27px);
  transition: background-color 180ms ease, box-shadow 180ms ease;
}

.callback-form input::placeholder {
  color: rgba(255, 255, 255, 0.86);
  opacity: 1;
}

.callback-form input[type="text"]:focus,
.callback-form input[type="tel"]:focus {
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 0 0 5px rgba(255, 255, 255, 0.13);
}

.callback-form__consent {
  display: flex;
  width: 100%;
  align-items: flex-start;
  gap: 14px;
  margin-top: 18px;
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(12px, 0.9vw, 17px);
  line-height: 1.25;
}

.callback-form__consent input {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  margin: 2px 0 0;
  accent-color: #ff9fa4;
}

.callback-form__consent a {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.callback-form > button {
  width: 100%;
  min-height: clamp(70px, 5vw, 94px);
  margin-top: clamp(26px, 2.2vw, 42px);
  border: 0;
  border-radius: 999px;
  background: #ff9fa4;
  color: #fff;
  font: inherit;
  font-size: clamp(20px, 1.5vw, 29px);
  font-weight: 600;
  cursor: pointer;
  transition: filter 180ms ease, transform 180ms ease;
}

.callback-form > button:hover,
.callback-form > button:focus-visible {
  filter: brightness(1.06);
  transform: translateY(-3px);
}

.callback-form__status {
  width: 100%;
  min-height: 1.25em;
  margin: 14px 0 0;
  color: #fff;
  font-size: clamp(13px, 0.9vw, 17px);
}

.callback-form__status:empty {
  display: none;
}

.callback-form__status.is-success {
  font-weight: 700;
}

.callback-form__status.is-error {
  color: #ffe4e8;
  font-weight: 700;
}

.callback-form > button:disabled {
  cursor: wait;
  opacity: 0.72;
  transform: none;
}

.callback-stage__cat {
  position: absolute;
  z-index: 1;
  right: calc((100vw - 100%) / -2);
  bottom: calc(0px - clamp(285px, 19vw, 455px));
  display: block;
  width: clamp(700px, 43vw, 980px);
  height: auto;
  object-fit: contain;
  object-position: center bottom;
  -webkit-mask-image:
    linear-gradient(to right, transparent 0, #000 8%, #000 100%),
    linear-gradient(to bottom, transparent 0, rgba(0, 0, 0, 0.35) 3%, #000 11%, #000 100%);
  -webkit-mask-composite: source-in;
  mask-image:
    linear-gradient(to right, transparent 0, #000 8%, #000 100%),
    linear-gradient(to bottom, transparent 0, rgba(0, 0, 0, 0.35) 3%, #000 11%, #000 100%);
  mask-composite: intersect;
  pointer-events: none;
  user-select: none;
}

.site-footer {
  position: relative;
  display: grid;
  grid-template-columns: minmax(360px, 1.25fr) minmax(190px, 0.58fr) minmax(270px, 0.85fr) minmax(250px, 0.7fr);
  gap: clamp(36px, 4vw, 82px);
  width: calc(100% - (2 * var(--page-gap)));
  margin: 0 var(--page-gap) clamp(20px, 2vw, 36px);
  padding: clamp(52px, 5vw, 96px);
  overflow: hidden;
  border-radius: clamp(32px, 3vw, 54px);
  background: #9f7ec6;
  color: #fff;
}

.site-footer > * {
  position: relative;
  z-index: 1;
}

.site-footer .site-footer__credit {
  position: absolute;
  right: clamp(30px, 5vw, 96px);
  bottom: clamp(24px, 2vw, 38px);
  color: rgba(255, 255, 255, 0.82);
  font-size: clamp(13px, 0.9vw, 17px);
  line-height: 1.2;
  transition: color 180ms ease, transform 180ms ease;
}

.site-footer .site-footer__credit:hover,
.site-footer .site-footer__credit:focus-visible {
  color: #fff;
  transform: translateY(-2px);
}

.site-footer__brand img {
  display: block;
  width: min(100%, 460px);
  height: auto;
  filter: brightness(0) invert(1);
}

.site-footer__brand p {
  margin: clamp(24px, 2vw, 38px) 0 0;
  font-size: clamp(16px, 1.15vw, 22px);
  line-height: 1.35;
}

.site-footer__brand small {
  display: block;
  margin-top: clamp(50px, 5vw, 92px);
  font-size: clamp(13px, 0.9vw, 17px);
}

.site-footer__nav {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-top: 12px;
}

.site-footer__nav a,
.site-footer__nav button {
  width: fit-content;
  font-size: clamp(16px, 1.13vw, 22px);
  line-height: 1.2;
  transition: opacity 180ms ease, transform 180ms ease;
}

.site-footer__nav button {
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.site-footer__nav a:hover,
.site-footer__nav a:focus-visible,
.site-footer__nav button:hover,
.site-footer__nav button:focus-visible {
  opacity: 0.74;
  transform: translateX(4px);
}

.site-footer__contacts {
  display: flex;
  align-items: flex-end;
  flex-direction: column;
  padding-top: 10px;
  text-align: right;
}

.site-footer__phone {
  font-size: clamp(19px, 1.4vw, 27px);
  font-weight: 650;
}

.site-footer__contacts > span {
  margin-top: 7px;
  color: rgba(255, 255, 255, 0.82);
  font-size: clamp(13px, 0.9vw, 17px);
}

.site-footer__email {
  margin-top: 13px;
  color: #fff;
  font-size: clamp(15px, 1vw, 19px);
  text-decoration: underline;
  text-underline-offset: 4px;
  transition: opacity 180ms ease;
}

.site-footer__email:hover,
.site-footer__email:focus-visible {
  opacity: 0.76;
}

.site-footer__contacts > div {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 28px;
}

.site-footer__contacts > div a {
  display: grid;
  width: 42px;
  aspect-ratio: 1;
  place-items: center;
  color: #fff;
  font: 700 31px/1 Arial, sans-serif;
  transition: opacity 180ms ease, transform 180ms ease;
}

.site-footer__contacts > div a:hover,
.site-footer__contacts > div a:focus-visible {
  opacity: 0.78;
  transform: translateY(-3px);
}

.site-footer__contacts img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: brightness(0) invert(1);
}

body.legal-modal-open {
  overflow: hidden;
}

.legal-modal[hidden],
[data-legal-document][hidden] {
  display: none;
}

.legal-modal {
  position: fixed;
  z-index: 1000;
  inset: 0;
  display: grid;
  padding: clamp(14px, 3vw, 46px);
  place-items: center;
}

.legal-modal__backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: rgba(38, 24, 52, 0.68);
  cursor: default;
  backdrop-filter: blur(7px);
}

.legal-modal__dialog {
  position: relative;
  z-index: 1;
  width: min(920px, 100%);
  max-height: min(88vh, 920px);
  padding: clamp(30px, 4vw, 58px);
  overflow-y: auto;
  border: 2px solid rgba(159, 126, 198, 0.2);
  border-radius: clamp(24px, 2.5vw, 40px);
  background: #fff;
  box-shadow: 0 30px 90px rgba(48, 30, 65, 0.3);
  color: #3d2d56;
  overscroll-behavior: contain;
}

.legal-modal__close {
  position: sticky;
  z-index: 2;
  top: 0;
  float: right;
  display: grid;
  width: 48px;
  aspect-ratio: 1;
  margin: -10px -10px 10px 18px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: #f1eafa;
  color: #6f4d92;
  font: 400 34px/1 Arial, sans-serif;
  cursor: pointer;
  transition: background-color 180ms ease, color 180ms ease, transform 180ms ease;
}

.legal-modal__close:hover,
.legal-modal__close:focus-visible {
  background: #9f7ec6;
  color: #fff;
  transform: rotate(5deg);
}

.legal-modal h2 {
  margin: 0;
  padding-right: 54px;
  font-family: "Oswald Local", "Arial Narrow", sans-serif;
  font-size: clamp(34px, 4vw, 58px);
  font-weight: 600;
  line-height: 1.05;
  text-transform: uppercase;
}

.legal-modal__body {
  clear: both;
  padding-top: clamp(22px, 2.5vw, 36px);
}

.legal-modal__body h3 {
  margin: 28px 0 8px;
  color: #6f4d92;
  font-size: clamp(19px, 1.5vw, 24px);
  line-height: 1.25;
}

.legal-modal__body p {
  margin: 0 0 14px;
  color: #665477;
  font-size: clamp(15px, 1.15vw, 18px);
  line-height: 1.55;
}

.legal-modal__body a {
  color: #8d62b7;
  font-weight: 650;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.legal-modal__body .legal-modal__date {
  color: #9b8aa9;
  font-size: 14px;
}

@media (min-width: 3000px) {
  .contact-section__inner {
    width: min(100%, 3400px);
  }

  .callback-stage {
    min-height: 1260px;
  }

  .callback-form {
    min-height: 0;
  }

  .callback-stage__cat {
    bottom: -620px;
    width: 1260px;
  }
}

@media (max-width: 1200px) {
  .contact-section__title {
    width: 56%;
    margin-left: 44px;
  }

  .callback-form {
    width: 54%;
    padding: 44px;
  }

  .callback-stage__cat {
    right: calc((100vw - 100%) / -2);
    width: clamp(620px, 58vw, 760px);
  }

  .site-footer {
    grid-template-columns: 1.1fr 0.65fr 0.9fr;
  }

  .site-footer__contacts {
    grid-column: 1 / -1;
    align-items: flex-start;
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }

  .site-footer__contacts > div {
    margin-top: 0;
  }

  .site-footer__email {
    margin-top: 0;
  }
}

@media (max-width: 820px) {
  .contact-section {
    padding: 72px 8px 0;
  }

  .contact-section__title {
    width: auto;
    margin: 0 12px;
    font-size: clamp(37px, 9vw, 48px);
    text-align: center;
  }

  .contact-section__title br {
    display: none;
  }

  .callback-stage {
    display: flex;
    min-height: 0;
    flex-direction: column;
    margin-top: 36px;
  }

  .callback-stage__cat {
    position: relative;
    right: auto;
    bottom: auto;
    order: 1;
    width: min(112vw, 660px);
    margin: 0 auto;
    -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 5%, #000 100%);
    mask-image: linear-gradient(to bottom, transparent 0, #000 5%, #000 100%);
  }

  .callback-form {
    z-index: 4;
    order: 2;
    width: 100%;
    min-height: 0;
    margin: clamp(-520px, -90vw, -390px) 0 0;
    padding: 46px 22px 28px;
    border-radius: 38px 38px 28px 28px;
  }

  .callback-form h3,
  .callback-form > label:not(.callback-form__consent),
  .callback-form__consent,
  .callback-form > button,
  .callback-form__status {
    width: 100%;
  }

  .callback-form h3 {
    font-size: 38px;
  }

  .callback-form__consent br {
    display: none;
  }

  .site-footer {
    grid-template-columns: 1fr 1fr;
    gap: 34px 22px;
    width: calc(100% - 16px);
    margin: 28px 8px 12px;
    padding: 38px 24px 84px;
    border-radius: 28px;
  }

  .site-footer .site-footer__credit {
    right: 24px;
    bottom: 28px;
    max-width: calc(100% - 48px);
    text-align: right;
  }

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

  .site-footer__brand img {
    width: min(100%, 330px);
  }

  .site-footer__brand small {
    margin-top: 34px;
  }

  .site-footer__contacts {
    grid-column: 1 / -1;
    flex-direction: column;
    gap: 6px;
  }

  .site-footer__contacts > div {
    margin-top: 18px;
  }

  .site-footer__email {
    margin-top: 10px;
  }

  .legal-modal {
    padding: 10px;
  }

  .legal-modal__dialog {
    max-height: 92vh;
    padding: 26px 20px 32px;
    border-radius: 24px;
  }

  .legal-modal__close {
    width: 44px;
    margin: -8px -4px 8px 12px;
  }
}

@media (max-width: 480px) {
  .contact-section__title {
    font-size: clamp(34px, 10.5vw, 43px);
  }

  .callback-stage__cat {
    width: 118vw;
  }

  .callback-form {
    margin-top: clamp(-440px, -100vw, -370px);
    padding-top: 40px;
  }

  .callback-form h3 {
    font-size: 34px;
  }

  .callback-form input[type="text"],
  .callback-form input[type="tel"],
  .callback-form > button {
    min-height: 64px;
  }

  .site-footer {
    grid-template-columns: 1fr;
  }

  .site-footer__brand,
  .site-footer__contacts {
    grid-column: auto;
  }
}
