/* Tone — contact (Contact Form 7) */

.contact {
  --col: 500px;
  --label-h: 22px;
  --label-gap: 15px;
  --field-gap: 46px;

  width: var(--col);
  max-width: 100%;
  margin: 89px auto 0;
  padding-bottom: 80px;
}

.contact__title { text-align: center; }
.contact__form { margin-top: var(--field-gap); }

/* Fields */
.field { position: relative; }
.field + .field { margin-top: var(--field-gap); }

.field__label {
  display: block;
  height: var(--label-h);
  line-height: var(--label-h);
}

.field .wpcf7-form-control-wrap { display: block; }

.field input,
.field textarea {
  display: block;
  width: 100%;
  margin: var(--label-gap) 0 0;
  padding: 0 14px;
  border: 0;
  border-bottom: 1px solid var(--ink-sub);
  border-radius: 0;
  background: var(--field);
  font-size: 20px;
  line-height: 1.5;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
  -webkit-appearance: none;
  appearance: none;
}
.field input { height: 50px; }
.field textarea { height: 256px; padding-block: 10px; resize: vertical; }

.field input:focus,
.field textarea:focus {
  border-bottom-color: var(--ink);
  box-shadow: 0 1px 0 var(--ink);
}

/* Errors */
.wpcf7-not-valid-tip {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  font-size: 15px;
  font-style: italic;
  line-height: 1.3;
  letter-spacing: .02em;
}

/* Response */
.wpcf7-response-output {
  margin: 28px 0 0;
  font-size: 15px;
  font-style: italic;
  text-align: center;
}
.wpcf7-response-output:empty,
.wpcf7-form.init .wpcf7-response-output,
.wpcf7-form.sent .wpcf7-response-output { display: none; }

/* CF7 helpers */
.wpcf7 .screen-reader-response {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}
.wpcf7 .hidden-fields-container { display: none; }
.wpcf7-spinner { display: none; }

/* Turnstile & send */
.contact .wpcf7-form {
  display: flex;
  flex-direction: column;
}

.wpcf7-turnstile,
.cf-turnstile {
  display: flex;
  justify-content: center;
  margin-top: 48px;
}

.send-row {
  margin-top: 70px;
  text-align: center;
}
.wpcf7-turnstile ~ .send-row,
.cf-turnstile ~ .send-row { margin-top: 32px; }

/* Send */
.send {
  padding: 0 0 6px;
  border: 0;
  border-radius: 0;
  background: none;
  background-image: linear-gradient(currentColor, currentColor);
  background-position: 50% 100%;
  background-repeat: no-repeat;
  background-size: 0 1px;
  cursor: pointer;
  transition: background-size .3s;
  -webkit-appearance: none;
  appearance: none;
}
.send:hover,
.send:focus-visible { background-size: 100% 1px; }
.wpcf7-form.submitting .send { opacity: .4; cursor: default; }

/* Policy link */
.contact__policy {
  margin-top: 28px;
  font-size: 14px;
  letter-spacing: .08em;
  text-align: center;
}
.contact__policy a {
  border-bottom: 1px solid transparent;
  text-decoration: none;
  transition: border-color .3s;
}
.contact__policy a:hover { border-bottom-color: currentColor; }

/* Mobile */
@media (max-width: 600px) {
  .contact {
    --col: calc(100vw - 48px);
    --label-h: 20px;
    --label-gap: 12px;
    --field-gap: 36px;

    margin-top: 44px;
    padding-bottom: 56px;
  }

  .field input,
  .field textarea {
    padding-inline: 12px;
    font-size: 17px; /* < 16px zooms on iOS */
  }
  .field input { height: 46px; }
  .field textarea { height: 200px; }

  .wpcf7-not-valid-tip { font-size: 14px; }

  .send-row { margin-top: 48px; }
  .send {
    padding: 10px 16px 8px;
    background-position: 50% calc(100% - 4px);
  }
}
