/* Header, footer and global chrome fixes, full-site QA fix wave 2026-11-22 (builder F1).
   Loads after layout.css and every earlier section file. */

/* ================================================================ Dark-hero header
   Pages whose first section is a dark hero start with the dark header and switch to the
   light inner header once the hero has left the header band (motion.js adds .is-lit, the
   same observer as the home overlay), and back when scrolling up. Without JS the header
   stays dark, as before. While a mega panel is open the bar takes the light state too, so
   bar and panel read as one piece (home already does this). */
@media (min-width: 1280px) {
	.site-header.site-header--dark {
		transition: background-color 400ms var(--ease-out-quart), box-shadow 400ms var(--ease-out-quart);
	}
	.site-header.site-header--dark.is-lit,
	.site-header.site-header--dark:has(.mega.is-open) {
		background: var(--c-mist); box-shadow: inset 0 -1px 0 var(--ink-07);
	}
	.site-header--dark.is-lit .nav__logo-w, .site-header--dark:has(.mega.is-open) .nav__logo-w { display: none; }
	.site-header--dark.is-lit .nav__logo-d, .site-header--dark:has(.mega.is-open) .nav__logo-d { display: block; }
	.site-header--dark.is-lit .nav-link,
	.site-header--dark:has(.mega.is-open) .nav-link { color: var(--c-ink); }
	.site-header--dark.is-lit .nav-link:hover,
	.site-header--dark:has(.mega.is-open) .nav-link:hover { background: var(--c-lav-soft); color: var(--c-ink); }
	.site-header--dark.is-lit .nav-link[aria-expanded="true"],
	.site-header--dark:has(.mega.is-open) .nav-link[aria-expanded="true"] { background: var(--c-lav-soft); color: var(--c-blue); }
	/* The header button is rendered for dark (btn--on-dark); the light state uses the default primary. */
	.site-header--dark.is-lit .nav .btn--on-dark.btn--primary,
	.site-header--dark:has(.mega.is-open) .nav .btn--on-dark.btn--primary { --btn-bg: var(--c-blue); --btn-fg: var(--c-white); --btn-sh: var(--sh-blue); }
	.site-header--dark.is-lit .nav .btn--on-dark.btn--primary:hover,
	.site-header--dark:has(.mega.is-open) .nav .btn--on-dark.btn--primary:hover { --btn-bg: var(--c-blue-hover); --btn-sh: var(--sh-blue-hover); }
	.site-header--dark.is-lit .nav .btn--on-dark.btn--primary:active,
	.site-header--dark:has(.mega.is-open) .nav .btn--on-dark.btn--primary:active { --btn-bg: var(--c-blue-pressed); --btn-sh: none; }
	.site-header--dark.is-lit .nav :focus-visible,
	.site-header--dark:has(.mega.is-open) .nav :focus-visible { outline-color: var(--c-blue); }
}
/* The mega panel is light under every header variant: keep its focus ring blue, not the
   white ring .on-dark gives its descendants. */
.site-header--dark .mega :focus-visible { outline-color: var(--c-blue); }

/* Below 1280 the dark-hero header strip behind the floating card matches the hero, then
   clears once the hero has gone, like the light pages. The card itself stays Ink, as drawn
   in every Figma mobile frame (light and dark heroes alike). */
@media (max-width: 1279px) {
	.site-header.site-header--dark { transition: background-color 400ms var(--ease-out-quart); }
	.site-header.site-header--dark.is-lit { background: transparent; }
}

/* ================================================================ Footer, tablet and up
   The phone number and email never break inside themselves, and "Pause animations" stays
   on one line: the legal links wrap above the button instead of squeezing it. */
.foot__lines a, .motion-toggle { white-space: nowrap; }
.motion-toggle { flex: none; }
@media (min-width: 768px) {
	.foot__legal-row { flex-wrap: wrap; row-gap: 14px; }
	.foot__legal { flex: 1 1 auto; min-width: 0; row-gap: 6px; }
}
/* 768 to 1023: the address takes its own line, so phone and email sit together below it. */
@media (min-width: 768px) and (max-width: 1023px) {
	.foot__addr { display: block; }
	.foot__sep--addr { display: none; }
}

/* Footer, phones: every link group now starts closed (site-footer.php). The seven
   credential pills stay as drawn: at 390 they need four rows in source order unless the
   labels drop under the 12px floor or lose their dots, so they are left alone. */

/* ================================================================ Phone tap targets (QA round 2)
   Every control in the mobile sheet and the phone footer gets a hit area of at least 44px.
   Rows keep their drawn height: the padding that used to sit around the row moves inside
   the control. */
@media (max-width: 1279px) {
	/* Group heads: 38px head + 13px row padding becomes a 44px head + 10px padding (same 64px row). */
	.mitem { padding: 10px 0; }
	.mitem__head { min-height: 44px; }
	/* Sub-links: 44px rows. The 9px list gap and the 9px title gap fold into the rows, so the
	   lists read as one even column instead of a looser one. */
	.mgroup { gap: 0; }
	.mgroup:first-child { margin-top: 6px; }
	.mgroup__t { padding-top: 8px; }
	.mgroup__links { gap: 0; }
	.mgroup__links a { display: flex; align-items: center; min-height: 44px; }
	.mitem__body { gap: 4px; }
	.tlink--m { display: inline-flex; align-items: center; min-height: 44px; }
	/* The 32px logo link in the 56px bar: an invisible extension gives it a 44px hit area. */
	.mbar__logo { position: relative; }
	.mbar__logo::after { content: ""; position: absolute; inset: -6px -4px; }
}
@media (max-width: 767px) {
	/* Footer group buttons: 24px button + 16px row padding becomes a 44px button + 6px padding (same 56px row). */
	.fcol { padding: 6px 0; }
	.fcol__head { min-height: 44px; }
	.fcol__links { padding-top: 4px; gap: 0; }
	.fcol__links a { display: flex; align-items: center; min-height: 44px; }
	/* Pause animations stays a 30px pill; an invisible extension makes the hit area 44px. */
	.motion-toggle { position: relative; }
	.motion-toggle::after { content: ""; position: absolute; inset: -7px 0; }
	.social { position: relative; }
	.social::after { content: ""; position: absolute; inset: -4px; }
}
