/* =============================================================================
   lawgicLA, nav.css (W1a). The x01 header bar, the Practice areas panel, the phone panel, the menu overlay and the mobile call bar.
   Forked from the Hexagon v2 build's nav (the measured behaviour: transparent at the top, hides past 200px going down, returns going up,
   a paper fill past 8px, each item toned by the ground under it). Tokens only (tokens.css). One breakpoint (1023 / 1024).
   No shadows, no glass blur. The terracotta fill (--cta) is the one action colour.
   ========================================================================== */
:root {
  --nav-glyph: min(var(--icon), 18px);                   /* the phone glyph, the pill's icon slot, never over 18px */
  --nav-phone-w: 340px;                                  /* the phone panel is never narrower */
  --nav-svc-w: 980px;                                    /* the Practice areas panel at most */
  --nav-link: clamp(30px, min(5vw, 6vh), 132px);       /* the menu links, sized from the smaller of width and height */
  --nav-open: .75s;
  --wm-hdr: 34px;                                        /* the header wordmark (Instrument Serif, about 133px wide at 1440) */
  --cbar-h: calc(var(--btn-h) + 2 * var(--gap-12) + 1px); /* the mobile call bar: a 48px pill, 12px above and below, a 1px top hairline */
}
@media (min-width: 1441px) { :root { --nav-svc-w: 68.0556vw; --wm-hdr: 2.3611vw; } }
@media (max-width: 1023px) { :root { --wm-hdr: clamp(28px, 7.4vw, 34px); } }
.wm--hdr { font-size: var(--wm-hdr); }

/* ---- x01 bar: fixed, 72px, transparent at the top, hides past 200px down, light fill past 8px ---- */
.hdr { position: fixed; inset: 0 0 auto 0; z-index: 120; height: var(--hdr-h); padding: var(--gap-12) var(--pad-x);
  display: flex; align-items: center; justify-content: space-between; gap: var(--gap-24); color: var(--ink);
  transition: color var(--dur-fast) var(--ease-io), transform var(--dur-fast) var(--ease-io), background-color var(--dur-fast) var(--ease-io); }
.hdr.is-hide { transform: translateY(-105%); }
.hdr.is-filled { background-color: var(--ground-light); color: var(--ink); }
html:not(.js) .hdr { background-color: var(--ground-light); color: var(--ink); }   /* no script, no tone logic: the bar is always paper with ink text, whatever is behind it (the hero photo included) */
.hdr:focus-within, html.menu-open .hdr, html.modal-open .hdr { transform: none; }
.hdr .is-dark { color: var(--ink-invert); }
.hdr .pill--spruce, .hdr .pill--spruce.is-dark { color: var(--cta-ink); }
.hdr__brand { display: inline-flex; align-items: center; min-height: var(--btn-h); }
.hdr__r { display: flex; align-items: center; gap: var(--gap-24); }
.hdr__dd { position: relative; }
.hdr__svc { position: static; }   /* the Practice areas panel aligns to the bar, not to its button */
.hdr__links { display: flex; align-items: center; gap: var(--gap-24); }
.hdr__btn, .hdr__lnk { position: relative; display: inline-flex; align-items: center; gap: var(--gap-8); min-height: var(--btn-h); padding: 0; border: 0; background: none; color: inherit; cursor: pointer; white-space: nowrap;
  font-family: var(--t-c2-family); font-size: var(--t-c2-size); line-height: var(--t-c2-lh); font-weight: var(--t-c2-weight); letter-spacing: var(--t-c2-track); }
.hdr__btn .ico-chev { width: var(--icon-sm); height: var(--icon-sm); transition: transform var(--dur-fast) var(--ease-io); }
.hdr__btn[aria-expanded="true"] .ico-chev { transform: rotate(180deg); }
.hdr__btn:hover .roll > span, .hdr__btn:focus-visible .roll > span, .hdr__lnk:hover .roll > span, .hdr__lnk:focus-visible .roll > span { transform: translateY(-100%); }
/* the current page: a small dot under its label (the one device, on the link and on the Practice areas button) */
.hdr__btn.is-cur::before, .hdr__lnk[aria-current="page"]::before { content: ""; position: absolute; left: 50%; bottom: 6px; width: 4px; height: 4px; margin-left: -2px; border-radius: var(--r-circle); background: currentColor; }

/* the ring device: Menu (two lines, a close X when open) and, on phones, the terracotta call ring */
.hdr__ring { display: inline-grid; place-items: center; flex: none; width: var(--circ); height: var(--circ); padding: 0; border: 1px solid currentColor;
  border-radius: var(--r-circle); background: transparent; color: inherit; cursor: pointer; transition: background-color var(--dur-fast) var(--ease-io), color var(--dur-fast) var(--ease-io); }
.hdr__ring:hover { background-color: var(--tint); color: var(--anchor); border-color: var(--tint); }
.hdr__call { display: none; border-color: var(--cta); background: var(--cta); color: var(--cta-ink); }
.hdr__call:hover { background: var(--cta); color: var(--cta-ink); border-color: var(--cta); }
.hdr__call svg { width: var(--nav-glyph); height: var(--nav-glyph); }
.hdr__menu-t { display: none; }
.burger__lines { position: relative; display: block; width: var(--icon); height: 8px; }
.burger__lines span { position: absolute; left: 0; width: 100%; height: 1.5px; background: currentColor; transition: transform var(--dur-fast) var(--ease-io); }
.burger__lines span:nth-child(1) { top: 0; }
.burger__lines span:nth-child(2) { top: 6.5px; }
.burger[aria-expanded="true"] .burger__lines span:nth-child(1) { transform: translateY(3.25px) rotate(45deg); }
.burger[aria-expanded="true"] .burger__lines span:nth-child(2) { transform: translateY(-3.25px) rotate(-45deg); }

/* ---- the phone panel: nothing wraps, the call pill's glyph in the icon slot ---- */
.hdr__panel { position: absolute; top: calc(100% + var(--gap-8)); right: calc(-1 * var(--gap-24)); width: max-content; min-width: max(var(--nav-phone-w), 23.6111vw); padding: var(--gap-24);
  background: var(--ground); color: var(--ink); border-radius: var(--r-card); border: 1px solid var(--hairline-light); white-space: nowrap; }
.hdr__panel[hidden] { display: none; }
.hdr__panel .lbl { margin-bottom: var(--gap-8); white-space: nowrap; }
.ph__text { white-space: nowrap; }
.ph__line { display: flex; justify-content: space-between; gap: var(--gap-24); padding: var(--gap-12) 0 0; margin-top: var(--gap-12); border-top: 1px solid var(--hairline-light); white-space: nowrap; }
.ph__line span { white-space: nowrap; }
.ph__call { display: flex; width: 100%; justify-content: space-between; margin-top: var(--gap-12); white-space: nowrap; color: var(--cta-ink); }
.ph__call svg { width: var(--nav-glyph); height: var(--nav-glyph); flex: none; }

/* ---- the Practice areas panel: right aligned under the bar, the six in two columns, 30 / 22 nested radius ---- */
.svc { position: absolute; top: calc(100% + var(--gap-8)); right: var(--pad-x); width: min(var(--nav-svc-w), calc(100vw - 2 * var(--pad-x)));
  max-height: calc(100svh - var(--hdr-h) - var(--gap-24)); overflow-y: auto; overscroll-behavior: contain;
  padding: var(--gap-24) var(--gap-32) var(--gap-24); background: var(--ground); color: var(--ink); border-radius: var(--r-card); animation: svc-in var(--dur-mid) var(--ease-out);
  border: 1px solid var(--hairline-light); }
.svc[hidden] { display: none; }
@keyframes svc-in { from { opacity: 0; transform: translateY(calc(-1 * var(--gap-12))); } }
.svc__head .lbl { margin-bottom: var(--gap-8); }
.svc__list { display: grid; grid-template-columns: 1fr 1fr; column-gap: var(--gap-48); }
.svc__list li { border-top: 1px solid var(--hairline-light); }
.svc__item { display: flex; align-items: center; gap: var(--gap-16); padding: var(--gap-16) 0; color: var(--ink); }
.svc__n { flex: none; width: 1.9em; font-family: var(--display); font-style: italic; font-size: var(--t-h5-size); line-height: 1; color: var(--spruce); }
.svc__txt { display: grid; gap: 6px; flex: 1; min-width: 0; }
.svc__name { font-family: var(--display); font-size: var(--t-h5-size); line-height: 1; letter-spacing: var(--t-h5-track); }
.svc__scope { font-family: var(--t-c2-family); font-size: var(--t-c2-size); line-height: 1.3; font-weight: var(--t-c2-weight); letter-spacing: var(--t-c2-track); color: var(--ink-quiet); }
.svc__item svg { width: var(--icon); height: var(--icon); flex: none; transition: transform var(--dur-fast) var(--ease-io); }
.svc__item:hover .svc__name, .svc__item:focus-visible .svc__name, .svc__item[aria-current="page"] .svc__name { font-style: italic; }
.svc__item:hover svg, .svc__item:focus-visible svg { transform: translate(2px, -2px); }
.svc__foot { display: flex; align-items: center; justify-content: space-between; gap: var(--gap-24); margin-top: var(--gap-8); padding-top: var(--gap-24); border-top: 1px solid var(--hairline-light); }

/* =============================================================================
   The menu overlay (the gate's .nav): a circle grown from the Menu ring (nav.js sets --mx --my --mr), content always below
   the bar, every text in full ink on the dark ground (no faded grey).
   ========================================================================== */
.nav { position: fixed; inset: 0; z-index: 110; display: flex; flex-direction: column; overflow: hidden;
  padding: 0; background: var(--anchor); color: var(--ink-invert);
  visibility: hidden; clip-path: circle(0px at var(--mx, calc(100% - 56px)) var(--my, 36px));
  transition: clip-path var(--nav-open) cubic-bezier(.7, 0, .2, 1), visibility 0s linear var(--nav-open); }
.nav.is-open { visibility: visible; clip-path: circle(var(--mr, 150vmax) at var(--mx, calc(100% - 56px)) var(--my, 36px)); transition-delay: 0s; }
.nav .lbl, .nav .lbl--faded { color: var(--ink-invert); opacity: 1; }
.nav__in { position: absolute; inset: calc(var(--hdr-h) + var(--gap-16)) 0 0 0; overflow-y: auto; overscroll-behavior: contain;
  padding: var(--gap-8) var(--pad-x) var(--gap-24); display: grid; grid-template-columns: 4fr 6fr; gap: var(--gap-64); align-items: start; }
.nav__stage { display: grid; grid-template-rows: 1fr; min-height: 0; height: calc(100svh - var(--hdr-h) - var(--gap-16) - var(--gap-8) - var(--gap-24)); position: sticky; top: 0; }
.nav__frames { position: relative; min-height: 0; border-radius: var(--r-card); background: var(--photo-black); }
.nav__frame { position: absolute; inset: 0; margin: 0; display: grid; grid-template-rows: 1fr; }
.nav__ph { position: absolute; inset: 0; overflow: hidden; border-radius: var(--r-card); }
.nav__frame .nav__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transform: scale(1.06); transition: opacity .7s var(--ease-io), transform 1.6s var(--ease-out); }
.nav__frame.is-on .nav__img { opacity: 1; transform: scale(1); }
.nav__main { display: flex; flex-direction: column; justify-content: space-between; gap: var(--gap-24); min-width: 0; }
.nav__big { display: grid; gap: 2px; }
.nav__link { display: inline-flex; align-items: baseline; gap: var(--gap-16); color: var(--ink-invert); }
.nav__n { flex: none; width: 2.4em; }
.nav__t { font-family: var(--display); font-size: var(--nav-link); line-height: 1; letter-spacing: var(--t-h4-track); transition: letter-spacing var(--dur-fast) var(--ease-io); }
.nav__link:hover .nav__t, .nav__link:focus-visible .nav__t, .nav__link.is-hot .nav__t { font-style: italic; }
.nav__link[aria-current="page"] .nav__n::after { content: ""; display: inline-block; width: 6px; height: 6px; margin-left: var(--gap-8); border-radius: var(--r-circle); background: var(--accent-on-dark); vertical-align: middle; }
.nav__cols { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap-40); }
.nav__col .lbl { margin-bottom: var(--gap-8); }
.nav__col li { border-top: 1px solid var(--hairline-dark); }
.nav__col li:last-child { border-bottom: 1px solid var(--hairline-dark); }
.nav .proc { display: flex; align-items: center; justify-content: space-between; gap: var(--gap-16); min-height: 0; padding: 6px 0; color: var(--ink-invert);
  font-family: var(--t-c2-family); font-size: var(--t-c2-size); font-weight: var(--t-c2-weight); letter-spacing: var(--t-c2-track); }
.nav .proc svg { width: var(--icon); height: var(--icon); flex: none; transition: transform var(--dur-fast) var(--ease-io); }
.nav .proc:hover svg, .nav .proc:focus-visible svg { transform: translate(2px, -2px); }
.nav .proc:hover, .nav .proc:focus-visible, .nav .proc.is-hot { font-style: normal; color: var(--accent-on-dark); }
.nav__col--cta { display: grid; gap: var(--gap-16); justify-items: start; align-content: start; }
.nav__ask { margin: 0; max-width: 30ch; font-family: var(--display); font-size: var(--t-h5-size); line-height: 1.02; letter-spacing: var(--t-h5-track); color: var(--ink-invert); }
.nav__foot { display: grid; grid-template-columns: 1fr 1fr 1.2fr; gap: var(--gap-24); padding-top: var(--gap-16); border-top: 1px solid var(--hairline-dark); }
.nav__cell { display: grid; gap: var(--gap-8); align-content: start; font-size: var(--t-c2-size); line-height: 1.35; }
.nav__cell .ulink { justify-self: start; }
.nav__tel { font-family: var(--display); font-size: var(--t-h5-size); line-height: 1; white-space: nowrap; }
.nav__mail { font-family: var(--display); font-size: var(--t-h5-size); line-height: 1; letter-spacing: var(--t-h5-track); overflow-wrap: anywhere; }
.nav__exp, .nav__sub { display: none; }
.nav__gl { display: flex; align-items: center; justify-content: space-between; gap: var(--gap-16); }
.nav__t, .nav__cell .nw { white-space: nowrap; }

/* desktop composition (1024 and up). Three columns on one grid: the stage | the five links | the six practice areas and the ask; then Call,
   Email and Los Angeles on a full-width hairline, each under its column. Link size = the smaller of what the links column is wide enough
   for ("Practice areas" is about 5.4 em plus its number) and what the first row is tall enough for (five links about 5.5 em, the bar, the
   paddings and the bottom row about 240px at 1440). Above 1440 every term is in vw like the tokens, so 2560 is 1440 scaled. */
@media (min-width: 1024px) {
  .nav { --nav-cols: minmax(0, 30fr) minmax(0, 40fr) minmax(0, 30fr);
    --nav-link: clamp(30px, min(calc(5.6vw - 14px), calc((100svh - var(--hdr-h) - 240px) / 5.6)), 132px); }
  .nav__in { grid-template-columns: var(--nav-cols); grid-template-rows: minmax(min-content, 1fr) auto; column-gap: var(--gap-48); row-gap: var(--gap-32); }
  .nav__main { display: contents; }
  .nav__stage { grid-column: 1; grid-row: 1; align-self: stretch; height: auto; position: relative; top: auto; }
  .nav__big { grid-column: 2; grid-row: 1; align-self: start; }
  .nav__cols { grid-column: 3; grid-row: 1; align-self: start; grid-template-columns: minmax(0, 1fr); gap: var(--gap-32); }
  .nav .proc { padding: calc(var(--gap-12) / 2) 0; }
  .nav__foot { grid-column: 1 / -1; grid-row: 2; grid-template-columns: var(--nav-cols); column-gap: var(--gap-48); }
}
@media (min-width: 1441px) {
  .nav { --nav-link: max(30px, min(4.4vw, calc((100svh - var(--hdr-h) - 16.6667vw) / 5.6))); }
}
@media (min-width: 1024px) and (max-height: 800px) {
  .nav .proc { padding: calc(var(--gap-12) * .375) 0; }
  .nav__cols { gap: var(--gap-24); }
}
/* the links rise in after the circle, the stage settles */
.nav.is-open .nav__row, .nav.is-open .nav__cols, .nav.is-open .nav__foot { animation: nav-rise var(--dur-link) var(--ease-out) both; animation-delay: calc(.3s + var(--i, 6) * var(--stagger)); }
.nav.is-open .nav__frames { animation: nav-settle 1.2s var(--ease-out) both; animation-delay: .15s; }
@keyframes nav-rise { from { opacity: 0; transform: translateY(var(--rise-y)); } }
@keyframes nav-settle { from { opacity: 0; transform: scale(.96); } }
/* the bar while the menu is open: the wordmark and the ring (a close X) only */
html.menu-open .hdr { background-color: transparent; color: var(--ink-invert); }
html.menu-open .hdr .is-dark, html.menu-open .hdr__brand, html.menu-open .hdr__menu { color: var(--ink-invert); }
html.menu-open .hdr__menu:hover { color: var(--anchor); }
html.menu-open .hdr__svc, html.menu-open .hdr__phone, html.menu-open .hdr__links, html.menu-open .hdr__book, html.menu-open .hdr__call { visibility: hidden; }
html.menu-open, html.modal-open { overflow: hidden; }

/* ---- mid widths: 1024 to 1099 the phone number gives way to the call ring (measured: the phone fits from 1100), and the gaps tighten ---- */
@media (min-width: 1024px) and (max-width: 1279px) { .hdr__r, .hdr__links { gap: var(--gap-16); } }
@media (min-width: 1024px) and (max-width: 1099px) {
  .hdr__phone { display: none; }
  .hdr__call { display: inline-grid; }
}

/* ---- phones and tablets: wordmark left, the terracotta call ring and the Menu ring right (44px); the menu stacks, no stage ---- */
@media (max-width: 1023px) {
  .hdr__svc, .hdr__phone, .hdr__book, .hdr__links { display: none; }
  .hdr__r { gap: var(--gap-12); }
  .hdr__ring { width: 44px; height: 44px; }
  .hdr__call { display: inline-grid; }
  .hdr__menu { width: auto; grid-auto-flow: column; gap: var(--gap-12); padding: 0 var(--gap-16); border-radius: var(--r-pill); }
  .hdr__menu-t { display: block; font-size: var(--t-c2-size); line-height: 1; font-weight: 500; }
  .nav { --nav-link: clamp(30px, min(10vw, 5.4vh), 48px); }
  .nav__in { grid-template-columns: 1fr; gap: var(--gap-32); padding-bottom: calc(var(--gap-40) + env(safe-area-inset-bottom, 0px)); }
  .nav__stage { display: none; }
  .nav__big { gap: 0; }
  .nav__row { border-bottom: 1px solid var(--hairline-dark); padding: var(--gap-8) 0; }
  .nav__exp { display: inline-grid; place-items: center; flex: none; width: 44px; height: 44px; padding: 0; border: 1px solid currentColor; border-radius: var(--r-circle);
    background: transparent; color: var(--ink-invert); cursor: pointer; }
  .nav__exp svg { width: var(--icon); height: var(--icon); transition: transform var(--dur-fast) var(--ease-io); }
  .nav__exp[aria-expanded="true"] svg { transform: rotate(45deg); }
  .nav__sub:not([hidden]) { display: grid; }
  .nav__sub { padding: var(--gap-8) 0 var(--gap-8) calc(2.4em + var(--gap-16)); }
  .nav__gl > a { display: inline-flex; align-items: center; min-height: 44px; font-family: var(--display); font-size: var(--t-h5-size); line-height: 1; }
  .nav__link { min-height: 44px; align-items: center; }
  .nav__col--prac { display: none; }   /* the six already sit under 01 Practice areas here */
  .nav__cols { grid-template-columns: 1fr; }
  .nav__foot { grid-template-columns: 1fr; gap: var(--gap-24); }
  .nav__cell .ulink, .nav__cell a { min-height: 44px; }
  .nav__cell .nav__tel, .nav__cell .nav__mail { display: inline-flex; align-items: center; }
}

/* ---- the mobile call bar (below 1024): Call and Free consultation, fixed at the bottom ---- */
.cbar { display: none; }
@media (max-width: 1023px) {
  .cbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 90; display: flex; gap: var(--gap-8); padding: var(--gap-12) var(--pad-x) calc(var(--gap-12) + env(safe-area-inset-bottom, 0px));
    background: var(--ground-light); border-top: 1px solid var(--hairline-light); transition: transform var(--dur-mid) var(--ease-out), visibility 0s linear 0s; }
  html.js .cbar:not(.is-on), html.menu-open .cbar, html.modal-open .cbar, .cbar.is-held { transform: translateY(100%); visibility: hidden;
    transition: transform var(--dur-mid) var(--ease-out), visibility 0s linear var(--dur-mid); }
  .cbar__call, .cbar__cta { display: inline-flex; align-items: center; justify-content: center; gap: var(--gap-8); height: var(--btn-h); border-radius: var(--r-pill);
    font-family: var(--t-c1-family); font-size: var(--t-c1-size); line-height: var(--t-c1-lh); font-weight: var(--t-c1-weight); letter-spacing: var(--t-c1-track); white-space: nowrap;
    transition: background-color var(--dur-fast) var(--ease-io), color var(--dur-fast) var(--ease-io); }
  .cbar__call { flex: 0 0 auto; min-width: 104px; padding: 0 var(--gap-16); background: var(--ground-dark); color: var(--ink-invert); }
  .cbar__call svg { width: var(--nav-glyph); height: var(--nav-glyph); flex: none; }
  .cbar__cta { flex: 1 1 auto; padding: 0 var(--gap-12); background: var(--cta); color: var(--cta-ink); }
}

/* reduced motion: a plain fade, nothing grows, rises or settles */
@media (prefers-reduced-motion: reduce) {
  .nav { clip-path: none !important; opacity: 0; transition: opacity .25s linear, visibility 0s linear .25s !important; }
  .nav.is-open { opacity: 1; transition: opacity .25s linear, visibility 0s !important; }
  .nav.is-open .nav__row, .nav.is-open .nav__cols, .nav.is-open .nav__foot, .nav.is-open .nav__frames { animation: none !important; }
  .nav__frame .nav__img { transform: none !important; }
  .svc { animation: none; }
  .cbar, html.js .cbar:not(.is-on), html.menu-open .cbar, html.modal-open .cbar, .cbar.is-held { transition: none !important; }
}

/* the request dialog carries one title; the split heading's own display rule would otherwise beat the hidden attribute */
.modal__head [hidden] { display: none; }
.nav__sub--flat { gap: var(--gap-4, 4px); margin: var(--gap-8) 0 0; padding: 0 0 0 calc(2.4em + var(--gap-16)); list-style: none; }
.nav__sub--flat a { display: inline-block; padding: var(--gap-8) 0; font-family: var(--t-c1-family); font-size: var(--t-c1-size); font-weight: var(--t-c2-weight); color: var(--ink-invert); }
.nav__frame .nav__ph:empty { background: var(--ground-dark); }
