/* Site header for pages still served from the legacy snapshot.
   Source of truth: platform/web/public/site-header.css. scripts/sync-partials.mjs
   mirrors it to the repo root (for the old static deploy) — edit this copy.

   A static port of src/components/Header.module.css (+ Button, + the .wrap
   container), direction A: ink top strip, logo + tagline, Services mega-menu,
   round call and menu buttons. Every class is prefixed `hrgh-` so nothing in
   the legacy style.css can match it, and the rules below reset the few
   element-level legacy rules that could still reach in (a { opacity on hover },
   inherited line-height, letter-spacing, colour). Colours are the new site's
   tokens, scoped to the header, and fixed: the legacy page's own dark/light
   theme (html[data-theme]) never changes them, so the header and its
   mega-menu read the same — and keep their contrast — in both themes.

   The header is sticky with a negative top equal to the strip's height, so
   the strip scrolls away and the bar stays. Breakpoints match
   Header.module.css: full nav with the tagline >= 1180px; nav without the
   tagline 1024-1179px; below 1024px a round call button + round menu button
   open a full-width sheet. */

.hrgh {
  --hrgh-bg: #FAF7F2; --hrgh-surface: #FFFFFF; --hrgh-line: #E7E1D6;
  --hrgh-ink: #1C1B19; --hrgh-ink-2: #57534E; --hrgh-brand: #2563EB; --hrgh-brand-hover: #1D4ED8;
  --hrgh-ink-hover: #3A3833;
  --hrgh-radius: 4px; --hrgh-btn-radius: 2px;
  /* Type system C, same families as the Next header (globals.css --heading). */
  --hrgh-heading: 'Libre Caslon Text', Georgia, serif;
  --hrgh-strip-h: 36px; --hrgh-bar-h: 68px;
  position: sticky;
  top: calc(-1 * var(--hrgh-strip-h));
  /* Same stacking as the legacy .site-top wrapper it replaces (z-index 100),
     so legacy modals and drawers still layer above it as they did. */
  z-index: 100;
  display: block;
  margin: 0; padding: 0;
  background: var(--hrgh-bg);
  border-bottom: 1px solid transparent;
  color: var(--hrgh-ink);
  color-scheme: light;
  font: 400 17px/1.65 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  letter-spacing: normal;
  text-align: left;
  -webkit-font-smoothing: antialiased;
  transition: background-color .2s ease, border-color .2s ease;
}
/* While the phone sheet is open it must cover everything on the page,
   including the legacy floating call pill (script.js, z-index 200). */
.hrgh.hrgh-menu-open { z-index: 300; }
.hrgh *, .hrgh *::before, .hrgh *::after { box-sizing: border-box; }
.hrgh ul, .hrgh li, .hrgh p { margin: 0; padding: 0; list-style: none; }
/* style.css sets p { line-height: 1.7 } directly on the element. */
.hrgh p { line-height: inherit; }
.hrgh a { color: var(--hrgh-ink); text-decoration: none; opacity: 1; }
.hrgh a:hover { opacity: 1; }
.hrgh img { display: block; max-width: none; }
.hrgh svg { display: inline-block; flex: none; }
.hrgh [hidden] { display: none; }

/* The blur lives on a ::before layer, never on .hrgh itself: a backdrop-filter
   on the header would make it the containing block for the fixed-position
   phone sheet, collapsing the menu to the header's height once scrolled. */
.hrgh.hrgh-scrolled {
  background: transparent;
  border-bottom-color: var(--hrgh-line);
}
.hrgh.hrgh-scrolled::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgb(250 247 242 / 0.88);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  backdrop-filter: saturate(180%) blur(12px);
}

.hrgh-wrap { max-width: 1080px; margin: 0 auto; padding: 0 24px; }

/* ---- Top strip ---- */
.hrgh .hrgh-strip { background: var(--hrgh-ink); color: var(--hrgh-bg); font-size: 13px; line-height: 1.3; letter-spacing: .01em; }
.hrgh-strip-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: var(--hrgh-strip-h); }
.hrgh-strip-list { display: flex; align-items: center; }
.hrgh .hrgh-strip-list li + li::before {
  content: ''; display: inline-block; width: 1px; height: 12px; margin: 0 14px; vertical-align: -1px;
  background: #6A6865;
}
.hrgh .hrgh-strip-phone a {
  display: inline-flex; align-items: center; min-height: 44px; margin: -4px 0;
  color: var(--hrgh-bg); font-weight: 500; font-variant-numeric: tabular-nums; text-decoration: none;
}
.hrgh .hrgh-strip-phone a:hover { color: var(--hrgh-bg); text-decoration: underline; text-underline-offset: 3px; }

/* ---- Bar ---- */
.hrgh-row { position: relative; display: flex; align-items: center; gap: 28px; min-height: var(--hrgh-bar-h); }

.hrgh-brand { display: flex; align-items: center; gap: 14px; flex: none; }
.hrgh .hrgh-logo { display: inline-flex; align-items: center; flex: none; border-radius: var(--hrgh-radius); }
.hrgh-logo img { height: 44px; width: auto; }
.hrgh .hrgh-tagline {
  max-width: 10.5em; padding-left: 14px; border-left: 1px solid var(--hrgh-line);
  font-size: 12.5px; line-height: 1.3; color: var(--hrgh-ink-2);
}

/* ---- Desktop nav ---- */
.hrgh-nav { margin-left: auto; }
.hrgh-list { display: flex; align-items: center; gap: 4px; }
.hrgh .hrgh-link {
  position: relative;
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 44px; margin: 0; padding: 0 12px;
  font: inherit; font-size: 15px; font-weight: 500; letter-spacing: .005em; line-height: 1.65;
  color: var(--hrgh-ink); text-decoration: none; text-transform: none;
  background: none; border: 0; border-radius: var(--hrgh-radius); box-shadow: none; cursor: pointer;
}
.hrgh .hrgh-link::after {
  content: ''; position: absolute; left: 12px; right: 12px; bottom: 8px; height: 2px;
  background: var(--hrgh-brand); border-radius: 1px;
  transform: scaleX(0); transform-origin: left; transition: transform .2s ease;
}
.hrgh .hrgh-link:hover::after, .hrgh .hrgh-link.hrgh-current::after, .hrgh .hrgh-link[aria-expanded='true']::after { transform: scaleX(1); }
.hrgh .hrgh-link:hover { color: var(--hrgh-ink); }
.hrgh .hrgh-link.hrgh-current { color: var(--hrgh-brand); }

.hrgh-chevron {
  display: inline-block;
  width: 7px; height: 7px; margin-top: -3px;
  border-right: 1.6px solid currentColor; border-bottom: 1.6px solid currentColor;
  transform: rotate(45deg); transition: transform .2s ease;
}
.hrgh-link[aria-expanded='true'] .hrgh-chevron { transform: rotate(225deg); margin-top: 3px; }

/* The mega-menu spans the bar's content width (.hrgh-row is its positioning box). */
.hrgh .hrgh-mega {
  position: absolute; top: 100%; left: 24px; right: 24px;
  display: grid; grid-template-columns: minmax(0, 1fr) 280px;
  background: var(--hrgh-surface); border: 1px solid var(--hrgh-line); border-radius: var(--hrgh-radius);
  animation: hrgh-drop .16s ease-out;
}
.hrgh .hrgh-mega[hidden] { display: none; }
/* Without JavaScript the Services button cannot toggle anything, so the
   mega-menu falls back to opening on hover/focus. site-header.js sets
   data-hrgh-ready, which turns the fallback off. */
.hrgh:not([data-hrgh-ready]) .hrgh-has-menu:hover > .hrgh-mega,
.hrgh:not([data-hrgh-ready]) .hrgh-has-menu:focus-within > .hrgh-mega { display: grid; }
.hrgh .hrgh-mega-list { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 12px; }
.hrgh .hrgh-mega-item {
  display: flex; align-items: flex-start; gap: 14px; min-height: 44px; padding: 14px;
  border-radius: var(--hrgh-radius); color: var(--hrgh-ink); text-decoration: none;
}
.hrgh .hrgh-mega-item:hover, .hrgh .hrgh-mega-item[aria-current='page'] { background: var(--hrgh-bg); color: var(--hrgh-ink); }
.hrgh-mega-icon {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 40px; height: 40px; border: 1px solid var(--hrgh-line); border-radius: var(--hrgh-radius);
  color: var(--hrgh-brand); background: var(--hrgh-surface);
}
.hrgh-mega-text { display: grid; gap: 3px; }
.hrgh-mega-label { font-weight: 500; font-size: 15px; line-height: 1.35; }
.hrgh-mega-desc { font-size: 13.5px; line-height: 1.45; color: var(--hrgh-ink-2); }
.hrgh .hrgh-mega-side {
  display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 26px 24px;
  background: var(--hrgh-bg); border-left: 1px solid var(--hrgh-line);
}
.hrgh .hrgh-mega-side-title { font-family: var(--hrgh-heading); font-size: 21px; font-weight: 700; line-height: 1.2; letter-spacing: normal; color: var(--hrgh-ink); }
.hrgh .hrgh-mega-side-text { font-size: 14px; line-height: 1.5; color: var(--hrgh-ink-2); }
.hrgh .hrgh-mega-side-link {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; margin-top: auto;
  font-size: 15px; font-weight: 500; color: var(--hrgh-brand); text-decoration: none;
}
.hrgh .hrgh-mega-side-link:hover { color: var(--hrgh-brand-hover); text-decoration: underline; text-underline-offset: 3px; }
@keyframes hrgh-drop { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

/* ---- Right-hand actions ---- */
.hrgh-actions { display: flex; align-items: center; gap: 10px; flex: none; }

/* The new site's primary Button (components/Button.module.css): ink, paper text. */
.hrgh .hrgh-btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 10px 20px;
  border-radius: var(--hrgh-btn-radius); font: 500 15px/1.2 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  letter-spacing: .02em; text-decoration: none; border: 1px solid var(--hrgh-ink);
  background: var(--hrgh-ink); color: var(--hrgh-bg);
  transition: background-color .15s, border-color .15s, color .15s;
}
.hrgh .hrgh-btn:hover { background: var(--hrgh-ink-hover); border-color: var(--hrgh-ink-hover); color: var(--hrgh-bg); }
.hrgh-cta { flex: none; }

.hrgh .hrgh-round {
  display: none; align-items: center; justify-content: center; flex: none;
  width: 44px; height: 44px; margin: 0; padding: 0; border-radius: 50%; box-shadow: none; cursor: pointer;
}
.hrgh .hrgh-call { background: var(--hrgh-ink); border: 1px solid var(--hrgh-ink); color: var(--hrgh-bg); }
.hrgh .hrgh-call:hover { background: var(--hrgh-ink-hover); border-color: var(--hrgh-ink-hover); color: var(--hrgh-bg); }
.hrgh .hrgh-burger { background: var(--hrgh-surface); border: 1px solid var(--hrgh-line); color: var(--hrgh-ink); }

.hrgh-bars, .hrgh-bars::before, .hrgh-bars::after {
  display: block; width: 18px; height: 1.8px; border-radius: 1px; background: var(--hrgh-ink);
  transition: transform .2s ease, opacity .2s ease, background-color .2s ease;
}
.hrgh-bars { position: relative; }
.hrgh-bars::before, .hrgh-bars::after { content: ''; position: absolute; left: 0; }
.hrgh-bars::before { top: -6px; }
.hrgh-bars::after { top: 6px; }
.hrgh-burger[aria-expanded='true'] .hrgh-bars { background: transparent; }
.hrgh-burger[aria-expanded='true'] .hrgh-bars::before { transform: translateY(6px) rotate(45deg); }
.hrgh-burger[aria-expanded='true'] .hrgh-bars::after { transform: translateY(-6px) rotate(-45deg); }

/* Visible keyboard focus everywhere in the header. */
.hrgh a:focus-visible, .hrgh button:focus-visible {
  outline: 2px solid var(--hrgh-brand); outline-offset: 2px;
}
.hrgh .hrgh-strip a:focus-visible { outline-color: var(--hrgh-bg); }

/* ---- Phone / tablet sheet ---- */
/* `top` is measured by site-header.js when the menu opens (the header's
   bottom edge); this is only the fallback. */
.hrgh .hrgh-sheet {
  position: fixed; left: 0; right: 0; top: calc(var(--hrgh-strip-h) + var(--hrgh-bar-h)); bottom: 0;
  overflow-y: auto; overscroll-behavior: contain;
  background: var(--hrgh-bg); border-top: 1px solid var(--hrgh-line);
  animation: hrgh-sheet .2s ease-out;
}
.hrgh .hrgh-sheet[hidden] { display: none; }
@keyframes hrgh-sheet { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
.hrgh-sheet-inner { padding-top: 20px; padding-bottom: calc(32px + env(safe-area-inset-bottom)); }
.hrgh .hrgh-sheet-heading {
  margin: 0 0 4px; font-size: 12px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase;
  line-height: 1.65; color: var(--hrgh-ink-2);
}
.hrgh .hrgh-sheet-services { margin-bottom: 20px; }
.hrgh .hrgh-sheet-service {
  display: flex; align-items: flex-start; gap: 14px; padding: 16px 0;
  border-bottom: 1px solid var(--hrgh-line);
  color: var(--hrgh-ink); text-decoration: none;
}
.hrgh .hrgh-sheet-service:hover { color: var(--hrgh-ink); }
.hrgh-sheet-icon { display: inline-flex; flex: none; padding-top: 4px; color: var(--hrgh-brand); }
.hrgh-sheet-label { font-family: var(--hrgh-heading); font-size: 25px; font-weight: 400; line-height: 1.15; letter-spacing: -.01em; }
.hrgh .hrgh-sheet-service[aria-current='page'] .hrgh-sheet-label { color: var(--hrgh-brand); }
.hrgh .hrgh-sheet-links a {
  display: flex; align-items: center; min-height: 52px;
  border-bottom: 1px solid var(--hrgh-line);
  color: var(--hrgh-ink); text-decoration: none; font-size: 18px; font-weight: 500;
}
.hrgh .hrgh-sheet-links a[aria-current='page'] { color: var(--hrgh-brand); }
.hrgh-sheet-foot { display: grid; gap: 10px; margin-top: 24px; }
.hrgh .hrgh-sheet-phone {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px;
  color: var(--hrgh-ink); text-decoration: none; font-weight: 500; font-variant-numeric: tabular-nums;
}
.hrgh-sheet-phone svg { color: var(--hrgh-brand); }

/* ---- Breakpoints ---- */
@media (max-width: 1179px) {
  .hrgh-row { gap: 16px; }
  .hrgh .hrgh-tagline { display: none; }
}
@media (max-width: 1023px) {
  .hrgh .hrgh-nav { display: none; }
  .hrgh .hrgh-round { display: inline-flex; }
  .hrgh-actions { margin-left: auto; }
  .hrgh .hrgh-tagline { display: block; }
}
@media (min-width: 1024px) {
  .hrgh .hrgh-sheet { display: none !important; }
}
@media (max-width: 640px) {
  .hrgh { --hrgh-strip-h: 32px; --hrgh-bar-h: 64px; }
  .hrgh .hrgh-strip { font-size: 12.5px; }
  .hrgh-strip-row { justify-content: center; }
  .hrgh .hrgh-since, .hrgh .hrgh-strip-phone { display: none; }
  .hrgh .hrgh-strip-list li + li::before { margin: 0 12px; }
  .hrgh .hrgh-cta { display: none; }
  .hrgh .hrgh-logo { min-height: 44px; padding: 2px 0; }
  .hrgh-logo img { height: 40px; }
  .hrgh-brand { gap: 12px; }
  .hrgh .hrgh-tagline { padding-left: 12px; font-size: 12px; }
}
@media (max-width: 359px) {
  .hrgh .hrgh-tagline { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .hrgh, .hrgh .hrgh-link::after, .hrgh-chevron, .hrgh-bars, .hrgh-bars::before, .hrgh-bars::after { transition: none; }
  .hrgh .hrgh-mega, .hrgh .hrgh-sheet { animation: none; }
}
@media print {
  .hrgh { display: none; }
}
