/* Barvy vycházejí z bezpečnostního značení: zelená = úniková cesta, červená = požární technika */
:root {
  --paper: #fbfcfb;
  --paper-2: #eef2f1;
  --ink: #1c2b36;
  --ink-2: #4b5d69;
  --line: #c9d3d8;
  --plan: #8fa3b0;
  --red: #b3261e;
  --green: #1e7a4c;
  --green-dk: #155c39;
  --todo: #fff1b8;

  /* Jiskřík – vlastní maskot, odstíny mimo bezpečnostní značení */
  --sp-g: #2f9a5c;
  --sp-g2: #227346;
  --sp-c: #f6e8c3;
  --sp-c2: #e3cf98;
  --sp-r: #c7372c;
  --sp-r2: #8f1f18;
  --sp-pink: #f2a0a8;

  --f-body: "Barlow", system-ui, sans-serif;
  --f-head: "Barlow Semi Condensed", "Barlow", system-ui, sans-serif;

  --wrap: 1120px;
  --gut: 16px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 124px; }
@media (min-width: 900px) { html { scroll-padding-top: 80px; } }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--f-body);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-family: var(--f-head); font-weight: 700; line-height: 1.1; margin: 0; }
h1 { font-size: clamp(2.3rem, 5.2vw, 3.75rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.75rem, 3.4vw, 2.5rem); margin-bottom: 1.5rem; }
h3 { font-size: 1.3rem; font-weight: 600; margin-bottom: .4rem; }
p { margin: 0 0 1em; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--green); outline-offset: 3px; border-radius: 2px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gut); }
@media (min-width: 700px) { .wrap { padding: 0 32px; } }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 99; background: var(--ink); color: #fff; padding: 8px 12px; }

.todo { background: var(--todo); padding: 0 .25em; border-radius: 2px; }

/* Hlavička */
.top { position: sticky; top: 0; z-index: 10; background: rgba(251,252,251,.94); backdrop-filter: blur(6px); border-bottom: 1px solid var(--line); }
.top__in { display: flex; flex-wrap: wrap; align-items: center; gap: 0 24px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand__sign { width: 36px; height: 36px; flex: none; }
.brand__sign rect:first-child { fill: var(--red); }
.brand__sign path, .brand__sign rect:last-child { fill: #fff; }
.brand__txt { display: flex; flex-direction: column; line-height: 1.1; }
.brand__txt strong { font-family: var(--f-head); font-size: 1.15rem; }
.brand__txt span { font-size: .85rem; color: var(--ink-2); }
.nav { display: flex; gap: 4px; order: 3; width: 100%; overflow-x: auto; scrollbar-width: none; margin: 0 -8px; padding: 0 8px 6px; }
.nav::-webkit-scrollbar { display: none; }
.nav a { padding: 6px 10px 5px; border-bottom: 3px solid transparent; text-decoration: none; color: var(--ink-2); font-weight: 500; white-space: nowrap; }
.nav a:hover { color: var(--ink); }
.nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--green); }
.nav__cta { color: var(--green-dk); font-weight: 600; }
.top__tel { margin-left: auto; font-weight: 600; text-decoration: none; white-space: nowrap; }
@media (min-width: 900px) { .nav { order: 0; width: auto; margin: 0 0 0 auto; padding: 0; gap: 8px; overflow: visible; } .top__tel { margin-left: 8px; } }

/* Záložky – bez JS se zobrazí všechno pod sebou */
.js .page { display: none; }
.js .page.is-active { display: block; }

/* Tlačítka */
.btn { display: inline-flex; align-items: center; gap: 10px; min-height: 50px; padding: 0 22px; font: 600 1.05rem var(--f-body); text-decoration: none; border-radius: 4px; border: 2px solid transparent; cursor: pointer; }
.btn svg { width: 24px; height: 24px; fill: currentColor; }
.btn--exit { background: var(--green); color: #fff; }
.btn--exit:hover { background: var(--green-dk); }
.btn--ghost { border-color: var(--ink); color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: #fff; }

/* Úvod */
.hero { padding: 48px 0 72px; border-bottom: 1px solid var(--line); }
.hero__in { display: grid; gap: 40px; align-items: center; }
@media (min-width: 960px) { .hero { padding: 72px 0 80px; } .hero__in { grid-template-columns: 1fr 1.05fr; gap: 56px; } }
.hero__who { color: var(--ink-2); font-weight: 500; margin-bottom: 1rem; }
.hero h1 { max-width: 14ch; margin-bottom: 1.25rem; }
.lead { font-size: 1.2rem; color: var(--ink-2); max-width: 36em; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 32px; }
.hero__facts { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px 20px; color: var(--ink-2); font-size: .98rem; }
.hero__facts li::before { content: ""; display: inline-block; width: 8px; height: 8px; background: var(--green); margin-right: 8px; vertical-align: 2px; }

/* Evakuační plán */
.plan { position: relative; margin: 0; background: #fff; border: 2px solid var(--ink); border-radius: 4px; padding: 12px 12px 0; }
.plan svg { display: block; width: 100%; height: auto; }
.plan__grid { stroke: var(--paper-2); stroke-width: 1; }
.plan__wall { fill: none; stroke: var(--ink); stroke-width: 5; stroke-linejoin: miter; }
.plan__door { fill: none; stroke: var(--plan); stroke-width: 1.5; stroke-dasharray: 3 3; }
.plan__room { font: 500 13px var(--f-body); fill: var(--plan); }
.plan__pha rect, .plan__hydrant rect { fill: var(--red); }
.plan__pha path { fill: #fff; }
.plan__hydrant circle, .plan__hydrant path { fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.plan__route { fill: none; stroke: var(--green); stroke-width: 7; stroke-linejoin: round; stroke-linecap: round; stroke-dasharray: 900; stroke-dashoffset: 900; animation: route 1.8s .4s cubic-bezier(.6,.1,.3,1) forwards; }
.plan__arrowhead { fill: var(--green); }
.plan__here circle:first-child { fill: var(--red); opacity: .2; }
.plan__here-dot { fill: var(--red); }
.plan__label { font: 600 14px var(--f-body); fill: var(--red); }
.plan__exit rect { fill: var(--green); }
.plan__exit-door { fill: none !important; stroke: #fff; stroke-width: 2; }
.plan__exit-person { fill: #fff !important; }
.plan__exit-arrow { fill: none !important; stroke: #fff; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.plan__north path { fill: var(--ink); }
.plan__north text { font: 600 13px var(--f-body); fill: var(--ink); text-anchor: middle; }
@keyframes route { to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) { .plan__route { animation: none; stroke-dashoffset: 0; } }
.plan__legend { display: flex; flex-wrap: wrap; gap: 6px 18px; padding: 12px 110px 12px 4px; border-top: 1px solid var(--line); margin-top: 8px; font-size: .88rem; color: var(--ink-2); }
.lg { display: inline-block; width: 12px; height: 12px; margin-right: 6px; vertical-align: -1px; }
.lg--here { background: var(--red); border-radius: 50%; }
.lg--route { background: var(--green); height: 5px; width: 18px; vertical-align: 2px; }
.lg--pha, .lg--hyd { background: var(--red); border-radius: 2px; width: 22px; height: 22px; vertical-align: -6px; }
.lg--pha svg, .lg--hyd svg { width: 100%; height: 100%; }
.lg--pha path { fill: #fff; }
.lg--hyd circle, .lg--hyd path { fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.lg--exit { background: var(--green); border-radius: 2px; width: 30px; height: 22px; vertical-align: -6px; }
.lg--exit svg { width: 100%; height: 100%; }
.lg--exit rect { fill: none; stroke: #fff; stroke-width: 1.8; }
.lg--exit circle, .lg--exit path:not(.lg__exit-arrow) { fill: #fff; }
.lg--exit .lg__exit-arrow { fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* Sekce – společné odsazení */
.who, .services, .steps, .faq, .about, .contact { padding: 64px 0; }
@media (min-width: 960px) { .who, .services, .steps, .faq, .about, .contact { padding: 88px 0; } }

/* Pro koho */
.who__grid { display: grid; gap: 32px; }
@media (min-width: 800px) { .who__grid { grid-template-columns: repeat(2, 1fr); gap: 36px 48px; } }
.who article { border-top: 3px solid var(--ink); padding-top: 16px; }
.who p { color: var(--ink-2); margin: 0; }
.who__more { margin: 32px 0 0; font-weight: 600; }
.who__more a { color: var(--green-dk); text-decoration: none; }
.who__more a:hover { text-decoration: underline; }

/* Služby */
.services { background: var(--paper-2); }
.svc--main { display: grid; gap: 24px; background: var(--ink); color: #fff; padding: 28px; border-radius: 4px; margin-bottom: 40px; }
@media (min-width: 860px) { .svc--main { grid-template-columns: 1.3fr 1fr; gap: 48px; padding: 40px; } }
.svc--main h3 { font-size: 1.75rem; margin-bottom: .75rem; }
.svc--main p { color: #d5dde2; margin: 0; }
.svc__incl-h { font-family: var(--f-head); font-weight: 600; font-size: 1.1rem; color: #fff !important; margin: 0 0 4px !important; }
.svc__incl { list-style: none; margin: 0; padding: 0; }
.svc__incl li { padding: 10px 0 10px 30px; border-bottom: 1px solid rgba(255,255,255,.14); position: relative; }
.svc__incl li:last-child { border-bottom: 0; }
.svc__incl li::before { content: ""; position: absolute; left: 0; top: 15px; width: 16px; height: 9px; border-left: 3px solid #5fd08f; border-bottom: 3px solid #5fd08f; transform: rotate(-45deg); }
.svc__list { display: grid; gap: 0 48px; }
@media (min-width: 800px) { .svc__list { grid-template-columns: 1fr 1fr; } }
.svc__list .svc { padding: 22px 0 22px 34px; border-top: 1px solid var(--line); position: relative; }
.svc__list .svc::before { content: ""; position: absolute; left: 0; top: 28px; width: 18px; height: 18px; background: var(--red); border-radius: 2px; }
.svc__list .svc p { color: var(--ink-2); margin: 0; }

/* Kdo je kdo */
.why { padding: 64px 0; border-top: 1px solid var(--line); }
@media (min-width: 960px) { .why { padding: 88px 0; } }
.why h2 { margin-bottom: .5rem; }
.why__lead { color: var(--ink-2); max-width: 60ch; margin-bottom: 2rem; }
.why__grid { display: grid; gap: 24px; }
@media (min-width: 800px) { .why__grid { grid-template-columns: repeat(3, 1fr); } }
.why__grid article { padding: 22px 24px; border: 2px solid var(--line); border-radius: 4px; }
.why__grid article p { color: var(--ink-2); margin: 0; }
.why__top { border-color: var(--green) !important; background: #fff; position: relative; }
.why__top::before { content: "To je Radek"; position: absolute; top: -12px; left: 20px; background: var(--green); color: #fff; font: 600 .8rem var(--f-body); padding: 2px 10px; border-radius: 999px; }

/* Postup */
.steps__list { list-style: none; margin: 0; padding: 0; counter-reset: s; display: grid; gap: 28px; }
@media (min-width: 900px) { .steps__list { grid-template-columns: repeat(5, 1fr); gap: 0; } }
.steps__list li { counter-increment: s; position: relative; padding-left: 56px; }
.steps__list li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 40px; height: 40px; border-radius: 50%; background: var(--green); color: #fff; font: 700 1.2rem/40px var(--f-head); text-align: center; }
@media (min-width: 900px) {
  .steps__list li { padding: 60px 20px 0 0; }
  .steps__list li::after { content: ""; position: absolute; top: 19px; left: 44px; right: 4px; border-top: 3px dashed var(--green); }
  .steps__list li:last-child::after { display: none; }
}
.steps p { color: var(--ink-2); margin: 0; }

/* Otázky */
.faq { border-top: 1px solid var(--line); }
.faq__in { display: grid; gap: 8px; }
@media (min-width: 900px) { .faq__in { grid-template-columns: 1fr 2fr; gap: 48px; align-items: start; } .faq__side { position: sticky; top: 96px; } }
.faq__side .hasik { margin-top: 8px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq details:first-child { border-top: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; padding: 18px 40px 18px 0; font-weight: 600; font-size: 1.1rem; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; position: absolute; right: 8px; top: 24px; width: 10px; height: 10px; border-right: 2.5px solid var(--ink); border-bottom: 2.5px solid var(--ink); transform: rotate(45deg); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(-135deg); top: 29px; }
.faq details p { color: var(--ink-2); max-width: 62ch; padding-bottom: 8px; }
.faq details p + p { margin-top: -4px; }

/* O mně */
.about { background: var(--paper-2); }
.about__in { display: grid; gap: 32px; align-items: start; }
@media (min-width: 800px) { .about__in { grid-template-columns: 320px 1fr; gap: 56px; } }
.about__photo { aspect-ratio: auto; background: repeating-linear-gradient(45deg, var(--line) 0 2px, transparent 2px 14px), var(--paper); border: 2px solid var(--ink); border-radius: 4px; display: grid; place-items: center; color: var(--ink-2); max-width: 320px; }
.about__photo img { display: block; width: 100%; height: auto; object-fit: contain; border-radius: 2px; }
.about__txt { max-width: 62ch; }
.about__cred { margin: 24px 0 0; display: grid; gap: 0; }
.about__cred div { display: grid; grid-template-columns: 110px 1fr; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.about__cred dt { color: var(--ink-2); }
.about__cred dd { margin: 0; font-weight: 500; }

/* Poptávka */
.contact__in { display: grid; gap: 40px; }
@media (min-width: 900px) { .contact__in { grid-template-columns: 1fr 1.6fr; gap: 64px; } }
.contact__side p { color: var(--ink-2); max-width: 32em; }
.contact__tel { display: block; font: 700 2rem var(--f-head); text-decoration: none; margin: 20px 0 6px; }
.contact__mail { color: var(--ink-2); }
/* Poptávka – stejné provedení Jiskříka na mobilu i desktopu */
.contact__hasik { display: flex; margin-top: 40px; }

.form { display: grid; gap: 20px; }
.form__row { display: grid; gap: 6px; margin: 0; }
.form__row--half { grid-template-columns: 1fr; gap: 20px; }
@media (min-width: 600px) { .form__row--half { grid-template-columns: 1fr 1fr; } }
.form__row--half > div { display: grid; gap: 6px; }
label, legend { font-weight: 600; font-size: .98rem; }
.opt { font-weight: 400; color: var(--ink-2); }
input, textarea { width: 100%; font: inherit; color: var(--ink); background: #fff; border: 2px solid var(--line); border-radius: 4px; padding: 11px 12px; }
input:focus, textarea:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px rgba(30,122,76,.2); }
textarea { resize: vertical; min-height: 130px; }
[aria-invalid="true"] { border-color: var(--red); }
fieldset { border: 0; padding: 0; }
legend { padding: 0; margin-bottom: 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips label { position: relative; font-weight: 500; }
.chips input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chips span { display: inline-block; padding: 8px 14px; border: 2px solid var(--line); border-radius: 999px; cursor: pointer; background: #fff; }
.chips input:checked + span { background: var(--green); border-color: var(--green); color: #fff; }
.chips input:focus-visible + span { outline: 3px solid var(--green); outline-offset: 2px; }
.form__consent { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; color: var(--ink-2); }
.form__consent input { width: 20px; height: 20px; flex: none; margin-top: 3px; accent-color: var(--green); }
.form__send { justify-self: start; }
.form__send[disabled] { opacity: .6; cursor: wait; }
.form__status { margin: 0; min-height: 1.6em; font-weight: 500; }
.form__status.is-ok { color: var(--green); }
.form__status.is-err { color: var(--red); }
.hp { position: absolute; left: -9999px; }

/* Jiskřík – společné */
.hasik__fig {
  width: 96px;
  height: 112px;
  flex: none;
  object-fit: contain;
  object-position: center bottom;
  animation: has-bob 4s ease-in-out infinite;
}
@keyframes has-bob { 50% { transform: translateY(-3px); } }
@media (prefers-reduced-motion: reduce) { .hasik__fig { animation: none; } }

/* Jiskřík s bublinou */
.hasik { display: flex; align-items: flex-end; gap: 14px; margin: 40px 0 0; max-width: 720px; }
.hasik__bubble { position: relative; flex: 1; background: #fff; border: 2px solid var(--ink); border-radius: 14px; padding: 14px 18px; color: var(--ink-2); }
.hasik__bubble::before { content: ""; position: absolute; left: -9px; bottom: 30px; width: 14px; height: 14px; background: #fff; border-left: 2px solid var(--ink); border-bottom: 2px solid var(--ink); transform: rotate(45deg); }
.hasik__bubble strong { display: block; font-family: var(--f-head); font-size: 1.05rem; color: var(--ink); margin-bottom: 4px; }
.hasik__bubble p { margin: 0; }
.hasik__bubble a { color: var(--green-dk); font-weight: 600; }
.hasik--right { flex-direction: row-reverse; margin-left: auto; }
.hasik--right .hasik__bubble::before { left: auto; right: -9px; border-left: 0; border-bottom: 0; border-right: 2px solid var(--ink); border-top: 2px solid var(--ink); }
/* Jiskřík nad bublinou */
.hasik--stack { flex-direction: column; align-items: flex-start; gap: 10px; }
.hasik--stack .hasik__bubble { flex: none; }

/* Jiskříkova poznámka v odpovědi */
.has-note { display: flex; gap: 10px; align-items: flex-start; font-size: .98rem; }
.has-note__ico { width: 34px; height: 29px; flex: none; margin-top: 1px; object-fit: contain; }
.has-note b { color: var(--ink); font-weight: 600; }

/* Výzva na konci záložky */
.next { background: var(--ink); color: #fff; padding: 32px 0; border-bottom: 1px solid rgba(255,255,255,.14); }
.next__in { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; }
.next__fig { width: 88px; height: 102px; }
.next p { flex: 1 1 320px; margin: 0; color: #d5dde2; }
.next p strong { color: #fff; }

/* Patička */
.foot { background: var(--ink); color: #c5d0d6; padding: 28px 0; font-size: .95rem; }
.foot__in { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; }
.foot p { margin: 0; }
.foot .todo { color: var(--ink); }
.foot__sop { width: 100%; color: #8a9aa5; font-size: .88rem; }

/* Jiskřík používá stejné rozměry a umístění jako původní Soptík */
.plan .plan__hasik {
  position: absolute;
  right: -8px;
  bottom: -28px;
  width: 108px;
  height: 126px;
}
@media (min-width: 960px) {
  .plan .plan__hasik {
    right: -26px;
    width: 124px;
    height: 145px;
  }
}
.faq__side .hasik { margin-top: 8px; }

/* Jiskřík opřený o horní hranu bubliny – společné provedení */
.faq__side .hasik--stack,
.about__hasik,
.services__hasik,
.advice__hasik,
.contact__hasik {
  position: relative;
  padding-top: 171px;
}

.faq__side .hasik--stack .hasik__fig,
.about__hasik .hasik__fig,
.services__hasik .hasik__fig,
.advice__hasik .hasik__fig,
.contact__hasik .hasik__fig {
  position: absolute;
  left: 38px;
  top: -2px;
  width: 150px;
  height: 176px;
  margin: 0;
  z-index: 2;
  animation: none;
  pointer-events: none;
}

.faq__side .hasik--stack .hasik__bubble,
.about__hasik .hasik__bubble,
.services__hasik .hasik__bubble,
.advice__hasik .hasik__bubble,
.contact__hasik .hasik__bubble {
  position: relative;
  top: -2px;
  z-index: 1;
}

.faq__side .hasik--stack .hasik__bubble::before,
.about__hasik .hasik__bubble::before,
.services__hasik .hasik__bubble::before,
.advice__hasik .hasik__bubble::before,
.contact__hasik .hasik__bubble::before {
  display: none;
}

/* Zachování jednotlivých rozměrových odchylek */
.faq__side .hasik--stack { padding-top: 172px; }
.faq__side .hasik--stack .hasik__fig { top: 0; }
.services__hasik {
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}
.advice__hasik { max-width: 720px; }
