.auth-brand.ns-brand {
    --ns-red: #680000;
    --ns-red-deep: #520000;
    --ns-white: #ffffff;
    --ns-line: rgba(255, 255, 255, .16);
    --ns-soft: rgba(255, 255, 255, .72);
    --ns-ease: cubic-bezier(.2, .8, .2, 1);

    position: relative;
    overflow: hidden;
    isolation: isolate;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: clamp(18px, 3vh, 30px);
    padding: clamp(28px, 5vh, 56px) clamp(24px, 4vw, 48px);
    background:
        radial-gradient(90% 70% at 50% 36%, rgba(255, 255, 255, .07) 0%, transparent 70%),
        linear-gradient(160deg, #8a1414 0%, #760606 45%, var(--ns-red) 100%);
    color: var(--ns-white);
    font-family: 'Inter', system-ui, sans-serif;
}

/* ---------- Fundo ---------- */
.ns-bg-grid {
    position: absolute;
    inset: 0;
    z-index: -2;
    background-image:
        linear-gradient(rgba(255, 255, 255, .025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .025) 1px, transparent 1px);
    background-size: 64px 64px;
    -webkit-mask-image: radial-gradient(circle at 50% 40%, #000 0%, transparent 55%);
    mask-image: radial-gradient(circle at 50% 40%, #000 0%, transparent 55%);
    animation: nsGridDrift 40s linear infinite;
}

.ns-bg-glow {
    position: absolute;
    width: 70%;
    aspect-ratio: 1;
    top: 8%;
    left: 50%;
    z-index: -1;
    transform: translateX(-50%);
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, .06) 0%, transparent 60%);
    animation: nsBreath 6s ease-in-out infinite;
}

/* ---------- Palco ---------- */
.ns-stage {
    position: relative;
    width: min(520px, 100%, 55vh);
    aspect-ratio: 1 / 1;
    flex-shrink: 0;
}

.ns-radar {
    position: absolute;
    inset: 14%;
    border-radius: 50%;
    background: conic-gradient(from 0deg, rgba(255, 255, 255, .08), rgba(255, 255, 255, 0) 18%, transparent 100%);
    -webkit-mask-image: radial-gradient(circle, transparent 18%, #000 19%, #000 70%, transparent 71%);
    mask-image: radial-gradient(circle, transparent 18%, #000 19%, #000 70%, transparent 71%);
    opacity: 0;
    animation: nsFadeIn 1.2s .6s forwards, nsSpin 10s linear infinite;
}

.ns-svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: visible;
}

.ns-ring {
    fill: none;
    stroke: rgba(255, 255, 255, .06);
    stroke-width: 1;
}

.ns-ring--outer {
    stroke-dasharray: 2 8;
    transform-origin: 210px 210px;
    animation: nsSpin 90s linear infinite;
}

.ns-hex-base {
    fill: rgba(255, 255, 255, .02);
    stroke: rgba(255, 255, 255, .22);
    stroke-width: 1.2;
    stroke-linejoin: round;
    stroke-dasharray: 900;
    stroke-dashoffset: 900;
    animation: nsDraw 1.6s .2s var(--ns-ease) forwards;
    transition: stroke .6s ease, fill .6s ease;
}

.ns-hex-flow {
    fill: none;
    stroke: rgba(255, 255, 255, .38);
    stroke-width: 1.2;
    stroke-dasharray: 3 14;
    opacity: 0;
    animation: nsFadeIn .8s 1.6s forwards, nsDash 6s linear infinite;
}

.ns-cycle-dot {
    fill: var(--ns-white);
    stroke: rgba(255, 255, 255, .25);
    stroke-width: 6;
    opacity: 0;
    animation: nsFadeIn .6s 1.8s forwards;
}

.ns-spoke-line {
    fill: none;
    stroke: var(--ns-white);
    stroke-width: 1;
    stroke-linecap: round;
    stroke-opacity: .16;
    stroke-dasharray: 150;
    stroke-dashoffset: 150;
    animation: nsDraw .9s var(--ns-ease) forwards;
    animation-delay: calc(.7s + var(--i) * .1s);
    transition: stroke-opacity .5s ease, stroke-width .5s ease;
}

.ns-spoke--1 { --i: 0; }
.ns-spoke--2 { --i: 1; }
.ns-spoke--3 { --i: 2; }
.ns-spoke--4 { --i: 3; }
.ns-spoke--5 { --i: 4; }
.ns-spoke--6 { --i: 5; }

.ns-particle {
    fill: rgba(255, 255, 255, .45);
    stroke: rgba(255, 255, 255, 0);
    stroke-width: 5;
    transition: fill .4s ease, stroke .4s ease;
}

.ns-spoke.is-active .ns-spoke-line {
    stroke-opacity: .85;
    stroke-width: 1.6;
}

.ns-spoke.is-active .ns-particle {
    fill: var(--ns-white);
    stroke: rgba(255, 255, 255, .22);
}

/* ---------- Hub central ---------- */
.ns-hub {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 25%;
    aspect-ratio: 1;
    transform: translate(-50%, -50%) scale(.6);
    opacity: 0;
    animation: nsHubIn 1s .3s var(--ns-ease) forwards;
}

.ns-hub-core {
    position: absolute;
    inset: 12%;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--ns-white);
    z-index: 3;
    transition: transform .6s var(--ns-ease);
}

.ns-hub-core img {
    width: 60%;
    height: auto;
    animation: nsFloat 5s ease-in-out infinite;
}

.ns-hub-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: conic-gradient(from 0deg, transparent 0 55%, rgba(255, 255, 255, .9) 85%, transparent 100%);
    -webkit-mask-image: radial-gradient(circle, transparent 64%, #000 65%, #000 70%, transparent 71%);
    mask-image: radial-gradient(circle, transparent 64%, #000 65%, #000 70%, transparent 71%);
    animation: nsSpin 3.2s linear infinite;
    z-index: 2;
}

.ns-hub-pulse,
.ns-hub-wave {
    position: absolute;
    inset: 12%;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, .45);
    z-index: 1;
}

.ns-hub-pulse {
    animation: nsPulse 3.2s ease-out infinite;
}

.ns-hub-pulse--late {
    animation-delay: 1.6s;
}

.ns-hub-wave {
    opacity: 0;
    border-width: 2px;
    border-color: rgba(255, 255, 255, .8);
}

.ns-hub.is-ping .ns-hub-wave {
    animation: nsWave .9s var(--ns-ease);
}

.ns-hub.is-ping .ns-hub-core {
    animation: nsReceive .6s var(--ns-ease);
}

/* ---------- Nós (módulos) ---------- */
.ns-node {
    position: absolute;
    transform: translate(-50%, -50%);
    z-index: 4;
}

.ns-node--1 { left: 50%;     top: 14.29%; --i: 0; }
.ns-node--2 { left: 80.93%;  top: 32.14%; --i: 1; }
.ns-node--3 { left: 80.93%;  top: 67.86%; --i: 2; }
.ns-node--4 { left: 50%;     top: 85.71%; --i: 3; }
.ns-node--5 { left: 19.07%;  top: 67.86%; --i: 4; }
.ns-node--6 { left: 19.07%;  top: 32.14%; --i: 5; }

.ns-node-inner {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    opacity: 0;
    transform: scale(.4);
    animation: nsNodeIn .7s var(--ns-ease) forwards;
    animation-delay: calc(.9s + var(--i) * .12s);
}

.ns-node-icon {
    position: relative;
    display: grid;
    place-items: center;
    width: clamp(42px, 5.2vh, 56px);
    aspect-ratio: 1;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, .26);
    background: rgba(255, 255, 255, .08);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    color: var(--ns-white);
    font-size: clamp(15px, 1.9vh, 19px);
    transition: background .45s ease, color .45s ease, border-color .45s ease, transform .55s var(--ns-ease);
}

.ns-node-icon::after {
    content: '';
    position: absolute;
    inset: -7px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, .55);
    opacity: 0;
    transform: scale(.8);
    transition: opacity .4s ease, transform .4s ease;
}

.ns-node-label {
    position: absolute;
    top: calc(100% + 9px);
    left: 50%;
    transform: translateX(-50%);
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: .1em;
    text-transform: uppercase;
    white-space: nowrap;
    color: rgba(255, 255, 255, .55);
    transition: color .4s ease;
}

.ns-node-check {
    position: absolute;
    top: -3px;
    right: -3px;
    display: grid;
    place-items: center;
    width: 17px;
    height: 17px;
    border-radius: 50%;
    background: var(--ns-white);
    color: var(--ns-red);
    font-size: 8px;
    opacity: 0;
    transform: scale(0);
    transition: opacity .35s ease, transform .45s var(--ns-ease);
}

.ns-node.is-done .ns-node-icon {
    border-color: rgba(255, 255, 255, .55);
}

.ns-node.is-done .ns-node-check {
    opacity: 1;
    transform: scale(1);
}

.ns-node.is-done .ns-node-label {
    color: rgba(255, 255, 255, .78);
}

.ns-node.is-active .ns-node-icon {
    background: var(--ns-white);
    color: var(--ns-red);
    border-color: var(--ns-white);
    transform: scale(1.16);
}

.ns-node.is-active .ns-node-icon::after {
    opacity: 1;
    transform: scale(1);
    animation: nsHalo 1.8s ease-out infinite;
}

.ns-node.is-active .ns-node-label {
    color: var(--ns-white);
}

/* ---------- Estado final: ambiente único ---------- */
.ns-stage.is-unified .ns-hex-base {
    stroke: rgba(255, 255, 255, .75);
    fill: rgba(255, 255, 255, .05);
}

.ns-stage.is-unified .ns-spoke-line {
    stroke-opacity: .6;
}

.ns-stage.is-unified .ns-particle {
    fill: var(--ns-white);
}

.ns-stage.is-unified .ns-node-icon {
    background: var(--ns-white);
    color: var(--ns-red);
    border-color: var(--ns-white);
}

.ns-stage.is-unified .ns-node-check {
    opacity: 0;
    transform: scale(0);
}

.ns-stage.is-unified .ns-node-label {
    color: var(--ns-white);
}

.ns-stage.is-unified .ns-node-icon {
    animation: nsUnify 1s var(--ns-ease) both;
    animation-delay: calc(var(--i) * .08s);
}

.ns-stage.is-unified .ns-hub-core {
    transform: scale(1.08);
}

/* ---------- Legenda ---------- */
.ns-caption {
    width: min(420px, 100%);
    text-align: center;
    opacity: 0;
    animation: nsRise .8s 1.5s var(--ns-ease) forwards;
}

.ns-swap {
    transition: opacity .3s ease, transform .3s ease, filter .3s ease;
}

.ns-caption.is-swapping .ns-swap {
    opacity: 0;
    transform: translateY(8px);
    filter: blur(2px);
}

.ns-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--ns-soft);
}

.ns-step {
    font-variant-numeric: tabular-nums;
    color: var(--ns-white);
}

.ns-sep {
    width: 18px;
    height: 1px;
    background: rgba(255, 255, 255, .45);
}

.ns-title {
    margin: 0 0 6px;
    font-size: clamp(19px, 2.6vh, 25px);
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -.01em;
    color: var(--ns-white);
    min-height: 1.25em;
}

.ns-desc {
    margin: 0 auto;
    max-width: 340px;
    font-size: 14px;
    line-height: 1.5;
    color: var(--ns-soft);
    min-height: 3em;
}

.ns-progress {
    display: flex;
    gap: 6px;
    margin: 18px auto 0;
    max-width: 300px;
}

.ns-seg {
    position: relative;
    flex: 1;
    height: 3px;
    border-radius: 3px;
    overflow: hidden;
    background: rgba(255, 255, 255, .18);
}

.ns-seg--final {
    flex: 1.6;
}

.ns-seg-fill {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: var(--ns-white);
    transform: scaleX(0);
    transform-origin: left center;
}

.ns-seg.is-done .ns-seg-fill {
    transform: scaleX(1);
}

.ns-seg.is-running .ns-seg-fill {
    animation: nsFill var(--ns-dur, 3400ms) linear forwards;
}

/* ---------- Wordmark ---------- */
.ns-wordmark {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    opacity: 0;
    animation: nsRise .8s 1.8s var(--ns-ease) forwards;
}

.ns-wordmark-name {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .42em;
    padding-left: .42em;
    color: var(--ns-white);
}

.ns-wordmark-tag {
    font-size: 11px;
    letter-spacing: .04em;
    color: rgba(255, 255, 255, .55);
}

/* ---------- Pausa (aba oculta) ---------- */
.ns-brand.is-paused *,
.ns-brand.is-paused *::before,
.ns-brand.is-paused *::after {
    animation-play-state: paused !important;
}

/* ---------- Telas baixas ---------- */
@media (max-height: 720px) {
    .ns-desc { display: none; }
    .ns-progress { margin-top: 12px; }
    .ns-wordmark-tag { display: none; }
}

/* ---------- Acessibilidade: movimento reduzido ---------- */
@media (prefers-reduced-motion: reduce) {
    .ns-brand *,
    .ns-brand *::before,
    .ns-brand *::after {
        animation: none !important;
        transition: none !important;
    }

    .ns-hub { opacity: 1; transform: translate(-50%, -50%); }
    .ns-node-inner,
    .ns-caption,
    .ns-wordmark,
    .ns-hex-flow,
    .ns-cycle-dot { opacity: 1; transform: none; }
    .ns-hex-base,
    .ns-spoke-line { stroke-dashoffset: 0; }
    .ns-radar { opacity: .35; }
}

/* ---------- Keyframes ---------- */
@keyframes nsFadeIn   { to { opacity: 1; } }
@keyframes nsSpin     { to { transform: rotate(360deg); } }
@keyframes nsDraw     { to { stroke-dashoffset: 0; } }
@keyframes nsDash     { to { stroke-dashoffset: -170; } }
@keyframes nsFill     { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes nsGridDrift { to { background-position: 64px 64px; } }

@keyframes nsBreath {
    0%, 100% { opacity: .7; transform: translateX(-50%) scale(1); }
    50%      { opacity: 1;  transform: translateX(-50%) scale(1.08); }
}

@keyframes nsHubIn {
    to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

@keyframes nsNodeIn {
    to { opacity: 1; transform: scale(1); }
}

@keyframes nsRise {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes nsFloat {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-3px); }
}

@keyframes nsPulse {
    0%   { transform: scale(1);   opacity: .7; }
    100% { transform: scale(2.3); opacity: 0; }
}

@keyframes nsWave {
    0%   { transform: scale(1);   opacity: 1; }
    100% { transform: scale(1.9); opacity: 0; }
}

@keyframes nsReceive {
    0%   { transform: scale(1); }
    40%  { transform: scale(1.1); }
    100% { transform: scale(1); }
}

@keyframes nsHalo {
    0%   { transform: scale(1);    opacity: .9; }
    100% { transform: scale(1.45); opacity: 0; }
}

@keyframes nsUnify {
    0%   { transform: scale(1); }
    45%  { transform: scale(1.18); }
    100% { transform: scale(1); }
}
