.contact-button {
  border: 0;
  font: inherit;
  cursor: pointer;
}

.contact-dialog {
  width: min(760px, calc(100% - 32px));
  max-height: calc(100dvh - 32px);
  padding: 0;
  border: 0;
  color: var(--black);
  background: transparent;
  overflow: visible;
}

.contact-dialog::backdrop {
  background: rgba(0, 0, 0, .72);
  backdrop-filter: blur(8px);
}

.contact-dialog-shell {
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  background: var(--paper);
  box-shadow: 0 30px 90px rgba(0, 0, 0, .42);
}

.contact-dialog-head {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 26px 32px;
  border-bottom: 1px solid var(--line);
  background: rgba(242, 240, 233, .96);
  backdrop-filter: blur(12px);
}

.contact-dialog-head p {
  margin: 0 0 4px;
  color: var(--orange);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .22em;
}

.contact-dialog-head h2 {
  margin: 0;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.2;
}

.contact-dialog-close {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: var(--black);
  font-size: 27px;
  font-weight: 300;
  line-height: 1;
  cursor: pointer;
  transition: border-color .25s ease, color .25s ease, transform .25s ease;
}

.contact-dialog-close:hover,
.contact-dialog-close:focus-visible {
  border-color: var(--orange);
  color: var(--orange);
  transform: rotate(90deg);
}

.contact-dialog-body {
  padding: 32px;
}

.contact-dialog-intro {
  margin: 0 0 28px;
  color: #555;
  font-size: 13px;
}

.contact-form {
  display: grid;
  gap: 22px;
}

.contact-form label {
  display: grid;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
}

.contact-form label b,
.contact-consent b {
  color: var(--orange);
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  border: 1px solid rgba(17, 17, 17, .24);
  border-radius: 0;
  background: #fff;
  color: var(--black);
  font: inherit;
  font-size: 14px;
  padding: 14px 15px;
  outline: none;
  transition: border-color .2s ease, box-shadow .2s ease;
}

.contact-form textarea {
  min-height: 150px;
  resize: vertical;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(237, 74, 34, .12);
}

.contact-form input[aria-invalid="true"],
.contact-form textarea[aria-invalid="true"] {
  border-color: #c33520;
  background: #fff7f4;
}

.contact-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.contact-consent {
  display: flex !important;
  grid-template-columns: none !important;
  align-items: flex-start;
  gap: 10px !important;
  color: #555;
  font-weight: 500 !important;
  line-height: 1.7;
}

.contact-consent input {
  width: 18px;
  height: 18px;
  margin: 3px 0 0;
  padding: 0;
  accent-color: var(--orange);
  flex: 0 0 auto;
}

.contact-consent a {
  color: var(--black);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.contact-form-status {
  min-height: 0;
  margin: 0;
  color: #b22916;
  font-size: 12px;
}

.contact-submit {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 18px 20px;
  border: 0;
  background: var(--orange);
  color: #fff;
  font: inherit;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  transition: background .25s ease, transform .25s ease;
}

.contact-submit:hover,
.contact-submit:focus-visible {
  background: var(--black);
  transform: translateY(-2px);
}

.contact-submit:disabled {
  cursor: wait;
  opacity: .6;
  transform: none;
}

.contact-honeypot {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.contact-success {
  padding: clamp(38px, 8vw, 78px) 20px;
  text-align: center;
}

.contact-success > span {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin: 0 auto 20px;
  border-radius: 50%;
  background: var(--orange);
  color: #fff;
  font-size: 28px;
}

.contact-success h3 {
  margin: 0 0 10px;
  font-size: 24px;
}

.contact-success p {
  margin: 0 0 28px;
  color: #555;
  font-size: 13px;
}

.contact-success button {
  min-width: 160px;
  padding: 13px 22px;
  border: 1px solid var(--black);
  background: transparent;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

body.contact-dialog-open {
  overflow: hidden;
}

@media (max-width: 560px) {
  .contact-dialog {
    width: calc(100% - 20px);
    max-height: calc(100dvh - 20px);
  }

  .contact-dialog-shell {
    max-height: calc(100dvh - 20px);
  }

  .contact-dialog-head,
  .contact-dialog-body {
    padding: 22px 20px;
  }

  .contact-form-row {
    grid-template-columns: 1fr;
    gap: 22px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .contact-dialog-close,
  .contact-submit {
    transition: none;
  }
}
