/**
 * Contact form — Figma desktop 1920 / 1800 content.
 * 3-col fields, budget 2×2 chips, niche wrap, full-width submit.
 */

.home-v2 .v2-section--contact,
.v2-section--contact {
  padding-block: clamp(48px, 6.25vw, 120px);
}

.v2-contact__head {
  display: flex;
  flex-direction: column;
  gap: calc(100vw * 20 / 1920);
  margin-bottom: clamp(32px, 2.083vw, 40px);
}

.v2-contact__head .v2-descriptor {
  margin: 0;
  gap: 15px;
  font-size: clamp(16px, 1.042vw, 20px);
  line-height: 1;
  color: rgba(32, 32, 32, 0.4);
}

.v2-contact__head .v2-descriptor__dot {
  width: 10px;
  height: 10px;
  background: #64db69;
}

.v2-contact__heading {
  margin: 0;
  max-width: min(54.43vw, 1045px);
  font-size: clamp(36px, 4.688vw, 90px);
  font-weight: 500;
  line-height: 1;
}

.v2-contact__heading-line {
  display: block;
}

.v2-contact__heading-br {
  display: none;
}

.v2-contact__heading-accent {
  color: #64db69;
}

.v2-contact__heading-rest {
  color: #202020;
}

.v2-contact__intro-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: clamp(16px, 2.083vw, 40px);
}

.v2-contact__intro {
  margin: 0;
  max-width: min(40.42vw, 772px);
  font-size: clamp(16px, 1.042vw, 20px);
  font-weight: 400;
  line-height: 1.2;
  color: rgba(32, 32, 32, 0.4);
}

.v2-contact__intro-br {
  display: none;
}

.v2-contact__note {
  margin: 0;
  flex-shrink: 0;
  font-size: clamp(16px, 1.042vw, 20px);
  font-weight: 500;
  line-height: 1;
  color: rgba(32, 32, 32, 0.2);
  white-space: nowrap;
}

.v2-contact__form {
  display: flex;
  flex-direction: column;
  gap: clamp(32px, 2.083vw, 40px);
}

.v2-contact > .wpcf7 {
  width: 100%;
}

.v2-contact .wpcf7-form-control-wrap {
  display: block;
  width: 100%;
}

.v2-contact .wpcf7-not-valid-tip,
.v2-contact .wpcf7-response-output {
  font-size: clamp(13px, 0.833vw, 16px);
  line-height: 1.25;
}

.v2-contact .wpcf7-not-valid-tip {
  margin-top: 8px;
  color: #c43b3b;
}

.v2-contact .wpcf7 form .wpcf7-response-output {
  margin: 0;
  padding: 12px 16px;
  border: 1px solid rgba(32, 32, 32, 0.2);
  border-radius: 16px;
}

/* 663 + 20 + 662 + 20 + 435 = 1800 */
.v2-contact__fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(16px, 1.042vw, 20px);
}

.v2-contact__field {
  display: flex;
  flex-direction: column;
  gap: clamp(12px, 1.042vw, 20px);
  min-width: 0;
  padding-bottom: clamp(12px, 1.042vw, 20px);
  border-bottom: 1px dashed rgba(32, 32, 32, 0.2);
}

.v2-contact__label {
  font-size: clamp(16px, 1.042vw, 20px);
  font-weight: 500;
  line-height: 1;
  color: #202020;
}

.v2-contact__input {
  width: 100%;
  border: 0;
  background: transparent;
  padding: 0;
  font-family: 'Inter Tight', system-ui, sans-serif;
  font-size: clamp(22px, 1.979vw, 38px);
  font-weight: 400;
  line-height: 1.2;
  color: #202020;
}

.v2-contact__input::placeholder {
  color: rgba(32, 32, 32, 0.2);
}

.v2-contact__input:focus {
  outline: none;
}

.v2-contact__choices {
  display: grid;
  grid-template-columns: minmax(0, clamp(280px, 24.111vw, 434px)) minmax(0, 1fr);
  gap: clamp(40px, 13.021vw, 249px);
  padding-top: clamp(24px, 1.563vw, 30px);
}

.v2-contact__choice {
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
}

.v2-contact__choice .v2-contact__label {
  display: block;
  margin-bottom: clamp(24px, 2.083vw, 40px);
}

.v2-contact__chips {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, clamp(150px, 11.458vw, 207px)));
  gap: clamp(16px, 1.042vw, 20px);
}

.v2-contact__chips--niche {
  grid-template-columns: repeat(4, minmax(0, clamp(150px, 11.458vw, 207px)));
}

.v2-contact__chip,
.home-v2 .v2-contact__chip.v2-form__chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: clamp(48px, 3.125vw, 60px);
  padding: clamp(14px, 0.938vw, 18px) clamp(24px, 3.75vw, 72px);
  border: 0;
  border-radius: 80px;
  background: #ebebeb;
  color: rgba(32, 32, 32, 0.4);
  font-family: inherit;
  font-size: clamp(16px, 1.042vw, 20px);
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  transition:
    background-color 0.5s ease,
    color 0.5s ease,
    transform 0.5s ease;
}

.v2-contact__chip.is-active,
.home-v2 .v2-contact__chip.v2-form__chip.is-active {
  background: #64db69;
  color: #f5f5f5;
}

@media (hover: hover) and (pointer: fine) {
  .v2-contact__chip:not(.is-active):hover,
  .home-v2 .v2-contact__chip.v2-form__chip:not(.is-active):hover,
  .v2-contact__chip:not(.is-active):focus-visible,
  .home-v2 .v2-contact__chip.v2-form__chip:not(.is-active):focus-visible {
    background: #dedede;
    color: rgba(32, 32, 32, 0.65);
    transform: translateY(calc(100vw * -2 / 1920));
  }
}

.v2-contact__submit-wrap {
  padding-top: clamp(24px, 1.563vw, 30px);
}

.v2-contact__submit {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: clamp(56px, 4.167vw, 80px);
  margin: 0;
  padding: clamp(14px, 0.99vw, 19px) clamp(24px, 2.083vw, 40px);
  border: 0;
  border-radius: 130px;
  background: #64db69;
  color: #ffffff;
  font-family: inherit;
  font-size: clamp(16px, 1.042vw, 20px);
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  transition: background-color 0.5s ease, color 0.5s ease;
}

@media (hover: hover) and (pointer: fine) {
  .v2-contact__submit:hover {
    background: #202020;
  }
}

.v2-contact__submit:focus {
  outline: none;
}

.v2-contact__submit:focus-visible {
  outline: 2px solid #202020;
  outline-offset: 3px;
}

@media (max-width: 1023px) {
  .home-v2 .v2-section--contact,
  .v2-section--contact {
    padding-top: var(--v2-section-gap);
    padding-bottom: 0;
  }

  /* Services: contact is last section — same gap as FAQ → footer on home */
  .page-services .v2-section--contact,
  .page-platform .v2-section--contact,
  .page-meta .v2-section--contact {
    padding-bottom: calc(100vw * 100 / 390);
  }

  .v2-contact__head {
    gap: calc(100vw * 15 / 390);
    margin-bottom: calc(100vw * 28 / 390);
  }

  .v2-section--contact .v2-contact__head .v2-descriptor {
    gap: calc(100vw * 10 / 390);
    font-size: calc(100vw * 12 / 390);
    font-weight: 400;
    line-height: 1;
    color: rgba(32, 32, 32, 0.4);
  }

  .v2-section--contact .v2-contact__head .v2-descriptor__dot {
    width: calc(100vw * 6 / 390);
    height: calc(100vw * 6 / 390);
    background: #64db69;
  }

  .v2-contact__heading {
    max-width: none;
    font-size: calc(100vw * 36 / 390);
    line-height: 1;
  }

  .is-lang-uk .v2-section--contact .v2-contact__heading {
    font-size: calc(100vw * 34 / 390);
  }

  .is-lang-uk .v2-section--contact .v2-contact__heading > .v2-contact__heading-line {
    display: block;
    width: fit-content;
  }

  .is-lang-uk .v2-section--contact .v2-contact__heading > .v2-contact__heading-line:nth-child(2)::before {
    content: none;
  }

  .v2-section--contact .v2-contact__heading > .v2-contact__heading-line:nth-child(1),
  .v2-section--contact .v2-contact__heading > .v2-contact__heading-line:nth-child(2) {
    display: inline-block;
    vertical-align: top;
    width: auto;
  }

  .v2-section--contact .v2-contact__heading > .v2-contact__heading-line:nth-child(2)::before {
    content: '\00a0';
  }

  .v2-section--contact .v2-contact__heading > .v2-contact__heading-line:nth-child(3) {
    display: block;
  }

  .v2-contact__intro-row {
    flex-direction: column;
    gap: 0;
  }

  .v2-contact__intro {
    max-width: none;
    font-size: calc(100vw * 14 / 390);
    line-height: 1.2;
    color: rgba(32, 32, 32, 0.4);
  }

  .v2-contact__intro-br {
    display: block;
  }

  .v2-contact__note {
    display: none;
  }

  .v2-contact__form {
    gap: calc(100vw * 20 / 390);
  }

  .v2-contact__fields {
    grid-template-columns: 1fr;
    gap: calc(100vw * 20 / 390);
  }

  .v2-contact__field {
    gap: calc(100vw * 12 / 390);
    padding-bottom: calc(100vw * 12 / 390);
    border-bottom: 1px dotted rgba(32, 32, 32, 0.2);
  }

  .v2-contact__label {
    font-size: calc(100vw * 14 / 390);
    font-weight: 500;
    line-height: 1;
  }

  .v2-contact__input {
    font-size: calc(100vw * 22 / 390);
    line-height: 1.2;
  }

  .v2-contact__input::placeholder {
    color: rgba(32, 32, 32, 0.2);
  }

  .v2-contact__choices {
    grid-template-columns: 1fr;
    gap: calc(100vw * 20 / 390);
    padding-top: 0;
  }

  .v2-contact__choice--budget {
    padding-bottom: calc(100vw * 20 / 390);
    border-bottom: 1px dotted rgba(32, 32, 32, 0.2);
  }

  .v2-contact__choice .v2-contact__label {
    margin-bottom: calc(100vw * 16 / 390);
  }

  .v2-contact__chips,
  .v2-contact__chips--niche {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: calc(100vw * 10 / 390);
  }

  .v2-contact__chip,
  .home-v2 .v2-contact__chip.v2-form__chip {
    min-height: calc(100vw * 37 / 390);
    height: calc(100vw * 37 / 390);
    padding-inline: calc(100vw * 12 / 390);
    border-radius: calc(100vw * 80 / 390);
    font-size: calc(100vw * 14 / 390);
    font-weight: 500;
    white-space: normal;
  }

  .v2-contact__submit-wrap {
    padding-top: calc(100vw * 20 / 390);
  }

  .v2-contact__submit {
    width: 100%;
    height: calc(100vw * 60 / 390);
    padding: calc(100vw * 14 / 390) calc(100vw * 28 / 390);
    border-radius: calc(100vw * 130 / 390);
    font-size: calc(100vw * 16 / 390);
  }
}

@media (min-width: 1024px) {
  /* Services: contact is last section — same gap as FAQ → footer on home */
  .page-services .v2-section--contact {
    padding-bottom: clamp(48px, 6.25vw, 120px);
  }

  .v2-contact {
    --contact-col-1: var(--v2-grid-col-1, calc(100vw * 663 / 1920));
    --contact-col-2: var(--v2-grid-col-2, calc(100vw * 662 / 1920));
    --contact-col-3: var(--v2-grid-col-3, calc(100vw * 435 / 1920));
    --contact-grid-gap: var(--v2-grid-gap, calc(100vw * 20 / 1920));
  }

  .v2-contact__heading {
    max-width: calc(100vw * 830 / 1920);
  }

  .is-lang-uk .v2-section--contact .v2-contact__heading {
    max-width: calc(100vw * 900 / 1920);
    font-size: calc(100vw * 82 / 1920);
  }

  .is-lang-uk .v2-section--contact .v2-contact__heading > .v2-contact__heading-line {
    display: block;
    width: fit-content;
  }

  .is-lang-uk .v2-section--contact .v2-contact__heading > .v2-contact__heading-line:nth-child(2)::before {
    content: none;
  }

  .v2-section--contact .v2-contact__heading > .v2-contact__heading-line:nth-child(1),
  .v2-section--contact .v2-contact__heading > .v2-contact__heading-line:nth-child(2) {
    display: inline-block;
    vertical-align: top;
    width: auto;
  }

  .v2-section--contact .v2-contact__heading > .v2-contact__heading-line:nth-child(2)::before {
    content: '\00a0';
  }

  .v2-section--contact .v2-contact__heading > .v2-contact__heading-line:nth-child(3) {
    display: block;
  }

  .v2-contact__heading-line:not(.v2-contact__heading-accent) {
    color: #202020;
  }

  .v2-contact__intro-row,
  .v2-contact__fields,
  .v2-contact__choices {
    display: grid;
    grid-template-columns: var(--contact-col-1) var(--contact-col-2) var(--contact-col-3);
    column-gap: var(--contact-grid-gap);
  }

  .v2-contact__intro {
    grid-column: 1 / 3;
    max-width: none;
    white-space: nowrap;
  }

  .v2-contact__note {
    grid-column: 3;
    justify-self: start;
  }

  .v2-contact__fields {
    gap: var(--contact-grid-gap);
  }

  .v2-contact__choices {
    gap: var(--contact-grid-gap);
    padding-top: calc(100vw * 30 / 1920);
  }

  .v2-contact__choice--budget {
    grid-column: 1;
  }

  .v2-contact__choice--niche {
    grid-column: 2 / 4;
  }

  .v2-contact__chips {
    grid-template-columns: repeat(2, minmax(0, calc(100vw * 210 / 1920)));
    column-gap: calc(100vw * 20 / 1920);
    row-gap: calc(100vw * 20 / 1920);
  }

  .v2-contact__chips--niche {
    grid-template-columns: repeat(4, minmax(0, calc(100vw * 210 / 1920)));
  }

  .is-lang-uk .v2-contact__chips--niche,
  .is-lang-uk.page-platform .v2-contact__chips--niche {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .is-lang-uk .v2-contact__chips--niche .v2-contact__chip,
  .is-lang-uk.page-platform .v2-contact__chips--niche .v2-contact__chip.v2-form__chip {
    padding-inline: calc(100vw * 14 / 1920);
    font-size: calc(100vw * 17 / 1920);
  }

  .v2-contact__chip,
  .home-v2 .v2-contact__chip.v2-form__chip {
    height: calc(100vw * 60 / 1920);
    min-height: calc(100vw * 60 / 1920);
    padding: calc(100vw * 18 / 1920) calc(100vw * 24 / 1920);
    border-radius: calc(100vw * 80 / 1920);
    font-size: calc(100vw * 20 / 1920);
    line-height: 1;
  }
}
