/* nexomac.com — Nexinho, o mascote do NeXo Control (desde a 0.11.0, 22/11/2026).
   O mesmo desenho do app (NexinhoView.swift): corpo branco, dois olhos, antena com a luz do estado,
   mãos e o selo laranja. Tudo em em: o tamanho vem do font-size (a altura do corpo é 1em).
   O humor vem de data-e: idle, thinking, working, waiting, done, happy, surprised, music, looking.
   Só movimento e forma; sem texto. Com "reduzir movimento", ele fica parado e só muda de cara. */
.nexinho { --azul: #3499ff; --laranja: #ff9f0a; --verde: #30d158; --rosa: #ff6fb5;
  position: relative; display: inline-block; flex: none; width: 1.75em; height: 1.42em; vertical-align: middle; pointer-events: none; }
.nexinho > * { position: absolute; display: block; }
.nexinho .nx-corpo { left: .225em; top: .42em; width: 1.3em; height: 1em; border-radius: .42em; overflow: hidden;
  background: linear-gradient(180deg, #fff 50%, #e8ebf0); box-shadow: 0 0 .3em rgba(255,255,255,.18);
  transform-origin: 50% 100%; transition: transform .25s cubic-bezier(.32,.72,0,1); }
.nexinho .nx-corpo::after { content: ""; position: absolute; inset: 0; opacity: 0; transition: opacity .4s;
  background: linear-gradient(180deg, transparent 45%, var(--tinta, transparent)); }
.nexinho .nx-olhos { position: absolute; left: 50%; top: 38%; display: flex; gap: .24em; transform: translate(-50%, -50%); transition: transform .25s cubic-bezier(.32,.72,0,1); }
.nexinho .nx-olho { width: .115em; height: .2em; border-radius: .06em; background: #121212; transform-origin: 50% 60%; transition: height .2s, width .2s; }
.nexinho.pisca .nx-olho { animation: nx-pisca .18s ease-in-out; }
.nexinho .nx-antena { left: 50%; top: .22em; width: .04em; height: .21em; margin-left: -.02em; background: rgba(255,255,255,.75); border-radius: .02em; }
.nexinho .nx-antena::before { content: ""; position: absolute; left: 50%; top: -.1em; width: .15em; height: .15em; margin-left: -.075em; border-radius: 50%;
  background: var(--luz, rgba(255,255,255,.55)); box-shadow: 0 0 .14em var(--luz, transparent); transition: background .3s; }
.nexinho .nx-mao { top: .92em; width: .17em; height: .17em; border-radius: 50%; background: #fff; transform: scale(0); transition: transform .3s cubic-bezier(.34,1.56,.64,1), top .3s; }
.nexinho .nx-mao.e { left: 0; } .nexinho .nx-mao.d { right: 0; }
.nexinho .nx-selo { left: .02em; top: .2em; width: .36em; height: .36em; border-radius: 50%; background: var(--laranja); transform: scale(0); transition: transform .35s cubic-bezier(.34,1.56,.64,1); }

/* Parado: respira devagar. */
.nexinho[data-e="idle"] .nx-corpo { animation: nx-respira 3.4s ease-in-out infinite; }
/* Pensando: olha de um lado ao outro; a antena pulsa em azul. */
.nexinho[data-e="thinking"] { --luz: var(--azul); --tinta: rgba(52,153,255,.45); }
.nexinho[data-e="thinking"] .nx-olhos { animation: nx-olha 2.2s ease-in-out infinite; }
.nexinho[data-e="thinking"] .nx-antena::before { animation: nx-pulsa .8s ease-in-out infinite alternate; }
/* Trabalhando: balança e digita. */
.nexinho[data-e="working"] { --luz: var(--azul); --tinta: rgba(52,153,255,.5); }
.nexinho[data-e="working"] .nx-corpo { animation: nx-balanca .7s ease-in-out infinite; }
.nexinho[data-e="working"] .nx-mao { transform: scale(1); }
.nexinho[data-e="working"] .nx-mao.e { animation: nx-digita .34s ease-in-out infinite alternate; }
.nexinho[data-e="working"] .nx-mao.d { animation: nx-digita .34s ease-in-out infinite alternate-reverse; }
.nexinho[data-e="working"] .nx-olhos { transform: translate(-50%, -38%); }
/* Precisa de você: selo laranja e pulinho. */
.nexinho[data-e="waiting"] { --luz: var(--laranja); --tinta: rgba(255,159,10,.55); animation: nx-pulinho 1.3s cubic-bezier(.32,.72,0,1) infinite; }
.nexinho[data-e="waiting"] .nx-selo { transform: scale(1); }
.nexinho[data-e="waiting"] .nx-olho, .nexinho[data-e="surprised"] .nx-olho { width: .14em; height: .25em; }
/* Surpreso: olhos arregalados e um susto. */
.nexinho[data-e="surprised"] { --luz: var(--laranja); --tinta: rgba(255,159,10,.5); animation: nx-susto .6s cubic-bezier(.34,1.56,.64,1) both; }
/* Pronto e feliz: olhos em arco e pulo; pronto levanta as mãos. */
.nexinho:is([data-e="done"], [data-e="happy"]) { --luz: var(--verde); --tinta: rgba(48,209,88,.42); animation: nx-comemora .7s cubic-bezier(.34,1.56,.64,1) both; }
.nexinho[data-e="done"] .nx-mao { transform: scale(1); top: .5em; }
/* Música: olhos fechados, balançando; a luz fica rosa. */
.nexinho[data-e="music"] { --luz: var(--rosa); }
.nexinho[data-e="music"] .nx-corpo { animation: nx-danca .9s ease-in-out infinite alternate; }
.nexinho[data-e="music"] .nx-mao { transform: scale(1); }
.nexinho[data-e="music"] .nx-mao.e { animation: nx-digita .45s ease-in-out infinite alternate; }
.nexinho[data-e="music"] .nx-mao.d { animation: nx-digita .45s ease-in-out infinite alternate-reverse; }
/* Olhando: para a barra, à direita. */
.nexinho[data-e="looking"] { --luz: var(--azul); --tinta: rgba(52,153,255,.4); }
.nexinho[data-e="looking"] .nx-olhos { transform: translate(-42%, -58%); }

/* Dormindo (estados vazios) e acenando (boas-vindas): desde 23/11/2026, como no NeXoKit (nexo-kit#52). */
.nexinho[data-e="sleeping"] { --luz: rgba(255,255,255,.3); }
.nexinho[data-e="sleeping"] .nx-corpo { animation: nx-respira 4.6s ease-in-out infinite; }
.nexinho[data-e="sleeping"] .nx-olho { width: .16em; height: .045em; border-radius: .02em; }
.nexinho[data-e="waving"] { --luz: var(--verde); --tinta: rgba(48,209,88,.42); }
.nexinho[data-e="waving"] .nx-mao.d { transform: scale(1); top: .5em; animation: nx-acena .64s ease-in-out infinite alternate; }
/* A coleção da família: brilho com três irmãos ou mais, chapéu com a família de Mac inteira. */
.nexinho .nx-brilho { left: -.25em; top: .15em; width: 2.25em; height: 1.6em; border-radius: 50%; z-index: -1;
  background: radial-gradient(closest-side, rgba(48,209,88,.45), transparent); }
.nexinho:not(.brilha) .nx-brilho { display: none; }
.nexinho .nx-chapeu { left: 50%; top: .02em; width: .5em; height: .5em; margin-left: -.21em; transform: rotate(14deg); transform-origin: 50% 100%;
  background: linear-gradient(180deg, #1FB573, #2E9FD8 60%, #1F5FBF); clip-path: polygon(50% 0, 100% 100%, 0 100%); }
.nexinho .nx-chapeu::after { content: ""; position: absolute; left: 50%; top: 0; width: .12em; height: .12em; margin-left: -.06em; border-radius: 50%; background: #FFD60A; }
.nexinho:not(.chapeu) .nx-chapeu { display: none; }
.nexinho.chapeu .nx-antena { display: none; }

.nexinho:is([data-e="thinking"], [data-e="working"], [data-e="waiting"], [data-e="surprised"], [data-e="done"], [data-e="happy"], [data-e="looking"], [data-e="waving"]) .nx-corpo::after { opacity: 1; }
.nexinho:is([data-e="done"], [data-e="happy"], [data-e="music"]) .nx-olho { width: .17em; height: .085em; background: none; border: .065em solid #121212; border-bottom: 0; border-radius: .12em .12em 0 0; }

@keyframes nx-pisca { 50% { transform: scaleY(.12); } }
@keyframes nx-respira { 50% { transform: scale(1.02, .97); } }
@keyframes nx-olha { 0%, 100% { transform: translate(-58%, -62%); } 45%, 55% { transform: translate(-42%, -62%); } }
@keyframes nx-pulsa { from { transform: scale(.8); opacity: .6; } to { transform: scale(1.3); opacity: 1; } }
@keyframes nx-balanca { 0%, 100% { transform: rotate(-3deg); } 50% { transform: rotate(3deg) translateY(-.03em); } }
@keyframes nx-digita { from { translate: 0 .04em; } to { translate: 0 -.07em; } }
@keyframes nx-pulinho { 0%, 60%, 100% { transform: translateY(0); } 20% { transform: translateY(-.14em); } 35% { transform: translateY(0) scale(1.06, .94); } }
@keyframes nx-susto { 0% { transform: none; } 30% { transform: translateY(-.16em) scale(1.08); } 100% { transform: none; } }
@keyframes nx-comemora { 0% { transform: none; } 30% { transform: translateY(.04em) scale(1.1, .88); } 60% { transform: translateY(-.2em) scale(.94, 1.06); } 100% { transform: none; } }
@keyframes nx-acena { from { translate: -.04em 0; } to { translate: .08em 0; } }
@keyframes nx-danca { from { transform: rotate(-7deg); } to { transform: rotate(7deg); } }

/* O voo da chegada: cópias atrasadas formam o rastro. */
.nexinho.nx-voo, .nexinho.nx-rastro { position: absolute; left: 0; top: 0; z-index: 20; margin: 0; }
.nexinho.nx-rastro { opacity: .3; filter: blur(1px); }
/* O voo e o rastro andam pelo script: a animação própria do humor (o pulo) tomaria o lugar da posição. */
.nexinho.nx-voo, .nexinho.nx-rastro { animation: none !important; }

@media (prefers-reduced-motion: reduce) {
  .nexinho, .nexinho * { animation: none !important; transition: none !important; }
}
