/* Header (docs-plan-overhaul-dec1.md 2.5): a hairline pill across the container. Transparent at the top of the page so the
   hero art runs behind it; solid --ink-2 once the page has scrolled (site.js sets data-scrolled), or from the start without JS.
   No blur, no shadow. Below 50rem: lockup, an outline Get a quote and a menu button that opens a <details> panel. */

/* covers the notch strip above the sticky header */
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); background: var(--ink); z-index: 51; pointer-events: none; }

.site-header { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50; height: var(--header-h); pointer-events: none; }
.site-header > .wrap { height: 100%; display: flex; align-items: center; }
.site-bar { pointer-events: auto; position: relative; flex: 1; display: flex; align-items: center; height: 48px; padding: 0 2px 0 20px;
  border-radius: var(--r-pill); border: 1px solid color-mix(in srgb, var(--paper) 14%, transparent); background-color: transparent;
  transition: background-color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease); }
.site-header[data-scrolled] .site-bar, .site-bar:has(.nav-menu[open]) { background-color: var(--ink-2); border-color: var(--line); }
@media (scripting: none) { .site-bar { background-color: var(--ink-2); border-color: var(--line); } }
@media (min-width: 50rem) { .site-bar { height: 52px; padding-right: 8px; } }

/* Lockup: mark 20 px (cap height 12) on phones, 22 px (cap height 13) from 50rem */
.site-bar .wordmark { margin-right: auto; border-radius: var(--r-sm); }
.site-bar .wm { height: 20px; }
@media (min-width: 50rem) { .site-bar .wm { height: 22px; } }

/* Links: hover draws a 1 px line in under the word from the left; the current page has it drawn */
.site-nav { display: none; }
.site-nav ul { display: flex; }
.site-nav a { display: inline-flex; align-items: center; height: 44px; padding: 0 14px; border-radius: var(--r-pill);
  font-size: .875rem; font-weight: 450; letter-spacing: -.005em; line-height: 1; color: var(--mist); text-decoration: none;
  background: linear-gradient(currentColor 0 0) 0 calc(50% + .42em + 6px) / 0 1px no-repeat content-box;
  transition: color var(--t-fast) var(--ease), background-size 250ms var(--ease); }
.site-header .site-nav a:hover, .site-header .site-nav a[aria-current="page"] { color: var(--paper);
  background: linear-gradient(currentColor 0 0) 0 calc(50% + .42em + 6px) / 100% 1px no-repeat content-box; }
@media (min-width: 50rem) { .site-nav { display: block; margin-right: 12px; } }

/* Get a quote: outline, 36 px; hidden on the narrowest phones */
.hdr-cta { margin-right: 6px; }
@media (max-width: 22.49rem) { .hdr-cta { display: none; } }
@media (min-width: 50rem) { .hdr-cta { margin-right: 0; } }

/* Phone menu: a native disclosure (works without JS). site.js closes it on Escape, an outside click and a link click */
.nav-menu { flex: none; }
.nav-menu summary { list-style: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: var(--r-pill); cursor: pointer; color: var(--paper);
  -webkit-tap-highlight-color: transparent; transition: background-color var(--t-fast) var(--ease); }
.nav-menu summary::-webkit-details-marker { display: none; }
.nav-menu summary:hover { background-color: var(--ink-3); }
.nav-menu-icon { position: relative; width: 18px; height: 8px; }
.nav-menu-icon::before, .nav-menu-icon::after { content: ""; position: absolute; left: 0; right: 0; height: 1.5px; background: currentColor;
  transition: transform var(--t-move) var(--ease-io); }
.nav-menu-icon::before { top: 0; } .nav-menu-icon::after { bottom: 0; }
.nav-menu[open] .nav-menu-icon::before { transform: translateY(3.25px) rotate(45deg); }
.nav-menu[open] .nav-menu-icon::after { transform: translateY(-3.25px) rotate(-45deg); }
.nav-menu-panel { position: absolute; left: -1px; right: -1px; top: calc(100% + 8px); padding: 8px 20px 20px;
  background: var(--ink-2); border: 1px solid var(--line); border-radius: var(--r-lg); }
.nav-menu-panel li + li { border-top: 1px solid var(--line-soft); }
.nav-menu-panel li a { display: flex; align-items: center; height: 52px; font-size: 1.25rem; letter-spacing: -.02em; color: var(--paper); text-decoration: none; }
.nav-menu-panel li a[aria-current="page"] { color: var(--mist); }
.nav-menu-panel .btn { width: 100%; margin-top: 12px; justify-content: space-between; }
@media (prefers-reduced-motion: no-preference) { .nav-menu[open] .nav-menu-panel { animation: menu-in var(--t-move) var(--ease) both; } }
@keyframes menu-in { from { opacity: 0; transform: translateY(-8px); } }
@media (min-width: 50rem) { .nav-menu { display: none; } }

@media (forced-colors: active) { .site-bar { border-color: CanvasText; } }
