/* Paverpolobrazy – statická prezentace. Bez frameworku a bez externích požadavků. */
:root {
  --bg: #372b1d;
  --surface: #2a2016;
  --text: #fff7f1;
  --muted: #e6d9cc;
  --accent: #ffdfa2;
  --black: #000;
  --radius: 16px;
  --content: 1200px;
  --font: "Segoe UI", system-ui, -apple-system, Tahoma, Geneva, Verdana, sans-serif;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.6;
}

img, video { max-width: 100%; height: auto; display: block; }
a { color: var(--text); text-decoration: none; }
a:hover { color: var(--accent); }
a:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}
h1, h2, h3 { line-height: 1.2; margin: 0 0 .6em; }
h1 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
h2 { font-size: clamp(1.25rem, 2.2vw, 1.6rem); }
p { margin: 0 0 1em; }

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  background: var(--accent);
  color: var(--black);
  padding: .6rem 1rem;
  border-radius: 10px;
  z-index: 100;
}
.skip-link:focus { top: 1rem; color: var(--black); }

.wrap { width: min(var(--content), 92%); margin-inline: auto; }

/* ---------- hlavička ---------- */
.site-header { position: relative; z-index: 10; }
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 1rem;
}
.brand { text-align: center; line-height: 1.15; }
.brand span:first-child { display: block; font-size: .9rem; letter-spacing: .08em; color: var(--muted); }
.brand span:last-child { display: block; font-size: 1.25rem; font-weight: 700; letter-spacing: .04em; }

.nav-toggle {
  display: none;
  background: var(--black);
  color: var(--text);
  border: 0;
  border-radius: 12px;
  padding: .55rem .8rem;
  font: inherit;
  cursor: pointer;
}
.nav-toggle svg { vertical-align: middle; margin-right: .4rem; }

.nav { display: flex; gap: .6rem; list-style: none; margin: 0; padding: 0; }
.nav a {
  display: block;
  min-width: 5.2rem;
  text-align: center;
  padding: .45rem 1rem;
  border-radius: 20px;
  background: var(--black);
  color: var(--text);
}
.nav a:hover { color: var(--accent); }
.nav a[aria-current="page"] { background: var(--accent); color: var(--black); }

.rule { height: 2px; background: var(--text); width: min(var(--content), 92%); margin: 0 auto; border: 0; }

@media (max-width: 760px) {
  .site-header .wrap { flex-wrap: wrap; justify-content: center; }
  .nav { flex-wrap: wrap; justify-content: center; }
  .js .nav-toggle { display: inline-block; margin-left: auto; }
  .js .site-header .wrap { flex-wrap: nowrap; justify-content: space-between; }
  .js .nav {
    display: none;
    position: absolute;
    right: 4%;
    top: 100%;
    flex-direction: column;
    background: var(--surface);
    padding: .8rem;
    border-radius: var(--radius);
    box-shadow: 0 10px 30px rgba(0, 0, 0, .5);
  }
  .js .nav.open { display: flex; }
}

/* ---------- obsah ---------- */
main { flex: 1; padding-block: 2rem 3rem; }
.page-title { margin-bottom: 1.2rem; }
.lead { color: var(--muted); max-width: 60ch; }

.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: .8rem 1.2rem; margin-bottom: 1.4rem; }
.seg { display: inline-flex; background: var(--black); border-radius: 20px; padding: 3px; }
.seg button {
  background: transparent;
  color: var(--text);
  border: 0;
  border-radius: 17px;
  padding: .4rem 1rem;
  font: inherit;
  cursor: pointer;
}
.seg button[aria-pressed="true"] { background: var(--accent); color: var(--black); }
.count { color: var(--muted); font-size: .95rem; }

.grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1.2rem;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr));
}
.card a { display: block; height: 100%; }
.card figure { margin: 0; position: relative; }
.card .frame {
  aspect-ratio: 1 / 1;
  position: relative;
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
}
/* fotka vyplní celý čtverec (ořez okrajů; celé dílo je vidět na detailu) */
.card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 15%; transition: transform .25s ease; }
.card a:hover img { transform: scale(1.03); }
.card figcaption { padding: .55rem .2rem 0; font-weight: 600; font-size: .95rem; }
.card.sold img { opacity: .72; }
.badge {
  position: absolute;
  top: .6rem;
  left: .6rem;
  background: var(--black);
  color: var(--text);
  font-size: .78rem;
  letter-spacing: .04em;
  padding: .2rem .65rem;
  border-radius: 12px;
}
.badge.free { background: var(--accent); color: var(--black); font-weight: 600; }
.card[hidden] { display: none; }

@media (min-width: 640px) {
  .grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
}
.grid { gap: .9rem; }
@media (min-width: 640px) { .grid { gap: 1.2rem; } }

/* ---------- detail diela ---------- */
.crumbs { font-size: .92rem; color: var(--muted); margin-bottom: 1rem; }
.crumbs a { text-decoration: underline; text-underline-offset: 3px; }
.product { display: grid; gap: 2rem; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); align-items: start; }
@media (max-width: 860px) { .product { grid-template-columns: 1fr; } }

.gallery .main {
  background: var(--surface);
  border-radius: var(--radius);
  display: grid;
  place-items: center;
  padding: .6rem;
}
.gallery .main a { display: block; cursor: zoom-in; }
.gallery .main img { max-height: min(70vh, 640px); width: auto; margin-inline: auto; border-radius: 12px; }
.thumbs { display: flex; flex-wrap: wrap; gap: .6rem; list-style: none; margin: .8rem 0 0; padding: 0; }
.thumbs a {
  border: 2px solid transparent;
  background: var(--surface);
  padding: 0;
  border-radius: 12px;
  overflow: hidden;
  width: 84px;
  height: 84px;
  display: grid;
  place-items: center;
}
.thumbs a[aria-current="true"] { border-color: var(--accent); }
.thumbs img { max-width: 100%; max-height: 100%; width: auto; height: auto; }

.panel { background: var(--surface); border-radius: var(--radius); padding: 1.4rem; }
.specs { display: grid; grid-template-columns: auto 1fr; gap: .3rem 1.2rem; margin: 0 0 1.2rem; }
.specs dt { color: var(--muted); }
.specs dd { margin: 0; }
.price { font-size: 1.6rem; font-weight: 700; margin: .4rem 0 1rem; }
.status { margin: .4rem 0 1rem; font-size: 1.15rem; }
.note { margin-top: 1rem; }
.cta { display: flex; flex-direction: column; gap: .7rem; margin-top: 1rem; }
.btn {
  display: inline-block;
  text-align: center;
  padding: .7rem 1.2rem;
  border-radius: 20px;
  background: var(--accent);
  color: var(--black);
  font-weight: 600;
  border: 0;
  cursor: pointer;
  font: inherit;
  font-weight: 600;
}
.btn:hover { color: var(--black); filter: brightness(1.08); }
.btn.secondary { background: var(--black); color: var(--text); font-weight: 400; }
.btn.secondary:hover { color: var(--accent); }

.pager { display: flex; justify-content: space-between; gap: 1rem; margin-top: 2.2rem; flex-wrap: wrap; }
.pager a { background: var(--black); padding: .5rem 1.1rem; border-radius: 20px; }

dialog.lightbox {
  border: 0;
  padding: 0;
  background: transparent;
  max-width: 96vw;
  max-height: 96vh;
  overflow: visible;
}
dialog.lightbox::backdrop { background: rgba(0, 0, 0, .88); }
dialog.lightbox img { max-width: 96vw; max-height: 92vh; width: auto; margin: auto; border-radius: 12px; }
dialog.lightbox button {
  position: absolute;
  top: -2.4rem;
  right: 0;
  background: var(--accent);
  color: var(--black);
  border: 0;
  border-radius: 20px;
  padding: .3rem 1rem;
  font: inherit;
  cursor: pointer;
}

/* ---------- kontakt, o mne ---------- */
.two-col { display: grid; gap: 2.5rem; grid-template-columns: 1fr 1fr; align-items: start; }
@media (max-width: 860px) { .two-col { grid-template-columns: 1fr; } }
address { font-style: normal; line-height: 1.9; }
.about img { border-radius: 20px; width: min(100%, 360px); }
.docs { margin-top: 2rem; }
.docs a, address a { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- úvod ---------- */
.home { min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; position: relative; isolation: isolate; }
.home-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(15%);
  z-index: -1;
}
.home .site-header .brand span:first-child,
.home .site-header .brand span:last-child { color: #fff; }
.home .rule { display: none; }
.hero { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 3rem 1rem; }
.hero h1 { font-size: 1.6rem; letter-spacing: .12em; margin: 0; }
.hero p { font-size: clamp(1.2rem, 3.6vw, 3rem); font-weight: 200; letter-spacing: .22em; margin: 1.6rem 0 2rem; max-width: 22ch; }
.hero .enter {
  padding: 1.1rem 1.8rem;
  letter-spacing: .3em;
  font-size: .85rem;
  border: 1px solid #fff;
  border-radius: 10px;
  color: #fff;
}
.hero .enter:hover { background: #fff; color: #000; }
.tiles { padding-block: 3rem; }
.tile-grid { display: grid; gap: 1.2rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); list-style: none; margin: 0; padding: 0; }
.tile a { display: block; background: var(--surface); border-radius: var(--radius); overflow: hidden; height: 100%; }
.tile .frame { aspect-ratio: 4 / 3; position: relative; background: #1d160e; overflow: hidden; }
.tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.tile h3 { margin: 0; padding: .9rem 1.1rem; font-size: 1.1rem; }

/* ---------- patička ---------- */
.site-footer { padding-block: .9rem 1rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1.5rem; padding-top: .9rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .4rem 1.4rem; }
.site-footer a:hover { color: var(--accent); }
.social a { display: inline-flex; align-items: center; gap: .5rem; font-size: 1.05rem; }
.copy { margin: 0; color: var(--muted); font-size: .85rem; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.video-toggle {
  position: absolute;
  right: 4%;
  bottom: 1.4rem;
  background: rgba(0, 0, 0, .7);
  color: #fff;
  border: 1px solid #fff;
  border-radius: 20px;
  padding: .4rem 1rem;
  font: inherit;
  font-size: .85rem;
  cursor: pointer;
}
.video-toggle:hover { background: #fff; color: #000; }

[hidden] { display: none !important; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}
