/* Header global: fixo, acompanha a cor da seção sob ele (data-mode = dark | light). */
.tn-skip { position: absolute; inset-inline-start: 1rem; inset-block-start: -4rem; z-index: var(--tn-z-focus); padding: .75rem 1rem; background: var(--tn-color-gold); color: var(--tn-bg-deep); }
.tn-skip:focus { inset-block-start: 1rem; }

.tn-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: var(--tn-z-header);
  block-size: var(--tn-header-h);
  color: var(--tn-text-primary);
  transition: background var(--tn-dur-interface) var(--tn-ease-out), color var(--tn-dur-interface) var(--tn-ease-out), border-color var(--tn-dur-interface);
  border-block-end: 1px solid transparent;
}
.tn-header[data-mode="light"], .tn-header[data-mode="gold"] { color: var(--tn-ink); }
.tn-header[data-mode="gold"] .tn-header__brand .tn-logo--on-dark { display: none; }
.tn-header[data-mode="gold"] .tn-header__brand .tn-logo--on-gold { display: block; }
.tn-header[data-mode="gold"] .tn-header__cta { background: var(--tn-ink); color: var(--tn-color-gold); }
.tn-header.is-scrolled { backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.tn-header.is-scrolled[data-mode="dark"] { background: rgba(0, 10, 28, 0.82); border-block-end-color: var(--tn-border); }
.tn-header.is-scrolled[data-mode="light"] { background: rgba(255, 255, 255, 0.88); border-block-end-color: var(--tn-border-light); }

/* Páginas que abrem com seção clara empurram o conteúdo; as escuras passam por baixo do header. */
body.tn-header-solid { padding-block-start: var(--tn-header-h); }
body.tn-header-solid .tn-header { background: var(--tn-bg-light); }

.tn-header__bar { display: flex; align-items: center; justify-content: space-between; block-size: 100%; gap: var(--tn-space-6); }
.tn-header__brand { display: block; inline-size: clamp(8.5rem, 7rem + 4vw, 10.5rem); line-height: 0; }
.tn-header__brand img { display: block; inline-size: 100%; block-size: auto; }
.tn-header__brand .tn-logo--on-light, .tn-header__brand .tn-logo--on-gold { display: none; }
.tn-header[data-mode="light"] .tn-header__brand .tn-logo--on-light { display: block; }
.tn-header[data-mode="light"] .tn-header__brand .tn-logo--on-dark { display: none; }

.tn-header__nav { display: flex; align-items: center; gap: var(--tn-space-8); }
.tn-header__list { display: flex; gap: var(--tn-space-8); margin: 0; padding: 0; list-style: none; }
.tn-header__link { color: inherit; text-decoration: none; font-size: 0.9375rem; font-weight: 500; opacity: 0.86; background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; transition: background-size var(--tn-dur-interface) var(--tn-ease-out), opacity var(--tn-dur-micro); padding-block: .5rem; }
@media (hover: hover) and (pointer: fine) { .tn-header__link:hover { opacity: 1; background-size: 100% 1px; } }
.tn-header__cta { min-block-size: 2.75rem; padding-inline: var(--tn-space-6); font-size: 0.9375rem; }

.tn-header__toggle { display: none; inline-size: 2.75rem; block-size: 2.75rem; padding: 0; border: 0; background: none; color: inherit; cursor: pointer; align-items: center; justify-content: center; }
.tn-header__burger, .tn-header__burger::before { content: ""; display: block; inline-size: 1.5rem; block-size: 2px; background: currentColor; position: relative; transition: transform var(--tn-dur-interface) var(--tn-ease-out); }
.tn-header__burger::before { position: absolute; inset-block-start: -7px; }
.tn-header__toggle[aria-expanded="true"] .tn-header__burger { transform: translateY(0) rotate(45deg); }
.tn-header__toggle[aria-expanded="true"] .tn-header__burger::before { transform: translateY(7px) rotate(-90deg); }

@media (max-width: 899px) {
  .tn-header__toggle { display: inline-flex; }
  .tn-header__nav {
    position: fixed; inset: var(--tn-header-h) 0 0 0;
    flex-direction: column; align-items: stretch; justify-content: flex-start; gap: var(--tn-space-8);
    padding: var(--tn-space-12) var(--tn-gutter);
    background: var(--tn-bg-deep); color: var(--tn-text-primary);
    visibility: hidden; opacity: 0; transform: translateY(-0.5rem);
    transition: opacity var(--tn-dur-interface) var(--tn-ease-out), transform var(--tn-dur-interface) var(--tn-ease-out), visibility 0s linear var(--tn-dur-interface);
  }
  .tn-header.is-open .tn-header__nav { visibility: visible; opacity: 1; transform: none; transition-delay: 0s; }
  .tn-header.is-open { background: var(--tn-bg-deep); color: var(--tn-text-primary); }
  .tn-header.is-open .tn-header__brand .tn-logo--on-light, .tn-header__brand .tn-logo--on-gold { display: none; }
  .tn-header.is-open .tn-logo--on-dark { display: block; }
  .tn-header__list { flex-direction: column; gap: var(--tn-space-6); }
  .tn-header__link { font-size: var(--tn-text-xl); font-weight: 600; letter-spacing: -0.03em; opacity: 1; }
  .tn-header__cta { min-block-size: 3.25rem; justify-content: center; }
}

/* Barra do WordPress (usuário logado) empurra o header fixo. */
body.admin-bar .tn-header { inset-block-start: var(--wp-admin--admin-bar--height, 32px); }
@media (max-width: 899px) { body.admin-bar .tn-header__nav { inset-block-start: calc(var(--tn-header-h) + var(--wp-admin--admin-bar--height, 32px)); } }

/* Submenu "Soluções": painel abaixo do item (desktop) e lista recuada dentro do menu aberto (celular). */
.tn-header__item--sub { position: relative; }
button.tn-header__link { font: inherit; font-size: 0.9375rem; font-weight: 500; color: inherit; background-color: transparent; border: 0; cursor: pointer; display: inline-flex; align-items: center; gap: 0.4rem; }
.tn-header__chev { inline-size: 0.6rem; block-size: 0.4rem; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; transition: transform var(--tn-dur-interface) var(--tn-ease-out); }
.tn-header__item--sub.is-open .tn-header__chev { transform: rotate(180deg); }
.tn-header__sub { list-style: none; margin: 0; padding: 0.5rem; }
.tn-header__sublink { display: grid; gap: 0.15rem; padding: 0.8rem 1rem; color: inherit; text-decoration: none; }
.tn-header__sublink strong { font-weight: 600; font-size: 0.9375rem; }
.tn-header__sublink span { font-size: 0.8125rem; opacity: 0.65; }
@media (min-width: 900px) {
  .tn-header__sub { position: absolute; inset-block-start: calc(100% + 0.9rem); inset-inline-start: 50%; min-inline-size: 16.5rem; transform: translate(-50%, -0.4rem); background: #fff; color: #0b0b0c; border: 1px solid rgba(11, 11, 12, 0.08); border-radius: 1.25rem; box-shadow: 0 24px 48px -18px rgba(0, 0, 0, 0.35); visibility: hidden; opacity: 0; transition: opacity var(--tn-dur-interface) var(--tn-ease-out), transform var(--tn-dur-interface) var(--tn-ease-out), visibility 0s linear var(--tn-dur-interface); }
  .tn-header[data-mode="dark"] .tn-header__sub { background: #0b0b0c; color: #fff; border-color: rgba(255, 255, 255, 0.14); }
  .tn-header__item--sub.is-open .tn-header__sub { visibility: visible; opacity: 1; transform: translate(-50%, 0); transition-delay: 0s; }
  .tn-header__sub::before { content: ""; position: absolute; inset-inline: 0; inset-block-start: -1rem; block-size: 1rem; }
  .tn-header__sublink { border-radius: 0.8rem; }
  .tn-header__sublink:hover, .tn-header__sublink:focus-visible { background: rgba(11, 11, 12, 0.06); }
  .tn-header[data-mode="dark"] .tn-header__sublink:hover, .tn-header[data-mode="dark"] .tn-header__sublink:focus-visible { background: rgba(255, 255, 255, 0.1); }
}
@media (max-width: 899px) {
  button.tn-header__link { font-size: var(--tn-text-xl); font-weight: 600; letter-spacing: -0.03em; }
  .tn-header__sub { padding: 0.5rem 0 0 1rem; }
  .tn-header__sub[hidden] { display: none; }
  .tn-header__item--sub:not(.is-open) .tn-header__sub { display: none; }
  .tn-header__sublink { padding: 0.6rem 0; }
  .tn-header__sublink strong { font-size: 1.125rem; }
}

/* Alinhamento: links e o botão "Soluções" na mesma linha de base e altura. */
.tn-header__list { align-items: center; }
.tn-header__item { display: flex; align-items: center; }
.tn-header__link, button.tn-header__link { line-height: 1.2; padding-block: 0.5rem; margin: 0; vertical-align: middle; }
button.tn-header__link { appearance: none; -webkit-appearance: none; }
