/* MŠ Kohoutova – plugin „motion2“: rozšířený pohyb a interakce nad vrstvou studio.
 * Třídy na <html>: m2-1 … m2-5 (kumulativně podle api.motionLevel()); vše vkládá a uklízí motion2.js.
 * Barvy jen z rolí palety var(--p-…). Ťuknutí na dotykových zařízeních = třída .m2-tap (nahrazuje :hover).
 * Pohyb jen přes translate/scale/rotate/opacity/filter (individuální vlastnosti se skládají s transformacemi variant). */

/* ================= 1 · Jemný ================= */
/* (kreslené podtržení odkazů zleva doprava odstraněno 29. 11. 2026 – uživatel nechtěl) */

/* lesk tlačítek */
.m2-shine { position: absolute; inset: 0; border-radius: inherit; overflow: hidden; pointer-events: none; z-index: 1; }
.m2-shine::before { content: ""; position: absolute; top: -30%; bottom: -30%; left: -70%; width: 45%; transform: skewX(-20deg);
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--p-surface, #fff) 55%, transparent), transparent); }
@media (hover: hover) { .m2-1 [data-m="btn"]:hover > .m2-shine::before { animation: m2-shine .85s cubic-bezier(.3,.6,.3,1); } }
.m2-1 [data-m="btn"].m2-tap > .m2-shine::before, .m2-1 [data-m="btn"]:focus-visible > .m2-shine::before { animation: m2-shine .85s cubic-bezier(.3,.6,.3,1); }
@keyframes m2-shine { from { left: -70%; } to { left: 135%; } }

/* animovaný fokus */
.m2-1 :focus-visible { animation: m2-focus .5s cubic-bezier(.2,.8,.2,1); }
@keyframes m2-focus { from { outline-offset: 10px; outline-color: transparent; } }

/* plynulé rozbalení podmenu (varianty přepínají display: none → block) */
.m2-1 .sub { animation: m2-drop .32s cubic-bezier(.2,.8,.2,1); transform-origin: 50% 0; }
@keyframes m2-drop { from { opacity: 0; translate: 0 -8px; scale: 1 .94; } }

/* fotky: přiblížení při najetí (scale = základ úrovně × najetí) */
.m2-1 .ph-img { scale: calc(var(--m2-bs, 1) * var(--m2-hs, 1)); transition: scale .9s cubic-bezier(.2,.8,.2,1); }
@media (hover: hover) { .m2-1 :is(.ph-on:not([data-ph-mode="cover"]), [data-m="card"]):hover .ph-img { --m2-hs: 1.07; } }
.m2-1 .m2-tap .ph-img, .m2-1 .ph-on.m2-tap .ph-img { --m2-hs: 1.07; }

/* ================= 2 · Živý ================= */
/* nástupy sekcí: obsah se přesouvá uvnitř pásu, pás sám drží místo (overflow-x: clip = žádný vodorovný posun) */
.m2-sec { overflow-x: clip; }
.m2-sec:not(.m2-on) > * { opacity: 0; }
.m2-sec.m2-on > * { animation: m2-in-up .95s cubic-bezier(.2,.8,.2,1) backwards; }
.m2-sec.m2-on > :nth-child(2) { animation-delay: .08s; }
.m2-sec.m2-on > :nth-child(3) { animation-delay: .16s; }
.m2-sec.m2-on > :nth-child(n+4) { animation-delay: .24s; }
.m2-sec[data-m2-in="left"].m2-on > * { animation-name: m2-in-left; }
.m2-sec[data-m2-in="right"].m2-on > * { animation-name: m2-in-right; }
.m2-sec[data-m2-in="zoom"].m2-on > * { animation-name: m2-in-zoom; }
.m2-sec[data-m2-in="blur"].m2-on > * { animation-name: m2-in-blur; }
@keyframes m2-in-up { from { opacity: 0; translate: 0 64px; } }
@keyframes m2-in-left { from { opacity: 0; translate: -90px 0; } }
@keyframes m2-in-right { from { opacity: 0; translate: 90px 0; } }
@keyframes m2-in-zoom { from { opacity: 0; scale: .88; } }
@keyframes m2-in-blur { from { opacity: 0; filter: blur(14px); scale: 1.03; } }

/* slova nadpisu h1 */
.m2-w { display: inline-block; }
.m2-words .m2-wa { animation: m2-word .85s cubic-bezier(.2,.8,.2,1) both; animation-delay: calc(var(--wi, 0) * 75ms + .12s); }
@keyframes m2-word { from { opacity: 0; translate: 0 .55em; filter: blur(8px); } }
.m2-h1in { animation: m2-word 1s cubic-bezier(.2,.8,.2,1) both .1s; }

/* maskové odhalení fotek */
.m2-mask[data-m2-mask="down"]:not(.m2-on) { clip-path: inset(0 0 100% 0); }
.m2-mask[data-m2-mask="side"]:not(.m2-on) { clip-path: inset(0 100% 0 0); }
.m2-mask[data-m2-mask="circle"]:not(.m2-on) { clip-path: circle(0% at 50% 50%); }
.m2-mask.m2-on { animation: m2-mask-down 1.2s cubic-bezier(.65,0,.25,1) backwards; }
.m2-mask[data-m2-mask="side"].m2-on { animation-name: m2-mask-side; }
.m2-mask[data-m2-mask="circle"].m2-on { animation-name: m2-mask-circle; }
@keyframes m2-mask-down { from { clip-path: inset(0 0 100% 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes m2-mask-side { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes m2-mask-circle { from { clip-path: circle(0% at 50% 50%); } to { clip-path: circle(75% at 50% 50%); } }

/* tlačítko nahoru s kroužkem postupu */
.m2-top { position: fixed; right: max(16px, env(safe-area-inset-right, 0px)); bottom: calc(16px + env(safe-area-inset-bottom, 0px)); z-index: 9990;
  width: 52px; height: 52px; padding: 0; border: 0; border-radius: 50%; cursor: pointer; color: var(--p-primary, #0047ab);
  background: var(--p-surface, #fff); box-shadow: 0 8px 24px rgb(var(--p-shadow, 20 30 50) / .22);
  opacity: 0; visibility: hidden; translate: 0 24px; scale: .8;
  transition: opacity .35s, translate .45s cubic-bezier(.2,1.3,.3,1), scale .45s cubic-bezier(.2,1.3,.3,1), visibility 0s linear .45s; }
.m2-top.m2-show, .m2-top:focus-visible { opacity: 1; visibility: visible; translate: 0 0; scale: 1; transition-delay: 0s; }
.m2-top svg { width: 100%; height: 100%; display: block; rotate: -90deg; }
.m2-top circle { fill: none; stroke-width: 3.5; }
.m2-top .m2-top__bg { stroke: color-mix(in srgb, var(--p-primary, #0047ab) 16%, transparent); }
.m2-top .m2-top__ring { stroke: var(--p-primary, #0047ab); stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: calc(100 - var(--m2-p, 0) * 100); }
.m2-top path { fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; rotate: 90deg; transform-origin: 24px 24px; }
@media (hover: hover) { .m2-top:hover { scale: 1.08; } .m2-top:hover path { animation: m2-arrow .7s ease; } }
@keyframes m2-arrow { 40% { translate: -4px 0; } }
body:has(.m-toast.m-show) .m2-top { translate: 0 -118px; }

/* přechod mezi stránkami: View Transitions (styl @view-transition vkládá motion2.js), jinak prolnutí */
::view-transition-old(root) { animation: m2-vt-out .3s cubic-bezier(.4,0,1,1) both; }
::view-transition-new(root) { animation: m2-vt-in .5s cubic-bezier(.2,.8,.2,1) both; }
@keyframes m2-vt-out { to { opacity: 0; translate: 0 -16px; filter: blur(4px); } }
@keyframes m2-vt-in { from { opacity: 0; translate: 0 22px; } }
html.m2-leave body { opacity: 0; transition: opacity .22s ease; }
html.m2-enter body { animation: m2-fadein .45s ease both; }
@keyframes m2-fadein { from { opacity: 0; } }

/* odezva ťuknutí (ripple) */
.m2-rip { position: absolute; inset: 0; border-radius: inherit; overflow: hidden; pointer-events: none; z-index: 2; }
.m2-rip i { position: absolute; border-radius: 50%; background: color-mix(in srgb, currentColor 22%, transparent); scale: 0; opacity: 1;
  animation: m2-rip .65s cubic-bezier(.2,.8,.2,1) forwards; }
@keyframes m2-rip { to { scale: 1; opacity: 0; } }

/* ================= 3 · Dynamický ================= */
.m2-hero { isolation: isolate; }
/* barevné bloby za hero */
.m2-blobs { position: absolute; inset: 0; overflow: hidden; z-index: -1; pointer-events: none; border-radius: inherit; }
.m2-blobs i { position: absolute; width: 56%; aspect-ratio: 1; border-radius: 50%; opacity: .55;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--c) 55%, transparent), color-mix(in srgb, var(--c) 18%, transparent) 55%, transparent);
  animation: m2-blob 19s ease-in-out infinite alternate; }
.m2-blobs i:nth-child(1) { --c: var(--p-primary, #0047ab); left: -18%; top: -30%; }
.m2-blobs i:nth-child(2) { --c: var(--p-secondary, #ffd500); right: -16%; top: -10%; width: 50%; animation-duration: 23s; animation-delay: -6s; }
.m2-blobs i:nth-child(3) { --c: var(--p-accent, #e8100e); left: 28%; bottom: -45%; width: 48%; animation-duration: 27s; animation-delay: -12s; }
.m2-blobs i:nth-child(4) { --c: var(--p-hero-2, var(--p-primary-soft, #dde)); right: 20%; bottom: -30%; width: 40%; animation-duration: 21s; animation-delay: -3s; opacity: .8; }
@keyframes m2-blob { 0% { translate: 0 0; scale: 1; } 33% { translate: 14% 9%; scale: 1.18; } 66% { translate: -9% 15%; scale: .88; } 100% { translate: 7% -11%; scale: 1.08; } }

/* gradientový text (míchá barvy palety s vlastní barvou nadpisu → drží kontrast) */
.m2-grad .m2-w:not(.m2-wl), .m2-grad .m2-l, .m2-gradh {
  background-image: linear-gradient(100deg,
    color-mix(in oklab, var(--p-primary, #0047ab) 62%, var(--m2-tc, currentColor)),
    color-mix(in oklab, var(--p-accent, #e8100e) 58%, var(--m2-tc, currentColor)) 33%,
    color-mix(in oklab, var(--p-secondary, #ffd500) 50%, var(--m2-tc, currentColor)) 66%,
    color-mix(in oklab, var(--p-primary, #0047ab) 62%, var(--m2-tc, currentColor)));
  background-size: 300% 100%; -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.m2-grad .m2-w { padding: .12em .06em; margin: -.12em -.06em; animation: m2-grad 14s linear infinite; animation-delay: calc(var(--wi, 0) * -.5s); }
.m2-words.m2-grad .m2-w { animation: m2-word .85s cubic-bezier(.2,.8,.2,1) both, m2-grad 14s linear infinite;
  animation-delay: calc(var(--wi, 0) * 75ms + .12s), calc(var(--wi, 0) * -.5s); }
.m2-gradh { animation: m2-grad 16s linear infinite; }
/* úroveň 5: vlnící se písmena uvnitř celých slov (slova se nelámou) */
.m2-l { display: inline-block; animation: m2-lwave 1.8s ease-in-out infinite; animation-delay: calc(var(--li, 0) * 55ms); }
.m2-grad .m2-l { padding: .12em .02em; margin: -.12em -.02em; animation: m2-lwave 1.8s ease-in-out infinite, m2-grad 14s linear infinite; animation-delay: calc(var(--li, 0) * 55ms), calc(var(--li, 0) * -.25s); }
@keyframes m2-lwave { 0%, 100% { translate: 0 0; } 30% { translate: 0 -.12em; } }
@keyframes m2-grad { from { background-position: 0% 50%; } to { background-position: 300% 50%; } }

/* světelný spotlight na kartách */
.m2-spot-host { isolation: isolate; }
.m2-spot { position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: -1; opacity: 0; transition: opacity .4s;
  background: radial-gradient(260px circle at var(--m2-x, 50%) var(--m2-y, 50%), color-mix(in srgb, var(--p-primary, #0047ab) 24%, transparent), transparent 72%); }
.m2-spot::after { content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 2px;
  background: radial-gradient(180px circle at var(--m2-x, 50%) var(--m2-y, 50%), var(--p-accent, #e8100e), transparent 70%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; opacity: .7; }
@media (hover: hover) { .m2-spot-host:hover > .m2-spot { opacity: 1; } }
.m2-spot-host.m2-tap > .m2-spot { opacity: 1; }

/* paralaxa fotek v rámu */
.m2-3 .ph-img { --m2-bs: 1.14; translate: 0 var(--m2-py, 0%); }

/* podnadpis hero: slova plynule vyjedou zleva doprava a rozsvítí se */
.m2-lead .m2-pw { display: inline-block; animation: m2-lead .75s cubic-bezier(.2,.8,.2,1) both; animation-delay: calc(var(--pi, 0) * 32ms + .55s); }
@keyframes m2-lead {
  0%   { opacity: 0; translate: -.7em 0; filter: blur(6px); text-shadow: 0 0 .9em color-mix(in srgb, var(--p-accent, #f0a) 70%, transparent); }
  60%  { opacity: 1; filter: blur(0); }
  100% { opacity: 1; translate: 0 0; filter: none; text-shadow: 0 0 0 transparent; }
}

/* animované ikony v rychlých odkazech */
.m2-ico { animation: m2-ico 6s ease-in-out infinite; animation-delay: calc(var(--m2-i, 0) * -1.1s); transform-box: fill-box; transform-origin: 50% 65%; }
@keyframes m2-ico { 0%, 72%, 100% { rotate: 0deg; translate: 0 0; } 77% { rotate: -12deg; translate: 0 -4px; } 85% { rotate: 9deg; translate: 0 -2px; } 92% { rotate: -4deg; translate: 0 0; } }
@media (hover: hover) { .m2-ico-host:hover .m2-ico { animation: m2-ico-hop .75s cubic-bezier(.3,1.6,.5,1); } }
.m2-ico-host.m2-tap .m2-ico { animation: m2-ico-hop .75s cubic-bezier(.3,1.6,.5,1); }
@keyframes m2-ico-hop { 40% { translate: 0 -7px; scale: 1.18; rotate: -10deg; } 70% { rotate: 6deg; } }

/* počítadla: tabulkové číslice + odskok po dopočítání */
.m2-3 [data-m="count"] { font-variant-numeric: tabular-nums; }
.m2-ib { display: inline-block; }
.m2-bump { animation: m2-bump .9s cubic-bezier(.3,1.5,.5,1); }
@keyframes m2-bump { 0% { scale: 1; } 30% { scale: 1.3; rotate: -4deg; } 55% { scale: .93; rotate: 2deg; } 75% { scale: 1.06; } 100% { scale: 1; rotate: 0deg; } }

/* ================= 4 · Hravý ================= */
/* ozvěna kurzoru */
.m2-ring { position: fixed; left: 0; top: 0; z-index: 9996; width: 36px; height: 36px; margin: -18px 0 0 -18px; border-radius: 50%; pointer-events: none;
  border: 2px solid color-mix(in srgb, var(--p-primary, #0047ab) 70%, transparent); opacity: 0;
  transition: opacity .3s, scale .35s cubic-bezier(.2,1.4,.3,1), background-color .3s, border-color .3s; }
.m2-ring.m2-show { opacity: 1; }
.m2-ring.m2-big { scale: 1.7; background: color-mix(in srgb, var(--p-accent, #e8100e) 12%, transparent); border-color: var(--p-accent, #e8100e); }
.m2-ring.m2-down { scale: .7; }

/* poskakující logo */
.m2-logo { transform-box: fill-box; transform-origin: 50% 100%; }
@media (hover: hover) { .m2-logo-host:hover .m2-logo, .m2-logo-host:hover.m2-logo { animation: m2-boing .9s cubic-bezier(.3,1.4,.5,1); } }
.m2-logo-host.m2-tap .m2-logo, .m2-logo.m2-tap { animation: m2-boing .9s cubic-bezier(.3,1.4,.5,1); }
@keyframes m2-boing { 0% { scale: 1 1; translate: 0 0; } 18% { scale: 1.12 .86; } 40% { scale: .92 1.12; translate: 0 -12px; rotate: -6deg; } 62% { scale: 1.05 .95; translate: 0 0; rotate: 3deg; } 80% { scale: .98 1.02; rotate: 0deg; } 100% { scale: 1 1; } }

/* bubliny za hero */
.m2-bubbles { position: absolute; inset: 0; overflow: hidden; z-index: -1; pointer-events: none; border-radius: inherit; }
.m2-bubbles i { position: absolute; top: 100%; width: var(--s); aspect-ratio: 1; border-radius: 50%; opacity: 0;
  background: radial-gradient(circle at 32% 30%, color-mix(in srgb, var(--p-surface, #fff) 85%, transparent) 0 12%, color-mix(in srgb, var(--c) 22%, transparent) 45%, color-mix(in srgb, var(--c) 45%, transparent) 100%);
  box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--c) 55%, transparent);
  animation: m2-rise var(--d, 12s) linear infinite; animation-delay: var(--dl, 0s); }
@keyframes m2-rise { 0% { translate: 0 0; opacity: 0; } 8% { opacity: .9; } 30% { translate: 14px calc(var(--h, 500px) * -.3); } 55% { translate: -12px calc(var(--h, 500px) * -.55); }
  80% { translate: 10px calc(var(--h, 500px) * -.8); opacity: .8; } 100% { translate: 0 calc(var(--h, 500px) * -1); opacity: 0; } }

/* karty se „nadechnou“ (zachová studiový záchvěv) */
@media (hover: hover) {
  html.m2-4 [data-m="card"]:hover { animation: m-wiggle .5s ease, m2-breathe 2.6s ease-in-out .5s infinite; }
  html.m2-4 .class-card:not([data-m="card"]):hover { animation: m2-breathe 2.6s ease-in-out infinite; } }
html.m2-4 :is([data-m="card"], .class-card).m2-tap { animation: m2-breathe 1.3s ease-in-out; }
@keyframes m2-breathe { 0%, 100% { scale: 1; } 50% { scale: 1.03; } }

/* plovoucí akční tlačítko */
.m2-fab { position: fixed; left: max(16px, env(safe-area-inset-left, 0px)); bottom: calc(16px + env(safe-area-inset-bottom, 0px)); z-index: 9990;
  display: inline-flex; align-items: center; gap: .55em; padding: .8em 1.2em .8em 1em; border-radius: 999px; text-decoration: none !important;
  font-weight: 800; font-size: 1rem; line-height: 1.1; background: var(--p-accent, #e8100e); color: var(--p-on-accent, #fff) !important;
  box-shadow: 0 10px 26px rgb(var(--p-shadow, 20 30 50) / .28); transition: translate .5s cubic-bezier(.2,1.2,.3,1), opacity .3s, scale .3s; }
.m2-fab::before { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  box-shadow: 0 0 0 0 color-mix(in srgb, var(--p-accent, #e8100e) 55%, transparent); animation: m2-fabpulse 2.2s ease-out infinite; }
@keyframes m2-fabpulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--p-accent, #e8100e) 55%, transparent); } 100% { box-shadow: 0 0 0 18px transparent; } }
.m2-fab svg { width: 1.35em; height: 1.35em; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.m2-fab.m2-hide { translate: 0 calc(100% + 32px); opacity: 0; visibility: hidden; transition: translate .5s, opacity .3s, visibility 0s linear .5s; }
@media (hover: hover) { .m2-fab:hover { scale: 1.06; } .m2-fab:hover svg { animation: m2-ico-hop .75s cubic-bezier(.3,1.6,.5,1); } }
.m2-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media (max-width: 600px) { .m2-fab { font-size: .9rem; padding: .7em 1em .7em .85em; } body:has(.m-toast.m-show) .m2-fab { translate: 0 calc(100% + 32px); opacity: 0; } }

/* ================= 5 · Šílený ================= */
/* vlnění pásů */
.m2-band { isolation: isolate; }
.m2-wave { position: absolute; left: 0; right: 0; bottom: 0; height: clamp(22px, 4vw, 44px); overflow: hidden; z-index: -1; pointer-events: none; }
.m2-wave span { position: absolute; inset: 0 auto 0 0; width: 200%; display: flex; animation: m2-wave 9s linear infinite; }
.m2-wave span + span { animation-duration: 14s; animation-direction: reverse; opacity: .8; }
.m2-wave svg { width: 50%; height: 100%; flex: none; display: block; }
.m2-wave span:first-child path { fill: color-mix(in srgb, var(--p-primary, #0047ab) 20%, transparent); }
.m2-wave span + span path { fill: color-mix(in srgb, var(--p-accent, #e8100e) 16%, transparent); }
@keyframes m2-wave { to { translate: -50% 0; } }

/* otáčející se dekorace v hero */
.m2-decos { position: absolute; inset: 0; overflow: hidden; z-index: -1; pointer-events: none; border-radius: inherit; }
.m2-deco { position: absolute; pointer-events: none; width: clamp(34px, 5vw, 72px); aspect-ratio: 1; animation: m2-spin 16s linear infinite; }
.m2-deco svg { width: 100%; height: 100%; display: block; }
.m2-deco:nth-of-type(2n) { animation-duration: 22s; animation-direction: reverse; }
@keyframes m2-spin { to { rotate: 360deg; } }

/* dýchající nadpisy */
html.m2-5 :is(h1, main h2):not(.m2-gradh) { animation: m2-breath 5s ease-in-out infinite; }
html.m2-5 .m2-gradh { animation: m2-grad 16s linear infinite, m2-breath 5s ease-in-out infinite; }
@keyframes m2-breath { 0%, 100% { scale: 1; } 50% { scale: 1.022; } }

/* samolepky */
.m2-sticker { position: fixed; z-index: 9989; pointer-events: none; padding: .45em .9em; border-radius: 14px; font-weight: 900; font-size: clamp(.95rem, 2.2vw, 1.25rem);
  line-height: 1.1; white-space: nowrap; background: var(--bg-c); color: var(--fg-c); box-shadow: 0 10px 24px rgb(var(--p-shadow, 20 30 50) / .25), inset 0 0 0 3px color-mix(in srgb, var(--fg-c) 25%, transparent);
  rotate: var(--r, -6deg); animation: m2-stick 3s cubic-bezier(.2,1.5,.4,1) both; }
@keyframes m2-stick { 0% { scale: 0; opacity: 0; } 14% { scale: 1.12; opacity: 1; } 22% { scale: 1; } 82% { scale: 1; opacity: 1; translate: 0 0; } 100% { scale: .6; opacity: 0; translate: 0 -24px; } }

.m2-canvas { position: fixed; inset: 0; pointer-events: none; }

@media print { .m2-top, .m2-fab, .m2-ring, .m2-sticker, .m2-canvas, .m2-blobs, .m2-bubbles, .m2-wave, .m2-decos { display: none !important; }
  .m2-sec > *, .m2-wa, .m2-ch { opacity: 1 !important; translate: none !important; scale: none !important; filter: none !important; animation: none !important; }
  .m2-mask { clip-path: none !important; } }
