/* ==========================================================================
   Rezidence Vésky — style
   Ikony: Tabler Icons (MIT) — https://tabler.io/icons
   ========================================================================== */

:root {
  --bg: #f3efe8;
  --surface: #e9e3d9;
  --ink: #1d1c1a;
  --ink-soft: #2c2a26;
  --muted: #55504a;
  --line: rgba(29, 28, 26, .16);
  --accent: #8b7461;
  --accent-dark: #6a5646;
  --dark: #1f1e1b;
  --light: #f7f4ef;
  --light-soft: rgba(247, 244, 239, .84);
  --light-accent: #dccbb8;

  --display: "Bricolage Grotesque", "Manrope", system-ui, sans-serif;
  --sans: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;

  --gutter: clamp(16px, 4vw, 56px);
  --max: 1360px;
  --section: clamp(88px, 12vw, 170px);
  --radius: 6px;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --header-h: 84px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 500;
  font-size: clamp(16px, .3vw + 15px, 18px);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  overflow-x: clip; /* clip nevytváří scroll kontejner → funguje position: sticky */
}
img { display: block; max-width: 100%; height: auto; }
picture { display: block; }
.hero__media picture, .wide__frame picture, .media-card picture, .pillar__img picture, .register__bg picture { height: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
em { font-style: normal; }
::selection { background: var(--accent); color: var(--light); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.container {
  width: 100%;
  max-width: calc(var(--max) + var(--gutter) * 2);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.section { padding: var(--section) 0; }

/* Ikony ------------------------------------------------------------------ */
.svg-defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.ico { width: 1.25em; height: 1.25em; flex: none; stroke-width: 1.6; }
.ico--line { stroke-width: 1; overflow: visible; }

/* Architektonické line-art skici */
.art { display: block; width: 100%; max-width: 240px; height: auto; aspect-ratio: 4 / 3; color: var(--accent-dark); overflow: visible; }
.art g { stroke-width: 1.1; }
.art .plane { fill: #e4dbcd; stroke: none; }
.art .no-draw { stroke-opacity: .6; }

/* Typography ------------------------------------------------------------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  margin: 0 0 20px;
  font-size: 13px; font-weight: 700;
  letter-spacing: .16em; text-transform: uppercase;
  color: var(--accent-dark);
}
.eyebrow--light { color: var(--light-accent); }
.dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; position: relative; flex: none; }
.dot::after {
  content: ""; position: absolute; top: -5px; right: -5px; bottom: -5px; left: -5px; border-radius: 50%;
  border: 1px solid currentColor; animation: pulse 2.2s var(--ease) infinite;
}
@keyframes pulse { 0% { transform: scale(.4); opacity: 1; } 100% { transform: scale(1.6); opacity: 0; } }

.h2, .h3, .hero__title, .statement, .preloader__word, .stat__num, .logo__text, .mobile-menu__nav a {
  font-family: var(--display);
  font-weight: 500;
  /* Bricolage v optické velikosti 96 je sama dost sevřená, víc stažené
     prostrkání slepovalo písmena (rv, ní, ďt) ve velkých nadpisech. */
  letter-spacing: -.012em;
  font-variation-settings: "opsz" 96;
}
.h2 { font-size: clamp(40px, 5.6vw, 84px); line-height: 1; margin: 0 0 24px; }
.h2, .h3, .hero__title, .statement, .form__success h3, .legal h1 { text-wrap: balance; }
.h3 { font-size: clamp(36px, 4.4vw, 64px); line-height: 1; margin: 0 0 18px; }
.line-mask { overflow: hidden; padding: .14em 0 .1em; margin: -.14em 0 -.1em; } /* prostor pro diakritiku */

/* Buttons ---------------------------------------------------------------- */
.btn {
  --btn-bg: var(--ink); --btn-fg: var(--light);
  position: relative; isolation: isolate; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  min-height: 56px; padding: 0 30px;
  background: var(--btn-bg); color: var(--btn-fg);
  font-size: 15px; font-weight: 700; letter-spacing: .01em; line-height: 1.2; text-align: center;
  border-radius: 100px;
  transition: color .5s var(--ease);
}
.btn::before {
  content: ""; position: absolute; top: 0; right: 0; bottom: 0; left: 0; z-index: -1;
  background: var(--accent-dark);
  transform: translateY(101%); border-radius: 50% 50% 0 0;
  transition: transform .6s var(--ease), border-radius .6s var(--ease);
}
.btn:hover::before, .btn:focus-visible::before { transform: translateY(0); border-radius: 0; }
.btn .ico { width: 20px; height: 20px; stroke-width: 1.8; transition: transform .5s var(--ease); }
.btn:hover .ico { transform: translateX(4px); }
.btn--light { --btn-bg: var(--light); --btn-fg: var(--ink); }
.btn--light:hover { color: var(--light); }
.btn--small { min-height: 44px; padding: 0 22px; font-size: 14px; }
.btn--full { width: 100%; }

/* Preloader -------------------------------------------------------------- */
.preloader { display: none; }
.js .preloader {
  display: grid; place-items: center;
  position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 200;
  background: var(--dark); color: var(--light);
  animation: preloader-failsafe 0s 5s forwards;
}
@keyframes preloader-failsafe { to { visibility: hidden; opacity: 0; } }
.preloader__inner { text-align: center; overflow: hidden; }
.preloader__word { display: block; font-size: clamp(34px, 6vw, 76px); line-height: 1.1; white-space: nowrap; }
.preloader__word em { color: var(--light-accent); }
.preloader__line { display: block; height: 1px; margin-top: 20px; background: rgba(247, 244, 239, .5); transform-origin: left; transform: scaleX(0); }

/* Header ----------------------------------------------------------------- */
.header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--header-h);
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 32px;
  padding: 0 var(--gutter);
  color: var(--light);
  transition: background-color .5s var(--ease), color .5s var(--ease), transform .6s var(--ease), box-shadow .5s;
}
.header::before { /* jemný stín pod textem nad fotkou */
  content: ""; position: absolute; top: 0; right: 0; bottom: -30px; left: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(180deg, rgba(20,18,16,.45), transparent);
  transition: opacity .5s var(--ease);
}
.header.is-scrolled, .page-sub .header:not(.menu-open) {
  --header-h: 70px;
  background: rgba(243, 239, 232, .97); /* bez backdrop-filter — ten při scrollu nejvíc zatěžuje */
  color: var(--ink);
  box-shadow: 0 1px 0 var(--line);
}
.header.is-scrolled::before, .header.menu-open::before, .page-sub .header::before { opacity: 0; }
.header.is-hidden { transform: translateY(-100%); }
.header.menu-open { color: var(--light); background: transparent; box-shadow: none; transform: none; }

.logo { display: inline-flex; align-items: center; gap: 12px; justify-self: start; position: relative; z-index: 2; }
.logo__mark svg { width: 30px; height: 30px; display: block; }
.logo__text { font-size: 21px; font-weight: 400; line-height: 1; letter-spacing: -.02em; }
.logo__text em { color: var(--light-accent); }
.is-scrolled:not(.menu-open) .logo__text em, .page-legal .logo__text em, .page-sub .header:not(.menu-open) .logo__text em { color: var(--accent-dark); }

.nav { display: flex; gap: 40px; }
.nav a { position: relative; font-size: 15px; font-weight: 400; padding: 6px 0; white-space: nowrap; }
.header__right { justify-self: end; display: flex; align-items: center; gap: 28px; }
.header__phone { display: inline-flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 400; white-space: nowrap; transition: opacity .3s; }
.header__phone:hover { opacity: .75; }
.header__phone .ico { width: 20px; height: 20px; stroke-width: 1.4; }
.header::after { /* jemná linka pod hlavičkou nad fotkou */
  content: ""; position: absolute; left: var(--gutter); right: var(--gutter); bottom: 0; height: 1px;
  background: rgba(247, 244, 239, .22); transition: opacity .5s var(--ease);
}
.header.is-scrolled::after, .header.menu-open::after, .page-legal .header::after, .page-sub .header::after { opacity: 0; }
.nav a::after {
  content: ""; position: absolute; left: 0; bottom: 0; height: 1.5px; width: 100%;
  background: currentColor; transform: scaleX(0); transform-origin: right;
  transition: transform .5s var(--ease);
}
.nav a:hover::after, .nav a.is-active::after { transform: scaleX(1); transform-origin: left; }

.header__cta { --btn-bg: var(--light); --btn-fg: var(--ink); font-weight: 400; gap: 10px; white-space: nowrap; }
@media (max-width: 1380px) { .nav { gap: 26px; } .header { gap: 24px; } }
@media (max-width: 1260px) { .header__phone span { display: none; } }
.header__cta .ico { width: 18px; height: 18px; stroke-width: 1.6; }
.header__cta:hover { color: var(--light); }
.is-scrolled .header__cta, .page-sub .header__cta { --btn-bg: var(--ink); --btn-fg: var(--light); }

.burger { display: none; width: 44px; height: 44px; position: relative; z-index: 2; }
.burger span { position: absolute; left: 10px; right: 10px; height: 2px; background: currentColor; transition: transform .5s var(--ease), top .5s var(--ease); }
.burger span:first-child { top: 16px; }
.burger span:last-child { top: 26px; }
.burger[aria-expanded="true"] span:first-child { top: 21px; transform: rotate(45deg); }
.burger[aria-expanded="true"] span:last-child { top: 21px; transform: rotate(-45deg); }

.mobile-menu {
  position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 90;
  background: var(--dark); color: var(--light);
  display: flex; flex-direction: column; justify-content: space-between; gap: 32px;
  padding: calc(var(--header-h) + 32px) var(--gutter) max(32px, env(safe-area-inset-bottom));
  overflow-y: auto;
  clip-path: inset(0 0 100% 0);
  transition: clip-path .8s var(--ease), visibility 0s .8s;
  visibility: hidden;
}
.mobile-menu.is-open { clip-path: inset(0 0 0 0); visibility: visible; transition: clip-path .8s var(--ease); }
.mobile-menu__nav { display: flex; flex-direction: column; }
.mobile-menu__nav a {
  display: flex; align-items: baseline; gap: 16px;
  font-size: clamp(36px, 10vw, 56px); line-height: 1.2;
  border-bottom: 1px solid rgba(247, 244, 239, .14); padding: 10px 0;
  transform: translateY(30px); opacity: 0;
  transition: transform .8s var(--ease), opacity .8s var(--ease);
}
.mobile-menu__nav a span { font-family: var(--sans); font-size: 13px; font-weight: 700; letter-spacing: .08em; color: var(--light-accent); }
.mobile-menu.is-open .mobile-menu__nav a { transform: none; opacity: 1; }
.mobile-menu.is-open .mobile-menu__nav a:nth-child(1) { transition-delay: .15s; }
.mobile-menu.is-open .mobile-menu__nav a:nth-child(2) { transition-delay: .2s; }
.mobile-menu.is-open .mobile-menu__nav a:nth-child(3) { transition-delay: .25s; }
.mobile-menu.is-open .mobile-menu__nav a:nth-child(4) { transition-delay: .3s; }
.mobile-menu.is-open .mobile-menu__nav a:nth-child(5) { transition-delay: .35s; }
.mobile-menu__foot { display: flex; flex-direction: column; gap: 12px; font-size: 17px; color: var(--light-soft); }
.mobile-menu__foot a { display: inline-flex; align-items: center; gap: 12px; }
.mobile-menu__foot .ico { color: var(--light-accent); }

/* Hero ------------------------------------------------------------------- */
.hero {
  position: relative;
  min-height: 100vh; min-height: 100svh;
  display: flex; align-items: center; justify-content: center;
  color: var(--light); text-align: center;
  overflow: hidden;
  background: var(--dark);
}
.hero__media { position: absolute; top: 0; right: 0; bottom: 0; left: 0; z-index: 0; } /* vlastní vrstva: střídané fotky zůstanou vždy pod textem */
.hero__media img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 60%; }
/* Střídání fotek s Ken Burns efektem — animuje se jen opacity a transform (GPU) */
.hero__slide { position: absolute; top: 0; right: 0; bottom: 0; left: 0; overflow: hidden; opacity: 0; transition: opacity 1.8s ease; }
.hero__slide.is-active { opacity: 1; z-index: 2; }
.hero__slide.is-leaving { opacity: 1; z-index: 1; }
.hero__slide picture { height: 100%; transform-origin: 50% 55%; }
.hero__slide.is-active picture, .hero__slide.is-leaving picture { animation: kb-in 9s linear both; will-change: transform; }
.hero__slide:nth-child(2) picture { transform-origin: 30% 60%; animation-name: kb-out; }
.hero__slide:nth-child(3) picture { transform-origin: 70% 50%; }
.hero__slide:nth-child(4) picture { transform-origin: 40% 40%; animation-name: kb-out; }
@keyframes kb-in  { from { transform: scale(1); }    to { transform: scale(1.12) translate3d(-1.5%, -1%, 0); } }
@keyframes kb-out { from { transform: scale(1.12) translate3d(1.5%, 1%, 0); } to { transform: scale(1); } }
.hero__slide:not(.is-active):not(.is-leaving) picture { animation: none; }
.hero__shade {
  position: absolute; top: 0; right: 0; bottom: 0; left: 0;
  background:
    radial-gradient(ellipse 70% 60% at 50% 52%, rgba(18, 16, 14, .55) 0%, rgba(18, 16, 14, .2) 70%, rgba(18, 16, 14, 0) 100%),
    linear-gradient(0deg, rgba(18, 16, 14, .55) 0%, rgba(18, 16, 14, .15) 40%, rgba(18, 16, 14, .25) 100%);
}
.hero__content {
  position: relative; z-index: 1;
  display: flex; flex-direction: column; align-items: center;
  padding-top: calc(var(--header-h) + 24px); padding-bottom: 48px;
  text-shadow: 0 2px 30px rgba(0,0,0,.3);
}
.hero__eyebrow { color: var(--light); margin-bottom: 22px; }
.hero__title em { color: var(--light-accent); }
.hero__title {
  margin: 0 0 22px;
  font-size: clamp(44px, 6.4vw, 104px);
  line-height: 1; white-space: nowrap;
}
.hero__bottom { display: flex; flex-direction: column; align-items: center; gap: 36px; }
.hero__lead { max-width: 520px; margin: 0; font-size: clamp(17px, 1.3vw, 21px); line-height: 1.6; color: var(--light); text-wrap: balance; }
.hero__bottom .btn { text-shadow: none; }

/* Intro ------------------------------------------------------------------ */
.statement {
  margin: 0 0 clamp(32px, 4vw, 56px);
  font-size: clamp(32px, 4.4vw, 68px); line-height: 1.05;
  max-width: 19ch;
}
.statement .word { display: inline-block; }
.intro__grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: clamp(40px, 7vw, 120px); align-items: start; }
.intro__text p { margin: 0 0 1.1em; color: var(--ink-soft); max-width: 48ch; }
.stats { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); }
.stat { padding: 26px 0 28px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.stat:nth-child(odd) { padding-right: 24px; }
.stat:nth-child(even) { padding-left: 24px; border-left: 1px solid var(--line); }
.stat__num { font-size: clamp(44px, 5.2vw, 76px); line-height: 1; white-space: nowrap; }
.stat__num small { font-size: .4em; margin-left: 4px; letter-spacing: 0; }
.stat__label { font-size: 15px; font-weight: 600; color: var(--muted); }

/* Wide image ------------------------------------------------------------- */
.wide__frame { position: relative; overflow: hidden; height: clamp(360px, 88vh, 900px); }
.wide__frame img { width: 100%; height: 118%; object-fit: cover; }

/* Section head ----------------------------------------------------------- */
.section-head { margin-bottom: clamp(44px, 6vw, 88px); max-width: 780px; }
.section-head .h2 { margin-bottom: 0; }
.section-head__lead { margin: 24px 0 0; color: var(--ink-soft); max-width: 52ch; }

/* Benefits --------------------------------------------------------------- */
.benefits__grid { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); }
.benefit { padding: 40px 32px 44px 0; border-right: 1px solid var(--line); }
.benefit + .benefit { padding-left: 32px; }
.benefit:last-child { border-right: 0; }
.benefit .art { margin: 0 0 28px; transition: transform .8s var(--ease); }
.benefit:hover .art { transform: translateY(-6px); }
.benefit h3 { font-family: var(--display); font-weight: 600; font-size: clamp(22px, 1.8vw, 26px); letter-spacing: -.02em; line-height: 1.2; margin: 0 0 12px; }
.benefit p { margin: 0; color: var(--muted); }

/* Houses ----------------------------------------------------------------- */
.houses { background: var(--surface); }
.houses__wrap { display: grid; grid-template-columns: 1fr 1.15fr; gap: clamp(40px, 7vw, 120px); align-items: start; }
.houses__text { position: sticky; top: var(--sticky-top, calc(var(--header-h) + 40px)); }
@media (max-height: 820px) and (min-width: 900px) {
  .houses__lead { margin-bottom: 20px; }
  .features { margin-bottom: 28px; }
  .features li { padding: 11px 0; }
}
.houses__lead { color: var(--ink-soft); max-width: 46ch; margin: 0 0 32px; }
.features { list-style: none; margin: 0 0 40px; padding: 0; }
.features li { display: flex; align-items: center; gap: 16px; padding: 15px 0; border-top: 1px solid var(--line); font-weight: 600; line-height: 1.45; }
.features li:last-child { border-bottom: 1px solid var(--line); }
.features .ico { width: 26px; height: 26px; color: var(--accent-dark); stroke-width: 1.3; }
.houses__media { display: flex; flex-direction: column; gap: clamp(20px, 3.5vw, 48px); }
.media-card { margin: 0; overflow: hidden; border-radius: var(--radius); aspect-ratio: 4 / 5; }
.media-card:nth-child(2) { aspect-ratio: 16 / 11; }
.media-card img { width: 100%; height: 120%; object-fit: cover; }

/* Fotogalerie ----------------------------------------------------------- */
.photos { padding: calc(var(--header-h) + clamp(48px, 7vw, 96px)) 0 clamp(72px, 8vw, 120px); }
.photos .h2 { margin-bottom: clamp(32px, 4vw, 56px); }
.photos__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(12px, 1.4vw, 20px); }
.photos__item {
  display: block; width: 100%; aspect-ratio: 16 / 10;
  overflow: hidden; border-radius: var(--radius); background: var(--surface); cursor: zoom-in;
}
.photos__item picture { height: 100%; }
.photos__item img { width: 100%; height: 100%; object-fit: cover; transition: opacity .4s var(--ease); }
.photos__item:hover img { opacity: .86; }

/* Pillars ---------------------------------------------------------------- */
.pillars { padding-top: calc(var(--section) * .5); }
.pillar { display: grid; grid-template-columns: 1.35fr 1fr; gap: clamp(28px, 7vw, 120px); align-items: center; }
.pillar + .pillar { margin-top: clamp(72px, 10vw, 150px); }
.pillar--rev { grid-template-columns: 1fr 1.35fr; }
.pillar--rev .pillar__img { order: 2; }
.pillar__img { overflow: hidden; border-radius: var(--radius); aspect-ratio: 16 / 11; }
.pillar__img img { width: 100%; height: 100%; object-fit: cover; }
.pillar__num { display: block; font-size: 14px; font-weight: 700; letter-spacing: .12em; color: var(--accent-dark); margin-bottom: 16px; }
.pillar__text p { color: var(--ink-soft); max-width: 42ch; margin: 0; }

/* Location --------------------------------------------------------------- */
.location { background: var(--surface); }
.location.section { padding: clamp(72px, 8vw, 120px) 0; }
.location__wrap { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(32px, 5vw, 80px); align-items: stretch; }
.location__head { margin-bottom: clamp(24px, 3vw, 36px); }
.location__head .h2 { margin-bottom: 0; }

.loc__modes {
  display: inline-flex; gap: 4px; padding: 4px; margin-bottom: 28px;
  border-radius: 100px; background: rgba(29, 28, 26, .07);
}
.loc__mode {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 44px; padding: 0 18px; border-radius: 100px;
  font-size: 15px; font-weight: 700; color: var(--ink-soft);
  transition: background-color .4s var(--ease), color .4s var(--ease), box-shadow .4s;
}
.loc__mode .ico { width: 22px; height: 22px; stroke-width: 1.5; }
.loc__mode:hover { color: var(--ink); }
.loc__mode.is-active { background: var(--ink); color: var(--light); box-shadow: 0 6px 16px -8px rgba(0,0,0,.5); }

.loc__list { list-style: none; margin: 0; padding: 0; }
.loc__item {
  display: grid; grid-template-columns: 52px 1fr auto; grid-template-rows: auto auto;
  column-gap: 16px; row-gap: 10px; align-items: center;
  padding: 16px 0; border-top: 1px solid var(--line);
}
.loc__item:last-child { border-bottom: 1px solid var(--line); }
.loc__item .ico--line { grid-row: 1 / 3; width: 44px; height: 44px; color: var(--accent-dark); stroke-width: .9; }
.loc__name { font-weight: 600; line-height: 1.35; }
.loc__time { font-family: var(--display); font-weight: 600; font-size: 22px; letter-spacing: -.02em; white-space: nowrap; font-variant-numeric: tabular-nums; }
.loc__bar { grid-column: 2 / 4; height: 3px; border-radius: 3px; background: rgba(29, 28, 26, .1); overflow: hidden; }
.loc__bar i { display: block; height: 100%; width: 100%; background: var(--accent); border-radius: 3px; transform-origin: left; transform: scaleX(0); transition: transform 1s var(--ease); }

.map { position: relative; min-height: 420px; border-radius: var(--radius); overflow: hidden; background: #d9d1c4; }
.map iframe { position: absolute; top: 0; right: 0; bottom: 0; left: 0; width: 100%; height: 100%; border: 0; filter: grayscale(.85) sepia(.15) contrast(1.02); }

/* Registration ----------------------------------------------------------- */
.register { position: relative; background: var(--dark); color: var(--light); overflow: hidden; }
.register.section { padding: clamp(72px, 8vw, 120px) 0; }
.register__bg { position: absolute; top: 0; right: 0; bottom: 0; left: 0; opacity: .2; }
.register__bg img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(.3); }
.register__bg::after { content: ""; position: absolute; top: 0; right: 0; bottom: 0; left: 0; background: linear-gradient(90deg, var(--dark) 20%, rgba(31,30,27,.7)); }
/* Levý sloupec a formulář mají stejnou výšku; karta prodejce lícuje se spodkem formuláře */
.register__wrap { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 5vw, 80px); align-items: stretch; }
.register__intro { display: flex; flex-direction: column; align-items: flex-start; }
.register__intro .h2 { margin-bottom: 18px; }
.register__intro > p { margin: 0; color: var(--light-soft); max-width: 44ch; }
.checks { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 10px; }
.register__intro .h2 + .checks { margin-top: 6px; }
.checks li { display: flex; align-items: center; gap: 12px; font-size: 16px; font-weight: 600; line-height: 1.4; }
.checks .ico {
  width: 26px; height: 26px; padding: 5px; border-radius: 50%;
  border: 1px solid rgba(247,244,239,.35); color: var(--light-accent); stroke-width: 2;
}

.form {
  position: relative;
  background: var(--light); color: var(--ink);
  display: flex; flex-direction: column; justify-content: center;
  padding: clamp(24px, 3.2vw, 44px);
  border-radius: 10px;
  box-shadow: 0 40px 80px -30px rgba(0,0,0,.55);
}
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; }
.field { position: relative; margin-bottom: 14px; }
.field input, .field textarea {
  width: 100%; display: block;
  padding: 28px 0 10px;
  font: inherit; font-size: 17px; font-weight: 600; color: var(--ink);
  background: transparent; border: 0; border-bottom: 1px solid rgba(29,28,26,.3); border-radius: 0;
  outline: none; resize: vertical;
  transition: border-color .4s var(--ease);
  -webkit-appearance: none; appearance: none;
}
.field textarea { min-height: 64px; }
.field label {
  position: absolute; left: 0; top: 27px;
  font-size: 16px; font-weight: 500; color: var(--muted);
  pointer-events: none; transform-origin: left top;
  transition: transform .45s var(--ease), color .45s var(--ease);
}
.field input:focus, .field textarea:focus { border-color: var(--ink); }
.field input:focus + label, .field input:not(:placeholder-shown) + label,
.field textarea:focus + label, .field textarea:not(:placeholder-shown) + label {
  transform: translateY(-22px) scale(.8); color: var(--accent-dark); font-weight: 700;
}
.field::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1.5px;
  background: var(--accent-dark); transform: scaleX(0); transform-origin: left;
  transition: transform .6s var(--ease);
}
.field:focus-within::after { transform: scaleX(1); }
.field.is-invalid input, .field.is-invalid textarea { border-color: #a8412c; }
.field.is-invalid label { color: #a8412c; }

.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.consent { position: relative; display: flex; gap: 12px; align-items: flex-start; margin: 12px 0 22px; font-size: 14px; line-height: 1.55; color: var(--muted); cursor: pointer; }
.consent input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.consent__box {
  flex: 0 0 22px; height: 22px; border: 1.5px solid rgba(29,28,26,.45); border-radius: 5px;
  display: grid; place-items: center; color: var(--light);
  transition: background-color .3s, border-color .3s;
}
.consent__box .ico { width: 16px; height: 16px; stroke-width: 2.4; transform: scale(0); transition: transform .3s var(--ease); }
.consent input:checked + .consent__box { background: var(--ink); border-color: var(--ink); }
.consent input:checked + .consent__box .ico { transform: scale(1); }
.consent input:focus-visible + .consent__box { outline: 2px solid var(--accent); outline-offset: 2px; }
.consent.is-invalid .consent__box { border-color: #a8412c; }
.consent a { color: var(--ink); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }

.form__status { min-height: 0; margin: 10px 0 0; font-size: 14px; font-weight: 600; color: #a8412c; text-align: center; }
.form.is-loading .btn { pointer-events: none; opacity: .7; }

.form__success {
  position: absolute; top: 0; right: 0; bottom: 0; left: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 40px; gap: 8px;
  opacity: 0; visibility: hidden;
}
.form__success .ico--line { width: 88px; height: 88px; stroke-width: .6; color: var(--accent-dark); margin-bottom: 12px; }
.form__success h3 { font-family: var(--display); font-weight: 500; letter-spacing: -.012em; font-size: clamp(30px, 3vw, 42px); margin: 0; line-height: 1.05; }
.form__success p { color: var(--muted); margin: 0; }
.form.is-sent .form__body { visibility: hidden; }
.form.is-sent .form__success { visibility: visible; }

/* Kontaktní karta prodejce (fotka přesahuje nad kartu) --------------- */
/* Fotka: spodních 73,25 % je obdélník pozadí, horních 26,75 % hlava nad ním.
   Fotka se odvozuje ze skutečné výšky karty: sahá od spodku karty do −36,52 % (26,75 / 73,25)
   nad ni, takže obdélník pozadí vždy přesně lícuje s horní hranou karty. */
.agent {
  position: relative;
  display: flex; align-items: center;
  width: 100%; max-width: 480px; min-height: 168px;
  margin-top: auto; padding: 0 20px 0 222px; /* ≈ šířka fotky při výšce karty 168 px + mezera */
  background: rgba(247, 244, 239, .07); border: 1px solid rgba(247, 244, 239, .14);
  border-radius: 0 10px 10px 10px;
}
.register__intro .checks { margin-bottom: 28px; }
.register__intro.has-popout .checks { margin-bottom: 72px; } /* místo pro hlavu nad kartou */
/* běžná fotka (bez výřezu): vyplní levou část karty */
.agent--plain { padding-left: 216px; }
.agent--plain .agent__photo { top: 0; bottom: 0; left: 0; width: 196px; height: auto; aspect-ratio: auto; }
.agent--plain .agent__photo img { object-fit: cover; object-position: 50% 25%; border-radius: 9px 0 0 9px; }
.agent__photo { position: absolute; left: -1px; bottom: -1px; top: calc(-36.52% - 1px); aspect-ratio: 346 / 400; }
.agent__photo img { width: 100%; height: 100%; object-fit: contain; object-position: bottom; border-bottom-left-radius: 10px; }
.agent__body { padding: 14px 0; min-width: 0; }
.agent__role { margin: 0 0 4px; font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--light-accent); }
.agent__name { margin: 0; font-family: var(--display); font-weight: 500; font-size: 22px; letter-spacing: -.02em; line-height: 1.2; color: var(--light); }
.agent__company { margin: 0 0 10px; font-size: 14px; color: var(--light-soft); }
.agent__link { display: flex; align-items: center; gap: 10px; font-size: 15px; line-height: 1.4; color: var(--light); padding: 2px 0; transition: opacity .3s; white-space: nowrap; }
.agent__link:hover { opacity: .75; }
.agent__link .ico { width: 18px; height: 18px; color: var(--light-accent); stroke-width: 1.5; }

/* Footer ----------------------------------------------------------------- */
.footer { background: var(--dark); color: var(--light-soft); padding: clamp(56px, 6vw, 88px) 0 32px; border-top: 1px solid rgba(247,244,239,.08); }
.footer__grid { display: grid; grid-template-columns: 1.2fr 1.2fr 1fr; gap: 40px; padding: 0 0 48px; }
.footer__logo { display: block; width: max-content; margin: 0 0 20px; opacity: .9; transition: opacity .3s; }
.footer__logo:hover { opacity: 1; }
.footer__logo img { display: block; width: auto; height: 30px; }
.footer h4 { margin: 0 0 20px; font-size: 13px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--light-accent); }
.footer p { margin: 0; font-size: 16px; line-height: 1.6; }
.footer__line { display: flex; align-items: flex-start; gap: 12px; }
.footer__line + .footer__line { margin-top: 12px; }
.footer__line .ico { width: 20px; height: 20px; margin-top: 3px; color: var(--light-accent); stroke-width: 1.5; }
.footer__strong { color: var(--light); font-weight: 600; }
.footer a { transition: color .3s; }
.footer a:hover { color: var(--light); text-decoration: underline; text-underline-offset: 3px; }
.footer__credit { display: inline-flex; align-items: center; gap: 12px; opacity: .75; transition: opacity .3s; }
.footer .footer__credit:hover { opacity: 1; text-decoration: none; }
.footer__credit img { display: block; width: auto; height: 22px; }
.footer__bottom { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 24px; padding-top: 24px; border-top: 1px solid rgba(247,244,239,.14); font-size: 14px; color: rgba(247,244,239,.66); }

/* Sticky CTA (mobile) ---------------------------------------------------- */
.sticky-cta {
  display: none;
  position: fixed; left: 12px; right: 12px; bottom: max(12px, env(safe-area-inset-bottom)); z-index: 80;
  min-height: 56px; align-items: center; justify-content: center; gap: 10px;
  background: var(--ink); color: var(--light); border-radius: 100px;
  font-size: 15px; font-weight: 700;
  box-shadow: 0 16px 40px -12px rgba(0,0,0,.5);
  transform: translateY(160%); transition: transform .6s var(--ease);
}
.sticky-cta .ico { width: 20px; height: 20px; }
.sticky-cta.is-visible { transform: none; }

/* Lightbox --------------------------------------------------------------- */
.lightbox {
  position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 300;
  display: flex; align-items: center; justify-content: center;
  background: rgba(20, 19, 17, .95);
  opacity: 0; visibility: hidden; transition: opacity .5s var(--ease), visibility .5s;
}
.lightbox.is-open { opacity: 1; visibility: visible; }
.lightbox img { max-width: min(92vw, 1600px); max-height: 82vh; width: auto; border-radius: 4px; transform: scale(.96); transition: transform .6s var(--ease), opacity .3s; }
.lightbox.is-open img { transform: none; }
.lightbox__close, .lightbox__nav {
  position: absolute; display: grid; place-items: center;
  width: 52px; height: 52px; border-radius: 50%;
  color: var(--light); background: rgba(247,244,239,.1);
  transition: background-color .3s;
}
.lightbox__close:hover, .lightbox__nav:hover { background: rgba(247,244,239,.22); }
.lightbox__close .ico, .lightbox__nav .ico { width: 26px; height: 26px; stroke-width: 1.6; }
.lightbox__close { top: 16px; right: 16px; }
.lightbox__nav { top: 50%; transform: translateY(-50%); }
.lightbox__prev { left: 16px; }
.lightbox__next { right: 16px; }
.lightbox__count { position: absolute; bottom: 24px; left: 50%; transform: translateX(-50%); color: var(--light-soft); font-size: 14px; font-weight: 600; letter-spacing: .12em; }

/* Legal page ------------------------------------------------------------- */
.legal { padding: calc(var(--header-h) + 72px) 0 var(--section); }
.legal .container { max-width: 860px; }
.legal h1 { font-family: var(--display); font-weight: 500; letter-spacing: -.012em; font-size: clamp(38px, 5vw, 64px); line-height: 1.02; margin: 0 0 36px; }
.legal h2 { font-family: var(--display); font-weight: 600; letter-spacing: -.02em; font-size: 24px; margin: 40px 0 10px; }
.legal p, .legal li { color: var(--ink-soft); }
.page-legal .header { color: var(--ink); }
.page-legal .header::before { display: none; }
.page-legal .header__cta { --btn-bg: var(--ink); --btn-fg: var(--light); }
.page-legal .header { display: flex; justify-content: space-between; }

/* Responsive ------------------------------------------------------------- */
@media (max-width: 1100px) {
  .nav { gap: 24px; }
  .photos__grid { grid-template-columns: repeat(2, 1fr); }
  .header__phone span { display: none; }
  .header__right { gap: 18px; }
  .benefits__grid { grid-template-columns: repeat(2, 1fr); }
  .benefit, .benefit + .benefit { padding: 36px 28px 40px 0; }
  .benefit:nth-child(even) { padding-left: 28px; padding-right: 0; border-right: 0; }
  .benefit:nth-child(n+3) { border-top: 1px solid var(--line); }
  .location__wrap { grid-template-columns: 1fr; }
  .map { min-height: 0; aspect-ratio: 16 / 10; }
}

@media (max-width: 899px) {
  :root { --header-h: 68px; }
  .header { gap: 12px; }
  .header { display: flex; justify-content: space-between; }
  .nav, .header__right { display: none; }
  .burger { display: block; }
  .intro__grid, .houses__wrap, .register__wrap { grid-template-columns: 1fr; }
  .houses__text { position: static; }
  .houses__media { gap: 16px; }
  .media-card img, .wide__frame img { height: 100%; } /* na mobilu bez paralaxy */
  .media-card, .media-card:nth-child(2) { aspect-ratio: 4 / 3; }
  .pillar, .pillar--rev { grid-template-columns: 1fr; gap: 24px; }
  .pillar--rev .pillar__img { order: 0; }
  .register__bg::after { background: rgba(31,30,27,.8); }
  .sticky-cta { display: flex; }
  .footer { padding-bottom: 100px; }
  .footer__grid { grid-template-columns: 1fr 1fr; }

}

@media (max-width: 599px) {
  .photos__grid { grid-template-columns: 1fr; }
  .hero__title { font-size: clamp(36px, 11vw, 56px); white-space: normal; }
  .hero__bottom .btn { width: 100%; }
  .stat:nth-child(odd) { padding-right: 14px; }
  .stat:nth-child(even) { padding-left: 14px; }
  .stat__num { font-size: clamp(38px, 11vw, 48px); }
  .stat__label { font-size: 14px; }
  .benefits__grid { grid-template-columns: 1fr; }
  .benefit, .benefit + .benefit, .benefit:nth-child(even) { padding: 30px 0 32px; border-right: 0; }
  .benefit + .benefit { border-top: 1px solid var(--line); }
  .benefit .art { max-width: 200px; margin-bottom: 20px; }
  .field-row { grid-template-columns: 1fr; }
  /* mobil: fotka + jméno nahoře, kontakty pod nimi přes celou šířku */
  .agent { display: grid; grid-template-columns: 128px 1fr; column-gap: 16px; min-height: 0; padding: 0 16px 16px 0; margin-top: 0; border-radius: 0 10px 10px 10px; }
  .agent__photo { position: static; height: 148px; margin: -40px 0 0 -1px; align-self: start; } /* 148 × 0,2675 ≈ 40 px nad kartou */
  .agent__photo img { border-radius: 0 0 8px 0; }
  .agent__body { display: contents; }
  .agent__info { align-self: center; padding-top: 12px; }
  .agent__name { font-size: 22px; }
  .agent__company { margin-bottom: 0; }
  .agent__links { grid-column: 1 / -1; padding: 14px 0 0 16px; }
  .agent__link { font-size: 15px; }
  .footer__grid { grid-template-columns: 1fr; gap: 32px; }
  .wide__frame { height: 60vh; }
  .loc__modes { display: flex; width: 100%; }
  .loc__mode { flex: 1; justify-content: center; padding: 0 8px; font-size: 14px; }
  .loc__item { grid-template-columns: 40px 1fr auto; column-gap: 12px; }
  .loc__item .ico--line { width: 38px; height: 38px; }
  .loc__time { font-size: 19px; }
  .map { aspect-ratio: 1 / 1; }
  .lightbox__nav { top: auto; bottom: 12px; transform: none; }
  .lightbox__count { bottom: 28px; }
}

@media (prefers-reduced-motion: reduce) {
  .hero__slide picture { animation: none !important; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .js .preloader { display: none; }
}

/* Náhled v administraci ---------------------------------------------- */
.cms-preview .preloader { display: none !important; }
.cms-preview .hero__slide picture { animation: none !important; }
.cms-preview .sticky-cta { display: none !important; }

/* Souhlas s cookies ------------------------------------------------- */
.consent-bar {
  position: fixed; left: 16px; bottom: 16px; z-index: 400; width: min(420px, calc(100vw - 32px));
  padding: 20px; border-radius: 12px; background: var(--dark); color: var(--light-soft);
  box-shadow: 0 24px 60px -20px rgba(0,0,0,.6); border: 1px solid rgba(247,244,239,.12);
  font-size: 14px; line-height: 1.55;
  opacity: 0; transform: translateY(16px); transition: opacity .4s var(--ease), transform .4s var(--ease);
}
.consent-bar.is-open { opacity: 1; transform: none; }
.consent-bar p { margin: 0 0 16px; }
.consent-bar b { display: block; margin-bottom: 4px; color: var(--light); font-size: 15px; }
.consent-bar a { color: var(--light); text-decoration: underline; text-underline-offset: 3px; }
.consent-bar__btns { display: flex; gap: 8px; flex-wrap: wrap; }
.consent-bar__btn { flex: 1; min-height: 44px; padding: 0 16px; border-radius: 100px; border: 1px solid rgba(247,244,239,.3); background: transparent; color: var(--light); font-weight: 600; font-size: 14px; }
.consent-bar__btn:hover { border-color: var(--light); }
.consent-bar__btn.is-primary { background: var(--light); color: var(--ink); border-color: var(--light); }
@media (max-width: 899px) { .consent-bar { bottom: max(84px, calc(env(safe-area-inset-bottom) + 84px)); } } /* nad plovoucím tlačítkem */

/* Starší prohlížeče bez aspect-ratio (Safari < 15, iOS 14) — poměr stran přes padding */
@supports not (aspect-ratio: 1 / 1) {
  .media-card, .pillar__img { position: relative; height: 0; }
  .media-card { padding-top: 125%; }
  .media-card:nth-child(2) { padding-top: 68.75%; }
  .pillar__img { padding-top: 68.75%; }
  .photos__item { position: relative; height: 0; padding-top: 62.5%; }
  .photos__item picture { position: absolute; top: 0; left: 0; width: 100%; }
  .media-card picture, .pillar__img picture { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
  .agent__photo { width: 200px; }
  @media (max-width: 1100px) { .map { min-height: 0; height: 0; padding-top: 62.5%; } }
  @media (max-width: 899px) { .media-card, .media-card:nth-child(2) { padding-top: 75%; } }
  @media (max-width: 599px) { .map { padding-top: 100%; } .agent__photo { width: 128px; } }
}
@media (max-width: 599px) {
  .agent--plain { padding-left: 0; }
  .agent--plain .agent__photo { margin: 0; height: 100%; min-height: 128px; width: 100%; }
  .agent--plain .agent__photo img { border-radius: 9px 0 8px 0; }
}
