/* JMD Labs v19 (5. 12. 2026, Jakubova spätná väzba na živý web v18):
   1) pásy kariet sa ťahajú myšou (kurzor ruka), šípky pri nadpise preč, pod pásom tenký ukazovateľ polohy
   2) služby ako uzavreté karty: obrázok hore, nadpis a veta pod ním
   3) referencie = „Systémy, které jsme postavili“: ukážka obrazovky každého systému, Předtím / Teď, bez odvetvia
      smer A: karty so snímkou hore (2,5 na šírku), smer B: veľké prípadové štúdie (text vľavo, ukážka vpravo) */

/* ================================================================ pás: ťahanie myšou */
@media (hover: hover) and (pointer: fine) {
  .kar__track.is-drag { cursor: grab; }
  .kar__track.is-drag a, .kar__track.is-drag button { cursor: pointer; }
}
.kar__track.is-dragging { cursor: grabbing; scroll-snap-type: none; scroll-behavior: auto; user-select: none; -webkit-user-select: none; }
.kar__track.is-gliding { scroll-snap-type: none; }
.kar__track img { -webkit-user-drag: none; }

/* ukazovateľ polohy pod pásom (len ozdoba; posúva sa ťahaním, kolieskom do strany alebo klávesnicou) */
.kar__bar { position: relative; height: 3px; margin-top: 4px; border-radius: 2px; overflow: hidden;
  background: color-mix(in oklab, var(--p-ink) 9%, transparent); }
.kar__bar[hidden] { display: none; }
.kar__bar > i { position: absolute; left: 0; top: 0; bottom: 0; width: 30%; border-radius: inherit; background: var(--p-ink);
  will-change: transform; }
@media (max-width: 639px) { .kar__bar { margin-top: 0; } }

/* ================================================================ služby: uzavretá karta, obrázok hore */
#sluzby .sluzba { --c-gap: 8px; align-self: stretch; }
#sluzby .sluzba > .sluzba__panel { --p-h: auto; aspect-ratio: 16 / 11; min-height: 0; margin-bottom: 24px; }
#sluzby .sluzba > h3 { font: 400 clamp(21px, .5vw + 16px, 24px)/1.25 var(--font-display); letter-spacing: -0.02em; text-wrap: balance; }
#sluzby .sluzba > p { margin-top: 8px; max-width: none; font-size: 17px; line-height: 1.5; text-wrap: pretty; }
#sluzby .sluzby__data { margin-top: var(--s-6); }
@media (max-width: 639px) { #sluzby .sluzba > .sluzba__panel { aspect-ratio: 4 / 3; margin-bottom: 18px; } #sluzby .sluzba > p { font-size: 16px; } }

/* ================================================================ referencie: spoločné */
#reference .refs { counter-reset: none; }
#reference .ref { position: relative; display: flex; flex-direction: column; align-items: stretch; gap: 0; align-self: stretch; height: auto;
  padding: var(--c-pad); border-radius: var(--c-r); background: var(--p-bg); --c-gap: 8px; }
#reference .ref__nadpis { margin: 0; min-height: 0; font: 400 clamp(21px, .5vw + 16px, 24px)/1.25 var(--font-display); letter-spacing: -0.02em; text-wrap: balance; }
#reference .ref__zmena { display: grid; gap: 14px; margin: 18px 0 0; padding: 0; border: 0; }
#reference .ref__zmena > div { display: grid; gap: 2px; }
#reference .ref__zmena dt { font-size: 15px; line-height: 22px; color: var(--p-muted); }
#reference .ref__zmena dd { margin: 0; font-size: 17px; line-height: 1.5; text-wrap: pretty; }
#reference .ref__pred dd { color: color-mix(in oklab, var(--p-ink) 68%, #fff); }
#reference .ref__ted dt { color: var(--p-ink); font-weight: 500; }
#reference .ref__ted dt::after { content: ""; display: inline-block; width: 7px; height: 7px; margin-left: 8px; border-radius: 50%; background: var(--p-accent); vertical-align: 1px; }
#reference .ref__tagy { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: auto 0 0; padding: 22px 0 0; }
#reference .ref__tagy li { display: inline-flex; align-items: center; height: 30px; padding: 0 12px; border-radius: 99px;
  background: var(--p-surface); font-size: 14px; line-height: 1; color: var(--p-ink); white-space: nowrap; }

/* panel s ukážkou systému: teplé pozadie ako „Týdenní přehled“ v službách */
#reference .ref__panel { position: relative; display: grid; place-items: center; overflow: clip; container-type: size; box-sizing: border-box; padding-bottom: 24px;
  background: #f4ede7; --p-h: auto; min-height: 0; }
#reference .ref__panel::before { display: none; }
/* ukážky majú vymyslené údaje: nenápadne to povieme priamo na obrázku */
#reference .ref__ilu { position: absolute; z-index: 2; left: 14px; bottom: 9px; font-size: 13px; line-height: 1; color: color-mix(in oklab, var(--p-ink) 55%, transparent); }
@media (max-width: 639px) { #reference .ref__ilu { left: 10px; bottom: 8px; font-size: 12px; } }
/* žiara: stred gule vždy pri pravom okraji a v 55 % výšky, aj vo vysokom paneli (smer B na tablete) */
#reference .ref__panel > .rp__glow { --gw: max(150cqi, 180cqh); width: var(--gw); left: calc(106cqi - .68 * var(--gw)); top: calc(55cqh - .55 * var(--gw) / 1.8); }

/* ================================================================ smer A: karty so snímkou hore */
#reference .ref--a > .ref__panel { aspect-ratio: 16 / 10.5; margin-bottom: 24px; }

/* ================================================================ smer B: veľké prípadové štúdie */
:root { --kar-inner: calc(min(100vw, var(--container) + 2 * var(--kar-bleed)) - 2 * var(--kar-bleed)); }
@media (min-width: 1024px) {
  #reference .refs--b { --kar-w: calc(var(--kar-inner) * .86); }
  #reference .ref--b { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); column-gap: clamp(28px, 3.5vw, 56px);
    min-height: clamp(440px, 36vw, 520px); padding: clamp(32px, 3vw, 44px); }
  #reference .ref--b > .ref__text { display: flex; flex-direction: column; min-width: 0; padding-block: 8px; }
  #reference .ref--b > .ref__panel { order: 0; aspect-ratio: auto; height: auto; align-self: stretch;
    margin: calc(var(--c-gap) - clamp(32px, 3vw, 44px)) calc(var(--c-gap) - clamp(32px, 3vw, 44px)) calc(var(--c-gap) - clamp(32px, 3vw, 44px)) 0;
    border-radius: calc(var(--c-r) - var(--c-gap)); --mk-max: 16px; }
  #reference .ref--b .ref__nadpis { font-size: clamp(26px, 1vw + 16px, 34px); line-height: 1.15; }
  #reference .ref--b .ref__zmena { gap: 18px; margin-top: 28px; }
  #reference .ref--b .ref__zmena dd { font-size: 18px; }
}
@media (max-width: 1023px) {
  #reference .ref--b > .ref__text { display: flex; flex-direction: column; flex: 1; }
  #reference .ref--b > .ref__panel { order: -1; aspect-ratio: 4 / 3; margin-bottom: 24px; }
}

/* ================================================================ ukážky obrazoviek (mk) – všetko v em, mierka podľa panelu */
#reference .ref__panel > :is(.mk, .mk-tablet) {
  --mk-w: 27; --mk-h: 21;
  position: relative; z-index: 1; box-sizing: border-box; width: calc(var(--mk-w) * 1em);
  font-size: min(var(--mk-max, 14px), calc((100cqi - 40px) / var(--mk-w)), calc((100cqh - 36px) / var(--mk-h)));
}
#reference .ref__panel > .mk--app { --mk-w: 30; --mk-h: 20.5; }
#reference .ref__panel > .mk--ag { --mk-h: 20; }
#reference .ref__panel > .mk-tablet { --mk-w: 26; --mk-h: 21.5; }

.mk { display: grid; gap: .85em; margin: 0; padding: 1.15em; border-radius: 1em; background: #fff; color: var(--p-ink);
  font-family: var(--font-text); line-height: 1.35; text-align: left;
  box-shadow: 0 .07em .15em rgb(40 20 5 / .06), 0 1.6em 3.2em -1.2em rgb(90 45 15 / .28); }
.mk__head { display: flex; align-items: center; justify-content: space-between; gap: .6em; min-width: 0; }
.mk__title { overflow: hidden; font-weight: 600; font-size: 1.07em; letter-spacing: -0.01em; white-space: nowrap; text-overflow: ellipsis; }
.mk__chip { display: inline-flex; flex: none; align-items: center; gap: .45em; height: 1.75em; padding: 0 .7em; border-radius: 99px;
  background: #f2f2f0; font-size: .82em; color: #555; white-space: nowrap; }
.mk__chip i { width: .5em; height: .5em; border-radius: 50%; background: #1f9d55; }
.mk__chip.is-you { background: #fff3ec; color: #b83a0b; }
.mk__dots { display: inline-flex; flex: none; gap: .35em; }
.mk__dots i { width: .62em; height: .62em; border-radius: 50%; background: #e4e1dc; }
.mk__list { display: grid; gap: .4em; margin: 0; padding: 0; list-style: none; }
.mk__list > li { display: flex; align-items: center; gap: .65em; min-width: 0; padding: .5em .6em; border-radius: .75em; box-shadow: inset 0 0 0 1px #eeebe7; }
.mk__bot { display: grid; flex: none; place-items: center; width: 1.95em; height: 1.95em; border-radius: .6em; background: #0d0d0d; color: #fff; }
.mk__bot svg { width: 1.15em; height: 1.15em; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.mk__co { flex: 1; min-width: 0; overflow: hidden; font-size: .95em; white-space: nowrap; text-overflow: ellipsis; }
.mk__ok { display: grid; flex: none; place-items: center; width: 1.55em; height: 1.55em; border-radius: 50%; background: #e7f5ec; color: #1f9d55; }
.mk__ok svg { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.mk__st { flex: none; padding: .28em .65em; border-radius: 99px; background: #f2f2f0; font-size: .8em; color: #555; white-space: nowrap; }
.mk__st.is-done { background: #e7f5ec; color: #17713d; }
.mk__st.is-you { background: #fff3ec; color: #b83a0b; }

/* 1 cestovní příkaz */
.mk-cp__pole { display: grid; grid-template-columns: 1fr 1fr; gap: .45em; }
.mk-cp__pole > span { display: grid; gap: .05em; min-width: 0; overflow: hidden; padding: .5em .7em; border-radius: .7em; background: #f6f4f1;
  font-size: .92em; font-weight: 500; white-space: nowrap; text-overflow: ellipsis; }
.mk-cp__pole small { font-size: .82em; font-weight: 400; color: #6b6b6b; }

/* 2 agenti kanceláře */
.mk-ag__rows .mk__co { display: grid; gap: .05em; }
.mk-ag__rows .mk__co b { font-weight: 600; }
.mk-ag__rows .mk__co small { overflow: hidden; font-size: .86em; color: #6b6b6b; text-overflow: ellipsis; }

/* 3 firemní aplikace */
.mk--app { gap: 0; padding: 0; overflow: hidden; }
.mk-app__bar { padding: .75em 1em; border-bottom: 1px solid #efece8; }
.mk-app__bar .mk__title { flex: 1; }
.mk-app__body { display: grid; grid-template-columns: 7.6em minmax(0, 1fr); }
.mk-app__zdroje { display: grid; align-content: start; gap: .2em; margin: 0; padding: .8em .6em; list-style: none; background: #faf8f6; border-right: 1px solid #efece8; }
.mk-app__zdroje li { display: flex; align-items: center; gap: .5em; padding: .4em .5em; border-radius: .55em; font-size: .88em; white-space: nowrap; }
.mk-app__zdroje li:first-child { background: #fff; box-shadow: inset 0 0 0 1px #eeebe7; }
.mk-app__zdroje i { width: .5em; height: .5em; border-radius: 50%; background: #1f9d55; }
.mk-app__main { display: grid; gap: .7em; min-width: 0; padding: .85em; }
.mk-app__hledat { display: flex; align-items: center; gap: .5em; height: 2.3em; padding: 0 .75em; overflow: hidden; border-radius: .7em;
  box-shadow: inset 0 0 0 1px #e6e2dd; font-size: .9em; color: #6b6b6b; white-space: nowrap; }
.mk-app__hledat svg { flex: none; width: 1.05em; height: 1.05em; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; }
.mk-app__hledat span { overflow: hidden; text-overflow: ellipsis; }
.mk-app__kpi { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .45em; }
.mk-app__kpi > span { display: grid; gap: .05em; min-width: 0; padding: .45em .6em; border-radius: .7em; background: #f6f4f1; }
.mk-app__kpi small { overflow: hidden; font-size: .78em; color: #6b6b6b; white-space: nowrap; text-overflow: ellipsis; }
.mk-app__kpi b { font-weight: 600; font-size: 1.3em; line-height: 1.15; letter-spacing: -0.02em; }
.mk-app__kpi .is-warn b { color: #b83a0b; }
.mk-app__tab > li { justify-content: space-between; padding: .45em .6em; font-size: .92em; }
.mk-app__tab > li > span:first-child { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }

/* 4 kuchyně: tablet */
.mk-tablet { margin: 0; padding: .65em; border-radius: 1.55em; background: #161616;
  box-shadow: inset 0 0 0 1px #2b2b2b, 0 .07em .15em rgb(40 20 5 / .1), 0 1.8em 3.4em -1.2em rgb(90 45 15 / .36); }
.mk-tablet > .mk { border-radius: 1em; box-shadow: none; }
.mk__chip.is-live { background: #e7f5ec; color: #17713d; }
.mk__chip.is-live i { animation: mk-zivo 1.8s ease-in-out infinite; }
@keyframes mk-zivo { 50% { opacity: .25; } }
.mk-ku__jidla > li { display: grid; grid-template-columns: minmax(0, 1fr) auto; row-gap: .4em; padding: .55em .7em .6em; }
.mk-ku__jidla span { overflow: hidden; font-size: .95em; white-space: nowrap; text-overflow: ellipsis; }
.mk-ku__jidla b { font-weight: 600; font-size: 1.1em; line-height: 1; font-variant-numeric: tabular-nums; }
.mk-ku__jidla i { grid-column: 1 / -1; height: .3em; border-radius: 99px; background: #f0ece7; position: relative; overflow: hidden; }
.mk-ku__jidla i::after { content: ""; position: absolute; inset: 0 auto 0 0; width: calc(var(--w, .5) * 100%); border-radius: inherit; background: var(--p-accent); transform-origin: left; }
.mk-ku__nova { display: flex; align-items: center; gap: .6em; padding: .55em .7em; border-radius: .75em; background: #0d0d0d; color: #fff; font-size: .9em; }
.mk-ku__nova > span:nth-child(2) { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.mk-ku__plus { display: grid; flex: none; place-items: center; min-width: 2em; height: 1.7em; padding: 0 .4em; border-radius: 99px; background: var(--p-accent); color: #0d0d0d; font-weight: 600; }
.mk-ku__nova small { flex: none; font-size: .85em; color: #a8a8a8; }

/* vstup: riadky ukážky sa postupne objavia, keď karta príde na obrazovku (aj po potiahnutí pásu) */
@media (prefers-reduced-motion: no-preference) {
  .mk__list > li { transition: opacity 420ms var(--ease-out), translate 520ms var(--ease-out); transition-delay: calc(var(--i, 0) * 110ms + 250ms); }
  .mk__ok { transition: scale 380ms cubic-bezier(.3, 1.5, .5, 1), opacity 200ms ease; transition-delay: calc(var(--i, 0) * 260ms + 700ms); }
  .mk-ku__jidla i::after { transition: transform 900ms var(--ease-out); transition-delay: calc(var(--i, 0) * 110ms + 450ms); }
  .mk-ku__nova { transition: opacity 400ms var(--ease-out) 1300ms, translate 520ms var(--ease-out) 1300ms; }
  html.rv .ref:not(.is-in) .mk__list > li { opacity: 0; translate: 0 .7em; }
  html.rv .ref:not(.is-in) .mk__ok { opacity: 0; scale: .3; }
  html.rv .ref:not(.is-in) .mk-ku__jidla i::after { transform: scaleX(.04); }
  html.rv .ref:not(.is-in) .mk-ku__nova { opacity: 0; translate: 0 .8em; }
}
@media (prefers-reduced-motion: reduce) { .mk__chip.is-live i { animation: none; } }

/* ================================================================ mobil */
@media (max-width: 639px) {
  #reference .ref { padding: 20px; }
  #reference .ref > .ref__panel { aspect-ratio: 5 / 4; margin-bottom: 18px; }
  #reference .ref__zmena { gap: 12px; margin-top: 14px; }
  #reference .ref__zmena dd { font-size: 16px; }
  #reference .ref__tagy { padding-top: 18px; }
  #reference .ref__tagy li { height: 28px; padding: 0 10px; font-size: 13.5px; }
}
