/* =========================================================
   3K DOMY — moderní modulové bydlení
   Statický web (HTML + CSS + JS), bez buildu.
   ========================================================= */

/* ---------- Design tokens ---------- */
:root {
  /* Brand — přebráno z katalogu (antracit + olivová) */
  --brand: #8ba528;
  --brand-soft: #a3bf3c;
  --brand-dim: rgba(139, 165, 40, 0.14);

  /* Dark (výchozí) */
  --bg: #121212;
  --bg-2: #1a1a1a;
  --bg-3: #212121;
  --surface: #1c1c1c;
  --line: rgba(255, 255, 255, 0.10);
  --line-strong: rgba(255, 255, 255, 0.18);
  --tx: #f2f2f0;
  --tx-2: #b8b8b2;
  --tx-3: #8a8a84;
  --shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  --shadow-sm: 0 4px 14px rgba(0, 0, 0, 0.3);

  --radius: 14px;
  --radius-lg: 22px;
  --wrap: 1200px;
  --gap: clamp(1rem, 2.5vw, 2rem);
  --pad-section: clamp(3.5rem, 8vw, 7rem);

  --font: "Inter", "Helvetica Neue", Arial, "Segoe UI", system-ui, -apple-system, sans-serif;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ---------- Light ---------- */
html[data-theme="light"] {
  --bg: #ffffff;
  --bg-2: #f5f6f2;
  --bg-3: #eceee7;
  --surface: #ffffff;
  --line: rgba(18, 18, 18, 0.12);
  --line-strong: rgba(18, 18, 18, 0.22);
  --tx: #16180f;
  --tx-2: #4a4d42;
  --tx-3: #6f7268;
  --brand: #6f8420;
  --brand-soft: #86a02c;
  --brand-dim: rgba(111, 132, 32, 0.12);
  --shadow: 0 12px 36px rgba(20, 24, 10, 0.12);
  --shadow-sm: 0 3px 12px rgba(20, 24, 10, 0.08);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}
body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--tx);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background-color 0.3s var(--ease), color 0.3s var(--ease);
}
img { max-width: 100%; display: block; height: auto; }
[hidden] { display: none !important; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
h1, h2, h3, h4 { line-height: 1.15; margin: 0 0 0.6em; font-weight: 700; letter-spacing: -0.02em; }
p { margin: 0 0 1em; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; border-radius: 4px; }

/* ---------- Layout ---------- */
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: clamp(1rem, 4vw, 2rem); }
.section { padding-block: var(--pad-section); }
.section--alt { background: var(--bg-2); }
.center { text-align: center; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--brand); color: #fff; padding: 0.75rem 1.25rem; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* ---------- Typography helpers ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-size: 0.75rem; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--brand); margin-bottom: 1rem;
}
.eyebrow::before { content: ""; width: 28px; height: 1px; background: var(--brand); }

.h-xl { font-size: clamp(2.1rem, 6vw, 4rem); }
.h-lg { font-size: clamp(1.75rem, 4vw, 2.75rem); }
.h-md { font-size: clamp(1.25rem, 2.4vw, 1.6rem); }
.lead { font-size: clamp(1rem, 1.6vw, 1.15rem); color: var(--tx-2); max-width: 62ch; }
.muted { color: var(--tx-2); }
.section-head { max-width: 68ch; margin-bottom: clamp(2rem, 5vw, 3.5rem); }
.section-head.center { margin-inline: auto; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.55rem;
  padding: 0.9rem 1.6rem; border-radius: 999px; border: 1px solid transparent;
  font-weight: 600; font-size: 0.95rem; cursor: pointer;
  transition: transform 0.2s var(--ease), background-color 0.2s, border-color 0.2s, color 0.2s, box-shadow 0.2s;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn--primary { background: var(--brand); color: #10120a; box-shadow: 0 6px 20px var(--brand-dim); }
.btn--primary:hover { background: var(--brand-soft); }
.btn--ghost { border-color: var(--line-strong); color: var(--tx); }
.btn--ghost:hover { border-color: var(--brand); color: var(--brand); }
.btn--sm { padding: 0.6rem 1.15rem; font-size: 0.85rem; }
.btn--block { width: 100%; }

/* ---------- Header ---------- */
.header {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(14px) saturate(1.4);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s, background-color 0.3s;
}
@supports not (background: color-mix(in srgb, red 50%, blue)) {
  .header { background: var(--bg); }
}
.header.is-stuck { border-bottom-color: var(--line); box-shadow: var(--shadow-sm); }
.header__inner { display: flex; align-items: center; gap: 1rem; min-height: 74px; }

.logo { display: inline-flex; align-items: center; gap: 0.7rem; font-weight: 800; letter-spacing: -0.03em; }
.logo__mark { width: 38px; height: 38px; flex: 0 0 auto; }
.logo__mark svg { width: 100%; height: 100%; }
.logo__txt { display: flex; flex-direction: column; line-height: 1; }
.logo__txt b { font-size: 1.2rem; }
.logo__txt span { font-size: 0.6rem; letter-spacing: 0.16em; color: var(--tx-3); font-weight: 500; text-transform: uppercase; }

.nav { margin-left: auto; }
.nav__list { display: flex; align-items: center; gap: 0.35rem; list-style: none; margin: 0; padding: 0; }
.nav__list a {
  display: block; padding: 0.55rem 0.85rem; border-radius: 999px;
  font-size: 0.92rem; font-weight: 500; color: var(--tx-2);
  transition: color 0.2s, background-color 0.2s;
}
.nav__list a:hover { color: var(--tx); background: var(--bg-3); }
.nav__list a[aria-current="page"] { color: var(--brand); font-weight: 600; }

.header__actions { display: flex; align-items: center; gap: 0.5rem; margin-left: 0.5rem; }

.icon-btn {
  width: 42px; height: 42px; display: grid; place-items: center;
  background: transparent; border: 1px solid var(--line); border-radius: 50%; cursor: pointer;
  transition: border-color 0.2s, background-color 0.2s, transform 0.2s;
}
.icon-btn:hover { border-color: var(--brand); color: var(--brand); }
.icon-btn svg { width: 19px; height: 19px; }
.theme-toggle .i-sun { display: none; }
html[data-theme="light"] .theme-toggle .i-sun { display: block; }
html[data-theme="light"] .theme-toggle .i-moon { display: none; }

.burger { display: none; }

/* ---------- Mobile nav ---------- */
@media (max-width: 900px) {
  .burger { display: grid; }
  .nav {
    position: fixed; inset: 74px 0 auto; margin: 0;
    background: var(--bg); border-bottom: 1px solid var(--line);
    padding: 1rem clamp(1rem, 4vw, 2rem) 1.5rem;
    transform: translateY(-120%); opacity: 0; pointer-events: none;
    transition: transform 0.35s var(--ease), opacity 0.25s;
    max-height: calc(100vh - 74px); overflow-y: auto;
  }
  .nav.is-open { transform: translateY(0); opacity: 1; pointer-events: auto; box-shadow: var(--shadow); }
  .nav__list { flex-direction: column; align-items: stretch; gap: 0.15rem; }
  .nav__list a { padding: 0.85rem 1rem; font-size: 1rem; border-radius: 10px; }
}

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; background: var(--bg-2); }
.hero__grid {
  display: grid; gap: clamp(2rem, 5vw, 4rem); align-items: center;
  grid-template-columns: 1.05fr 1fr;
  padding-block: clamp(3rem, 7vw, 5.5rem);
}
@media (max-width: 900px) { .hero__grid { grid-template-columns: 1fr; } }
.hero__title { font-size: clamp(2.2rem, 6.5vw, 4.1rem); margin-bottom: 0.4em; }
.hero__title em { font-style: normal; color: var(--brand); display: block; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2rem; }
.hero__media { position: relative; border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow); }
.hero__media img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }

.usp { display: flex; flex-wrap: wrap; gap: clamp(1rem, 3vw, 2.5rem); margin-top: 2.5rem; padding-top: 2rem; border-top: 1px solid var(--line); }
.usp__item { display: flex; align-items: center; gap: 0.7rem; font-size: 0.88rem; font-weight: 500; color: var(--tx-2); }
.usp__item svg { width: 22px; height: 22px; color: var(--brand); flex: 0 0 auto; }

/* ---------- Stats ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1px; background: var(--line); border-radius: var(--radius); overflow: hidden; }
.stat { background: var(--bg); padding: clamp(1.5rem, 3vw, 2.25rem) 1.25rem; text-align: center; }
.stat__n { font-size: clamp(1.9rem, 4.5vw, 2.8rem); font-weight: 800; color: var(--brand); letter-spacing: -0.03em; line-height: 1; }
.stat__l { font-size: 0.78rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--tx-3); margin-top: 0.6rem; }

/* ---------- Cards grid ---------- */
.grid { display: grid; gap: var(--gap); }
.grid--3 { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }

.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column;
  transition: transform 0.3s var(--ease), border-color 0.3s, box-shadow 0.3s;
}
.card:hover { transform: translateY(-5px); border-color: var(--brand); box-shadow: var(--shadow); }
.card__media { position: relative; overflow: hidden; background: var(--bg-3); }
.card__media img { width: 100%; aspect-ratio: 16 / 11; object-fit: cover; transition: transform 0.6s var(--ease); }
.card:hover .card__media img { transform: scale(1.05); }
.card__code {
  position: absolute; top: 0.85rem; left: 0.85rem;
  background: rgba(10, 10, 10, 0.72); color: #fff; backdrop-filter: blur(6px);
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.1em;
  padding: 0.35rem 0.7rem; border-radius: 999px;
}
.card__body { padding: 1.15rem 1.25rem 1.35rem; display: flex; flex-direction: column; flex: 1; }
.card__title { font-size: 1.05rem; margin-bottom: 0.35rem; }
.card__tag { font-size: 0.72rem; letter-spacing: 0.08em; color: var(--tx-3); text-transform: uppercase; margin-bottom: 0.9rem; }
.card__meta { display: flex; flex-wrap: wrap; gap: 0.4rem 1rem; font-size: 0.83rem; color: var(--tx-2); margin-top: auto; padding-top: 0.9rem; border-top: 1px solid var(--line); }
.card__meta b { color: var(--tx); font-weight: 600; }

/* ---------- Feature blocks ---------- */
.feat { padding: clamp(1.5rem, 3vw, 2rem); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); height: 100%; }
.feat__ico { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 12px; background: var(--brand-dim); color: var(--brand); margin-bottom: 1.1rem; }
.feat__ico svg { width: 24px; height: 24px; }
.feat h3 { font-size: 1.02rem; }
.feat p { color: var(--tx-2); font-size: 0.92rem; margin: 0; }

/* ---------- Split media/text ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.split--rev .split__media { order: 2; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } .split--rev .split__media { order: 0; } }
.split__media img { border-radius: var(--radius-lg); box-shadow: var(--shadow); }

/* ---------- Steps ---------- */
.steps { counter-reset: s; display: grid; gap: 1px; background: var(--line); border-radius: var(--radius); overflow: hidden; }
.step { counter-increment: s; background: var(--bg); padding: clamp(1.4rem, 3vw, 2rem); display: grid; grid-template-columns: auto 1fr; gap: 1.25rem; align-items: start; }
.step::before {
  content: counter(s, decimal-leading-zero);
  font-size: 1.15rem; font-weight: 800; color: var(--brand);
  width: 46px; height: 46px; display: grid; place-items: center;
  border: 1px solid var(--brand); border-radius: 50%;
}
.step h3 { font-size: 1.05rem; margin-bottom: 0.3rem; }
.step p { margin: 0; color: var(--tx-2); font-size: 0.93rem; }

/* ---------- Filters (katalog) ---------- */
.toolbar { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; margin-bottom: 2rem; }
.chips { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.chip {
  padding: 0.5rem 1rem; border-radius: 999px; border: 1px solid var(--line);
  background: transparent; font-size: 0.85rem; font-weight: 500; color: var(--tx-2); cursor: pointer;
  transition: all 0.2s;
}
.chip:hover { border-color: var(--line-strong); color: var(--tx); }
.chip.is-active { background: var(--brand); border-color: var(--brand); color: #10120a; font-weight: 600; }
.search {
  flex: 1 1 220px; min-width: 180px; max-width: 320px; margin-left: auto;
  display: flex; align-items: center; gap: 0.6rem;
  padding: 0.55rem 1rem; border: 1px solid var(--line); border-radius: 999px; background: var(--bg-2);
}
.search svg { width: 17px; height: 17px; color: var(--tx-3); flex: 0 0 auto; }
.search input { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--tx); font-size: 0.9rem; outline: none; }
.count { font-size: 0.85rem; color: var(--tx-3); margin-bottom: 1.25rem; }
.empty { padding: 3rem 1rem; text-align: center; color: var(--tx-3); border: 1px dashed var(--line); border-radius: var(--radius); }

/* ---------- Detail (model) ---------- */
.crumbs { font-size: 0.85rem; color: var(--tx-3); padding-top: 1.5rem; }
.crumbs a:hover { color: var(--brand); }
.crumbs span { margin-inline: 0.4rem; opacity: 0.5; }

.detail__grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: clamp(2rem, 4vw, 3.5rem); align-items: start; }
@media (max-width: 940px) { .detail__grid { grid-template-columns: 1fr; } }
.detail__figure { border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow); background: var(--bg-3); }
.detail__figure img { width: 100%; }
.detail__code { font-size: 0.8rem; font-weight: 700; letter-spacing: 0.16em; color: var(--brand); }

.spec { width: 100%; border-collapse: collapse; margin: 1.5rem 0; font-size: 0.93rem; }
.spec th, .spec td { text-align: left; padding: 0.8rem 0.5rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.spec th { font-weight: 500; color: var(--tx-2); width: 45%; }
.spec td { font-weight: 600; }

.taglist { list-style: none; margin: 0 0 1.5rem; padding: 0; display: grid; gap: 0.55rem; }
.taglist li { display: flex; gap: 0.6rem; align-items: flex-start; font-size: 0.92rem; color: var(--tx-2); }
.taglist svg { width: 18px; height: 18px; color: var(--brand); flex: 0 0 auto; margin-top: 2px; }

.pagesheet { margin-top: clamp(2.5rem, 5vw, 4rem); max-width: 800px; margin-inline: auto; }
.pagesheet img { border-radius: var(--radius); border: 1px solid var(--line); box-shadow: var(--shadow-sm); }

.pager { display: flex; justify-content: space-between; gap: 1rem; margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--line); font-size: 0.9rem; }
.pager a { display: inline-flex; align-items: center; gap: 0.5rem; color: var(--tx-2); white-space: nowrap; }
.pager svg { width: 18px; height: 18px; flex: 0 0 auto; }
.pager a:hover { color: var(--brand); }

/* ---------- CTA band ---------- */
.cta {
  background: linear-gradient(135deg, var(--bg-3), var(--bg-2));
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: clamp(2rem, 5vw, 3.5rem); text-align: center;
}
.cta h2 { margin-bottom: 0.5rem; }
.cta__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; justify-content: center; margin-top: 1.75rem; }

/* ---------- Form ---------- */
.form { display: grid; gap: 1.1rem; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
@media (max-width: 640px) { .form__row { grid-template-columns: 1fr; } }
.field { display: grid; gap: 0.4rem; }
.field label { font-size: 0.85rem; font-weight: 500; color: var(--tx-2); }
.field .req { color: var(--brand); }
.field input, .field select, .field textarea {
  width: 100%; padding: 0.8rem 1rem; font: inherit; font-size: 0.95rem;
  color: var(--tx); background: var(--bg-2);
  border: 1px solid var(--line); border-radius: 10px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field textarea { resize: vertical; min-height: 130px; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-dim);
}
.field--check { grid-template-columns: auto 1fr; align-items: start; gap: 0.7rem; }
.field--check input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--brand); }
.field--check label { font-size: 0.82rem; color: var(--tx-3); }
.hint { font-size: 0.78rem; color: var(--tx-3); }
.form-note { padding: 0.9rem 1.1rem; border-radius: 10px; font-size: 0.88rem; display: none; }
.form-note.is-err { display: block; background: rgba(220, 80, 60, 0.12); border: 1px solid rgba(220, 80, 60, 0.4); color: #e2836f; }
.form-note.is-ok { display: block; background: var(--brand-dim); border: 1px solid var(--brand); color: var(--brand); }

/* ---------- Contact info ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 0.85fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }
.info { display: grid; gap: 1.4rem; }
.info__item { display: grid; grid-template-columns: auto 1fr; gap: 1rem; align-items: start; }
.info__ico { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 11px; background: var(--brand-dim); color: var(--brand); }
.info__ico svg { width: 20px; height: 20px; }
.info__item h3 { font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--tx-3); margin-bottom: 0.25rem; font-weight: 600; }
.info__item p, .info__item a { margin: 0; font-size: 1.02rem; font-weight: 600; }
.info__item a:hover { color: var(--brand); }

/* ---------- FAQ ---------- */
.faq { display: grid; gap: 0.75rem; }
details.qa { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
details.qa summary {
  cursor: pointer; padding: 1.1rem 1.35rem; font-weight: 600; font-size: 0.98rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; list-style: none;
}
details.qa summary::-webkit-details-marker { display: none; }
details.qa summary::after { content: "+"; font-size: 1.35rem; font-weight: 400; color: var(--brand); line-height: 1; flex: 0 0 auto; }
details.qa[open] summary::after { content: "\2212"; }
details.qa[open] summary { border-bottom: 1px solid var(--line); }
details.qa .qa__body { padding: 1.1rem 1.35rem 1.35rem; color: var(--tx-2); font-size: 0.93rem; }
details.qa .qa__body p:last-child { margin: 0; }

/* ---------- Footer ---------- */
.footer { background: var(--bg-2); border-top: 1px solid var(--line); padding-top: clamp(2.5rem, 5vw, 4rem); margin-top: clamp(3rem, 6vw, 5rem); }
.footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.1fr; gap: 2rem; padding-bottom: 2.5rem; }
@media (max-width: 900px) { .footer__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer__grid { grid-template-columns: 1fr; } }
.footer h4 { font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--tx-3); margin-bottom: 1rem; }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; }
.footer a { color: var(--tx-2); font-size: 0.9rem; }
.footer a:hover { color: var(--brand); }
.footer p { color: var(--tx-2); font-size: 0.9rem; }
.footer__bottom {
  border-top: 1px solid var(--line); padding-block: 1.35rem;
  display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; justify-content: space-between;
  font-size: 0.82rem; color: var(--tx-3);
}

/* ---------- Reveal on scroll ---------- */
/* Animuje se jen tehdy, když je JS aktivní (html.has-js).
   Bez JS zůstává obsah normálně viditelný. */
html.has-js .reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
html.has-js .reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { html.has-js .reveal { opacity: 1; transform: none; } }

/* ---------- Print ---------- */
@media print {
  .header, .footer, .hero__actions, .cta, .toolbar { display: none !important; }
  body { background: #fff; color: #000; }
}
