/* CZE-SA web 1.2 — černá, bílá, šedé. Písmo Archivo (variabilní šířka), hostované lokálně. */

@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  src: url("fonts/archivo-latin-ext-wdth.woff2") format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  src: url("fonts/archivo-latin-wdth.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --black: #000;
  --white: #fff;
  --g-100: #f2f2f2;   /* plochy karet */
  --g-300: #bdbdbd;   /* linky, text na černé */
  --g-600: #5c5c5c;   /* doplňkový text na bílé (kontrast 6.9:1) */
  --line: #d6d6d6;

  --wrap: 1240px;
  --gut: clamp(16px, 4vw, 40px);
  --r-big: 22px;      /* hlavní karty oborů */
  --r-mid: 12px;      /* reference, kontakty */
  --r-small: 6px;     /* tlačítka */

  --narrow: 72%;      /* font-stretch nadpisů */
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--white);
  color: var(--black);
  font-family: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: clamp(1rem, 0.95rem + 0.25vw, 1.0625rem);
  line-height: 1.6;
  font-stretch: 100%;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
:focus-visible { outline: 2px solid var(--black); outline-offset: 3px; }

.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gut); }

.skip {
  position: absolute; left: -9999px; top: 8px; z-index: 100;
  background: var(--black); color: var(--white); padding: 10px 16px; border-radius: var(--r-small);
}
.skip:focus { left: 8px; }

h1, h2, h3 {
  font-stretch: var(--narrow);
  font-weight: 760;
  line-height: 1.02;
  letter-spacing: -0.01em;
  margin: 0;
  text-wrap: balance;
}
h1 { font-size: clamp(2.6rem, 1.6rem + 4.6vw, 5.4rem); }
h2 { font-size: clamp(2rem, 1.4rem + 2.6vw, 3.4rem); }
h3 { font-size: clamp(1.35rem, 1.15rem + 0.8vw, 1.75rem); line-height: 1.1; }
p { margin: 0; max-width: 66ch; }

/* ---------- Hlavička ---------- */
.top {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(1.2) blur(10px);
  border-bottom: 1px solid var(--line);
}
.top .wrap { display: flex; align-items: center; gap: 24px; min-height: 68px; }
.brand { display: flex; flex-shrink: 0; align-items: center; text-decoration: none; }
.brand img { height: 46px; width: auto; }
.nav { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.nav a { text-decoration: none; white-space: nowrap; padding: 8px 12px; border-radius: var(--r-small); font-size: 0.95rem; }
.nav a:hover { background: var(--g-100); }
.nav .lang { border: 1px solid var(--black); font-weight: 600; font-stretch: 85%; }
.nav-toggle { display: none; }

@media (max-width: 1080px) {
  .nav-toggle {
    display: inline-flex; margin-left: auto; align-items: center; justify-content: center;
    width: 44px; height: 44px; border: 1px solid var(--black); border-radius: var(--r-small);
    background: var(--white); cursor: pointer;
  }
  .nav-toggle svg { width: 20px; height: 20px; }
  .nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--white); border-bottom: 1px solid var(--line); padding: 8px var(--gut) 16px;
  }
  .nav.open { display: flex; }
  .nav a { padding: 12px 8px; font-size: 1.05rem; }
  .nav .lang { align-self: flex-start; margin-top: 8px; }
}
@media (max-width: 520px) { .brand img { height: 38px; } }

/* ---------- Tlačítka ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 22px; border-radius: var(--r-small);
  border: 1px solid var(--black); text-decoration: none; font-weight: 600; font-stretch: 90%;
}
.btn.solid { background: var(--black); color: var(--white); }
.btn.solid:hover { background: #2a2a2a; }
.btn.ghost:hover { background: var(--g-100); }

/* ---------- Úvod ---------- */
.hero { padding: clamp(32px, 6vw, 72px) 0 clamp(40px, 6vw, 64px); }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: clamp(24px, 4vw, 56px); align-items: end; }
.hero-text { display: grid; gap: 24px; padding-bottom: 8px; }
.hero-text .lead { font-size: 1.15em; color: #222; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-photos { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.62fr); grid-template-rows: auto auto; gap: 10px; }
.hero-photos figure { margin: 0; overflow: hidden; border-radius: var(--r-mid); background: var(--g-100); }
.hero-photos .p1 { grid-row: span 2; border-radius: var(--r-big); }
.hero-photos img { width: 100%; height: 100%; object-fit: cover; }
.hero-photos .p1 img { aspect-ratio: 3 / 4.2; }
.hero-photos .p2 img, .hero-photos .p3 img { aspect-ratio: 1 / 1; }

@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero-photos { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); }
  .hero-photos .p1 img { aspect-ratio: 4 / 4.4; }
}

/* fotky z realizací jsou černobílé — drží paletu webu */
.bw img, img.bw { filter: grayscale(1) contrast(1.08); }

/* ---------- Znalosti (roboti, PLC) ---------- */
.know { border-block: 1px solid var(--black); }
.know .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 40px; padding-block: 18px; }
.know p { font-size: 0.9rem; color: var(--g-600); max-width: none; }
.know ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 32px; }
.know li { font-size: clamp(1.1rem, 1rem + 0.6vw, 1.5rem); font-stretch: 62%; font-weight: 800; letter-spacing: 0.02em; }

/* ---------- Sekce obecně ---------- */
.section { padding-block: clamp(56px, 9vw, 112px); }
.section-head { display: grid; gap: 16px; margin-bottom: clamp(28px, 4vw, 48px); max-width: 820px; }
.section-head p { color: var(--g-600); font-size: 1.1em; }

/* ---------- Obory: velké karty ---------- */
.obory { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.obor {
  display: grid; grid-template-rows: auto 1fr;
  border: 1px solid var(--black); border-radius: var(--r-big); overflow: hidden; background: var(--white);
}
.obor figure { margin: 0; aspect-ratio: 16 / 8; overflow: hidden; border-bottom: 1px solid var(--black); }
.obor figure img { width: 100%; height: 100%; object-fit: cover; }
.obor-body { display: grid; gap: 14px; align-content: start; padding: clamp(20px, 3vw, 32px); }
.obor-body > p { color: #222; }
.obor ul { margin: 4px 0 0; padding: 0; list-style: none; display: grid; gap: 0; }
.obor li { padding: 9px 0; border-top: 1px solid var(--line); }
.obor li:last-child { border-bottom: 1px solid var(--line); }
.obor:nth-child(1) { background: var(--black); color: var(--white); }
.obor:nth-child(1) .obor-body > p { color: var(--g-300); }
.obor:nth-child(1) li { border-color: #333; }
.obor:nth-child(1) figure { border-color: #333; }
/* elektro = hlavní obor: karta přes celou šířku, fotka vedle textu */
.obor.main { grid-column: 1 / -1; grid-template-rows: none; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.obor.main figure { aspect-ratio: auto; min-height: 100%; border-bottom: 0; border-right: 1px solid #333; }
.obor.main h3 { font-size: clamp(1.7rem, 1.3rem + 1.6vw, 2.7rem); line-height: 1.04; }
@media (max-width: 860px) {
  .obory { grid-template-columns: 1fr; }
  .obor.main { grid-template-columns: 1fr; }
  .obor.main figure { aspect-ratio: 16 / 8; min-height: 0; border-right: 0; border-bottom: 1px solid #333; }
}

/* ---------- Co řešíme: černá sekce ---------- */
.fix { background: var(--black); color: var(--white); }
.fix .section-head p { color: var(--g-300); }
.fix :focus-visible { outline-color: var(--white); }
.fix-list { list-style: none; margin: 0; padding: 0; }
.fix-list li {
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: 12px clamp(24px, 5vw, 72px);
  padding: clamp(22px, 3.2vw, 36px) 0; border-top: 1px solid #333; align-items: baseline;
}
.fix-list li:last-child { border-bottom: 1px solid #333; }
.fix-list strong {
  font-size: clamp(1.6rem, 1.1rem + 2.2vw, 2.9rem); font-stretch: 66%; font-weight: 720; line-height: 1.04;
}
.fix-list span { color: var(--g-300); font-size: 1.05em; }
@media (max-width: 760px) { .fix-list li { grid-template-columns: 1fr; } }

/* ---------- Postup ---------- */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; counter-reset: krok; }
.steps li {
  counter-increment: krok; display: grid; gap: 10px; align-content: start;
  padding: 22px 20px 26px; background: var(--g-100); border-radius: var(--r-mid);
}
.steps li::before {
  content: counter(krok); font-stretch: 62%; font-weight: 800; font-size: 2.6rem; line-height: 1; color: var(--black);
}
.steps h3 { font-size: 1.25rem; }
.steps p { color: #333; font-size: 0.97em; }
@media (max-width: 1040px) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } .steps li:last-child { grid-column: span 2; } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } .steps li:last-child { grid-column: auto; } }

/* ---------- Servis ---------- */
.servis {
  margin-top: 16px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px clamp(24px, 5vw, 64px);
  padding: clamp(24px, 4vw, 44px); border: 1px solid var(--black); border-radius: var(--r-big);
}
.servis ul { margin: 0; padding-left: 1.1em; display: grid; gap: 6px; }
.servis .call { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
.servis > div { display: grid; gap: 14px; align-content: start; }
@media (max-width: 760px) { .servis { grid-template-columns: 1fr; } }

/* ---------- Reference ---------- */
.refs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.ref {
  display: grid; gap: 12px; align-content: start;
  padding: 24px; border: 1px solid var(--line); border-radius: var(--r-mid); background: var(--white);
}
.ref .who { font-size: 1.5rem; font-stretch: 66%; font-weight: 780; line-height: 1.05; }
.ref .where { color: var(--g-600); font-size: 0.95em; }
.ref .robots { margin-top: 4px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 0.93em; }
.ref .robots b { font-weight: 650; }
.tags { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.tags li { font-size: 0.85rem; padding: 3px 10px; border: 1px solid var(--g-300); border-radius: 999px; }
.ref.photo { padding: 0; overflow: hidden; }
.ref.photo figure { margin: 0; aspect-ratio: 16 / 10; overflow: hidden; }
.ref.photo figure img { width: 100%; height: 100%; object-fit: cover; }
.ref.photo .ref-body { display: grid; gap: 12px; padding: 0 24px 24px; }
@media (max-width: 1040px) { .refs { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .refs { grid-template-columns: 1fr; } }

/* ---------- Galerie ---------- */
.gallery { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: 200px; grid-auto-flow: dense; gap: 10px; }
.gallery button {
  all: unset; display: block; min-width: 0; cursor: zoom-in; border-radius: var(--r-mid); overflow: hidden; background: var(--g-100);
}
.gallery button:focus-visible { outline: 2px solid var(--black); outline-offset: 3px; }
.gallery button.tall { grid-row: span 2; }
.gallery button.wide { grid-column: span 2; }
.gallery img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 860px) { .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 160px; } }

.viewer {
  border: 0; padding: 0; background: transparent; max-width: min(1200px, 94vw); max-height: 92vh;
}
.viewer::backdrop { background: rgba(0, 0, 0, 0.9); }
.viewer img { max-height: 84vh; width: auto; margin: 0 auto; border-radius: var(--r-mid); }
.viewer p { color: var(--white); text-align: center; margin: 10px auto 0; font-size: 0.95rem; }
.viewer form { position: fixed; top: 16px; right: 16px; }
.viewer form button {
  width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--white);
  background: var(--black); color: var(--white); font-size: 1.4rem; cursor: pointer;
}
.viewer form button:focus-visible { outline-color: var(--white); }

/* ---------- O nás ---------- */
.about { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: clamp(24px, 5vw, 72px); align-items: start; }
.about-text { display: grid; gap: 18px; }
.facts { margin: 0; display: grid; gap: 0; border-top: 1px solid var(--black); }
.facts div { display: grid; grid-template-columns: 9.5em 1fr; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.facts dt { color: var(--g-600); }
.facts dd { margin: 0; }
.career { margin-top: 24px; padding: 22px 24px; background: var(--g-100); border-radius: var(--r-mid); display: grid; gap: 8px; }
@media (max-width: 860px) { .about { grid-template-columns: 1fr; } .facts div { grid-template-columns: 1fr; gap: 2px; } }

/* ---------- Časté otázky ---------- */
.faq { border-top: 1px solid var(--black); max-width: 900px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 24px;
  padding: 18px 0; font-size: 1.15rem; font-weight: 650; font-stretch: 85%;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.5rem; line-height: 1; font-weight: 400; }
.faq details[open] summary::after { content: "–"; }
.faq details p { padding: 0 0 20px; color: #333; }

/* ---------- Kontakt ---------- */
.contact { background: var(--g-100); }
.contacts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.person {
  display: grid; gap: 6px; align-content: start; padding: 26px; background: var(--white);
  border-radius: var(--r-mid); border: 1px solid var(--line);
}
.person .name { font-size: 1.55rem; font-stretch: 66%; font-weight: 780; line-height: 1.1; }
.person a { font-size: 1.15rem; font-weight: 600; text-decoration: none; }
.person a:hover { text-decoration: underline; }
.person .note { color: var(--g-600); font-size: 0.95em; }
.person.main { background: var(--black); color: var(--white); border-color: var(--black); }
.person.main .note { color: var(--g-300); }
.company { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 8px 40px; color: #333; font-size: 0.97em; }
@media (max-width: 860px) { .contacts { grid-template-columns: 1fr; } }

/* ---------- Patička ---------- */
.foot { background: var(--black); color: var(--g-300); font-size: 0.93rem; }
.foot .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px 40px; padding-block: 36px; }
.foot b { color: var(--white); font-weight: 600; }
.foot a { color: var(--white); }
.foot p { max-width: none; }
.foot-logo { display: block; height: 40px; width: auto; margin-bottom: 14px; }
