:root {
  --bg: #141414; --surface: #1c1c1c; --text: #f2f2f2; --muted: #a8a8a8; --red: #b31b1b; --line: #262626;
  --wrap: 1120px;
  /* Side padding that also centres content at --wrap without wrapper elements. */
  --side: max(clamp(16px, 4vw, 40px), (100% - var(--wrap)) / 2);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  background: var(--bg); color: var(--text);
  font: 17px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  overflow-wrap: break-word; -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-underline-offset: .2em; }
a:hover { text-decoration-color: var(--red); }
:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
::selection { background: var(--red); color: #fff; }
h1, h2, h3 { color: #fff; line-height: 1.15; text-wrap: balance; }
p { margin: 0 0 1em; }

/* Header */
.site-header {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 12px 32px; padding: 18px var(--side);
}
.logo {
  display: block; width: 200px; aspect-ratio: 292 / 75;
  background: url(logo.png) left center / contain no-repeat;
  color: transparent; overflow: hidden; white-space: nowrap; text-decoration: none;
}
.menu { display: flex; flex-wrap: wrap; gap: 4px 28px; }
.menu a { padding: 6px 0; font-size: 16px; font-weight: 500; text-decoration: none; border-bottom: 2px solid transparent; }
.menu a:hover { border-bottom-color: var(--red); }
.burger { display: none; }

/* Contact bar */
.contactbar {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 36px;
  padding: 16px var(--side); background: var(--red); color: #fff; font-size: 19px; font-weight: 700;
}
.contactbar a { text-decoration: none; }
.contactbar a:hover { text-decoration: underline; text-decoration-color: currentColor; }
.contactbar-phone::before, .contactbar-mail::before {
  margin-right: .6em; font-size: 13px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; opacity: .85;
}
.contactbar-phone::before { content: "Telefon"; }
.contactbar-mail::before { content: "E-mail"; }
.contactbar-address { margin-left: auto; font-size: 15px; font-weight: 400; }
.contactbar .btn { display: none; }

/* Index hero (between header and contact bar) */
main { flex: 1; padding: clamp(28px, 5vw, 56px) var(--side) 80px; }
.hero { position: relative; background: #000; }
.hero img { width: 100%; height: clamp(280px, 36vw, 420px); object-fit: cover; filter: brightness(.5); }
.hero-text { position: absolute; left: 0; right: 0; bottom: 0; padding: 0 var(--side) clamp(24px, 4vw, 48px); }
.hero h1 {
  margin: 0; max-width: 17em; padding-left: 18px; border-left: 4px solid var(--red);
  font-size: clamp(28px, 4.2vw, 52px); font-weight: 700; letter-spacing: -.01em;
}
.hero p { margin: 12px 0 0 22px; max-width: 40em; font-size: clamp(16px, 1.5vw, 20px); color: #e6e6e6; }

/* Sections */
main h1 { margin: 0 0 32px; padding-left: 18px; border-left: 4px solid var(--red); font-size: clamp(32px, 4vw, 46px); }
.section + .section { margin-top: clamp(40px, 6vw, 72px); padding-top: clamp(40px, 6vw, 72px); border-top: 1px solid var(--line); }
.section {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 0 32px; align-items: start;
}
.section > * { grid-column: 1 / -1; }
.section > h2 {
  margin: 0 0 24px; font-size: 13px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted);
}
.section > h2::before {
  content: ""; display: inline-block; width: 24px; height: 2px; margin-right: 12px; vertical-align: middle; background: var(--red);
}
main a[href^="tel:"] { color: #fff; font-size: 1.15em; font-weight: 700; text-decoration: none; }
main a[href^="mailto:"] { color: var(--text); }
main a[href^="tel:"]:hover { text-decoration: underline; text-decoration-color: var(--red); }

/* Property cards */
.grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  grid-auto-rows: 1fr; /* every row as tall as the tallest: photo-less cards match photo cards */
  gap: 32px 20px;
}
.pc { position: relative; display: flex; flex-direction: column; }
.pc img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 3px; background: var(--surface); }
.card-body { padding-top: 14px; }
.pc h3 { margin: 0; font-size: 18px; }
.pc h3 a { text-decoration: none; }
.pc h3 a::after { content: ""; position: absolute; inset: 0; } /* whole card is the link */
.pc:hover h3 a { text-decoration: underline; text-decoration-color: var(--red); text-decoration-thickness: 2px; }
.card-tagline { margin: 4px 0 0; font-size: 15px; color: var(--muted); }
.card-excerpt {
  margin: 10px 0 0; font-size: 15px; line-height: 1.5; color: var(--muted);
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; overflow: hidden;
}
.pc--nophoto {
  justify-content: flex-end; padding: 20px 20px 18px;
  background: var(--surface); border-left: 4px solid var(--red); border-radius: 3px;
}
.pc--nophoto .card-body { padding: 0; }

/* Parking teaser (index) */
.section-parking { display: flow-root; }
.parking-photo { float: left; width: 45%; margin: 0 40px 8px 0; border-radius: 3px; }
.section-parking h3 { margin: 0 0 8px; font-size: 20px; }

/* Contact blocks */
.section > .company-block, .section > .person { grid-column: auto; }
.company-block, .person { margin-bottom: 32px; padding-top: 16px; border-top: 2px solid var(--red); }
.company-block h3, .person h3 { margin: 0 0 6px; font-size: 18px; }
.company-block p, .person p { margin: 0; color: var(--muted); }

/* Parking page */
main:has(> .park-section) {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 20px 24px; align-content: start;
}
main:has(> .park-section) > :not(.park-section) { grid-column: 1 / -1; }
main:has(> .park-section) > h1 { margin-bottom: 12px; }
.park-section { padding: 24px 28px; background: var(--surface); border-left: 4px solid var(--red); border-radius: 3px; }
.park-section h2 { margin: 20px 0 8px; font-size: 19px; }
.park-section p:last-child { margin: 0; }
.park-contact { margin-top: 16px; font-style: normal; color: var(--muted); }

/* Profile and property text */
.prose { max-width: 68ch; }
.breadcrumb { margin-bottom: 16px; font-size: 15px; color: var(--muted); }
.breadcrumb a { color: var(--text); }
.lead { margin: 0; }
.lead img { width: 100%; max-height: 560px; object-fit: cover; border-radius: 3px; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 180px), 1fr)); gap: 12px; margin: 12px 0 32px; }
.gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 3px; }
.property > .prose { margin-top: 32px; }

@media (min-width: 960px) {
  .property { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); grid-template-rows: auto auto auto 1fr; column-gap: 48px; }
  .property > * { grid-column: 1 / -1; }
  .property > .lead, .property > .gallery { grid-column: 1; }
  .property > .prose { grid-column: 2; grid-row: 3 / span 2; margin-top: 0; }
  .property > .gallery { align-self: start; }
  .property:not(:has(.lead)) > .prose { grid-column: 1 / -1; grid-row: auto; margin-top: 32px; }
}

.site-footer { padding: 24px var(--side); border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.site-footer p { margin: 0; }

/* Mobile */
@media (max-width: 719.98px) {
  body { font-size: 16px; }
  .site-header { padding-block: 12px; }
  .logo { width: 150px; }
  .menu { flex-basis: 100%; gap: 0 20px; }
  .menu a { padding: 10px 0; }
  /* With JS (menu.js adds .js) the nav folds behind the burger; without JS the links stay visible. */
  .js .burger {
    display: flex; flex-direction: column; justify-content: center; gap: 6px;
    width: 44px; height: 44px; margin-right: -10px; padding: 10px; border: 0; background: none; cursor: pointer;
  }
  .burger span { height: 2px; background: var(--text); border-radius: 1px; transition: transform .2s, opacity .2s; }
  .burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
  .burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
  .js .menu { display: none; flex-direction: column; gap: 0; }
  .js .menu.open { display: flex; }
  .js .menu a { padding: 14px 0; font-size: 18px; border-bottom: 1px solid var(--line); }

  .contactbar {
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 6px 10px;
    padding: 12px var(--side) 10px; font-size: 15px; font-weight: 600; text-align: center;
  }
  .contactbar .btn {
    display: flex; align-items: center; justify-content: center; min-height: 52px; grid-row: 1;
    border-radius: 6px; background: #fff; color: var(--red); font-size: 18px; font-weight: 800;
  }
  .btn-call, .contactbar-phone { grid-column: 1; }
  .btn-write, .contactbar-mail { grid-column: 2; }
  .contactbar-phone, .contactbar-mail { grid-row: 2; overflow-wrap: anywhere; }
  .contactbar-phone::before, .contactbar-mail::before { content: none; }
  .contactbar-address { display: none; }

  .hero img { height: 260px; }

  .grid { grid-template-columns: minmax(0, 1fr); grid-auto-rows: auto; gap: 12px; }
  .pc { display: grid; grid-template-columns: 96px minmax(0, 1fr); align-items: center; column-gap: 16px; }
  .pc img { width: 96px; height: 72px; aspect-ratio: auto; }
  .card-body { padding-top: 0; }
  .pc h3 { font-size: 17px; }
  .card-tagline { margin-top: 2px; font-size: 14px; }
  .card-excerpt { margin-top: 4px; font-size: 14px; -webkit-line-clamp: 2; line-clamp: 2; }
  .pc--nophoto { display: flex; min-height: 72px; justify-content: center; align-items: stretch; padding: 12px 16px; }

  .gallery { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
  .parking-photo { float: none; width: 100%; margin: 0 0 16px; }
  .park-section { padding: 20px; }
}
