/* Same white, slimmer nav as #hnav.is-stuck (css/framo.css), but without JavaScript and with the same 80px threshold:
   a scroll-driven animation on <html> flips --nav-on to 1 once the page has scrolled 80px (scroll-state(scrollable: top)
   was already true after 1px, so the nav turned white before scrolling). <html> carries no data-id, so this also works
   in the editor canvas. js/sticky-nav.js stays as the fallback for browsers without scroll timelines (Firefox).
   The brand, hours text and phone number read variables that #hnav sets (fallback = their own colors at the top). */
@keyframes nav-on { from { --nav-on: 0; } to { --nav-on: 1; } }
@supports (animation-timeline: scroll()) {
  html { animation: nav-on linear both; animation-timeline: scroll(root); animation-range: 79px 80px; }
}
@container style(--nav-on: 1) {
  #hnav {
    background-color: #fff; box-shadow: 0 12px 30px -16px rgba(24, 26, 56, 0.3); padding-top: 12px; padding-bottom: 12px;
    --nav-hours: var(--muted); --nav-phone: var(--primary);
    --nav-brand: var(--primary); --nav-mark-bg: var(--primary); --nav-mark: #fff;
  }
  #hnav > div:first-child > a,
  #hnav > div:first-child > a *,
  #hnav > div:first-child > .ls-mm > .ls-mm-btn { color: var(--text); }
  #hnav #nav-toggle, #hnav #nav-toggle * { color: var(--text); }
  #hnav #nav-toggle { background-color: var(--surface); border-color: var(--border); }
  #hnav:has(.ls-mm-open) > div:first-child > .ls-mm > .ls-mm-btn { color: var(--primary); }
}
/* Brand (first item of the left group: a link box holding the # mark and FRAMO), hours text and phone number,
   matched by position so every page's copy of the nav gets it (per-element classes differ per page). */
#hnav > div:first-child > :first-child p { color: var(--nav-brand, #fff); }
#hnav > div:first-child > :first-child p:first-child { background-color: var(--nav-mark-bg, #fff); color: var(--nav-mark, #2a2b52); }
#hnav > div:last-child > p { color: var(--nav-hours, rgba(255, 255, 255, 0.72)); }
#hnav > div:last-child > p > span { color: var(--nav-phone, #fff); }
/* JS fallback (.is-stuck) and mega menu open (framo.css turns the nav white then too) */
#hnav.is-stuck, #hnav:has(.ls-mm-open) {
  --nav-hours: var(--muted); --nav-phone: var(--primary);
  --nav-brand: var(--primary); --nav-mark-bg: var(--primary); --nav-mark: #fff;
}
@media (max-width: 640px) {
  @container style(--nav-on: 1) {
    #hnav { padding-top: 10px; padding-bottom: 10px; }
  }
}
