/* ==========================================================================
   lukasmikula.cz – sekce sdílené homepage a stránkou Aplikace na míru (načítá je
   layout.php za site.css): ukázky aplikací (bento s animovanými náhledy), postup
   spolupráce, FAQ, kontakt a poptávkový formulář (chování: form.js).
   ========================================================================== */

/* --- software na míru (bento s animovanými ukázkami) ------------------ */
.bento { display: grid; grid-template-columns: repeat(6, 1fr); gap: clamp(14px, 2vw, 20px); }
.bento > * { grid-column: span 2; }
.bento > .span-3 { grid-column: span 3; }
.bento > .span-4 { grid-column: span 4; }
.tile { overflow: hidden; display: flex; flex-direction: column; }
.tile__vis { position: relative; height: 210px; overflow: hidden; border-bottom: 1px solid var(--border);
  background: radial-gradient(90% 90% at 50% 0%, color-mix(in srgb, var(--tag-c, var(--accent)) 18%, transparent), transparent 70%); }
.tile__vis::after { content: ""; position: absolute; inset: 0; background-image: linear-gradient(var(--grid-line) 1px, transparent 1px), linear-gradient(90deg, var(--grid-line) 1px, transparent 1px); background-size: 22px 22px; mask-image: radial-gradient(ellipse at 50% 30%, #000, transparent 75%); pointer-events: none; }
.tile__body { padding: 18px 20px 22px; display: grid; gap: 8px; }
.tile__body h3 { font-size: 1.15rem; letter-spacing: -.02em; }
.tile__body p { font-size: 14.5px; color: var(--text-2); }
@media (max-width: 980px) { .bento > *, .bento > .span-3, .bento > .span-4 { grid-column: span 3; } }
@media (max-width: 640px) { .bento { grid-template-columns: 1fr; } .bento > *, .bento > .span-3, .bento > .span-4 { grid-column: auto; } }

.mini { position: absolute; z-index: 1; border-radius: 14px; border: 1px solid var(--border-strong); background: color-mix(in srgb, var(--bg-elev) 88%, transparent); box-shadow: var(--gloss), 0 20px 40px -20px rgb(0 0 0 / .6); backdrop-filter: blur(8px); font-size: 12px; }

/* faktura */
.inv { left: 50%; top: 26px; width: 250px; translate: -50% 0; padding: 14px 16px; display: grid; gap: 8px; }
.inv__top { display: flex; justify-content: space-between; align-items: center; }
.inv__top b { font: 700 13px/1 var(--font-display); }
.inv__line { display: flex; justify-content: space-between; gap: 10px; color: var(--text-2); }
.inv__line i { display: block; height: 7px; border-radius: 4px; background: var(--surface-2); flex: 1; align-self: center; }
.inv__sum { display: flex; justify-content: space-between; padding-top: 8px; border-top: 1px dashed var(--border-strong); font-weight: 700; font-size: 13.5px; }
.inv__stamp { position: absolute; right: -14px; bottom: -14px; padding: 6px 10px; border-radius: 10px; background: var(--accent); color: var(--accent-ink); font: 700 11.5px/1 var(--font-body); rotate: -8deg; box-shadow: 0 8px 20px -6px var(--glow); animation: stamp 4s var(--ease) infinite; }

/* chat s asistentem */
.chat { left: 18px; right: 18px; top: 18px; bottom: 14px; padding: 12px; display: flex; flex-direction: column; gap: 8px; justify-content: flex-end; overflow: hidden; }
.chat__log { display: flex; flex-direction: column; gap: 8px; mask-image: linear-gradient(transparent, #000 40px); -webkit-mask-image: linear-gradient(transparent, #000 40px); }
.chat__log .bubble { opacity: .8; transform: none; }
.bubble { max-width: 86%; padding: 8px 11px; border-radius: 12px; line-height: 1.4; opacity: 0; transform: translateY(6px); }
.bubble--me { align-self: flex-end; background: var(--accent); color: var(--accent-ink); border-bottom-right-radius: 4px; font-weight: 500; }
.bubble--ai { align-self: flex-start; background: var(--surface-2); border: 1px solid var(--border); border-bottom-left-radius: 4px; }
.chat > .bubble--me { animation: msg 9s infinite; }
.chat .typing { animation: typing 9s infinite; }
.chat > .bubble--ai { animation: msg2 9s infinite; }
.typing { align-self: flex-start; display: flex; gap: 4px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); opacity: 0; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--text-3); animation: dots 1s infinite; }
.typing i:nth-child(2) { animation-delay: .15s; } .typing i:nth-child(3) { animation-delay: .3s; }

/* hlas */
.voice { left: 50%; top: 50%; translate: -50% -55%; width: 230px; padding: 16px; display: grid; gap: 12px; justify-items: center; text-align: center; }
.wave { display: flex; align-items: center; gap: 4px; height: 40px; }
.wave i { width: 4px; border-radius: 4px; background: linear-gradient(var(--accent), var(--accent-2)); animation: wave 1.1s ease-in-out infinite; }
.wave i:nth-child(odd) { animation-duration: .9s; }
.wave i:nth-child(3n) { animation-duration: 1.3s; }
.mic { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); box-shadow: 0 0 0 0 var(--glow); animation: ping 1.8s infinite; }
.mic svg { width: 20px; height: 20px; }

/* upozornění */
.notif-stack { position: absolute; z-index: 1; left: 50%; top: 18px; width: min(300px, calc(100% - 32px)); translate: -50% 0; display: grid; gap: 7px; }
.notif { position: relative; inset: auto; display: flex; gap: 10px; align-items: center; padding: 10px 12px; animation: slide-in 6s var(--ease) infinite; }
.notif:nth-child(2) { animation-delay: .4s; } .notif:nth-child(3) { animation-delay: .8s; }
.notif .icon-tile { width: 30px; height: 30px; border-radius: 9px; }
.notif .icon-tile svg { width: 15px; height: 15px; }
.notif > span:last-child { min-width: 0; }
.notif small { display: block; color: var(--text-3); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* graf */
.chart { left: 18px; right: 18px; top: 22px; bottom: 18px; padding: 14px; display: grid; grid-template-rows: auto 1fr; gap: 6px; }
.chart__head { display: flex; justify-content: space-between; align-items: baseline; }
.chart__head b { font: 700 20px/1 var(--font-display); letter-spacing: -.03em; }
.chart__head span { color: var(--accent-text); font-weight: 600; font-size: 11.5px; }
.chart svg { width: 100%; height: 100%; overflow: visible; }
.chart path.line { fill: none; stroke: url(#lg); stroke-width: 2.5; stroke-linecap: round; stroke-dasharray: 400; stroke-dashoffset: 400; animation: draw 5s var(--ease) infinite; }
.chart path.area { fill: url(#la); opacity: .5; }

/* --- proces ------------------------------------------------------------- */
.process { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(14px, 2vw, 20px); counter-reset: p; position: relative; }
.process::before { content: ""; position: absolute; left: 6%; right: 6%; top: 47px; height: 1px; background: linear-gradient(90deg, transparent, var(--border-strong), transparent); }
.process .card { padding: 24px; display: grid; gap: 12px; align-content: start; counter-increment: p; }
.process__num { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; font: 700 15px/1 var(--font-display); background: var(--bg); border: 1px solid var(--border-strong); color: var(--accent-text); box-shadow: 0 0 0 6px var(--bg), 0 0 24px -4px var(--glow); }
.process__num::before { content: "0" counter(p); }
.process h3 { font-size: 1.15rem; }
.process p { font-size: 14.5px; color: var(--text-2); }
.process__time { font-size: 12.5px; color: var(--text-3); font-weight: 600; }
@media (max-width: 980px) { .process { grid-template-columns: repeat(2, 1fr); } .process::before { display: none; } }
@media (max-width: 560px) { .process { grid-template-columns: 1fr; } }

/* --- FAQ ------------------------------------------------------------- */
.faq-layout { display: grid; grid-template-columns: minmax(260px, .72fr) 2fr; gap: clamp(24px, 4vw, 56px); align-items: start; }
.faq-aside { position: sticky; top: calc(var(--header-h) + 24px); display: grid; gap: 18px; justify-items: start; }
.faq-aside .h2 { font-size: clamp(1.9rem, 1.2rem + 2vw, 2.6rem); }
.faq-ask { display: grid; grid-template-columns: 56px 1fr; gap: 12px 14px; align-items: center; padding: 16px; width: 100%; margin-top: 6px; }
.faq-ask img { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; border: 1px solid var(--border-strong); }
.faq-ask b { display: block; font: 650 1.02rem/1.25 var(--font-display); }
.faq-ask span { font-size: 13.5px; color: var(--text-2); }
.faq-ask__actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; }
.faq__col, .faq__group { display: grid; gap: 8px; }
.faq__col { gap: clamp(18px, 3vw, 28px); }
.faq__cat { display: flex; align-items: center; gap: 10px; margin: 0 0 4px; font: 650 .95rem/1.2 var(--font-display); color: var(--text-2); letter-spacing: -.01em; }
.faq__cat .icon-tile { width: 30px; height: 30px; border-radius: 9px; }
.faq__cat .icon-tile svg { width: 15px; height: 15px; }
@media (max-width: 1040px) { .faq-layout { grid-template-columns: 1fr; } .faq-aside { position: static; } .faq-ask { max-width: 520px; } }

/* --- kontakt ------------------------------------------------------------- */
.contact { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(20px, 4vw, 48px); padding: clamp(22px, 4vw, 48px); overflow: hidden; }
.contact::before { opacity: 1; background: radial-gradient(700px circle at 0% 0%, var(--accent-soft), transparent 50%); }
.contact__info { display: grid; gap: 20px; align-content: start; }
.next-steps { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 14px; counter-reset: n; }
.next-steps li { display: grid; grid-template-columns: 30px 1fr; gap: 12px; font-size: 15px; color: var(--text-2); counter-increment: n; }
.next-steps li::before { content: counter(n); width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font: 700 13px/1 var(--font-display); border: 1px solid var(--border-strong); color: var(--accent-text); background: var(--surface); }
.next-steps b { color: var(--text); font-weight: 600; }
.direct { display: grid; gap: 10px; padding-top: 18px; border-top: 1px solid var(--border); }
.direct a { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 600; }
.direct a svg { width: 18px; height: 18px; color: var(--accent-text); }
.direct a:hover { color: var(--accent-text); }

.form { display: grid; gap: 14px; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.input { display: grid; gap: 7px; }
.input label, .input legend { font-size: 13.5px; font-weight: 600; color: var(--text-2); padding: 0; }
.input input, .input textarea {
  width: 100%; padding: 13px 15px; border-radius: 12px; border: 1px solid var(--border-strong);
  background: color-mix(in srgb, var(--bg) 55%, transparent); color: var(--text); font: inherit; font-size: 15.5px;
  transition: border-color .2s, box-shadow .2s;
}
.input textarea { min-height: 120px; resize: vertical; }
.input input:focus, .input textarea:focus { outline: none; border-color: var(--focus); box-shadow: 0 0 0 4px color-mix(in srgb, var(--focus) 22%, transparent); }
.input input::placeholder, .input textarea::placeholder { color: var(--text-3); }
.input .err { font-size: 13px; color: var(--danger); display: none; }
.input.is-invalid input, .input.is-invalid textarea { border-color: var(--danger); }
.input.is-invalid .err { display: block; }
fieldset.input { border: 0; margin: 0; padding: 0; min-width: 0; }
.pick { display: flex; flex-wrap: wrap; gap: 8px; }
.pick label { position: relative; cursor: pointer; }
.pick input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; pointer-events: none; }
.pick span { display: inline-flex; align-items: center; padding: 9px 14px; border-radius: 999px; border: 1px solid var(--border-strong); background: var(--surface); font-size: 14px; font-weight: 500; color: var(--text-2); transition: all .2s; }
.pick input:checked + span { background: var(--accent); color: var(--accent-ink); border-color: transparent; box-shadow: 0 6px 16px -6px var(--glow); }
.pick input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 2px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; font-size: 13px; color: var(--text-3); }
.form__foot a { color: var(--text-2); }
.form__done { display: none; padding: 28px; border-radius: 16px; text-align: center; background: var(--surface); border: 1px solid var(--border-strong); }
.form__done svg { width: 48px; height: 48px; margin: 0 auto 12px; color: var(--accent-text); }
.form.is-sent > :not(.form__done) { display: none; }
.form.is-sent .form__done { display: block; }
@media (max-width: 900px) { .contact { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .form__row { grid-template-columns: 1fr; } }

@media (prefers-reduced-motion: reduce) {
  .bubble, .notif { opacity: 1 !important; transform: none !important; }
  .typing { display: none; }
}

@keyframes stamp { 0%, 30% { opacity: 0; transform: scale(1.8); } 40%, 85% { opacity: 1; transform: scale(1); } 100% { opacity: 0; transform: scale(1); } }
@keyframes msg { 0%, 5% { opacity: 0; transform: translateY(6px); } 10%, 92% { opacity: 1; transform: none; } 100% { opacity: 0; } }
@keyframes typing { 0%, 14% { opacity: 0; height: 0; padding-block: 0; } 16%, 38% { opacity: 1; height: 26px; padding-block: 10px; } 40%, 100% { opacity: 0; height: 0; padding-block: 0; } }
@keyframes msg2 { 0%, 40% { opacity: 0; transform: translateY(6px); } 45%, 92% { opacity: 1; transform: none; } 100% { opacity: 0; } }
@keyframes dots { 0%, 100% { opacity: .3; } 50% { opacity: 1; } }
@keyframes wave { 0%, 100% { height: 8px; } 50% { height: 38px; } }
@keyframes slide-in { 0% { opacity: 0; transform: translateY(-10px); } 10%, 85% { opacity: 1; transform: none; } 100% { opacity: 0; } }
@keyframes draw { 0% { stroke-dashoffset: 400; } 45%, 90% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: 0; opacity: 0; } }
