/* ===== Header ===== */
:root {
    --sw-logo-offset-x: -8px; /* ajuste aqui */
    --sw-logo-offset-y: 0px;
}
.sw-header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background: transparent;
    border-bottom: none;
    backdrop-filter: none;
    --sw-brand-scale: 1;
}

.sw-header__inner {
    height: 160px;
    width: min(1240px, 92%);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr auto 1fr auto;
    align-items: center;
    gap: 18px;
}

/* Logo núcleo (suas medidas personalizadas) */
.sw-header__brand {
    position: relative;
    width: 180px;
    height: 180px;
    padding: 0;
    margin: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    justify-self: center;
    align-self: center;
    transform: translate(var(--sw-logo-offset-x), var(--sw-logo-offset-y)) scale(var(--sw-brand-scale));
    transition: transform .35s cubic-bezier(.16,1,.3,1);
}

/* após sair do hero, deixa o logo/engrenagem menor */
.sw-header.is-compact {
    --sw-brand-scale: 0.74;
}

/* Notebooks / telas menores: engrenagem ainda menor após o hero (is-compact vem do JS no scroll) */
@media (max-width: 1440px) {
    .sw-header.is-compact {
        --sw-brand-scale: 0.62;
    }
}

@media (max-width: 1200px) {
    .sw-header.is-compact {
        --sw-brand-scale: 0.54;
    }
}

.sw-header__logo {
    display: block;
    width: 140px;
    height: 140px;
    margin: 0;
    object-fit: contain;
    object-position: center;
    justify-self: center;
    align-self: center;
    z-index: 2;
    transition: transform .25s ease, filter .25s ease;
    
}

/* Ring centralizado (suas medidas) */
.sw-header__ring {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 180px;
    height: 180px;
    transform: translate(-50%, -50%);
    border-radius: 999px;
    z-index: 1;
    pointer-events: none;

}

    /* O pulso acontece aqui, sem quebrar o centro */
    .sw-header__ring::before {
        content: "";
        position: absolute;
        inset: 18px;
        border-radius: 999px;
        border: 1px solid rgba(0,212,255,.22);
        box-shadow: inset 0 0 16px rgba(0,212,255,.10);
        opacity: .95;
        transform: scale(1);
        animation: swPulseScale 1.8s ease-in-out infinite;
    }

@keyframes swPulseScale {
    0% {
        transform: scale(1);
        opacity: .85;
    }

    60% {
        transform: scale(1.09);
        opacity: 1;
    }

    100% {
        transform: scale(1);
        opacity: .85;
    }
}

/* Expandido: ring energiza e para de pulsar */
.sw-header.is-expanded .sw-header__ring::before {
    animation: none;
    border-color: rgba(0,212,255,.45);
    box-shadow: inset 0 0 20px rgba(0,212,255,.16);
    opacity: 1;
}

/* Logo gira 1.5 voltas ao expandir */
/* efeito visual do expandido (sem animação automática) */
.sw-header.is-expanded .sw-header__logo {
    filter: drop-shadow(0 0 18px rgba(0,212,255,.40));
}

/* animação só quando JS aplica a classe no botão */
.sw-header__brand.spin-once .sw-header__logo {
    animation: swLogoSpin .85s cubic-bezier(.2,.9,.2,1) both;
}

@keyframes swLogoSpin {
    from {
        transform: rotate(0deg) scale(1);
    }

    to {
        transform: rotate(720deg) scale(1.06);
    }
}
/* Nav */
.sw-header__nav {
    display: flex;
    align-items: center;
    gap: 24px;
    width: 100%;
    overflow: visible;
    will-change: opacity, transform, filter;
    transition: opacity .70s ease, transform 1.00s cubic-bezier(.2,.9,.2,1), filter .70s ease;
}

/* esquerda: grupo encosta no centro */
.sw-header__nav--left {
    justify-content: flex-end;
}

/* direita: grupo encosta no centro */
.sw-header__nav--right {
    justify-content: flex-start;
}

/* Colapsado: invisível + blur + direções opostas */
.sw-header.is-collapsed .sw-header__nav {
    opacity: 0;
    filter: blur(8px);
    pointer-events: none;
}

.sw-header.is-collapsed .sw-header__nav--left {
    transform: translateX(54px); /* sai para a esquerda */
}

.sw-header.is-collapsed .sw-header__nav--right {
    transform: translateX(-54px); /* sai para a direita */
}

/* Desktop retraído: só a engrenagem recebe clique/hover; o restante do topo não bloqueia a página */
@media (min-width: 861px) {
    .sw-header.is-collapsed {
        pointer-events: none;
    }

    .sw-header.is-collapsed .sw-header__brand {
        pointer-events: auto;
    }

    /* Seletor de idioma sempre clicável */
    .sw-header.is-collapsed .sw-header__lang {
        pointer-events: auto;
    }

    .sw-header.is-expanded {
        pointer-events: auto;
    }
}

/* Expandido: aparece suave com direções corretas */
.sw-header.is-expanded .sw-header__nav--left {
    opacity: 1;
    filter: blur(0);
    transform: translateX(0);
    pointer-events: auto;
}

.sw-header.is-expanded .sw-header__nav--right {
    opacity: 1;
    filter: blur(0);
    transform: translateX(0);
    pointer-events: auto;
}
/* Itens sempre com fundo pill */
.sw-header__link {
    position: relative;
    display: inline-block;
    color: rgba(255,255,255,.96);
    text-decoration: none;
    font: 500 14px/1.2 system-ui, -apple-system, Segoe UI, Roboto, Arial;
    letter-spacing: .02em;
    white-space: nowrap;
    overflow: hidden;
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.10);
    transform: translateY(0);
    transition: transform .25s ease, background .25s ease, border-color .25s ease;
}

    /* Esconde o texto original (mas mantendo acessibilidade) */
    .sw-header__link > span {
        display: inline-block;
        transition: transform .35s cubic-bezier(.2,.9,.2,1), opacity .35s ease;
    }

    /* Segundo texto (clone) entra por baixo */
    .sw-header__link::after {
        content: attr(data-text);
        position: absolute;
        left: 14px;
        right: 14px;
        top: 50%;
        transform: translateY(18px);
        opacity: 0;
        transition: transform .35s cubic-bezier(.2,.9,.2,1), opacity .35s ease;
    }

    /* Hover: texto original sobe e some; clone entra */
    .sw-header__link:hover {
        transform: translateY(-2px);
        background: rgba(255,255,255,.12);
        border-color: rgba(255,255,255,.14);
    }

        .sw-header__link:hover > span {
            transform: translateY(-18px);
            opacity: 0;
        }

        .sw-header__link:hover::after {
            transform: translateY(-50%);
            opacity: 1;
        }

/* CTA diferente */
.sw-header__link--cta {
    background: rgba(0,212,255,.10);
    border-color: rgba(0,212,255,.35);
}

    .sw-header__link--cta:hover {
        background: rgba(0,212,255,.16);
        border-color: rgba(0,212,255,.65);
    }

/* Botão ... */
.sw-header__more {
    background: none;
    border: 0;
    color: rgba(255,255,255,.92);
    cursor: pointer;
    padding: 10px 12px;
}
.sw-header__more {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.10);
    display: grid;
    place-items: center;
    transition: transform .25s ease, background .25s ease, border-color .25s ease;
}

    .sw-header__more:hover {
        transform: translateY(-1px);
        background: rgba(255,255,255,.10);
        border-color: rgba(255,255,255,.14);
    }

.sw-header__hamb {
    width: 18px;
    height: 2px;
    background: rgba(255,255,255,.92);
    border-radius: 999px;
    position: relative;
    display: block;
}

    .sw-header__hamb::before,
    .sw-header__hamb::after {
        content: "";
        position: absolute;
        left: 0;
        width: 18px;
        height: 2px;
        background: rgba(255,255,255,.92);
        border-radius: 999px;
    }

    .sw-header__hamb::before {
        top: -6px;
    }

    .sw-header__hamb::after {
        top: 6px;
    }
.sw-header__dots {
    font: 700 18px/1 system-ui, -apple-system, Segoe UI, Roboto, Arial;
    letter-spacing: .10em;
}

/* Overlay mobile */
.sw-header__overlay {
    position: fixed;
    inset: 0;
    background: rgba(10,10,12,.92);
    backdrop-filter: blur(10px);
    display: grid;
    place-items: center;
    opacity: 0;
    pointer-events: none;
    transform: scale(.985);
    transition: opacity .25s ease, transform .25s ease;
}

.sw-header__overlay-nav {
    display: grid;
    gap: 22px;
    text-align: center;
}

.sw-header__overlay-link {
    color: rgba(255,255,255,.96);
    text-decoration: none;
    font: 650 22px/1.1 system-ui, -apple-system, Segoe UI, Roboto, Arial;
    letter-spacing: .02em;
}

.sw-header__overlay-link--cta {
    margin-top: 10px;
    padding: 12px 18px;
    border-radius: 999px;
    border: 1px solid rgba(0,212,255,.45);
    background: rgba(0,212,255,.12);
}

.sw-header.is-mobile-open .sw-header__overlay {
    opacity: 1;
    pointer-events: auto;
    transform: scale(1);
}
.sw-header__inner {
    position: relative;
    height: 160px;
    width: min(1240px, 92%);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr auto 1fr; /* 3 colunas = centro real */
    align-items: center;
    gap: 18px;
}

/* Seletor PT / EN (fora do grid, não desloca a engrenagem) */
.sw-header__lang {
    position: absolute;
    left: max(4px, env(safe-area-inset-left, 0px));
    top: 10px;
    z-index: 6;
    display: flex;
    align-items: center;
    gap: 2px;
    pointer-events: auto;
}

.sw-header__lang-btn {
    font: 600 11px/1 system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    letter-spacing: 0.06em;
    padding: 6px 9px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: rgba(0, 0, 0, 0.35);
    color: rgba(255, 255, 255, 0.65);
    cursor: pointer;
    transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.sw-header__lang-btn:hover {
    color: rgba(255, 255, 255, 0.95);
    border-color: rgba(0, 212, 255, 0.45);
}

.sw-header__lang-btn.is-active {
    color: #7fe8ff;
    border-color: rgba(0, 212, 255, 0.55);
    background: rgba(0, 212, 255, 0.12);
}

.sw-header__lang-sep {
    color: rgba(255, 255, 255, 0.35);
    font-size: 11px;
    user-select: none;
}

.sw-header__more {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: 0;
    color: rgba(255,255,255,.92);
    cursor: pointer;
    padding: 10px 12px;
}

.sw-header__nav--left {
    justify-content: flex-end;
}

.sw-header__nav--right {
    justify-content: flex-start;
}
/* Mobile: esconde nav lateral */
@media (max-width: 860px) {
    .sw-header__nav {
        display: none;
    }

    .sw-header__inner {
        width: 92%;
        grid-template-columns: 1fr; /* só uma coluna */
    }

    .sw-header__more {
        justify-self: end;
    }

/* Mobile: centraliza o logo */

    .sw-header__brand {
        width: 100%; /* ocupa toda a largura */
        height: auto; /* altura automática para manter a proporção */
        justify-content: center; /* centraliza o conteúdo */
        position: absolute;
        left: 50%;
        top: 40%;
        transform: translate(-50%, -50%);
        justify-self: unset;
    }

    .sw-header__logo {
        width: 90px; /* ajuste o tamanho conforme necessário */
        height: 90px; /* ajuste o tamanho conforme necessário */
    }

    .sw-header__ring {
        width: 120px; /* ajuste para manter proporção */
        height: 120px; /* ajuste para manter proporção */
    }
    .sw-header__more {
        display: block;
        right: 0;
    }
    
}
@media (min-width: 861px) {
    .sw-header__more {
        display: none;
    }
}