/* Homepage: "Make an enquiry / Visit us" band (#enquiry), between #why and #faq.
   An ink band (light sections sit either side) holding a white form card and the office map.
   The form reuses the contact page's .ct-* markup and assets/js/pages/contact.js; the rules it
   needs are copied from contact.css and scoped to .he-card, which re-points the dark-band tokens
   back to their light values. Keep the two in step if the contact form styles change. */

.he__grid { display: grid; gap: clamp(1.5rem, 3vw, 2.5rem); align-items: stretch; }
@media (min-width: 1000px) { .he__grid { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); } }

/* ---------- Form card ---------- */
.he-card {
  --text: var(--ink-text); --muted: var(--ink-muted);
  --line: rgba(15, 29, 54, .1); --line-strong: rgba(15, 29, 54, .2);
  --gold: #b8913f; --gold-2: #96742c; --gold-deep: #7d5f22; --tex-rgb: 15, 29, 54;
  color-scheme: light; color: var(--ink-text);
  container-type: inline-size;
  position: relative; min-width: 0; padding: clamp(1.25rem, 3vw, 2.25rem);
  border-radius: calc(var(--radius) + .25rem); background: #fff;
  border: 1px solid rgba(200, 165, 91, .35); border-top: 3px solid var(--gold);
  box-shadow: 0 30px 70px -30px rgba(0, 0, 0, .75);
}
.he-card__title { font-family: var(--font-display); font-weight: 500; font-size: var(--fs-h3); line-height: 1.15; letter-spacing: -.01em; }
.he-card__intro { margin-top: .4rem; color: var(--ink-muted); font-size: .95rem; max-width: 52ch; }
.he-card .ct-form { margin-top: 1.4rem; }

.he-card .ct-form__grid { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@container (min-width: 32rem) { .he-card .ct-form__grid { grid-template-columns: 1fr 1fr; } .he-card .ct-form__full { grid-column: 1 / -1; } }
.he-card .field label { color: var(--ink-text); }
.he-card .field input, .he-card .field textarea, .he-card .field select { background: #fff; border-color: rgba(15, 29, 54, .38); min-height: 3rem; color: var(--ink-text); }
.he-card .field textarea { min-height: 7rem; }
.he-card .field select option { background: #fff; color: var(--ink-text); }
.he-card .field input::placeholder, .he-card .field textarea::placeholder { color: #8a909c; }
.he-card .field input:focus, .he-card .field textarea:focus, .he-card .field select:focus { border-color: var(--gold-deep); background: #fff; box-shadow: 0 0 0 4px rgba(184, 145, 63, .16); }
.he-card .ct-form [aria-invalid="true"] { border-color: #b3261e !important; }
.he-card .ct-err { color: #b3261e; font-size: .84rem; font-weight: 600; line-height: 1.4; }
.he-card .ct-err[hidden] { display: none; }

/* Preferred contact pills */
.he-card .ct-pref { border: 0; padding: 0; margin: 0; min-width: 0; display: grid; gap: .55rem; }
.he-card .ct-pref legend { padding: 0; margin-bottom: .55rem; font-size: .82rem; font-weight: 600; letter-spacing: .04em; color: var(--ink-text); }
.he-card .ct-pref__opts { display: flex; flex-wrap: wrap; gap: .6rem; }
.he-card .ct-pref__opt { position: relative; cursor: pointer; }
.he-card .ct-pref__opt input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.he-card .ct-pref__opt span { display: inline-flex; min-height: 2.75rem; align-items: center; padding: .65rem 1.2rem; border-radius: 999px; border: 1px solid rgba(15, 29, 54, .38); background: #fff; font-size: .92rem; font-weight: 600; color: var(--ink-text); transition: background-color .3s, border-color .3s, color .3s; }
.he-card .ct-pref__opt:hover span { border-color: var(--gold-deep); }
.he-card .ct-pref__opt input:checked + span { background: var(--ink-text); border-color: var(--ink-text); color: #fff; }
.he-card .ct-pref__opt input:focus-visible + span { outline: 2px solid var(--gold-deep); outline-offset: 3px; }

/* Disclaimer consent (same as contact.css) */
.he-card .ct-consent { display: grid; gap: .5rem; margin-top: 1.4rem; }
.he-card .ct-consent__opt { position: relative; display: grid; grid-template-columns: auto 1fr; align-items: start; gap: .85rem; min-height: 2.75rem; padding: .85rem 1rem; border-radius: .85rem; border: 1px solid rgba(184, 145, 63, .45); background: rgba(184, 145, 63, .06); cursor: pointer; transition: border-color .3s, background-color .3s; }
.he-card .ct-consent__opt:hover { border-color: var(--gold-deep); }
.he-card .ct-consent__opt:has(input:checked) { border-color: var(--gold-deep); background: rgba(184, 145, 63, .1); }
.he-card .ct-consent__opt input { position: absolute; left: .375rem; top: .275rem; width: 2.75rem; height: 2.75rem; margin: 0; opacity: 0; cursor: pointer; }
.he-card .ct-consent__box { display: grid; place-items: center; width: 1.5rem; height: 1.5rem; margin-top: .05rem; border-radius: .4rem; border: 1.5px solid rgba(15, 29, 54, .5); background: #fff; color: #fff; transition: background-color .25s, border-color .25s; }
.he-card .ct-consent__box svg { width: 1rem; height: 1rem; opacity: 0; transform: scale(.6); transition: opacity .2s, transform .3s var(--ease-expo); }
.he-card .ct-consent__opt:hover .ct-consent__box { border-color: var(--gold-deep); }
.he-card .ct-consent__opt input:checked + .ct-consent__box { background: var(--gold-deep); border-color: var(--gold-deep); }
.he-card .ct-consent__opt input:checked + .ct-consent__box svg { opacity: 1; transform: none; }
.he-card .ct-consent__opt input:focus-visible + .ct-consent__box { outline: 2px solid var(--gold-deep); outline-offset: 3px; box-shadow: 0 0 0 5px rgba(184, 145, 63, .18); }
.he-card .ct-consent__opt input[aria-invalid="true"] + .ct-consent__box { border-color: #b3261e; }
.he-card .ct-consent__opt:has(input[aria-invalid="true"]) { border-color: #b3261e; background: rgba(179, 38, 30, .05); }
.he-card .ct-consent__text { font-size: .92rem; line-height: 1.55; color: var(--ink-text); }
.he-card .ct-consent__link { position: relative; z-index: 1; font-weight: 700; color: var(--gold-deep); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .2em; }
.he-card .ct-consent__link:hover { color: var(--ink-text); }
@media (forced-colors: active) { .he-card .ct-consent__opt input { position: static; opacity: 1; width: 1.5rem; height: 1.5rem; } .he-card .ct-consent__box { display: none; } }

/* Send buttons: navy on the white card, as on the contact page (the ink band would turn the
   primary button gold; these selectors are as specific and load later, so they win). */
.he-card .ct-send { display: grid; gap: .8rem; margin-top: 1.4rem; padding-top: 1.2rem; border-top: 1px solid var(--line); }
.he-card .ct-send__label { font-size: .82rem; font-weight: 600; letter-spacing: .04em; color: var(--ink-text); }
.he-card .ct-send__btns { display: flex; flex-wrap: wrap; gap: .75rem; }
.he-card .ct-send__btns .btn { flex: 1 1 13rem; justify-content: center; }
.he-card .ct-send__btns .btn svg { width: 1.2rem; height: 1.2rem; }
.he-card .ct-send__btns .btn.btn-primary { --btn-bg: var(--deep); --btn-fg: #fff; --btn-bd: transparent; box-shadow: 0 10px 28px -14px rgba(15, 29, 54, .7); }
.he-card .ct-send__btns .btn.btn-primary:hover { background-color: var(--gold); box-shadow: 0 0 0 6px rgba(184, 145, 63, .16), 0 14px 40px -12px rgba(184, 145, 63, .6); }
.he-card .ct-send__btns .btn:not(.btn-primary) { --btn-bg: var(--ink-text); --btn-fg: #fff; --btn-bd: var(--ink-text); }
.he-card .ct-send__btns .btn:not(.btn-primary):hover { background-color: var(--gold-deep); border-color: var(--gold-deep); }
.he-card .ct-err--form { padding: .7rem .9rem; border-radius: .7rem; background: rgba(179, 38, 30, .08); }
.he-card .ct-note { font-size: .84rem; line-height: 1.6; color: var(--ink-muted); padding-left: 1rem; border-left: 2px solid var(--gold-deep); margin-top: 1.1rem; }

/* Success panel */
.he-card .ct-success { display: grid; justify-items: start; gap: 1rem; padding-block: 1rem .25rem; }
.he-card .ct-success[hidden] { display: none; }
.he-card .ct-success:focus { outline: none; }
.he-card .ct-success__icon { width: 3.4rem; height: 3.4rem; color: var(--gold-deep); }
.he-card .ct-success__title { font-family: var(--font-display); font-weight: 500; font-size: var(--fs-h3); line-height: 1.15; }
.he-card .ct-success__text { color: var(--ink-muted); max-width: 48ch; }
.he-card .ct-success__link { color: var(--ink-text); font-weight: 600; }

/* ---------- Visit: map, address, quick links ---------- */
.he-visit { display: flex; flex-direction: column; gap: 1rem; min-width: 0; }
.he-visit__title { font-family: var(--font-display); font-weight: 500; font-size: var(--fs-h3); line-height: 1.15; letter-spacing: -.01em; color: var(--text); }
.he-map { position: relative; flex: 1 1 auto; min-height: 22rem; border-radius: calc(var(--radius) + .25rem); overflow: hidden; border: 1px solid rgba(200, 165, 91, .45); background: var(--black-2); box-shadow: 0 24px 60px -28px rgba(0, 0, 0, .8); }
.he-map__frame { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; filter: saturate(.8) sepia(.08); }
.he-visit__info { display: grid; gap: 1.1rem; padding: clamp(1.1rem, 2.5vw, 1.5rem); border-radius: var(--radius); background: linear-gradient(160deg, var(--black-2), var(--black) 70%); border: 1px solid rgba(200, 165, 91, .3); }
.he-visit__addr { display: grid; gap: .25rem; font-style: normal; color: var(--muted); line-height: 1.55; }
.he-visit__addr strong { color: var(--text); font-weight: 600; }
.he-visit__links { display: flex; flex-wrap: wrap; gap: .6rem; }
.he-visit__links .btn { flex: 1 1 auto; }
.he-visit__meta { font-size: .92rem; line-height: 1.7; color: var(--muted); }
.he-visit__meta a { color: var(--text); font-weight: 600; }

/* Tablet (stacked): form above map, map a fixed height */
@media (max-width: 999px) {
  .he-map { flex: none; height: 24rem; min-height: 0; }
}

/* Phones */
@media (max-width: 699px) {
  .he-card { padding: 1.1rem; }
  .he-card .ct-form { margin-top: 1.1rem; }
  .he-card .ct-form__grid { gap: .85rem; }
  .he-card .ct-consent { margin-top: 1.1rem; }
  .he-card .ct-consent__opt { padding: .8rem .85rem; gap: .75rem; }
  .he-card .ct-consent__opt input { left: .225rem; top: .225rem; }
  .he-card .ct-consent__text { font-size: .88rem; }
  .he-card .ct-send { margin-top: 1.1rem; padding-top: 1rem; }
  .he-card .ct-send__btns .btn { flex: 1 1 100%; }
  .he-map { height: 20rem; }
  .he-visit__links { display: grid; grid-template-columns: 1fr 1fr; }
  .he-visit__links .btn-primary { grid-column: 1 / -1; }
}
