/*
 * Shared public site header: wordmark, Docs link and the log in menu.
 * Used by home, Docs and the Varial X sign in pages. The dark version
 * sits on the Varial X pages' dark grey background.
 */

/* ---------- nav ---------- */
/* A page-level <header>, not nested inside .hc-hero: sticky positioning is
   relative to this element's own containing block, so it has to sit outside
   the hero to stay pinned once the rest of the page scrolls underneath it. */
.hc-nav{
  /* z-index high enough to clear Leaflet's own panes/controls (nem_map.html
     below, in the physical layer tab): Leaflet's zoom/attribution controls
     sit around z-index:1000, and .leaflet-container doesn't establish its
     own stacking context, so those panes were compositing above this sticky
     nav once the map scrolled underneath it. */
  position:sticky; top:0; z-index:1100;
  display:flex; align-items:center; justify-content:space-between;
  --hc-nav-pad: 1.25rem;
  padding-block: var(--hc-nav-pad);
  padding-inline: clamp(1.5rem, 9vw, 9rem);
  background:var(--hc-surface, var(--varial-white, #fff));
  border-bottom:1px solid transparent;
  box-shadow:0 2px 8px rgba(13, 27, 46, 0.06);
  transition:padding-block .2s ease, margin-bottom .2s ease;
}
/* Set on <body> once the reader scrolls down (marketing_nav.js). The header gets
   shorter, and a bottom margin of the same amount keeps the page below from
   jumping up as it shrinks. */
.site-nav-compact .hc-nav{padding-block:.4rem;margin-bottom:calc(2 * (var(--hc-nav-pad) - .4rem))}
.hc-nav-logo-link{
  display:inline-flex;
}
.hc-nav-logo{ display:block; }
.hc-nav-links{ display:flex; align-items:center; gap:0.75rem; }

/* ---------- log in menu ---------- */
.hm-account-control{display:inline-flex;align-items:stretch;min-height:2.5rem;border:1.5px solid var(--varial-marketing-ink,#102a34);border-radius:.65rem;background:var(--varial-white,#fff)}
.hm-login-menu{position:relative;display:flex;align-items:stretch}
.hm-nav-link,.hm-login-toggle{box-sizing:border-box;min-height:2.25rem;display:inline-flex;align-items:center;justify-content:center;padding:0 .75rem;border-radius:.375rem;font-weight:600;color:var(--varial-marketing-ink)!important;text-decoration:none;white-space:nowrap}
.hm-nav-link:hover,.hm-login-toggle:hover,.hm-login-menu[open] .hm-login-toggle{background:var(--varial-marketing-neutral,#edefea);color:var(--varial-marketing-ink,#102a34)!important}
.hm-nav-link:focus-visible{outline:3px solid var(--varial-marketing-ink,#102a34);outline-offset:3px}
.hm-login-toggle{gap:.75rem;padding:.35rem .75rem;cursor:pointer;list-style:none;color:var(--varial-marketing-ink,#102a34)!important;font-size:.88rem;font-weight:700}
.hm-login-label{max-width:10rem;overflow:hidden;text-overflow:ellipsis}
.hm-login-toggle::-webkit-details-marker{display:none}
.hm-login-chevron{display:block;width:.45rem;height:.45rem;border:solid currentColor;border-width:0 1.5px 1.5px 0;transform:translateY(-2px) rotate(45deg);transition:transform .18s ease}
.hm-login-menu[open] .hm-login-chevron{transform:translateY(2px) rotate(225deg)}
.hm-login-toggle{border-radius:calc(.65rem - 1.5px)}
.hm-login-toggle:focus-visible{outline:2px solid var(--varial-marketing-ink,#102a34);outline-offset:-4px}
.hm-login-popout{position:absolute;right:0;top:calc(100% + .7rem);width:min(24rem,calc(100vw - 2rem));padding:.4rem;background:#fff;border:1px solid #dbe5e7;border-radius:.8rem;box-shadow:0 18px 46px rgba(10,32,48,.2)}
.hm-account-identity{display:flex;flex-direction:column;gap:.1rem;margin:.2rem .45rem .4rem;padding:.55rem .45rem .7rem;border-bottom:1px solid var(--varial-border,#dce4e1);overflow-wrap:anywhere}
.hm-account-identity span,.hm-account-identity small{color:var(--varial-marketing-muted,#455668);font-size:.76rem;line-height:1.4}
.hm-account-identity strong{color:var(--varial-marketing-ink,#102a34);font-size:.9rem;line-height:1.35}
.hm-login-option{display:flex;align-items:center;justify-content:space-between;gap:1rem;border-radius:.5rem;text-decoration:none;padding:.8rem .9rem;background:transparent;color:var(--hm-login-accent)!important;transition:background-color .15s ease}
.hm-login-option + .hm-login-option{margin-top:.15rem}
.hm-login-option:hover,.hm-login-option:focus-visible{background:var(--hm-login-tint)}
.hm-login-option strong,.hm-login-option small{display:block}
.hm-login-option strong{font-size:1rem}
.hm-login-option small{font-size:.8rem;font-weight:500;margin-top:.2rem;color:var(--varial-marketing-muted,#455668)}
.hm-login-option--energy{--hm-login-accent:var(--varial-brand-teal-deep,#0f745b);--hm-login-tint:#eef8f4}
.hm-login-option--x{--hm-login-accent:var(--varial-brand-violet-deep,#7614d0);--hm-login-tint:#f5effd}
.hm-staff-links{display:grid;grid-template-columns:1fr 1fr;gap:.1rem;margin:.25rem .45rem 0;padding-top:.35rem;border-top:1px solid var(--varial-border,#dce4e1)}
.hm-staff-links a{display:flex;align-items:center;gap:.5rem;padding:.45rem;border-radius:.4rem;color:var(--varial-marketing-muted,#455668);font-size:.8rem;font-weight:600;text-decoration:none;white-space:nowrap}
.hm-staff-links i{width:1.1rem;text-align:center}
.hm-staff-mark{display:inline-flex;flex:none;align-items:center;justify-content:center;width:1.1rem;height:1.1rem;border-radius:.3rem;color:#fff;font-size:.62rem;font-weight:800}
.hm-staff-mark--e{background:var(--varial-brand-teal,#0D9488)}
.hm-staff-mark--x{background:var(--varial-brand-violet-deep,#7614D0)}
.hm-staff-links a:hover,.hm-staff-links a:focus-visible{background:var(--varial-marketing-neutral,#edefea);color:var(--varial-marketing-ink,#102a34)}
.hm-logout-form{margin:.25rem .45rem 0;padding-top:.35rem;border-top:1px solid var(--varial-border,#dce4e1)}
.hm-logout-button{display:block;width:100%;padding:.65rem .45rem;border:0;border-radius:.4rem;background:transparent;color:var(--varial-marketing-ink,#102a34);font:inherit;font-size:.88rem;font-weight:700;text-align:left;cursor:pointer}
.hm-logout-button:hover,.hm-logout-button:focus-visible{background:var(--varial-marketing-neutral,#edefea)}
.hm-logout-button:focus-visible{outline:3px solid var(--varial-marketing-ink,#102a34);outline-offset:2px}
.hm-account-note{margin:0;padding:.45rem .9rem .35rem;color:var(--varial-marketing-muted,#455668);font-size:.8rem;line-height:1.45}
.hm-account-actions{display:flex;gap:.4rem;margin:.25rem .45rem 0;padding-top:.45rem;border-top:1px solid var(--varial-border,#dce4e1)}
.hm-account-action{flex:1;padding:.6rem .45rem;border:1px solid var(--varial-border,#dce4e1);border-radius:.4rem;color:var(--varial-marketing-ink,#102a34)!important;font-size:.88rem;font-weight:700;text-align:center;text-decoration:none!important}
.hm-account-action:hover,.hm-account-action:focus-visible{background:var(--varial-marketing-neutral,#edefea)}
.hm-account-action--primary{border-color:var(--varial-marketing-ink,#102a34);background:var(--varial-marketing-ink,#102a34);color:var(--varial-white,#fff)!important}
.hm-account-action--primary:hover,.hm-account-action--primary:focus-visible{background:var(--varial-marketing-ink-hover,#1d3b47)}
.hm-account-action:focus-visible{outline:3px solid var(--varial-marketing-ink,#102a34);outline-offset:2px}

/* ---------- dark version (Varial X pages) ---------- */
.hc-nav--dark{background:var(--varial-brand-dark,#232629);border-bottom-color:var(--varial-brand-dark-raised,#3a3f44);box-shadow:none}
.hc-nav--dark .hm-account-control{border-color:var(--varial-brand-violet-light,#ba93fb);background:var(--varial-brand-violet-tint,#382b4d)}
.hc-nav--dark .hm-login-toggle{color:var(--varial-brand-violet-light,#ba93fb)!important}
.hc-nav--dark .hm-staff-links{border-top-color:var(--varial-brand-dark-raised,#3a3f44)}
.hc-nav--dark .hm-staff-links a{color:var(--varial-marketing-dark-muted,#c0c6cc)}
.hc-nav--dark .hm-staff-links a:hover,.hc-nav--dark .hm-staff-links a:focus-visible{background:var(--varial-brand-violet-tint,#382b4d);color:var(--varial-marketing-dark-text,#f3f5f6)}
.hc-nav--dark .hm-logout-button{color:var(--varial-marketing-dark-text,#f3f5f6)}
.hc-nav--dark .hm-account-note{color:var(--varial-marketing-dark-muted,#c0c6cc)}
.hc-nav--dark .hm-account-actions{border-top-color:var(--varial-brand-dark-raised,#3a3f44)}
.hc-nav--dark .hm-account-action{border-color:var(--varial-brand-dark-raised,#3a3f44);color:var(--varial-marketing-dark-text,#f3f5f6)!important}
.hc-nav--dark .hm-account-action:hover,.hc-nav--dark .hm-account-action:focus-visible{background:var(--varial-brand-violet-tint,#382b4d)}
.hc-nav--dark .hm-account-action--primary{border-color:var(--varial-brand-violet-light,#ba93fb);background:var(--varial-brand-violet-light,#ba93fb);color:var(--varial-brand-dark,#232629)!important}
.hc-nav--dark .hm-logout-button:hover,.hc-nav--dark .hm-logout-button:focus-visible{background:var(--varial-brand-violet-tint,#382b4d)}
.hc-nav--dark .hm-nav-link{color:var(--varial-marketing-dark-text,#f3f5f6)!important}
.hc-nav--dark :is(.hm-nav-link,.hm-login-toggle):hover,.hc-nav--dark .hm-login-menu[open] .hm-login-toggle{background:var(--varial-brand-violet-tint,#382b4d);color:var(--varial-brand-violet-light,#ba93fb)!important}
.hc-nav--dark :is(.hm-nav-link,.hm-login-toggle):focus-visible{outline-color:var(--varial-brand-violet-light,#ba93fb)}
.hc-nav--dark .hm-login-popout{background:var(--varial-brand-dark-surface,#2d3135);border-color:var(--varial-brand-dark-raised,#3a3f44);box-shadow:0 18px 46px rgba(0,0,0,.45)}
.hc-nav--dark .hm-account-identity{border-bottom-color:var(--varial-brand-dark-raised,#3a3f44)}
.hc-nav--dark .hm-account-identity span,.hc-nav--dark .hm-account-identity small{color:var(--varial-marketing-dark-muted,#c0c6cc)}
.hc-nav--dark .hm-account-identity strong{color:var(--varial-marketing-dark-text,#f3f5f6)}
.hc-nav--dark .hm-login-option small{color:var(--varial-marketing-dark-muted,#c0c6cc)}
.hc-nav--dark .hm-login-option--energy{--hm-login-accent:var(--varial-brand-teal-light,#1fcaa0);--hm-login-tint:rgba(31,202,160,.1)}
.hc-nav--dark .hm-login-option--x{--hm-login-accent:var(--varial-brand-violet-light,#ba93fb);--hm-login-tint:rgba(186,147,251,.12)}

/* Pricing and Request a demo as plain text links: shown only on a phone, where the bar drops
   them. Signed in, they share the bottom row with Log out, which sits on the right; signed out,
   they sit in a small row under Sign in and Sign up. */
.hm-menu-links{display:none;gap:.25rem;margin:.25rem .45rem 0}
.hm-menu-links a{padding:.5rem .45rem;border-radius:.4rem;color:var(--varial-marketing-ink,#102a34)!important;font-size:.88rem;font-weight:700;white-space:nowrap;text-decoration:none!important}
.hm-menu-links a:hover,.hm-menu-links a:focus-visible{background:var(--varial-marketing-neutral,#edefea)}
.hm-account-actions + .hm-menu-links{justify-content:center;margin-top:.2rem}
.hm-account-actions + .hm-menu-links a{font-size:.8rem;font-weight:600;color:var(--varial-marketing-muted,#455668)!important}
.hm-menu-foot{display:flex;align-items:center;margin:.25rem .45rem 0;padding-top:.35rem;border-top:1px solid var(--varial-border,#dce4e1)}
.hm-menu-foot .hm-menu-links{margin:0}
.hm-menu-foot .hm-logout-form{flex:1;margin:0;padding:0;border:0}
.hc-nav--dark .hm-menu-foot{border-top-color:var(--varial-brand-dark-raised,#3a3f44)}
.hc-nav--dark .hm-menu-links a{color:var(--varial-marketing-dark-text,#f3f5f6)!important}
.hc-nav--dark .hm-account-actions + .hm-menu-links a{color:var(--varial-marketing-dark-muted,#c0c6cc)!important}
.hc-nav--dark .hm-menu-links a:hover,.hc-nav--dark .hm-menu-links a:focus-visible{background:var(--varial-brand-violet-tint,#382b4d)}

/* Book a demo is the bar's main call to action: filled teal, and the one link a phone keeps. */
.hc-nav .hm-nav-cta{background:var(--varial-marketing-energy,#0d756c);color:var(--varial-white,#fff)!important}
.hc-nav .hm-nav-cta:hover{background:var(--varial-marketing-energy-hover,#04614b);color:var(--varial-white,#fff)!important}
@media(max-width:760px){
  .hm-nav-link,.hm-login-toggle{padding:0 .5rem;font-size:.875rem}
}
@media (max-width:600px){
  .hc-nav .hm-nav-link{display:none}
  .hc-nav .hm-nav-link.hm-nav-cta{display:inline-flex}
  .hm-menu-links{display:flex}
  .hm-menu-foot .hm-logout-form{flex:0 0 auto;margin-left:auto}
  .hm-menu-foot .hm-logout-button{width:auto;padding:.5rem .45rem}
}
@media (max-width:480px){
  .hc-nav{ --hc-nav-pad:0.75rem; padding-inline:1rem; }
  .hc-nav-links{ gap:.2rem; }
  .hm-nav-link{padding-inline:.35rem}
  .hm-login-toggle{gap:.5rem;padding-inline:.5rem;font-size:.8rem}
  .hm-login-label{max-width:6rem}
}
@media (max-width:360px){
  .hc-nav{padding-inline:.65rem}
  .hc-nav-logo{width:76px;height:auto}
  .hm-nav-link{padding-inline:.25rem}
  .hm-login-toggle{gap:.35rem;padding-inline:.4rem}
}
.hm-login-option__arrow{flex:none;opacity:.75}.hm-login-option:hover .hm-login-option__arrow,.hm-login-option:focus-visible .hm-login-option__arrow{opacity:1}

