.contact-page .page-hero::before {
  background: var(--kp-pink-soft);
}

.contact-page .page-hero::after {
  background: var(--kp-blue-soft);
}

.contact-main {
  padding: 108px 0 124px;
  background: var(--kp-bg);
}

.contact-layout {
  display: grid;
  max-width: 900px;
  gap: 54px;
  margin: 0 auto;
}

.contact-guide {
  padding: 44px 52px;
  background: var(--kp-white);
  border-top: 5px solid var(--kp-pink);
  border-radius: var(--kp-radius-sm);
}

.contact-guide h2 {
  margin-bottom: 24px;
  font-size: 25px;
}

.contact-guide>p {
  margin-bottom: 30px;
  color: var(--kp-muted);
  font-size: 14px;
  line-height: 2;
}

.contact-guide dl {
  margin: 0;
}

.contact-guide dl>div {
  padding: 20px 0;
  border-top: 1px solid var(--kp-line);
}

.contact-guide dt {
  margin-bottom: 7px;
  color: var(--kp-ink);
  font-size: 14px;
  font-weight: 800;
}

.contact-guide dd {
  margin: 0;
  color: var(--kp-muted);
  font-size: 13px;
  line-height: 1.8;
}

.contact-form-wrap {
  padding: 52px 56px 58px;
  background: var(--kp-white);
  border-radius: var(--kp-radius-md);
}

.contact-form__heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 42px;
}

.contact-form__heading h2 {
  margin: 0;
  font-size: clamp(27px, 2.8vw, 38px);
}

.contact-form__heading p {
  margin: 0;
  color: var(--kp-muted);
  font-size: 12px;
}

.contact-field {
  margin-bottom: 30px;
}

.contact-field label {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 11px;
  color: var(--kp-ink);
  font-size: 14px;
  font-weight: 800;
}

.contact-field label>span:not(.contact-required) {
  color: var(--kp-muted);
  font-size: 11px;
  font-weight: 700;
}

.contact-required {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  color: #a93f5b;
  background: var(--kp-pink-soft);
  border-radius: var(--kp-radius-pill);
  font-size: 10px;
  font-weight: 800;
}

.contact-field input,
.contact-field select,
.contact-field textarea {
  width: 100%;
  color: var(--kp-ink);
  background: var(--kp-bg);
  border: 1px solid var(--kp-line);
  border-radius: var(--kp-radius-sm);
  font: inherit;
  font-size: 16px;
  transition: border-color var(--kp-transition), box-shadow var(--kp-transition), background var(--kp-transition);
}

.contact-field input,
.contact-field select {
  height: 58px;
  padding: 0 17px;
}

.contact-field textarea {
  min-height: 210px;
  padding: 16px 17px;
  resize: vertical;
}

.contact-field input:focus,
.contact-field select:focus,
.contact-field textarea:focus {
  outline: 0;
  background: var(--kp-white);
  border-color: var(--kp-blue);
  box-shadow: 0 0 0 4px rgba(94, 183, 232, .16);
}

.contact-consent {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 40px 0 22px;
  font-size: 14px;
  line-height: 1.8;
}

.contact-consent input {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  margin-top: 3px;
  accent-color: var(--kp-blue);
}

.contact-consent a {
  color: var(--kp-blue-dark);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.contact-form__notice {
  margin-bottom: 28px;
  color: var(--kp-muted);
  font-size: 12px;
  line-height: 1.8;
}

.contact-form__submit {
  border: 0;
}

@media (max-width: 767.98px) {
  .contact-main {
    padding: 74px 0 86px;
  }

  .contact-layout {
    gap: 34px;
  }

  .contact-guide {
    padding: 32px 26px;
  }

  .contact-form-wrap {
    padding: 36px 24px 42px;
  }

  .contact-form__heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 34px;
  }

  .contact-field {
    margin-bottom: 25px;
  }

  .contact-form__submit {
    width: 100%;
  }
}

/* Contact Form 7 retains the existing field layout. */
.contact-form [hidden] { display: none !important; }
.contact-form .wpcf7-form-control-wrap { display: block; }
.contact-form .contact-consent .wpcf7-form-control-wrap { display: inline; }
.contact-form .contact-consent .wpcf7-list-item { margin: 0; }
.contact-form .contact-consent .wpcf7-list-item label { display: flex; gap: 12px; align-items: flex-start; }
.contact-form .wpcf7-not-valid-tip { margin-top: 8px; font-size: 13px; }
.contact-form .wpcf7-not-valid { border-color: #b3261e; }
.contact-form .kp-confirm dd { white-space: pre-wrap; overflow-wrap: anywhere; }
.contact-form .kp-form-actions { margin-bottom: 24px; }
.contact-form .wpcf7-response-output { margin: 24px 0 0; padding: 16px; border-radius: var(--kp-radius-sm); }
.contact-form .contact-form__submit { cursor: pointer; }

.contact-form .contact-form__notice + .contact-consent { margin-top: 16px; }
.contact-form .contact-form__notice a { color: var(--kp-blue-dark); text-decoration: underline; text-underline-offset: 4px; }


/* Keep the confirmation actions together and give both controls equal dimensions. */
.contact-form .contact-form__actions {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  max-width: 560px;
  margin: 32px auto 0;
}

.contact-form__actions .kp-button {
  flex: 1 1 0;
  min-height: 60px;
  max-width: 260px;
  padding: 14px 24px;
  text-align: center;
}

.contact-form__actions .kp-button--outline::after {
  content: none;
}

.contact-form__actions .wpcf7-spinner {
  position: absolute;
  top: calc(100% + 8px);
  left: calc(50% - 12px);
  margin: 0;
}

@media (max-width: 767.98px) {
  .contact-form .contact-form__actions {
    flex-direction: column;
    gap: 12px;
    margin-top: 28px;
  }

  .contact-form__actions .kp-button {
    flex: none;
    width: 100%;
    max-width: none;
    min-height: 60px;
  }
}


.contact-form.sent .wpcf7-response-output {
  display: none;
}

.contact-complete__message {
  margin: 20px 0 28px;
  line-height: 1.9;
}

.contact-complete__message p + p {
  margin-top: 16px;
}

.contact-complete__note {
  padding-top: 18px;
  border-top: 1px solid var(--kp-line);
  font-size: 13px;
}


/* The required-field guide is relevant until Contact Form 7 reports success. */
.contact-form-wrap--complete .contact-form__heading > p {
  display: none;
}

.contact-form .js-kp-contact-complete {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}

.contact-form .js-kp-contact-complete::after {
  position: absolute;
  z-index: -1;
  right: -28px;
  bottom: -42px;
  width: min(65%, 420px);
  aspect-ratio: 264.09 / 234.82;
  background: var(--kp-blue);
  opacity: .11;
  -webkit-mask: url('../images/kashiba-blob-mask.svg') center / contain no-repeat;
  mask: url('../images/kashiba-blob-mask.svg') center / contain no-repeat;
  pointer-events: none;
  content: '';
}

@media (max-width: 767.98px) {
  .contact-form .js-kp-contact-complete::after {
    right: -38px;
    bottom: -30px;
    width: 260px;
    opacity: .09;
  }
}
