/* The contact form under the answer: an email, an optional note, one
   button. Once sent, the fields give way to the confirmation. */
.contact {
  display: grid;
  gap: clamp(14px, 2vh, 18px);
  max-width: 36rem;
  margin-top: clamp(8px, 1.6vh, 16px);
}

.field { display: grid; gap: 8px; }
.field-label { font-size: 0.95rem; font-weight: 500; }
.field-label em { font-style: italic; font-weight: 400; color: var(--muted); margin-left: 0.3em; }

.field input,
.field textarea {
  box-sizing: border-box;
  width: 100%;
  padding: 0.75em 0.95em;
  border: 1px solid color-mix(in srgb, var(--sap) 32%, transparent);
  border-radius: 12px;
  background: color-mix(in srgb, var(--leaf-deep) 70%, transparent);
  color: var(--text);
  font: inherit;
  font-size: 1.02rem;
  line-height: 1.5;
  transition: border-color 0.2s ease;
}
.field textarea { resize: vertical; min-height: 6.5em; }
.field input:focus,
.field textarea:focus { outline: none; border-color: var(--bud); }

/* Bots fill in every field; people never see this one. */
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.send { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.send button {
  padding: 0.8em 1.7em;
  border: 0;
  border-radius: 999px;
  background: var(--bud);
  color: var(--leaf);
  font: inherit;
  font-size: 1.05rem;
  font-weight: 500;
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.send button:hover { transform: translateY(-1px); }
.send button:focus-visible { outline: 2px solid var(--bud); outline-offset: 4px; }
.send button:disabled { opacity: 0.6; cursor: progress; transform: none; }
.promise { margin: 0; font-size: 0.92rem; line-height: 1.5; color: var(--muted); flex: 1 1 14rem; }

.contact-status { margin: 0; line-height: 1.5; }
.contact-status:empty { display: none; }
.contact[data-state="failed"] .contact-status { color: var(--berry); }
.contact[data-state="sent"] .field,
.contact[data-state="sent"] .send { display: none; }
.contact[data-state="sent"] .contact-status { font-size: clamp(1.1rem, 1.6vw, 1.3rem); color: var(--bud); }

@media (prefers-reduced-motion: reduce) {
  .field input, .field textarea, .send button { transition: none; }
}
