/* ===========================================================
   Palác Šramota — vzhled inspirovaný palacdlouha.cz
   Fonty: Clash Display (nadpisy) + Archivo (text)
   =========================================================== */

:root {
  --black: #0d0d0d;
  --ink: #141414;
  --white: #ffffff;
  --paper: #f6f4f1;   /* teplá off-white */
  --stone: #e7e2da;
  --muted: #6d6a64;
  --line: #d9d4cc;
  --accent: #9a7b4f;  /* tlumená mosaz / „palácový" akcent */

  --font-head: "Clash Display", "Archivo", system-ui, sans-serif;
  --font-body: "Archivo", system-ui, -apple-system, sans-serif;

  --maxw: 1240px;
  --gutter: clamp(20px, 5vw, 72px);
  --section-y: clamp(72px, 11vw, 160px);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-weight: 400;
  color: var(--ink);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

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

/* ---------- Placeholder média ---------- */
.ph {
  position: relative;
  background:
    linear-gradient(135deg, rgba(154,123,79,.14), rgba(20,20,20,.06)),
    repeating-linear-gradient(45deg, var(--stone) 0 22px, #ddd7cd 22px 44px);
  background-color: var(--stone);
}
.ph::after {
  content: "obrázek";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-head);
  font-weight: 600;
  letter-spacing: .28em;
  text-transform: uppercase;
  font-size: .68rem;
  color: rgba(20,20,20,.35);
}
.ph.has-img::after { display: none; }
.ph.has-img {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: clamp(16px, 2.4vw, 30px) var(--gutter);
  color: var(--white);
  mix-blend-mode: difference;
  transition: color .3s ease;
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: clamp(1.1rem, 1.6vw, 1.5rem);
  letter-spacing: .12em;
}
.logo-line {
  width: clamp(26px, 4vw, 54px);
  height: 2px;
  background: currentColor;
  display: inline-block;
}
.header-right { display: flex; align-items: center; gap: clamp(16px, 2vw, 30px); }
.lang-toggle {
  background: none; border: none; cursor: pointer;
  color: inherit; font-family: var(--font-body);
  font-size: .95rem; letter-spacing: .18em; font-weight: 500;
}
.menu-toggle {
  background: none; border: none; cursor: pointer;
  width: 34px; height: 18px; position: relative; color: inherit;
  display: flex; flex-direction: column; justify-content: space-between;
}
.menu-toggle span {
  display: block; height: 2px; width: 100%;
  background: currentColor; transition: transform .3s ease, opacity .3s ease;
}
body.menu-open .menu-toggle span:first-child { transform: translateY(8px) rotate(45deg); }
body.menu-open .menu-toggle span:last-child { transform: translateY(-8px) rotate(-45deg); }

/* ---------- Overlay menu ---------- */
.overlay-menu {
  position: fixed; inset: 0; z-index: 55;
  background: var(--black); color: var(--white);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden; transition: opacity .4s ease, visibility .4s ease;
}
body.menu-open .overlay-menu { opacity: 1; visibility: visible; }
.overlay-menu ul { list-style: none; text-align: center; }
.overlay-menu li { overflow: hidden; }
.overlay-menu a {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: clamp(1.8rem, 6vw, 3.6rem);
  line-height: 1.25;
  display: inline-block;
  transition: color .25s ease, transform .25s ease;
}
.overlay-menu a:hover { color: var(--accent); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  height: 100svh;
  min-height: 560px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  overflow: hidden;
}
.hero-media { position: absolute; inset: 0; }
.hero-media::after { color: rgba(255,255,255,.45); }
.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,.35), rgba(0,0,0,.15) 40%, rgba(0,0,0,.45));
}
.hero-top {
  position: absolute;
  top: clamp(90px, 13vh, 150px);
  left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  font-family: var(--font-head); font-weight: 600;
  text-transform: uppercase; letter-spacing: .32em; font-size: .7rem;
  opacity: .9;
}
.hero-title {
  position: relative;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: clamp(3rem, 11vw, 10rem);
  line-height: .95;
  letter-spacing: -.01em;
  text-align: center;
  padding: 0 var(--gutter);
}
.scroll-cue {
  position: absolute; bottom: clamp(28px, 5vh, 54px);
  left: 50%; transform: translateX(-50%);
  width: 46px; height: 46px; border: 1px solid rgba(255,255,255,.6);
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  animation: bob 2.4s ease-in-out infinite;
}
.scroll-cue svg { width: 20px; height: 20px; }
@keyframes bob { 0%,100%{ transform: translate(-50%,0);} 50%{ transform: translate(-50%,8px);} }

/* ---------- Sections & typografie ---------- */
.section { padding: var(--section-y) 0; }

.stack-title {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: clamp(2.4rem, 7vw, 6rem);
  line-height: .98;
  letter-spacing: -.01em;
  text-transform: lowercase;
}
.stack-title span { display: block; }
.stack-title.small { font-size: clamp(2rem, 4.6vw, 3.4rem); }

.eyebrow {
  font-family: var(--font-head); font-weight: 600;
  text-transform: uppercase; letter-spacing: .3em;
  font-size: .72rem; color: var(--accent); margin-bottom: 1.4rem;
}

.lead {
  max-width: 62ch;
  font-size: clamp(1rem, 1.35vw, 1.28rem);
  color: #2a2a28;
  margin-top: clamp(1.6rem, 3vw, 2.6rem);
}

.intro .lead { font-size: clamp(1.05rem, 1.5vw, 1.4rem); }

.muted-note { color: var(--muted); font-size: .82rem; font-style: italic; margin-top: 1rem; }

/* ---------- Split (média + text) ---------- */
.split-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: clamp(28px, 5vw, 88px);
  align-items: center;
}
.split.reverse .split-media { order: 2; }
.split-media {
  aspect-ratio: 4 / 5;
  border-radius: 2px;
}
.split-text p { margin-top: 1.2rem; max-width: 46ch; color: #333230; }
.split-text .stack-title + p { margin-top: 1.8rem; }

/* ---------- Nabídka bytů (tabulka) ---------- */
.offer .lead { margin-bottom: clamp(2.2rem, 4vw, 3.4rem); }
.table-wrap { overflow-x: auto; border-top: 1px solid var(--line); }
.units {
  width: 100%;
  border-collapse: collapse;
  min-width: 640px;
  font-size: .98rem;
}
.units th {
  text-align: left;
  font-family: var(--font-head); font-weight: 600;
  text-transform: uppercase; letter-spacing: .12em;
  font-size: .7rem; color: var(--muted);
  padding: 1rem 1.1rem;
}
.units td {
  padding: 1.15rem 1.1rem;
  border-top: 1px solid var(--line);
  vertical-align: middle;
}
.units tbody tr { transition: background .2s ease; }
.units tbody tr:hover { background: var(--paper); }
.units .u-id { font-family: var(--font-head); font-weight: 600; }
.units .loading { color: var(--muted); text-align: center; padding: 2rem; }

.badge {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: .78rem; letter-spacing: .04em; text-transform: lowercase;
  padding: 4px 12px; border-radius: 100px; border: 1px solid var(--line);
  white-space: nowrap;
}
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.badge.volne { color: #2f7d4f; border-color: #bfe0cb; background: #eef7f0; }
.badge.rezervovano { color: #9a6b18; border-color: #ecd9ad; background: #fbf3df; }
.badge.prodano { color: #9a9a9a; border-color: var(--line); background: #f3f2ef; }

.u-detail {
  font-family: var(--font-head); font-weight: 600;
  font-size: .72rem; letter-spacing: .14em; text-transform: uppercase;
  border-bottom: 1px solid currentColor; padding-bottom: 2px;
  transition: color .2s ease;
}
.u-detail:hover { color: var(--accent); }
tr.is-sold .u-detail { color: var(--muted); pointer-events: none; opacity: .5; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  margin-top: clamp(2rem, 4vw, 3rem);
  font-family: var(--font-head); font-weight: 600;
  text-transform: uppercase; letter-spacing: .16em; font-size: .76rem;
  padding: 1rem 2.2rem;
  background: var(--ink); color: var(--white);
  border: 1px solid var(--ink); border-radius: 2px;
  transition: background .25s ease, color .25s ease;
  cursor: pointer;
}
.btn:hover { background: transparent; color: var(--ink); }
.btn.ghost { background: transparent; color: var(--ink); }
.btn.ghost:hover { background: var(--ink); color: var(--white); }

/* ---------- Fotogalerie ---------- */
.gallery-grid {
  margin-top: clamp(2.4rem, 5vw, 4rem);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: minmax(220px, auto);
  gap: clamp(10px, 1.4vw, 18px);
}
.gallery-grid .ph { border-radius: 2px; min-height: 240px; }
.gallery-grid .ph.tall { grid-row: span 2; }

/* ---------- Kontakt ---------- */
.contact { background: var(--paper); }
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 6vw, 96px);
  align-items: start;
}
.contact-intro p { margin-top: 1.6rem; max-width: 40ch; color: #333230; }
.contact-details { list-style: none; margin-top: 2rem; display: grid; gap: .5rem; color: #333230; }
.contact-details a:hover { color: var(--accent); }

.contact-form { display: grid; gap: 1.1rem; }
.contact-form label { display: grid; gap: .45rem; }
.contact-form span {
  font-family: var(--font-head); font-weight: 600;
  font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted);
}
.contact-form input,
.contact-form textarea {
  font-family: var(--font-body); font-size: 1rem;
  padding: .85rem 1rem; border: 1px solid var(--line);
  background: var(--white); border-radius: 2px; color: var(--ink);
  transition: border-color .2s ease;
}
.contact-form input:focus,
.contact-form textarea:focus { outline: none; border-color: var(--accent); }
.contact-form .btn { margin-top: .5rem; justify-self: start; }
.form-note { font-size: .78rem; color: var(--muted); }
.form-status { font-size: .9rem; min-height: 1.2em; }
.form-status.ok { color: #2f7d4f; }
.form-status.err { color: #b4442f; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--black); color: var(--white);
  padding: clamp(48px, 7vw, 88px) 0;
}
.footer-grid {
  display: flex; flex-wrap: wrap; gap: 32px;
  align-items: center; justify-content: space-between;
}
.footer-logo {
  display: inline-flex; align-items: center; gap: 4px;
  font-family: var(--font-head); font-weight: 700;
  font-size: 1.4rem; letter-spacing: .12em;
}
.footer-logo .logo-line { width: 44px; height: 2px; background: currentColor; }
.footer-contact p { font-size: .92rem; color: #c9c6c0; }
.footer-copy { font-size: .82rem; color: #8b8882; width: 100%; padding-top: 20px; border-top: 1px solid #2a2a2a; }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .split-grid,
  .contact-grid { grid-template-columns: 1fr; }
  .split.reverse .split-media { order: 0; }
  .split-media { aspect-ratio: 16 / 11; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery-grid .ph.tall { grid-row: span 1; }
}
@media (max-width: 520px) {
  .gallery-grid { grid-template-columns: 1fr; }
  .header-right { gap: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .scroll-cue { animation: none; }
}
