/* ==========================================================================
   HEADER BLUEPRINT nas páginas de projeto.
   Mesma marcação e mesmo visual do header da home (definido lá em
   home-blueprint.css). Ao mudar um, mude o outro.
   ========================================================================== */
.bp-header.site-header {
  --h-display: var(--font-sans, "Space Grotesk", system-ui, sans-serif);
  --h-mono: var(--font-mono, "JetBrains Mono", ui-monospace, monospace);
  position: sticky;
  top: 0;
  z-index: 100;
  display: block;
  padding: 0;
  background: var(--bp-blue-header) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.42) !important;
  backdrop-filter: none;
  transition: transform 240ms cubic-bezier(0.22, 1, 0.36, 1);
}
.bp-header.site-header.is-hidden {
  transform: translateY(-100%);
}
.bp-header a {
  color: inherit;
  text-decoration: none;
}
.bp-header button {
  cursor: pointer;
}

/* Mesma largura dos trilhos do conteúdo das páginas de projeto (1400px) */
.bp-header .bp-wrap {
  width: 100%;
  max-width: 1400px;
  margin-inline: auto;
}

.bp-topbar {
  border-bottom: 1px solid rgba(255, 255, 255, 0.35);
}
.bp-topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 76px;
  padding-block: 10px;
  padding-inline: 28px;
  border-inline: 1px solid rgba(255, 255, 255, 0.32);
}
.bp-brand-box {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 8px 16px;
  border: 1px solid rgba(255, 255, 255, 0.52);
  background: rgba(255, 255, 255, 0.04);
  color: var(--as-paper);
}
.bp-brand-mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.bp-brand-mark img {
  display: block;
  width: 36px;
  height: 36px;
}
.bp-brand-mark .logo-light { display: none; }
.bp-brand-mark .logo-dark { display: block; }
.bp-brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}
.bp-brand-text strong {
  font-family: var(--h-display);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--bp-on-blue);
}
.bp-brand-sub {
  font-family: var(--h-mono);
  font-size: 0.72rem;
  font-weight: 500;
  color: rgba(226, 238, 255, 0.84);
}
.bp-top-utils {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}
.bp-util-links {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--h-mono);
  font-size: 0.72rem;
  color: rgba(226, 238, 255, 0.86);
}
.bp-util-links a:hover {
  color: var(--bp-on-blue);
  text-decoration: underline;
}
.bp-util-links span {
  opacity: 0.45;
}
.bp-util-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}
.bp-lang-switcher {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.bp-lang-label {
  font-family: var(--h-mono);
  font-size: 0.72rem;
  color: rgba(226, 238, 255, 0.8);
  margin-right: 4px;
}
.bp-lang-btn {
  min-width: 34px;
  height: 26px;
  padding: 0 8px;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 0;
  background: rgba(255, 255, 255, 0.06);
  color: #E2EEFF;
  font-family: var(--h-mono);
  font-size: 0.7rem;
  font-weight: 600;
  transition: background-color 120ms ease, color 120ms ease, border-color 120ms ease;
}
.bp-lang-btn:hover,
.bp-lang-btn.is-active {
  background: var(--bp-on-blue);
  color: var(--bp-blue-ink);
  border-color: var(--bp-on-blue);
}
.bp-header.site-header .theme-toggle {
  width: 30px;
  height: 26px;
  min-height: 26px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.42) !important;
  border-radius: 0;
  background: rgba(255, 255, 255, 0.06) !important;
  color: var(--bp-on-blue) !important;
}
.bp-header.site-header .theme-toggle svg {
  width: 15px;
  height: 15px;
}
.bp-header.site-header .theme-toggle:hover {
  background: var(--bp-on-blue) !important;
  color: var(--bp-blue-ink) !important;
}
.bp-header.site-header .theme-toggle .sun { display: none; }
.bp-header.site-header .theme-toggle .moon { display: block; }
:root[data-theme="dark"] .bp-header.site-header .theme-toggle .sun { display: block; }
:root[data-theme="dark"] .bp-header.site-header .theme-toggle .moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .bp-header.site-header .theme-toggle .sun { display: block; }
  :root:not([data-theme="light"]) .bp-header.site-header .theme-toggle .moon { display: none; }
}

.bp-subbar {
  background: var(--bp-blue-subbar);
}
.bp-subbar-inner {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 16px;
  min-height: 46px;
}
.bp-nav {
  display: flex;
  align-items: stretch;
  gap: 0;
}
.bp-nav a {
  display: inline-flex;
  align-items: center;
  padding: 0 18px;
  border-right: 1px solid rgba(255, 255, 255, 0.28);
  font-family: var(--h-mono);
  font-size: 0.76rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.9);
  transition: color 120ms ease, background-color 120ms ease;
}
.bp-nav a:first-child {
  border-left: 1px solid rgba(255, 255, 255, 0.28);
  padding-inline: 14px;
}
.bp-nav a:hover {
  background: rgba(255, 255, 255, 0.14);
  color: var(--bp-on-blue);
}
.bp-nav a.is-cta {
  background: var(--as-signal);
  color: var(--bp-on-blue);
  font-weight: 600;
}
.bp-nav a.is-cta:hover {
  background: var(--as-signal-hover);
}
.bp-sub-search {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 0 14px;
  border-inline: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(15, 25, 46, 0.22);
  min-width: 220px;
}
.bp-sub-search svg {
  color: rgba(255, 255, 255, 0.85);
  flex-shrink: 0;
}
.bp-sub-search input {
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--bp-on-blue);
  font: inherit;
  font-size: 0.82rem;
  outline: none;
}
.bp-sub-search input::placeholder {
  color: rgba(226, 238, 255, 0.72);
}
.bp-sub-search input::-webkit-search-cancel-button {
  filter: invert(1);
}

@media (max-width: 900px) {
  .bp-topbar-inner {
    padding-inline: 20px;
    border-inline: 0;
  }
  .bp-sub-search { display: none; }
  .bp-util-links { display: none; }
}
@media (max-width: 820px) {
  .bp-nav .nav-hide-sm { display: none; }
}
@media (max-width: 720px) {
  .bp-brand-sub { display: none; }
}
