/* ===== Cabeçalho flutuante (pílula) ===== */
.header {
  --fg: #fff;
  --hbg: rgba(4, 16, 43, 0);
  --hbd: rgba(255, 255, 255, 0);
  --blur: 0px;

  position: fixed;
  inset: 0 0 auto;
  z-index: 80;
  display: flex;
  justify-content: center;
  padding: 20px clamp(14px, 3vw, 40px) 0;
  pointer-events: none;
  transition: padding 0.5s var(--ease);
}

.header.is-compact {
  padding-top: 12px;
  --hbg: rgba(4, 16, 43, 0.55);
  --hbd: rgba(255, 255, 255, 0.12);
  --blur: 18px;
}
.header.is-light {
  --fg: var(--text);
}
.header.is-light.is-compact {
  --hbg: rgba(255, 255, 255, 0.72);
  --hbd: rgba(10, 22, 51, 0.08);
}

.header__bar {
  pointer-events: auto;
  width: 100%;
  max-width: var(--max);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 10px 10px 10px 22px;
  border-radius: 999px;
  background: var(--hbg);
  border: 1px solid var(--hbd);
  backdrop-filter: blur(var(--blur)) saturate(1.4);
  -webkit-backdrop-filter: blur(var(--blur)) saturate(1.4);
  color: var(--fg);
  transition:
    background 0.5s,
    border-color 0.5s,
    color 0.4s;
}

.header__logo {
  position: relative;
  display: block;
  width: 136px;
  height: 30px;
  flex: none;
}
.header__logo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: left center;
  transition: opacity 0.4s;
}
.header__logo-dark {
  opacity: 0;
}
.header.is-light .header__logo-light {
  opacity: 0;
}
.header.is-light .header__logo-dark {
  opacity: 1;
}

.header__nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-link {
  padding: 10px 16px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  color: var(--fg);
  opacity: 0.78;
  transition:
    opacity 0.3s,
    background 0.3s;
}
.nav-link:hover {
  opacity: 1;
  background: rgba(127, 140, 170, 0.14);
}

.nav-cta {
  margin-left: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 999px;
  background: var(--green);
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  transition:
    transform 0.3s,
    background 0.3s;
}
.nav-cta:hover {
  background: var(--green-hover);
  transform: translateY(-1px);
}

.header__burger {
  display: none;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 0;
  background: var(--green);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
}
.header__burger span {
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: var(--ink);
}

@media (max-width: 819.98px) {
  .header__nav {
    display: none;
  }
  .header__burger {
    display: flex;
  }
}

/* ===== Menu mobile (tela cheia) ===== */
.menu {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  flex-direction: column;
  padding: 24px 22px 32px;
  background: var(--ink);
  color: #fff;
  overflow-y: auto;
}
.menu[hidden] {
  display: none;
}

.menu__top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.menu__top img {
  height: 28px;
  width: auto;
}

.menu__close {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: transparent;
  color: #fff;
  font-size: 22px;
  cursor: pointer;
}

.menu__nav {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.menu__item {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 14px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 40px;
  font-weight: 600;
  letter-spacing: -0.03em;
}
.menu__item small {
  font: 400 12px var(--mono);
  opacity: 0.5;
}

.menu__cta {
  margin-top: 28px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  min-height: 56px;
  border-radius: 999px;
  background: var(--green);
  color: var(--ink);
  font-size: 16px;
  font-weight: 600;
}

/* ===== Seletor de idioma (páginas do Migram) ===== */
.nav-lang {
  font: 500 12px/1 var(--mono);
  letter-spacing: 0.12em;
  border: 1px solid rgba(127, 140, 170, 0.4);
}
.menu__lang {
  margin-top: 18px;
  text-align: center;
  font: 500 13px/1.4 var(--mono);
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.72);
}
