:root {
  --ink: #172017;
  --ink-soft: #415044;
  --forest: #0d1710;
  --forest-2: #172618;
  --moss: #667a4a;
  --moss-dark: #40522d;
  --bronze: #b28a4a;
  --stone: #d8d2bf;
  --parchment: #eee9d7;
  --paper: #faf7eb;
  --line: rgba(93, 102, 82, 0.32);
  --white: #fffdf3;
  --shadow: 0 24px 80px rgba(3, 8, 5, 0.42);
  --radius: 8px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Trebuchet MS", "Segoe UI", Arial, sans-serif;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(9, 18, 12, 0.84), rgba(11, 19, 13, 0.72) 42%, rgba(238, 233, 215, 0.96) 72%),
    url("assets/images/galery/art05.jpg") center top / cover fixed;
  min-height: 100vh;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(circle at 15% 20%, rgba(178, 138, 74, 0.17), transparent 26%), linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: auto, 96px 96px;
  opacity: 0.9;
}

img { display: block; max-width: 100%; }
a { color: #536b31; text-decoration-thickness: 1px; text-underline-offset: 3px; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  min-height: 72px;
  padding: 12px clamp(18px, 4vw, 56px);
  color: var(--white);
  background: rgba(10, 18, 13, 0.88);
  border-bottom: 1px solid rgba(216, 210, 191, 0.18);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--white);
  font-weight: 800;
  text-decoration: none;
  letter-spacing: 0;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid rgba(238, 233, 215, 0.72);
  background: linear-gradient(145deg, #243522, #73855b);
  color: var(--white);
  font-size: 15px;
  box-shadow: inset 0 0 0 3px rgba(7, 13, 9, 0.28);
}

.site-menu {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  flex-wrap: wrap;
}

.site-menu a {
  color: rgba(255, 253, 243, 0.88);
  padding: 10px 12px;
  border-radius: 999px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
}

.site-menu a:hover,
html[data-page="index"] .site-menu a[data-page="index"] {
  color: var(--forest);
  background: var(--parchment);
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(238, 233, 215, 0.35);
  border-radius: 50%;
  background: rgba(238, 233, 215, 0.08);
  padding: 10px;
}

.menu-toggle span {
  display: block;
  height: 2px;
  background: var(--white);
  margin: 5px 0;
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 520px);
  gap: clamp(24px, 5vw, 76px);
  align-items: end;
  min-height: clamp(620px, 82vh, 820px);
  padding: clamp(44px, 8vw, 112px) clamp(18px, 6vw, 96px) clamp(116px, 12vw, 156px);
  color: var(--white);
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 45%;
  background: linear-gradient(0deg, rgba(9, 18, 12, 0.94), transparent);
  pointer-events: none;
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(5, 10, 7, 0.42), rgba(5, 10, 7, 0.08) 46%, rgba(5, 10, 7, 0.64)),
    url("assets/images/galery/art05.jpg") center / cover;
  transform: scale(1.02);
}

.hero-copy {
  position: relative;
  z-index: 1;
  max-width: 720px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--bronze);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1, h2, h3, p { margin-top: 0; }
h1 {
  margin-bottom: 20px;
  color: var(--white);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(54px, 9vw, 128px);
  line-height: 0.9;
  letter-spacing: 0;
  text-shadow: 0 16px 50px rgba(0,0,0,0.56);
}

.lead {
  max-width: 660px;
  color: rgba(255, 253, 243, 0.92);
  font-size: clamp(18px, 2vw, 25px);
  line-height: 1.55;
}

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 20px;
  border-radius: 999px;
  border: 1px solid rgba(238, 233, 215, 0.42);
  color: var(--white);
  font-weight: 900;
  text-decoration: none;
}

.button.primary {
  color: #172017;
  background: var(--parchment);
  border-color: var(--parchment);
}

.button.ghost { background: rgba(11, 19, 13, 0.38); }

.team-card {
  position: relative;
  z-index: 1;
  align-self: center;
  justify-self: end;
  width: min(100%, 360px);
  padding: 22px;
  border: 1px solid rgba(238, 233, 215, 0.24);
  border-radius: var(--radius);
  background: rgba(13, 23, 16, 0.72);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.team-card span {
  display: block;
  margin-bottom: 12px;
  color: var(--bronze);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.team-card strong {
  display: block;
  padding: 12px 0;
  color: var(--white);
  border-top: 1px solid rgba(238, 233, 215, 0.18);
  font-size: 20px;
}

.intro-strip {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  max-width: 1120px;
  margin: -46px auto 0;
  border: 1px solid rgba(238, 233, 215, 0.26);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.intro-strip div {
  min-height: 92px;
  padding: 20px 22px;
  background: rgba(238, 233, 215, 0.94);
  border-right: 1px solid rgba(93, 102, 82, 0.22);
}

.intro-strip div:last-child { border-right: 0; }
.intro-strip span {
  display: block;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.intro-strip strong {
  display: block;
  margin-top: 8px;
  font-size: 24px;
}

.section {
  width: min(1120px, calc(100% - 36px));
  margin: 64px auto;
}

.feature-grid {
  display: grid;
  grid-template-columns: 1.45fr 0.8fr 0.8fr;
  gap: 18px;
}

.feature-card {
  min-height: 280px;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--paper);
  box-shadow: 0 16px 44px rgba(23, 32, 23, 0.18);
}

.feature-card.large {
  display: grid;
  grid-template-rows: auto 1fr;
}

.feature-card.large img {
  width: 100%;
  height: 190px;
  object-fit: cover;
}

.feature-card.large div { padding: 24px; }
.feature-card h2 {
  color: var(--forest);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(26px, 3vw, 42px);
  line-height: 1.08;
}

.image-link {
  position: relative;
  display: block;
  color: var(--white);
  text-decoration: none;
}

.image-link img {
  width: 100%;
  height: 100%;
  min-height: 100%;
  object-fit: cover;
  filter: saturate(0.94) contrast(1.04);
}

.image-link::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(10, 18, 13, 0.82), transparent 58%);
}

.image-link span {
  position: absolute;
  z-index: 1;
  left: 18px;
  right: 18px;
  bottom: 18px;
  font-size: 24px;
  font-weight: 900;
}

.content-layout {
  display: grid;
  grid-template-columns: minmax(220px, 330px) minmax(0, 1fr);
  gap: clamp(24px, 5vw, 72px);
  align-items: start;
}

.section-heading {
  position: sticky;
  top: 96px;
  padding: 24px 0;
}

.section-heading h2 {
  margin: 0;
  color: var(--white);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(34px, 4vw, 58px);
  line-height: 1.02;
  text-shadow: 0 12px 34px rgba(0,0,0,0.38);
}

.article-stack {
  display: grid;
  gap: 14px;
}

.content-panel {
  padding: clamp(22px, 4vw, 34px);
  border: 1px solid rgba(93, 102, 82, 0.22);
  border-radius: var(--radius);
  background: rgba(250, 247, 235, 0.96);
  box-shadow: 0 14px 34px rgba(23, 32, 23, 0.12);
}

.content-panel h3 {
  margin-bottom: 14px;
  color: var(--moss-dark);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(24px, 2.4vw, 34px);
  line-height: 1.1;
}

.content-panel p {
  color: #293229;
  font-size: 17px;
  line-height: 1.72;
}

.content-panel p:last-child { margin-bottom: 0; }

.site-footer {
  padding: 30px 18px 42px;
  color: rgba(255, 253, 243, 0.78);
  text-align: center;
  background: rgba(10, 18, 13, 0.9);
}

@media (max-width: 920px) {
  .menu-toggle { display: block; }
  .site-menu {
    position: fixed;
    inset: 72px 12px auto;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 12px;
    border-radius: var(--radius);
    background: rgba(10, 18, 13, 0.98);
    box-shadow: var(--shadow);
  }
  .site-menu.is-open { display: flex; }
  .site-menu a { border-radius: 6px; min-height: 44px; }
  .hero { grid-template-columns: 1fr; align-items: end; }
  .team-card { justify-self: start; }
  .intro-strip { grid-template-columns: repeat(2, 1fr); margin-inline: 18px; }
  .feature-grid { grid-template-columns: 1fr; }
  .content-layout { grid-template-columns: 1fr; }
  .section-heading { position: static; padding: 0; }
}

@media (max-width: 560px) {
  .site-header { min-height: 66px; padding: 10px 14px; }
  .brand span:last-child { display: none; }
  .hero { min-height: 660px; padding-inline: 18px; padding-bottom: 128px; }
  .intro-strip { grid-template-columns: 1fr; }
  .intro-strip div { min-height: 76px; border-right: 0; border-bottom: 1px solid rgba(93, 102, 82, 0.22); }
  .section { width: min(100% - 24px, 1120px); margin: 42px auto; }
  .content-panel p { font-size: 16px; }
}
/* Subpages */
.page-hero {
  position: relative;
  min-height: 430px;
  display: grid;
  align-items: end;
  padding: 116px clamp(18px, 6vw, 96px) 64px;
  color: var(--white);
  overflow: hidden;
}

.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background: var(--page-bg, url("assets/images/galery/art05.jpg")) center / cover;
}

.page-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, rgba(7, 13, 9, 0.74), rgba(7, 13, 9, 0.22) 54%, rgba(7, 13, 9, 0.82)), linear-gradient(0deg, rgba(9, 18, 12, 0.86), transparent 58%);
}

html[data-page="novinky"] { --page-bg: url("assets/images/galery/art04.jpg"); }
html[data-page="autori"] { --page-bg: url("assets/images/header.jpg"); }
html[data-page="lokace"] { --page-bg: url("assets/images/galery/castle04.jpg"); }
html[data-page="galerie"] { --page-bg: url("assets/images/galery/art05.jpg"); }
html[data-page="download"] { --page-bg: url("assets/images/galery/art03.jpg"); }
html[data-page="instalace"] { --page-bg: url("assets/images/galery/castle06.jpg"); }
html[data-page="navod"] { --page-bg: url("assets/images/galery/castle10.jpg"); }
html[data-page="diskuse"] { --page-bg: url("assets/images/galery/art07.jpg"); }

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="download"] .site-menu a[data-page="download"],
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"] {
  color: var(--forest);
  background: var(--parchment);
}

.page-hero-content { max-width: 860px; }
.page-hero h1 {
  margin-bottom: 16px;
  font-size: clamp(48px, 8vw, 96px);
}
.page-hero .lead { max-width: 720px; }

.page-section {
  width: min(1040px, calc(100% - 36px));
  margin: 56px auto;
}

.page-section.narrow { width: min(860px, calc(100% - 36px)); }

.article-list, .timeline, .video-grid, .download-grid, .authors-list, .locations-list {
  display: grid;
  gap: 16px;
}

.timeline-item, .author-card, .location-card, .download-card, .info-card, .video-card {
  padding: clamp(22px, 4vw, 34px);
  border: 1px solid rgba(93, 102, 82, 0.22);
  border-radius: var(--radius);
  background: rgba(250, 247, 235, 0.97);
  box-shadow: 0 14px 34px rgba(23, 32, 23, 0.12);
}

.timeline-item time, .meta-label {
  display: inline-flex;
  margin-bottom: 12px;
  color: var(--bronze);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.timeline-item h2, .author-card h2, .location-card h2, .download-card h2, .info-card h2, .video-card h2 {
  color: var(--moss-dark);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(25px, 3vw, 38px);
  line-height: 1.08;
}

.timeline-item p, .author-card p, .location-card p, .download-card p, .info-card p, .video-card p, .readme-block p, .readme-block li {
  color: #293229;
  font-size: 17px;
  line-height: 1.72;
}

.meta-list {
  display: grid;
  gap: 6px;
  margin: 14px 0 20px;
  padding: 0;
  list-style: none;
}

.download-grid { grid-template-columns: minmax(0, 1fr) minmax(280px, 0.7fr); align-items: start; }
.download-card .download-button { margin-top: 18px; }
.download-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 22px;
  border-radius: 999px;
  color: var(--white);
  background: var(--moss-dark);
  font-weight: 900;
  text-decoration: none;
}

.secrets-table-wrap { overflow-x: auto; }
.secrets-table {
  width: 100%;
  border-collapse: collapse;
  background: rgba(250, 247, 235, 0.97);
  border-radius: var(--radius);
  overflow: hidden;
}
.secrets-table th, .secrets-table td {
  padding: 15px 18px;
  border-bottom: 1px solid rgba(93, 102, 82, 0.2);
  text-align: left;
}
.secrets-table th { color: var(--white); background: var(--moss-dark); }
.secrets-table td:last-child, .secrets-table th:last-child { text-align: right; }
.secrets-table tfoot td { font-weight: 900; background: rgba(216, 210, 191, 0.72); }

.gallery-intro { margin-bottom: 24px; }
.gallery-section { margin-top: 42px; }
.gallery-section h2 {
  color: var(--white);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(32px, 4vw, 54px);
  text-shadow: 0 12px 34px rgba(0,0,0,0.38);
}
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
}
.gallery-grid a {
  position: relative;
  display: block;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--forest);
  box-shadow: 0 14px 30px rgba(3,8,5,0.24);
}
.gallery-grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 180ms ease;
}
.gallery-grid a:hover img { transform: scale(1.04); }
.gallery-grid span {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 10px;
  padding: 8px 10px;
  border-radius: 6px;
  color: var(--white);
  background: rgba(10, 18, 13, 0.78);
  font-size: 13px;
  font-weight: 900;
}

.lightbox[hidden] { display: none; }
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 64px clamp(14px, 4vw, 44px);
  background: rgba(4, 8, 5, 0.9);
}
.lightbox img {
  max-width: min(100%, 1120px);
  max-height: calc(100vh - 170px);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.lightbox-close, .lightbox-nav {
  position: fixed;
  display: grid;
  place-items: center;
  border: 1px solid rgba(238,233,215,0.4);
  color: var(--white);
  background: rgba(13,23,16,0.82);
  cursor: pointer;
}
.lightbox-close { top: 18px; right: 18px; width: 46px; height: 46px; border-radius: 50%; font-size: 30px; }
.lightbox-nav { top: 50%; width: 48px; height: 64px; border-radius: 999px; font-size: 44px; transform: translateY(-50%); }
.lightbox-prev { left: 18px; }
.lightbox-next { right: 18px; }
.lightbox-caption, .lightbox-counter {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  color: var(--white);
  background: rgba(13,23,16,0.82);
  border: 1px solid rgba(238,233,215,0.24);
  border-radius: 999px;
  padding: 9px 14px;
  font-weight: 900;
}
.lightbox-caption { bottom: 28px; }
.lightbox-counter { top: 22px; }

.video-grid { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.video-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--forest);
}
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

@media (max-width: 760px) {
  .page-hero { min-height: 360px; padding: 100px 18px 44px; }
  .download-grid { grid-template-columns: 1fr; }
  .lightbox-nav { width: 42px; height: 54px; font-size: 36px; }
}
