:root {
  --page-bg: url("assets/gallery/screen/artefactor05.jpg");
  --ink: #eef4f7;
  --muted: #b5c5d5;
  --paper: #f0f0df;
  --paper-strong: #fffdf0;
  --navy-950: #08111b;
  --navy-900: #111f2d;
  --navy-800: #1d3146;
  --navy-700: #273b4f;
  --steel-600: #56718d;
  --steel-500: #6d87a1;
  --steel-300: #98aabc;
  --line: rgba(255, 255, 255, 0.18);
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.36);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  padding-top: 76px;
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  background:
    linear-gradient(rgba(8, 17, 27, 0.62), rgba(8, 17, 27, 0.94)),
    var(--page-bg) center top / cover fixed,
    var(--navy-950);
  line-height: 1.6;
  overflow-x: hidden;
}
html[data-page="index"] { --page-bg: url("assets/gallery/screen/artefactor05.jpg"); }
html[data-page="novinky"] { --page-bg: url("assets/gallery/screen/miro04.jpg"); }
html[data-page="autori"] { --page-bg: url("assets/gallery/screen/sakul01.jpg"); }
html[data-page="lokace"] { --page-bg: url("assets/gallery/screen/hofer03.jpg"); }
html[data-page="galerie"] { --page-bg: url("assets/gallery/screen/artefactor08.jpg"); }
html[data-page="instalace"] { --page-bg: url("assets/gallery/screen/sakul02.jpg"); }
html[data-page="navod"] { --page-bg: url("assets/gallery/screen/miro06.jpg"); }
html[data-page="download"] { --page-bg: url("assets/gallery/screen/hofer05.jpg"); }
html[data-page="diskuse"] { --page-bg: url("assets/gallery/screen/artefactor03.jpg"); }
body.menu-open { overflow: hidden; }
a { color: inherit; }
img { display: block; max-width: 100%; }

.site-header { border-bottom: 1px solid var(--line); }
.compact-header { min-height: 0; }
.topbar {
  position: fixed;
  top: 0;
  left: 50%;
  z-index: 20;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 16px 0;
}
.topbar::before {
  content: "";
  position: fixed;
  top: 0;
  left: 50%;
  width: 100vw;
  height: 76px;
  z-index: -1;
  transform: translateX(-50%);
  background: rgba(8, 17, 27, 0.9);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}
.brand, .site-menu a, .button, .teaser-grid a { text-decoration: none; }
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: max-content;
  font-weight: 700;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  color: var(--paper);
  background: linear-gradient(135deg, var(--navy-700), var(--steel-600));
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 8px;
}
.site-menu { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.site-menu a {
  min-height: 38px;
  padding: 9px 11px;
  color: var(--muted);
  border-radius: 8px;
  font-size: 0.92rem;
  font-weight: 700;
}
.site-menu a:hover, .site-menu a:focus-visible, html[data-page="index"] .site-menu a[data-page="index"], html[data-page="novinky"] .site-menu a[data-page="novinky"], html[data-page="autori"] .site-menu a[data-page="autori"], html[data-page="lokace"] .site-menu a[data-page="lokace"], html[data-page="galerie"] .site-menu a[data-page="galerie"], html[data-page="instalace"] .site-menu a[data-page="instalace"], html[data-page="navod"] .site-menu a[data-page="navod"], html[data-page="diskuse"] .site-menu a[data-page="diskuse"], html[data-page="download"] .site-menu a[data-page="download"] {
  color: #fff;
  background: rgba(109, 135, 161, 0.28);
}
.site-menu .download-link { color: var(--paper-strong); background: var(--steel-600); }
.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(39, 59, 79, 0.9);
}
.menu-toggle span { display: block; height: 2px; margin: 5px 0; background: var(--ink); }

.hero {
  display: grid;
  grid-template-columns: minmax(320px, 0.95fr) minmax(0, 1.05fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
  width: min(1180px, calc(100% - 32px));
  min-height: calc(100svh - 152px);
  margin: 0 auto;
  padding: clamp(48px, 8vw, 96px) 0;
}
.home-hero {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  gap: clamp(34px, 6vw, 72px);
  padding-top: clamp(18px, 4vw, 46px);
}
.hero-banner {
  display: flex;
  justify-content: center;
  width: min(1000px, 100%);
  margin: 0 auto;
}
.home-hero .hero-content {
  width: min(720px, 100%);
  margin-left: auto;
}
.hero-art {
  background: rgba(8, 17, 27, 0.8);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.hero-art img { width: 100%; height: auto; object-fit: contain; }
.full-banner { padding: 0; }
.full-banner img {
  width: min(960px, 100%);
  height: auto;
  background: transparent;
  border-radius: 0;
}
.hero-content { min-width: 0; }
.eyebrow { margin: 0 0 12px; color: var(--steel-300); font-size: 0.78rem; font-weight: 800; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 22px; color: #fff; font-size: clamp(2.65rem, 6vw, 5.7rem); line-height: 0.96; letter-spacing: 0; overflow-wrap: anywhere; }
h2 { color: var(--paper-strong); font-size: clamp(1.35rem, 2.4vw, 2.25rem); line-height: 1.15; letter-spacing: 0; }
h3 { color: var(--paper-strong); font-size: 1.18rem; }
.lead, .page-hero p { max-width: 720px; color: #d9e3eb; font-size: clamp(1.05rem, 2vw, 1.25rem); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 30px 0; }
.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 12px 18px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-weight: 800;
}
.button.primary { color: #fff; background: var(--steel-600); }
.button.secondary { color: var(--paper-strong); border-color: rgba(255, 255, 255, 0.26); background: rgba(39, 59, 79, 0.72); }
.button:hover, .button:focus-visible { transform: translateY(-1px); }
.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; max-width: 600px; margin: 0; }
.facts div, .download-card, .feature-grid article, .author-grid article, .docs-grid article, .timeline article, .teaser-grid a { border: 1px solid var(--line); border-radius: 8px; background: rgba(17, 31, 45, 0.82); }
.facts div { padding: 14px; }
.facts dt { color: var(--steel-300); font-size: 0.78rem; font-weight: 800; text-transform: uppercase; }
.facts dd { margin: 3px 0 0; color: #fff; font-size: 1.05rem; font-weight: 800; }

.page-hero, .section { width: min(1180px, calc(100% - 32px)); margin: 0 auto; }
.page-hero { padding: clamp(70px, 10vw, 118px) 0 clamp(34px, 6vw, 64px); }
.page-hero h1 { max-width: 980px; }
.section { padding: clamp(46px, 7vw, 86px) 0; }
.section-heading { max-width: 780px; margin-bottom: clamp(26px, 4vw, 46px); }
.text-columns { columns: 2 320px; column-gap: 48px; color: #dce4e7; font-size: 1.08rem; }
.teaser-grid, .download-grid, .feature-grid, .author-grid, .docs-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.feature-grid, .author-grid, .docs-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.two-col { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.teaser-grid { margin-top: 34px; }
.teaser-grid a, .download-card, .feature-grid article, .author-grid article, .docs-grid article, .timeline article { padding: 24px; }
.teaser-grid strong { display: block; color: var(--paper-strong); font-size: 1.2rem; margin-bottom: 8px; }
.teaser-grid span, .timeline p, .download-card p, .feature-grid p, .author-grid p, .docs-grid p, .notice, details p { color: #d8e0e5; }
.timeline { display: grid; gap: 14px; }
.timeline time { display: inline-block; margin-bottom: 8px; color: var(--steel-300); font-size: 0.86rem; font-weight: 800; }
.download-card.featured { background: linear-gradient(135deg, rgba(86, 113, 141, 0.96), rgba(39, 59, 79, 0.92)); }
.download-card small { display: block; margin-top: 14px; color: var(--muted); }
.tag { display: inline-flex; margin-bottom: 12px; padding: 4px 8px; color: var(--paper-strong); background: rgba(152, 170, 188, 0.24); border: 1px solid var(--line); border-radius: 6px; font-size: 0.75rem; font-weight: 800; text-transform: uppercase; }
.secrets-panel h2 {
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}
.table-wrap {
  overflow-x: auto;
  max-width: 640px;
  margin: 0 auto;
}
.secrets-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 360px;
  color: #d8e0e5;
}
.secrets-table th,
.secrets-table td {
  padding: 8px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  text-align: left;
}
.secrets-table th {
  color: var(--paper-strong);
  background: rgba(86, 113, 141, 0.28);
}
.secrets-table td:last-child,
.secrets-table th:last-child {
  text-align: right;
  width: 130px;
}
.secrets-table tbody tr:hover {
  background: rgba(152, 170, 188, 0.09);
}
.secrets-table tfoot th {
  border-bottom: 0;
  background: rgba(86, 113, 141, 0.42);
}
.home-content,
.discussion-page {
  display: grid;
  gap: 18px;
  max-width: 980px;
}
.intro-video {
  max-width: 760px;
}
.news-page {
  max-width: 980px;
}
.news-page .timeline {
  gap: 18px;
}
.news-page .timeline article h2 {
  margin-bottom: 10px;
}
.authors-page {
  display: grid;
  gap: 18px;
  max-width: 980px;
}
.author-profile h2 {
  margin-bottom: 16px;
}
.author-meta {
  display: grid;
  gap: 8px;
  margin: 0 0 20px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(8, 17, 27, 0.32);
}
.author-meta div {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 12px;
}
.author-meta dt {
  color: var(--steel-300);
  font-weight: 800;
}
.author-meta dd {
  margin: 0;
  color: #d8e0e5;
}
.locations-page {
  display: grid;
  gap: 18px;
  max-width: 980px;
}
.readme-page {
  display: grid;
  gap: 18px;
  max-width: 980px;
}
.content-panel h2 + h2 {
  margin-top: 28px;
}
.content-panel h3 {
  margin-top: 24px;
  color: var(--steel-300);
}
.story-panel p {
  text-align: left;
}
.content-panel {
  margin-top: 22px;
  padding: 24px;
  color: #d8e0e5;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(17, 31, 45, 0.82);
}
.content-panel p:last-child { margin-bottom: 0; }
.download-subhead { margin-top: clamp(34px, 5vw, 54px); }
.single-download { grid-template-columns: minmax(0, 1fr); max-width: 760px; }
.notice { max-width: 880px; margin: 22px 0 0; padding: 18px 20px; border-left: 4px solid var(--steel-500); background: rgba(17, 31, 45, 0.82); }
.guide-videos-heading { margin-top: clamp(42px, 6vw, 70px); }
.video-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.video-card {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(17, 31, 45, 0.82);
}
.video-card h3 {
  margin: 12px 4px 2px;
  font-size: 1rem;
}
.video-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 8px;
  background: #050c13;
}
.video-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.gallery-block { margin-top: 34px; }
.gallery-block:first-child { margin-top: 0; }
.gallery-block h2 { margin-bottom: 14px; }
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.gallery-grid a { position: relative; display: block; aspect-ratio: 3 / 2; overflow: hidden; border: 1px solid rgba(255, 255, 255, 0.24); border-radius: 8px; background: var(--navy-800); }
.gallery-grid span {
  position: absolute;
  inset: auto 0 0;
  padding: 7px 9px;
  color: var(--paper-strong);
  background: linear-gradient(180deg, rgba(8, 17, 27, 0), rgba(8, 17, 27, 0.88));
  font-size: 0.82rem;
  font-weight: 800;
}
.gallery-grid img { width: 100%; height: 100%; object-fit: cover; transition: transform 180ms ease; }
.gallery-grid a:hover img { transform: scale(1.06); }
.author-grid a, .docs-grid a { color: #dcecff; font-weight: 800; }
details { margin-top: 18px; padding: 20px 22px; border: 1px solid var(--line); border-radius: 8px; background: rgba(17, 31, 45, 0.82); }
summary { cursor: pointer; color: var(--paper-strong); font-weight: 800; }
.site-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; padding: 28px max(16px, calc((100% - 1180px) / 2)); color: var(--muted); background: #050c13; border-top: 1px solid var(--line); }
.site-footer p { margin: 0; }
.lightbox { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 50px 18px 18px; background: rgba(0, 0, 0, 0.88); }
.lightbox[hidden] { display: none; }
.lightbox img { max-height: 86vh; border: 1px solid var(--line); border-radius: 8px; }
.lightbox-nav {
  position: fixed;
  top: 50%;
  z-index: 51;
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  color: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(29, 49, 70, 0.88);
  font-size: 2.8rem;
  line-height: 1;
  transform: translateY(-50%);
}
.lightbox-nav:hover,
.lightbox-nav:focus-visible,
.lightbox-close:hover,
.lightbox-close:focus-visible {
  background: var(--steel-600);
}
.lightbox-prev { left: 18px; }
.lightbox-next { right: 18px; }
.lightbox-caption {
  position: fixed;
  left: 50%;
  bottom: 58px;
  z-index: 51;
  max-width: min(720px, calc(100% - 36px));
  padding: 8px 13px;
  color: var(--paper-strong);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(8, 17, 27, 0.88);
  font-weight: 800;
  text-align: center;
  transform: translateX(-50%);
}
.lightbox-counter {
  position: fixed;
  left: 50%;
  bottom: 18px;
  z-index: 51;
  padding: 7px 12px;
  color: var(--paper-strong);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(8, 17, 27, 0.86);
  font-weight: 800;
  transform: translateX(-50%);
}
.lightbox-close { position: fixed; top: 14px; right: 14px; width: 44px; height: 44px; color: #fff; border: 1px solid var(--line); border-radius: 8px; background: var(--navy-800); font-size: 2rem; line-height: 1; }

@media (max-width: 1040px) {
  .hero { grid-template-columns: 1fr; min-height: auto; }
  .hero-art { max-width: 720px; }
  .home-hero .hero-content { margin-left: 0; }
  .download-grid, .feature-grid, .author-grid, .docs-grid, .teaser-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  body { background-attachment: scroll; }
  .menu-toggle { display: block; }
  .site-menu { position: fixed; inset: 76px 12px auto; display: none; flex-direction: column; align-items: stretch; padding: 12px; background: rgba(8, 17, 27, 0.98); border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow); }
  .site-menu.is-open { display: flex; }
  .site-menu a { min-height: 46px; }
  .facts, .download-grid, .feature-grid, .author-grid, .docs-grid, .teaser-grid, .two-col, .video-grid { grid-template-columns: 1fr; }
  .author-meta div { grid-template-columns: 1fr; gap: 2px; }
  .hero-actions .button { width: 100%; }
  .lightbox-nav { width: 44px; height: 44px; font-size: 2.2rem; }
  .lightbox-prev { left: 8px; }
  .lightbox-next { right: 8px; }
  h1 { font-size: clamp(2.35rem, 13vw, 4rem); }
}