/* ==============================================================
   OptiCen – společné styly pro všechny stránky
   Koncept: metrologický list – úzký sloupec textu, měřicí stupnice
   jako oddělovač, datové pakety jako jediná živá dekorace.

   Obsah:
    1. Barvy a písma (tokeny)
    2. Základ
    3. Pomocné třídy
    4. Hlavička, navigace a hamburger menu
    5. Úvod (hero) a animovaný sken
    6. Stupnice s datovým paketem
    7. Sekce – obecné
    8. Dlaždice služeb (úvodní stránka)
    9. Datové diagramy (animace paketů)
   10. Seznamy, kroky spolupráce, časté dotazy
   11. Podstránky služeb
   12. Blog
   13. O autorovi
   14. Patička a kontakt
   15. Jemné animace při posunu
   16. Responzivita
   ============================================================== */


/* ---------- 1. Barvy a písma (tokeny) ---------- */

:root {
  /* Světlý režim */
  --bg:          #f3f5f7;   /* chladná kalibrační šeď */
  --surface:     #ffffff;
  --ink:         #14202b;   /* grafit */
  --muted:       #556270;
  --line:        #d5dbe1;
  --accent:      #1747c9;   /* modré světlo skeneru */
  --accent-soft: #e3eafc;
  --signal:      #d9480f;   /* tolerance / laser */

  /* Písma */
  --f-display: "Familjen Grotesk", "Segoe UI", system-ui, sans-serif;
  --f-body:    "Source Sans 3", "Segoe UI", system-ui, sans-serif;
  --f-mono:    "JetBrains Mono", ui-monospace, "Cascadia Mono", monospace;

  /* Typografická škála */
  --s-1: .8125rem;
  --s0:  1.0625rem;
  --s1:  1.25rem;
  --s2:  1.6rem;
  --s3:  clamp(1.75rem, 3.6vw, 2.2rem);
  --s4:  clamp(2.3rem, 6vw, 4rem);

  --radius: 6px;
  --header-h: 64px;

  color-scheme: light;
}

/* Tmavý režim podle systému (pokud není vynucen světlý) */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg:          #0e141a;
    --surface:     #151d25;
    --ink:         #e6ebf0;
    --muted:       #9aa7b4;
    --line:        #283542;
    --accent:      #7f9ff5;
    --accent-soft: #1b2848;
    --signal:      #ff8a4c;
    color-scheme: dark;
  }
}

/* Vynucený tmavý režim */
:root[data-theme="dark"] {
  --bg:          #0e141a;
  --surface:     #151d25;
  --ink:         #e6ebf0;
  --muted:       #9aa7b4;
  --line:        #283542;
  --accent:      #7f9ff5;
  --accent-soft: #1b2848;
  --signal:      #ff8a4c;
  color-scheme: dark;
}


/* ---------- 2. Základ ---------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: var(--s0);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img,
svg,
canvas {
  max-width: 100%;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-family: var(--f-display);
  line-height: 1.15;
  letter-spacing: -.01em;
  text-wrap: balance;
}

p {
  margin: 0;
}

a {
  color: var(--accent);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}


/* ---------- 3. Pomocné třídy ---------- */

.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding-left:  max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}

.mono {
  font-family: var(--f-mono);
  font-size: var(--s-1);
  letter-spacing: .02em;
}

.eyebrow {
  font-family: var(--f-mono);
  font-size: var(--s-1);
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--muted);
}

.muted {
  color: var(--muted);
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 100;
  padding: 10px 14px;
  background: var(--accent);
  color: var(--surface);
  border-radius: 4px;
  font-weight: 600;
}

.skip-link:focus {
  top: 12px;
}

.btn {
  display: inline-block;
  padding: 12px 20px;
  border: 1.5px solid var(--accent);
  border-radius: 4px;
  font-weight: 600;
  text-decoration: none;
  transition: background-color .2s ease, color .2s ease;
}

.btn-primary {
  background: var(--accent);
  color: var(--surface);
}

.btn-primary:hover {
  background: color-mix(in srgb, var(--accent) 85%, var(--ink));
}

.btn-ghost {
  color: var(--accent);
}

.btn-ghost:hover {
  background: var(--accent-soft);
}


/* ---------- 4. Hlavička, navigace a hamburger menu ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.nav {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: var(--header-h);
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--f-display);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
}

.logo-name em {
  font-style: normal;
  color: var(--accent);
}

.logo svg {
  flex: none;
}

.menu ul {
  display: flex;
  align-items: center;
  gap: 4px 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.menu a {
  display: block;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
  color: var(--ink);
  font-size: .98rem;
  font-weight: 600;
  text-decoration: none;
  transition: border-color .2s ease, color .2s ease;
}

.menu a:hover {
  border-color: var(--accent);
}

.menu a[aria-current="page"] {
  color: var(--accent);
  border-color: var(--accent);
}

.menu .menu-cta {
  padding: 8px 16px;
  border: 1.5px solid var(--accent);
  border-radius: 4px;
  color: var(--accent);
}

.menu .menu-cta:hover {
  background: var(--accent);
  color: var(--surface);
}

/* Přepínač jazyka CZ / EN */
.lang-switch,
.menu .lang-switch {
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--muted);
  font-family: var(--f-mono);
  font-size: .85rem;
  letter-spacing: .06em;
}

.lang-switch:hover,
.menu .lang-switch:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* Kopie přepínače pro mobil – na desktopu skrytá */
.lang-mobile {
  display: none;
  text-decoration: none;
}

/* Tlačítko hamburger – na desktopu skryté */
.nav-toggle {
  display: none;
  position: relative;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface);
  cursor: pointer;
}

.nav-toggle span {
  position: absolute;
  left: 11px;
  width: 20px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform .25s ease, opacity .2s ease, top .25s ease;
}

.nav-toggle span:nth-child(1) { top: 14px; }
.nav-toggle span:nth-child(2) { top: 21px; }
.nav-toggle span:nth-child(3) { top: 28px; }

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  top: 21px;
  transform: rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  top: 21px;
  transform: rotate(-45deg);
}


/* ---------- 5. Úvod (hero) a animovaný sken ---------- */

.hero {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 40px;
  align-items: center;
  padding-block: 56px 40px;
}

.hero > * {
  min-width: 0;
}

.hero h1 {
  margin-top: 12px;
  font-size: var(--s4);
  font-weight: 700;
}

.hero h1 em {
  font-style: normal;
  color: var(--accent);
}

.lead {
  max-width: 40ch;
  margin-top: 18px;
  font-size: var(--s1);
  color: var(--muted);
}

.cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.scan {
  margin: 0;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.scan canvas {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
}

.scan figcaption {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 14px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}


/* ---------- 6. Stupnice s datovým paketem ---------- */

.ruler {
  position: relative;
  height: 14px;
  overflow: hidden;
  background-image:
    repeating-linear-gradient(90deg, var(--line)  0 1px, transparent 1px 10px),
    repeating-linear-gradient(90deg, var(--muted) 0 1px, transparent 1px 100px);
  background-size: 100% 6px, 100% 14px;
  background-repeat: no-repeat;
  background-position: bottom;
  opacity: .75;
}

/* Malý „paket“, který jednou za čas přejede po stupnici */
.ruler::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: -12px;
  width: 8px;
  height: 6px;
  border-radius: 1px;
  background: var(--accent);
  animation: packet-run 9s linear infinite;
}

@keyframes packet-run {
  0%   { transform: translateX(0); opacity: 0; }
  5%   { opacity: 1; }
  60%  { transform: translateX(calc(100vw)); opacity: 1; }
  61%  { opacity: 0; }
  100% { transform: translateX(calc(100vw)); opacity: 0; }
}


/* ---------- 7. Sekce – obecné ---------- */

.section {
  padding-block: 64px;
}

.sec-head {
  display: grid;
  gap: 10px;
  max-width: 62ch;
  margin-bottom: 32px;
}

.sec-head h2 {
  font-size: var(--s3);
}

.sec-head p {
  font-size: var(--s1);
  color: var(--muted);
}

/* Drobečková navigace */
.breadcrumb {
  padding-top: 24px;
}

.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
}

.breadcrumb li + li::before {
  content: "/";
  margin-right: 6px;
  color: var(--line);
}

.breadcrumb a {
  color: var(--muted);
  text-decoration: none;
}

.breadcrumb a:hover {
  color: var(--accent);
}


/* ---------- 8. Dlaždice služeb (úvodní stránka) ---------- */

.slabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.slab {
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  gap: 14px;
  min-width: 0;
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  text-decoration: none;
  transition: transform .3s ease, border-color .3s ease, box-shadow .3s ease;
}

.slab:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
  box-shadow: 0 14px 30px -20px color-mix(in srgb, var(--accent) 60%, transparent);
}

.slab-kicker {
  color: var(--accent);
}

.slab h3 {
  font-size: var(--s2);
}

.slab p {
  color: var(--muted);
}

.slab-art {
  padding: 12px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 4px;
}

.slab-art svg {
  display: block;
  width: 100%;
  height: auto;
}

.slab-more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent);
  font-weight: 600;
}

.slab-more::after {
  content: "→";
  transition: transform .25s ease;
}

.slab:hover .slab-more::after {
  transform: translateX(4px);
}


/* ---------- 9. Datové diagramy (animace paketů) ---------- */

.flow-base {
  fill: none;
  stroke: var(--line);
  stroke-width: 1.5;
}

/* Tečky = datové pakety putující po lince */
.flow {
  fill: none;
  stroke: var(--accent);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-dasharray: 0.1 26;
  animation: flow-move 1.6s linear infinite;
}

.flow.slow { animation-duration: 2.1s; }
.flow.fast { animation-duration: 1.2s; }
.flow.out  { stroke: var(--signal); }

@keyframes flow-move {
  to { stroke-dashoffset: -26.1; }
}

.fl-node {
  fill: var(--surface);
  stroke: var(--line);
  stroke-width: 1.2;
}

.fl-hub {
  fill: var(--accent-soft);
  stroke: var(--accent);
  stroke-width: 1.5;
}

.fl-ring {
  fill: none;
  stroke: var(--accent);
  stroke-width: 1;
  transform-box: fill-box;
  transform-origin: center;
  animation: hub-pulse 3s ease-out infinite;
}

@keyframes hub-pulse {
  0%   { transform: scale(1);    opacity: .6; }
  100% { transform: scale(1.45); opacity: 0; }
}

.fl-txt {
  fill: var(--ink);
  font-family: var(--f-mono);
  font-size: 10px;
  font-weight: 500;
}

.fl-txt.small {
  fill: var(--muted);
  font-size: 9px;
}

.fl-bar  { fill: var(--accent); }
.fl-bar.hi { fill: var(--signal); }
.fl-dot  { fill: var(--accent); }
.fl-mesh { fill: none; stroke: var(--accent); stroke-width: .8; opacity: .7; }
.fl-cad  { fill: none; stroke: var(--ink); stroke-width: 1.6; }
.fl-dim  { fill: none; stroke: var(--signal); stroke-width: 1; }


/* ---------- 10. Seznamy, kroky spolupráce, časté dotazy ---------- */

.welcome {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}

.welcome > * {
  min-width: 0;
}

.welcome .sec-head {
  margin-bottom: 0;
}

.welcome h3 {
  margin-bottom: 14px;
  font-size: var(--s1);
}

/* Seznam s kroužkem (měřicí bod) */
.points {
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.points li {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.points li::before {
  content: "";
  width: 12px;
  height: 12px;
  margin-top: 7px;
  border: 2px solid var(--signal);
  border-radius: 50%;
}

/* Časté dotazy – rozbalovací */
.faq {
  max-width: 820px;
  border-top: 1px solid var(--line);
}

.faq details {
  border-bottom: 1px solid var(--line);
}

.faq summary {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 0;
  font-family: var(--f-display);
  font-size: 1.15rem;
  font-weight: 600;
  line-height: 1.3;
  list-style: none;
  cursor: pointer;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  flex: none;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--accent);
  font-family: var(--f-mono);
  font-size: 1rem;
  transition: transform .25s ease;
}

.faq details[open] summary::after {
  transform: rotate(45deg);
}

.faq summary:hover {
  color: var(--accent);
}

.faq-body {
  display: grid;
  gap: 12px;
  max-width: 68ch;
  padding-bottom: 22px;
  color: var(--ink);
}

.faq details[open] .faq-body {
  animation: faq-open .3s ease;
}

@keyframes faq-open {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: none; }
}


/* ---------- 11. Podstránky služeb ---------- */

.page-hero {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 40px;
  align-items: center;
  padding-block: 28px 48px;
}

.page-hero > * {
  min-width: 0;
}

.page-hero h1 {
  margin-top: 12px;
  font-size: clamp(2.1rem, 5vw, 3.3rem);
}

.art,
.page-hero .art {
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.art svg,
.page-hero .art svg {
  display: block;
  width: 100%;
  height: auto;
}

/* Řádek „otázka vlevo, odpověď vpravo“ */
.topic {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr);
  gap: 40px;
  padding-block: 36px;
  border-top: 1px solid var(--line);
}

.topic h2 {
  font-size: 1.55rem;
}

.topic-body {
  display: grid;
  gap: 14px;
  max-width: 65ch;
  font-size: 1.08rem;
}

.topic-body strong {
  color: var(--accent);
  font-weight: 600;
}

.highlight {
  padding: 16px 18px;
  border-left: 3px solid var(--signal);
  background: var(--surface);
  font-family: var(--f-display);
  font-size: 1.2rem;
  font-weight: 600;
}

/* Kroky měření: sken → síť → CAD → další práce */
.pipeline {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: faze;
}

.pipeline li {
  display: grid;
  align-content: start;
  gap: 6px;
  min-width: 0;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 4px;
  counter-increment: faze;
}

.pipeline li::before {
  content: counter(faze, decimal);
  color: var(--accent);
  font-family: var(--f-mono);
  font-size: .85rem;
}

.pipeline h3 {
  font-size: 1.1rem;
}

.pipeline p {
  color: var(--muted);
  font-size: .98rem;
}

/* Odkaz na druhou službu */
.next-link {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 24px 28px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  text-decoration: none;
  transition: border-color .3s ease;
}

.next-link:hover {
  border-color: var(--accent);
}

.next-link strong {
  display: block;
  margin-top: 4px;
  font-family: var(--f-display);
  font-size: 1.35rem;
}


/* ---------- 12. Blog ---------- */

.posts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.post {
  display: grid;
  align-content: start;
  gap: 10px;
  min-width: 0;
  padding-top: 16px;
  border-top: 3px solid var(--ink);
}

.post h2 {
  font-size: 1.25rem;
}

.post p {
  color: var(--muted);
}

.tag {
  justify-self: start;
  color: var(--signal);
  font-family: var(--f-mono);
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .1em;
}


/* ---------- 13. O autorovi ---------- */

.about {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 48px;
  align-items: start;
}

.about > * {
  min-width: 0;
}

.card {
  display: grid;
  gap: 16px;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.card h2 {
  font-size: 1.5rem;
}

.avatar {
  display: block;
  width: 120px;
  height: 120px;
  object-fit: cover;
  border: 3px solid var(--accent-soft);
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-family: var(--f-display);
  font-size: 2rem;
  font-weight: 700;
}

.facts {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.facts li {
  display: grid;
  gap: 2px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.facts span:first-child {
  color: var(--muted);
  font-family: var(--f-mono);
  font-size: var(--s-1);
  text-transform: uppercase;
  letter-spacing: .08em;
}

.facts span:last-child {
  font-weight: 600;
  line-height: 1.4;
}

.card-link {
  text-align: center;
}

.bio {
  display: grid;
  gap: 18px;
  max-width: 65ch;
  font-size: 1.08rem;
}


/* ---------- 14. Patička a kontakt ---------- */

.site-footer {
  padding-block: 64px 28px;
  background: var(--ink);
  color: var(--bg);
}

.site-footer .eyebrow,
.site-footer .sec-head p {
  color: color-mix(in srgb, var(--bg) 70%, var(--ink));
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.c-item {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 22px;
  border: 1px solid color-mix(in srgb, var(--bg) 25%, var(--ink));
  border-radius: var(--radius);
}

.c-val {
  color: var(--bg);
  font-family: var(--f-display);
  font-size: 1.45rem;
  font-weight: 600;
  overflow-wrap: anywhere;
  user-select: all;
}

/* Tlačítka Napsat / Zavolat */
.c-btn {
  justify-self: start;
  margin-top: 6px;
  padding: 10px 22px;
  border: 1.5px solid var(--bg);
  border-radius: 4px;
  background: var(--bg);
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
  transition: background-color .2s ease, color .2s ease;
}

.c-btn:hover {
  background: transparent;
  color: var(--bg);
}

.footer-main {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 28px;
  margin-top: 56px;
  padding-top: 28px;
  border-top: 1px solid color-mix(in srgb, var(--bg) 20%, var(--ink));
}

.footer-brand {
  display: grid;
  gap: 8px;
  max-width: 36ch;
}

.footer-brand .logo {
  color: var(--bg);
}

.footer-brand p {
  color: color-mix(in srgb, var(--bg) 65%, var(--ink));
  font-size: .95rem;
}

.footer-nav ul {
  display: grid;
  grid-template-columns: repeat(2, auto);
  gap: 8px 32px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-nav a {
  color: var(--bg);
  text-decoration: none;
  font-size: .95rem;
}

.footer-nav a:hover {
  text-decoration: underline;
}

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px 24px;
  margin-top: 28px;
  color: color-mix(in srgb, var(--bg) 60%, var(--ink));
  font-size: .88rem;
}

.footer-legal a {
  color: var(--bg);
  font-weight: 600;
}


/* ---------- 15. Jemné animace při posunu ---------- */

/* Platí jen se zapnutým JavaScriptem – bez něj je vše vidět hned */
.js .reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .7s ease, transform .7s ease;
}

.js .reveal.is-in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .js .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .flow,
  .fl-ring,
  .ruler::after,
  .faq details[open] .faq-body {
    animation: none;
  }

  .ruler::after {
    display: none;
  }

  .slab,
  .slab:hover {
    transform: none;
  }
}


/* ---------- 16. Responzivita ---------- */

@media (max-width: 960px) {
  /* Hamburger menu */
  .js .nav-toggle {
    display: block;
  }

  .js .menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    padding: 8px max(16px, env(safe-area-inset-right, 0px)) 20px max(16px, env(safe-area-inset-left, 0px));
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 18px 30px -24px rgba(0, 0, 0, .5);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity .25s ease, transform .25s ease, visibility 0s linear .25s;
  }

  .js .menu.is-open {
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: opacity .25s ease, transform .25s ease, visibility 0s;
  }

  .js .menu ul {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .js .menu li + li {
    border-top: 1px solid var(--line);
  }

  .js .menu a {
    padding: 14px 0;
    border-bottom: 0;
    font-size: 1.1rem;
  }

  /* Přepínač jazyka na mobilu vedle hamburgeru, v menu skrytý */
  .js .lang-mobile {
    display: grid;
    place-items: center;
    height: 44px;
    margin-left: auto;
    padding: 0 12px;
    font-size: .9rem;
  }

  .js .menu .lang-item {
    display: none;
  }

  .js .menu .menu-cta {
    margin-top: 12px;
    text-align: center;
    border: 1.5px solid var(--accent);
  }

  /* Bez JS se menu jen zalomí pod logo */
  .menu ul {
    flex-wrap: wrap;
  }

  .nav {
    flex-wrap: wrap;
  }

  /* Rozvržení do jednoho sloupce */
  .hero,
  .page-hero,
  .welcome,
  .slabs,
  .about,
  .topic {
    grid-template-columns: 1fr;
  }

  .topic {
    gap: 14px;
  }

  .pipeline {
    grid-template-columns: repeat(2, 1fr);
  }

  .posts {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-block: 36px 28px;
  }

  .about .card {
    max-width: 440px;
  }

  .contact-grid {
    grid-template-columns: 1fr;
    max-width: 520px;
  }
}

@media (max-width: 560px) {
  .section {
    padding-block: 48px;
  }

  .slab {
    padding: 20px;
  }

  .pipeline {
    grid-template-columns: 1fr;
  }

  .faq summary {
    font-size: 1.05rem;
  }

  .c-val {
    font-size: 1.25rem;
  }

  .footer-nav ul {
    grid-template-columns: 1fr 1fr;
  }

  .cta .btn {
    flex: 1 1 auto;
    text-align: center;
  }
}
