:root {
  --bg: #0b1020;
  --bg-soft: #11182e;
  --surface: #ffffff;
  --surface-alt: #f5f7fc;
  --ink: #0e1530;
  --ink-soft: #4a5478;
  --line: #e6eaf4;
  --brand: #4f6bff;
  --brand-2: #11d3c6;
  --accent: #ff7a59;
  --grad: linear-gradient(120deg, #4f6bff 0%, #7b5cff 45%, #11d3c6 100%);
  --grad-warm: linear-gradient(120deg, #ff7a59, #ff5a8a);
  --radius: 18px;
  --shadow: 0 18px 50px -20px rgba(20, 32, 80, 0.35);
  --shadow-sm: 0 8px 24px -12px rgba(20, 32, 80, 0.28);
  --container: 1140px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: "Plus Jakarta Sans", system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: var(--surface);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 24px; }

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

/* HEADER – vždy světlá, sjednocená */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: box-shadow .3s ease, border-color .3s ease;
}
.site-header.scrolled { box-shadow: 0 6px 24px -16px rgba(20,32,80,.4); border-color: var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 70px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.1rem; color: var(--ink); }
.logo-mark {
  display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px;
  background: var(--grad); color: #fff; font-weight: 800; font-size: 1.2rem;
  box-shadow: var(--shadow-sm);
}
.logo-img { height: 42px; width: auto; display: block; }
.nav { display: flex; gap: 6px; }
.nav a {
  padding: 8px 16px; border-radius: 10px; font-weight: 600; font-size: .95rem;
  color: var(--ink-soft); transition: background .2s, color .2s;
}
.nav a:hover { background: var(--surface-alt); color: var(--brand); }

.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { width: 24px; height: 2px; background: var(--ink); border-radius: 2px; transition: .3s; }

/* HERO – kompaktní, světlý, úzký blok; apartmány vidět hned */
.hero { position: relative; padding-top: 70px; overflow: hidden; }
.hero-bg {
  position: absolute; inset: 0; z-index: 0;
  background:
    radial-gradient(700px 360px at 82% 8%, rgba(123,92,255,.16), transparent 60%),
    radial-gradient(620px 380px at 8% 30%, rgba(17,211,198,.14), transparent 55%),
    linear-gradient(180deg, #eef1fb 0%, #f7f9fe 100%);
}
.hero-inner {
  position: relative; z-index: 1;
  max-width: 720px; margin: 40px auto 36px;
  padding: 40px 44px; text-align: center;
  background: rgba(255,255,255,.78);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}
.badge {
  display: inline-block; padding: 7px 16px; border-radius: 999px; font-size: .78rem; font-weight: 700;
  letter-spacing: .04em; text-transform: uppercase; margin-bottom: 18px;
  background: rgba(79,107,255,.1); color: var(--brand); border: 1px solid rgba(79,107,255,.2);
}
.hero-title { font-size: clamp(1.9rem, 4.4vw, 3rem); line-height: 1.08; font-weight: 800; letter-spacing: -.02em; }
.hero-subtitle { font-size: clamp(1rem, 1.6vw, 1.15rem); color: var(--ink-soft); margin: 16px auto 0; max-width: 560px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 26px; justify-content: center; }

.btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 13px 24px; border-radius: 12px;
  font-weight: 700; font-size: .96rem; cursor: pointer; border: 0; transition: transform .2s, box-shadow .2s, opacity .2s;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 14px 34px -14px rgba(79,107,255,.8); }
.btn-ghost { background: #fff; color: var(--ink); border: 1px solid var(--line); }
.btn-ghost:hover { background: var(--surface-alt); }

.hero-stats { display: flex; flex-wrap: wrap; gap: 30px; margin-top: 34px; justify-content: center; }
.hero-stats .stat-value { font-size: 1.8rem; font-weight: 800; background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.hero-stats .stat-label { font-size: .85rem; color: var(--ink-soft); max-width: 150px; }

/* SECTIONS */
.section { padding: 96px 0; }
#apartmany { padding-top: 40px; }
#apartmany .section-head { margin-bottom: 36px; }
.section-alt { background: var(--surface-alt); }
.section-head { max-width: 680px; margin: 0 auto 54px; text-align: center; }
.section-head h2 { font-size: clamp(1.9rem, 4vw, 2.7rem); font-weight: 800; letter-spacing: -.02em; }
.section-head p { color: var(--ink-soft); margin-top: 14px; font-size: 1.08rem; }
.section-head p a { color: var(--brand); font-weight: 600; text-decoration: none; }
.section-head p a:hover { text-decoration: underline; }
.eyebrow { display: inline-block; font-weight: 700; color: var(--brand); text-transform: uppercase; letter-spacing: .05em; font-size: .82rem; margin-bottom: 10px; }

/* APARTMÁNY */
.cards-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow-sm); display: flex; flex-direction: column; transition: transform .3s, box-shadow .3s;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.card-media { position: relative; aspect-ratio: 4/3; overflow: hidden; }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.card:hover .card-media img { transform: scale(1.06); }
.card-tag {
  position: absolute; top: 14px; left: 14px; padding: 6px 13px; border-radius: 999px; font-size: .74rem;
  font-weight: 700; color: #fff; background: rgba(11,16,32,.7); backdrop-filter: blur(6px);
}
.card-body { padding: 24px; display: flex; flex-direction: column; flex: 1; }
.card-body h3 { font-size: 1.25rem; font-weight: 700; }
.card-body p { color: var(--ink-soft); margin-top: 10px; font-size: .96rem; flex: 1; }
.card-highlight {
  margin-top: 16px; padding: 10px 14px; border-radius: 10px; font-weight: 600; font-size: .88rem;
  background: linear-gradient(120deg, rgba(79,107,255,.1), rgba(17,211,198,.12)); color: var(--brand);
}
.card-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.chip {
  padding: 9px 15px; border-radius: 10px; font-weight: 600; font-size: .85rem;
  background: var(--surface-alt); border: 1px solid var(--line); transition: .2s;
}
.chip:hover { background: var(--brand); color: #fff; border-color: var(--brand); }

/* HIGHLIGHTS – zvýrazněný blok na prvním místě */
.highlights {
  padding: 124px 0 72px;
  background:
    radial-gradient(700px 320px at 82% -10%, rgba(123,92,255,.14), transparent 60%),
    radial-gradient(560px 360px at 6% 0%, rgba(17,211,198,.12), transparent 55%),
    linear-gradient(180deg, #eef1fb 0%, var(--surface-alt) 100%);
}
.hl-badge {
  position: absolute; top: 18px; right: 18px; z-index: 2;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 13px; border-radius: 999px; font-size: .76rem; font-weight: 700; letter-spacing: .02em;
  color: #fff; background: var(--grad); box-shadow: 0 8px 20px -8px rgba(79,107,255,.7);
}
.hl-badge svg { width: 15px; height: 15px; }
.hl-logo { min-height: 52px; margin-bottom: 16px; display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.hl-logo img { max-height: 52px; max-width: 160px; width: auto; object-fit: contain; }
.highlights-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 26px; }
.highlight-card {
  position: relative; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 34px; box-shadow: var(--shadow);
  display: flex; flex-direction: column; overflow: hidden;
}
.highlight-card::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 5px; background: var(--grad);
}
.hl-tag {
  display: inline-block; align-self: flex-start; padding: 6px 14px; border-radius: 999px;
  font-size: .76rem; font-weight: 700; letter-spacing: .03em; text-transform: uppercase;
  background: rgba(79,107,255,.1); color: var(--brand); margin-bottom: 16px;
}
.highlight-card h3 { font-size: 1.4rem; font-weight: 800; line-height: 1.2; letter-spacing: -.01em; }
.highlight-card p { color: var(--ink-soft); margin-top: 12px; flex: 1; }
.highlight-card p a { color: var(--brand); font-weight: 600; text-decoration: none; }
.highlight-card p a:hover { text-decoration: underline; }
.hl-links { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 20px; }
.hl-links a { font-weight: 700; color: var(--brand); font-size: .95rem; }
.hl-links a:hover { text-decoration: underline; }

/* APARTMÁNY – minimalizovaná, kompaktní verze */
.apartmany-min { padding: 64px 0; }
.apart-list { display: flex; flex-direction: column; gap: 16px; max-width: 920px; margin: 0 auto; }
.apart-item {
  display: grid; grid-template-columns: 150px 1fr; gap: 20px; align-items: center;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  padding: 14px; box-shadow: var(--shadow-sm); transition: transform .2s, box-shadow .2s;
}
.apart-item:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.apart-thumb { aspect-ratio: 4/3; border-radius: 10px; overflow: hidden; }
.apart-thumb img { width: 100%; height: 100%; object-fit: cover; }
.apart-tag { display: inline-block; font-size: .72rem; font-weight: 700; color: var(--brand); text-transform: uppercase; letter-spacing: .03em; }
.apart-body h3 { font-size: 1.08rem; font-weight: 700; margin-top: 4px; }
.apart-body p { color: var(--ink-soft); font-size: .9rem; margin-top: 4px; }
.apart-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.apart-thumb { position: relative; }
.apart-thumb.is-clickable { cursor: pointer; }
.apart-thumb-badge {
  position: absolute; right: 8px; bottom: 8px; width: 28px; height: 28px; border-radius: 8px;
  display: grid; place-items: center; font-size: .9rem; background: rgba(11,16,32,.65); backdrop-filter: blur(4px);
}
.chip-gallery { cursor: pointer; border: 0; background: var(--grad); color: #fff; font-family: inherit; }
.chip-gallery:hover { color: #fff; filter: brightness(1.05); }

/* LIGHTBOX */
.lightbox {
  position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center;
  background: rgba(8, 12, 26, .92); backdrop-filter: blur(6px); padding: 24px;
}
.lightbox[hidden] { display: none; }
.lb-stage { margin: 0; max-width: 92vw; max-height: 88vh; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.lb-stage img { max-width: 92vw; max-height: 80vh; border-radius: 12px; box-shadow: 0 30px 80px -20px rgba(0,0,0,.7); object-fit: contain; }
.lb-counter { color: rgba(255,255,255,.8); font-size: .9rem; font-weight: 600; }
.lb-close {
  position: absolute; top: 18px; right: 24px; width: 46px; height: 46px; border-radius: 50%; border: 0;
  background: rgba(255,255,255,.12); color: #fff; font-size: 1.8rem; line-height: 1; cursor: pointer; transition: background .2s;
}
.lb-close:hover { background: rgba(255,255,255,.25); }
.lb-nav {
  position: absolute; top: 50%; transform: translateY(-50%); width: 52px; height: 52px; border-radius: 50%; border: 0;
  background: rgba(255,255,255,.12); color: #fff; font-size: 1.3rem; cursor: pointer; transition: background .2s;
}
.lb-nav:hover { background: rgba(255,255,255,.25); }
.lb-prev { left: 18px; }
.lb-next { right: 18px; }
@media (max-width: 720px) {
  .lb-prev { left: 8px; } .lb-next { right: 8px; }
  .lb-nav { width: 44px; height: 44px; }
}

/* HISTORIE – rozklikávací timeline po obdobích */
.timeline { position: relative; max-width: 840px; margin: 0 auto; }
.tl-group {
  margin-bottom: 16px; border: 1px solid var(--line); border-radius: 14px;
  background: var(--surface); box-shadow: var(--shadow-sm); overflow: hidden;
}
.tl-group:last-child { margin-bottom: 0; }
.tl-era {
  list-style: none; cursor: pointer; user-select: none;
  display: flex; align-items: center; gap: 14px; padding: 18px 22px;
  font-size: 1.1rem; font-weight: 800; color: var(--ink);
  transition: background .2s;
}
.tl-era::-webkit-details-marker { display: none; }
.tl-era:hover { background: var(--surface-alt); }
.tl-era-label { flex: 1; }
.tl-era-count {
  font-size: .8rem; font-weight: 700; color: #fff; background: var(--grad);
  padding: 3px 11px; border-radius: 999px;
}
.tl-era-chevron {
  width: 11px; height: 11px; border-right: 2.5px solid var(--ink-soft);
  border-bottom: 2.5px solid var(--ink-soft); transform: rotate(45deg);
  transition: transform .25s ease; margin-right: 4px;
}
.tl-group[open] .tl-era-chevron { transform: rotate(-135deg); }
.tl-group[open] .tl-era { background: var(--surface-alt); border-bottom: 1px solid var(--line); }
.tl-track { position: relative; padding: 24px 24px 24px 48px; }
.tl-track::before {
  content: ""; position: absolute; left: 19px; top: 28px; bottom: 28px; width: 2px;
  background: linear-gradient(180deg, var(--brand), var(--brand-2));
}
.tl-item { position: relative; padding: 0 0 26px 0; }
.tl-item:last-child { padding-bottom: 0; }
.tl-item::before {
  content: ""; position: absolute; left: -36px; top: 4px; width: 16px; height: 16px; border-radius: 50%;
  background: #fff; border: 3px solid var(--brand); box-shadow: 0 0 0 4px rgba(79,107,255,.12);
}
.tl-year {
  display: inline-block; font-weight: 800; font-size: .9rem; color: var(--brand);
  background: rgba(79,107,255,.1); padding: 3px 12px; border-radius: 999px; margin-bottom: 8px;
}
.tl-content h3 { font-size: 1.18rem; font-weight: 700; }
.tl-content p { color: var(--ink-soft); margin-top: 6px; }

/* FVE – úzký pruh nad kontakty */
.fve-strip {
  background: linear-gradient(120deg, #0b1020 0%, #1b2550 60%, #1d3a6e 100%);
  color: #fff; padding: 26px 0;
}
.fve-strip-inner { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.fve-strip-icon { width: 64px; height: 48px; object-fit: cover; border-radius: 8px; flex: none; }
.fve-strip-text { flex: 1; min-width: 240px; }
.fve-strip-text h2 { font-size: 1.15rem; font-weight: 800; }
.fve-strip-text p { color: rgba(255,255,255,.78); font-size: .9rem; margin-top: 2px; }
.fve-strip .project-id { background: rgba(255,255,255,.12); color: #cdd9ff; flex: none; }

/* FVE (původní velká varianta – nepoužito) */
.fve-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.fve-media img { border-radius: var(--radius); box-shadow: var(--shadow); width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.fve-content h2 { font-size: clamp(1.8rem, 3.5vw, 2.5rem); font-weight: 800; }
.fve-content p { color: var(--ink-soft); margin-top: 14px; }
.check-list { list-style: none; margin: 22px 0; display: flex; flex-direction: column; gap: 12px; }
.check-list li { display: flex; align-items: flex-start; gap: 12px; font-weight: 500; }
.check-list li::before {
  content: "✓"; flex: none; width: 24px; height: 24px; border-radius: 7px; display: grid; place-items: center;
  background: var(--grad); color: #fff; font-size: .8rem; font-weight: 800; margin-top: 2px;
}
.project-id {
  display: inline-block; margin-top: 6px; padding: 8px 14px; border-radius: 9px; font-size: .82rem;
  background: var(--bg); color: #9fb4ff; font-family: ui-monospace, monospace;
}

/* O NÁS */
.mini-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 22px; }
.mini-card {
  flex: 1 1 250px; max-width: 300px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px;
  box-shadow: var(--shadow-sm); transition: transform .3s, box-shadow .3s;
  display: flex; flex-direction: column; align-items: center; text-align: center;
}
.mini-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.mini-logo { height: 54px; margin-bottom: 14px; display: flex; align-items: center; justify-content: center; }
.mini-logo img { max-height: 54px; max-width: 150px; width: auto; object-fit: contain; }
.mini-card.has-banner { padding-top: 0; overflow: hidden; }
.mini-banner { align-self: stretch; margin: 0 -26px 16px; aspect-ratio: 16/7; overflow: hidden; }
.mini-banner img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mini-card h3 { font-size: 1.12rem; font-weight: 700; }
.mini-card p { color: var(--ink-soft); font-size: .92rem; margin-top: 10px; flex: 1; }
.mini-card a { margin-top: 16px; font-weight: 700; color: var(--brand); font-size: .9rem; }
.mini-card a:hover { text-decoration: underline; }

/* PEOPLE */
.people-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.person {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 30px;
  box-shadow: var(--shadow-sm); text-align: center; transition: transform .3s, box-shadow .3s;
}
.person:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.person-avatar {
  width: 72px; height: 72px; border-radius: 50%; margin: 0 auto 16px; display: grid; place-items: center;
  background: var(--grad); color: #fff; font-weight: 800; font-size: 1.5rem;
}
.person h3 { font-size: 1.15rem; font-weight: 700; }
.person .role { color: var(--ink-soft); font-size: .9rem; margin-top: 6px; min-height: 40px; }
.person-contact { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }
.person-contact a {
  padding: 9px 14px; border-radius: 10px; font-weight: 600; font-size: .88rem;
  background: var(--surface-alt); border: 1px solid var(--line); transition: .2s; word-break: break-all;
}
.person-contact a:hover { background: var(--brand); color: #fff; border-color: var(--brand); }

/* FOOTER */
.site-footer { background: var(--bg); color: rgba(255,255,255,.7); padding: 44px 0; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.footer-brand { display: flex; align-items: center; gap: 10px; }
.footer-logo { display: inline-flex; background: #fff; border-radius: 12px; padding: 12px 18px; box-shadow: var(--shadow-sm); }
.footer-logo img { height: 38px; width: auto; display: block; }
.footer-legal { font-size: .85rem; text-align: right; line-height: 1.8; }

/* LOAD ERROR */
.load-error { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--accent); color: #fff; padding: 14px 22px; border-radius: 12px; font-size: .9rem; z-index: 999; box-shadow: var(--shadow); }

/* REVEAL ANIMATION */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }

/* RESPONSIVE */
@media (max-width: 980px) {
  .cards-grid, .people-grid { grid-template-columns: repeat(2, 1fr); }
  .mini-grid { grid-template-columns: repeat(2, 1fr); }
  .fve-inner { grid-template-columns: 1fr; gap: 32px; }
  .highlights-grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .nav { position: fixed; inset: 72px 0 auto 0; flex-direction: column; gap: 0; background: #fff; padding: 12px 24px 24px; box-shadow: var(--shadow); transform: translateY(-130%); transition: transform .35s ease; }
  .nav.open { transform: translateY(0); }
  .nav a { color: var(--ink) !important; padding: 14px 8px; border-bottom: 1px solid var(--line); }
  .nav-toggle { display: flex; }
  .cards-grid, .people-grid, .mini-grid, .highlights-grid { grid-template-columns: 1fr; }
  .apart-item { grid-template-columns: 1fr; }
  .apart-thumb { aspect-ratio: 16/9; }
  .hero-stats { gap: 26px; }
  .footer-inner { flex-direction: column; text-align: center; }
  .footer-legal { text-align: center; }
}
