/* ========== tokens ========== */
:root {
  --bg: #F6F5F1;
  --card: #FFFFFF;
  --ink: #15181C;
  --ink-2: #3A4048;
  --muted: #6C727B;
  --line: #E4E2DC;
  --brand: #14324A;
  --brand-ink: #FFFFFF;
  --brand-soft: #E7EEF3;
  --ok: #1E8E5A;
  --warn: #B7791F;
  --err: #C4382B;
  --accent: #FF5A36;
  --accent-soft: #FFEDE6;
  --accent-ink: #FFFFFF;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 2px rgba(20, 24, 28, .05), 0 6px 24px rgba(20, 24, 28, .06);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-fun: "Bricolage Grotesque", "Inter", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.55 var(--font); -webkit-font-smoothing: antialiased;
}
body.mode-fun { --bg: #FFF9F0; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3, h4 { line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
.muted { color: var(--muted); }
.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 28px; } }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ========== buttons ========== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 20px; border-radius: 999px; border: 1.5px solid transparent;
  font: 600 15px/1 var(--font); text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: transform .12s ease, background .15s ease, box-shadow .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--brand); color: var(--brand-ink); }
.btn--primary:hover { background: #0c2436; }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--ink-2); }
.btn--fun {
  background: var(--accent); color: var(--accent-ink); font-family: var(--font-fun); font-size: 17px;
  box-shadow: 0 4px 0 rgba(0, 0, 0, .18);
}
.btn--fun:hover { transform: translateY(-1px) rotate(-1deg); }
.btn--block { width: 100%; }
.mode-fun .btn--primary { background: var(--ink); }

/* ========== top bar ========== */
.topbar { position: sticky; top: 0; z-index: 30; background: rgba(255, 255, 255, .92); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.topbar__in { display: flex; align-items: center; gap: 18px; min-height: 64px; }
.logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; text-decoration: none; letter-spacing: -.02em; }
.logo__mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--brand); color: #fff; font-size: 17px; }
.mode-fun .logo__mark { background: var(--accent); color: var(--accent-ink); transform: rotate(-6deg); font-family: var(--font-fun); }
.nav { display: none; gap: 22px; margin-left: 8px; }
.nav a { text-decoration: none; color: var(--ink-2); font-weight: 500; font-size: 15px; }
.nav a:hover { color: var(--ink); }
.topbar__phone { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; text-decoration: none; font-weight: 600; font-size: 15px; }
.topbar__phone svg { width: 18px; height: 18px; color: var(--brand); }
.mode-fun .topbar__phone svg { color: var(--accent); }
.topbar__phone span { display: none; }
@media (min-width: 860px) { .nav { display: flex; } .topbar__phone span { display: inline; } }

/* ========== mode toggle ========== */
.toggle { margin-left: auto; display: inline-flex; padding: 4px; background: #EEECE6; border-radius: 999px; gap: 2px; }
.toggle + .topbar__phone { margin-left: 0; }
.toggle__opt {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 999px;
  font-weight: 600; font-size: 14px; text-decoration: none; color: var(--ink-2); transition: background .15s, color .15s;
}
.toggle__opt svg { width: 16px; height: 16px; }
.toggle__opt:hover { color: var(--ink); }
.toggle__opt.is-on { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
.toggle__opt--fun.is-on { background: var(--accent); color: var(--accent-ink); font-family: var(--font-fun); }
@media (max-width: 420px) { .toggle__opt { padding: 7px 10px; font-size: 13px; } .toggle__opt svg { display: none; } }

/* ========== hero (index) ========== */
.hero { padding: 48px 0 28px; }
.hero__title { font-size: clamp(30px, 5vw, 52px); font-weight: 700; max-width: 18ch; letter-spacing: -.025em; }
.hero__title--fun { font-family: var(--font-fun); font-weight: 800; max-width: 16ch; }
.hero__sub { font-size: clamp(16px, 2vw, 19px); color: var(--ink-2); max-width: 56ch; }
.hero__stats { display: flex; flex-wrap: wrap; gap: 12px 36px; margin-top: 26px; }
.hero__stats div { display: flex; flex-direction: column; }
.hero__stats strong { font-size: 26px; letter-spacing: -.02em; }
.hero__stats span { color: var(--muted); font-size: 14px; }
.mode-fun .hero__stats strong { font-family: var(--font-fun); color: var(--accent); }

/* ========== sections & filters ========== */
.section { padding: 28px 16px 40px; }
@media (min-width: 720px) { .section { padding: 32px 28px 48px; } }
.section__title { font-size: clamp(22px, 3vw, 30px); font-weight: 700; margin-bottom: 20px; }
.section__title--fun { font-family: var(--font-fun); font-weight: 800; }

.filters {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding: 16px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 24px;
}
@media (min-width: 900px) { .filters { grid-template-columns: repeat(5, minmax(0, 1fr)) auto; align-items: end; } }
.filters__f { display: flex; flex-direction: column; gap: 5px; font-size: 13px; color: var(--muted); font-weight: 500; min-width: 0; }
.filters__actions { display: flex; gap: 8px; grid-column: 1 / -1; }
@media (min-width: 900px) { .filters__actions { grid-column: auto; } }
select, input, textarea {
  width: 100%; min-height: 44px; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  background: #fff; color: var(--ink); font: 15px/1.3 var(--font);
}
textarea { resize: vertical; min-height: 88px; }
select:focus, input:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.mode-fun select:focus, .mode-fun input:focus, .mode-fun textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

/* ========== cards ========== */
.grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.grid--small { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.card {
  display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; text-decoration: none; transition: transform .18s ease, box-shadow .18s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.card__img { position: relative; aspect-ratio: 4 / 3; background: #E9E7E1; overflow: hidden; }
.card__img img, .card__img .ph { width: 100%; height: 100%; object-fit: cover; }
.card__body { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px 16px; flex: 1; }
.card__title { font-size: 17px; font-weight: 650; margin: 0; }
.card__title--fun { font-family: var(--font-fun); font-weight: 800; font-size: 20px; line-height: 1.15; }
.card__tagline { margin: 2px 0 0; color: var(--ink-2); font-size: 14.5px; line-height: 1.4; }
.card__meta { margin: 0; color: var(--muted); font-size: 13.5px; }
.card__price { margin-top: auto; padding-top: 10px; display: flex; align-items: baseline; gap: 10px; }
.card__price strong { font-size: 20px; letter-spacing: -.01em; }
.card__price s { color: var(--muted); font-size: 14px; }
.card--fun { border-width: 2px; border-color: transparent; box-shadow: 0 0 0 1px var(--line); }
.card--fun:hover { box-shadow: 0 0 0 2px var(--accent), 6px 8px 0 var(--accent-soft); transform: translateY(-3px) rotate(-.4deg); }
.card--fun .card__price strong { color: var(--accent); font-family: var(--font-fun); }
.card--fun .card__img::after { content: ""; position: absolute; inset: auto 0 0 0; height: 6px; background: var(--accent); }
.card--sold .card__img { filter: grayscale(.85); opacity: .8; }

.badge { position: absolute; top: 12px; left: 12px; padding: 5px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 700; background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .15); }
.badge--reserved { background: #FFF3D6; color: #7A4F00; }
.badge--sold { background: var(--ink); color: #fff; }
.badge--draft { background: #EDE7FF; color: #4B2BA8; }
.badge--hot { background: var(--brand); color: #fff; }
.mode-fun .badge--hot { background: var(--accent); color: var(--accent-ink); }

.empty { text-align: center; padding: 48px 16px; background: var(--card); border: 1px dashed var(--line); border-radius: var(--radius); }
.empty--404 { margin: 56px auto; max-width: 640px; }
.empty--404 .hero__title { margin: 0 auto .4em; }

/* ========== contact ========== */
.contact { display: grid; gap: 28px; }
@media (min-width: 900px) { .contact { grid-template-columns: 1fr 1fr; align-items: start; } }
.contact__dl { display: grid; grid-template-columns: max-content 1fr; gap: 8px 18px; margin: 18px 0 0; }
.contact__dl dt { color: var(--muted); }
.contact__dl dd { margin: 0; font-weight: 500; }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.panel h3 { font-size: 18px; }
.mode-fun .panel h3 { font-family: var(--font-fun); font-weight: 800; font-size: 20px; }

/* ========== lead form ========== */
.lead { display: flex; flex-direction: column; gap: 12px; }
.field { display: flex; flex-direction: column; gap: 5px; font-size: 13.5px; font-weight: 500; color: var(--ink-2); }
.field-row { display: grid; gap: 12px; }
@media (min-width: 520px) { .field-row { grid-template-columns: 1fr 1fr; } }
.notice { padding: 12px 14px; border-radius: var(--radius-sm); background: #F2F0EA; font-size: 14.5px; margin: 10px 0; }
.notice--ok { background: #E3F4EA; color: #145C3B; }
.notice--err { background: #FBE7E4; color: #8E2318; margin-top: 0; }

/* ========== detail (Fakta) ========== */
.adminbar { background: #2B2347; color: #fff; font-size: 14px; padding: 8px 0; }
.adminbar a { color: #C9B8FF; }
.crumbs { display: flex; gap: 8px; flex-wrap: wrap; padding-top: 18px; color: var(--muted); font-size: 14px; }
.crumbs a { text-decoration: none; color: var(--ink-2); }
.detail { display: grid; gap: 28px; padding-top: 12px; padding-bottom: 32px; }
@media (min-width: 980px) { .detail { grid-template-columns: minmax(0, 1fr) 360px; align-items: start; } }
.detail__head h1 { font-size: clamp(26px, 4vw, 38px); margin-bottom: 6px; }
.detail__head { margin-bottom: 18px; }
.detail__side { display: flex; flex-direction: column; gap: 18px; }
@media (min-width: 980px) { .detail__side { position: sticky; top: 84px; } }

.gallery__main { position: relative; aspect-ratio: 3 / 2; border-radius: var(--radius); overflow: hidden; background: #E9E7E1; cursor: zoom-in; }
.gallery__main img, .gallery__main .ph { width: 100%; height: 100%; object-fit: cover; }
.gallery__count { position: absolute; right: 12px; bottom: 12px; background: rgba(0, 0, 0, .62); color: #fff; font-size: 13px; padding: 4px 10px; border-radius: 999px; }
.gallery__thumbs { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
.gallery__thumb { flex: 0 0 92px; aspect-ratio: 4 / 3; padding: 0; border: 2px solid transparent; border-radius: 8px; overflow: hidden; cursor: pointer; background: none; opacity: .7; }
.gallery__thumb img { width: 100%; height: 100%; object-fit: cover; }
.gallery__thumb.is-on, .gallery__thumb:hover { opacity: 1; border-color: var(--brand); }
.mode-fun .gallery__thumb.is-on { border-color: var(--accent); }

.block { margin-top: 34px; }
.block h2 { font-size: 21px; padding-bottom: 10px; border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.specs { display: grid; grid-template-columns: 1fr; margin: 0; }
@media (min-width: 620px) { .specs { grid-template-columns: 1fr 1fr; column-gap: 32px; } }
.specs__row { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.specs__row dt { color: var(--muted); }
.specs__row dd { margin: 0; font-weight: 600; text-align: right; }
.prose { color: var(--ink-2); font-size: 16px; max-width: 70ch; }
.prose strong { color: var(--ink); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0; }
.chips li { padding: 7px 12px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); font-size: 14px; }
.chips li::before { content: "✓"; color: var(--ok); font-weight: 700; margin-right: 6px; }

.timeline { list-style: none; padding: 0; margin: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 7px; top: 8px; bottom: 8px; width: 2px; background: var(--line); }
.timeline li { position: relative; display: grid; gap: 4px 18px; padding: 0 0 18px 30px; }
@media (min-width: 620px) { .timeline li { grid-template-columns: 150px 1fr; } }
.timeline li::before { content: ""; position: absolute; left: 0; top: 5px; width: 16px; height: 16px; border-radius: 50%; background: #fff; border: 3px solid var(--brand); }
.timeline__when { display: flex; flex-direction: column; font-size: 14.5px; }
.timeline__when span { color: var(--muted); font-size: 13.5px; }
.timeline__what { display: flex; flex-direction: column; gap: 2px; }
.timeline__what .muted { font-size: 13.5px; }

.pricebox { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; display: flex; flex-direction: column; gap: 10px; box-shadow: var(--shadow); }
.pricebox__old { color: var(--muted); text-decoration: line-through; }
.pricebox__price { font-size: 34px; font-weight: 700; letter-spacing: -.02em; line-height: 1; }
.pricebox__vat { font-size: 14px; }
.pricebox__keys { list-style: none; padding: 0; margin: 6px 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pricebox__keys li { background: var(--bg); border-radius: var(--radius-sm); padding: 9px 12px; display: flex; flex-direction: column; }
.pricebox__keys span { color: var(--muted); font-size: 12.5px; }
.pricebox__keys b { font-size: 15px; }

.story-teaser {
  display: flex; flex-direction: column; gap: 4px; margin-top: 18px; padding: 16px 18px; text-decoration: none;
  border-radius: var(--radius); background: var(--accent-soft); border: 2px dashed var(--accent);
}
.story-teaser__kicker { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; font-weight: 700; color: var(--accent); }
.story-teaser strong { font-family: var(--font-fun); font-size: 20px; font-weight: 800; }
.story-teaser__go { font-weight: 600; font-size: 14.5px; }

/* ========== story (Příběh) ========== */
.fhero { background: var(--accent-soft); padding: 36px 0 44px; border-bottom: 3px solid var(--ink); }
.fhero__in { display: grid; gap: 28px; align-items: center; }
@media (min-width: 980px) { .fhero__in { grid-template-columns: 1fr 1.1fr; gap: 44px; } }
.fhero__kicker { display: inline-block; padding: 5px 12px; border-radius: 999px; background: var(--ink); color: #fff; font-size: 13px; font-weight: 600; margin-bottom: 16px; }
.fhero h1 { font-family: var(--font-fun); font-weight: 800; font-size: clamp(34px, 6vw, 64px); line-height: 1; letter-spacing: -.03em; }
.fhero__tagline { font-size: clamp(17px, 2.2vw, 21px); color: var(--ink-2); max-width: 46ch; }
.fhero__cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.fhero__cta .btn--ghost { border-color: var(--ink); background: #fff; }
.fhero__visual { position: relative; }
.fhero__visual .gallery__main { border: 3px solid var(--ink); box-shadow: 8px 8px 0 var(--ink); }
.sticker {
  position: absolute; top: -18px; right: -8px; z-index: 2; display: flex; flex-direction: column; align-items: center; justify-content: center;
  width: 128px; height: 128px; border-radius: 50%; background: var(--accent); color: var(--accent-ink);
  border: 3px solid var(--ink); transform: rotate(10deg); text-align: center; line-height: 1.05; box-shadow: 4px 4px 0 var(--ink);
}
.sticker span { font-size: 13px; font-weight: 600; }
.sticker b { font-family: var(--font-fun); font-weight: 800; font-size: 19px; padding: 0 8px; }
@media (max-width: 600px) { .sticker { width: 100px; height: 100px; top: -14px; right: -4px; } .sticker b { font-size: 15px; } }

.facts { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.fact { background: var(--card); border: 2px solid var(--ink); border-radius: var(--radius); padding: 20px; box-shadow: 5px 5px 0 var(--accent); transition: transform .15s ease; }
.fact:nth-child(even) { transform: rotate(.6deg); }
.fact:nth-child(odd) { transform: rotate(-.5deg); }
.fact:hover { transform: rotate(0) translateY(-2px); }
.fact__emoji { font-size: 34px; line-height: 1; margin-bottom: 10px; }
.fact h3 { font-family: var(--font-fun); font-weight: 800; font-size: 20px; }
.fact p { margin: 0; color: var(--ink-2); font-size: 15px; }

.story { display: grid; gap: 28px; }
@media (min-width: 980px) { .story { grid-template-columns: minmax(0, 1fr) 360px; align-items: start; } }
.prose--fun { font-size: 18px; line-height: 1.65; color: var(--ink); }
.prose--fun p:first-child::first-letter { font-family: var(--font-fun); font-weight: 800; font-size: 3.2em; float: left; line-height: .9; margin: 4px 10px 0 0; color: var(--accent); }
.idealfor { margin-top: 28px; padding: 20px; border-radius: var(--radius); background: var(--card); border-left: 6px solid var(--accent); }
.idealfor h3 { font-family: var(--font-fun); font-weight: 800; font-size: 21px; }
.idealfor .prose { margin: 0; }
.idealfor .prose p:last-child { margin: 0; }
.story__side { display: flex; flex-direction: column; gap: 18px; }

.rating { margin-top: 14px; }
.rating__top { display: flex; justify-content: space-between; gap: 12px; font-size: 15px; margin-bottom: 6px; }
.rating__top b { font-family: var(--font-fun); }
.rating__bar { height: 12px; border-radius: 999px; background: var(--bg); border: 1.5px solid var(--ink); overflow: hidden; }

.boring ul { list-style: none; padding: 0; margin: 0 0 14px; }
.boring li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px dashed var(--line); font-size: 15px; }
.boring li span { color: var(--muted); }
.link-strong { font-weight: 700; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 3px; }

.fcta { display: grid; gap: 24px; padding: 28px; border-radius: 22px; background: var(--ink); color: #fff; }
@media (min-width: 900px) { .fcta { grid-template-columns: 1fr 1fr; align-items: center; padding: 40px; } }
.fcta h2 { font-family: var(--font-fun); font-weight: 800; font-size: clamp(26px, 4vw, 40px); }
.fcta p { color: #D4D7DC; font-size: 17px; }
.fcta a:not(.btn) { color: #fff; }
.fcta .panel { color: var(--ink); }

/* ========== footer ========== */
.footer { border-top: 1px solid var(--line); background: var(--card); margin-top: 24px; }
.footer__in { display: grid; gap: 24px; padding-top: 36px; padding-bottom: 20px; }
@media (min-width: 760px) { .footer__in { grid-template-columns: 2fr 1fr 1fr; } }
.footer h4 { font-size: 14px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.footer a { text-decoration: none; }
.logo--footer { margin-bottom: 10px; }
.footer__bottom { padding-top: 14px; padding-bottom: 28px; font-size: 13.5px; border-top: 1px solid var(--line); }

/* ========== lightbox ========== */
.lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(10, 12, 14, .94); display: flex; align-items: center; justify-content: center; }
.lightbox[hidden] { display: none; }
.lightbox img { max-width: 94vw; max-height: 88vh; object-fit: contain; border-radius: 6px; }
.lightbox button { position: absolute; background: rgba(255, 255, 255, .12); color: #fff; border: 0; cursor: pointer; border-radius: 999px; width: 48px; height: 48px; font-size: 30px; line-height: 1; }
.lightbox button:hover { background: rgba(255, 255, 255, .24); }
.lightbox__close { top: 16px; right: 16px; }
.lightbox__nav--prev { left: 12px; top: 50%; transform: translateY(-50%); }
.lightbox__nav--next { right: 12px; top: 50%; transform: translateY(-50%); }

/* ========== small screens ========== */
.fhero__in > *, .detail > *, .story > *, .contact > *, .fcta > * { min-width: 0; }
@media (max-width: 560px) {
  .topbar__in { gap: 10px; }
  .logo > span:not(.logo__mark) { display: none; }
  .fhero__visual { margin-right: 8px; }
  .fhero__visual .gallery__main { box-shadow: 5px 5px 0 var(--ink); }
}
.mode-fun .lead .btn--primary { background: var(--accent); color: var(--accent-ink); font-family: var(--font-fun); font-size: 16px; }
