/* Contact hub (template-parts/home/contact-hub.php), converted from the guardrail
   sections/contact-hub.liquid stylesheet. Per-instance values arrive as --hg-contact-* custom
   properties on the section; the fallbacks are the Shopify schema defaults.
   The form card holds Contact Form 7 markup (div.wpcf7 > form.wpcf7-form.hg-contact__form, one
   p > label > span.wpcf7-form-control-wrap > control per field). It is styled to the Shopify
   field, label, button and status rules: the first two single-line fields share a row from
   750px like the Shopify name/email pair, everything else spans the form. Selectors carry the
   section class so they outrank the Ecomus field and button rules and Contact Form 7's own CSS. */

.hg-contact {
  padding-block: var(--hg-contact-pt-m, 48px) var(--hg-contact-pb-m, 64px);
  background: var(--hg-contact-bg, transparent);
  color: var(--hg-contact-text, #0b0b0b);
  font-family: var(--hg-font-body);
  font-size: 14px;
  line-height: 1.6;
}
.hg-contact__inner {
  box-sizing: border-box;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 32px;
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: 20px;
}
.hg-contact__aside { min-width: 0; }
.hg-contact .hg-contact__eyebrow {
  margin: 0 0 10px;
  color: var(--hg-contact-accent, var(--hg-accent));
  font-family: var(--hg-font-body);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}
.hg-contact .hg-contact__title {
  margin: 0 0 10px;
  color: inherit;
  font-size: var(--hg-contact-title-m, 32px);
  line-height: 1;
  letter-spacing: -0.025em;
  overflow-wrap: anywhere;
}
.hg-contact .hg-contact__intro {
  margin: 0 0 24px;
  color: var(--hg-contact-muted, #3d3933);
  font-size: 16px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}
.hg-contact__card {
  box-sizing: border-box;
  min-width: 0;
  padding: 20px;
  border: 1px solid var(--hg-contact-card-border, #e3ddd3);
  border-radius: var(--hg-contact-radius, 6px);
  background: var(--hg-contact-card-bg, #fff);
}
.hg-contact__card + .hg-contact__card { margin-top: 16px; }
.hg-contact .hg-contact__card-title {
  margin: 0 0 12px;
  color: inherit;
  font-size: 18px;
  line-height: 1.1;
  letter-spacing: 0;
  text-transform: none;
  overflow-wrap: anywhere;
}
.hg-contact .hg-contact__links {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.hg-contact .hg-contact__links > li { margin: 0; }
.hg-contact .hg-contact__link {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 48px;
  padding: 0 4px;
  border-bottom: 1px solid var(--hg-contact-divider, #eee8de);
  color: inherit;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.6;
  text-decoration: none;
  transition: none;
}
.hg-contact__link-label { min-width: 0; overflow-wrap: anywhere; }
.hg-contact__arrow {
  flex: none;
  color: var(--hg-contact-accent, var(--hg-accent));
  transition: transform 0.2s ease;
}
[dir="rtl"] .hg-contact__arrow { scale: -1 1; }
/* Drawn as the Shopify arrow glyph (Inter U+2192), which the self-hosted Inter subset lacks. */
.hg-contact__arrow svg { display: block; width: 15px; height: 10px; }
.hg-contact a.hg-contact__link:hover .hg-contact__link-label {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.hg-contact a.hg-contact__link:hover .hg-contact__arrow { transform: translateX(3px); }
[dir="rtl"] .hg-contact a.hg-contact__link:hover .hg-contact__arrow { transform: translateX(-3px); }
.hg-contact .hg-contact__link:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}
.hg-contact .hg-contact__detail {
  margin: 0 0 8px;
  font-size: 15px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.hg-contact .hg-contact__detail strong { font-weight: 700; }
.hg-contact .hg-contact__detail a {
  color: inherit;
  text-decoration: none;
  transition: none;
}
.hg-contact .hg-contact__detail a:hover {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.hg-contact .hg-contact__detail a:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

/* Form (Contact Form 7). */
.hg-contact .hg-contact__form {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  margin: 0;
}
.hg-contact .hg-contact__form > * {
  grid-column: 1 / -1;
  min-width: 0;
  margin: 0;
}
.hg-contact .hg-contact__form > p { position: relative; }
.hg-contact .hg-contact__form .hidden-fields-container { display: none; }
.hg-contact .hg-contact__form br { display: none; }
.hg-contact .hg-contact__form label {
  display: block;
  margin: 0;
  color: inherit;
  font-family: var(--hg-font-body);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.6;
  letter-spacing: 0;
  text-transform: uppercase;
}
.hg-contact .hg-contact__form .wpcf7-form-control-wrap {
  display: block;
  margin-top: 8px;
}
.hg-contact .hg-contact__form :is(.wpcf7-text, .wpcf7-textarea, .wpcf7-select, .wpcf7-number, .wpcf7-date) {
  box-sizing: border-box;
  display: block;
  width: 100%;
  max-width: none;
  min-height: 48px;
  margin: 0;
  padding: 10px 14px;
  border: 1px solid var(--hg-contact-field-border, #cfc8bc);
  border-radius: 4px;
  background-color: #fff;
  box-shadow: none;
  color: var(--hg-contact-text, #0b0b0b);
  font-family: var(--hg-font-body);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.6;
  letter-spacing: normal;
  text-transform: none;
  outline: 0;
  transition: border-color 0.2s ease;
}
/* Room for the select's arrow; a long topic ends in an ellipsis. */
.hg-contact .hg-contact__form .wpcf7-select {
  padding-right: 40px;
  text-overflow: ellipsis;
}
.hg-contact .hg-contact__form .wpcf7-textarea {
  height: 140px;
  min-height: 96px;
  resize: vertical;
}
.hg-contact .hg-contact__form ::placeholder {
  color: #757575;
  font-size: inherit;
  opacity: 1;
}
.hg-contact .hg-contact__form .wpcf7-not-valid { border-color: #7f1d1d; }
.hg-contact .hg-contact__form :is(.wpcf7-text, .wpcf7-textarea, .wpcf7-select, .wpcf7-number, .wpcf7-date):focus {
  border-color: var(--hg-contact-text, #0b0b0b);
}
.hg-contact .hg-contact__form :is(.wpcf7-text, .wpcf7-textarea, .wpcf7-select, .wpcf7-number, .wpcf7-date):focus-visible {
  outline: 2px solid var(--hg-contact-text, #0b0b0b);
  outline-offset: 1px;
}
.hg-contact .hg-contact__form .wpcf7-not-valid-tip {
  display: block;
  margin-top: 6px;
  color: #7f1d1d;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: normal;
  text-transform: none;
}
.hg-contact .hg-contact__form .wpcf7-submit {
  box-sizing: border-box;
  display: block;
  width: 100%;
  min-height: 52px;
  margin: 0;
  padding: 0 24px;
  border: 0;
  border-radius: 4px;
  background: var(--hg-contact-accent, var(--hg-accent));
  box-shadow: none;
  color: var(--hg-contact-btn-text, #fff);
  font-family: var(--hg-font-heading);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.6;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: filter 0.2s ease;
}
.hg-contact .hg-contact__form .wpcf7-submit:hover {
  border: 0;
  background: var(--hg-contact-accent, var(--hg-accent));
  color: var(--hg-contact-btn-text, #fff);
  filter: brightness(1.08);
}
.hg-contact .hg-contact__form .wpcf7-submit:focus-visible {
  outline: 2px solid var(--hg-contact-text, #0b0b0b);
  outline-offset: 3px;
}
.hg-contact .hg-contact__form .wpcf7-submit:disabled {
  cursor: not-allowed;
  filter: none;
  opacity: 0.45;
}
/* The spinner sits inside the button's end edge instead of adding a line below it: the small red
   spinner (base.css) in place of Contact Form 7's grey disc. */
.hg-contact .hg-contact__form .wpcf7-spinner {
  position: absolute;
  inset-block-start: 50%;
  inset-inline-end: 14px;
  width: 20px;
  height: 20px;
  margin: -10px 0 0;
  background: var(--hg-wait-spinner) center / contain no-repeat;
  opacity: 1;
}
.hg-contact .hg-contact__form .wpcf7-spinner::before {
  content: none;
}
/* It turns only while Contact Form 7 shows it. */
.hg-contact .hg-contact__form.submitting .wpcf7-spinner {
  animation: var(--hg-wait-spin);
}
/* On a slow connection the browser can paint the form before all of it has arrived: a field
   without its partner yet took the whole row, then halved when the next one came (owner,
   2026-10-20). The form stays invisible under the loading shade (base.css) until the marker after
   it (contact-hub.php) is parsed. */
.hg-contact__form-card > .wpcf7:not(:has(+ *)) {
  position: relative;
  visibility: hidden;
}
.hg-contact__form-card > .wpcf7:not(:has(+ *))::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 4px;
  background: var(--hg-wait);
  -webkit-backdrop-filter: var(--hg-wait-blur);
  backdrop-filter: var(--hg-wait-blur);
  visibility: visible;
  pointer-events: none;
}
.hg-contact__form-card > .wpcf7:not(:has(+ *))::after {
  content: "";
  position: absolute;
  inset: 0;
  width: 18px;
  height: 18px;
  margin: auto;
  background: var(--hg-wait-spinner) center / contain no-repeat;
  animation: var(--hg-wait-spin);
  visibility: visible;
  pointer-events: none;
}
/* Status message (Shopify .contact-hub__status). Contact Form 7 hides it until a reply arrives. */
.hg-contact .hg-contact__form .wpcf7-response-output {
  margin: 0;
  padding: 14px;
  border: 0;
  border-radius: 4px;
  background: #fdecec;
  color: #7f1d1d;
  font-size: 14px;
  line-height: 1.6;
}
.hg-contact .hg-contact__form .wpcf7-response-output:empty { display: none; }
.hg-contact .hg-contact__form.sent .wpcf7-response-output {
  background: #e7f4ea;
  color: #14532d;
}

@media (max-width: 749px) {
  .hg-contact--vis-desktop { display: none; }
}
@media (min-width: 750px) {
  .hg-contact { padding-block: var(--hg-contact-pt, 48px) var(--hg-contact-pb, 64px); }
  .hg-contact .hg-contact__form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  /* Single-line fields pair up, as Shopify's Name | Email and Order number | Topic rows; one left unpaired takes the row. */
  .hg-contact .hg-contact__form > p:has(.wpcf7-text, .wpcf7-select) { grid-column: auto; }
  .hg-contact .hg-contact__form > p:has(.wpcf7-text, .wpcf7-select):nth-of-type(odd):not(:has(+ p .wpcf7-text, + p .wpcf7-select)) { grid-column: 1 / -1; }
  .hg-contact--vis-mobile { display: none; }
}
@media (min-width: 768px) {
  .hg-contact .hg-contact__title { font-size: calc(var(--hg-contact-title, 63px) * 0.818); }
}
@media (min-width: 990px) {
  .hg-contact__inner {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
    gap: 56px;
    padding-inline: 40px;
  }
}
@media (min-width: 1200px) {
  .hg-contact .hg-contact__title { font-size: var(--hg-contact-title, 63px); }
}
@media (prefers-reduced-motion: reduce) {
  .hg-contact__arrow,
  .hg-contact .hg-contact__form :is(.wpcf7-text, .wpcf7-textarea, .wpcf7-select, .wpcf7-number, .wpcf7-date),
  .hg-contact .hg-contact__form .wpcf7-submit { transition: none; }
}
