/* ==========================================================================
   Contact — form page (page-templates/contact.php only)

   Loaded only on this template. Built from the tokens in theme.css; the button
   is the site's .btn and the closing band above the footer is the site's
   .site-cta, so the only thing described here is the form itself.
   ========================================================================== */

.contact-hero,
.contact-body {
  /* Same editorial serif the brand pages use, named on this page's own
     headings only so nothing else inherits it. */
  --contact-display: "Cormorant Garamond", "Outfit", Georgia, serif;
}

/* -------------------------------------------------------------------------- */
/* Hero                                                                       */
/* -------------------------------------------------------------------------- */

.contact-hero {
  padding-block: clamp(44px, 5.5vw, 84px) clamp(28px, 3.5vw, 48px);
  background: var(--color-bg-card);
}

.contact-hero__inner {
  max-width: 660px;
}

.contact-hero .eyebrow {
  margin-bottom: 14px;
}

.contact-hero__eyebrow::before {
  content: "";
  display: block;
  width: 40px;
  height: 1px;
  margin-bottom: 18px;
  background: var(--color-honey);
}

.contact-hero__title {
  margin-bottom: 20px;
  font-family: var(--contact-display);
  font-size: clamp(34px, 4.4vw, 60px);
  font-weight: var(--fw-display-medium);
  letter-spacing: var(--ls-display);
  line-height: 1.06;
  color: var(--color-primary);
}

.contact-hero__text {
  max-width: 54ch;
  font-size: var(--fs-lg);
  color: var(--color-text-muted);
}

/* -------------------------------------------------------------------------- */
/* Body: form and details                                                     */
/* -------------------------------------------------------------------------- */

.contact-body {
  padding-block: clamp(32px, 4vw, 56px) clamp(64px, 8vw, 116px);
  background: var(--color-bg-card);
}

/* The form is the page, so it takes the wide column. The details beside it are
   a short list and never earn half the width. */
.contact-body__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 0.9fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: start;
}

.contact-form-panel,
.contact-aside {
  min-width: 0;
}

.contact-form-panel__title,
.contact-aside__title {
  margin-bottom: 22px;
  font-family: var(--font-ui);
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--ls-label);
  line-height: 1.4;
  text-transform: uppercase;
  color: var(--color-primary);
}

/* -------------------------------------------------------------------------- */
/* Status                                                                     */
/* -------------------------------------------------------------------------- */

/* The empty placeholder keeps #contact-status on the page for the redirect to
   land on, and must not leave a gap when there is nothing to say. */
#contact-status:empty {
  display: block;
  height: 0;
}

/* The redirect lands on #contact-status, and the header is sticky — without
   this the browser scrolls the confirmation to y=0 and parks it underneath the
   header, hiding the one line the visitor came back to read. */
#contact-status {
  scroll-margin-top: calc(var(--header-height) + 24px);
}

.contact-status {
  margin-bottom: 26px;
  padding: 18px 20px;
  border: 1px solid var(--color-border);
  border-left-width: 3px;
  border-radius: var(--radius-md);
  font-size: var(--fs-md);
  line-height: var(--lh-body);
  color: var(--color-text-muted);
}

/* The state is carried by the wording first — "Thank you" against "wasn't
   sent" — with colour only confirming it, so nothing here depends on seeing
   the difference between green and terracotta. */
.contact-status--sent {
  border-left-color: var(--color-primary);
  background: var(--color-bg);
}

.contact-status--error {
  border-left-color: var(--color-accent);
  background: var(--color-bg);
}

.contact-status__title {
  margin-bottom: 4px;
  font-weight: var(--fw-semibold);
  color: var(--color-primary);
}

.contact-status--error .contact-status__title {
  color: var(--color-accent-deep);
}

/* A focused status message is announced, not outlined — it is text the visitor
   was sent to, not a control they can act on. */
.contact-status:focus {
  outline: none;
}

/* -------------------------------------------------------------------------- */
/* Form                                                                       */
/* -------------------------------------------------------------------------- */

.contact-form__note {
  margin-bottom: 20px;
  font-size: var(--fs-sm);
  color: var(--color-text-light);
}

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

.contact-form .field,
.contact-form__row {
  margin-bottom: 18px;
}

.field {
  min-width: 0;
}

.field__label {
  display: block;
  margin-bottom: 7px;
  font-family: var(--font-ui);
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  color: var(--color-primary);
}

.field__required {
  color: var(--color-accent-deep);
}

.field__optional {
  font-weight: var(--fw-regular);
  color: var(--color-text-light);
}

.field__input {
  width: 100%;
  min-height: var(--btn-min-height);
  padding: 12px 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-btn);
  background: var(--color-white);
  font-family: var(--font-ui);
  font-size: var(--fs-md);
  line-height: var(--lh-body);
  color: var(--color-text);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.field__input::placeholder {
  color: var(--color-text-light);
}

/* A forest hairline plus a soft ring, so the focused field is obvious without
   the browser's default outline sitting outside the rounded corner. The
   focus-visible ring elsewhere on the site is untouched. */
.field__input:focus-visible {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgb(24 58 42 / 14%);
}

.field__textarea {
  min-height: 160px;
  resize: vertical;
}

/* The native arrow is drawn here rather than left to the browser, which renders
   it differently on every platform and ignores the field's border radius. */
.field__select {
  appearance: none;
  padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23183a2a' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 13px center;
  background-size: 18px 18px;
  cursor: pointer;
}

.field--invalid .field__input {
  border-color: var(--color-accent);
}

/* The error names the field and is tied to it by aria-describedby, so it is
   read out with the input rather than sitting as loose text nearby. */
.field__error {
  margin-top: 7px;
  font-size: var(--fs-sm);
  line-height: 1.5;
  color: var(--color-accent-deep);
}

/* Honeypot. Out of sight and out of the tab order, but still in the layout as
   far as a form-filling script is concerned.

   Clipped the way .visually-hidden in theme.css is, rather than pushed off to
   left: -9999px: the old trick sits outside the page on the inline-start side,
   which is harmless here but becomes real horizontal overflow the moment
   anything renders right-to-left. This has no side. */
.contact-form__trap {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.contact-form__actions {
  margin-top: 26px;
}

/* -------------------------------------------------------------------------- */
/* Details                                                                    */
/* -------------------------------------------------------------------------- */

.contact-aside {
  padding: 28px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-bg);
}

.contact-details__item + .contact-details__item {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--color-border);
}

.contact-details dt {
  margin-bottom: 5px;
  font-family: var(--font-ui);
  font-size: var(--fs-2xs);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--ls-label);
  text-transform: uppercase;
  color: var(--color-honey-deep);
}

.contact-details dd {
  margin: 0;
  font-size: var(--fs-md);
  line-height: 1.5;
  color: var(--color-text);
}

.contact-details dd a {
  border-bottom: 1px solid var(--color-border);
}

.contact-details dd a:hover {
  border-bottom-color: var(--color-primary);
}

/* An empty list means no channel has been filled in yet; the note below still
   needs the space above it. */
.contact-details:empty {
  display: none;
}

.contact-aside__note {
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px solid var(--color-border);
  font-size: var(--fs-sm);
  line-height: var(--lh-body);
  color: var(--color-text-muted);
}

.contact-aside__note-title {
  margin-bottom: 4px;
  font-weight: var(--fw-semibold);
  color: var(--color-primary);
}

/* -------------------------------------------------------------------------- */
/* Responsive                                                                 */
/* -------------------------------------------------------------------------- */

@media (max-width: 900px) {
  /* The details are reference, the form is the task — so the form stays first
     and the panel follows it rather than pushing it down the page. */
  .contact-body__grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 36px;
  }
}

@media (max-width: 700px) {
  .contact-hero__text {
    font-size: var(--fs-md);
  }

  /* Two fields side by side leaves each about 160px on a phone. */
  .contact-form__row {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    margin-bottom: 0;
  }

  .contact-form__row .field {
    margin-bottom: 18px;
  }

  .contact-aside {
    padding: 22px;
  }

  /* Full width, so the target is unmissable at the end of a long form. */
  .contact-form__actions .btn {
    width: 100%;
  }
}
