/* 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). 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 so they never touch the legacy page around it.

   Breakpoints match Header.module.css: full nav >= 1180px; nav without the
   phone number 1024-1179px; below 1024px a call icon + 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-radius: 4px;
  position: sticky;
  top: 0;
  /* 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);
  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, box-shadow .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; }
.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);
  box-shadow: 0 1px 12px rgb(28 27 25 / 0.06);
}
.hrgh.hrgh-scrolled::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgb(250 247 242 / 0.86);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  backdrop-filter: saturate(180%) blur(12px);
}

.hrgh-wrap { max-width: 1080px; margin: 0 auto; padding: 0 24px; }
.hrgh-row { display: flex; align-items: center; gap: 28px; min-height: 68px; }

.hrgh .hrgh-logo { display: inline-flex; align-items: center; flex: none; border-radius: var(--hrgh-radius); }
.hrgh-logo img { height: 44px; width: auto; }

/* ---- 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: 40px; 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: 6px; 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; }

.hrgh-has-menu { position: relative; }
.hrgh .hrgh-dropdown {
  position: absolute; top: calc(100% + 10px); left: -12px; width: 360px;
  padding: 8px; background: var(--hrgh-surface);
  border: 1px solid var(--hrgh-line); border-radius: 10px;
  box-shadow: 0 18px 48px rgb(28 27 25 / 0.14);
  animation: hrgh-drop .16s ease-out;
}
.hrgh .hrgh-dropdown[hidden] { display: none; }
/* Without JavaScript the Services button cannot toggle anything, so the
   dropdown 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-dropdown,
.hrgh:not([data-hrgh-ready]) .hrgh-has-menu:focus-within > .hrgh-dropdown { display: block; }
.hrgh .hrgh-drop-item {
  display: grid; gap: 2px; padding: 12px 14px; border-radius: 8px;
  color: var(--hrgh-ink); text-decoration: none;
}
.hrgh .hrgh-drop-item:hover, .hrgh .hrgh-drop-item[aria-current='page'] { background: var(--hrgh-bg); }
.hrgh-drop-label { font-weight: 500; font-size: 15px; }
.hrgh-drop-blurb { font-size: 13.5px; line-height: 1.45; color: var(--hrgh-ink-2); }
@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: 16px; flex: none; }
.hrgh .hrgh-phone {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--hrgh-ink); text-decoration: none; font-size: 15px; font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.hrgh-phone svg { color: var(--hrgh-brand); }
.hrgh .hrgh-phone:hover .hrgh-phone-text { text-decoration: underline; text-underline-offset: 3px; }

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

.hrgh .hrgh-icon-btn {
  display: none; align-items: center; justify-content: center;
  width: 44px; height: 44px; margin: 0; padding: 0;
  color: var(--hrgh-ink); background: var(--hrgh-surface);
  border: 1px solid var(--hrgh-line); border-radius: 10px; box-shadow: none; cursor: pointer;
}
.hrgh-icon-btn svg { color: var(--hrgh-brand); }

.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;
}

/* ---- Phone / tablet sheet ---- */
.hrgh .hrgh-sheet {
  position: fixed; left: 0; right: 0; top: 68px; 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 8px; 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 { display: grid; gap: 8px; margin-bottom: 20px; }
.hrgh .hrgh-sheet-service {
  display: grid; gap: 2px; padding: 14px 16px;
  background: var(--hrgh-surface); border: 1px solid var(--hrgh-line); border-radius: 10px;
  color: var(--hrgh-ink); text-decoration: none;
}
.hrgh .hrgh-sheet-links { border-top: 1px solid var(--hrgh-line); }
.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: 14px; 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 .hrgh-phone-text { display: none; }
  .hrgh .hrgh-phone { width: 40px; height: 40px; justify-content: center; }
  .hrgh-row { gap: 16px; }
}
@media (max-width: 1023px) {
  .hrgh .hrgh-nav, .hrgh .hrgh-phone { display: none; }
  .hrgh .hrgh-icon-btn { display: inline-flex; }
  .hrgh-actions { margin-left: auto; gap: 10px; }
}
@media (min-width: 1024px) {
  .hrgh .hrgh-sheet { display: none !important; }
}
@media (max-width: 640px) {
  .hrgh .hrgh-cta { display: none; }
  .hrgh-row { min-height: 64px; }
  .hrgh .hrgh-logo { min-height: 44px; padding: 2px 0; }
  .hrgh-logo img { height: 40px; }
  .hrgh .hrgh-sheet { top: 64px; }
  .hrgh-drop-blurb { font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .hrgh, .hrgh .hrgh-link::after, .hrgh-chevron, .hrgh-bars, .hrgh-bars::before, .hrgh-bars::after { transition: none; }
  .hrgh .hrgh-dropdown, .hrgh .hrgh-sheet { animation: none; }
}
@media print {
  .hrgh { display: none; }
}
