:root {
  --bg: #faf9f6;
  --card: #ffffff;
  --ink: #20262b;
  --muted: #5e676e;
  --line: #e4e1da;
  --accent: #262d33;
  --accent-dark: #0f1316;
  --accent-soft: #eef0f2;
  --sans: "Segoe UI", -apple-system, system-ui, Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 17px/1.6 var(--sans); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); }
h1, h2, h3 { font-weight: 700; letter-spacing: -.015em; line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: clamp(1.9rem, 3.8vw, 2.7rem); }
h2 { font-size: clamp(1.5rem, 2.8vw, 2rem); }
h3 { font-size: 1.35rem; }
p { margin: 0 0 1em; }
.wrap { width: min(1100px, 100% - 40px); margin-inline: auto; }
section { padding: clamp(48px, 7vw, 88px) 0; }

.btn { display: inline-flex; align-items: center; justify-content: center; background: var(--accent); color: #fff; font: 600 1rem var(--sans); padding: 13px 24px; border-radius: 10px; text-decoration: none; border: 0; cursor: pointer; transition: background .15s; }
.btn:hover { background: var(--accent-dark); }
.btn.ghost { background: #fff; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.btn.ghost:hover { background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }

/* Kopfzeile */
.top { position: sticky; top: 0; z-index: 40; background: rgba(250,249,246,.95); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.top .wrap { height: 66px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.08rem; color: var(--ink); text-decoration: none; letter-spacing: -.01em; }
.logo .mark { width: 32px; height: 32px; border-radius: 8px; background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2'%3E%3Cpath d='M3 11 12 4l9 7v9H3z'/%3E%3Cpath d='M10 20v-5h4v5'/%3E%3C/svg%3E") center/18px no-repeat; }
.top nav { display: flex; align-items: center; gap: 24px; }
.top nav a:not(.btn) { color: var(--ink); text-decoration: none; font-size: .96rem; font-weight: 500; }
.top nav a:not(.btn):hover { color: var(--accent); }
.top .btn { padding: 9px 18px; font-size: .94rem; }

/* Titel + Hausfoto */
.hero { padding-top: 36px; }
.hero .sub { color: var(--muted); max-width: 72ch; font-size: 1.08rem; }
.house { margin: 26px 0 0; }
.house img { width: 100%; aspect-ratio: 2400/941; object-fit: cover; border-radius: 14px; }
.facts { list-style: none; padding: 0; margin: 20px 0 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.facts li { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.facts strong { display: block; font-size: 1.05rem; }
.facts span { color: var(--muted); font-size: .9rem; }

/* Wohnungen */
.apartments { background: var(--card); border-block: 1px solid var(--line); }
.apt { display: grid; grid-template-columns: 1.15fr 1fr; gap: clamp(24px, 4vw, 48px); align-items: start; padding: clamp(28px, 4vw, 44px) 0; border-top: 1px solid var(--line); }
.apt:first-of-type { border-top: 0; }
.photos { display: grid; grid-template-columns: repeat(var(--n, 4), 1fr); gap: 6px; }
.photos button { padding: 0; border: 0; border-radius: 8px; overflow: hidden; cursor: zoom-in; background: var(--bg); position: relative; aspect-ratio: 4/3; }
.photos .big { grid-column: 1 / -1; aspect-ratio: 16/9; border-radius: 12px; }
.photos img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.photos button:hover img { transform: scale(1.03); }
.photos .more { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(22,28,24,.55); color: #fff; font-weight: 600; font-size: .92rem; }
.specs { width: 100%; border-collapse: collapse; margin: 6px 0 20px; font-size: .97rem; }
.specs th { text-align: left; font-weight: 600; color: var(--muted); padding: 9px 14px 9px 0; vertical-align: top; white-space: nowrap; width: 1%; }
.specs td { padding: 9px 0; }
.specs tr + tr th, .specs tr + tr td { border-top: 1px solid var(--line); }

/* Lage */
.loc-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(28px, 5vw, 56px); align-items: start; }
.addr { font-size: 1.05rem; }
details { border: 1px solid var(--line); border-radius: 10px; background: var(--card); padding: 0 16px; margin: 18px 0; }
summary { cursor: pointer; padding: 13px 0; font-weight: 600; list-style: none; display: flex; justify-content: space-between; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; color: var(--muted); font-size: 1.2rem; line-height: 1; }
details[open] summary::after { content: "–"; }
details ol { margin: 0 0 14px; padding-left: 1.2em; color: var(--muted); font-size: .95rem; }
details li { margin-bottom: 4px; }
.linz img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 12px; }

/* Häufige Fragen */
.faq .wrap { max-width: 820px; }
.faq details { margin: 0 0 10px; }
.faq details p { color: var(--muted); margin: 0 0 14px; }

/* Anfrage */
.inquiry { background: var(--card); border-top: 1px solid var(--line); }
.inq-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(28px, 5vw, 64px); align-items: start; }
.contact { list-style: none; padding: 0; margin: 0; }
.contact li { padding: 10px 0; border-top: 1px solid var(--line); }
.contact li:first-child { border-top: 0; }
.contact span { display: block; font-size: .8rem; color: var(--muted); }
.contact a { font-weight: 600; text-decoration: none; overflow-wrap: anywhere; }
.contact a:hover { text-decoration: underline; }
#form { background: var(--bg); border: 1px solid var(--line); border-radius: 14px; padding: clamp(18px, 3vw, 28px); display: grid; gap: 14px; }
#form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
#form label { display: grid; gap: 5px; font-size: .86rem; font-weight: 600; min-width: 0; }
#form input, #form select, #form textarea { font: 400 1rem var(--sans); color: var(--ink); background: #fff; border: 1px solid #c9c5bd; border-radius: 9px; padding: 11px 12px; width: 100%; min-width: 0; resize: vertical; }
#form input:focus, #form select:focus, #form textarea:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
.hint { text-align: center; color: var(--muted); font-size: .84rem; margin: 0; }

footer { padding: 24px 0; font-size: .9rem; color: var(--muted); border-top: 1px solid var(--line); }
footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; }
footer a { color: var(--ink); text-decoration: none; margin-left: 18px; }
footer a:first-child { margin-left: 0; }
footer a:hover { color: var(--accent); }

.mobilebar { display: none; }

/* Lightbox */
.lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(12,16,14,.95); display: none; align-items: center; justify-content: center; }
.lightbox.open { display: flex; }
.lightbox img { max-width: 92vw; max-height: 84vh; border-radius: 8px; }
.lb-count { position: absolute; top: 22px; left: 50%; transform: translateX(-50%); color: #fff; opacity: .8; font-size: .9rem; }
.lightbox button { position: absolute; background: rgba(255,255,255,.14); color: #fff; border: 0; width: 48px; height: 48px; border-radius: 50%; font-size: 1.5rem; cursor: pointer; }
.lightbox button:hover { background: rgba(255,255,255,.28); }
.lb-close { top: 14px; right: 14px; }
.lb-prev { left: 14px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 14px; top: 50%; transform: translateY(-50%); }

/* Unterseiten */
.page { padding: 42px 0 80px; }
.page .wrap { max-width: 720px; }
.page h1 { font-size: 1.9rem; margin-bottom: 20px; }
.page h2 { font-size: 1.15rem; margin: 1.6em 0 .4em; }
.page p { color: #333; }
.page .lead-note { color: var(--muted); font-size: .92rem; }
.page a { overflow-wrap: anywhere; }

@media (max-width: 920px) {
  .apt, .loc-grid, .inq-grid { grid-template-columns: 1fr; }
  .facts { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  body { font-size: 16px; padding-bottom: 70px; }
  .wrap { width: calc(100% - 32px); }
  .top nav a:not(.btn) { display: none; }
  .logo .long { display: none; }
  .house img { aspect-ratio: auto; border-radius: 10px; }
  .specs th { white-space: normal; min-width: 92px; }
  .mobilebar { display: grid; grid-template-columns: 1fr 1.5fr; gap: 8px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); background: rgba(250,249,246,.97); border-top: 1px solid var(--line); }
  .mobilebar a { display: flex; align-items: center; justify-content: center; padding: 13px; border-radius: 10px; font-weight: 600; text-decoration: none; color: var(--ink); background: #fff; box-shadow: inset 0 0 0 1px var(--line); }
  .mobilebar a.primary { background: var(--accent); color: #fff; box-shadow: none; }
  .lb-prev, .lb-next { top: auto; bottom: 20px; transform: none; }
}
