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

:root {
  color-scheme: dark;
  font-family: Arial, Helvetica, sans-serif;
  background: #020403;
}

html,
body {
  min-height: 100%;
  margin: 0;
  background: #020403;
}

body {
  overflow-x: hidden;
}

body.modal-open {
  overflow: hidden;
}

button,
input,
textarea {
  font: inherit;
}

.hero {
  width: 100%;
  min-height: 100vh;
  min-height: 100svh;
  overflow: hidden;
  background: #020403;
}

.hero__canvas {
  position: relative;
  width: 100vw;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
}

.hero__picture {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}

.hero__image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  user-select: none;
  -webkit-user-drag: none;
}

.modal__dialog {
  scrollbar-width: none;      /* Firefox */
  -ms-overflow-style: none;   /* старый Edge */
}

.modal__dialog::-webkit-scrollbar {
  display: none;              /* Chrome, Safari, Opera */
}

/*
  Активная область поверх кнопки на новом десктопном изображении 1672 × 941.
  JavaScript уточняет положение при object-fit: cover на экранах другого формата.
*/
.hero__open-form {
  position: absolute;
  left: 14.47%;
  top: 69.08%;
  width: 23.92%;
  height: 6.80%;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: transparent;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.hero__open-form:hover {
  background: rgba(255, 255, 255, 0.055);
}

.hero__open-form:focus-visible {
  outline: 3px solid #ffffff;
  outline-offset: 4px;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  padding: 10px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.modal.is-open {
  display: grid;
  place-items: center;
}

.modal__backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(5px);
}

.modal__dialog {
  position: relative;
  z-index: 1;
  width: min(492px, calc(100vw - 20px));
  max-height: calc(100dvh - 20px);
  overflow-y: auto;
  border-radius: 11px;
  background: #ffffff;
  color: #161616;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
  outline: none;
}

.modal__close {
  position: absolute;
  z-index: 4;
  top: 10px;
  right: 10px;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0 0 2px;
  border: 1px solid #dedede;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.96);
  color: #202020;
  font-size: 25px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
}

.modal__close:hover {
  background: #f3f3f3;
}

.modal__close:focus-visible {
  outline: 2px solid #111111;
  outline-offset: 2px;
}

.form {
  padding: 47px 29px 29px;
  background: #ffffff;
}

.form__group {
  margin: 0 0 21px;
}

.form__group--range {
  margin-bottom: 22px;
}

.form__label {
  display: block;
  margin: 0 0 8px;
  color: #181818;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.42;
}

.form__hint {
  display: block;
  margin: -3px 0 10px;
  color: #8a8a8a;
  font-size: 11px;
  font-weight: 400;
  line-height: 1.38;
}

.form__control,
.phone {
  width: 100%;
  min-height: 45px;
  border: 1px solid #c7c7c7;
  border-radius: 5px;
  background: #ffffff;
  color: #252525;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.form__control {
  padding: 0 14px;
  font-size: 13px;
}

.form__control::placeholder,
.phone__input::placeholder {
  color: #9a9a9a;
  opacity: 1;
}

.form__control:focus,
.phone:focus-within {
  border-color: #777777;
  outline: none;
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.07);
}

.form__textarea {
  min-height: 51px;
  padding-top: 11px;
  padding-bottom: 11px;
  resize: vertical;
}

.form__fieldset {
  min-width: 0;
  padding: 0;
  border: 0;
}

.radio {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 22px;
  margin: 0;
  color: #555555;
  font-size: 12px;
  line-height: 1.3;
  cursor: pointer;
}

.radio input {
  appearance: none;
  width: 15px;
  height: 15px;
  margin: 0;
  flex: 0 0 auto;
  border: 1px solid #777777;
  border-radius: 50%;
  background: #ffffff;
  cursor: pointer;
}

.radio input:checked {
  border: 4px solid #ffffff;
  background: #111111;
  box-shadow: 0 0 0 1px #777777;
}

.phone {
  display: flex;
  align-items: center;
  padding: 0 13px;
}

.phone__flag {
  margin-right: 4px;
  font-size: 15px;
  line-height: 1;
}

.phone__arrow {
  width: 0;
  height: 0;
  margin: 1px 8px 0 0;
  border-top: 4px solid #777777;
  border-right: 3px solid transparent;
  border-left: 3px solid transparent;
}

.phone__prefix {
  margin-right: 5px;
  color: #555555;
  font-size: 13px;
}

.phone__input {
  min-width: 0;
  height: 43px;
  flex: 1;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: #252525;
  font-size: 13px;
}

.range {
  --range-position: 50%;
  position: relative;
  padding-top: 33px;
}

.range__value {
  position: absolute;
  top: 0;
  left: var(--range-position);
  width: 32px;
  height: 27px;
  transform: translateX(-50%);
  display: grid;
  place-items: center;
  border-radius: 3px;
  background: #ffffff;
  color: #555555;
  font-size: 12px;
  text-align: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
}

.range__input {
  appearance: none;
  display: block;
  width: 100%;
  height: 18px;
  margin: 0;
  background: transparent;
  cursor: pointer;
}

.range__input::-webkit-slider-runnable-track {
  height: 1px;
  background: #111111;
}

.range__input::-webkit-slider-thumb {
  appearance: none;
  width: 15px;
  height: 15px;
  margin-top: -7px;
  border: 0;
  border-radius: 50%;
  background: #000000;
}

.range__input::-moz-range-track {
  height: 1px;
  background: #111111;
}

.range__input::-moz-range-thumb {
  width: 15px;
  height: 15px;
  border: 0;
  border-radius: 50%;
  background: #000000;
}

.range__labels {
  display: flex;
  justify-content: space-between;
  margin-top: 4px;
  color: #555555;
  font-size: 12px;
  line-height: 1;
}

.form__submit {
  width: 100%;
  min-height: 45px;
  padding: 0 18px;
  border: 0;
  border-radius: 4px;
  background: #000000;
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.form__submit:hover {
  opacity: 0.87;
}

.form__submit:active {
  transform: translateY(1px);
}

.form__submit:disabled {
  cursor: wait;
  opacity: 0.6;
}

.form__status {
  min-height: 0;
  margin: 0;
  padding-top: 0;
  text-align: center;
  font-size: 13px;
  line-height: 1.4;
}

.form__status:not(:empty) {
  min-height: 20px;
  padding-top: 11px;
}

.form__status.is-success {
  color: #087d4f;
}

.form__status.is-error,
.form__error {
  color: #bd1818;
}

.form__error {
  display: block;
  min-height: 0;
  margin-top: 0;
  font-size: 11px;
  line-height: 1.3;
}

.form__error:not(:empty) {
  min-height: 14px;
  margin-top: 4px;
}

.form__honeypot,
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

@media (max-width: 1024px) {
  .hero {
    min-height: auto;
    display: block;
  }

  .hero__canvas {
    width: min(100vw, 941px);
    height: auto;
    aspect-ratio: 941 / 1672;
    margin: 0 auto;
  }

  .hero__image {
    object-fit: contain;
  }

  /* Активная область поверх кнопки на мобильном изображении 941 × 1672. */
  .hero__open-form {
    left: 7.65%;
    top: 67.60%;
    width: 79.90%;
    height: 6.55%;
    border-radius: 16px;
  }

  .modal {
    padding: 6px;
    align-items: start;
  }

  .modal__dialog {
    width: min(492px, calc(100vw - 12px));
    max-height: calc(100dvh - 12px);
    border-radius: 10px;
  }

  .form {
    padding: 46px 28px 28px;
  }
}

@media (max-width: 390px) {
  .form {
    padding-right: 22px;
    padding-left: 22px;
  }

  .form__label {
    font-size: 15px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
