/* Sitewide blue header — the one navigation bar every Eccentric Automations page uses.
   Self-contained on purpose: the /capabilities/ demos do not load styles.css, so nothing
   here relies on it. Pages that set --container (the 880px intake pages) get a header
   whose logo and links sit on the same left and right edges as the rest of the page. */

.site-header {
  position: sticky;
  z-index: 50;
  top: 0;
  width: 100%;
  background: #0b64d8;
  border-bottom: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: 0 14px 30px rgba(14, 54, 112, 0.22);
  font-family: "Inter", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  text-align: left;
}

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

.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  width: min(calc(100% - 32px), var(--container, 1180px));
  min-height: 64px;
  margin: 0 auto;
}

.site-header-brand,
.site-header-brand a {
  display: inline-flex;
  align-items: center;
  color: #fff;
  white-space: nowrap;
  text-decoration: none;
}

.site-header-brand img {
  display: block;
  width: 204px;
  max-width: 100%;
  aspect-ratio: 562 / 168;
  height: auto;
  object-fit: contain;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.14);
}

.site-header-links {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  min-width: 0;
  margin: 0;
  padding: 0;
}

.site-header-item {
  position: relative;
}

.site-header-trigger,
.site-header-cta {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  margin: 0;
  padding: 0 12px;
  border: 0;
  border-radius: 8px;
  color: #fff;
  background: transparent;
  font: inherit;
  font-weight: 800;
  letter-spacing: normal;
  text-decoration: none;
  text-transform: none;
  cursor: pointer;
}

.site-header-trigger::after {
  content: "";
  width: 0;
  height: 0;
  margin-left: 8px;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
}

.site-header-trigger:hover,
.site-header-trigger:focus-visible,
.site-header-trigger.active,
.site-header-cta:hover,
.site-header-cta:focus-visible {
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  outline: none;
}

.site-header-cta {
  background: #073b82;
}

.site-header-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  display: grid;
  min-width: 210px;
  padding: 8px;
  border: 1px solid rgba(11, 64, 132, 0.15);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 20px 42px rgba(13, 43, 80, 0.22);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity 140ms ease, transform 140ms ease, visibility 140ms ease;
}

.site-header-item:hover .site-header-menu,
.site-header-item:focus-within .site-header-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.site-header-menu a {
  display: block;
  padding: 9px 10px;
  border-radius: 6px;
  color: #16304f;
  background: transparent;
  font-weight: 700;
  text-decoration: none;
}

.site-header-menu a:hover,
.site-header-menu a:focus-visible {
  color: #16304f;
  background: #e8f1ff;
  outline: none;
}

/* The /capabilities/ demos pin their own small "Back to capabilities" link to the top
   corner of the screen. Drop it just below the blue header so the two never overlap. */
body:has(> .site-header) #back-link,
body:has(> .site-header) .back-link {
  top: 81px;
}

@media (max-width: 640px) {
  body:has(> .site-header) #back-link,
  body:has(> .site-header) .back-link {
    top: 112px;
  }

  .site-header-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
    width: min(calc(100% - 22px), var(--container, 1180px));
    min-height: 94px;
    padding: 7px 0 8px;
  }

  .site-header-brand,
  .site-header-brand a {
    justify-content: center;
  }

  .site-header-brand img {
    width: 164px;
  }

  .site-header-links {
    justify-content: flex-start;
    gap: 4px;
    max-width: 100%;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
  }

  .site-header-links::-webkit-scrollbar {
    display: none;
  }

  .site-header-trigger,
  .site-header-cta {
    min-height: 34px;
    padding: 0 9px;
    font-size: 0.86rem;
    white-space: nowrap;
  }

  .site-header-menu {
    position: fixed;
    top: 92px;
    right: 11px;
    left: 11px;
    min-width: 0;
  }
}
