/* Contact page (Figma Contact 2328:23729, 2337:25586, 2337:26048). Liquid: bands and rules follow the page width, the content sits on --gutter.
   Sizes and colours only from tokens (npm run lint:tokens). Widths come from ratios of the content column and from the type size
   (--measure-contact-*, em tokens), never from pixels. The title band is the shared listing-hero (page-hero.css); the chips are the shared
   .res-chip (search.css, the Expert Advice chip); the form fields are the shared form styles (forms.css). Plan: docs/contact-plan.md. */

.contact-section { padding: 0 var(--gutter); }
.contact-section > :first-child { margin-top: 0; }
.contact-section :where(ul) { margin: 0; padding: 0; list-style: none; }

/* ---- Section head: the label at the left, the heading beside it from 1024. Figma: label column 351 of 1320 with a 32 gap = 3 : 8 of the column. */
.contact-head__eyebrow, .contact-head__title { margin: 0; }
.contact-head__title { margin-top: var(--space-gap-xs); text-box: trim-both cap alphabetic; overflow-wrap: break-word; }
@media (min-width: 1024px) {
  .contact-head { font-size: var(--type-heading-eyebrow-caps-md-size); display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 8fr); column-gap: var(--space-gap-lg); min-height: var(--type-heading-section-line-height); }
  .contact-head__title { margin-top: 0; align-self: start; grid-column: 2; grid-row: 1; }
  .contact-head__eyebrow { align-self: end; grid-column: 1; grid-row: 1; }
}

/* ---- Topics (the chips): 75 above the head, 48 under it; the last section before the form has its own 75 below. */
.contact-section--topics { padding-top: var(--space-section-md); padding-bottom: var(--space-section-md); }
.contact-chips { margin-top: var(--space-gap-2xl); }
/* The topic links end in #contact-topics, so the next page opens with the squares in view (under the sticky header) instead of at the top. */
.contact-topics { scroll-margin-top: calc(var(--header-utility-h) + var(--header-main-h) + var(--space-gap-lg)); }
/* The topic picker: filter chips on phones and tablets (the shared .res-chip); from 1024 the Figma squares (three equal tiles with a
   number, a title and a line; the chosen one is black). One list, so the HTML is the same for both. */
.contact-topic__num, .contact-topic__text { display: none; }
@media (min-width: 1024px) {
  .contact-chips { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-gap-lg); }
  .contact-chips > li { display: flex; }
  .contact-topic { flex: 1; flex-direction: column; align-items: flex-start; justify-content: flex-start; gap: 0; white-space: normal; padding: calc(var(--space-inset-md) - var(--border-1-pixel)); text-align: left; }
  .contact-topic__num, .contact-topic__text { display: block; }
  .contact-topic .contact-topic__label { margin-top: var(--space-inset-md); font-family: var(--type-label-2xl-family); font-weight: var(--type-label-2xl-weight); font-size: var(--type-label-2xl-size); line-height: var(--type-label-2xl-line-height); letter-spacing: var(--type-label-2xl-letter-spacing); text-transform: var(--type-label-2xl-transform); }
  .contact-topic .contact-topic__text { margin-top: var(--space-inset-sm); color: var(--color-text-light); }
  .contact-topic.is-selected .contact-topic__text { color: var(--color-text-inverse-subtle); }
}

/* ---- Form and sidebar: 840 + 60 + 420 at 1440 = 2 : 1 with the 3xl gap. Each column has a 1px rule on top (Figma: two separate lines) and 40 below it. */
.contact-main { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-section-sm) var(--space-gap-3xl); padding-bottom: var(--space-section-md); }
@media (min-width: 1024px) { .contact-main { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); } }
.contact-forms, .contact-side { padding-top: var(--space-gap-xl); border-top: var(--border-1-pixel) solid var(--color-border-border); }
.contact-panel__eyebrow, .contact-panel__title, .contact-panel__text { margin: 0; }
.contact-panel__title { margin-top: var(--space-gap-md); } /* Figma: the heading's text starts 24 under the label */
.contact-panel__text { margin-top: var(--space-gap-3xs); color: var(--color-text-light); }
.contact-form { margin-top: var(--space-gap-xl); }
.contact-form__placeholder { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-gap-md); padding: var(--space-inset-lg); border: var(--border-2-pixel) dashed var(--color-border-border); }
.contact-form__placeholder p { margin: 0; }

/* "What happens next": three numbered steps under the form. */
.contact-steps { margin-top: var(--space-section-sm); padding-top: var(--space-gap-xl); border-top: var(--border-1-pixel) solid var(--color-border-border); }
.contact-steps__title { margin: 0; }
.contact-steps__list { margin: var(--space-gap-md) 0 0; padding: 0; list-style: none; display: grid; gap: var(--space-gap-sm); }
.contact-steps__list > li { display: grid; grid-template-columns: var(--space-gap-xl) minmax(0, 1fr); align-items: baseline; }
.contact-steps__num { color: var(--color-text-light); }

/* ---- Sidebar: two blocks, the second under its own 1px rule. The text and the buttons are one text measure wide (357 of 420 at 1440). */
.contact-side { display: flex; flex-direction: column; gap: var(--space-gap-3xl); }
.contact-side__block { font-size: var(--type-paragraph-medium-regular-size); } /* the em measure below is relative to this size */
.contact-side__block > * { max-width: var(--measure-contact-side); }
.contact-side__eyebrow, .contact-side__title, .contact-side__text { margin: 0; }
.contact-side__title { margin-top: var(--space-gap-md); }
.contact-side__phone { display: inline-block; margin-top: var(--space-gap-sm); color: var(--color-text-primary); text-decoration: underline; text-underline-offset: var(--space-gap-5xs); }
.contact-side__text { margin-top: var(--space-gap-3xs); }
.contact-side__buttons { display: flex; flex-direction: column; gap: var(--space-gap-3xs); margin-top: var(--space-gap-md); }
.contact-side__buttons .btn { width: 100%; }
.contact-side__block + .contact-side__block { padding-top: var(--space-gap-xl); border-top: var(--border-1-pixel) solid var(--color-border-border); }
.contact-side__block > .contact-side__eyebrow, .contact-side__block > .contact-side__title { max-width: none; }

/* ---- "Call us" in the hero (white on the photo; under the text on phones). Figma: a subtle rule, 24 inside it, "Call us" 14/21, the number in
   Barlow Condensed at hero-line-height (semibold) with ~10 above and below, then the hours 14/21. The number is the headline/lg size (40 at 1440;
   Figma 38, no 38 token). */
.contact-call { padding-top: var(--space-inset-md); border-top: var(--border-1-pixel) solid var(--color-border-rule-subtle); }
.contact-call__label, .contact-call__hours { margin: 0; }
.contact-call__phone { display: inline-block; margin: var(--space-gap-2xs) 0; font-family: var(--type-heading-headline-lg-family); font-weight: 600; font-size: var(--type-heading-headline-lg-size); line-height: var(--type-heading-headline-lg-line-height); color: inherit; text-decoration: underline; text-underline-offset: var(--space-gap-5xs); white-space: nowrap; }
/* ---- Offices: three equal cards with a gap/lg between (Figma 418.67 each, 32 apart); 1 column on phones, 2 from 768, 3 from 1024. */
.contact-section--offices { padding-top: var(--space-section-md); padding-bottom: var(--space-section-md); }
.contact-section--offices, .contact-section--self { position: relative; }
.contact-section--offices::before, .contact-section--self::before { content: ""; position: absolute; top: 0; left: var(--gutter); right: var(--gutter); border-top: var(--border-1-pixel) solid var(--color-border-border); }
.contact-offices { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-gap-lg); margin-top: var(--space-gap-2xl); }
@media (min-width: 768px) { .contact-offices { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .contact-offices { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.contact-offices > li { display: flex; }
.contact-office { flex: 1; box-sizing: border-box; padding: calc(var(--space-inset-xl) - var(--border-1-pixel)); border: var(--border-1-pixel) solid var(--color-border-border); background: var(--color-bg-canvas); min-width: 0; }
.contact-office__num, .contact-office__name { margin: 0; }
.contact-office__name { margin-top: var(--space-gap-xs); overflow-wrap: break-word; }
.contact-office__line { margin: var(--space-gap-4xs) 0 0; font-style: normal; overflow-wrap: anywhere; }
.contact-office__num + .contact-office__name + .contact-office__line { margin-top: var(--space-gap-3xs); }
.contact-office__line a { color: inherit; text-decoration: none; }
.contact-office__line a:hover { text-decoration: underline; }
.contact-office__more { margin-top: var(--space-gap-4xs); }

/* ---- Self service: four equal cards (1 column, 2 from 768, 4 from 1024); the whole card is one link. */
.contact-section--self { padding-top: var(--space-section-md); padding-bottom: var(--space-section-md); }
.contact-cards { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-gap-lg); margin-top: var(--space-gap-2xl); }
@media (min-width: 768px) { .contact-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .contact-cards { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.contact-cards > li { display: flex; }
.contact-card { position: relative; display: grid; flex: 1; grid-template-columns: minmax(0, 1fr); align-content: start; justify-items: start; box-sizing: border-box; padding: calc(var(--space-inset-md) - var(--border-1-pixel)); border: var(--border-1-pixel) solid var(--color-border-border); background: var(--color-bg-canvas); color: var(--color-text-primary); text-decoration: none; }
.contact-card:hover { background: var(--color-bg-subtle); }
.contact-card:focus-visible { outline: var(--border-2-pixel) solid var(--color-border-border); outline-offset: var(--border-2-pixel); }
.contact-card__title { margin-top: var(--space-gap-md); }
.contact-card__text { margin-top: var(--space-gap-3xs); color: var(--color-text-light); }
.contact-card .icon { justify-self: end; margin-top: var(--space-gap-md); width: var(--arrow-box); height: auto; transition: transform 200ms ease; }
.contact-card:hover .icon { transform: translateX(10%); }

/* ---- Three statements between two rules. */
.contact-trust { display: flex; flex-wrap: wrap; gap: var(--space-gap-xs) var(--space-gap-3xl); align-items: center; margin-top: var(--space-section-sm); padding-block: var(--space-inset-md-lg); border-top: var(--border-1-pixel) solid var(--color-border-border); border-bottom: var(--border-1-pixel) solid var(--color-border-border); }
.contact-trust > li { margin: 0; }

/* ---- The form: what the shared form styles (forms.css) do not cover. The helper line under a field, and the note beside the button. */
.contact-form .gform_wrapper .gfield_description { margin: var(--space-gap-4xs) 0 0; padding: 0; color: var(--color-text-light); font-family: var(--type-paragraph-xsmall-regular-family); font-weight: var(--type-paragraph-xsmall-regular-weight); font-size: var(--type-paragraph-xsmall-regular-size); line-height: var(--type-paragraph-xsmall-regular-line-height); }
.contact-form .gform_wrapper .gfield--type-select:last-of-type:not(.gfield--width-full) { grid-column: auto; } /* the shared rule makes the last select full width; here it is a half (Est. annual volume) */
.contact-form .gform_wrapper .gform_footer { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-gap-xs) var(--space-gap-md); }
.contact-form__note { margin: 0; max-width: var(--measure-contact-note); color: var(--color-text-light); }

/* Hero lead: Figma's box is 541 wide at 1440 (30.06em), wider than the standard hero lead, so it breaks after "person." */
@media (min-width: 1024px) { .contact .listing-hero__lead { max-width: var(--measure-contact-lead); } }
