/* Contact form: intro on the left, the form in a card on the right; on
 * phones one above the other. Made to work by shared/form/. */
.form-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
  gap: 48px;
  align-items: start;
}

.form-intro .desc {
  color: var(--muted);
  max-width: 44ch;
}

.form-intro .desc p {
  margin: 0 0 .8em;
}

.form-note {
  font-size: .85rem;
  color: var(--muted);
}

.form-card {
  display: grid;
  gap: 18px;
  padding: 28px;
}

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

.field {
  display: grid;
  align-content: start;
  gap: 6px;
  min-width: 0;
}

.field label {
  font-weight: 600;
  font-size: .92rem;
}

.req {
  color: var(--highlight);
}

.field input:not([type="checkbox"]),
.field select,
.field textarea {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font: inherit;
  font-size: 1rem;
  background: var(--bg);
  color: var(--text);
}

.field textarea {
  resize: vertical;
  min-height: 120px;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: -1px;
  border-color: transparent;
}

.field [aria-invalid="true"] {
  border-color: var(--status-sold);
}

.field-error {
  margin: 0;
  font-size: .85rem;
  color: var(--status-sold);
}

.field-error[hidden] {
  display: none;
}

.consent .check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-weight: 400;
  font-size: .88rem;
  line-height: 1.45;
  color: var(--muted);
  cursor: pointer;
}

.consent input {
  flex: none;
  width: 18px;
  height: 18px;
  margin: 1px 0 0;
  accent-color: var(--accent);
}

/* Spam trap: off screen for people, still there for bots. */
.hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-submit {
  justify-self: start;
  padding: 13px 28px;
  border: 0;
  border-radius: 999px;
  font: inherit;
  font-weight: 700;
  background: var(--accent);
  color: var(--accent-text);
  cursor: pointer;
}

.form-submit:hover {
  filter: brightness(1.1);
}

.form-submit:disabled {
  opacity: .6;
  cursor: progress;
}

.form-status {
  margin: 0;
  font-size: .92rem;
  color: var(--muted);
}

.form-status[hidden] {
  display: none;
}

.form-status.is-error {
  color: var(--status-sold);
}

.form-thanks {
  justify-items: center;
  padding: 48px 28px;
  text-align: center;
  font-size: 1.1rem;
  outline: none;
}

.form-thanks svg {
  width: 48px;
  height: 48px;
  color: var(--status-available);
}

.form-thanks p {
  margin: 0;
}

@media (max-width: 800px) {
  .form-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }
}

@media (max-width: 520px) {
  .form-row {
    grid-template-columns: 1fr;
  }

  .form-card {
    padding: 20px;
  }

  .form-submit {
    justify-self: stretch;
  }
}
