/* ==========================================================================
   Site shell components: utility bar, header, navigation, footer, cards.
   Semantic tokens only — no literal colours, sizes or spaces.
   ========================================================================== */

/* --- Utility bar ---------------------------------------------------------- */

.utility-bar {
  background: var(--color-surface-invert);
  color: var(--color-text-invert);
  font-size: var(--fs-sm);
}
.utility-bar__inner {
  display: flex; flex-wrap: wrap; align-items: center;
  justify-content: space-between; gap: var(--sp-2) var(--sp-5);
  padding-block: var(--sp-2);
}
.utility-bar__tagline { margin: 0; }
.utility-bar__contact {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: var(--sp-2) var(--sp-5);
  margin: 0; padding: 0; list-style: none;
}
.utility-bar__item { margin: 0; }
.utility-bar__item,
.utility-bar a { display: inline-flex; align-items: center; gap: var(--sp-2); }
.utility-bar a { color: inherit; text-decoration: none; }
.utility-bar a:hover { text-decoration: underline; text-underline-offset: 0.25em; }

/* Icon strokes are SOFT gold, not primary gold. Soft Gold #DCC6A1 on Dark Teal
   measures 3.90:1, which clears the 3:1 that WCAG 1.4.11 asks of a non-text
   element. This is the pairing section 06 of the style guide names for the
   utility bar. */
.utility-bar svg {
  flex: 0 0 auto;
  color: var(--hpw-gold-300);
  stroke-width: 1.8;
}

.utility-bar__tagline { color: rgb(255 255 255 / 82%); }

/* The tagline is the first thing to go when space is tight — the phone number
   and location earn their place on a small screen; a strapline does not. */
@media (max-width: 46rem) {
  .utility-bar__tagline { display: none; }
  .utility-bar__inner { justify-content: center; }
}

/* --- Header --------------------------------------------------------------- */

/* White, not soft white. The mock-up puts the header on #fff against the
   page, and the logo lockup has a white ground of its own — on #FAFAFA the
   logo showed as a lighter rectangle inside a darker bar. */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-divider);
}
.site-header__inner {
  display: flex; align-items: center; gap: var(--sp-5);
  padding-block: var(--sp-3);
}
.site-header__brand { flex: 0 0 auto; margin-right: auto; }

.site-logo { display: block; line-height: 0; text-decoration: none; }
/* Sized by WIDTH, as the mock-up does, not by a stepped height. The lockup is
   2.9:1, so 300px wide gives the 104px tall logo the header mock-up was signed
   off at. Below the nav breakpoint it falls back to the mock-up's own
   min(180px, 46vw), which keeps it centred and legible down to a 320px screen
   without needing another breakpoint. */
.site-logo img { width: 300px; height: auto; }
.site-logo--mark img { width: auto; height: 4.25rem; }       /* 68px */

/* The supplied lockup is black and navy, so on the dark footer it sits on a
   light panel. See assets/img/logo/README.md — a reversed version is
   outstanding from the client. */
.site-logo--panel {
  display: inline-block; line-height: 0;
  background: var(--color-surface-on-dark);
  padding: var(--sp-3) var(--sp-4);
  border-radius: var(--radius-lg);
}

@media (max-width: 62rem) {
  .site-logo img { width: min(180px, 46vw); }

}

.site-header__cta { flex: 0 0 auto; text-decoration: none; }
.site-header__cta:hover { text-decoration: none; }

/* Hamburger and the booking button sit side by side on narrow screens. */
.site-header__actions {
  display: flex; align-items: center; gap: var(--sp-3);
  flex: 0 0 auto; margin-left: auto;
}

/* --- Primary navigation --------------------------------------------------- */

.primary-nav__list {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: var(--sp-2) var(--sp-5);
  margin: 0; padding: 0; list-style: none;
}
.primary-nav__list li { margin: 0; }
/* Menu items at 14px, weight 500, charcoal — the sizes on the spec list in
   the header mock-up. */
.primary-nav__list a {
  display: block;
  padding-block: var(--sp-2);
  font-family: var(--font-heading);
  font-size: 0.875rem;
  font-weight: var(--fw-medium);
  line-height: var(--lh-snug);
  color: var(--color-text);
  text-decoration: none;
  white-space: nowrap;
  box-shadow: inset 0 -2px 0 transparent;
  transition: color var(--transition), box-shadow var(--transition);
}

/* A 2px gold line under the item, on hover and on the current page. The
   mock-up specified the gold line for the active item and a teal text
   underline on hover; the gold line reads better as the interaction, so both
   states get it and the current page is held apart by weight. Gold here is
   decoration on top of a colour change, never the only signal — it measures
   2.31:1 on white and could not carry meaning alone. */
.primary-nav__list a:hover,
.primary-nav__list a:focus-visible {
  color: var(--color-link);
  box-shadow: inset 0 -2px 0 var(--color-accent-gold);
}

.primary-nav__list .current-menu-item > a,
.primary-nav__list .current-menu-ancestor > a,
.primary-nav__list [aria-current] {
  color: var(--color-link);
  font-weight: var(--fw-semi);
  box-shadow: inset 0 -2px 0 var(--color-accent-gold);
}
.primary-nav__empty { margin: 0; font-size: var(--fs-sm); color: var(--color-text-muted); }

/* Second level */
.primary-nav__list .sub-menu {
  margin: 0; padding: var(--sp-3); list-style: none;
  background: var(--color-surface);
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  min-width: 14rem;
}

/* The drop-down (27 Nov 2026). Opens on hover, on keyboard focus, and from
   the small arrow button beside the item, which is what a touch screen uses.
   The list is anchored to the item and sits above the page. Long service
   names wrap inside it instead of making it wider than a phone. */
.primary-nav__list > .menu-item-has-children {
  position: relative;
  display: flex; align-items: center; gap: 2px;
}
.sub-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px; padding: 0;
  background: none; border: 0; border-radius: var(--radius-md);
  color: var(--color-text); cursor: pointer;
  transition: transform var(--transition), color var(--transition);
}
.sub-toggle:hover { color: var(--color-link); }
.sub-toggle:focus-visible { outline: 3px solid var(--color-focus); outline-offset: 2px; }
.menu-item-has-children.is-open > .sub-toggle { transform: rotate(180deg); }

@media (min-width: 62.0625rem) {
  .primary-nav__list .sub-menu {
    position: absolute; left: calc(var(--sp-3) * -1); top: 100%; z-index: 160;
    width: 19rem; max-height: calc(100vh - var(--header-h, 128px) - var(--sp-4));
    overflow-y: auto;
    padding: var(--sp-2);
    visibility: hidden; opacity: 0;
    transition: opacity var(--transition), visibility var(--transition);
  }
  .primary-nav__list > .menu-item-has-children:hover > .sub-menu,
  .primary-nav__list > .menu-item-has-children:focus-within > .sub-menu,
  .primary-nav__list > .menu-item-has-children.is-open > .sub-menu {
    visibility: visible; opacity: 1;
  }
  .primary-nav__list > .menu-item-has-children:hover > .sub-toggle { color: var(--color-link); }
  .primary-nav__list .sub-menu a {
    white-space: normal;
    padding: var(--sp-2) var(--sp-3);
    border-radius: var(--radius-md);
    box-shadow: none;
  }
  .primary-nav__list .sub-menu a:hover,
  .primary-nav__list .sub-menu a:focus-visible,
  .primary-nav__list .sub-menu .current-menu-item > a {
    background: var(--color-surface-cool);
    box-shadow: none;
  }
}

.nav-toggle {
  display: none;
  align-items: center; justify-content: center;
  width: 44px; height: 44px; padding: 0;
  background: none; border: 0;
  border-radius: var(--radius-md); cursor: pointer;
  color: var(--color-link);
}
/* No box around the menu button (Liam, 9 Oct 2026): just the three lines.
   The 44px tap area stays; hover and keyboard focus still show. */
.nav-toggle:hover { color: var(--color-link-hover); background: var(--color-bg-alt); }
.nav-toggle:focus-visible { outline: 3px solid var(--color-focus); outline-offset: 2px; }
.nav-toggle__box { display: block; width: 20px; height: 14px; position: relative; }
.nav-toggle__bars,
.nav-toggle__bars::before,
.nav-toggle__bars::after {
  position: absolute; left: 0; width: 20px; height: 2px;
  background: currentColor; border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}
.nav-toggle__bars { top: 6px; }
.nav-toggle__bars::before { content: ""; top: -6px; }
.nav-toggle__bars::after  { content: ""; top: 6px; }
/* Becomes a close icon when open, so the control says what it will do next. */
.nav-toggle[aria-expanded="true"] .nav-toggle__bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::after  { transform: translateY(-6px) rotate(-45deg); }

/* Below this width the nav collapses. The breakpoint is set by when the links
   stop fitting, not by a device size. */
@media (max-width: 62rem) {
  .nav-toggle { display: inline-flex; }
  /* The menu drops as a panel below the header rather than pushing the header
     taller, so the logo and the booking button stay where a thumb expects them. */
  .primary-nav {
    position: absolute; left: 0; right: 0; top: 100%; z-index: 150;
    display: none; margin: 0;
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-divider);
    box-shadow: var(--shadow-md);
    padding: var(--sp-2) var(--gutter) var(--sp-4);
  }
  .primary-nav.is-open { display: block; }
  .primary-nav__list { flex-direction: column; align-items: stretch; gap: 0; }
  .primary-nav__list li + li { border-top: 1px solid var(--color-divider); }
  .primary-nav__list a { padding-block: var(--sp-3); }
  .primary-nav__list .sub-menu {
    border: 0; box-shadow: none; padding: 0 0 var(--sp-2) var(--sp-4); background: none;
  }
  /* In the phone menu the list of services stays closed until its arrow is
     tapped, so the five main items are all visible when the menu opens. The
     item's own link still goes to the Services page. */
  .primary-nav__list > .menu-item-has-children { flex-wrap: wrap; gap: 0; }
  .primary-nav__list > .menu-item-has-children > a { flex: 1 1 0; min-width: 0; }
  .primary-nav__list > .menu-item-has-children > .sub-toggle { width: 44px; height: 44px; flex: none; }
  .primary-nav__list > .menu-item-has-children > .sub-menu { flex: 0 0 100%; display: none; }
  .primary-nav__list > .menu-item-has-children.is-open > .sub-menu { display: block; }
  .primary-nav__list .sub-menu li + li { border-top: 0; }
  .primary-nav__list .sub-menu a { white-space: normal; padding-block: var(--sp-2); font-weight: var(--fw-normal); }
  .primary-nav { max-height: calc(100vh - var(--header-h, 128px)); overflow-y: auto; }
}

/* --- Page intro ----------------------------------------------------------- */

.page-intro { margin-bottom: var(--sp-7); max-width: var(--width-content); }
.page-intro__title { margin-bottom: var(--sp-4); }
.page-intro__description { color: var(--color-text-muted); font-size: var(--fs-lg); }

/* --- Article card (the four-tile blog unit) -------------------------------- */

.article-card { display: flex; flex-direction: column; padding: 0; overflow: hidden; }

/* The image slot is locked to the client's own export ratio — 1080 x 680, so
   1.588:1. Because the slot has a fixed ratio, a grid of cards never shifts as
   images load, and no upload gets re-cropped to a shape it was not saved for. */
.article-card__media { margin: 0; aspect-ratio: 1080 / 680; background: var(--color-divider); }
.article-card__media img { width: 100%; height: 100%; object-fit: cover; }

.article-card__body {
  display: flex; flex-direction: column; flex: 1;
  padding: var(--sp-5);
}
.article-card__title { margin-bottom: var(--sp-3); font-size: var(--fs-h5); }
.article-card__title a { color: var(--color-heading); text-decoration: none; }
.article-card--link:hover .article-card__title a { text-decoration: underline; }
.article-card__excerpt {
  color: var(--color-text); margin-bottom: var(--sp-4);
  /* Migrated summaries run to 100+ words; three lines keeps cards in a row
     level and the card a preview rather than the article (27 Oct 2026). */
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.article-card__more { margin-top: auto; }

.post-grid { margin-bottom: var(--sp-7); }

/* --- Breadcrumbs ---------------------------------------------------------- */

.breadcrumbs { margin-bottom: var(--sp-4); font-size: var(--fs-sm); }
/* align-items: baseline, not the default.
   Measured: the "Home" item computed 32.8px tall against 24.8px for the
   current page, and sat 8px higher, so the two lines of text did not share a
   baseline. Left on the default the row's alignment depends on each item
   happening to be the same height, which it is not once one of them carries a
   link. Baseline is what text in a row actually wants. */
.breadcrumbs__list {
  display: flex; flex-wrap: wrap; align-items: baseline;
  gap: var(--sp-2);
  margin: 0; padding: 0; list-style: none;
}
.breadcrumbs__item + .breadcrumbs__item::before { content: "/"; margin-right: var(--sp-2); color: var(--color-text-muted); }
.breadcrumbs__item--current { color: var(--color-text-muted); }

/* --- Single article ------------------------------------------------------- */

.single__crumb { padding-top: var(--sp-6); }

/* The two-column shell. 19rem is the rail, and the gap is 3rem, so the body
   keeps its ~42rem measure at 1200px container width rather than stretching
   to fill whatever is left. Below 62rem the rail drops under the article. */
.single-shell {
  display: grid;
  gap: var(--sp-7);
  grid-template-columns: minmax(0, 1fr) 19rem;
  align-items: start;
  padding-bottom: var(--section-y);
}
.single-shell__main { min-width: 0; }

@media (max-width: 62rem) {
  .single-shell { grid-template-columns: minmax(0, 1fr); gap: var(--sp-6); }
}

.single__header { padding-bottom: 0; }

/* An article title is NOT a page title. --fs-h1 climbs to 4rem, which is
   right for a short page heading and wrong for a 90-character blog headline:
   at 4rem the longest of the migrated titles takes five lines and fills the
   screen before the reader reaches a word of the article. This is the same
   scale one step down, capped at 2.75rem. */
.single__title {
  margin-bottom: var(--sp-5);
  font-size: clamp(1.875rem, 1.45rem + 1.9vw, 2.75rem);
  line-height: var(--lh-tight);
  max-width: 34ch;
}

.single__meta { color: var(--color-text-muted); font-size: var(--fs-sm); }

.single__featured {
  margin: 0 0 var(--sp-6);
  aspect-ratio: 1080 / 680;
  border-radius: var(--radius-lg); overflow: hidden;
}
.single__featured img { width: 100%; height: 100%; object-fit: cover; }
/* Phones: the article's lead photo runs edge to edge, like every other
   section photo on a small screen. */
@media (max-width: 47.99rem) {
  .single__featured { margin-inline: calc(var(--gutter) * -1); border-radius: 0; }
}

/* --- Article body typography ---------------------------------------------- *
 * An article is NOT a landing page, and it needs its own smaller scale.
 * --fs-h2 climbs to 2.875rem (46px), which is right for a section heading on
 * a page built of full-width bands and much too large for a subheading inside
 * a 42rem column of prose — at that size an H2 is nearly three times the body
 * copy and the page reads as a stack of headlines. The mock-up's article
 * scale tops out at 2.1rem for H2 and 1.55rem for H3, which is what these
 * are.
 *
 * All of it is scoped with :where() on the container so a block's own class
 * still wins, the same rule as the figures above.
 * -------------------------------------------------------------------------- */

.single__body {
  /* Full width of the article column, so the text lines up with the cover
     photo above it and runs up to the side column (Liam, 27 Oct 2026). */
  font-size: var(--fs-base);
  line-height: 1.75;
}
.single__body > * + * { margin-top: var(--sp-5); }

:where(.single__body) h2 {
  margin: var(--sp-7) 0 var(--sp-4);
  font-size: clamp(1.6rem, 1.3rem + 1.1vw, 2.1rem);
  line-height: var(--lh-snug);
  font-weight: var(--fw-semi);
}

:where(.single__body) h3 {
  margin: var(--sp-6) 0 var(--sp-3);
  font-size: clamp(1.3rem, 1.15rem + 0.5vw, 1.55rem);
  line-height: var(--lh-snug);
  font-weight: var(--fw-semi);
}

:where(.single__body) h4 {
  margin: var(--sp-5) 0 var(--sp-3);
  font-size: var(--fs-lg);
  line-height: var(--lh-snug);
  font-weight: var(--fw-semi);
  color: var(--color-text-strong);
}

:where(.single__body) > ul,
:where(.single__body) > ol { padding-left: var(--sp-5); }
:where(.single__body) li + li { margin-top: var(--sp-2); }

:where(.single__body) a {
  color: var(--color-link);
  text-decoration: underline;
  text-underline-offset: 0.18em;
}
:where(.single__body) a:hover { color: var(--color-link-hover); }

/* --- Byline --------------------------------------------------------------- */

.byline { display: flex; align-items: center; gap: var(--sp-4); margin-bottom: var(--sp-6); }

.byline__portrait {
  width: 52px; height: 52px; flex: 0 0 52px;
  border-radius: var(--radius-pill); object-fit: cover;
}

.byline__text { min-width: 0; }

.byline__name {
  margin: 0;
  font-family: var(--font-heading);
  font-size: var(--fs-sm);
  font-weight: var(--fw-semi);
  line-height: var(--lh-snug);
  color: var(--color-heading);
}
.byline__credentials { font-weight: var(--fw-normal); }

.byline__meta {
  margin: 0;
  display: flex; flex-wrap: wrap; gap: var(--sp-2);
  font-size: var(--fs-sm);
  color: var(--color-text-muted);
}

/* --- Author tile ---------------------------------------------------------- */

.author-tile {
  display: flex; align-items: flex-start; gap: var(--sp-4);
  margin-top: var(--sp-7);
  padding: var(--sp-5) var(--sp-5);
  background: var(--color-bg-alt);
  border: 1px solid var(--color-divider);
  border-left: 4px solid var(--color-edge-gold);
  border-radius: var(--radius-lg);
}

.author-tile__portrait {
  width: 72px; height: 72px; flex: 0 0 72px;
  border-radius: var(--radius-pill); object-fit: cover;
}

.author-tile__text { min-width: 0; }

.author-tile__name {
  margin: 0 0 var(--sp-1);
  font-size: var(--fs-h6);
  font-weight: var(--fw-bold);
  color: var(--color-heading);
}

.author-tile__credentials {
  margin: 0 0 var(--sp-3);
  font-size: var(--fs-sm);
  color: var(--color-text-muted);
}

.author-tile__bio { margin: 0; }

.author-tile__link {
  display: inline-block;
  margin-top: var(--sp-4);
  font-weight: var(--fw-semi);
  color: var(--color-link);
  text-decoration: none;
}
.author-tile__link:hover { text-decoration: underline; text-underline-offset: 0.25em; }

/* Two buttons under the bio (27 Nov 2026): the writer's team profile, when
   they have one, and their other articles. Smaller than a page button so the
   tile stays a footnote to the article. */
.author-tile__actions {
  display: flex; flex-wrap: wrap; gap: var(--sp-3);
  margin-top: var(--sp-4);
}
.author-tile__actions .btn {
  padding: 0.5rem 1.125rem;
  font-size: var(--fs-sm);
}

@media (max-width: 30rem) {
  .author-tile { flex-direction: column; }
}

/* --- The article rail ----------------------------------------------------- */

.article-rail { display: flex; flex-direction: column; gap: var(--sp-4); }

.pcard {
  padding: var(--sp-5) var(--sp-5);
  background: var(--color-surface);
  border: 1px solid var(--color-divider);
  border-left: 4px solid var(--color-edge-gold);
  border-radius: var(--radius-lg);
}

.pcard--cool {
  background: var(--color-tile-teal);
  border-color: transparent;
  border-left-color: var(--color-edge-teal);
}

.pcard--book {
  background: var(--color-surface-invert);
  border-color: transparent;
  border-left-color: var(--color-accent-gold);
  color: var(--color-text-invert);
}

.pcard__heading {
  margin: 0 0 var(--sp-4);
  font-family: var(--font-heading);
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--color-eyebrow);
}

/* Gold as a label on dark teal measures 2.80:1, which section 06 of the style
   guide lists as never. On dark teal it stays the edge, not the ink. */
.pcard--book .pcard__heading { color: var(--color-heading-invert); }
.pcard--cool .pcard__heading { color: var(--color-eyebrow-on-cool); }

.pcard p { margin: 0 0 var(--sp-4); font-size: var(--fs-sm); line-height: var(--lh-base); }
.pcard--book p { color: var(--color-text-invert); }
.pcard--cool p { color: var(--color-text-on-tint); }

.pcard__list { list-style: none; margin: 0; padding: 0; font-size: var(--fs-sm); }
.pcard__list li { border-bottom: 1px solid rgb(28 28 28 / 10%); }
.pcard__list li:last-child { border-bottom: 0; }

.pcard__list a {
  display: flex; justify-content: space-between; align-items: center; gap: var(--sp-3);
  padding: var(--sp-3) 0;
  color: var(--color-text);
  text-decoration: none;
  font-weight: var(--fw-medium);
  line-height: var(--lh-snug);
}
.pcard__list a:hover { color: var(--color-link); }
.pcard__list svg { flex: 0 0 auto; color: var(--color-eyebrow); transition: transform var(--transition); }
.pcard__list a:hover svg { transform: translateX(2px); }

.btn--full { width: 100%; }

/* --- Read next ------------------------------------------------------------ */

.read-next {
  padding-block: var(--section-y);
  border-top: 1px solid var(--color-divider);
  background: var(--color-surface);
}

.read-next__head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: var(--sp-5); flex-wrap: wrap;
  margin-bottom: var(--sp-6);
}

.rule-gold {
  display: block;
  width: 56px; height: 3px;
  margin-bottom: var(--sp-4);
  background: var(--color-accent-gold);
  border-radius: 2px;
}

.read-next__heading { margin: 0; font-size: var(--fs-h3); }

.read-next__all {
  display: inline-flex; align-items: center; gap: var(--sp-2);
  font-size: var(--fs-sm); font-weight: var(--fw-semi);
  color: var(--color-link); text-decoration: none; white-space: nowrap;
}
.read-next__all:hover { text-decoration: underline; text-underline-offset: 0.25em; }
.read-next__all svg { flex: 0 0 16px; transition: transform var(--transition); }
.read-next__all:hover svg { transform: translateX(3px); }

@media (max-width: 35rem) {
  .read-next__head { align-items: flex-start; }
}

.post-grid--3 {
  display: grid; gap: var(--sp-5);
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  margin-bottom: 0;
}

/* --- Search form ---------------------------------------------------------- */

.search-form__label { font-size: var(--fs-sm); }
.search-form__row { display: flex; flex-wrap: wrap; gap: var(--sp-3); }
.search-form__input { flex: 1 1 14rem; }
.search-form__submit { flex: 0 0 auto; }

/* --- Pagination ----------------------------------------------------------- */

.pagination { margin-top: var(--sp-7); }
.pagination .nav-links { display: flex; flex-wrap: wrap; gap: var(--sp-2); align-items: center; }
.pagination .page-numbers {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 44px; min-height: 44px; padding-inline: var(--sp-3);
  border: 1px solid var(--color-border-input);
  border-radius: var(--radius-md);
  text-decoration: none;
}
.pagination .page-numbers.current {
  background: var(--color-btn-primary-bg);
  color: var(--color-btn-primary-fg);
  border-color: var(--color-btn-primary-bg);
}

/* --- Footer --------------------------------------------------------------- */

.site-footer { background: var(--color-surface-invert); color: var(--color-text-invert); }

/* The brand column is fixed and the rest share what is left.
   This used to be a hard five-column track (1.5fr 1fr 1fr 1fr 1.2fr) on the
   assumption that all three footer menus plus Connect would be there. With
   only the brand and Connect rendered, both sat in columns one and two and the
   right-hand half of the footer was empty. auto-fit means the footer looks
   deliberate with two columns or with five. */
/* Flex, not grid.
   Grid needs to know how many columns there are, and the footer does not: the
   three link columns each appear only if their menu has items, so it can be
   two columns or five. Every grid version of this went wrong in a different
   way — a fixed five-track layout left the right-hand half empty, and
   auto-fit with a spanning brand column wrapped into two rows with a gap down
   the middle. Flex with a growing basis spreads whatever is present across
   the full width, in one row, at any count. */
.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: var(--sp-7);
  padding-block: var(--sp-9);
}

/* The brand block is the widest and does not grow; the link columns share
   what is left. */
.site-footer__brand { flex: 0 1 19rem; }
.site-footer__col { flex: 1 1 10rem; min-width: 0; }

/* 22 Oct 2026: brand, two link columns, Visit Us, Clinic Hours. The link
   columns only need the width of their longest label; the contact and hours
   columns take more, so the hours never have to wrap a time. */
.site-footer__col--links { flex: 1 1 10rem; }
.site-footer__visit { flex: 1 1 15rem; }
.site-footer__hours { flex: 1 1 14rem; }

/* 24 Nov 2026: "7 a.m.–4:30 p.m." broke onto two lines at Friday, because the
   column could shrink below its longest row. A time stays on one line (see
   .contact-list__time) and the column is never narrower than its content,
   which is about 15rem, so it still fits a 360px phone. */
.site-footer__hours { min-width: max-content; }

@media (min-width: 64rem) {
  .site-footer__inner { gap: var(--sp-6); justify-content: space-between; }
  .site-footer__brand { flex-basis: 17rem; }
  .site-footer__col--links, .site-footer__visit, .site-footer__hours { flex-grow: 0; }
}

@media (max-width: 52rem) {
  .site-footer__brand { flex: 1 1 100%; }
}

/* Phones: two link columns side by side, then contact and hours full width. */
@media (max-width: 40rem) {
  .site-footer__inner { gap: var(--sp-6) var(--sp-5); padding-block: var(--sp-8); }
  .site-footer__col--links { flex: 1 1 calc(50% - var(--sp-5)); }
  .site-footer__visit, .site-footer__hours { flex: 1 1 100%; }
}

/* 24 Nov 2026: the five blocks only fit on one line from 80rem (1280px) up.
   Below that the row used to wrap wherever it ran out of room, which left
   Clinic Hours alone on a second line. So the in-between widths get a fixed
   arrangement instead of a wrap.
   Tablets and small laptops: the brand block down the left, and beside it
   two columns in two rows, Quick Links and About Us above Visit Us and
   Clinic Hours. Written for two link menus; if Patient Resources is given
   items, check this width again. */
@media (min-width: 52.0625rem) and (max-width: 79.9375rem) {
  .site-footer__inner {
    display: grid;
    grid-template-columns: minmax(13rem, 17rem) 1fr 1fr;
    gap: var(--sp-7) var(--sp-6);
  }
  .site-footer__brand { grid-row: 1 / span 2; }
}

/* Large phones and small tablets: brand across the top, then the same two
   columns in two rows. */
@media (min-width: 40.0625rem) and (max-width: 52rem) {
  .site-footer__inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--sp-7) var(--sp-6);
  }
  .site-footer__brand { grid-column: 1 / -1; }
}

.site-footer__brand { display: flex; flex-direction: column; gap: var(--sp-5); }

.site-footer__blurb {
  margin: 0;
  max-width: 30ch;
  font-size: var(--fs-sm);
  line-height: var(--lh-base);
  color: rgb(255 255 255 / 82%);
}

/* Footer headings take the eyebrow treatment from the style guide rather than
   sitting at heading size: small, uppercase, wide-tracked, with a short gold
   rule above. Soft White on dark teal is 6.21:1. */
.site-footer__heading {
  margin: 0 0 var(--sp-5);
  padding-top: var(--sp-4);
  font-family: var(--font-heading);
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-heading-invert);
  position: relative;
}
.site-footer__heading::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 32px; height: 2px;
  background: var(--color-accent-gold);
  border-radius: 1px;
}

.site-footer__list, .contact-list, .social-list, .contact-list__hours {
  margin: 0; padding: 0; list-style: none;
}
.site-footer__list li, .contact-list li { margin: 0 0 var(--sp-4); }
.site-footer__list li:last-child, .contact-list li:last-child { margin-bottom: 0; }
.site-footer__list, .contact-list { font-size: var(--fs-sm); line-height: var(--lh-snug); }

/* :not(.btn) — the same trap as .on-dark in base.css. A button is an <a>,
   and ".site-footer a" (0,1,1) outranks ".btn--on-dark" (0,1,0), which
   turned the footer's white Book Now button white-on-white. */
.site-footer a:not(.btn) { color: var(--color-text-invert); text-decoration: none; }
.site-footer a:not(.btn):hover { text-decoration: underline; text-underline-offset: 0.25em; }

.contact-list__address { font-style: normal; line-height: var(--lh-base); }

/* Each contact line leads with a small icon in the soft gold the utility bar
   uses on dark teal (3.90:1, above the 3:1 needed for an icon). */
.contact-list__row { display: flex; align-items: flex-start; gap: var(--sp-3); }
.contact-list__icon { flex: none; margin-block-start: 0.1em; color: var(--color-icon-on-dark); stroke-width: 1.6; }
.contact-list__email { overflow-wrap: break-word; }
.contact-list__directions {
  display: inline-block;
  margin-block-start: var(--sp-2);
  font-weight: var(--fw-semi);
}

.site-footer__brand .social-list { margin-top: 0; }
.site-footer__book { margin: var(--sp-5) 0 0; }
.site-footer__call { margin: var(--sp-3) 0 0; font-size: var(--fs-sm); }
.site-footer .site-footer__call a { text-decoration: underline; text-underline-offset: 0.25em; }

/* Opening hours are a reference list, not something to read through: a reader
   scans for one day. So the day and the time get their own columns, with the
   times ending on a shared right edge — that is what lets the eye run down the
   day names and across once, instead of reading seven sentences. */
.contact-list__hours {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0 var(--sp-4);
  max-width: 17rem;
  line-height: var(--lh-snug);
}

/* The pairs are list items inside the grid, so they must not carry the
   contact list's own vertical rhythm, and they inherit the list's own size
   rather than dropping to the label scale — at the same size as the phone and
   address above them, a dimmer or smaller row reads as a fault rather than as
   de-emphasis. Row spacing comes from line-height alone; the grid gap is
   zero, which is what keeps seven rows compact. */
.contact-list__hours > li { margin: 0; padding: 0; list-style: none; }
.contact-list__day { white-space: nowrap; }

/* A line that is not a day and a time — "By appointment only", a holiday note
   — runs across both columns instead of being forced into one. */
.contact-list__note { grid-column: 1 / -1; }

.contact-list__time {
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

/* Same fault as the breadcrumbs. The links are all exactly 40x40, but the
   anchors were inline-flex, so each one sat on its line's baseline and the
   Instagram item ended up 8px above the other two. Making the item and the
   anchor block-level flex takes the baseline out of it entirely, and
   align-items: center on the row is then explicit rather than inherited. */
.social-list {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: var(--sp-3); margin-top: var(--sp-5);
}

.social-list__item { display: flex; }

.social-list__link {
  display: flex; align-items: center; justify-content: center;
  flex: 0 0 auto;
  width: 40px; height: 40px;
  border: 1px solid rgb(220 198 161 / 55%);   /* soft gold, held back */
  border-radius: var(--radius-pill);
  color: var(--color-text-invert);
  transition: background-color var(--transition), border-color var(--transition), color var(--transition);
}
.social-list__link:hover {
  background: var(--hpw-gold-300);
  border-color: var(--hpw-gold-300);
  color: var(--hpw-black);            /* 7.36:1 on soft gold */
}
/* A fixed box and a centred glyph, so a wider mark and a taller one still sit
   on the same optical centre. */
.social-list__link svg {
  width: 18px; height: 18px;
  fill: currentColor;
  display: block;
}

/* THE LOGO ON DARK TEAL — a workaround, not the design.
   The supplied lockup is black and navy artwork on an opaque white ground, so
   it cannot sit directly on dark teal and stay legible. Until a reversed
   version arrives from the client (it is listed in
   assets/img/logo/README.md), it sits on a light panel.
   The panel is kept as small and as quiet as the artwork allows: padding just
   clear of the lockup, a small radius rather than a pill, and soft white
   rather than pure white so it reads as part of the footer instead of a
   sticker on top of it. It should still be replaced, not restyled. */
.site-footer__brand .site-logo--panel {
  align-self: flex-start;
  width: fit-content;
  padding: var(--sp-2);
  background: var(--color-bg-alt);
  border-radius: var(--radius-sm);
}
.site-footer__brand .site-logo--panel img { display: block; width: 180px; }

.site-footer__bar { border-top: 1px solid rgb(250 250 250 / 18%); }
.site-footer__bar-inner {
  display: flex; flex-wrap: wrap; align-items: center;
  justify-content: space-between; gap: var(--sp-3) var(--sp-6);
  padding-block: var(--sp-5);
  font-size: var(--fs-xs);
  color: rgb(255 255 255 / 78%);
}
.site-footer__copyright { margin: 0; }
/* Right-hand end of the bottom bar: legal links (when there are any), then
   the CanRank credit. */
.site-footer__bar-end { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2) var(--sp-5); }
.site-footer__credit { margin: 0; }
.site-footer .site-footer__credit a { text-decoration: underline; text-underline-offset: 0.25em; }
.site-footer__legal { display: flex; flex-wrap: wrap; gap: var(--sp-2) var(--sp-5); margin: 0; padding: 0; list-style: none; }

/* --- 404 ------------------------------------------------------------------ */

.section--404__cta { margin-top: var(--sp-6); display: flex; flex-wrap: wrap; gap: var(--sp-4); align-items: center; }

/* --- Migrated Squarespace figures ---------------------------------------- */
/*
 * Squarespace nests two things inside <figcaption>: a real caption, and an
 * "image card" (the title + subtitle fields on an image block).
 *
 * MEASURED ON THE LIVE SITE, 1 Sep 2026: image-card text and ordinary body
 * paragraphs compute to identical styles - 16px, weight 400, rgb(51,51,51),
 * line-height 28.8px - and the caption box has no background, padding or
 * border. A reader cannot tell them apart, because there is nothing to tell.
 *
 * So the migration UNWRAPS card copy into ordinary paragraphs rather than
 * styling it as anything. Nothing is needed here for it. Giving it a card
 * treatment would have been inventing a design the client never had, and it
 * would have left real article copy stuck inside a caption, which is a dead end
 * in the WordPress editor.
 *
 * Only genuine captions are styled below.
 */

.entry-content figcaption {
  font-size: var(--fs-sm);
  color: var(--color-text-muted);
  padding-top: var(--sp-3);
  text-align: center;
}
.entry-content figcaption p { margin: 0; }

/* More space below an image than above it, so it reads as belonging to the text
   that follows rather than floating between two blocks. */
.entry-content figure {
  margin-block: var(--sp-7) var(--sp-8);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.entry-content figure img { display: block; width: 100%; height: auto; }


/* --- Sticky rails --------------------------------------------------------- */
/*
 * A sticky column taller than the viewport has its bottom permanently out of
 * reach — the reader scrolls the page and the rail just sits there. Give each
 * rail its own scroll, and stop that scroll chaining to the page when it hits
 * the end, which otherwise makes the page lurch.
 */
.rail-sticky {
  position: sticky;
  top: calc(var(--header-h) + var(--sp-5));
  max-height: calc(100vh - var(--header-h) - var(--sp-5) * 2);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: var(--sp-2);
  scrollbar-width: thin;
  scrollbar-color: var(--color-border) transparent;
}
.rail-sticky::-webkit-scrollbar { width: 6px; }
.rail-sticky::-webkit-scrollbar-track { background: transparent; }
.rail-sticky::-webkit-scrollbar-thumb {
  background: var(--color-border); border-radius: 3px;
}
.rail-sticky::-webkit-scrollbar-thumb:hover { background: var(--color-btn-accent-bg); }

@media (max-width: 62rem) {
  .rail-sticky { position: static; max-height: none; overflow: visible; padding-right: 0; }
}

/* ==========================================================================
   Section heading block — shared by the service-page sections
   --------------------------------------------------------------------------
   Left-aligned, matching the "Helpful Articles & Resources" row on the
   homepage rather than the centred pathways heading: on a long service page
   a run of centred headings makes the eye zig-zag. Heading at the h3 step,
   the same size every homepage section heading uses.
   ========================================================================== */

.section-head { margin-block-end: var(--sp-6); max-width: 46rem; }
.section-head__title {
  color: var(--color-heading);
  font-size: var(--fs-h3);
  margin: 0;
  text-wrap: balance;
}
.section-head__intro {
  margin: var(--sp-3) 0 0;
  font-size: var(--fs-base);
  color: var(--color-text);
  text-wrap: pretty;
}
.section-head--split {
  max-width: none;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--sp-3) var(--sp-6);
}
.section-head--split > div { max-width: 46rem; }
.section-head__more {
  color: var(--color-link-accent);
  font-weight: var(--fw-semi);
  font-size: var(--fs-sm);
  text-decoration: none;
  white-space: nowrap;
}
.section-head__more:hover { color: var(--color-link-accent-hover); text-decoration: underline; }

/* Outline button for dark teal panels: white edge and label, fills white on
   hover. The light-background outline button would draw a dark teal border
   on dark teal and vanish. */
.btn--outline-dark {
  background: transparent;
  color: var(--color-text-invert);
  border-color: var(--color-text-invert);
}
.btn--outline-dark:hover {
  background: var(--color-surface-on-dark);
  border-color: var(--color-surface-on-dark);
  color: var(--color-btn-primary-bg-hover);
}

/* ==========================================================================
   PHONES — added 6 Oct 2026 after a full pass at 390px
   --------------------------------------------------------------------------
   Measured at 390px (iPhone 12-15) before these rules: the page was 423px
   wide, so every page scrolled sideways. The header was the cause: a 179px
   logo + the Book Now button + the menu button + gaps = 437px.
   ========================================================================== */

@media (max-width: 30rem) {

  .site-header__inner { gap: var(--sp-3); padding-block: var(--sp-2); }
  .site-logo img { width: 8.5rem; }            /* 136px */
  .site-header__actions { gap: var(--sp-2); }
  .site-header__cta.btn {
    padding: 0.5rem 0.875rem;
    min-height: 40px;
    font-size: var(--fs-sm);
  }
  .nav-toggle { width: 40px; height: 40px; }
}

/* Utility bar: location and phone on one line. The email address alone is
   wider than a phone screen, so it wrapped the bar to two lines and pushed
   the page down by 28px before anything useful appeared. It stays in the
   footer, two thumbs away. */
@media (max-width: 36rem) {
  .utility-bar__item:nth-child(3) { display: none; }
  .utility-bar__contact { gap: var(--sp-2) var(--sp-5); }
}

/* Footer: 96px of padding top and bottom is right on a desktop and leaves a
   phone looking at a screenful of empty teal. */
@media (max-width: 40rem) {
  .site-footer__inner { padding-block: var(--sp-7); gap: var(--sp-6); }
}

/* --------------------------------------------------------------------------
   Swipe rows on phones
   --------------------------------------------------------------------------
   Rows of equal cards (at-a-glance cards, article cards, specialised-care
   cards) stack one per screen on a phone, which made a five-card row about
   1,000px tall. Below 40rem they become a sideways row instead: each card
   78% of the screen, so the edge of the next one shows and says "swipe",
   snapping into place. The row bleeds to the screen edges by cancelling the
   container's side padding, then puts it back as inner padding, so the
   first card still lines up with every heading on the page. It never makes
   the page itself wider; only the row scrolls.
   -------------------------------------------------------------------------- */
@media (max-width: 39.99rem) {
  .swipe-row {
    display: grid !important;
    grid-auto-flow: column;
    grid-template-columns: none !important;
    grid-auto-columns: 78%;
    gap: var(--sp-3) !important;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: var(--gutter);
    margin-inline: calc(var(--gutter) * -1);
    padding-inline: var(--gutter);
    padding-block-end: var(--sp-2);
    scrollbar-width: none;
  }
  .swipe-row::-webkit-scrollbar { display: none; }
  .swipe-row > * { scroll-snap-align: start; min-width: 0; }
}

/* ==========================================================================
   MOBILE HEADER — Option 2, approved by Kim by email on 25 Sep 2026
   --------------------------------------------------------------------------
   Whenever the menu is collapsed: menu | map pin | logo | phone | calendar,
   logo centred, no boxes. The Book Now button and the teal utility bar are
   hidden, because the pin, phone and calendar icons do their jobs. Every
   icon keeps a 44px tap area. Built 9 Oct 2026.
   ========================================================================== */

.header-icon { display: none; }

@media (max-width: 62rem) {

  .utility-bar { display: none; }

  .site-header__inner {
    display: grid;
    grid-template-columns: auto auto minmax(0, 1fr) auto auto;
    align-items: center;
    gap: var(--sp-1);
    padding-block: var(--sp-2);
  }

  /* The action buttons join the header's grid directly. */
  .site-header__actions { display: contents; }
  .site-header__cta { display: none !important; }

  .nav-toggle          { grid-column: 1; grid-row: 1; }
  .header-icon--pin    { grid-column: 2; grid-row: 1; }
  .site-header__brand  { grid-column: 3; grid-row: 1; justify-self: center; margin: 0; min-width: 0; }
  .header-icon--phone  { grid-column: 4; grid-row: 1; }
  .header-icon--book   { grid-column: 5; grid-row: 1; }

  .site-logo img { width: min(180px, 100%); }

  .header-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    color: var(--color-heading);
    text-decoration: none;
  }
  .header-icon svg { stroke-width: 1.5; }
  .header-icon:hover { color: var(--color-link-hover); background: var(--color-bg-alt); }
  .header-icon:focus-visible { outline: 3px solid var(--color-focus); outline-offset: 2px; }

  .nav-toggle { width: 44px; height: 44px; }
}
