/* Robô guia: acompanha o visitante pela página */
#guia { position: fixed; inset: 0; z-index: 70; pointer-events: none; }
#guia[hidden] { display: none; }

.guia-slot { display: block; pointer-events: none; }
.guia-slot-inicio { position: absolute; right: 0; bottom: -214px; width: 150px; height: 188px; }
.guia-slot-cadastro { width: 168px; height: 210px; margin-top: 28px; }
.hero .vis { position: relative; }

.guia-robo { position: absolute; left: 0; top: 0; width: 160px; height: 200px; padding: 0; border: 0; background: none; cursor: pointer; pointer-events: auto; transform-origin: 0 0; -webkit-tap-highlight-color: transparent; will-change: transform; touch-action: manipulation; }
.guia-robo.viaja { transition: transform .85s cubic-bezier(.25, .9, .3, 1.08); }
.guia-robo:focus-visible { outline: 3px solid #FF9A72; outline-offset: 2px; border-radius: 18px; }
.guia-svg { display: block; width: 100%; height: 100%; overflow: visible; filter: drop-shadow(0 16px 20px rgb(0 0 0 / .55)); animation: guia-flutua 5s ease-in-out infinite; }
.guia-robo.pula .guia-svg { animation: guia-pula .55s cubic-bezier(.3, .8, .4, 1); }
@keyframes guia-flutua { 50% { transform: translateY(-8px); } }
@keyframes guia-pula { 0% { transform: translateY(0) scale(1, 1); } 18% { transform: translateY(0) scale(1.08, .9); } 48% { transform: translateY(-26px) scale(.96, 1.06); } 78% { transform: translateY(0) scale(1.06, .94); } 100% { transform: translateY(0) scale(1, 1); } }

/* Partes do robô */
.guia-svg .olho { transform-box: fill-box; transform-origin: center; animation: guia-pisca 6s infinite; }
@keyframes guia-pisca { 0%, 94%, 100% { transform: scaleY(1); } 97% { transform: scaleY(.12); } }
.guia-svg .brilho { transform-box: fill-box; transform-origin: center; animation: guia-pulsa 2.4s ease-in-out infinite; }
@keyframes guia-pulsa { 50% { opacity: .08; transform: scale(1.25); } }
.guia-svg .olhos { transition: transform .12s ease-out; }
.guia-svg .cabeca { transition: transform .2s ease-out; }
.guia-svg .olhos-i { transform-box: fill-box; transform-origin: center; transition: transform .2s; }
.guia-svg .braco-d { transform-origin: 0 0; transition: transform .35s ease; }
.guia-svg .luz-flash { transform-box: fill-box; transform-origin: center; }
.guia-robo.acena .braco-d { animation: guia-aceno .62s ease-in-out infinite alternate; }
@keyframes guia-aceno { from { transform: rotate(-92deg); } to { transform: rotate(-130deg); } }
.guia-robo.flash .luz-flash { animation: guia-flash .6s ease-out; }
@keyframes guia-flash { 0% { opacity: .9; transform: scale(.6); } 100% { opacity: 0; transform: scale(2.6); } }
.guia-svg .luz-flash { opacity: 0; }

/* Expressões: só uma boca e um par de olhos visíveis por vez */
.guia-svg .boca, .guia-svg .olhos-festa, .guia-svg .olhos-sono, .guia-svg .zzz { display: none; }
.guia-svg[data-expr="feliz"] .boca-feliz,
.guia-svg[data-expr="festa"] .boca-aberta,
.guia-svg[data-expr="surpreso"] .boca-o,
.guia-svg[data-expr="pensando"] .boca-reta,
.guia-svg[data-expr="preocupado"] .boca-triste,
.guia-svg[data-expr="sono"] .boca-reta { display: inline; }
.guia-svg[data-expr="festa"] .olhos-festa,
.guia-svg[data-expr="sono"] .olhos-sono,
.guia-svg[data-expr="sono"] .zzz { display: inline; }
.guia-svg[data-expr="festa"] .olhos,
.guia-svg[data-expr="sono"] .olhos { display: none; }
.guia-svg[data-expr="surpreso"] .olhos-i { transform: scale(1.14, 1.2); }
.guia-svg .zzz { font: 700 20px "Space Grotesk", sans-serif; fill: #FFB892; animation: guia-z 2.2s ease-in-out infinite; }
@keyframes guia-z { 50% { transform: translate(4px, -6px); opacity: .5; } }

/* Balão de fala */
.guia-balao { position: absolute; left: 0; top: 0; width: min(300px, calc(100vw - 24px)); padding: 14px 16px 14px; border-radius: 16px; background: #FBF7F2; color: #1A0A04; font: 400 15px/1.45 "Inter", system-ui, sans-serif; box-shadow: 0 18px 44px -12px rgb(0 0 0 / .7), 0 0 0 1px rgb(255 107 61 / .25); pointer-events: auto; opacity: 0; transform: translateY(8px) scale(.96); transform-origin: var(--ox, 100%) 100%; transition: opacity .2s, transform .25s cubic-bezier(.2, .9, .3, 1.2); }
.guia-balao[hidden] { display: none; }
.guia-balao.on { opacity: 1; transform: none; }
.guia-balao::after { content: ""; position: absolute; width: 14px; height: 14px; background: #FBF7F2; transform: rotate(45deg); border-radius: 3px; }
.guia-balao[data-cauda="dir"]::after { right: -6px; top: calc(var(--cy, 40px) - 7px); }
.guia-balao[data-cauda="esq"]::after { left: -6px; top: calc(var(--cy, 40px) - 7px); }
.guia-balao[data-cauda="baixo"]::after { right: 38px; bottom: -6px; }
.guia-nome { display: block; font: 700 12px "Space Grotesk", sans-serif; letter-spacing: .02em; color: #C2410C; margin: 0 0 3px; }
.guia-txt { margin: 0; padding-right: 20px; }
.guia-x { position: absolute; top: 6px; right: 6px; width: 28px; height: 28px; border: 0; border-radius: 8px; background: transparent; color: #7A5A48; font: 400 20px/1 "Inter", sans-serif; cursor: pointer; }
.guia-x:hover { background: #F0E4DA; color: #1A0A04; }
.guia-pontos { display: inline-flex; align-items: center; gap: 5px; height: 22px; }
.guia-pontos i { width: 8px; height: 8px; border-radius: 50%; background: #C2410C; opacity: .35; animation: guia-ponto 1s ease-in-out infinite; }
.guia-pontos i:nth-child(2) { animation-delay: .15s; } .guia-pontos i:nth-child(3) { animation-delay: .3s; }
@keyframes guia-ponto { 0%, 60%, 100% { transform: translateY(0); opacity: .35; } 30% { transform: translateY(-5px); opacity: 1; } }
.guia-acoes { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.guia-acoes:empty { display: none; }
.guia-acoes button, .guia-acoes a { font: 600 13px "Inter", sans-serif; color: #8A2A0A; background: #FFE6D9; border: 1px solid #FFC2A3; border-radius: 999px; padding: 6px 12px; min-height: 34px; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; }
.guia-acoes button:hover, .guia-acoes a:hover { background: #FFD3BD; }
.guia-balao .guia-busca { display: flex; gap: 6px; margin: 10px 0 0; padding: 0; background: none; border: 0; border-radius: 0; box-shadow: none; }
.guia-balao .guia-busca[hidden] { display: none; }
.guia-busca input { flex: 1; min-width: 0; font: 400 14px "Inter", sans-serif; color: #1A0A04; background: #fff; border: 1.5px solid #E5D7CB; border-radius: 10px; padding: 8px 10px; min-height: 38px; }
.guia-busca input:focus { outline: none; border-color: #E2501E; box-shadow: 0 0 0 3px rgb(226 80 30 / .2); }
.guia-busca button { font: 600 13px "Inter", sans-serif; color: #fff; background: linear-gradient(180deg, #E2501E, #B8340A); border: 0; border-radius: 10px; padding: 0 14px; min-height: 38px; cursor: pointer; }

/* Card encontrado pelo robô */
.card.guia-destaque { outline: 2px solid #FF6B3D; outline-offset: 3px; animation: guia-destaque 1.2s ease-in-out 2; }
@keyframes guia-destaque { 50% { box-shadow: 0 0 0 10px rgb(255 107 61 / .22); } }

@media (max-width: 960px) {
  .guia-slot-inicio { right: 4px; bottom: -150px; width: 100px; height: 125px; }
  .guia-slot-cadastro { width: 130px; height: 162px; }
  .hero { padding-bottom: 150px; }
}
@media (prefers-reduced-motion: reduce) {
  .guia-svg, .guia-svg .olho, .guia-svg .brilho, .guia-svg .zzz, .guia-robo.acena .braco-d, .guia-robo.pula .guia-svg, .card.guia-destaque, .guia-pontos i { animation: none; opacity: .7; }
  .guia-robo.viaja, .guia-balao { transition: none; }
}

/* Capa de super-herói e modo de voo */
.guia-svg .capa { transform-origin: 0 0; animation: guia-capa 3.4s ease-in-out infinite; transition: scale .25s ease-out; }
@keyframes guia-capa { 0%, 100% { transform: rotate(-1.6deg) skewX(-1deg); } 50% { transform: rotate(1.6deg) skewX(1deg); } }
.guia-svg .vento { opacity: 0; transition: opacity .2s; }
.guia-svg .braco-d, .guia-svg .capa { will-change: transform; }

.guia-svg { transition: rotate .28s cubic-bezier(.3, .8, .4, 1), translate .28s; }
.guia-svg .braco-voo { opacity: 0; }
.guia-svg .braco-e { transform-origin: 0 0; transition: transform .25s; }
/* Pose do Super-Homem: corpo deitado na direção do voo, punho à frente, capa esticada para trás */
.guia-robo.voando .guia-svg { animation: guia-voa .22s ease-in-out infinite alternate; translate: 0 0; rotate: var(--rot, 70deg); }
@keyframes guia-voa { from { transform: translate(-1px, -1.5px); } to { transform: translate(1px, 1.5px); } }
.guia-robo.voando .braco-d { opacity: 0; animation: none; }
.guia-robo.voando .braco-voo { opacity: 1; }
.guia-robo.voando .braco-e { transform: rotate(-30deg); }
.guia-robo.voando .capa { animation: guia-capa-voa .14s ease-in-out infinite alternate; scale: .95 1.55; }
@keyframes guia-capa-voa { from { transform: skewX(-6deg); } to { transform: skewX(6deg); } }
.guia-robo.voando .vento { opacity: .8; }
.guia-robo.voando .vento path { animation: guia-vento .38s linear infinite; }
@keyframes guia-vento { from { transform: translateY(-46px); opacity: 0; } 30% { opacity: 1; } to { transform: translateY(54px); opacity: 0; } }
.guia-robo.decola .guia-svg { animation: guia-decola .42s cubic-bezier(.3, .8, .4, 1); }
@keyframes guia-decola { 0% { transform: scale(1, 1); } 30% { transform: scale(1.1, .86) translateY(4px); } 100% { transform: scale(1, 1); } }
.guia-robo.pousa .guia-svg { animation: guia-pousa .5s cubic-bezier(.3, .8, .4, 1); }
@keyframes guia-pousa { 0% { transform: scale(1, 1); } 35% { transform: scale(1.1, .88) translateY(5px); } 70% { transform: scale(.97, 1.04); } 100% { transform: scale(1, 1); } }
@media (prefers-reduced-motion: reduce) {
  .guia-svg .capa, .guia-robo.voando .guia-svg, .guia-robo.voando .capa, .guia-robo.voando .vento path, .guia-robo.decola .guia-svg, .guia-robo.pousa .guia-svg { animation: none; }
}

/* Durante o voo o balão fica quase transparente para não cobrir a capa */
.guia-balao.em-voo { opacity: .12 !important; pointer-events: none; transition: opacity .15s; }

/* celular: botão de fechar o balão da Zeta com área de toque maior */
@media (max-width: 680px) { .guia-x { width: 40px; height: 40px; font-size: 24px; } }
