/* DigLTBlue header chrome: navy utility bar, 96px header, desktop dropdown,
   full-screen mobile overlay.

   The bar has three states and one DOM (see template-parts/header/nav.php):
     .lt-chrome--over          homepage first paint — navy bar over the hero
     .lt-chrome (no modifier)  interior pages — solid white from the start
     .lt-chrome.is-stuck       either, once scrolled — fixed, solid, no utility bar
*/

/* ── Chrome wrapper ───────────────────────────────────────────────── */
.lt-chrome {
  position: relative;
  z-index: var(--z-nav);
  background: var(--color-white);
}

/* Over the hero: taken out of flow so the hero starts at y=0 behind it. */
.lt-chrome--over {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  background: transparent;
}

/* Scrolled: the annotation frame — 96px white bar, no utility strip. */
.lt-chrome.is-stuck {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: var(--color-white);
  box-shadow: var(--shadow-nav);
}

/* The scrolled bar deliberately has no entrance animation. The mock's
   "Header scrolled" frame is a static white bar, and a keyframed slide-in
   would put a position:fixed header off-screen for as long as it failed to
   run — a real failure mode in any context that freezes animations. */
.lt-chrome.is-stuck .lt-topnav {
  display: none;
}

/* ── Utility bar ──────────────────────────────────────────────────── */
.lt-topnav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: var(--topnav-h);
  padding: 0 var(--pad-x);
  background: var(--color-navy);
}

.lt-topnav__group {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.lt-topnav__phone {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  color: var(--color-white);
  font-size: var(--fs-small);
  font-weight: var(--weight-label);
}

.lt-topnav__phone:hover {
  color: var(--color-orange);
}

.lt-topnav__icon {
  width: 13px;
  height: 13px;
}

.lt-topnav__pipe {
  width: 1px;
  height: 14px;
  flex: none;
  background: var(--color-line-on-navy);
}

.lt-topnav__area {
  color: var(--color-on-navy-dim);
  font-size: var(--fs-small);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lt-topnav__hiring {
  color: var(--color-orange);
  font-size: var(--fs-small);
  font-weight: var(--weight-label);
  text-align: right;
}

.lt-topnav__hiring:hover {
  color: var(--color-white);
}

/* ── Header bar ───────────────────────────────────────────────────── */
.lt-nav {
  padding: 0 var(--pad-x);
}

/* Over the hero the bar is navy, not transparent — it continues the utility
   strip above it into one solid chrome band rather than letting the video read
   through. Scoped away from `is-stuck` so the scrolled state still turns white:
   the wrapper repaints, and a navy bar inside it would win. */
.lt-chrome:not(.is-stuck) .lt-nav--over {
  background: var(--color-navy);
}

.lt-nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: 100%;
  max-width: var(--content-max);
  min-height: var(--header-h);
  margin-inline: auto;
}

/* Solid bar (interior pages, and any bar once stuck) gets the hairline. */
.lt-chrome:not(.lt-chrome--over) .lt-nav__inner,
.lt-chrome.is-stuck .lt-nav__inner {
  border-bottom: 1px solid var(--color-line);
}

.lt-nav__brand {
  display: inline-flex;
  align-items: center;
  flex: none;
}

/* The supplied mark is a 140x100 file whose transparent margin is part of the
   artwork, so it is scaled as a whole and never trimmed. No field of its own:
   the logo sits directly on the bar, whatever state the bar is in. The footer
   sizes its copy the same way (.lt-footer__logo-box in footer.css). */
.lt-nav__logo {
  display: block;
  width: var(--nav-logo-w);
  height: auto;
  /* The box is sized to the current mark, so this letterboxes rather than
     distorts if a client uploads a logo with different proportions. */
  object-fit: contain;
}

/* One logo per state. The light (knockout) logo only shows while the bar is
   transparent over the hero; everywhere else the dark one does. When the client
   has supplied only one, that one is what renders in both states. */
.lt-nav__logo--light {
  display: none;
}

.lt-chrome--over:not(.is-stuck) .lt-nav__logo--dark {
  display: none;
}
.lt-chrome--over:not(.is-stuck) .lt-nav__logo--light {
  display: block;
}

/* Only one image in the DOM ⇒ never hide it. */
.lt-nav__logo--light:only-of-type {
  display: block;
}

/* `--fallback` marks the standard mark standing in for a missing light logo
   (see nav.php). It is a markup hook only — the stand-in gets no treatment. */

/* ── Primary menu (desktop) ───────────────────────────────────────── */
.lt-nav__menu {
  display: flex;
  align-items: center;
  gap: 34px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.lt-nav__item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 7px;
}

.lt-nav__link {
  display: inline-flex;
  align-items: center;
  color: var(--color-navy);
  font-size: var(--fs-nav);
  font-weight: var(--weight-label);
  letter-spacing: var(--ls-nav);
  text-transform: uppercase;
  white-space: nowrap;
  transition: color var(--t-fast) var(--ease);
}

.lt-chrome--over:not(.is-stuck) .lt-nav__link {
  color: var(--color-white);
}

.lt-nav__link:hover,
.lt-nav__link--active,
.lt-chrome--over:not(.is-stuck) .lt-nav__link:hover {
  color: var(--color-orange);
}

/* Caret — a real sibling button, never nested inside the link. */
.lt-nav__caret {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  line-height: 0;
}

.lt-nav__caret .lt-icon {
  width: 10px;
  height: 10px;
  color: var(--color-navy);
  transition:
    transform var(--t-med) var(--ease),
    color var(--t-fast) var(--ease);
}

.lt-chrome--over:not(.is-stuck) .lt-nav__caret .lt-icon {
  color: var(--color-white);
}

.lt-nav__item.is-open > .lt-nav__caret .lt-icon {
  transform: rotate(180deg);
  color: var(--color-orange);
}

.lt-nav__item.is-open > .lt-nav__link {
  color: var(--color-orange);
}

/* ── Dropdown ─────────────────────────────────────────────────────── */
.lt-nav__dropdown {
  position: absolute;
  top: 100%;
  left: -24px;
  z-index: var(--z-dropdown);
  display: flex;
  flex-direction: column;
  width: 320px;
  margin: 0;
  padding: 0;
  list-style: none;
  background: var(--color-white);
  border: 1px solid var(--color-line);
  box-shadow: var(--shadow-dropdown);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition:
    opacity var(--t-med) var(--ease),
    transform var(--t-med) var(--ease),
    visibility var(--t-med) var(--ease);
}

.lt-nav__item.is-open > .lt-nav__dropdown,
.lt-nav__item:hover > .lt-nav__dropdown,
.lt-nav__item:focus-within > .lt-nav__dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.lt-nav__subitem + .lt-nav__subitem {
  border-top: 1px solid var(--color-line-soft);
}

.lt-nav__sublink {
  display: block;
  padding: 14px 20px;
  border-left: 3px solid transparent;
  color: var(--color-navy);
  font-size: var(--fs-nav);
  font-weight: var(--weight-label);
  letter-spacing: var(--ls-dropdown);
  text-transform: uppercase;
  transition:
    background-color var(--t-fast) var(--ease),
    border-color var(--t-fast) var(--ease);
}

.lt-nav__sublink:hover,
.lt-nav__sublink--active {
  border-left-color: var(--color-orange);
  background: var(--color-dropdown-active);
  color: var(--color-navy);
}

/* ── Actions ──────────────────────────────────────────────────────── */
.lt-nav__actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: none;
}

/* ── Hamburger ────────────────────────────────────────────────────── */
.lt-nav__toggle {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 32px;
  height: 32px;
  padding: 0 7px;
  border: 0;
  background: none;
}

.lt-nav__toggle-bar {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--color-navy);
  transition:
    transform var(--t-med) var(--ease),
    opacity var(--t-med) var(--ease);
}

.lt-chrome--over:not(.is-stuck) .lt-nav__toggle-bar {
  background: var(--color-white);
}

/* ── Mobile overlay (<1024px) ─────────────────────────────────────── */
/* Scoped to its own breakpoint rather than written flat and undone above
   1024px. The two blocks are mutually exclusive, so neither has to out-specify
   the other and a change to one cannot silently leak into the other. */
@media (max-width: 1023px) {
  .lt-nav__nav {
    position: fixed;
    inset: 0;
    z-index: var(--z-overlay);
    display: flex;
    flex-direction: column;
    padding: 24px;
    background: var(--color-navy);
    overflow-y: auto;
    overscroll-behavior: contain;
    transform: translateX(100%);
    visibility: hidden;
    transition:
      transform var(--t-slow) var(--ease),
      visibility var(--t-slow) var(--ease);
  }

  .lt-nav.is-drawer-open .lt-nav__nav {
    transform: translateX(0);
    visibility: visible;
  }

  .lt-nav__close {
    align-self: flex-end;
    padding: 0;
    border: 0;
    background: none;
    color: var(--color-white);
    line-height: 0;
  }

  .lt-nav__close .lt-icon {
    width: 22px;
    height: 22px;
  }

  .lt-nav__close:hover {
    color: var(--color-orange);
  }

  .lt-nav__menu {
    flex-direction: column;
    align-items: stretch;
    gap: 22px;
    margin-top: 32px;
  }

  .lt-nav__item {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }

  .lt-nav__link {
    font-family: var(--font-display);
    font-weight: var(--weight-display);
    font-size: var(--fs-title);
    letter-spacing: var(--ls-display);
    color: var(--color-white);
  }

  .lt-nav__link:hover,
  .lt-nav__link--active {
    color: var(--color-orange);
  }

  /* The caret is desktop chrome: in the overlay every submenu is already open. */
  .lt-nav__caret {
    display: none;
  }

  .lt-nav__dropdown {
    position: static;
    width: auto;
    gap: 12px;
    padding-left: 20px;
    border: 0;
    border-left: 2px solid var(--color-orange);
    background: none;
    box-shadow: none;
    opacity: 1;
    visibility: visible;
    transform: none;
  }

  .lt-nav__subitem,
  .lt-nav__subitem + .lt-nav__subitem {
    border-top: 0;
  }

  .lt-nav__sublink {
    padding: 0;
    border-left: 0;
    color: var(--color-placeholder);
    font-family: var(--font-body);
    font-size: var(--fs-meta);
    font-weight: 400;
    letter-spacing: normal;
    text-transform: none;
    background: none;
  }

  .lt-nav__sublink:hover {
    color: var(--color-orange);
    background: none;
  }

  .lt-nav__drawer-cta {
    margin-top: auto;
    padding-top: 32px;
  }

  /* The desktop CTA has no room beside a hamburger. */
  .lt-nav__cta {
    display: none;
  }

  /* Locked while the overlay covers the page. */
  body.lt-no-scroll {
    overflow: hidden;
  }
}

/* ── ≥1024px: menu inline, overlay retired ────────────────────────── */
@media (min-width: 1024px) {
  .lt-nav__toggle,
  .lt-nav__close {
    display: none;
  }

  .lt-nav__nav {
    flex: 1;
    display: flex;
    justify-content: flex-end;
  }

  .lt-nav__drawer-cta {
    display: none;
  }
}

/* ── <640px: the 400 artboard's utility bar ───────────────────────── */
@media (max-width: 639px) {
  .lt-topnav__icon,
  .lt-topnav__pipe,
  .lt-topnav__area {
    display: none;
  }

  .lt-topnav__phone,
  .lt-topnav__hiring {
    font-size: var(--fs-micro);
  }

  /* The logo keeps its natural 140x100 here too, so it — not --header-h —
     is what sets the bar's height on small screens. */
}
