/* Revízia dizajnu 30. 10. (kontrola dizajnu P1–P11), zmeny oproti emzak-20261020.css: konečné slučky emócií a bez vznášania (P2),
   Emzák v lište na mobile stojí (P2), biela bublina s atramentovým obrysom namiesto čiernej (P4). */

/* Emzak · emzak.sk: Emzák so skriptom (lety, emócie, bublina) a jeho miesto v lište pod 768 px. Premenné sú v site-20261030.css.
   Polohy pri letoch nastavuje skript cez CSSOM a WAAPI (žiadne inline štýly v HTML, CSP). Emócie sú z aplikácie (_mascot.html
   + mascot.css) rovnako ako v návrhu navrhy/emzak-sk a v prezentácii zdroj-v2. Bez JS sa z tohto súboru nič neprejaví. */

/* bezpečná zóna displeja (výrez, zaoblené rohy): skript ju číta z týchto premenných */
@property --safe-t { syntax: "<length>"; inherits: true; initial-value: 0px; }
@property --safe-r { syntax: "<length>"; inherits: true; initial-value: 0px; }
@property --safe-b { syntax: "<length>"; inherits: true; initial-value: 0px; }
@property --safe-l { syntax: "<length>"; inherits: true; initial-value: 0px; }
:root { --safe-t: env(safe-area-inset-top, 0px); --safe-r: env(safe-area-inset-right, 0px); --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-l: env(safe-area-inset-left, 0px); --spring: cubic-bezier(.34, 1.56, .64, 1); }

/* prehliadač so skriptom: Emzák čaká mimo obrazovky na prílet (nič neposkočí ani nevysunie). Keby skript neprišiel
   (html ostane .no-js), ukáže sa po 2 s. Hlavička (lišta s menu) je v menu-20261030.css. */
@media (scripting: enabled) {
  .no-js #emzak { animation: ez-wait .3s ease 2s both; }
}
@keyframes ez-wait { from { opacity: 0; } }

/* Emzák mimo úvodu je pripnutý k oknu (spec „Vzhľad a pohyb“): away = box, ktorý postaví skript (pri boku od 1200 px,
   edge = 768–1199 px vykukuje spoza bočného okraja a nakloní sa k obsahu, pri ľavom okraji zrkadlovo, aby emočná bublinka
   ostala za okrajom; keď vykukuje, ťuky prechádzajú na stránku). ez-lift = úvod ho pri lete domov neoreže.
   Pod 768 px za úvodom sedí v hlavičke (.ez-slot medzi logom a tlačidlom Menu, perched = na úvode je skrytý). Miesto má
   najviac 48 × 40 px, stojí v strede medzi logom a tlačidlami a pri úzkej lište sa zúži (logo ani tlačidlá nestláča);
   postavička v ňom je vľavo a meria najviac 40 px a 87 % šírky miesta, aby emočná bublinka a srdiečka vpravo nesiahli
   na tlačidlo. Hranica 767.98 px je rovnaká ako v emzak-20261030.js (matchMedia), aby pri zlomkovej šírke (lupa)
   Emzák nezmizol. */
.js #emzak.away { position: fixed; right: auto; bottom: auto; z-index: 25; }
.js #emzak.edge { pointer-events: none; }
.js #emzak.edge .ez-idle { rotate: -10deg; }
.js #emzak.edge-l .ez-idle { rotate: 10deg; }
.js #emzak.edge-l .ez-svg { scale: -1 1; }
.js #emzak.perched { visibility: hidden; }
/* kolo 2: pri bloku sekcie (at, fly-20261019b.js) stojí absolútne v .wrap úvodu a scrolluje so stránkou, pred blokmi.
   back = za blokom (telefón a fotka majú z-index 2, text nie, preto ho miesto nikdy neprekrýva), far = ďaleko: mierne
   menší kontrast a rozostrenie pod 1 px */
.js #emzak.at { position: absolute; right: auto; bottom: auto; z-index: 25; }
.js #emzak.at.back { z-index: 1; }
.js #emzak.far .ez-body { filter: blur(.6px) saturate(.8); }
.js .ez-lift { overflow: visible; }
.ez-slot { display: none; }
/* P2: v lište na mobile Emzák stojí v pokojnej póze emócie; pri zmene emócie raz vyskočí (320 ms, skript) */
.ez-slot .mz, .ez-slot .mz * { animation: none !important; }
@media (max-width: 767.98px) {
  .js .top > .wrap { flex-wrap: nowrap; gap: 4px; }
  .js .top > .wrap > :not(.ez-slot) { flex-shrink: 0; }
  .js .ez-slot { display: block; position: relative; flex: 0 1 48px; min-width: 0; height: 40px; margin-inline: auto;
    container-type: inline-size; cursor: pointer; }
  .js .top .ez-slot + .menu-btn { margin-left: 0; }
  .js .ez-slot:empty { pointer-events: none; cursor: default; }
  .js .ez-slot svg { position: absolute; left: 0; top: 50%; width: min(40px, 87cqw); height: min(40px, 87cqw); translate: 0 -50%;
    max-width: none; overflow: visible; }
}

/* vrstvy: .ez-idle (vznáša sa) > .ez-jump (poskočí) > .ez-body (nakloní sa za kurzorom) > .ez-svg (pri zmene emócie dve na sebe) */
.ez-idle, .ez-jump, .ez-body, .ez-body > .ez-svg { position: absolute; inset: 0; display: block; }
.ez-idle { animation: none; }   /* P2: vznášanie 9 s vypadlo, dve kolá by trvali 18 s */
.ez-body { transition: transform .45s cubic-bezier(.2, .8, .3, 1); }
.ez-body > .ez-svg { transform-origin: 50% 85%; }
.ez-body > .ez-svg svg { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; overflow: visible; }
#emzak.flying .mz-ant-l { animation: mz-sway-l .5s ease-in-out infinite !important; }
#emzak.flying .mz-ant-r { animation: mz-sway-r .5s ease-in-out infinite !important; }
#emzak.hello .mz-ant-r { animation: hello-ant 1s ease-in-out both !important; }   /* úvod: zamáva tykadlom a žmurkne */
#emzak.hello .mz-eye { animation: wink .45s ease-in-out .42s both !important; }
@keyframes ez-drift { 0%, 100% { transform: translate(0, 0); } 33% { transform: translate(.6%, -1.6%); } 66% { transform: translate(-.5%, .9%); } }
@keyframes hello-ant { 0%, 100% { transform: rotate(0); } 18%, 54% { transform: rotate(30deg); } 36%, 72% { transform: rotate(-6deg); } }
@keyframes wink { 0%, 100% { transform: scaleY(1); } 45%, 60% { transform: scaleY(.1); } }

/* Emzákova bublina (z prezentácie, zmenšená pre web): miesto a chvost (--tail) nastaví skript, nikdy nie mimo okna */
.ez-say { --tail: 50%; position: fixed; left: 0; top: 0; z-index: 26; width: max-content; max-width: 260px; padding: 10px 15px 11px;
  border: 2px solid var(--ink); border-radius: 18px; background: #fff; color: var(--ink); font: 700 1.0625rem/1.22 var(--display); letter-spacing: -.005em;
  text-wrap: balance; overflow-wrap: anywhere; pointer-events: none; opacity: 0; transform: scale(.6); transition: opacity .25s ease, transform .25s ease; }
.ez-say.show { opacity: 1; transform: none; transition: opacity .3s ease, transform .5s var(--spring); }
.ez-say.cut { transition: none; }                              /* zmizne hneď, aby ani počas miznutia nič nezakryla */
.ez-say:empty { display: none; }
/* P4: biela komiksová bublina s atramentovým obrysom 2 px (text 17,9 : 1). Čierny tvar vyzeral ako druhé hlavné
   tlačidlo. Chvost má dve vrstvy: atramentový trojuholník (::before) a v ňom biely, o 2 px menší (::after), ktorý obrys
   bubliny otvorí. --tail sa meria od vonkajšieho okraja bubliny, pseudoprvky od vnútorného, preto − 2 px */
.ez-say::before, .ez-say::after { content: ""; position: absolute; }
.ez-say::before { background: var(--ink); }
.ez-say::after { background: #fff; }
.ez-say--top { transform-origin: var(--tail) 100%; }
.ez-say--bottom { transform-origin: var(--tail) 0; }
.ez-say--top::before, .ez-say--bottom::before { left: calc(var(--tail) - 11px); width: 18px; height: 16px; }
.ez-say--top::after, .ez-say--bottom::after { left: calc(var(--tail) - 9px); width: 14px; height: 12.5px; }
.ez-say--top::before { top: 100%; clip-path: polygon(0 0, 100% 0, 50% 100%); }
.ez-say--top::after { top: calc(100% - .5px); clip-path: polygon(0 0, 100% 0, 50% 100%); }
.ez-say--bottom::before { bottom: 100%; clip-path: polygon(50% 0, 100% 100%, 0 100%); }
.ez-say--bottom::after { bottom: calc(100% - .5px); clip-path: polygon(50% 0, 100% 100%, 0 100%); }
.ez-say--left { transform-origin: 100% var(--tail); }
.ez-say--right { transform-origin: 0 var(--tail); }
.ez-say--left::before, .ez-say--right::before { top: calc(var(--tail) - 11px); width: 16px; height: 18px; }
.ez-say--left::after, .ez-say--right::after { top: calc(var(--tail) - 9px); width: 12.5px; height: 14px; }
.ez-say--left::before { left: 100%; clip-path: polygon(0 0, 100% 50%, 0 100%); }
.ez-say--left::after { left: calc(100% - .5px); clip-path: polygon(0 0, 100% 50%, 0 100%); }
.ez-say--right::before { right: 100%; clip-path: polygon(100% 0, 0 50%, 100% 100%); }
.ez-say--right::after { right: calc(100% - .5px); clip-path: polygon(100% 0, 0 50%, 100% 100%); }

/* emócie (statický Emzák bez JS má líca a úsmev skryté, s JS ich ukazujú emócie) */
.js .mz-cheek { opacity: .7; }
.js .mz-smile { transform: none; }
.mz-follow { transition: transform .25s ease-out; }
.mz-ink { fill: var(--ink); }
.mz-mk { fill: var(--marker); }
.mz-pink { fill: var(--pink); }
.mz-tear { fill: #fff; }
.mz-line { fill: none; stroke: var(--ink); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.mz-shut { stroke-width: 1.9; }
.mz-bubble .mz-line { stroke-width: 1.35; }
.mz-wave1, .mz-wave2 { stroke-width: 1.3; }
.mz-z { stroke-width: 1.1; }
.mz-bubble { transform-box: view-box; transform-origin: 40px 3px; }
.mz-beat, .mz-rise, .mz-spark, .mz-z { transform-box: view-box; transform-origin: 0 0; }
/* P2: slučky emócií sú konečné. Každá prebehne toľkokrát, koľko sa zmestí do asi 5 s (raz alebo dvakrát),
   a ostane v poslednej snímke (forwards), ktorá je pokojnou pózou emócie. Znova ich rozbehne len udalosť: pristátie,
   kurzor bližšie ako 200 px, písanie vo formulári (emzak-20261030.js). Postavičky v telefóne bežia, len kým
   ukážka hrá (demo-20261030.css, .phone.live) */
.mz-work .mz-float { animation: mz-hover 3s ease-in-out 1 forwards; }
.mz-work .mz-look { animation: mz-scan 1.6s ease-in-out 2 forwards; }
.mz-work .mz-ant circle { animation: mz-glow 1.2s ease-in-out 2 forwards; }
.mz-work .mz-ant-r circle { animation-delay: .6s; }
.mz-party .mz-float { animation: mz-in .9s cubic-bezier(.34, 1.4, .6, 1) both, mz-idle 2.8s ease-in-out .9s 1 forwards; }
.mz-party .mz-ant-l { animation: mz-sway-l 1.6s ease-in-out 2 forwards; }
.mz-party .mz-ant-r { animation: mz-sway-r 1.6s ease-in-out 2 forwards; }
.mz-party .mz-smile { animation: mz-smile .5s cubic-bezier(.34, 1.5, .6, 1) .25s both; }
.mz-party .mz-cheek { animation: mz-cheek .8s ease-out .3s both; }
.mz-wave .mz-float, .mz-listen .mz-float, .mz-think .mz-float, .mz-surprised .mz-float, .mz-love .mz-float,
.mz-proud .mz-float, .mz-confused .mz-float, .mz-sad .mz-float, .mz-sleep .mz-float { transform-origin: 24px 40px; }
.mz-wave .mz-float { animation: mz-greet-hop 3.2s ease-in-out 1 forwards; }
.mz-wave .mz-ant-r { animation: mz-wave-ant 3.2s ease-in-out 1 forwards; }
.mz-wave .mz-eye { animation: mz-wink 3.2s 1 forwards; }
.mz-listen .mz-float { animation: mz-nod 2.4s ease-in-out 2 forwards; }
.mz-listen .mz-ant-l { animation: mz-twitch 2.4s ease-in-out 2 forwards; }
.mz-wave1 { animation: mz-fade 1.6s ease-out 2 forwards; }
.mz-wave2 { animation: mz-fade 1.6s ease-out .35s 2 forwards; }
.mz-think .mz-float { animation: mz-ponder 4s ease-in-out 1 alternate forwards; }
.mz-think .mz-ant-l { animation: mz-tilt-l 2.4s ease-in-out 2 forwards; }
.mz-think .mz-ant-r { animation: mz-tilt-r 2.4s ease-in-out 1.2s 1 forwards; }
.mz-think .mz-look { animation: mz-gaze 4s ease-in-out 1 alternate forwards; }
.mz-dot { animation: mz-dot 2.2s 2 forwards; }   /* tretia bodka dobehne za 4,8 s (do 5 s, WCAG 2.2.2) */
.mz-dot:nth-of-type(2) { animation-delay: .2s; }
.mz-dot:nth-of-type(3) { animation-delay: .4s; }
.mz-surprised .mz-float { animation: mz-pop 3s ease-out 1 forwards; }
.mz-surprised .mz-ant-l { animation: mz-perk-l 3s ease-out 1 forwards; }
.mz-surprised .mz-ant-r { animation: mz-perk-r 3s ease-out 1 forwards; }
.mz-surprised .mz-eye { animation: mz-big 3s ease-out 1 forwards; }
.mz-surprised .mz-look { transform-box: fill-box; transform-origin: center; animation: mz-small 3s ease-out 1 forwards; }
.mz-surprised .mz-bubble { animation: mz-bubble-pop 3s ease-out 1 forwards; }
.mz-love .mz-float { animation: mz-sway 2.4s ease-in-out 2 forwards; }
.mz-love .mz-cheek { animation: mz-blush 2.4s ease-in-out 2 forwards; }
.mz-beat { animation: mz-beat 1.2s ease-in-out 2 forwards; }
.mz-rise { animation: mz-rise 2.4s ease-out 2 forwards; }
.mz-proud .mz-float { animation: mz-puff 3s ease-in-out 1 forwards; }
.mz-proud .mz-cheek { opacity: .6; }
.mz-spark { animation: mz-twinkle 2s ease-in-out 1 forwards; }
.mz-s1 { animation-delay: .5s; }
.mz-s2 { animation-delay: 1s; }
.mz-s3 { animation-delay: 1.5s; }
.mz-confused .mz-float { animation: mz-puzzle 3.6s ease-in-out 1 forwards; }
.mz-confused .mz-ant-l { animation: mz-tilt-l 1.8s ease-in-out 2 forwards; }
.mz-confused .mz-look { animation: mz-wander 3.6s ease-in-out 1 forwards; }
.mz-confused .mz-bubble { animation: mz-wiggle 1.8s ease-in-out 2 forwards; }
.mz-sad .mz-float { animation: mz-sigh 4s ease-in-out 1 forwards; }
.mz-sad .mz-ant-l { animation: mz-droop-l 4s ease-in-out 1 forwards; }
.mz-sad .mz-ant-r { animation: mz-droop-r 4s ease-in-out 1 forwards; }
.mz-tear { animation: mz-tear 4s ease-in 1 forwards; }
.mz-sleep .mz-float { animation: mz-breathe 4s ease-in-out 1 forwards; }
.mz-z { animation: mz-z 2.8s ease-out 1 forwards; }
.mz-later { animation-delay: 1.4s; animation-iteration-count: 1; }
@keyframes mz-scan { 0%, 100% { transform: translateX(-1.8px); } 50% { transform: translateX(1.8px); } }
@keyframes mz-glow { 0%, 100% { fill: #15171c; } 50% { fill: #22b5ea; } }
@keyframes mz-in { 0% { transform: translateY(8px) scale(.7); } 55% { transform: translateY(-3px) scale(1.04); } 100% { transform: none; } }
@keyframes mz-idle { 0%, 100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-2px) rotate(2deg); } }
@keyframes mz-sway-l { 0%, 100% { transform: rotate(-4deg); } 50% { transform: rotate(7deg); } }
@keyframes mz-sway-r { 0%, 100% { transform: rotate(4deg); } 50% { transform: rotate(-7deg); } }
@keyframes mz-smile { from { transform: scale(0); } }
@keyframes mz-cheek { from { opacity: 0; } }
@keyframes mz-greet-hop { 0%, 16%, 100% { transform: none; } 5% { transform: scale(1.04, .95); } 10% { transform: translateY(-3px) scale(.97, 1.03); } }
@keyframes mz-wink { 0%, 62%, 74%, 100% { transform: scaleY(1); } 66%, 70% { transform: scaleY(.12); } }
@keyframes mz-nod { 0%, 16%, 32%, 52%, 100% { transform: rotate(4deg); } 8%, 24%, 40% { transform: translateY(1px) rotate(5.5deg); } }
@keyframes mz-twitch { 0%, 60%, 80%, 100% { transform: rotate(0); } 70% { transform: rotate(8deg); } }
@keyframes mz-fade { 0% { opacity: 0; } 30% { opacity: 1; } 100% { opacity: 0; } }
@keyframes mz-ponder { from { transform: rotate(-3deg); } to { transform: rotate(3deg); } }
@keyframes mz-tilt-l { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(-14deg); } }
@keyframes mz-tilt-r { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(14deg); } }
@keyframes mz-gaze { from { transform: none; } to { transform: translate(.8px, -.4px); } }
@keyframes mz-dot { 0%, 12%, 96%, 100% { opacity: .2; } 30%, 78% { opacity: 1; } }
@keyframes mz-pop { 0%, 24%, 100% { transform: none; } 8% { transform: translateY(-2px) scale(.94, 1.08); } 16% { transform: scale(1.02, .98); } }
@keyframes mz-perk-l { 0%, 92%, 100% { transform: rotate(0); } 8%, 80% { transform: rotate(16deg); } }
@keyframes mz-perk-r { 0%, 92%, 100% { transform: rotate(0); } 8%, 80% { transform: rotate(-16deg); } }
@keyframes mz-big { 0%, 92%, 100% { transform: scale(1); } 8%, 80% { transform: scale(1.12); } }
@keyframes mz-small { 0%, 92%, 100% { transform: scale(1); } 8%, 80% { transform: scale(.7); } }
@keyframes mz-bubble-pop { 0%, 6%, 92%, 100% { transform: scale(0); } 14% { transform: scale(1.15); } 20%, 82% { transform: scale(1); } }
@keyframes mz-sway { 0%, 100% { transform: rotate(-2deg); } 50% { transform: rotate(2deg) translateY(-1px); } }
@keyframes mz-blush { 0%, 100% { opacity: .55; } 50% { opacity: 1; } }
@keyframes mz-beat { 0%, 40%, 100% { transform: scale(.9); } 15% { transform: scale(1.12); } 28% { transform: scale(.96); } }
@keyframes mz-rise { 0% { opacity: 0; transform: translate(0, 3px) scale(.4); } 25% { opacity: 1; } 100% { opacity: 0; transform: translate(3px, -7px) scale(1); } }
@keyframes mz-puff { 0%, 100% { transform: none; } 30%, 70% { transform: translateY(-1px) scale(1.05, 1.03); } }
@keyframes mz-twinkle { 0%, 100% { transform: scale(0) rotate(0); } 50% { transform: scale(1) rotate(45deg); } }
@keyframes mz-puzzle { 0%, 100% { transform: rotate(-7deg); } 50% { transform: rotate(5deg); } }
@keyframes mz-wander { 0%, 30%, 100% { transform: none; } 45%, 80% { transform: translateX(-4.2px); } }
@keyframes mz-wiggle { 0%, 100% { transform: rotate(-8deg); } 50% { transform: rotate(8deg); } }
@keyframes mz-sigh { 0%, 100% { transform: none; } 45%, 60% { transform: scale(1.03, .95); } }
@keyframes mz-droop-l { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(-7deg); } }
@keyframes mz-droop-r { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(7deg); } }
@keyframes mz-tear { 0%, 30% { opacity: 0; transform: none; } 40% { opacity: 1; transform: none; }
  82% { opacity: 1; transform: translateY(5px); } 92%, 100% { opacity: 0; transform: translateY(6px); } }
@keyframes mz-breathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.03, 1.045); } }
@keyframes mz-z { 0% { opacity: 0; transform: translate(0, 3px) scale(.6); } 30% { opacity: 1; } 100% { opacity: 0; transform: translate(3px, -3px) scale(1); } }

@media (prefers-reduced-motion: reduce) {
  .ez-idle { animation: none; }
  .ez-body, .mz-follow, .ez-say, .ez-say.show { transition: none; }
  .mz *, .mz .mz-float { animation: none !important; }
}
