/* Roesch & Klein Immobilien — modern, clean real estate */

:root {
  --ink:     #0f172a;
  --ink-2:   #334155;
  --muted:   #64748b;
  --line:    #e2e8f0;
  --line-2:  #cbd5e1;
  --bg:      #ffffff;
  --bg-2:    #f8fafc;
  --accent:  #0f2e4b;       /* deep navy */
  --accent-2:#1e4976;
  --gold:    #b8935a;
  --radius:  12px;
  --shadow:  0 1px 3px rgba(15,23,42,.06), 0 4px 12px rgba(15,23,42,.04);
  --shadow-2:0 8px 28px rgba(15,23,42,.10);
  --wrap:    1280px;
  --font:    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --serif:   Georgia, "Times New Roman", Times, serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-2); text-decoration: underline; }

img { display: block; max-width: 100%; height: auto; }

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

/* ---------- Header ---------- */

.site-header {
  border-bottom: 1px solid var(--line);
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 10;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
}

.brand:hover { text-decoration: none; }

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--accent);
  color: #fff;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: .5px;
  border-radius: 6px;
}

.brand-name {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: .2px;
}

.site-nav a {
  margin-left: 24px;
  color: var(--ink-2);
  font-weight: 500;
  font-size: 15px;
}

/* ---------- Hero ---------- */

.hero {
  background: linear-gradient(180deg, var(--bg-2) 0%, #fff 100%);
  padding: 64px 0 48px;
  border-bottom: 1px solid var(--line);
}

.hero h1 {
  font-family: var(--serif);
  font-size: 44px;
  line-height: 1.15;
  margin: 0 0 16px;
  color: var(--ink);
  font-weight: 600;
  letter-spacing: -.01em;
  max-width: 800px;
}

.hero .lead {
  font-size: 18px;
  color: var(--ink-2);
  max-width: 700px;
  margin: 0;
}

/* ---------- Filter ---------- */

.filter-section {
  background: #fff;
  padding: 28px 0 0;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 77px;
  z-index: 9;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 16px;
  padding-bottom: 20px;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.filter-group label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted);
  font-weight: 600;
}

.filter-group select,
.filter-group input[type="number"] {
  font: inherit;
  font-size: 15px;
  padding: 10px 12px;
  border: 1px solid var(--line-2);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  min-width: 160px;
  transition: border-color .15s;
}

.filter-group input[type="number"] { min-width: 120px; }

.filter-group select:focus,
.filter-group input:focus {
  outline: none;
  border-color: var(--accent);
}

.seg {
  display: inline-flex;
  border: 1px solid var(--line-2);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.seg-btn {
  border: 0;
  background: transparent;
  padding: 10px 18px;
  font: inherit;
  font-size: 15px;
  color: var(--ink-2);
  cursor: pointer;
  transition: background .15s, color .15s;
}

.seg-btn + .seg-btn { border-left: 1px solid var(--line-2); }
.seg-btn:hover { background: var(--bg-2); }
.seg-btn.is-active {
  background: var(--accent);
  color: #fff;
}

.btn-reset {
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  cursor: pointer;
  padding: 10px 4px;
  text-decoration: underline;
}

.btn-reset:hover { color: var(--ink); }

.result-count {
  font-size: 14px;
  color: var(--muted);
  padding-bottom: 18px;
}

.result-count #result-count { color: var(--ink); font-weight: 600; }

/* ---------- Grid ---------- */

.listings { padding: 36px 0 80px; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 28px;
}

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  color: var(--ink);
  text-decoration: none;
  transition: transform .2s, box-shadow .2s, border-color .2s;
  display: flex;
  flex-direction: column;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-2);
  border-color: var(--line-2);
  text-decoration: none;
}

.card-photo {
  position: relative;
  aspect-ratio: 4 / 3;
  background: var(--bg-2);
  overflow: hidden;
}

.card-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-photo .no-photo {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--muted);
  font-size: 14px;
}

.badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--accent);
  color: #fff;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.badge-miete { background: var(--gold); }

.card-body { padding: 18px 20px 20px; }

.card-title {
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--ink);
}

.card-price {
  font-size: 20px;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 8px;
}

.card-specs {
  font-size: 14px;
  color: var(--muted);
}

.card-specs span + span::before {
  content: "";
  margin: 0 8px 0 0;
}

.empty-state {
  text-align: center;
  padding: 80px 24px;
  color: var(--muted);
  font-size: 16px;
}

/* ---------- Detail page ---------- */

.detail { padding: 32px 0 80px; }

.back-link {
  display: inline-block;
  margin-bottom: 20px;
  color: var(--muted);
  font-size: 14px;
}

.detail-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.detail-titles .badge {
  position: static;
  display: inline-block;
  margin-bottom: 12px;
}

.detail-titles h1 {
  font-family: var(--serif);
  font-size: 34px;
  line-height: 1.2;
  margin: 0 0 6px;
  font-weight: 600;
}

.detail-titles .headline {
  color: var(--muted);
  font-size: 16px;
}

.detail-price {
  font-size: 30px;
  color: var(--accent);
  font-weight: 700;
  white-space: nowrap;
}

.gallery { margin-bottom: 36px; }

.gallery-main {
  aspect-ratio: 16 / 10;
  background: var(--bg-2);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 12px;
}

.gallery-main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-thumbs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  gap: 8px;
}

.thumb {
  padding: 0;
  border: 2px solid transparent;
  border-radius: 6px;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: var(--bg-2);
  cursor: pointer;
  transition: border-color .15s;
}

.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.thumb:hover { border-color: var(--line-2); }
.thumb.is-active { border-color: var(--accent); }

.gallery-empty {
  padding: 48px;
  text-align: center;
  color: var(--muted);
  background: var(--bg-2);
  border-radius: var(--radius);
}

.summary-dl {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  margin: 0 0 36px;
}

.summary-dl > div {
  background: #fff;
  padding: 18px 20px;
}

.summary-dl dt {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted);
  margin-bottom: 4px;
  font-weight: 600;
}

.summary-dl dd {
  margin: 0;
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 600;
}

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 48px;
  align-items: start;
}

.prose {
  margin-bottom: 32px;
}

.prose-block { margin-bottom: 32px; }

.prose h3 {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 600;
  margin: 0 0 12px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--accent);
  display: inline-block;
}

.prose p {
  margin: 0 0 12px;
  color: var(--ink-2);
  font-size: 16px;
  line-height: 1.7;
}

.contact-card {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 24px;
  position: sticky;
  top: 100px;
}

.contact-card h3 {
  font-family: var(--serif);
  font-size: 19px;
  margin: 0 0 10px;
}

.contact-card p {
  color: var(--ink-2);
  font-size: 14px;
  margin: 0 0 16px;
}

.btn-primary {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  padding: 12px 20px;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  transition: background .15s;
  width: 100%;
  text-align: center;
  box-sizing: border-box;
}

.btn-primary:hover {
  background: var(--accent-2);
  text-decoration: none;
  color: #fff;
}

.contact-meta {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 14px;
  color: var(--ink-2);
}

.spec-wrap { margin-top: 24px; }

.spec-wrap h3 {
  font-family: var(--serif);
  font-size: 18px;
  margin: 0 0 10px;
}

.specs {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.specs th,
.specs td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.specs th {
  color: var(--muted);
  font-weight: 500;
  width: 45%;
}

.specs tr:last-child th,
.specs tr:last-child td { border-bottom: 0; }

.features {
  margin-top: 32px;
}

.features h3 {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 600;
  margin: 0 0 12px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--accent);
  display: inline-block;
}

.features ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 4px 24px;
}

.features li {
  padding: 6px 0 6px 24px;
  position: relative;
  color: var(--ink-2);
  font-size: 15px;
}

.features li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}

/* ---------- Footer ---------- */

.site-footer {
  background: var(--ink);
  color: #cbd5e1;
  padding: 48px 0 24px;
  margin-top: 80px;
}

.site-footer a { color: #cbd5e1; }
.site-footer a:hover { color: #fff; }

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 32px;
  border-bottom: 1px solid #334155;
}

.footer-brand {
  font-family: var(--serif);
  font-size: 22px;
  color: #fff;
  margin-bottom: 8px;
}

.footer-sub {
  color: #94a3b8;
  font-size: 14px;
}

.footer-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #64748b;
  margin-bottom: 8px;
  font-weight: 600;
}

.footer-bottom {
  padding-top: 24px;
  color: #64748b;
  font-size: 13px;
  text-align: center;
}

/* ---------- Responsive ---------- */

@media (max-width: 960px) {
  .detail-grid { grid-template-columns: 1fr; }
  .contact-card { position: static; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .hero h1 { font-size: 34px; }
  .filter-section { position: static; }
}

@media (max-width: 560px) {
  .container { padding: 0 16px; }
  .hero { padding: 40px 0 32px; }
  .hero h1 { font-size: 28px; }
  .detail-titles h1 { font-size: 26px; }
  .detail-price { font-size: 24px; }
  .filter-group select,
  .filter-group input[type="number"] { min-width: 0; width: 100%; }
  .filter-group { flex: 1 1 140px; }
  .site-nav a { margin-left: 12px; font-size: 14px; }
  .brand-name { display: none; }
}

/* ---------- Legal pages ---------- */

.legal {
  padding: 40px 0 80px;
  max-width: 800px;
}

.legal h1 {
  font-family: var(--serif);
  font-size: 32px;
  margin: 0 0 24px;
}

.legal h2 {
  font-family: var(--serif);
  font-size: 20px;
  margin: 32px 0 12px;
}

.legal p { color: var(--ink-2); margin: 0 0 12px; }

.legal .todo {
  background: #fef3c7;
  border-left: 4px solid #f59e0b;
  padding: 12px 16px;
  margin: 16px 0;
  font-size: 14px;
  color: #78350f;
}
