/*
 * Two-tier header — light chrome (Direction B), locked 2026 tokens.
 * 40px utility strip + 84px bar desktop · 64px bar mobile.
 * Work Sans for UI, IBM Plex Mono (system mono fallback) for numbers, Archivo for the promo title.
 * No box-shadows, no gradients, 4px radius, colour fade only, prefers-reduced-motion honoured.
 */

/* The parent theme's Foundation off-canvas wrapper (position: relative; overflow: hidden)
 * used to clip horizontal overflow from the peeking slick sliders (gallery, cards with
 * overflow-slick-list). function-header-nav.php unhooks that wrapper, so the clip lives
 * here instead. `clip` does not create a scroll container, so position: sticky on the
 * header keeps working; `hidden` on html alone is the fallback for browsers without it. */
html { overflow-x: hidden; }
@supports (overflow-x: clip) { html, body { overflow-x: clip; } }

/* Sticky lives on the block theme's template-part wrapper, not on the header itself:
 * a sticky element can only move within its parent, and the wrapper is exactly the
 * header's height, so `position: sticky` on header.site-header never stuck. The utility
 * strip scrolls away (top: -40px), the bar holds. Below 1024px there is no utility
 * strip, so the offset must be 0 there: with -40px the 64px mobile bar slid 40px off
 * the top of the screen as soon as the page scrolled (found 2026-09-18). */
.wp-block-template-part:has(> .site-header) { position: sticky; top: 0; z-index: 100; }
@media (min-width: 1024px) { .wp-block-template-part:has(> .site-header) { top: calc(-1 * var(--utility-h, 40px)); } }

@font-face { font-family: "Work Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url("../../assets/fonts/work-sans-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Work Sans"; font-style: normal; font-weight: 500; font-display: swap; src: url("../../assets/fonts/work-sans-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Work Sans"; font-style: normal; font-weight: 600; font-display: swap; src: url("../../assets/fonts/work-sans-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Archivo";   font-style: normal; font-weight: 700; font-display: swap; src: url("../../assets/fonts/archivo-latin-700-normal.woff2") format("woff2"); }

.site-header {
	--ink: #0B1E32; --ink-raise: #12283F; --steel: #204368; --blue: #005B97; --yellow: #FAC410;
	--n0: #FFFFFF; --n50: #F5F6F7; --n100: #E8EBEE; --n200: #D3D8DE; --n300: #B3BBC4;
	--n400: #8A949F; --n500: #667380; --n600: #47535E; --n700: #2C333A;
	--navy-mark: #11304F;
	/* Typography: the site's current fonts by default. The 2026 rebrand set
	   (Work Sans / Archivo / mono) is behind the body class .tfp-rebrand — see
	   TFP_REBRAND_TYPE in functions/function-header-nav.php. Mono is used only
	   for the phone numbers until the rebrand is approved. */
	--ui: var(--renoun-global-font-body, "pt-sans", helvetica-neue, helvetica, sans-serif);
	--display: var(--renoun-global-font-header, var(--ui));
	--mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
	--fade: color .15s ease-out, background-color .15s ease-out, border-color .15s ease-out;
	--utility-h: 40px; --bar-h: 84px; --bar-h-mobile: 64px;

	position: relative;
	z-index: 100;
	font-family: var(--ui);
	color: var(--n700);
	background: var(--n0);
}
.site-header *, .site-header *::before, .site-header *::after { box-sizing: border-box; }
.site-header ul { list-style: none; margin: 0; padding: 0; }
.site-header a { text-decoration: none !important; transition: var(--fade); }
.site-header button { font-family: inherit; }
.site-header.no-motion *, .site-header.no-motion *::before, .site-header.no-motion *::after { transition: none !important; }
@media (prefers-reduced-motion: reduce) { .site-header *, .site-header *::before, .site-header *::after { transition: none !important; } }

.site-header .wrap { max-width: 1312px; margin: 0 auto; padding: 0 20px; }
@media (min-width: 1024px) { .site-header .wrap { padding: 0 64px; } }

.site-header :focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; border-radius: 4px; }

/* ---- Utility strip ---------------------------------------------------- */

.header-utility { display: none; height: var(--utility-h); background: var(--n50); border-bottom: 1px solid var(--n100); }
.header-utility > .wrap { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.utility-links ul { display: flex; gap: 20px; }
.utility-links a, .header-utility a { font: 400 13px/1 var(--ui); color: var(--n600); }
.utility-links a:hover, .utility-links a:focus-visible { color: var(--blue); }
.utility-tel { display: flex; align-items: center; gap: 12px; }
.utility-tel a { display: inline-flex; align-items: center; gap: 6px; font: 400 13px/1 var(--mono); letter-spacing: .02em; color: var(--n700); }
.utility-tel a:hover, .utility-tel a:focus-visible { color: var(--blue); }
.site-header svg.tel-flag { flex: none; width: 19px; height: 10px; border-radius: 1px; outline: 1px solid rgba(11, 30, 50, .12); }
.site-header .tel-label { font: 700 12px/1 var(--ui); letter-spacing: .04em; color: var(--ink); }   /* US: navy */
.site-header .tel-ca .tel-label, .site-header a[data-tel-line="ca"] .tel-label { color: #D52B1E; }  /* CA: flag red */
.utility-tel__sep { color: var(--n300); }
/* The other country's flag → its site, no number (Danny, 2026-09-25). */
.utility-tel a.utility-site { display: inline-flex; align-items: center; justify-content: center; min-width: 28px; height: 28px; border: 1px solid transparent; border-radius: 4px; transition: var(--fade); }
.utility-tel a.utility-site:hover, .utility-tel a.utility-site:focus-visible { border-color: var(--n200); background: var(--n0); }
@media (min-width: 1024px) { .header-utility { display: block; } }

/* ---- Main bar --------------------------------------------------------- */

.header-main { height: var(--bar-h-mobile); background: var(--n0); border-bottom: 1px solid var(--n100); position: relative; }
.header-main > .wrap { height: 100%; display: flex; align-items: center; gap: 16px; position: static; } /* static: the panel positions against .header-main, full width */
@media (min-width: 1024px) { .header-main { height: var(--bar-h); } .header-main > .wrap { gap: 24px; } }

.site-logo { display: block; flex: none; line-height: 0; }
.site-logo__svg { display: block; height: 40px; width: auto; }
@media (min-width: 1024px) { .site-logo__svg { height: 44px; } }
.site-logo__text { font: 700 18px/1 var(--display); color: var(--ink); }

.primary-nav { display: none; flex: 1 1 auto; margin-left: 8px; }
.primary-nav > ul { display: flex; align-items: center; gap: 2px; }
.primary-nav > ul > li { position: static; }
.nav-trigger, .primary-nav .nav-link {
	font: 500 15px/20px var(--ui); color: var(--n700);
	background: none; border: 0; padding: 10px 13px; border-radius: 4px; cursor: pointer;
	display: flex; align-items: center; gap: 6px; position: relative; white-space: nowrap;
	transition: var(--fade);
}
.nav-trigger:hover, .nav-trigger:focus-visible, .primary-nav .nav-link:hover { color: var(--blue); }
.nav-trigger[aria-expanded="true"] { color: var(--ink); }
.nav-trigger[aria-expanded="true"]::after,
.primary-nav > ul > li.is-current > .nav-trigger::after,
.primary-nav .nav-link.is-current::after {
	content: ""; position: absolute; left: 13px; right: 13px; bottom: 1px; height: 2px; background: var(--yellow);
}
.site-header svg.caret { flex: none; width: 10px; height: 6px; }   /* the theme sizes bare svg to 100% */
.nav-trigger .caret { transition: transform .15s ease-out; color: var(--n400); }
.nav-trigger[aria-expanded="true"] .caret { transform: rotate(180deg); color: var(--ink); }
@media (min-width: 1024px) { .primary-nav { display: block; } }

/* ---- CTA -------------------------------------------------------------- */

.site-header .btn {
	display: inline-flex; align-items: center; justify-content: center;
	font: 600 15px/1 var(--ui); border-radius: 99px; padding: 14px 22px; white-space: nowrap;   /* pill, like the site's other buttons and form submits (Danny, 2026-09-13) */
	min-height: 44px; border: 1px solid transparent; transition: var(--fade);
}
.site-header .btn-primary { background: var(--yellow); color: var(--ink); border-color: var(--yellow); }
.site-header .btn-primary:hover, .site-header .btn-primary:focus-visible { background: #E0AC00; border-color: #E0AC00; color: var(--ink); }
.site-header .btn-outline { background: var(--n0); color: var(--ink); border-color: var(--n200); }
.site-header .btn-outline:hover, .site-header .btn-outline:focus-visible { border-color: var(--ink); color: var(--ink); }
.site-header .header-cta { display: none; margin-left: auto; flex: none; }
.site-header .theme-toggle { flex: none; width: 36px; height: 36px; margin-left: auto; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--n200); border-radius: 4px; background: transparent; color: var(--n600); cursor: pointer; transition: var(--fade); }
.site-header .theme-toggle:hover, .site-header .theme-toggle:focus-visible { color: var(--ink); background: var(--n50); }
.site-header .theme-toggle svg { width: 16px; height: 16px; display: block; }
.site-header .theme-toggle svg.theme-toggle__moon { display: none; }   /* element in the selector: outranks the generic svg rule above */
html[data-theme="light"] .site-header .theme-toggle svg.theme-toggle__sun { display: none; }
html[data-theme="light"] .site-header .theme-toggle svg.theme-toggle__moon { display: block; }
/* Mobile: the toggle sits flush right beside the hamburger. Both had margin-left:auto, so the free space split between them and the toggle floated mid-bar. */
.site-header .theme-toggle + .nav-toggle { margin-left: 4px; }
@media (min-width: 1024px) { .site-header .theme-toggle { margin-left: 0; } }
@media (min-width: 1024px) { .site-header .header-cta { display: inline-flex; } }

/* ---- Mobile bar: hamburger · logo ········ call · CTA ---------------------
 * Danny, 2026-09-18: make mobile conversion-friendly — menu and logo on the
 * left, a call button (no printed number) and the CTA flush right. It has to
 * fit 360px, so the logo and CTA step down a size under 400px. From 1024px
 * none of this applies (the utility strip carries the numbers, the CTA is full
 * size, no hamburger). The light / navy review toggle is switched off until
 * the rebrand (option tfp_theme_toggle). */
@media (max-width: 1023px) {
	.header-main > .wrap { gap: 10px; }
	.site-header .wrap { padding-left: 16px; padding-right: 16px; }
	.site-header .nav-toggle { order: 0; margin-left: -10px; margin-right: -4px; }   /* the 22px icon sits in a 44px target: pull the target out so the ICON lines up with the page edge */
	.site-logo { order: 1; }
	.site-logo__svg { height: 46px; }
	.header-call { order: 2; margin-left: auto; }
	.site-header .header-cta { order: 3; display: inline-flex; margin-left: 0; min-height: 44px; padding: 12px 18px; font-size: 14px; }
	.site-header .theme-toggle { order: 4; margin-left: 0; }
}
@media (max-width: 399px) {
	.header-main > .wrap { gap: 6px; }
	.site-logo__svg { height: 40px; }
	.site-header .header-cta { padding: 12px 13px; font-size: 13px; letter-spacing: -.005em; }
}

.header-call { display: block; flex: none; }
@media (min-width: 1024px) { .header-call { display: none; } }
.site-header .call-toggle {
	width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; padding: 0;
	background: var(--n0); color: var(--ink); border: 1px solid var(--n200); border-radius: 50% !important; cursor: pointer; transition: var(--fade); -webkit-tap-highlight-color: transparent;
}
.site-header .call-toggle:hover, .site-header .call-toggle:focus-visible, .site-header .call-toggle[aria-expanded="true"] { border-color: var(--ink); background: var(--n50); }
.site-header .call-toggle svg { width: 20px; height: 20px; display: block; flex: none; }
.site-header a.call-toggle, .site-header a.call-toggle:hover { color: var(--ink); text-decoration: none; }
.call-menu {
	position: absolute; top: 100%; right: 12px; z-index: 70; width: min(300px, calc(100vw - 24px));
	background: var(--n0); border: 1px solid var(--n100); border-top: 2px solid var(--yellow); border-radius: 0 0 4px 4px;
	padding: 14px 16px 10px;
}
.call-menu[hidden] { display: none; }
.call-menu__title { margin: 0 0 6px; font: 700 12px/1.3 var(--ui); letter-spacing: .08em; text-transform: uppercase; color: var(--n500, #6B7785); }
.call-menu ul { margin: 0; padding: 0; list-style: none; }
.call-menu li { margin: 0; padding: 0; border-top: 1px solid var(--n100); }
.call-menu li:first-child { border-top: 0; }
.call-menu a { display: flex; align-items: center; gap: 10px; min-height: 52px; color: var(--ink); text-decoration: none; }
.call-menu a:hover .tel-number, .call-menu a:focus-visible .tel-number { color: var(--blue); }
.call-menu .tel-flag { flex: none; width: 24px; height: auto; }
.call-menu .tel-label { font: 700 13px/1 var(--ui); letter-spacing: .04em; min-width: 22px; }
.call-menu .tel-number { font: 700 18px/1 var(--mono, var(--ui)); letter-spacing: .02em; color: var(--ink); margin-left: auto; }

/* ---- Hamburger (44 × 44, 22px icon) ----------------------------------- */

.nav-toggle {
	margin-left: auto; width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center;
	background: none; border: 0; border-radius: 4px; color: var(--ink); cursor: pointer; padding: 0;
}
.nav-toggle__icon .l1, .nav-toggle__icon .l2, .nav-toggle__icon .l3 { transition: transform .15s ease-out, opacity .15s ease-out; transform-origin: 11px 11px; }
.nav-toggle[aria-expanded="true"] .l1 { transform: translateY(5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .l2 { opacity: 0; }
.nav-toggle[aria-expanded="true"] .l3 { transform: translateY(-5px) rotate(-45deg); }
@media (min-width: 1024px) { .nav-toggle { display: none; } }

/* ---- Mega panel ------------------------------------------------------- */

.mega-panel {
	position: absolute; left: 0; right: 0; top: 100%;
	background: var(--n0); border-top: 1px solid var(--n100); border-bottom: 1px solid var(--n100);
	padding: 30px 0 34px; z-index: 60; color: var(--ink);
	box-shadow: 0 16px 28px -16px rgba(11, 30, 50, .22);   /* subtle lift under the open panel (Danny, 2026-09-13) */
}
.mega-panel[hidden] { display: none; }
.mega-panel .descriptor {
	font: 700 12px/1 var(--ui); letter-spacing: .09em; text-transform: uppercase;
	color: var(--blue); padding-bottom: 12px; border-bottom: 1px solid var(--n100); margin: 0 0 22px;
	display: flex; align-items: center; gap: 10px;
}
.mega-panel .descriptor::before { content: ""; width: 22px; height: 3px; background: var(--yellow); flex: none; }
.mega-panel__body { display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px; align-items: start; }
.mega-panel.has-media .mega-panel__body { grid-template-columns: minmax(0, 1fr) 360px; gap: 56px; }
.mega-panel__lists { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0 40px; }
.mega-panel--two-col-grouped .mega-panel__lists { grid-template-columns: minmax(0, 1.05fr) minmax(0, 2fr); }
.mega-panel__lists--cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.mega-panel__lists--cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.mega-panel__lists--cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.mega-panel--columns-grouped .panel-group { grid-template-columns: minmax(0, 1fr); }
.panel-group__label a { color: var(--blue); }
.panel-group__label a:hover { color: var(--ink); }
.panel-group { display: grid; gap: 0 32px; align-content: start; }
.panel-group--cols-1 { grid-template-columns: minmax(0, 1fr); }
.panel-group--cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.panel-group__label { grid-column: 1 / -1; font: 500 11px/1 var(--ui); letter-spacing: .09em; text-transform: uppercase; color: var(--n500); margin: 0 0 6px; }
.panel-list { margin: 0; }
.panel-list > li { border-bottom: 1px solid var(--n100); }
.panel-link { display: block; padding: 11px 12px; margin: 0 -12px; border-radius: 4px; color: var(--ink); transition: var(--fade); }
.panel-link:hover, .panel-link:focus-visible { background: var(--n50); }
.panel-link__label { display: block; font: 500 15px/20px var(--ui); color: var(--ink); transition: var(--fade); }
.panel-link__desc { display: block; margin-top: 3px; font: 400 13px/18px var(--ui); color: var(--n500); }
.panel-link:hover .panel-link__label, .panel-link:focus-visible .panel-link__label { color: var(--blue); }
.mega-panel__all { margin: 22px 0 0; }
.mega-panel__all a { font: 600 14px/1 var(--ui); color: var(--blue); }
.mega-panel__all a:hover { color: var(--ink); }

.mega-panel__media { border: 1px solid var(--n100); border-radius: 4px; overflow: hidden; background: var(--n0); }
.mega-panel__media-frame { position: relative; background: var(--n50); aspect-ratio: 4 / 3; }  /* light while the lazy image loads */
.mega-panel__img { display: block; width: 100%; height: 100%; object-fit: cover; }
.mega-panel__media-frame::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 16%; background: var(--yellow); clip-path: polygon(0 55%, 100% 0, 100% 100%, 0 100%); pointer-events: none; }
.promo-tile__kicker { position: absolute; left: 12px; bottom: 8px; z-index: 1; font: 700 11px/1 var(--ui); letter-spacing: .09em; text-transform: uppercase; color: var(--n0); }
.promo-tile__body { padding: 14px 16px 16px; }
.promo-tile__title { margin: 0 0 6px; font: 700 15px/20px var(--display); color: var(--ink); }
.promo-tile__text { margin: 0 0 12px; font: 400 13px/19px var(--ui); color: var(--n500); }
.promo-tile__link { font: 600 13px/1 var(--ui); color: var(--blue); }
.promo-tile__link:hover { color: var(--ink); }

/* ---- Mobile drawer ---------------------------------------------------- */

.mobile-drawer {
	position: fixed; left: 0; right: 0; bottom: 0; top: var(--bar-h-mobile);
	background: var(--n0); overflow-y: auto; -webkit-overflow-scrolling: touch; z-index: 99;
	display: flex; flex-direction: column;
}
.mobile-drawer[hidden] { display: none; }
/* Scroll lock on the root ONLY. html already carries overflow-x: clip (top of this file), so
 * overflow: hidden on body as well is not passed up to the viewport: body becomes a scroll
 * container of its own, the sticky header wrapper re-anchors to it, and because body never
 * scrolls the bar snaps back to the top of the document. Open the drawer anywhere but the top
 * of a page and the 64px slot above it showed page content instead of the bar (found
 * 2026-09-18). The drawer keeps its own scroll from chaining to the page underneath. */
html.nav-drawer-open { overflow: hidden; }
.mobile-drawer { overscroll-behavior: contain; }
@media (min-width: 1024px) { .mobile-drawer { display: none !important; } }

.mobile-drawer__cta { padding: 16px 20px 12px; border-bottom: 1px solid var(--n100); }
.mobile-drawer__cta .btn { width: 100%; min-height: 48px; }
.mobile-drawer__cta-line { margin: 8px 0 0; text-align: center; font: 400 13px/18px var(--ui); color: var(--n500); }

.mobile-nav__item { border-bottom: 1px solid var(--n100); }
.site-header .mobile-nav__trigger, .site-header .mobile-nav__link {
	width: 100%; max-width: none; display: flex; align-items: center; justify-content: space-between; gap: 12px;
	min-height: 52px; padding: 14px 20px; background: none; border: 0; text-align: left; cursor: pointer;
	font: 600 16px/20px var(--ui); color: var(--ink);
}
.mobile-nav__trigger .caret { margin-left: auto; flex: none; width: 12px; height: 8px; color: var(--n400); transition: transform .15s ease-out; }
.mobile-nav__trigger[aria-expanded="true"] { color: var(--blue); }
.mobile-nav__trigger[aria-expanded="true"] .caret { transform: rotate(180deg); color: var(--blue); }
.mobile-nav__panel { background: var(--n50); padding: 6px 20px 14px; }
.mobile-nav__panel[hidden] { display: none; }
.mobile-nav__descriptor { margin: 8px 0 4px; font: 700 11px/1 var(--ui); letter-spacing: .09em; text-transform: uppercase; color: var(--blue); }
.mobile-nav__group { margin: 12px 0 2px; font: 500 11px/1 var(--ui); letter-spacing: .09em; text-transform: uppercase; color: var(--n500); }
.mobile-nav__group a { color: var(--blue); display: inline-flex; align-items: center; min-height: 32px; }
.mobile-nav__list .panel-link { min-height: 44px; padding: 12px; }
.mobile-nav__list .panel-link__label { font-weight: 400; }
.mobile-nav__list li:last-child { border-bottom: 0; }
.mobile-nav__all { margin: 10px 0 0; }
.mobile-nav__all a { display: inline-flex; align-items: center; min-height: 44px; font: 600 14px/1 var(--ui); color: var(--blue); }

.mobile-drawer__utility { margin-top: auto; background: var(--ink); color: var(--n0); padding: 16px 20px 24px; }
.mobile-drawer__links { display: flex; flex-wrap: wrap; gap: 0 20px; margin-bottom: 8px; }
.mobile-drawer__links a { display: inline-flex; align-items: center; min-height: 44px; font: 400 14px/1 var(--ui); color: var(--n200); }
.mobile-drawer__links a:hover { color: var(--n0); }
.mobile-drawer__tel a { display: flex; align-items: center; gap: 10px; min-height: 44px; font: 400 16px/1 var(--mono); color: var(--n0); }
.mobile-drawer__tel .tel-label { font: 700 12px/1 var(--ui); letter-spacing: .06em; color: var(--n0); min-width: 24px; }
.mobile-drawer__tel a[data-tel-line="ca"] .tel-label { color: #FF4A3D; }   /* red, lifted for contrast on ink */
.mobile-drawer__tel svg.tel-flag { outline-color: rgba(255, 255, 255, .25); }
.mobile-drawer__tel a:hover { color: var(--yellow); }

/* ---- Neutralise the old header's global offsets while both blocks exist ---- */
.site-header-placeholder { padding: 12px; background: #F5F6F7; border: 1px dashed #D3D8DE; font: 13px/1.4 sans-serif; }

/* ---- Rebrand typography switch ---------------------------------------
   Add the body class .tfp-rebrand (TFP_REBRAND_TYPE = true) to move the
   header onto the 2026 set. Nothing else changes. */
.tfp-rebrand .site-header {
	--ui: "Work Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	--display: "Archivo", var(--ui);
}
.tfp-rebrand .mega-panel .descriptor,
.tfp-rebrand .promo-tile__kicker,
.tfp-rebrand .mobile-nav__descriptor { font-family: var(--mono); font-weight: 500; }
