/* forms: existing family composition and intentional responsive variants. */
.contact-layout {
  align-items: stretch;
}

.contact-form-shell,
.contact-media {
  grid-column: 1 / -1;
  width: 100%;
  max-width: none;
}

.contact-form-shell {
  display: flex;
  flex-direction: column;
  gap: var(--fs-space-8);
}

.contact-media__image {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: var(--fs-radius-lg);
}

@media (min-width: 64rem) {

  .contact-media {
    grid-column: 1 / span 5;
  }

  .contact-media__image {
    height: 100%;
  }

  .contact-form-shell {
    grid-column: 6 / -1;
  }}

/* Shared form presentation. Existing classes remain the public API; behavior stays in Ghost/contact JS. */
/* Ghost member signup */
.gh-form {
  display: flex;
  width: min(100%,35rem);
  flex-direction: column;
  gap: var(--fs-space-3);
}

.gh-form__label,
.contact-form__label {
  color: var(--foreground);
  font-size: var(--fs-font-sm);
  font-weight: var(--fs-weight-semibold);
  line-height: var(--fs-line-snug);
}

.gh-form__body {
  display: flex;
  flex-direction: column;
  gap: var(--fs-space-3);
}

.gh-form__control {
  display: grid;
  min-height: 3.5rem;
  grid-template-columns: minmax(0,1fr) auto;
  align-items: center;
  gap: var(--fs-space-2);
  padding: .375rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background:var(--muted);
  transition:border-color .2s,box-shadow .2s,background-color .2s;
}

.gh-form .gh-form__input {
  min-width: 0;
  min-height: 2.75rem;
  margin: 0;
  border: 0;
  border-radius: 999px;
  outline: 0;
  background: transparent;
  padding: .625rem 1rem;
  color: var(--foreground);
}

.gh-form .gh-form__input::placeholder,
.contact-form__input::placeholder {
  color: var(--muted-foreground);
  opacity: 1;
}

.gh-form .gh-form__submit {
  min-height: 2.75rem;
  white-space: nowrap;
}

.gh-form__notice,
.gh-form__error,
.gh-form__success,
.contact-form__field-error,
.contact-form__status,
.contact-form__error,
.contact-form__reference {
  font-size: var(--fs-font-sm);
  line-height: 1.5;
}

.gh-form__notice {
  color: var(--muted-foreground);
}

.gh-form__notice a,
.gh-form__success a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: .18em;
}

.gh-form__consent {
  display: flex;
  align-items: flex-start;
  gap: var(--fs-space-2);
}

.gh-form__success {
  display: none;
  color: var(--success);
  font-weight: var(--fs-weight-medium);
}

.gh-form__error,
.contact-form__field-error,
.contact-form__error {
  color: var(--error);
}

.gh-form__error:empty,
.contact-form__field-error:empty,
.contact-form__status:empty,
.contact-form__error:empty {
  display: none;
}

.gh-form.loading .gh-form__control {
  cursor: wait;
  opacity: .7;
}

.gh-form.loading .gh-form__submit {
  pointer-events: none;
}

.gh-form.success .gh-form__label,
.gh-form.success .gh-form__body {
  display: none;
}

.gh-form.success .gh-form__success {
  display: block;
}

/* Contact family retains its field geometry, optional consent and status panel. */
.contact-form {
  display: flex;
  width: 100%;
  flex-direction: column;
  gap: var(--fs-space-5);
}

.contact-form__name-fields {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--fs-space-5);
}

.contact-form__field {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: var(--fs-space-2);
}

.contact-form__label--visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.contact-form__input {
  width: 100%;
  min-height: 3.25rem;
  margin: 0;
  border: 1px solid var(--input);
  border-radius: var(--fs-radius-md);
  outline: 0;
  background: var(--muted);
  padding: .75rem 1rem;
  color: var(--foreground);
  font: inherit;
  transition: border-color .2s, box-shadow .2s, background-color .2s;
}

.contact-form__input:hover {
  border-color: var(--border);
  background: var(--background);
}

.gh-form__control:focus-within,
.contact-form__input:focus-visible {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb,var(--accent),transparent 78%);
  background: var(--background);
}

.contact-form__input[aria-invalid="true"] {
  border-color: var(--error);
}

.contact-form__textarea {
  min-height: 9rem;
  resize: vertical;
}

.contact-form__consent {
  display: flex;
  align-items: flex-start;
  gap: var(--fs-space-3);
  color: var(--muted-foreground);
  font-size: var(--fs-font-sm);
  line-height: 1.5;
}

.contact-form__checkbox {
  flex: 0 0 auto;
  width: 1.125rem;
  height: 1.125rem;
  margin: .15rem 0 0;
  accent-color: var(--accent);
}

.contact-form__checkbox:focus-visible {
  outline: 3px solid color-mix(in srgb,var(--accent),transparent 65%);
  outline-offset: 2px;
}

.contact-form__consent a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: .14em;
}

.contact-form__field-error,
.contact-form__status,
.contact-form__error,
.contact-form__reference {
  margin: 0;
}

.contact-form__status,
.contact-form__reference {
  color: var(--muted-foreground);
}

.contact-form__honeypot {
  position: absolute !important;
  left: -10000px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}

.contact-form__turnstile {
  min-height: 1px;
}

.contact-form__actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--fs-space-3);
}

.contact-form__submit:disabled {
  cursor: not-allowed;
  opacity: .55;
}

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

.contact-form__success {
  padding: var(--fs-space-6);
  border: 1px solid color-mix(in srgb,var(--success),transparent 65%);
  border-radius: var(--fs-radius-lg);
  background: color-mix(in srgb,var(--success),transparent 92%);
  color: var(--foreground);
}

.contact-form__success h2,
.contact-form__success p {
  margin: 0;
}

.contact-form__success h2 + p,
.contact-form__success p + p {
  margin-top: var(--fs-space-2);
}

@media (min-width: 36rem) {
  .contact-form__name-fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Compact newsletter layout retains its independent field focus ring. */
@media (max-width: 29.99rem) {
  .gh-form__control {
    grid-template-columns: 1fr;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
  }

  .gh-form__control:focus-within {
    box-shadow: none;
    background: transparent;
  }

  .gh-form .gh-form__input {
    min-height: 3rem;
    border: 1px solid var(--border);
    background: var(--muted);
  }

  .gh-form .gh-form__input:focus-visible {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px color-mix(in srgb,var(--accent),transparent 78%);
  }

  .gh-form .gh-form__submit {
    width: 100%;
    min-height: 3rem;
  }

}
