.contact-page {
  background-position: center top;
  background-attachment: fixed;
}

.contact-page::before {
  background: linear-gradient(90deg, rgba(251, 248, 244, .86) 0%, rgba(251, 248, 244, .66) 52%, rgba(251, 248, 244, .4) 100%);
}

.contact-page main {
  align-items: flex-start;
}

.contact-content {
  width: min(1080px, calc(100% - 4rem));
  margin: 0 auto;
  padding: 1.5rem 0 5rem;
}

.contact-surface {
  width: min(900px, 100%);
  margin-top: 2.2rem;
  padding: clamp(2.2rem, 4.5vw, 4rem);
  background: rgba(255, 252, 249, .88);
  border-radius: 22px;
  box-shadow: 0 18px 48px rgba(31, 45, 55, .08);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.contact-heading,
.contact-intro,
.contact-form {
  max-width: 720px;
}

.contact-heading h1 {
  margin: 0;
  color: var(--navy);
  font-size: clamp(2.8rem, 5.2vw, 4.8rem);
  line-height: 1.03;
  letter-spacing: -.045em;
}

.contact-heading .accent-line {
  margin: 1.25rem 0 1.2rem;
}

.contact-lead {
  margin: 0;
  color: var(--blue);
  font-size: clamp(1.25rem, 2vw, 1.6rem);
  font-weight: 700;
  line-height: 1.45;
}

.contact-intro {
  margin-top: 2.4rem;
  font-size: clamp(1.04rem, 1.3vw, 1.15rem);
  line-height: 1.78;
}

.contact-intro p {
  margin: 0 0 1.25rem;
}

.contact-intro .contact-choice {
  margin: 2rem 0 0;
  padding: .15rem 0 .15rem 1.25rem;
  color: var(--navy);
  border-left: 4px solid var(--sand);
  font-size: clamp(1.18rem, 1.7vw, 1.4rem);
  font-weight: 700;
}

.contact-form {
  margin-top: 3rem;
  padding-top: 2.6rem;
  border-top: 1px solid rgba(6, 47, 77, .16);
}

.contact-field + .contact-field {
  margin-top: 1.5rem;
}

.contact-field label {
  display: block;
  margin-bottom: .55rem;
  color: var(--navy);
  font-weight: 700;
}

.contact-field label span {
  color: #526b7c;
  font-size: .9rem;
  font-weight: 500;
}

.contact-field input,
.contact-field textarea {
  display: block;
  width: 100%;
  padding: .95rem 1rem;
  color: var(--ink);
  background: rgba(255, 255, 255, .9);
  border: 1px solid rgba(6, 47, 77, .28);
  border-radius: 10px;
  font: inherit;
  line-height: 1.5;
  box-shadow: inset 0 1px 2px rgba(31, 45, 55, .04);
}

.contact-field textarea {
  min-height: 13rem;
  resize: vertical;
}

.contact-field input::placeholder,
.contact-field textarea::placeholder {
  color: #637886;
  opacity: 1;
}

.contact-field input:focus-visible,
.contact-field textarea:focus-visible {
  border-color: var(--blue);
  outline: 3px solid rgba(25, 98, 150, .2);
  outline-offset: 2px;
}

.contact-field input[aria-invalid="true"],
.contact-field textarea[aria-invalid="true"] {
  border-color: var(--red);
}

.contact-message-meta {
  min-height: 1.7rem;
  margin-top: .45rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
}

.field-error {
  margin: 0;
  color: #a31e18;
  font-size: .93rem;
  font-weight: 650;
  line-height: 1.45;
}

.character-count {
  margin: 0 0 0 auto;
  color: #526b7c;
  font-size: .9rem;
  white-space: nowrap;
}

.character-count[data-limit-reached="true"] {
  color: var(--red);
  font-weight: 700;
}

.contact-honeypot {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
  border: 0 !important;
  white-space: nowrap !important;
}

.contact-status {
  margin-top: 1.6rem;
  padding: .9rem 1rem;
  border-radius: 9px;
  line-height: 1.55;
}

.contact-status[data-state="success"] {
  color: #164f35;
  background: #e7f4ec;
  border-left: 4px solid #3d8963;
}

.contact-status[data-state="error"] {
  color: #761b17;
  background: #fff0ef;
  border-left: 4px solid var(--red);
}

.contact-actions {
  margin-top: 1.8rem;
  display: flex;
  justify-content: flex-end;
  gap: .8rem;
}

.contact-button {
  min-height: 46px;
  padding: .75rem 1.35rem;
  border: 1px solid transparent;
  border-radius: 9px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.contact-button:focus-visible {
  outline: 3px solid rgba(25, 98, 150, .25);
  outline-offset: 3px;
}

.contact-button--primary {
  color: #fff;
  background: var(--navy);
}

.contact-button--primary:hover:not(:disabled) {
  background: var(--blue);
}

.contact-button--primary:disabled {
  cursor: not-allowed;
  opacity: .65;
}

.contact-button--primary[aria-busy="true"] {
  cursor: wait;
}

.contact-button--secondary {
  color: var(--navy);
  background: transparent;
  border-color: rgba(6, 47, 77, .3);
}

.contact-button--secondary:hover {
  background: rgba(6, 47, 77, .06);
}

@media (max-width: 620px) {
  .contact-content {
    width: calc(100% - 2rem);
    padding-top: 1rem;
  }

  .contact-surface {
    margin-top: 1.5rem;
    padding: 1.5rem 1.2rem;
    border-radius: 16px;
  }

  .contact-form {
    margin-top: 2.4rem;
    padding-top: 2rem;
  }

  .contact-message-meta {
    display: block;
  }

  .character-count {
    margin-top: .4rem;
    text-align: right;
  }

  .contact-actions {
    flex-direction: column-reverse;
  }

  .contact-button {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .contact-button {
    transition: none;
  }
}
