/* SIMIA — hero com mascote interativo e ajudante de navegação */
:root{--say:#d7f98b;--say-text:#1c1824}html[data-theme=light]{--say:#221d2b;--say-text:#f6f5f2}
.live-hero{--orb:#2a2140;--orb-rim:#b997ff33;--ground:#05030b;--card:color-mix(in srgb,var(--surface) 94%,transparent);position:relative;isolation:isolate;overflow:hidden;border-bottom:1px solid var(--line)}
html[data-theme=light] .live-hero{--orb:#e6fbb4;--orb-rim:#b5dd5c66;--ground:#3a2a5c}
.live-hero:before{content:'';position:absolute;right:-15%;top:-25%;width:75%;height:130%;background:radial-gradient(closest-side,color-mix(in srgb,var(--purple) 26%,transparent),transparent);z-index:-2;pointer-events:none}
.live-sky{position:absolute;inset:0;z-index:-1;pointer-events:none}
.live-sky i{position:absolute;width:3px;height:3px;border-radius:50%;background:#e8dcff;opacity:.55;animation:sky 4s ease-in-out infinite}
.live-sky i:nth-child(1){left:56%;top:14%}.live-sky i:nth-child(2){left:91%;top:22%;animation-delay:-1s}.live-sky i:nth-child(3){left:71%;top:8%;animation-delay:-2s}.live-sky i:nth-child(4){left:96%;top:63%;animation-delay:-3s}.live-sky i:nth-child(5){left:50%;top:78%;animation-delay:-1.5s}.live-sky i:nth-child(6){left:83%;top:88%;animation-delay:-2.5s}
html[data-theme=light] .live-sky{display:none}
@keyframes sky{50%{opacity:.12}}
.live-grid{display:grid;grid-template-columns:1fr 1.02fr;align-items:center;gap:20px;min-height:min(800px,calc(100svh - 72px));padding-block:34px}
.live-copy{position:relative;z-index:3}
.live-copy h1{font-size:clamp(50px,6.4vw,100px);line-height:.98;letter-spacing:-.052em;margin-bottom:28px}
.live-copy h1 .line{display:block}
.live-copy h1 .serif{color:var(--purple);letter-spacing:-.04em;padding-bottom:.06em}
.live-stage{position:relative;height:640px;--px:0;--py:0}
.live-orb{position:absolute;left:50%;top:45%;width:min(440px,92%);aspect-ratio:1;border-radius:50%;translate:-50% -50%;background:radial-gradient(circle at 36% 30%,color-mix(in srgb,var(--orb) 80%,#fff),var(--orb) 62%);box-shadow:0 0 0 1px var(--orb-rim),0 0 0 34px color-mix(in srgb,var(--orb-rim) 35%,transparent),0 0 140px color-mix(in srgb,var(--purple) 40%,transparent);transform:translate(calc(var(--px)*-10px),calc(var(--py)*-10px));transition:background .6s,box-shadow .6s}
.live-ground{position:absolute;left:50%;bottom:36px;width:300px;height:38px;translate:-50% 0;border-radius:50%;background:radial-gradient(closest-side,color-mix(in srgb,var(--ground) 55%,transparent),transparent);transition:scale .3s}
.mascot{position:absolute;left:50%;bottom:52px;height:490px;aspect-ratio:453/687;translate:-50% 0;padding:0;border:0;background:none;cursor:pointer;z-index:2;border-radius:40px;-webkit-tap-highlight-color:transparent}
.mascot:focus-visible{outline:2px solid var(--accent);outline-offset:8px}
/* Cada parte é uma camada própria: só transformações animadas, sem repintar o desenho */
.m-jump,.m-puppet{position:absolute;inset:0;display:block;transform-origin:50% 100%;will-change:transform}
.m-defs{position:absolute;width:0;height:0}
.m-part,.m-head{position:absolute;display:block;overflow:visible;will-change:transform}
.m-part{filter:drop-shadow(0 6px 0 #5d32b5)}
.m-head svg{position:absolute;inset:0;width:100%;height:100%;overflow:visible}
.m-skull{filter:drop-shadow(0 6px 0 #5d32b5)}
.m-head{transform-origin:49.7% 96%}
.m-tail{transform-origin:6% 87.5%;animation:m-tail 2.8s ease-in-out infinite}
/* Giro do braço por dentro do tronco: a raiz fica sempre escondida atrás do corpo */
.m-arm-l{transform-origin:84.2% 12.3%}.m-arm-r{transform-origin:16.4% 12.3%}
.m-face{fill:#f2edfa}.m-shine{fill:#fff}.m-pupils circle:not(.m-shine){fill:#8a4ff0}
.m-eyes *,.m-skull *{transform-box:view-box}
.m-lid{fill:#a571fb;transform:translateY(-122px);transition:transform 90ms ease-in}
.is-blink .m-lid{transform:none}
.m-mouth{transform-origin:195px 186px;transition:transform .3s cubic-bezier(.3,1.6,.5,1)}
.m-glasses{transform:translateY(-300px);opacity:0;transition:transform .7s cubic-bezier(.3,1.35,.5,1),opacity .25s}
.m-glasses path{fill:#18141f}.m-glasses .m-bridge{fill:none;stroke:#18141f;stroke-width:9;stroke-linecap:round}.m-glasses .m-glint{fill:none;stroke:#ffffff70;stroke-width:6;stroke-linecap:round}
html[data-theme=light] .m-glasses{transform:none;opacity:1}
.m-puppet{animation:m-breathe 3.4s ease-in-out infinite}
@keyframes m-breathe{50%{transform:translateY(-1.4%) scale(1.012,.992)}}
@keyframes m-tail{0%,100%{rotate:-5deg}50%{rotate:7deg}}
.is-happy .m-mouth{transform:scale(1.28)}
.is-jump .m-jump{animation:m-jump .75s cubic-bezier(.3,.7,.4,1)}
.is-jump~.live-ground{scale:.7}
@keyframes m-jump{14%{transform:scale(1.07,.9)}46%{transform:translateY(-17%) scale(.95,1.06)}78%{transform:scale(1.05,.94)}100%{transform:none}}
.is-drop .m-jump{animation:m-drop .9s cubic-bezier(.3,.7,.4,1) both}
@keyframes m-drop{0%{transform:translateY(-180%)}55%{transform:translateY(0) scale(1.1,.86)}75%{transform:translateY(-5%) scale(.97,1.03)}100%{transform:none}}
.mascot-say{position:absolute;left:58%;top:22px;z-index:4;max-width:250px;margin:0;padding:12px 16px;border-radius:18px 18px 18px 4px;background:var(--say);color:var(--say-text);font-size:14px;font-weight:600;line-height:1.35;box-shadow:0 14px 34px #0000002e;opacity:0;transform:translateY(10px) scale(.94);transform-origin:0 100%;transition:opacity .2s,transform .3s cubic-bezier(.3,1.5,.5,1);pointer-events:none}
.mascot-say.is-on{opacity:1;transform:none}
.live-card{position:absolute;z-index:3;width:196px;color:var(--text);text-decoration:none;transform:translate(calc(var(--px)*var(--depth,14px)),calc(var(--py)*var(--depth,14px)));transition:transform .35s ease-out}
.card-float{display:block;padding:14px;border:1px solid var(--line);border-radius:16px;background:var(--card);box-shadow:0 18px 40px #0000001f;animation:card-float 6s ease-in-out infinite;transition:border-color .25s,box-shadow .25s,scale .25s}
.live-card strong{display:block;font-size:14px;margin-top:11px}.live-card small{display:block;font-size:12px;color:var(--muted);line-height:1.4;margin-top:2px}
.live-card:hover .card-float,.live-card:focus-visible .card-float,.live-card.is-active .card-float{border-color:var(--purple);box-shadow:0 0 0 3px color-mix(in srgb,var(--purple) 22%,transparent),0 22px 44px #0000002a;scale:1.04}
.live-card:focus-visible{outline:none}
.card-site{left:-7%;top:52px;--depth:18px}.card-chat{right:-5%;top:190px;--depth:24px}.card-chat .card-float{animation-delay:-2s}.card-flow{left:-3%;bottom:84px;--depth:12px}.card-flow .card-float{animation-delay:-4s}
@keyframes card-float{50%{translate:0 -10px}}
.mini-browser{display:grid;grid-template-columns:repeat(3,7px) 1fr;gap:4px;align-items:center;padding:8px;border-radius:9px;background:var(--lavender)}
.mini-browser i{width:7px;height:7px;border-radius:50%;background:var(--purple);opacity:.55}
.mini-browser b{grid-column:1/-1;height:7px;border-radius:4px;background:color-mix(in srgb,var(--purple) 30%,transparent)}.mini-browser b:nth-of-type(2){width:72%}.mini-browser b:nth-of-type(3){width:44%;background:var(--accent)}
.mini-chat{display:grid;gap:6px;padding:8px;border-radius:9px;background:var(--lavender)}
.mini-chat em{font-style:normal;font-size:11px;background:var(--surface);padding:6px 9px;border-radius:10px 10px 10px 3px;justify-self:start}
.mini-chat span{justify-self:end;display:flex;gap:3px;background:var(--purple);padding:7px 9px;border-radius:10px 10px 3px 10px}
.mini-chat span i{width:5px;height:5px;border-radius:50%;background:#fff;animation:typing 1.2s infinite}.mini-chat span i:nth-child(2){animation-delay:.15s}.mini-chat span i:nth-child(3){animation-delay:.3s}
@keyframes typing{30%{translate:0 -3px;opacity:.5}}
.mini-flow{display:flex;align-items:center;padding:10px 8px;border-radius:9px;background:var(--lavender)}
.mini-flow i{width:18px;height:18px;border-radius:6px;background:var(--purple);flex:none}.mini-flow i:nth-of-type(2){background:var(--accent)}
.mini-flow u{flex:1;height:2px;margin:0 4px;background:repeating-linear-gradient(90deg,var(--purple) 0 5px,transparent 5px 9px);animation:flow 1.4s ease-in-out infinite}
@keyframes flow{50%{opacity:.35}}
.live-motion{position:absolute;right:0;bottom:18px;z-index:4;width:34px;height:34px;border-radius:50%;border:1px solid var(--line);background:var(--surface);color:var(--text);font-size:11px}
.live-copy .line{opacity:1}
html.live-intro .live-copy .line,html.live-intro .live-copy .hero-description,html.live-intro .live-copy .hero-actions{animation:rise .8s cubic-bezier(.2,.8,.2,1) both}
html.live-intro .live-copy .line:nth-child(2){animation-delay:.08s}html.live-intro .live-copy .line:nth-child(3){animation-delay:.16s}html.live-intro .live-copy .hero-description{animation-delay:.26s}html.live-intro .live-copy .hero-actions{animation-delay:.34s}
html.live-intro .live-card{animation:pop .6s cubic-bezier(.3,1.4,.5,1) both}html.live-intro .card-site{animation-delay:.95s}html.live-intro .card-chat{animation-delay:1.08s}html.live-intro .card-flow{animation-delay:1.21s}
@keyframes rise{from{opacity:0;translate:0 26px}}
@keyframes pop{from{opacity:0;scale:.7}}
/* Ajudante que acompanha a leitura */
.buddy{position:fixed;right:22px;bottom:0;z-index:60;width:124px;height:104px;pointer-events:none;transform:translateY(130%);transition:transform .7s cubic-bezier(.3,1.35,.5,1)}
.buddy.is-in{transform:none}
.buddy-hit{position:absolute;inset:0;overflow:hidden;padding:0;border:0;background:none;cursor:pointer;pointer-events:auto;border-radius:60px 60px 0 0}
.buddy-hit:focus-visible{outline:2px solid var(--accent);outline-offset:-2px}
.buddy-body{position:absolute;left:50%;top:8px;width:170px;aspect-ratio:453/687;translate:-50% 0}.buddy .m-part,.buddy .m-skull{filter:drop-shadow(0 3px 0 #5d32b5)}
.buddy .m-tail{display:none}.buddy.is-hidden{transform:translateY(130%)!important}
.buddy .mascot-say{left:auto;right:110px;top:-14px;width:max-content;max-width:230px;border-radius:18px 18px 4px 18px;transform-origin:100% 100%}
html.motion-paused .live-hero *,html.motion-paused .buddy *{animation-play-state:paused!important}
/* Fora da tela, a hero não gasta processamento */
.live-hero.is-off *{animation-play-state:paused!important}
@media(max-width:1050px){.live-grid{grid-template-columns:1fr 1fr;min-height:620px}.live-stage{height:560px}.mascot{height:440px}.live-card{width:168px}.card-site{left:-6%}.card-chat{right:-4%}.live-copy .hero-actions{flex-direction:column;align-items:start}}
@media(max-width:760px){.live-grid{grid-template-columns:1fr;gap:0;padding-top:36px;padding-bottom:10px;min-height:0}.live-copy h1{font-size:clamp(44px,12.4vw,72px);margin-bottom:20px}.live-copy .hero-actions{flex-direction:row;align-items:center}.live-copy .hero-foot{display:none}.live-stage{height:450px;margin-inline:-6px}.mascot{height:330px;bottom:40px}.live-orb{width:300px;top:47%}.live-ground{width:200px;bottom:30px}.live-card{width:auto}.card-float{padding:8px 13px 8px 10px;border-radius:30px;display:flex;align-items:center;gap:8px}.card-float:before{content:"";width:9px;height:9px;border-radius:50%;background:var(--purple)}.card-chat .card-float:before{background:var(--accent)}.live-card strong{font-size:12px;margin:0}.live-card small,.mini-browser,.mini-chat,.mini-flow{display:none}.card-site{left:0;top:96px}.card-chat{right:0;top:176px}.card-flow{left:2px;bottom:96px}.mascot-say{left:50%;right:auto;top:10px;translate:-50% 0;width:max-content;max-width:calc(100% - 20px);font-size:13px;border-radius:18px;transform-origin:50% 100%}.live-motion{bottom:6px}.buddy{right:8px;width:92px;height:78px}.buddy-body{width:126px;top:6px}.buddy .mascot-say{right:80px;top:-6px;max-width:170px;font-size:12px;padding:9px 12px}}
@media(prefers-reduced-motion:reduce){.live-hero *,.buddy,.buddy *{animation:none!important;transition-duration:.01ms!important}html.live-intro .live-copy *{animation:none!important}}
/* Chat flutuante aberto pelo mascote do canto */
.buddy-dot{position:absolute;right:14px;top:16px;width:14px;height:14px;border-radius:50%;background:#2fbf71;box-shadow:0 0 0 3px var(--bg);pointer-events:none;animation:buddy-dot 2.4s ease-in-out infinite}
@keyframes buddy-dot{50%{box-shadow:0 0 0 3px var(--bg),0 0 0 8px #2fbf7133}}
.buddy.is-chat .buddy-dot{display:none}
.buddy.is-chat .buddy-hit{outline:2px solid var(--purple);outline-offset:-2px}
.simia-chat{position:fixed;right:22px;bottom:112px;z-index:61;display:flex;flex-direction:column;width:min(370px,calc(100vw - 32px));height:min(560px,calc(100dvh - 140px));border:1px solid var(--line);border-radius:20px;background:var(--surface);color:var(--text);box-shadow:0 30px 80px #00000059;overflow:hidden;opacity:0;transform:translateY(14px) scale(.97);transform-origin:100% 100%;transition:opacity .22s,transform .3s cubic-bezier(.3,1.3,.5,1)}
.simia-chat.is-open{opacity:1;transform:none}
.simia-chat[hidden]{display:none}
.sc-chat-head{display:flex;align-items:center;gap:12px;padding:14px 14px 14px 16px;background:var(--purple);color:#fff}
html[data-theme=dark] .sc-chat-head{color:#17131f}
.sc-chat-face{display:grid;place-items:center;flex:none;width:44px;height:44px;border-radius:14px;background:#ffffff2e}
.sc-chat-face img{width:36px;height:36px;border-radius:10px}
.sc-chat-head div{flex:1;min-width:0}.sc-chat-head strong{display:block;font-size:16px}.sc-chat-head span{display:block;font-size:12.5px;opacity:.85}
.sc-chat-close{width:34px;height:34px;border:0;border-radius:50%;background:#ffffff26;color:inherit;font-size:20px;line-height:1;cursor:pointer}
.sc-chat-close:hover{background:#ffffff40}
.sc-chat-log{flex:1;overflow-y:auto;padding:16px 14px;display:flex;flex-direction:column;gap:8px;overscroll-behavior:contain;scrollbar-width:thin}
.sc-chat-msg{max-width:86%;padding:10px 13px;border-radius:16px;font-size:14.5px;line-height:1.45;animation:sc-chat-in .3s cubic-bezier(.2,.8,.2,1)}
.sc-chat-msg.bot{align-self:flex-start;background:var(--lavender);border-bottom-left-radius:5px}
.sc-chat-msg.user{align-self:flex-end;background:var(--purple);color:#fff;border-bottom-right-radius:5px}
html[data-theme=dark] .sc-chat-msg.user{color:#17131f}
.sc-chat-typing{display:flex;gap:4px;padding:13px 14px}.sc-chat-typing i{width:6px;height:6px;border-radius:50%;background:var(--muted);animation:sc-chat-dot 1s infinite}.sc-chat-typing i:nth-child(2){animation-delay:.15s}.sc-chat-typing i:nth-child(3){animation-delay:.3s}
@keyframes sc-chat-dot{30%{transform:translateY(-4px);opacity:.5}}
@keyframes sc-chat-in{from{opacity:0;transform:translateY(6px)}}
.sc-chat-options{display:flex;flex-wrap:wrap;gap:6px;margin-top:4px}
.sc-chat-options button{font:inherit;font-size:13px;font-weight:600;padding:8px 12px;border-radius:20px;border:1px solid var(--line);background:transparent;color:var(--text);cursor:pointer;transition:border-color .2s,background .2s}
.sc-chat-options button:hover{border-color:var(--purple);background:var(--lavender)}
.sc-chat-handoff{align-self:flex-start;margin-top:2px;padding:10px 15px;border-radius:20px;background:#25d366;color:#0b1f12;font-size:14px;font-weight:700;text-decoration:none}
.sc-chat-compose{display:flex;gap:8px;padding:10px 12px;border-top:1px solid var(--line)}
.sc-chat-compose input{flex:1;min-width:0;font:inherit;font-size:15px;padding:11px 14px;border-radius:22px;border:1px solid var(--line);background:var(--bg);color:var(--text)}
.sc-chat-compose input:focus-visible{outline:2px solid var(--purple);outline-offset:0}
.sc-chat-send{flex:none;width:44px;height:44px;border:0;border-radius:50%;background:var(--purple);color:#fff;cursor:pointer}
html[data-theme=dark] .sc-chat-send{color:#17131f}
.sc-chat-send svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round;display:block;margin:auto}
.sc-chat-foot{display:flex;justify-content:space-between;gap:10px;padding:0 14px 10px;font-size:11.5px;color:var(--muted)}.sc-chat-foot a{color:var(--muted)}
.sc-chat-sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}
@media(max-width:760px){.simia-chat{right:8px;left:8px;width:auto;bottom:84px;height:min(640px,calc(100dvh - 100px));border-radius:18px}.buddy-dot{right:8px;top:12px;width:12px;height:12px}}
@media(prefers-reduced-motion:reduce){.simia-chat,.sc-chat-msg,.buddy-dot{animation:none;transition:none}}
html.chat-open .mascot-say{opacity:0!important;visibility:hidden}
.sc-chat-quick{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:6px;padding:0 12px 10px}
.sc-chat-quick:empty{display:none}
.sc-chat-quick button{font:inherit;font-size:13.5px;font-weight:600;padding:9px 14px;border-radius:20px;border:1.5px solid var(--purple);background:transparent;color:var(--purple);cursor:pointer;animation:sc-chat-in .3s both;transition:background .2s,color .2s}
.sc-chat-quick button:nth-child(2){animation-delay:.06s}.sc-chat-quick button:nth-child(3){animation-delay:.12s}
@media(hover:hover){.sc-chat-quick button:hover{background:var(--purple);color:#fff}html[data-theme=dark] .sc-chat-quick button:hover{color:#17131f}}
.sc-chat-summary{align-self:stretch;display:grid;gap:8px;padding:14px;border:1px solid var(--line);border-radius:14px;background:var(--bg);animation:sc-chat-in .3s}
.sc-chat-summary small{font-size:11px;letter-spacing:.12em;text-transform:uppercase;color:var(--muted);font-weight:600}
.sc-chat-summary div{display:grid;grid-template-columns:96px 1fr;gap:8px;font-size:14px}
.sc-chat-summary b{font-weight:600;color:var(--muted)}
.sc-chat-summary span{overflow-wrap:anywhere}
.sc-chat-summary .sc-chat-handoff{justify-self:start;margin-top:4px}
