.contact-hero {
  padding: 76px 0;
  background: #eef3f8;
}

.contact-hero-content {
  max-width: 760px;
}

.contact-hero h1 {
  margin: 0;
  color: #172033;
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  line-height: 1.1;
}

.contact-hero p {
  margin: 22px 0 0;
  color: #455268;
  font-size: 1.15rem;
  line-height: 1.65;
}

.contact-section {
  padding: 72px 0;
  background: #ffffff;
}

.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 36px;
  align-items: start;
}

.contact-details,
.contact-form,
.form-row,
.form-field {
  min-width: 0;
}

.contact-details h2 {
  margin: 0;
  color: #172033;
  font-size: 2rem;
  line-height: 1.2;
}

.contact-details p {
  margin: 16px 0 0;
  color: #455268;
  font-size: 1.05rem;
  line-height: 1.65;
}

.contact-callout {
  margin-top: 28px;
  padding: 22px;
  border: 1px solid #dfe3ea;
  border-radius: 6px;
  background: #f7f8fa;
}

.contact-callout h3 {
  margin: 0;
  color: #172033;
  font-size: 1.1rem;
  line-height: 1.25;
}

.contact-callout a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  margin-top: 10px;
  padding: 12px 22px;
  border: 1px solid transparent;
  border-radius: 999px;
  color: #ffffff;
  background: var(--color-carmine);
  font-family: var(--font-heading);
  font-weight: 700;
  letter-spacing: 0.03em;
  text-align: center;
  text-transform: uppercase;
  transition: background 160ms ease, outline-color 160ms ease;
}

.contact-callout a:hover,
.contact-callout a:focus {
  color: #ffffff;
  background: #b90036;
}

.contact-callout a:focus {
  outline: 3px solid rgba(215, 0, 64, 0.24);
  outline-offset: 3px;
}

.contact-form {
  display: grid;
  gap: 18px;
  padding: 28px;
  border: 1px solid #dfe3ea;
  border-radius: 6px;
  background: #ffffff;
}

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

.form-field {
  display: grid;
  gap: 7px;
}

.form-field label {
  color: #172033;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.3;
}

.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  min-height: 46px;
  padding: 11px 12px;
  border: 1px solid #c8d0dc;
  border-radius: 6px;
  color: #172033;
  background: #ffffff;
  font: inherit;
}

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

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  border-color: #0a4f8f;
  outline: 3px solid rgba(10, 79, 143, 0.16);
}

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

.form-note,
.form-status {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.45;
}

.form-note {
  color: #536074;
}

.form-status {
  display: none;
  padding: 12px 14px;
  border-radius: 6px;
  font-weight: 700;
}

.form-status.is-visible {
  display: block;
}

.form-status.is-success {
  color: #0f5132;
  background: #e9f7ef;
  border: 1px solid #b7dfc8;
}

.form-status.is-error {
  color: #842029;
  background: #f8d7da;
  border: 1px solid #f1aeb5;
}

.form-status.is-pending {
  color: #5c4200;
  background: #fff4d5;
  border: 1px solid #f2d078;
}

.form-submit {
  width: fit-content;
  border: 0;
  cursor: pointer;
}

.form-submit:disabled {
  cursor: not-allowed;
  opacity: 0.72;
}

@media (max-width: 900px) {
  .contact-layout {
    grid-template-columns: 1fr;
  }

  .contact-details {
    max-width: 720px;
  }
}

@media (max-width: 699px) {
  .contact-hero {
    padding: 42px 0;
  }

  .contact-hero h1 {
    max-width: 10em;
    font-size: clamp(1.55rem, 7vw, 1.7rem);
    line-height: 1.18;
    overflow-wrap: break-word;
  }

  .contact-hero p {
    max-width: min(100%, 20rem);
    margin-top: 14px;
    font-size: 0.92rem;
    line-height: 1.55;
    overflow-wrap: break-word;
  }

  .contact-section {
    padding: 40px 0;
  }

  .contact-layout {
    gap: 24px;
  }

  .contact-details h2 {
    font-size: 1.32rem;
    line-height: 1.25;
  }

  .contact-details p {
    max-width: min(100%, 20rem);
    margin-top: 12px;
    font-size: 0.88rem;
    line-height: 1.55;
    overflow-wrap: break-word;
  }

  .contact-callout {
    margin-top: 20px;
    padding: 15px;
  }

  .contact-form {
    gap: 14px;
    padding: 16px;
  }

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

  .form-field label,
  .form-note,
  .form-status {
    font-size: 0.88rem;
  }

  .form-submit {
    width: 100%;
  }
}

@media (max-width: 479px) {
  .contact-hero {
    padding: 36px 0;
  }

  .contact-hero h1 {
    font-size: 1.55rem;
  }

  .contact-hero p,
  .contact-details p {
    font-size: 0.84rem;
  }

  .contact-form {
    padding: 14px;
  }
}
