/* =========================================================
   Investiční byty Brno — Dačického
   Design tokens
   ========================================================= */

:root {
  /* Colour */
  --ink:        #14100d;
  --ink-70:     #4a423a;
  --ink-50:     #7a7168;
  --paper:      #fffdfa;
  --sand:       #f7f3ec;
  --sand-deep:  #efe8dd;
  --line:       #e4dbcf;
  --accent:     #9a6b3f;
  --accent-ink: #7d5530;
  --accent-soft:#f0e4d6;

  /* Značka Jan Hlavoň — viz Design manuál (Prussian blue / Selective yellow) */
  --brand-navy:   #052e45;
  --brand-yellow: #fbba00;

  --ok:         #2f7d4f;
  --ok-soft:    #e6f1ea;
  --warn:       #a8731a;
  --warn-soft:  #f7eeda;
  --gone:       #8b8178;
  --gone-soft:  #eeeae5;

  /* Type */
  /* Nadpisy i čísla jedou stejným groteskem jako text. Dřív tu byl patkový
     Fraunces; jeho měkké patky a stylizované tvary působily v češtině spíš
     jako špatně načtené písmo než jako záměr. Rozdíl mezi nadpisem a textem
     teď dělá velikost, váha a prostor, ne druhé písmo. */
  --font-display: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  /* Space & shape */
  --gutter: clamp(1.25rem, 5vw, 4rem);
  --maxw: 1200px;
  --radius: 4px;
  --radius-lg: 10px;

  --shadow-sm: 0 1px 2px rgba(20, 16, 13, .05), 0 2px 8px rgba(20, 16, 13, .04);
  --shadow-md: 0 2px 4px rgba(20, 16, 13, .06), 0 12px 32px rgba(20, 16, 13, .08);

  --ease: cubic-bezier(.22, .61, .36, 1);
}

/* =========================================================
   Base
   ========================================================= */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 86px;
  -webkit-text-size-adjust: 100%;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }
a { color: inherit; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -.025em;
  margin: 0;
  text-wrap: balance;
}

p { margin: 0 0 1em; text-wrap: pretty; }
p:last-child { margin-bottom: 0; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: var(--paper);
  padding: .75rem 1.25rem;
  z-index: 200;
}
.skip-link:focus { left: 0; }

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* =========================================================
   Layout primitives
   ========================================================= */

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: clamp(4rem, 9vw, 7.5rem); }
.section--sand { background: var(--sand); }
.section--tight { padding-block: clamp(3rem, 6vw, 5rem); }

.section__head { max-width: 62ch; margin-bottom: clamp(2rem, 4vw, 3.25rem); }
.section__head--wide { max-width: 80ch; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .625rem;
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent-ink);
  margin-bottom: 1rem;
}
.eyebrow::before {
  content: "";
  width: 1.75rem;
  height: 1px;
  background: currentColor;
  opacity: .55;
}

.h-xl { font-size: clamp(2.5rem, 6.5vw, 4.5rem); letter-spacing: -.035em; }
.h-lg { font-size: clamp(2rem, 4.2vw, 3rem); letter-spacing: -.03em; }
.h-md { font-size: clamp(1.375rem, 2.4vw, 1.75rem); }
.h-sm { font-size: 1.0625rem; font-family: var(--font-body); font-weight: 600; letter-spacing: 0; }

.lead {
  font-size: clamp(1.0625rem, 1.6vw, 1.25rem);
  line-height: 1.6;
  color: var(--ink-70);
  margin-top: 1.25rem;
}

.muted { color: var(--ink-50); }
.small { font-size: .875rem; }

/* =========================================================
   Buttons
   ========================================================= */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .875rem 1.5rem;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font: inherit;
  font-size: .9375rem;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .2s var(--ease), color .2s var(--ease),
              border-color .2s var(--ease), transform .2s var(--ease);
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn--primary { background: var(--ink); color: var(--paper); }
.btn--primary:hover { background: var(--accent-ink); }

.btn--ghost { border-color: var(--line); background: transparent; color: var(--ink); }
.btn--ghost:hover { border-color: var(--ink); background: rgba(20,16,13,.03); }

.btn--light { background: var(--paper); color: var(--ink); }
.btn--light:hover { background: var(--sand-deep); }

.btn--sm { padding: .625rem 1rem; font-size: .875rem; }
.btn--block { width: 100%; }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-weight: 600;
  font-size: .9375rem;
  text-decoration: none;
  color: var(--accent-ink);
  border-bottom: 1px solid currentColor;
  padding-bottom: 1px;
}
.link-arrow:hover { color: var(--ink); }

/* =========================================================
   Header
   ========================================================= */

.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 253, 250, .82);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s var(--ease), background-color .25s var(--ease);
}
.header.is-stuck { border-bottom-color: var(--line); }

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 72px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 1.25rem;
  text-decoration: none;
  line-height: 1.15;
  flex: none;
}
/* Logo se sází na výšku; šířku si dopočítá podle poměru stran v souboru. */
.brand__logo {
  height: 34px;
  width: auto;
  flex: none;
}
.brand__divider {
  width: 1px;
  align-self: stretch;
  margin-block: .25rem;
  background: var(--line);
  flex: none;
}
.brand__text {
  display: inline-flex;
  flex-direction: column;
}
.brand__name {
  font-family: var(--font-display);
  font-size: 1.1875rem;
  font-weight: 600;
  letter-spacing: -.01em;
  white-space: nowrap;
}
.brand__sub {
  white-space: nowrap;
  font-size: .6875rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink-50);
  margin-top: .15rem;
}

/* Jakmile by název projektu tlačil navigaci do dvou řádků, zůstane
   v hlavičce jen logo — adresu nese hero i patička. */
@media (max-width: 1300px) {
  .brand__divider, .brand__text { display: none; }
}
@media (max-width: 620px) {
  .brand__logo { height: 30px; }
}

.nav { display: flex; align-items: center; gap: 2rem; }
.nav__cta { flex: none; }

.nav__list {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav__list > li { flex: none; }
.nav__link {
  font-size: .9375rem;
  font-weight: 500;
  text-decoration: none;
  color: var(--ink-70);
  white-space: nowrap;
  padding-block: .35rem;
  border-bottom: 1.5px solid transparent;
  transition: color .18s var(--ease), border-color .18s var(--ease);
}
.nav__link:hover { color: var(--ink); }
.nav__link.is-active { color: var(--ink); border-bottom-color: var(--accent); }

.nav__toggle {
  display: none;
  width: 44px;
  height: 44px;
  margin-right: -10px;
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 0;
  position: relative;
}
.nav__toggle span,
.nav__toggle span::before,
.nav__toggle span::after {
  position: absolute;
  left: 11px;
  width: 22px;
  height: 1.5px;
  background: var(--ink);
  transition: transform .25s var(--ease), opacity .2s var(--ease);
}
.nav__toggle span { top: 21px; }
.nav__toggle span::before { content: ""; top: -7px; left: 0; }
.nav__toggle span::after  { content: ""; top: 7px;  left: 0; }

.nav__toggle[aria-expanded="true"] span { background: transparent; }
.nav__toggle[aria-expanded="true"] span::before { transform: translateY(7px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] span::after  { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 980px) {
  .nav__toggle { display: block; }
  .nav {
    position: fixed;
    inset: 72px 0 auto;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    padding: 1rem var(--gutter) 2rem;
    transform: translateY(-120%);
    transition: transform .3s var(--ease);
    max-height: calc(100dvh - 72px);
    overflow-y: auto;
  }
  .nav.is-open { transform: translateY(0); }
  .nav__list { flex-direction: column; align-items: stretch; gap: 0; }
  .nav__link {
    display: block;
    padding: .9rem 0;
    font-size: 1.0625rem;
    border-bottom: 1px solid var(--line);
  }
  .nav__link.is-active { border-bottom-color: var(--line); color: var(--accent-ink); }
  .nav__cta { margin-top: 1.5rem; }
  .nav__cta .btn { width: 100%; }
}

/* =========================================================
   Hero
   ========================================================= */

.hero {
  position: relative;
  background: var(--sand);
  overflow: hidden;
}

.hero__media {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(120% 90% at 78% 12%, rgba(154,107,63,.22) 0%, rgba(154,107,63,0) 58%),
    radial-gradient(100% 80% at 8% 92%, rgba(20,16,13,.14) 0%, rgba(20,16,13,0) 60%),
    linear-gradient(168deg, #f3ece1 0%, #e8ded0 52%, #ded2c1 100%);
}
.hero__media img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 45%;
}
/* Závoj nad fotkou. Text je vlevo, takže je vrstva vlevo skoro krycí
   a doprava se otevírá, aby zůstal vidět dům; druhý přechod svazuje
   spodek fotky s pásem statistik. Bez něj text na fotce nedrží kontrast. */
.hero__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    /* Horní levý roh nese nadpisek a podtitulek mosaznou barvou, která
       má na fotce nejmenší rezervu — pod nimi je závoj nejhustší. */
    radial-gradient(72% 58% at 10% 26%,
      rgba(250,246,239,.90) 0%,
      rgba(250,246,239,.45) 55%,
      rgba(250,246,239,0) 100%),
    linear-gradient(96deg,
      rgba(250,246,239,.97) 0%,
      rgba(250,246,239,.94) 32%,
      rgba(250,246,239,.72) 54%,
      rgba(250,246,239,.42) 78%,
      rgba(250,246,239,.34) 100%),
    linear-gradient(180deg,
      rgba(255,253,250,.55) 0%,
      rgba(255,253,250,.10) 38%,
      rgba(255,253,250,.30) 78%,
      rgba(255,253,250,.72) 100%);
}
/* Na úzkém displeji sahá text přes celou šířku, takže vodorovný
   přechod nestačí a závoj musí být plošný. */
@media (max-width: 860px) {
  .hero__media::after {
    background:
      linear-gradient(180deg,
        rgba(250,246,239,.92) 0%,
        rgba(250,246,239,.78) 55%,
        rgba(250,246,239,.92) 100%);
  }
}

.hero__inner {
  position: relative;
  padding-block: clamp(4.5rem, 11vw, 8.5rem) clamp(3rem, 6vw, 4.5rem);
  max-width: 46rem;
}

.hero__title { margin-top: .5rem; }
.hero__title em {
  font-style: normal;
  color: var(--accent-ink);
}

.hero__tagline {
  font-family: var(--font-display);
  font-size: clamp(1.125rem, 2.1vw, 1.5rem);
  font-weight: 500;
  letter-spacing: -.01em;
  color: var(--accent-ink);
  margin-top: .875rem;
}

.hero__lead {
  font-size: clamp(1.0625rem, 1.7vw, 1.25rem);
  line-height: 1.55;
  color: var(--ink-70);
  margin-top: 1.5rem;
  max-width: 38rem;
}

.hero__points {
  list-style: none;
  margin: 1.75rem 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: .5rem .625rem;
}
.hero__points li {
  padding: .4rem .875rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 253, 250, .6);
  font-size: .875rem;
  font-weight: 500;
  color: var(--ink-70);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: .875rem;
  margin-top: 2.25rem;
}

/* Financing banner */
.banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: clamp(1.25rem, 2.5vw, 1.75rem) clamp(1.25rem, 3vw, 2rem);
  background: var(--accent-soft);
  border-radius: var(--radius-lg);
  margin-top: clamp(2.5rem, 5vw, 4rem);
}
.banner .btn { flex: none; }

/* Pruh s bonusem — proti pískovému pruhu financování stojí na papíru
   s mosaznou linkou, ať se dvě pobídky za sebou nesplynou v jednu. */
.banner--offer {
  background: var(--paper);
  border: 1px solid var(--accent);
  box-shadow: var(--shadow-sm);
}
.banner + .banner { margin-top: 1rem; }

.banner__flag {
  display: inline-block;
  padding: .3rem .625rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-ink);
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .02em;
  text-transform: uppercase;
}
.banner__offer {
  flex: none;
  display: grid;
  justify-items: start;
  gap: .25rem;
}
.banner__offer .btn { margin-top: .75rem; }
.banner__value {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -.02em;
  color: var(--accent-ink);
  white-space: nowrap;
}

/* Zmínka o bonusu uvnitř karty — mosazný proužek, ať se neztratí v textu. */
.note-offer {
  margin: 1rem 0 0;
  padding: .75rem .875rem;
  border-left: 3px solid var(--accent);
  background: var(--accent-soft);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: .875rem;
  color: var(--ink-70);
}

/* Stat strip */
.stats {
  position: relative;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1px;
  background: var(--line);
  border-top: 1px solid var(--line);
}
.stat {
  background: var(--paper);
  padding: clamp(1.5rem, 3vw, 2.25rem) clamp(1.25rem, 2.5vw, 2rem);
}
.stat__value {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3.2vw, 2.5rem);
  font-weight: 600;
  letter-spacing: -.02em;
  line-height: 1;
}
.stat__label {
  display: block;
  margin-top: .625rem;
  font-size: .8125rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-50);
}

/* =========================================================
   Content grids
   ========================================================= */

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(255px, 1fr));
  gap: 1.25rem;
}

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 2.5vw, 2rem);
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease), transform .2s var(--ease);
}
.card:hover {
  border-color: var(--accent-soft);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.card__icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-ink);
  margin-bottom: 1.125rem;
}
.card__icon svg { width: 20px; height: 20px; }
.card h3 { margin-bottom: .5rem; }
.card p { color: var(--ink-70); font-size: .9375rem; }

/* Definition list — key/value facts */
.facts {
  margin: 0;
  border-top: 1px solid var(--line);
}
.facts > div {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  padding: .9rem 0;
  border-bottom: 1px solid var(--line);
}
.facts dt { color: var(--ink-50); font-size: .9375rem; }
.facts dd { margin: 0; font-weight: 600; text-align: right; }

.facts--compact > div { padding: .65rem 0; }
.facts--compact dt,
.facts--compact dd { font-size: .875rem; }

/* Document links */
.docs { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.docs a {
  display: flex;
  align-items: center;
  gap: .625rem;
  padding: .8rem 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  text-decoration: none;
  font-size: .9375rem;
  font-weight: 500;
  transition: border-color .18s var(--ease), background-color .18s var(--ease);
}
.docs a:hover { border-color: var(--accent); background: var(--accent-soft); }
.docs svg { width: 18px; height: 18px; flex: none; color: var(--accent); }

/* Checklist */
.checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: .75rem; }
.checklist li {
  position: relative;
  padding-left: 1.875rem;
  color: var(--ink-70);
  font-size: .9375rem;
}
.checklist li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .45em;
  width: 1rem;
  height: .5rem;
  border-left: 1.75px solid var(--accent);
  border-bottom: 1.75px solid var(--accent);
  transform: rotate(-45deg);
}

/* =========================================================
   Units — filters + table + mobile cards
   ========================================================= */

.filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem;
  margin-bottom: 1.5rem;
}
.filters__label {
  font-size: .8125rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-50);
  margin-right: .375rem;
  flex: none;
}
.chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.chip {
  padding: .5rem .9rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  font: inherit;
  font-size: .875rem;
  font-weight: 500;
  color: var(--ink-70);
  cursor: pointer;
  transition: all .18s var(--ease);
}
.chip:hover { border-color: var(--ink-50); color: var(--ink); }
.chip[aria-pressed="true"] {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

.table-scroll {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--paper);
}

.units {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
  font-size: .9375rem;
}
.units thead th {
  position: sticky;
  top: 0;
  background: var(--sand);
  text-align: left;
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-50);
  padding: .875rem 1.125rem;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.units tbody td {
  padding: 1rem 1.125rem;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
.units tbody tr:last-child td { border-bottom: 0; }
.units tbody tr.unit-row { transition: background-color .15s var(--ease); }
.units tbody tr.unit-row:hover { background: var(--sand); }
.units tbody tr.is-gone { color: var(--ink-50); }
.units .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.units .unit-id { font-weight: 600; }
.units .price { font-weight: 600; }

.units caption {
  caption-side: top;
  text-align: left;
  padding: 1rem 1.125rem;
  font-size: .8125rem;
  color: var(--ink-50);
  border-bottom: 1px solid var(--line);
}

/* Sortable column headers */
.units th.sortable { padding: 0; }
.units th.sortable button {
  width: 100%;
  padding: .875rem 1.125rem;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: inherit;
  text-align: right;
  cursor: pointer;
  white-space: nowrap;
}
.units th.sortable button:hover { color: var(--ink); }
.units th.sortable[aria-sort="ascending"] button,
.units th.sortable[aria-sort="descending"] button { color: var(--accent-ink); }
.units th.sortable[aria-sort="ascending"] span::before { content: "↑"; }
.units th.sortable[aria-sort="descending"] span::before { content: "↓"; }
.units th.sortable[aria-sort="ascending"] span,
.units th.sortable[aria-sort="descending"] span { font-size: 0; }
.units th.sortable[aria-sort] span::before { font-size: .875rem; }

/* Rozbalený detail jednotky — vlevo video prohlídka, vpravo údaje
   a odkazy; fotogalerie pod tím přes celou šířku. */
/* Odsazení nese buňka, ne jednotlivé bloky uvnitř — jinak sahala
   fotogalerie od kraje ke kraji a nezarovnala se s videem nad sebou. */
.units tr.unit-detail > td { padding: 1.5rem 1.125rem; background: var(--sand); }
.unit-detail__inner {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  align-items: start;
  gap: 1.5rem 2rem;
}
.unit-detail__inner > .unit-detail__panel:only-child { grid-column: 1 / -1; max-width: 40rem; }

.unit-detail__links { list-style: none; margin: 1.25rem 0 0; padding: 0; display: grid; gap: .5rem; }
.unit-detail__links a { font-weight: 500; color: var(--accent-ink); }
.unit-detail__links a:hover { color: var(--ink); }
.unit-detail__price {
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -.02em;
  margin: .875rem 0 1rem;
}
@media (max-width: 1080px) {
  .unit-detail__inner { grid-template-columns: 1fr; }
  .unit-detail__media { max-width: 30rem; }
}

/* =========================================================
   Video prohlídka (YouTube)
   ---------------------------------------------------------
   V stránce je jen náhled s tlačítkem; iframe s přehrávačem
   doplní main.js až po kliknutí. Náhled se tahá z i.ytimg.com
   (povoleno v _headers přes img-src), a když se nenačte,
   onerror ho odstraní — zbyde tmavá plocha s tlačítkem, která
   vypadá stejně záměrně.
   ========================================================= */

.video,
.video__frame {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
  border-radius: var(--radius-lg);
  background: var(--ink);
}
.video {
  position: relative;
  padding: 0;
  overflow: hidden;
  cursor: pointer;
}
.video__thumb {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  /* Náhled z YouTube je 4:3 s černými pruhy — cover je ořízne. */
  object-fit: cover;
  transition: transform .5s var(--ease), opacity .2s var(--ease);
}
.video:hover .video__thumb { transform: scale(1.03); opacity: .85; }
.video__play {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
  width: 60px; height: 60px;
  padding-left: 3px;
  border-radius: 50%;
  background: rgba(20, 16, 13, .72);
  color: var(--paper);
  transition: background-color .2s var(--ease);
}
.video:hover .video__play { background: var(--accent-ink); }
.video__label {
  position: absolute;
  left: .75rem; bottom: .75rem;
  padding: .3rem .625rem;
  border-radius: 999px;
  background: rgba(20, 16, 13, .72);
  color: var(--paper);
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .02em;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .3rem .625rem;
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .02em;
  white-space: nowrap;
}
.badge::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.badge--ok   { background: var(--ok-soft);   color: var(--ok); }
.badge--warn { background: var(--warn-soft); color: var(--warn); }
.badge--gone { background: var(--gone-soft); color: var(--gone); }

/* =========================================================
   Jednotky na mobilu — karty místo tabulky
   ---------------------------------------------------------
   Tabulka má osm sloupců a min-width 720px; na telefonu se
   nedala číst bez posouvání do stran, a to zrovna u toho,
   kvůli čemu zájemci na web chodí. Pod 1080 px se proto
   tabulka schová a stejná data vykreslí jako karty (viz
   cardHtml v main.js) — podstatné údaje rovnou vidět, fotky
   a smlouva se rozbalí na místě.
   ========================================================= */

.units-sort { display: none; }
.units-sort[hidden] { display: none; }
.units-sort label {
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-50);
}
.units-sort select {
  flex: 1;
  min-width: 0;
  padding: .625rem .75rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  color: inherit;
  font: inherit;
  font-size: .9375rem;
}

.unit-cards { display: none; }
.unit-cards[hidden] { display: none; }

.ucard {
  padding: 1.125rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--paper);
  box-shadow: var(--shadow-sm);
}
.ucard--gone { color: var(--ink-50); background: var(--sand); box-shadow: none; }

.ucard__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}
.ucard__id { font-size: 1.25rem; font-weight: 600; letter-spacing: -.02em; }
.ucard__sub { font-size: .875rem; color: var(--ink-50); margin-top: .125rem; }

.ucard__figures {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .75rem 1rem;
  margin: 1rem 0 0;
  padding-top: .875rem;
  border-top: 1px solid var(--line);
}
.ucard__figures dt {
  font-size: .6875rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-50);
}
.ucard__figures dd {
  margin: .125rem 0 0;
  font-size: 1.0625rem;
  font-variant-numeric: tabular-nums;
}
.ucard__price { font-weight: 600; }

.ucard__actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
  gap: .5rem;
  margin-top: 1rem;
}
.ucard__actions .btn { padding-inline: .75rem; }

.ucard__more {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1.25rem;
  margin-top: .875rem;
  padding-top: .875rem;
  border-top: 1px solid var(--line);
}
.ucard__link {
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  font-size: .875rem;
  font-weight: 500;
  color: var(--accent-ink);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.ucard__link:hover { color: var(--ink); }

.ucard__detail { margin-top: .875rem; }
.ucard__detail .unit-detail__media { margin-bottom: .625rem; }
.ucard__detail .gallery--tight {
  grid-template-columns: repeat(auto-fill, minmax(6rem, 1fr));
  gap: .375rem;
}

@media (max-width: 1080px) {
  .table-scroll { display: none; }
  .units-sort {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin-bottom: 1rem;
  }
  .units-sort[hidden] { display: none; }
  .unit-cards { display: grid; gap: .875rem; }
  .unit-cards[hidden] { display: none; }
}

.units-empty {
  margin-top: 1rem;
  padding: 3rem 1.5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  text-align: center;
  color: var(--ink-50);
}

.units-note {
  margin-top: 1rem;
  font-size: .8125rem;
  color: var(--ink-50);
}

/* =========================================================
   Timeline
   ========================================================= */

.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.timeline li {
  position: relative;
  padding: 0 0 2rem 2.25rem;
  border-left: 1px solid var(--line);
}
.timeline li:last-child { padding-bottom: 0; border-left-color: transparent; }
.timeline li::before {
  content: "";
  position: absolute;
  left: -5px;
  top: .45rem;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--paper);
  border: 1.75px solid var(--line);
}
.timeline li.is-done::before { background: var(--accent); border-color: var(--accent); }
.timeline__date {
  display: block;
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--accent-ink);
  margin-bottom: .3rem;
}
.timeline__text { color: var(--ink-70); font-size: .9375rem; margin-top: .25rem; }

/* =========================================================
   Gallery
   ========================================================= */

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
}
.gallery__item {
  position: relative;
  aspect-ratio: 4 / 3;
  border: 0;
  padding: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: zoom-in;
  background: var(--sand-deep);
}
.gallery__item:nth-child(1) { grid-column: span 2; aspect-ratio: 16 / 9; }
@media (max-width: 700px) { .gallery__item:nth-child(1) { grid-column: span 1; aspect-ratio: 4 / 3; } }
.gallery__item img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .5s var(--ease);
}
.gallery__item:hover img { transform: scale(1.04); }

/* Galerie uvnitř rozbaleného detailu jednotky — menší dlaždice
   a bez zvýrazněné první fotky, aby nekonkurovala galerii domu. */
.gallery--tight {
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: .5rem;
}
.gallery--tight .gallery__item,
.gallery--tight .gallery__item:nth-child(1) {
  grid-column: span 1;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius);
}

.unit-gallery { margin-top: 1.5rem; }
.unit-gallery__title {
  font-family: var(--font-body);
  font-size: .8125rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-50);
  margin: 0 0 .625rem;
}

.lightbox { display: none; }

.lightbox[open] {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: clamp(1rem, 4vw, 3rem);
  background: rgba(20, 16, 13, .92);
  border: 0;
}
.lightbox::backdrop { background: rgba(20, 16, 13, .92); }
.lightbox img { max-width: 100%; max-height: 85dvh; object-fit: contain; border-radius: var(--radius); }
.lightbox__close {
  position: absolute;
  top: 1rem; right: 1rem;
  width: 44px; height: 44px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 253, 250, .12);
  color: var(--paper);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}
.lightbox__close:hover { background: rgba(255, 253, 250, .22); }

/* Šipky a počitadlo leží nad fotkou, aby ji v mřížce dialogu neposouvaly. */
.lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  width: 52px; height: 52px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 253, 250, .12);
  color: var(--paper);
  cursor: pointer;
  transition: background .2s var(--ease);
}
.lightbox__nav:hover { background: rgba(255, 253, 250, .22); }
.lightbox__nav[hidden] { display: none; }
.lightbox__nav--prev { left: clamp(.5rem, 2vw, 1.5rem); }
.lightbox__nav--next { right: clamp(.5rem, 2vw, 1.5rem); }

.lightbox__counter {
  position: absolute;
  left: 50%;
  bottom: clamp(.75rem, 2vw, 1.5rem);
  transform: translateX(-50%);
  margin: 0;
  padding: .25rem .75rem;
  border-radius: 999px;
  /* Tmavá pilulka — počitadlo leží na úzkém displeji přes spodek fotky. */
  background: rgba(20, 16, 13, .65);
  color: var(--paper);
  font-size: .8125rem;
  font-variant-numeric: tabular-nums;
}
.lightbox__counter[hidden] { display: none; }

/* Na úzkém displeji by šipky ležely přes fotku — tam se listuje přejetím
   prstu, které obsluhuje main.js. */
@media (max-width: 640px) {
  .lightbox__nav { display: none; }
}

/* =========================================================
   FAQ
   ========================================================= */

.faq { border-top: 1px solid var(--line); }
.faq details {
  border-bottom: 1px solid var(--line);
}
.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.375rem 0;
  cursor: pointer;
  list-style: none;
  font-weight: 600;
  font-size: 1.0625rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "";
  flex: none;
  width: 12px; height: 12px;
  border-right: 1.75px solid var(--accent);
  border-bottom: 1.75px solid var(--accent);
  transform: rotate(45deg) translate(-3px, -3px);
  transition: transform .25s var(--ease);
}
.faq details[open] summary::after { transform: rotate(-135deg) translate(-3px, -3px); }
.faq details > div { padding-bottom: 1.375rem; color: var(--ink-70); max-width: 70ch; }

/* =========================================================
   Contact
   ========================================================= */

.contact {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}
@media (max-width: 900px) { .contact { grid-template-columns: 1fr; } }

.agent {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 3vw, 2rem);
}
.agent__photo {
  width: 72px; height: 72px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--sand-deep);
  margin-bottom: 1.125rem;
}
/* Jméno záměrně groteskem, ne serifem: „Ing. Jan Hlavoň, MBA“ je samá
   zkratka s tečkami a čárkami a v patkovém řezu to vypadalo jako chyba
   sazby. Patička píše jméno stejně. */
.agent__name { font-size: 1.25rem; font-weight: 600; letter-spacing: -.01em; }
.agent__role { color: var(--ink-50); font-size: .9375rem; margin-top: .125rem; }
.agent__links { list-style: none; margin: 1.5rem 0 0; padding: 0; display: grid; gap: .75rem; }
.agent__links a {
  display: inline-flex;
  align-items: center;
  gap: .625rem;
  text-decoration: none;
  font-weight: 500;
}
.agent__links a:hover { color: var(--accent-ink); }
.agent__links svg { width: 17px; height: 17px; flex: none; color: var(--accent); }
.agent__rule { border: 0; border-top: 1px solid var(--line); margin: 1.75rem 0 1.25rem; }
.agent__logo { height: 40px; width: auto; }

.form { display: grid; gap: 1.125rem; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.125rem; }
@media (max-width: 560px) { .form__row { grid-template-columns: 1fr; } }

.field { display: grid; gap: .4rem; }
.field label { font-size: .875rem; font-weight: 600; }
.field input,
.field select,
.field textarea {
  width: 100%;
  padding: .8125rem .9375rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  font: inherit;
  font-size: .9375rem;
  color: var(--ink);
  transition: border-color .18s var(--ease), box-shadow .18s var(--ease);
}
.field textarea { resize: vertical; min-height: 120px; }
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.fieldset {
  margin: 0;
  padding: 0;
  border: 0;
}
.fieldset legend {
  padding: 0;
  margin-bottom: .625rem;
  font-size: .875rem;
  font-weight: 600;
}
.radios { display: grid; gap: .5rem; }
.radios--inline { grid-auto-flow: column; justify-content: start; gap: 1.5rem; }
@media (max-width: 480px) { .radios--inline { grid-auto-flow: row; gap: .5rem; } }
.radios label {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: .9375rem;
  color: var(--ink-70);
  cursor: pointer;
}
.radios input { accent-color: var(--accent); flex: none; }

.consent {
  display: flex;
  align-items: flex-start;
  gap: .625rem;
  font-size: .8125rem;
  color: var(--ink-50);
  line-height: 1.5;
}
.consent input { margin-top: .2rem; flex: none; accent-color: var(--accent); }

/* Honeypot — mimo obrazovku, mimo tab order, neviditelný pro čtečky */
.honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-note--ok {
  color: var(--ok);
  font-weight: 600;
}

/* =========================================================
   CTA band
   ========================================================= */

.cta-band {
  background: var(--ink);
  color: var(--paper);
  text-align: center;
}
.cta-band .eyebrow { color: #d9b98f; }
.cta-band p { color: rgba(255, 253, 250, .72); margin-inline: auto; max-width: 52ch; }
.cta-band__actions {
  display: flex;
  flex-wrap: wrap;
  gap: .875rem;
  justify-content: center;
  margin-top: 2rem;
}
.cta-band .btn--ghost { color: var(--paper); border-color: rgba(255, 253, 250, .3); }
.cta-band .btn--ghost:hover { border-color: var(--paper); background: rgba(255, 253, 250, .08); }

/* =========================================================
   Footer
   ========================================================= */

.footer {
  background: #100d0a;
  color: rgba(255, 253, 250, .62);
  font-size: .875rem;
  padding-block: clamp(3rem, 6vw, 4.5rem) 2rem;
}
.footer a { color: rgba(255, 253, 250, .82); text-decoration: none; }
.footer a:hover { color: var(--paper); text-decoration: underline; }
.footer__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2.5rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid rgba(255, 253, 250, .12);
}
.footer__title {
  color: var(--paper);
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .625rem; }
.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  padding-top: 1.75rem;
  font-size: .8125rem;
  color: rgba(255, 253, 250, .45);
}
.footer__logo {
  height: 42px;
  width: auto;
  margin-bottom: 1.5rem;
}
.footer__brand {
  display: block;
  font-family: var(--font-display);
  font-size: 1.1875rem;
  font-weight: 600;
  color: var(--paper);
}
.footer__brandsub {
  display: block;
  margin-top: .25rem;
  font-size: .6875rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: rgba(255, 253, 250, .45);
}

/* =========================================================
   Map
   ========================================================= */

.map {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--line);
  aspect-ratio: 4 / 3;
  background: var(--sand-deep);
}
.map iframe { width: 100%; height: 100%; border: 0; display: block; }

/* =========================================================
   Reveal on scroll
   ========================================================= */

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
}
.reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; }
}

/* =========================================================
   Print
   ========================================================= */

@media print {
  .header, .nav, .cta-band, .form, .lightbox { display: none !important; }
  /* Na papír se hodí tabulka, ne karty pro dotyk — stránka se tiskne
     v šířce, kde by jinak platil mobilní breakpoint. */
  .table-scroll { display: block !important; }
  .unit-cards, .units-sort { display: none !important; }
  /* Bílá varianta loga by na papíře zmizela — v patičce ji netiskneme. */
  .footer__logo { display: none !important; }
  body { background: #fff; }
  .section { padding-block: 1.5rem; }
  .reveal { opacity: 1; transform: none; }
}
