:root {
  --bg: #fbfaf6;
  --bg-alt: #f2efe6;
  --card: #ffffff;
  --text: #2e2a22;
  --muted: #6b6457;
  --accent: #5b7a63;
  --accent-dark: #42594a;
  --wood: #a9713f;
  --border: #e6e1d3;
  --radius: 14px;
  --shadow: 0 10px 30px -14px rgba(40, 35, 20, 0.25);
  --max: 1180px;
  --header-h: 68px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: Georgia, "Iowan Old Style", "Palatino Linotype", serif;
  font-weight: 600;
  line-height: 1.2;
  margin: 0 0 0.5em;
  color: var(--accent-dark);
}

p { margin: 0 0 1em; }
a { color: var(--accent-dark); }
img { max-width: 100%; display: block; }

/* language toggling: everything tagged data-lang is hidden unless it matches
   the active <html lang="..">. `revert` restores each tag's natural display
   (block for p/div/li, inline for span, table-row for tr, ...). */
[data-lang] { display: none !important; }
html[lang="de"] [data-lang="de"],
html[lang="en"] [data-lang="en"],
html[lang="fr"] [data-lang="fr"],
html[lang="it"] [data-lang="it"] { display: revert !important; }

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

/* header */
header.site {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(251, 250, 246, 0.92);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--border);
  height: var(--header-h);
}
header.site .bar {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand {
  font-family: Georgia, serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--accent-dark);
  text-decoration: none;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
nav.main {
  display: none;
}
nav.main ul {
  list-style: none;
  display: flex;
  gap: 26px;
  margin: 0;
  padding: 0;
}
nav.main a {
  text-decoration: none;
  color: var(--text);
  font-size: 0.97rem;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
}
nav.main a:hover { border-bottom-color: var(--accent); }

.lang-switch {
  display: flex;
  gap: 4px;
}
.lang-switch button {
  border: 1px solid var(--border);
  background: var(--card);
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 0.82rem;
  cursor: pointer;
  color: var(--muted);
}
.lang-switch button[aria-pressed="true"] {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  font-weight: 600;
}

.menu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--card);
  cursor: pointer;
}
.menu-toggle span,
.menu-toggle span::before,
.menu-toggle span::after {
  content: "";
  display: block;
  width: 18px;
  height: 2px;
  background: var(--text);
  position: relative;
}
.menu-toggle span::before { position: absolute; top: -6px; }
.menu-toggle span::after { position: absolute; top: 6px; }

nav.mobile {
  display: none;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}
nav.mobile.open { display: block; }
nav.mobile ul {
  list-style: none;
  margin: 0;
  padding: 10px 20px 18px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
nav.mobile a {
  display: block;
  padding: 10px 4px;
  text-decoration: none;
  color: var(--text);
  border-bottom: 1px solid var(--border);
}

/* hero */
.hero {
  position: relative;
  min-height: 72vh;
  display: flex;
  align-items: flex-end;
  background: #1f2a22 url("media/house-exterior.jpg") center / cover no-repeat;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(20, 24, 18, 0.1) 0%, rgba(18, 22, 16, 0.72) 100%);
}
.hero .container {
  position: relative;
  z-index: 1;
  color: #fff;
  padding-bottom: 56px;
  padding-top: 120px;
}
.hero h1 {
  color: #fff;
  font-size: clamp(2.2rem, 6vw, 3.4rem);
  margin-bottom: 0.2em;
}
.hero .tagline {
  font-size: 1.05rem;
  opacity: 0.92;
  max-width: 640px;
  margin-bottom: 1.4em;
}
.btn {
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  padding: 12px 24px;
  border-radius: 999px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  font-size: 0.98rem;
}
.btn:hover { background: var(--accent-dark); }
.btn.outline {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.7);
}

/* sections */
section.page {
  padding: 72px 0;
}
section.page:nth-of-type(even) { background: var(--bg-alt); }
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.78rem;
  color: var(--wood);
  font-weight: 700;
  margin-bottom: 0.6em;
}
.section-head {
  max-width: 720px;
  margin-bottom: 36px;
}
.badge {
  background: var(--wood);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 3px 10px;
  border-radius: 999px;
  margin-bottom: 10px;
}

/* photo gallery grid */
.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 24px;
}
.gallery img {
  width: 100%;
  height: 100%;
  min-height: 150px;
  object-fit: cover;
  border-radius: var(--radius);
  cursor: zoom-in;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease;
}
.gallery img:hover { transform: scale(1.02); }

/* apartment cards */
.apartments {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  margin-top: 36px;
}
.apartment-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.apartment-card .gallery {
  grid-template-columns: repeat(3, 1fr);
  margin: 0;
  border-radius: 0;
}
.apartment-card .gallery img { border-radius: 0; min-height: 130px; }
.apartment-card.single .gallery { grid-template-columns: 1fr; }
.apartment-card .body { padding: 22px 24px 26px; }
.apartment-card h3 {
  font-size: 1.5rem;
  margin-bottom: 2px;
}
.apt-meta {
  color: var(--muted);
  font-size: 0.92rem;
  margin-bottom: 14px;
}
.apt-meta span + span::before { content: " · "; }

table.price {
  width: 100%;
  border-collapse: collapse;
  margin: 14px 0;
  font-size: 0.92rem;
}
table.price caption {
  text-align: left;
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 6px;
}
table.price th, table.price td {
  border: 1px solid var(--border);
  padding: 7px 10px;
  text-align: center;
}
table.price th { background: var(--bg-alt); font-weight: 600; }
table.price td:first-child, table.price th:first-child { text-align: left; }

.price-legend {
  font-size: 0.82rem;
  color: var(--muted);
}

/* equipment / info lists */
.check-list {
  list-style: none;
  margin: 0 0 1em;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 6px 20px;
}
.check-list li { padding-left: 1.4em; position: relative; }
.check-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}

.note {
  background: var(--bg-alt);
  border-left: 3px solid var(--wood);
  padding: 10px 16px;
  border-radius: 6px;
  font-size: 0.92rem;
  color: var(--muted);
}

/* contact */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  margin-top: 30px;
}
.contact-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 28px;
  box-shadow: var(--shadow);
}
.contact-card dl { margin: 0; }
.contact-card dt {
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-top: 14px;
}
.contact-card dt:first-child { margin-top: 0; }
.contact-card dd { margin: 2px 0 0; font-size: 1.02rem; }
.contact-card a { text-decoration: none; }
.contact-card a:hover { text-decoration: underline; }

.map-card img {
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.map-caption {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 8px;
}

/* footer */
footer.site {
  padding: 36px 0 44px;
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
  border-top: 1px solid var(--border);
}

/* lightbox */
dialog#lightbox {
  border: none;
  border-radius: 16px;
  padding: 0;
  background: #0f120f;
  max-width: 92vw;
  width: min(900px, 92vw);
}
dialog#lightbox::backdrop { background: rgba(10, 12, 8, 0.82); }
.lb-inner { position: relative; display: flex; align-items: center; justify-content: center; min-height: 40vh; }
.lb-inner img { max-width: 100%; max-height: 82vh; border-radius: 16px; }
.lb-close, .lb-prev, .lb-next {
  position: absolute;
  background: rgba(255,255,255,0.14);
  color: #fff;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  font-size: 1.1rem;
  width: 42px;
  height: 42px;
}
.lb-close { top: 10px; right: 10px; }
.lb-prev { left: 10px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 10px; top: 50%; transform: translateY(-50%); }
.lb-close:hover, .lb-prev:hover, .lb-next:hover { background: rgba(255,255,255,0.28); }

/* responsive breakpoints */
@media (min-width: 760px) {
  nav.main { display: block; }
  .menu-toggle { display: none; }
  nav.mobile { display: none !important; }
  .apartments { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 980px) {
  .contact-grid { grid-template-columns: 1.1fr 1fr; }
}

@media (max-width: 759px) {
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .apartment-card .gallery { grid-template-columns: repeat(2, 1fr); }
  .apartment-card.single .gallery { grid-template-columns: 1fr; }
}

@media (max-width: 420px) {
  .gallery { grid-template-columns: 1fr 1fr; }
}
