:root {
  --bg: #f6f4f0;
  --bg-alt: #efece5;
  --ink: #1c1a17;
  --ink-soft: #55524b;
  --line: #ddd8cf;
  --accent: #9c7b53;

  --font-display: "Fraunces", serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;

  --wrap-max: 1180px;
  --wrap-narrow-max: 760px;

  --space-section: clamp(4rem, 8vw, 8rem);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.15;
  margin: 0 0 0.6em;
  color: var(--ink);
}

h1 { font-size: clamp(2.6rem, 7vw, 4.4rem); }
h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
h3 { font-size: 1.25rem; }

p {
  margin: 0 0 1.1em;
  color: var(--ink-soft);
  max-width: 62ch;
}

a {
  color: inherit;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: var(--bg);
  padding: 0.75em 1.2em;
  z-index: 200;
}
.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

.wrap {
  max-width: var(--wrap-max);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.narrow {
  max-width: var(--wrap-narrow-max);
  margin-left: 0;
  margin-right: auto;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.78rem;
  color: var(--accent);
  margin: 0 0 0.8em;
  font-weight: 500;
}

/* Header */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(246, 244, 240, 0.86);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4.4rem;
}

.logo {
  font-family: var(--font-display);
  font-size: 1.15rem;
  text-decoration: none;
  color: var(--ink);
  letter-spacing: 0.01em;
}
.logo span {
  color: var(--accent);
  margin-left: 0.15em;
}

.primary-nav {
  display: flex;
  gap: 2rem;
}
.primary-nav a {
  text-decoration: none;
  font-size: 0.92rem;
  color: var(--ink-soft);
  transition: color 0.2s ease;
}
.primary-nav a:hover,
.primary-nav a:focus-visible {
  color: var(--ink);
}

.nav-toggle {
  display: none;
  width: 2.4rem;
  height: 2.4rem;
  background: none;
  border: none;
  cursor: pointer;
  position: relative;
}
.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  position: absolute;
  left: 0.5rem;
  right: 0.5rem;
  height: 1.5px;
  background: var(--ink);
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle span { top: 50%; }
.nav-toggle span::before { top: -0.5rem; }
.nav-toggle span::after { top: 0.5rem; }

.nav-toggle[aria-expanded="true"] span {
  background: transparent;
}
.nav-toggle[aria-expanded="true"] span::before {
  transform: translateY(0.5rem) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] span::after {
  transform: translateY(-0.5rem) rotate(-45deg);
}

/* Hero */
.hero {
  position: relative;
  height: 88vh;
  min-height: 480px;
  max-height: 820px;
  overflow: hidden;
}

.hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero-card {
  position: absolute;
  left: clamp(1.25rem, 5vw, 4rem);
  right: clamp(1.25rem, 5vw, 4rem);
  bottom: clamp(1.5rem, 6vw, 4rem);
  max-width: 30rem;
  background: rgba(28, 26, 23, 0.6);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 16px;
  padding: clamp(1.5rem, 4vw, 2.25rem) clamp(1.5rem, 4vw, 2.5rem);
}

.hero-card .eyebrow {
  color: #ddc39d;
}

.hero-card h1 {
  color: var(--bg);
  margin-bottom: 0.25em;
}

.hero-card .hero-lede {
  color: rgba(246, 244, 240, 0.9);
  margin-bottom: 0;
}

.hero-lede {
  font-size: 1.15rem;
  max-width: 32ch;
}

/* Sections */
.section {
  padding: var(--space-section) 0;
  border-top: 1px solid var(--line);
}

/* Obsah je viditelný by default. Schová se jen tehdy, když JS opravdu běží
   (třída .js na <html>) — jinak by chyba ve skriptu udělala prázdnou stránku. */
.js .reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.js .reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Services */
.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2.5rem;
  margin-top: 2.5rem;
}

.service-card ul {
  list-style: none;
  padding: 0;
  margin: 1.2em 0 0;
  border-top: 1px solid var(--line);
}
.service-card li {
  padding: 0.65em 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 0.95rem;
}
/* Vysvětlivka v závorce — vizuálně podružná vůči názvu položky. */
.service-card li span {
  font-size: 0.85rem;
  opacity: 0.72;
}

/* Portfolio */
.portfolio-filter {
  display: flex;
  gap: 0.5rem;
  margin: 2rem 0 2.5rem;
}
.filter-btn {
  font-family: var(--font-body);
  background: none;
  border: 1px solid var(--line);
  padding: 0.5em 1.1em;
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.85rem;
  color: var(--ink-soft);
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.filter-btn:hover {
  border-color: var(--accent);
}
.filter-btn.is-active {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--bg);
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.portfolio-item {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.portfolio-item.is-hidden {
  display: none;
}
.portfolio-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.portfolio-item.is-clickable {
  cursor: pointer;
}
.portfolio-item.is-clickable img {
  transition: transform 0.4s ease;
}
.portfolio-item.is-clickable:hover img {
  transform: scale(1.04);
}

/* Placeholder boxes (remove once real images are in place) */
.placeholder-box {
  position: relative;
  background:
    repeating-linear-gradient(
      135deg,
      var(--bg-alt),
      var(--bg-alt) 10px,
      #e6e2d8 10px,
      #e6e2d8 20px
    );
  border: 1px dashed var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.placeholder-box::after {
  content: attr(data-placeholder);
  font-size: 0.78rem;
  color: var(--ink-soft);
  background: var(--bg);
  padding: 0.4em 0.8em;
  border-radius: 4px;
  text-align: center;
  max-width: 80%;
}
/* Live virtual tour embed (Marzipano) */
.tour-embed {
  position: relative;
  background: var(--bg-alt);
}
.tour-embed iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}
/* Touch shield — prevents the tour from swallowing page scroll on phones.
   Only shown on touch devices; a tap activates the tour. */
.tour-embed__shield {
  display: none;
  position: absolute;
  inset: 0;
  z-index: 1;
  align-items: flex-start;
  justify-content: center;
  padding-top: 45%;
  background: rgba(28, 26, 23, 0.25);
  border: none;
  cursor: pointer;
  font-family: inherit;
}
.tour-embed__shield span {
  background: rgba(28, 26, 23, 0.82);
  color: var(--bg);
  font-size: 0.78rem;
  padding: 0.5em 1em;
  border-radius: 999px;
}
.tour-embed__shield.is-dismissed {
  display: none;
}

@media (hover: none) and (pointer: coarse) {
  .tour-embed__shield {
    display: flex;
  }
  .tour-embed__shield.is-dismissed {
    display: none;
  }
}


/* Portfolio lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: none;
  align-items: center;
  justify-content: center;
}
.lightbox.is-open {
  display: flex;
}
.lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(28, 26, 23, 0.92);
}
.lightbox__img {
  position: relative;
  max-width: min(88vw, 1400px);
  max-height: 86vh;
  object-fit: contain;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}
.lightbox__close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  z-index: 1;
  background: none;
  border: none;
  color: var(--bg);
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.3em;
}
.lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1;
  background: none;
  border: none;
  color: var(--bg);
  font-size: 3rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.2em 0.4em;
  opacity: 0.8;
  transition: opacity 0.2s ease;
}
.lightbox__nav:hover {
  opacity: 1;
}
.lightbox__prev {
  left: 0.5rem;
}
.lightbox__next {
  right: 0.5rem;
}

@media (max-width: 600px) {
  .lightbox__nav {
    font-size: 2rem;
  }
  .lightbox__close {
    top: 1rem;
    right: 1rem;
  }
}

/* Price list */
.price-list {
  margin: 2rem 0 0.5em;
  border-top: 1px solid var(--line);
}
.price-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 1em 0;
  border-bottom: 1px solid var(--line);
}
.price-row dt {
  font-size: 1rem;
  color: var(--ink);
}
.price-row dt span {
  color: var(--ink-soft);
  font-size: 0.85rem;
}
.price-row dd {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.1rem;
}
.price-note {
  font-size: 0.8rem;
  font-style: italic;
  color: var(--accent);
}

/* Contact */
.contact-block {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin: 1.8rem 0;
}
.contact-link {
  font-family: var(--font-display);
  font-size: 1.6rem;
  text-decoration: none;
  color: var(--ink);
  width: fit-content;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, color 0.2s ease;
}
.contact-link:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.social-block {
  display: flex;
  gap: 1.5rem;
}
.social-block a {
  text-decoration: none;
  font-size: 0.9rem;
  color: var(--ink-soft);
}
.social-block a:hover {
  color: var(--accent);
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 2rem 0;
}
.footer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: var(--ink-soft);
}
.footer-row a {
  text-decoration: none;
  color: var(--ink-soft);
  border-bottom: 1px solid var(--line);
}
.footer-row a:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* Responsive */
@media (max-width: 860px) {
  .primary-nav {
    position: fixed;
    top: 4.4rem;
    left: 0;
    right: 0;
    background: var(--bg);
    flex-direction: column;
    gap: 0;
    border-bottom: 1px solid var(--line);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
  }
  .primary-nav.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }
  .primary-nav a {
    padding: 1.1em 1.5rem;
    border-bottom: 1px solid var(--line);
  }
  .nav-toggle {
    display: block;
  }
  .services-grid {
    grid-template-columns: 1fr;
  }
  .portfolio-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 520px) {
  .portfolio-grid {
    grid-template-columns: 1fr;
  }
  .price-row {
    flex-direction: column;
    gap: 0.3em;
    align-items: flex-start;
  }
  .contact-link {
    font-size: 1.3rem;
  }
  .hero-card {
    left: 1rem;
    right: 1rem;
    max-width: none;
  }
}
