/* Contact page.
   Loaded only by contact.html via the base template's {% block styles %}.
   Colours and spacing follow style.css: the #e01a2b action colour from
   .skillButton, the --nav-* tokens, and the same centred column and entry
   rhythm used on the home and projects pages. */

.contact-intro {
  margin-top: 0;
  margin-bottom: 2rem;
  line-height: 1.5;
}

.contact-form .field {
  margin-bottom: 1.5rem;
}

.contact-form label {
  display: block;
  margin-bottom: 0.4rem;
  color: var(--nav-text);
  font-size: 0.9em;
  letter-spacing: 0.02em;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 0.6em 0.75em;
  /* Inherit rather than accept the browser's default form font. */
  font-family: inherit;
  font-size: 1rem;
  color: var(--nav-text);
  background-color: #ffffff;
  border: 1px solid #c7d4ee;
  border-radius: 4px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.contact-form textarea {
  resize: vertical;
  min-height: 8rem;
  line-height: 1.5;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--nav-line);
  /* A visible focus ring, not just a colour change -- colour alone is not a
     sufficient focus indicator. */
  box-shadow: 0 0 0 3px rgba(162, 191, 254, 0.55);
}

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

.field-error {
  margin: 0.4rem 0 0;
  font-size: 0.85em;
  color: #c21726; /* 4.9:1 on white */
}

/* Same shape and colour as .skillButton, so buttons read as one family. */
.contact-submit {
  font-family: inherit;
  font-size: 1rem;
  padding: 0.6em 1.5em;
  background-color: #e01a2b;
  color: #ffffff;
  text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.1);
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.contact-submit:hover,
.contact-submit:focus-visible {
  background-color: #b82d47;
}

.contact-submit:focus-visible {
  outline: 3px solid rgba(162, 191, 254, 0.9);
  outline-offset: 2px;
}

.form-status {
  padding: 1rem 1.25rem;
  border-radius: 4px;
  line-height: 1.5;
  margin-top: 0;
}

.form-status-success {
  background-color: #eaf3ea;
  border-left: 4px solid #2e7d4f;
  color: #1c4a30; /* 8.2:1 on the panel */
}

.form-status-error {
  background-color: #fdecee;
  border-left: 4px solid #e01a2b;
  color: #8c1220; /* 7.6:1 on the panel */
}

.contact-reset {
  color: #e01a2b;
}

/* Off-screen rather than display:none -- some bots skip hidden inputs. */
.honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

@media (max-width: 589px) {
  /* The shared rule centres text on narrow screens; form labels and errors
     read better kept to the left of their fields. */
  .contact-form label,
  .field-error {
    text-align: left;
  }
}
