/* ==========================================================================
   USG Logistics — shared site header, navigation and lightbox.
   Loaded on every page. This file is the SINGLE source of truth for nav
   typography. Pages must not restyle .nav-link or .nav-cta; if a nav link
   ever renders at the wrong weight again, the override will be in a page
   stylesheet, not here.
   ========================================================================== */

.site-header {
  --hdr-navy: #0a2540;
  --hdr-ice: #2a9fc9;
  --hdr-text: #3a4756;
  --hdr-muted: #617385;
  --hdr-line: #eef2f6;
  --hdr-line-strong: #c9d3dd;
  --hdr-white: #ffffff;
  --hdr-shadow: 0 8px 24px rgba(10, 37, 64, 0.08);

  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--hdr-line);
}

.site-header *,
.site-header *::before,
.site-header *::after { box-sizing: border-box; }

.site-header-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  width: min(1280px, 100%);
  margin: 0 auto;
  padding: 14px 32px;
}

.site-logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  text-decoration: none;
}

.site-logo img {
  display: block;
  height: 155px;
  width: auto;
  max-width: 760px;
  object-fit: contain;
  object-position: left center;
}

/* ------------------------------- nav shell ------------------------------ */

.site-nav-menu { display: block; }

.nav-list {
  display: flex;
  align-items: center;
  gap: 22px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-item {
  position: relative;
  display: flex;
  align-items: center;
}

/* -------------------------- the one nav link style ---------------------- */
/* Every top-level link and every submenu link uses this. Hover, focus and
   current-page states change colour ONLY — a weight change would reflow the
   row and shift the layout. */

.site-header .nav-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 14px;
  font-weight: 500;
  font-style: normal;
  letter-spacing: 0.01em;
  line-height: 1.2;
  text-transform: none;
  text-decoration: none;
  white-space: nowrap;
  color: var(--hdr-text);
  background: none;
  border: 0;
  transition: color 0.2s ease;
}

.site-header .nav-link:hover,
.site-header .nav-link:focus-visible,
.site-header .nav-link[aria-current="page"] {
  color: var(--hdr-ice);
}

.site-header .nav-link:focus-visible {
  outline: 2px solid var(--hdr-ice);
  outline-offset: 3px;
  border-radius: 3px;
}

/* -------------------------------- the CTA ------------------------------- */

.site-header .nav-cta {
  padding: 10px 20px;
  border-radius: 6px;
  color: var(--hdr-white);
  background: var(--hdr-navy);
  font-weight: 500;
  transition: background 0.2s ease, color 0.2s ease;
}

.site-header .nav-cta:hover,
.site-header .nav-cta:focus-visible {
  color: var(--hdr-white);
  background: var(--hdr-ice);
}

/* ------------------------------ services caret -------------------------- */

.nav-caret {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  margin-left: 2px;
  padding: 0;
  color: var(--hdr-text);
  background: none;
  border: 0;
  cursor: pointer;
  transition: color 0.2s ease, transform 0.2s ease;
}

.nav-caret svg { display: block; width: 12px; height: 12px; }

.nav-caret:hover { color: var(--hdr-ice); }

.nav-caret:focus-visible {
  outline: 2px solid var(--hdr-ice);
  outline-offset: 2px;
  border-radius: 3px;
}

.nav-item.is-open > .nav-caret {
  color: var(--hdr-ice);
  transform: rotate(180deg);
}

/* -------------------------------- submenu ------------------------------- */

.submenu {
  position: absolute;
  top: 100%;
  left: -14px;
  z-index: 10;
  min-width: 214px;
  margin: 16px 0 0;
  padding: 8px;
  list-style: none;
  background: var(--hdr-white);
  border: 1px solid var(--hdr-line);
  border-radius: 10px;
  box-shadow: var(--hdr-shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(4px);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
}

/* Invisible bridge across the 16px offset, so moving the cursor from
   "Services" down into the panel never leaves the hover area. */
.submenu::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 100%;
  height: 16px;
}

/* Keyboard opening is driven by JS (the focusin handler), not :focus-within.
   With :focus-within here, Escape could not close the panel: focus returns to
   the caret, which is inside the item, and the selector re-opened it. */
.nav-item.is-open > .submenu,
.nav-item.has-submenu:hover > .submenu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.submenu li { display: block; }

.site-header .submenu-link {
  display: block;
  width: 100%;
  padding: 10px 12px;
  border-radius: 6px;
  color: var(--hdr-text);
  transition: color 0.2s ease, background 0.2s ease;
}

.site-header .submenu-link:hover,
.site-header .submenu-link:focus-visible {
  color: var(--hdr-ice);
  background: #f7f9fb;
}

/* ---------------------------- hamburger button -------------------------- */

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  padding: 0;
  color: var(--hdr-text);
  background: transparent;
  border: 1px solid var(--hdr-line-strong);
  border-radius: 8px;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.nav-toggle:hover { color: var(--hdr-ice); border-color: var(--hdr-ice); }

.nav-toggle:focus-visible {
  outline: 2px solid var(--hdr-ice);
  outline-offset: 2px;
}

.nav-toggle svg { display: block; width: 24px; height: 24px; }

/* ------------------------------- mobile nav ----------------------------- */

@media (max-width: 900px) {
  .nav-toggle { display: inline-flex; }

  .site-nav-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--hdr-line);
    box-shadow: var(--hdr-shadow);
  }

  .site-nav-menu.is-open { display: block; }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 20px 20px;
  }

  .nav-item { display: block; }

  .site-header .nav-link {
    padding: 14px 4px;
    font-size: 16px;
    border-bottom: 1px solid var(--hdr-line);
  }

  /* No hover on touch: the caret is dropped and the three service pages are
     always visible as indented sub-items. */
  .nav-caret { display: none; }

  .submenu {
    position: static;
    min-width: 0;
    margin: 0;
    padding: 0 0 0 18px;
    background: none;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: none;
  }

  .submenu::before { display: none; }

  .site-header .submenu-link {
    padding: 13px 4px;
    border-radius: 0;
    border-bottom: 1px solid var(--hdr-line);
    color: var(--hdr-muted);
  }

  .site-header .submenu-link:hover,
  .site-header .submenu-link:focus-visible { background: none; color: var(--hdr-ice); }

  .site-header .nav-cta {
    justify-content: center;
    margin-top: 14px;
    padding: 14px 20px;
    text-align: center;
    border-bottom: 0;
  }
}

@media (max-width: 768px) {
  .site-header-inner { padding: 14px 20px; gap: 20px; }
  .site-logo img { height: 100px; max-width: 390px; }
}

@media (max-width: 400px) {
  .site-header-inner { padding: 12px 14px; gap: 12px; }
  .site-logo img { height: 78px; max-width: 220px; }
}

/* ==========================================================================
   Footer service links. Present on every page so the three service pages
   stay internally linked now that they sit inside the Services dropdown.
   ========================================================================== */

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

.footer-links a {
  color: inherit;
  text-decoration: none;
}

.footer-links a:hover,
.footer-links a:focus-visible { text-decoration: underline; }

/* Standalone footer for pages that had none (intake, thank-you). */
.site-footer {
  padding: 26px 20px;
  color: #c9d6e0;
  background: #041424;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 13px;
}

.site-footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: min(1200px, 100%);
  margin: 0 auto;
}

/* ==========================================================================
   Lightbox — reusable. Any <img class="js-lightbox" data-full="/big.jpg">
   becomes click-to-enlarge. No markup beyond those two attributes.
   ========================================================================== */

.js-lightbox {
  cursor: pointer;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.js-lightbox:hover { opacity: 0.92; transform: translateY(-2px); }

.js-lightbox:focus-visible {
  outline: 3px solid #2a9fc9;
  outline-offset: 3px;
}

.usg-lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 5vh 5vw;
  background: rgba(6, 26, 48, 0.88);
}

.usg-lightbox.is-open { display: flex; }

.usg-lightbox-figure {
  margin: 0;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.usg-lightbox img {
  display: block;
  max-width: 90vw;
  max-height: 90vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 10px;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.45);
}

.usg-lightbox-close {
  position: absolute;
  top: 20px;
  right: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.usg-lightbox-close:hover { background: rgba(255, 255, 255, 0.24); }

.usg-lightbox-close:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 2px;
}

.usg-lightbox-close svg { display: block; width: 22px; height: 22px; }

@media (prefers-reduced-motion: reduce) {
  .site-header .nav-link,
  .site-header .nav-cta,
  .nav-caret,
  .submenu,
  .js-lightbox { transition: none; }
  .js-lightbox:hover { transform: none; }
}
