/*
 * Hazloc Labs shared site header (static pages, blog posts and the
 * Next.js hub pages). Single source of truth: nav/hl-nav.css.
 * Regenerate copies and markup with: python3 scripts/build_nav.py
 * Everything is scoped under .hl-header and uses px units so page-level
 * styles (blog post <style> blocks, Tailwind preflight) cannot change it.
 */
@font-face {
  font-family: "HL DM Sans";
  font-style: normal;
  font-display: swap;
  font-weight: 100 1000;
  src: url("/nav/fonts/dm-sans-latin-wght-normal.woff2") format("woff2-variations"),
       url("/nav/fonts/dm-sans-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root { --nav-height: 72px; }

.hl-header, .hl-header *, .hl-header *::before, .hl-header *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
.hl-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: 72px;
  background: rgba(255, 255, 255, 0.97);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid #e8e6e3;
  font-family: "HL DM Sans", "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: normal;
  text-align: left;
  text-transform: none;
  color: #0f172a;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
.hl-header a { color: inherit; text-decoration: none; background: none; border: 0; }
.hl-header a:hover { text-decoration: none; }
.hl-header ul, .hl-header ol, .hl-header li { list-style: none; margin: 0; padding: 0; color: inherit; }
.hl-header p { margin: 0; color: inherit; line-height: 1.4; font-size: inherit; }
.hl-header strong { font-weight: 600; }
.hl-header img { display: block; border: 0; max-width: none; }
.hl-header svg { display: inline-block; flex-shrink: 0; vertical-align: middle; }
.hl-header button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  letter-spacing: inherit;
  text-transform: none;
  line-height: inherit;
}
.hl-header :focus-visible { outline: 2px solid #c47a2c; outline-offset: 2px; border-radius: 8px; }
.hl-header-spacer { height: 72px; }

.hl-inner {
  position: relative;
  max-width: 1280px;
  height: 100%;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 20px;
}
.hl-logo { display: flex; align-items: center; flex-shrink: 0; height: 100%; }
.hl-header .hl-logo img { height: 52px; width: auto; }

.hl-nav { flex: 1 1 auto; display: flex; justify-content: center; height: 100%; min-width: 0; }
.hl-menu { display: flex; align-items: stretch; gap: 2px; height: 100%; }
.hl-item { display: flex; align-items: center; position: static; }
.hl-header .hl-top {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 40px;
  padding: 0 12px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 500;
  color: #475569;
  white-space: nowrap;
  transition: color .15s ease, background-color .15s ease;
}
.hl-header .hl-top:hover,
.hl-item.is-open > .hl-top { color: #0f172a; background: #f5f3f0; }
.hl-header .hl-top.is-active { color: #c47a2c; }
.hl-chev { width: 12px; height: 12px; opacity: .75; transition: transform .2s ease; }
.hl-item.is-open > .hl-top .hl-chev { transform: rotate(180deg); }

/* Dropdown panels: centred under the header and clamped to the viewport. */
.hl-panel {
  display: none;
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  width: min(var(--hl-w, 720px), calc(100vw - 32px));
  padding-top: 8px;
}
.hl-item.is-open > .hl-panel { display: block; }
.hl-panel--industries { --hl-w: 660px; }
.hl-panel--services { --hl-w: 900px; }
.hl-panel--markets { --hl-w: 700px; }
.hl-panel--resources { --hl-w: 680px; }
.hl-box {
  background: #ffffff;
  border: 1px solid #e8e6e3;
  border-radius: 14px;
  box-shadow: 0 18px 48px rgba(8, 13, 25, 0.12), 0 2px 6px rgba(8, 13, 25, 0.05);
  padding: 18px;
}
.hl-header .hl-eyebrow {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: #8a94a6;
  padding: 0 12px;
  margin-bottom: 8px;
}
.hl-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px 8px; }
.hl-stack { display: grid; gap: 2px; }
.hl-cols { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 16px; }
.hl-cols--even { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.hl-aside { background: #faf9f7; border-radius: 10px; padding: 14px 6px; }
.hl-header .hl-link { display: block; padding: 9px 12px; border-radius: 9px; transition: background-color .15s ease; }
.hl-header .hl-link:hover { background: #f7f5f2; }
.hl-aside .hl-link:hover { background: #ffffff; }
.hl-header .hl-link strong { display: block; font-size: 14.5px; font-weight: 600; color: #0f172a; line-height: 1.3; }
.hl-header .hl-link span { display: block; font-size: 13px; color: #64748b; margin-top: 2px; line-height: 1.35; }
.hl-header .hl-link:hover strong { color: #c47a2c; }
.hl-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin-top: 12px;
  padding: 12px 12px 0;
  border-top: 1px solid #efedea;
}
.hl-header .hl-more { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; color: #c47a2c; }
.hl-header .hl-more:hover { color: #a66324; }
.hl-arrow { width: 14px; height: 14px; }

.hl-flags { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2px 6px; }
.hl-header .hl-flag-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: #0f172a;
  white-space: nowrap;
}
.hl-header .hl-flag-link:hover { background: #f7f5f2; color: #c47a2c; }
.hl-header .hl-flag {
  width: 20px;
  height: 15px;
  object-fit: cover;
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.12);
}

.hl-actions { display: flex; align-items: center; gap: 16px; flex-shrink: 0; margin-left: auto; }
.hl-header .hl-phone {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14.5px;
  font-weight: 600;
  color: #0f172a;
  white-space: nowrap;
}
.hl-header .hl-phone:hover { color: #c47a2c; }
.hl-phone svg { width: 16px; height: 16px; color: #c47a2c; }
.hl-header .hl-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  padding: 0 18px;
  border-radius: 8px;
  background: #c47a2c;
  color: #ffffff;
  font-size: 14.5px;
  font-weight: 600;
  white-space: nowrap;
  transition: background-color .15s ease;
}
.hl-header .hl-cta:hover { background: #a66324; color: #ffffff; }
.hl-header .hl-burger {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  align-items: center;
  justify-content: center;
  color: #0f172a;
}
.hl-burger svg { width: 24px; height: 24px; }
.hl-burger .hl-i-close { display: none; }
.hl-header.is-open .hl-burger .hl-i-open { display: none; }
.hl-header.is-open .hl-burger .hl-i-close { display: inline-block; }
.hl-mobile-actions { display: none; }

@media (max-width: 1200px) {
  .hl-inner { gap: 12px; }
  .hl-header .hl-top { padding: 0 9px; }
  .hl-phone-text { display: none; }
}

/* Mobile: hamburger + accordion panel */
@media (max-width: 1023px) {
  /* backdrop-filter would make the header the containing block of the fixed menu */
  .hl-header { background: #ffffff; -webkit-backdrop-filter: none; backdrop-filter: none; }
  .hl-inner { padding: 0 16px; }
  .hl-header .hl-logo img { height: 46px; }
  .hl-header .hl-burger { display: inline-flex; }
  .hl-header .hl-phone { display: none; }
  .hl-nav {
    display: none;
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    bottom: 0;
    height: auto;
    background: #ffffff;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 8px 16px 32px;
    border-top: 1px solid #e8e6e3;
  }
  .hl-header.is-open .hl-nav { display: block; }
  .hl-menu { flex-direction: column; height: auto; gap: 0; }
  .hl-item { display: block; border-bottom: 1px solid #efedea; }
  .hl-header .hl-top {
    width: 100%;
    justify-content: space-between;
    height: 54px;
    padding: 0 4px;
    border-radius: 0;
    font-size: 16.5px;
    font-weight: 600;
    color: #0f172a;
  }
  .hl-header .hl-top:hover, .hl-item.is-open > .hl-top { background: none; }
  .hl-panel { position: static; transform: none; width: auto; padding: 0 0 12px; }
  .hl-box { border: 0; box-shadow: none; padding: 0; border-radius: 0; background: none; }
  .hl-grid, .hl-cols, .hl-cols--even { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .hl-cols { gap: 8px; }
  .hl-aside { padding: 10px 0; }
  .hl-header .hl-link { padding: 9px 8px; }
  .hl-header .hl-link span { display: none; }
  .hl-flags { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hl-header .hl-flag-link { padding: 9px 8px; }
  .hl-foot { padding: 10px 8px 0; margin-top: 6px; }
  .hl-header .hl-eyebrow { padding: 0 8px; margin-top: 4px; }
  .hl-mobile-actions { display: grid; gap: 10px; margin-top: 20px; }
  .hl-header .hl-mobile-actions .hl-phone { display: inline-flex; justify-content: center; height: 46px; border: 1px solid #e8e6e3; border-radius: 8px; }
  .hl-mobile-actions .hl-phone-text { display: inline; }
  .hl-header .hl-mobile-actions .hl-cta { height: 46px; }
  html.hl-lock, html.hl-lock body { overflow: hidden; }
}
@media (max-width: 420px) {
  .hl-actions > .hl-cta { display: none; }
}
@media print { .hl-header { position: static; } .hl-header-spacer { display: none; } }
