/* will9.ru — footer Frame 363 (desktop / tablet / mobile) */

/* Frame 363 — fill #2d2d2d; top radius = form radius; pad 60/60/16/60, gap 64 */
.site-footer {
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
  padding: 60px 0 16px;
  border-radius: 24px 24px 0 0;
  background: #2d2d2d;
  color: var(--color-white);
}

.site-footer__inner {
  position: relative;
  z-index: 1;
  width: min(100% - 2.5rem, var(--container));
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  gap: 64px;
}

/* ——— Форма_дефолт 1320×589, cornerRadius 24 ——— */

.footer-form {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  width: 100%;
  min-height: 589px;
  height: 589px;
  padding: 32px;
  border-radius: 24px;
  overflow: visible;
  box-sizing: border-box;
  isolation: isolate;
  /* Figma linearGradient x1=-15.7,y1=-18.2 → x2=1252.2,y2=398.3 → CSS 108.2deg */
  background: linear-gradient(
    108.2deg,
    #ff5b1a 0%,
    #411706 100%
  );
  color: var(--color-white);
}

.footer-form__deco {
  position: absolute;
  left: 32px;
  bottom: -40px;
  width: 552px;
  height: 364px;
  max-width: none;
  transform-origin: bottom left;
  pointer-events: none;
  mix-blend-mode: color-dodge;
  z-index: 0;
}

.footer-form__intro,
.footer-form__fields {
  position: relative;
  z-index: 1;
}

.footer-form__intro {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 552px;
  flex: 0 0 552px;
}

.footer-form__title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 300;
  font-size: 48px;
  line-height: 1;
  color: var(--color-white);
}

.footer-form__text {
  margin: 0;
  max-width: 552px;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 18px;
  line-height: 1.4;
  color: var(--color-white);
}

.footer-form__fields {
  display: flex;
  flex-direction: column;
  gap: 48px;
  width: 594px;
  flex: 0 0 594px;
}

.footer-form__stack {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.footer-form__inputs {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-form__task-group {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Underline fields — bottom stroke only #DCDCDC 50% */

.field {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  height: 55px;
  padding: 16px 8px;
  border: 0;
  border-bottom: 1px solid rgb(220 220 220 / 50%);
  background: transparent;
  box-sizing: border-box;
}

.field:focus-within {
  border-bottom-color: rgb(255 255 255 / 80%);
}

.field.is-error {
  border-bottom-color: #ff8f73;
  z-index: 2;
}

.field__control {
  flex: 1 1 auto;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--color-white);
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.4;
  outline: none;
  resize: none;
}

.field__control::placeholder {
  color: rgb(220 220 220 / 50%);
  opacity: 1;
}

.field--task {
  position: relative;
}

.field--task .field__control {
  padding-right: 16px;
}

/* Attach file — dashed white, opacity 0.5, ~217×48, text one line */

.file-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: max-content;
  min-width: 217px;
  height: 48px;
  padding: 12px 16px;
  border: 1px dashed #ffffff;
  border-radius: 4px;
  background: transparent;
  color: #ffffff;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 16px;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  opacity: 0.5;
  box-sizing: border-box;
}

.file-btn:hover,
.file-btn:focus-visible {
  opacity: 1;
}

.file-btn__icon {
  display: block;
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.file-btn__input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

/* Consent */

.consent {
  position: relative;
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 14px;
  line-height: 1.1;
  color: #ffffff;
}

.consent.is-error {
  z-index: 2;
}

.consent__box {
  appearance: none;
  width: 15px;
  height: 15px;
  margin: 2.5px;
  flex-shrink: 0;
  border: 1px solid #ffffff;
  border-radius: 2px;
  background: transparent;
  cursor: pointer;
}

.consent__box:checked {
  background: #ffffff;
  box-shadow: inset 0 0 0 3px #ff5b1a;
}

.consent__box:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 2px;
}

.consent__link {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Submit — dashed orange outline over form gradient */

.btn--form-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 54px;
  padding: 16px 24px;
  border: 1px dashed #ff5b1a;
  border-radius: 4px;
  background: transparent;
  color: #ffffff;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 18px;
  line-height: 1.2;
  cursor: pointer;
  box-sizing: border-box;
}

.btn--form-submit:hover,
.btn--form-submit:focus-visible {
  background: #ff5b1a;
  border-color: #ff5b1a;
  border-style: solid;
}

.btn--form-submit:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 3px;
}

/* ——— Footer panel (nav + bottom), gap 48 ——— */

.footer-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 48px;
  width: 100%;
}

.footer-nav {
  display: grid;
  grid-template-columns: repeat(4, 318px);
  column-gap: 16px;
  width: 1320px;
  max-width: 100%;
}

.footer-nav__col {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 318px;
  min-width: 0;
}

.footer-nav__title {
  margin: 0;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 12px;
  line-height: 1.1;
  color: #ffffff;
}

.footer-nav__list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-nav__list li {
  display: block;
  margin: 0;
  padding: 0;
}

.footer-nav__list a {
  display: block;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 16px;
  line-height: 22px; /* Figma 140% → frame 22 / wrap 44 */
  color: #a2a2a2;
}

.footer-nav__list a:hover,
.footer-nav__list a:focus-visible {
  color: #ffffff;
}

.footer-rule {
  display: block;
  width: 100%;
  height: 0;
  margin: 0;
  border: 0;
  border-top: 1px dashed #515151;
  background: transparent;
}

/* ——— Bottom: 1320×208, rows 55 + gap 100 + 53 ——— */

.footer-bottom {
  position: relative;
  display: grid;
  grid-template-columns: 318px 318px 1fr;
  grid-template-rows: 55px 53px;
  column-gap: 16px;
  row-gap: 100px;
  align-items: end;
  width: 100%;
  height: 208px;
  min-height: 208px;
}

.footer-bottom__mark {
  position: absolute;
  left: -86px;
  top: 0;
  width: 1493px;
  height: 495px;
  max-width: none;
  pointer-events: none;
  mix-blend-mode: color-dodge;
  filter: brightness(1.65);
  opacity: 0.45;
  z-index: 0;
}

/* Skolkovo Group 606: 111×80 at −12/−13 inside 318×55 */
.footer-brand__sk {
  grid-column: 1;
  grid-row: 1;
  position: relative;
  z-index: 1;
  align-self: start;
  display: block;
  width: 111px;
  height: auto;
  margin-top: -13px;
  margin-left: -12px;
}

.footer-socials {
  grid-column: 2;
  grid-row: 1;
  position: relative;
  z-index: 1;
  align-self: end;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 48px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-socials li {
  display: block;
  margin: 0;
  padding: 0;
}

.footer-socials a {
  display: block;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 16px;
  line-height: 1;
  color: #ececec;
}

.footer-socials a:hover,
.footer-socials a:focus-visible {
  color: #ff5b1a;
}

.footer-mail {
  grid-column: 3;
  grid-row: 1;
  position: relative;
  z-index: 1;
  justify-self: end;
  align-self: end;
  font-family: var(--font-display);
  font-weight: 300;
  font-size: 48px;
  line-height: 1;
  color: #ececec;
  white-space: nowrap;
}

.footer-mail:hover,
.footer-mail:focus-visible {
  color: #ff5b1a;
}

.footer-copy {
  grid-column: 1;
  grid-row: 2;
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 16px;
  align-self: center;
}

/* Figma logo instance layout ~100×53 (not the 72×24 component frame) */
.footer-copy__logo {
  display: block;
  width: 100px;
  height: 53px;
}

.footer-copy__text {
  margin: 0;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 12px;
  line-height: 1.1;
  color: #a2a2a2;
}

.footer-legal {
  grid-column: 2 / -1;
  grid-row: 2;
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  align-self: center;
  justify-self: end;
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-legal li {
  display: block;
  margin: 0;
  padding: 0;
}

.footer-legal a {
  display: block;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 12px;
  line-height: 1.1;
  color: #a2a2a2;
}

.footer-legal a:hover,
.footer-legal a:focus-visible {
  color: #ffffff;
}

/* ——— Tablet ≤1024: Frame 363 pad 16, form r16 992×599, nav 4×236 ——— */

@media (max-width: 1024px) {
  .site-footer {
    padding: 16px 0;
    border-radius: 16px 16px 0 0;
  }

  .site-footer__inner {
    width: calc(100% - (var(--header-pad-tablet) * 2));
    gap: 64px;
  }

  .footer-form {
    justify-content: flex-start;
    gap: 16px;
    height: auto;
    min-height: 599px;
    border-radius: 16px;
  }

  .footer-form__intro {
    width: 456px;
    flex: 1 1 0;
    max-width: 456px;
    min-width: 0;
  }

  .footer-form__text {
    max-width: 456px;
    font-size: 16px;
    line-height: 1.4;
  }

  .footer-form__fields {
    width: 456px;
    flex: 1 1 0;
    max-width: 456px;
    min-width: 0;
  }

  .footer-nav {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    width: 100%;
  }

  .footer-nav__col {
    width: auto;
  }

  /* Figma keeps 318 + 318 SK/socials columns on tablet */
  .footer-bottom {
    grid-template-columns: minmax(0, 318px) minmax(0, 318px) minmax(0, 1fr);
  }
}

/* ——— Mobile ≤767: Футер_моб stacked form + nav + meta ——— */

/* ——— Mobile ≤767: Футер_моб 375, pad 16, form 343×691 r16 ——— */

@media (max-width: 767px) {
  .site-footer {
    padding: 16px 0;
  }

  .site-footer__inner {
    width: calc(100% - (var(--header-pad-mobile) * 2));
    gap: 64px;
  }

  .footer-form {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
    height: auto;
    min-height: 0;
    padding: 16px;
    border-radius: 16px;
  }

  /* Mobile: deco full-width, higher (Figma form ~48% from top) */
  .footer-form__deco {
    left: 0;
    right: 0;
    top: 42%;
    bottom: auto;
    width: 100%;
    height: auto;
    max-width: none;
    aspect-ratio: 552 / 364;
    object-fit: contain;
    object-position: top center;
    transform-origin: top center;
  }

  .footer-form__intro,
  .footer-form__fields {
    width: 100%;
    max-width: none;
    flex: 0 0 auto;
  }

  .footer-form__title {
    font-size: 24px;
    line-height: 1.1;
    letter-spacing: 0.02em;
  }

  .footer-form__text {
    max-width: none;
    font-size: 16px;
    line-height: 1.4;
  }

  .footer-form__fields {
    gap: 48px;
  }

  .consent {
    align-items: flex-start;
  }

  /* Nav columns: itemSpacing 16 (not 48) */
  .footer-nav {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
  }

  .footer-nav__col {
    width: 100%;
  }

  /*
    Figma bottom: socials —48— mail —48— (sk / legal / copy gap 16).
    Outer gap 16 + margins recreate the 48s without wrapping HTML.
  */
  .footer-bottom {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    height: auto;
    min-height: 0;
  }

  /* Figma Футер_моб: no watermark */
  .footer-bottom__mark {
    display: none;
  }

  .footer-socials {
    order: 1;
    width: 100%;
    justify-content: space-between;
    gap: 0;
    margin-bottom: 32px;
  }

  .footer-mail {
    order: 2;
    width: 100%;
    justify-self: auto;
    align-self: stretch;
    margin-bottom: 32px;
    font-size: 24px;
    line-height: 1.1;
    letter-spacing: 0.02em;
    white-space: normal;
    text-align: left;
  }

  .footer-brand__sk {
    order: 3;
    align-self: center;
    width: 80px;
    height: auto;
    margin-top: 0;
    margin-left: 0;
  }

  .footer-legal {
    order: 4;
    justify-self: auto;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    text-align: center;
  }

  .footer-copy {
    order: 5;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    text-align: center;
  }

  .footer-copy__logo {
    width: 72px;
    height: auto;
  }
}
