/* Contact */

.contact-wrapper{
  max-width: min(1000px, 92vw);
  margin-top: calc(var(--header-height) + .3rem);
  padding: 1.4rem 1.6rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background: var(--color-surface-alt);
  border: 1px solid var(--color-border-soft);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.page-title{
  margin-top: 0;
  margin-bottom: 1rem;
  font-family: var(--font-title);
  font-size: 30px;
  color: var(--color-text);
}

.page-intro{
  margin-top: 0;
  margin-bottom: 1rem;
  font-family: var(--font-body);
  color: var(--color-text);
}

/* Contact form: same fields and look as the former Tally form. */
.contact-form{
  width: 100%;
  max-width: 720px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: .5rem;
  text-align: left;
}

.contact-row{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.contact-field{
  position: relative;
}

/* Labels stay for screen readers; the placeholders show the field names. */
.contact-label,
.contact-trap{
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.contact-field input,
.contact-field textarea{
  display: block;
  width: 100%;
  padding: 9px 12px;
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--color-brown);
  background: #fcf4ea;
  border: 1px solid #cdbfac;
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(74, 46, 31, .06);
}

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

.contact-field input::placeholder,
.contact-field textarea::placeholder{
  color: #a3968a;
}

.contact-field input:focus,
.contact-field textarea:focus{
  outline: none;
  border-color: #8a5a2b;
  box-shadow: 0 0 0 3px rgba(138, 90, 43, .18);
}

/* Required marker in the top-right corner, as on the Tally form. */
.contact-field--required::after{
  content: "*";
  position: absolute;
  top: -7px;
  right: -7px;
  width: 15px;
  height: 15px;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  color: var(--color-brown);
  background: #ddd3bd;
  border-radius: 50%;
  pointer-events: none;
}

.contact-submit{
  align-self: flex-start;
  margin-top: 8px;
  padding: 8px 14px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  background: #7c3f12;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
}

.contact-submit:hover,
.contact-submit:focus-visible{
  background: #63310d;
}

.contact-notice{
  width: 100%;
  max-width: 720px;
  margin: 0 0 .8rem;
  padding: .7rem 1rem;
  font-family: var(--font-body);
  text-align: left;
  border-radius: 8px;
}

.contact-notice p{
  margin: 0;
}

.contact-notice--success{
  color: #2f5a2a;
  background: #e5f0dc;
}

.contact-notice--error{
  color: #7a2416;
  background: #f8e1d8;
}

.contact-privacy{
  width: 100%;
  max-width: 720px;
  margin: 1rem 0 0;
  font-family: var(--font-body);
  font-size: .9rem;
  text-align: left;
  color: var(--color-brown-soft);
}

.contact-privacy a{
  color: inherit;
  text-decoration: underline;
}

.contact-wrapper,
.contact-wrapper + *,
.contact-wrapper main{
  padding-top: 0;
}

@media (max-width: 640px){
  .contact-wrapper{
    padding: 16px;
    border-radius: var(--radius-md);
  }

  .contact-row{
    grid-template-columns: 1fr;
  }
}