/* Tokens aus dem Design-System „Behr Immobilien“ (tokens.json, Thema Hell) */
:root {
  --surface: #ffffff;
  --surface-raised: #ffffff;
  --surface-muted: #f3f3f1;
  --ink: #111111;
  --ink-muted: #5c5c5c;
  --line: #e2e2de;
  --primary: #111111;
  --on-primary: #ffffff;
  --accent: #c8102e;
  --focus: #c8102e;
  --status-neu: #111111;
  --status-reserviert: #8a5a12;
  --status-verkauft: #2f6b4f;
  --brand-schwarz: #111111;
  --brand-graphit: #2b2b2b;
  --font-display: "Inter Display", Inter, "Helvetica Neue", Arial, sans-serif;
  --font-sans: Inter, "Helvetica Neue", Arial, sans-serif;
  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px; --space-6: 24px;
  --space-8: 32px; --space-12: 48px; --space-16: 64px; --space-24: 96px;
  --radius-0: 0; --radius-sm: 2px; --radius-md: 4px;
  --shadow-card: 0 1px 2px rgba(0,0,0,0.05), 0 8px 24px rgba(0,0,0,0.06);
  --max: 1200px;
  --gutter: var(--space-6);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--surface); color: var(--ink); font: 400 16px/26px var(--font-sans); }
img { max-width: 100%; display: block; }
a { color: var(--accent); }
a:hover { color: var(--ink); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
section { padding: var(--space-12) 0; scroll-margin-top: 72px; }
@media (min-width: 900px) { section { padding: var(--space-24) 0; } }

/* Typografie */
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; margin: 0; text-wrap: balance; }
.display { font-size: clamp(38px, 6.4vw, 56px); line-height: 1.07; letter-spacing: -0.02em; }
.h1 { font-size: clamp(30px, 4.4vw, 40px); line-height: 1.15; letter-spacing: -0.015em; }
.h3 { font-size: 22px; line-height: 28px; }
.lead { font-size: 19px; line-height: 30px; color: var(--ink-muted); max-width: 560px; }
.muted { color: var(--ink-muted); }
.eyebrow { font-size: 12px; line-height: 16px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-muted); }
.rule { width: 64px; height: 3px; background: var(--accent); margin: var(--space-4) 0 28px; }
.section-title { margin: var(--space-3) 0 var(--space-12); max-width: 640px; }

/* Button (Komponente Button) */
.bh-btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2); font: 500 15px/20px var(--font-sans); padding: 12px 22px; border-radius: var(--radius-sm); border: 1px solid transparent; cursor: pointer; text-decoration: none; transition: background .15s, color .15s, border-color .15s; }
.bh-btn-lg { font-size: 16px; padding: 16px 28px; }
.bh-btn-primary { background: var(--primary); color: var(--on-primary); }
.bh-btn-primary:hover { background: var(--brand-graphit); color: #fff; }
.bh-btn-secondary { background: transparent; color: var(--ink); border-color: var(--ink); }
.bh-btn-secondary:hover { background: var(--surface-muted); color: var(--ink); }
.bh-btn-still { background: transparent; color: var(--accent); padding-left: 0; padding-right: 0; text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.bh-btn-still:hover { text-decoration-thickness: 2px; color: var(--accent); }
.actions { display: flex; flex-wrap: wrap; gap: var(--space-4); align-items: center; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 10; background: var(--surface); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: var(--space-6); height: 72px; }
.logo { display: block; line-height: 0; flex-shrink: 0; }
.logo img { width: 130px; height: auto; }
.nav { display: none; gap: 22px; font-size: 15px; font-weight: 500; white-space: nowrap; }
.header-right .bh-btn { white-space: nowrap; }
.nav a, .menu nav a { color: var(--ink); text-decoration: none; }
.nav a:hover { color: var(--accent); }
.header-right { display: none; align-items: center; gap: 20px; }
.tel { color: var(--ink); text-decoration: none; font-weight: 600; font-size: 15px; white-space: nowrap; }
.menu summary { list-style: none; cursor: pointer; width: 44px; height: 44px; display: grid; place-content: center; gap: 5px; }
.menu summary::-webkit-details-marker { display: none; }
.menu summary i { display: block; width: 22px; height: 2px; background: var(--ink); }
.menu nav { position: absolute; left: 0; right: 0; top: 72px; background: var(--surface); border-bottom: 1px solid var(--line); display: grid; padding: var(--space-2) var(--gutter) var(--space-6); }
.menu:not([open]) nav { display: none; }
.menu nav a { padding: var(--space-3) 0; border-bottom: 1px solid var(--line); font-weight: 500; }
.menu nav .bh-btn { margin-top: var(--space-4); border-bottom: 0; color: var(--on-primary); }
@media (min-width: 1240px) {
  .nav, .header-right { display: flex; }
  .menu { display: none; }
  .logo img { width: 150px; }
}

/* Hero */
.hero { display: grid; gap: var(--space-12); align-items: center; padding-top: var(--space-12); padding-bottom: var(--space-12); }
.hero .lead { margin: 0 0 40px; }
.hero h1 { margin-bottom: var(--space-6); }
.portrait { position: relative; }
.ph { background: var(--surface-muted); color: var(--ink-muted); font-size: 14px; line-height: 20px; display: flex; align-items: center; justify-content: center; text-align: center; padding: var(--space-6); }
.portrait .ph { aspect-ratio: 4 / 5; }
.portrait-card { position: absolute; left: var(--space-4); right: var(--space-4); bottom: var(--space-4); background: var(--primary); color: var(--on-primary); padding: 20px 24px; }
.portrait-card strong { display: block; font: 600 20px/26px var(--font-display); }
.portrait-card span { display: block; font-size: 14px; line-height: 20px; margin-top: 6px; opacity: .85; }
@media (min-width: 900px) {
  .hero { grid-template-columns: 7fr 5fr; gap: 56px; padding-top: var(--space-24); padding-bottom: 80px; }
  .portrait-card { left: -24px; right: auto; bottom: 32px; max-width: 260px; }
}

/* Versprechen-Band */
.band { background: var(--primary); color: var(--on-primary); padding: 40px 0; }
.band .wrap { display: grid; gap: var(--space-8); }
.band strong { display: block; font: 600 20px/28px var(--font-display); }
.band p { margin: 4px 0 0; font-size: 15px; line-height: 24px; opacity: .85; }
@media (min-width: 900px) { .band .wrap { grid-template-columns: repeat(3, 1fr); } }

/* Leistungen */
.cards { display: grid; gap: var(--space-6); }
.card { background: var(--surface-raised); border: 1px solid var(--line); border-radius: var(--radius-md); padding: var(--space-8); display: flex; flex-direction: column; gap: var(--space-3); }
.card .num { font: 600 15px/20px var(--font-display); color: var(--accent); }
.card p { margin: 0; color: var(--ink-muted); flex-grow: 1; }
.card a { font-weight: 500; }
@media (min-width: 900px) { .cards { grid-template-columns: repeat(3, 1fr); } }

/* Ablauf */
.muted-bg { background: var(--surface-muted); }
.steps { display: grid; gap: var(--space-8); counter-reset: s; margin: 0; padding: 0; list-style: none; }
.steps li { border-top: 3px solid var(--accent); padding-top: 20px; }
.steps li::before { counter-increment: s; content: counter(s); display: block; font: 600 40px/44px var(--font-display); }
.steps h3 { font-size: 20px; line-height: 26px; margin: var(--space-3) 0 var(--space-2); }
.steps p { margin: 0; font-size: 15px; line-height: 24px; color: var(--ink-muted); }
@media (min-width: 700px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .steps { grid-template-columns: repeat(4, 1fr); } }

/* Angebote (Komponenten ObjektKarte + Statusbadge) */
.section-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: var(--space-4); margin-bottom: 40px; }
.section-head .h1 { margin-top: var(--space-3); }
.listings { display: grid; gap: var(--space-6); }
@media (min-width: 700px) { .listings { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .listings { grid-template-columns: repeat(3, 1fr); } }
.bh-card { background: var(--surface-raised); border: 1px solid var(--line); border-radius: var(--radius-md); overflow: hidden; transition: box-shadow .2s; color: var(--ink); text-decoration: none; display: block; }
.bh-card:hover { box-shadow: var(--shadow-card); color: var(--ink); }
.bh-card-media { position: relative; aspect-ratio: 3 / 2; background: var(--surface-muted); display: flex; align-items: flex-end; justify-content: center; }
.bh-card-media svg { width: 70%; height: 80%; }
.bh-ph-house { fill: var(--ink-muted); opacity: .35; }
.bh-ph-door { fill: var(--accent); }
.bh-card-badge { position: absolute; top: var(--space-3); left: var(--space-3); }
.bh-badge { display: inline-block; font-size: 12px; line-height: 16px; font-weight: 600; letter-spacing: .06em; padding: 4px 8px; border-radius: var(--radius-sm); background: var(--surface-raised); border: 1px solid currentColor; }
.bh-badge-neu { color: var(--status-neu); }
.bh-badge-reserviert { color: var(--status-reserviert); }
.bh-badge-verkauft { color: var(--status-verkauft); }
.bh-card-body { padding: var(--space-6); }
.bh-card-title { font-size: 22px; line-height: 28px; margin: var(--space-2) 0 var(--space-3); }
.bh-card-facts { list-style: none; margin: 0 0 var(--space-4); padding: 0; display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-4); font-size: 14px; line-height: 22px; color: var(--ink-muted); }
.bh-card-price { font-size: 18px; font-weight: 600; padding-top: var(--space-3); border-top: 1px solid var(--line); }
.note { font-size: 14px; line-height: 22px; color: var(--ink-muted); margin: var(--space-6) 0 0; }

/* Über mich */
.about-band { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.about { display: grid; gap: var(--space-12); align-items: center; }
.about .ph { aspect-ratio: 1 / 1; }
.about h2 { margin: var(--space-3) 0 var(--space-6); }
.about .lead { color: var(--ink); margin: 0 0 20px; }
.about p { margin: 0 0 20px; }
.about .bh-btn { margin-top: var(--space-3); }
@media (min-width: 900px) { .about { grid-template-columns: 5fr 7fr; gap: 56px; } }

/* Region */
.region { display: grid; gap: var(--space-8); }
.region h2 { margin-top: var(--space-3); }
.tags { display: flex; flex-wrap: wrap; gap: var(--space-3); align-content: flex-start; margin: 0; padding: 0; list-style: none; }
.tags li { border: 1px solid var(--line); padding: var(--space-2) var(--space-4); font-size: 15px; line-height: 24px; }
@media (min-width: 900px) { .region { grid-template-columns: 5fr 7fr; gap: var(--space-12); } }

/* Kontakt */
.contact { display: grid; gap: var(--space-12); }
.contact h2 { margin: var(--space-3) 0 var(--space-4); }
.direct { margin-top: var(--space-8); display: grid; gap: var(--space-1); font-size: 17px; }
.direct a { color: var(--ink); font-weight: 600; text-decoration: none; }
.direct a:hover { color: var(--accent); }
form { display: grid; gap: var(--space-4); background: var(--surface-raised); border: 1px solid var(--line); border-radius: var(--radius-md); padding: var(--space-6); }
label { font-size: 15px; line-height: 20px; font-weight: 500; display: grid; gap: var(--space-2); }
input, select, textarea { font: 400 16px/24px var(--font-sans); color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 11px 14px; width: 100%; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--focus); outline-offset: 0; border-color: transparent; }
textarea { min-height: 7rem; resize: vertical; }
.check { display: flex; gap: var(--space-3); align-items: start; font-size: 14px; line-height: 22px; font-weight: 400; color: var(--ink-muted); }
.check input { width: auto; margin-top: 4px; }
form .bh-btn { justify-self: start; }
@media (min-width: 900px) { .contact { grid-template-columns: 5fr 7fr; gap: 56px; } form { padding: var(--space-8); } }

/* CTA + Footer */
.cta .wrap { display: flex; flex-wrap: wrap; gap: var(--space-8); align-items: center; justify-content: space-between; }
.cta .lead { margin: var(--space-3) 0 0; }
.site-footer { background: var(--brand-schwarz); color: #cfcfcf; font-size: 15px; line-height: 26px; }
.site-footer a { color: #cfcfcf; }
.site-footer a:hover { color: #fff; }
.footer-grid { display: grid; gap: 40px; padding: 72px 0 40px; }
.footer-grid img { width: 180px; height: auto; }
.footer-grid h4 { color: #fff; font-size: 15px; font-weight: 600; margin: 0 0 var(--space-2); }
.footer-bottom { border-top: 1px solid #333; padding: 20px 0 32px; font-size: 13px; line-height: 20px; color: #a8a8a8; }
@media (min-width: 700px) { .footer-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .footer-grid { grid-template-columns: repeat(4, 1fr); } }

/* ===== WordPress-Ergänzungen ===== */
.bh-card-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.portrait img, .about img.photo { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.about img.photo { aspect-ratio: 1 / 1; object-position: center 25%; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* Formulare (Plugin Behr Propstack) */
.behr-form { display: grid; gap: var(--space-4); background: var(--surface-raised); border: 1px solid var(--line); border-radius: var(--radius-md); padding: var(--space-6); }
.form-row { display: grid; gap: var(--space-4); }
@media (min-width: 700px) { .form-row-2 { grid-template-columns: 1fr 1fr; } .form-row-3 { grid-template-columns: repeat(3, 1fr); } .form-row-anrede { grid-template-columns: 8rem 1fr; } .behr-form { padding: var(--space-8); } }
.form-choices { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: var(--space-3) var(--space-6); }
.form-choices legend { font-size: 15px; font-weight: 500; margin-bottom: var(--space-2); }
.form-choices .check { color: var(--ink); font-size: 15px; }
.behr-form .bh-btn { justify-self: start; }
.hp { position: absolute; left: -9999px; }
.form-note { padding: var(--space-4) var(--space-6); border: 1px solid var(--line); border-left: 3px solid var(--status-verkauft); margin-bottom: var(--space-4); }
.form-note-error { border-left-color: var(--accent); }

/* Unterseiten */
.page-hero { padding: var(--space-12) 0 var(--space-8); border-bottom: 1px solid var(--line); }
@media (min-width: 900px) { .page-hero { padding: var(--space-16) 0 var(--space-12); } }
.page-hero .lead { margin: var(--space-4) 0 0; }
.prose > :where(p, ul, ol, h2, h3, h4, blockquote, figure, .wp-block-image, .wp-block-buttons) { max-width: 70ch; }
.prose > .listings, .prose > #formular { margin: var(--space-8) 0; }
.prose > #formular { max-width: 800px; }
.prose > p:has(.listings) { max-width: none; }
.prose > h2 { font-size: 30px; line-height: 36px; letter-spacing: -0.015em; margin: var(--space-12) 0 var(--space-4); }
.prose > h3 { font-size: 22px; line-height: 28px; margin: var(--space-8) 0 var(--space-3); }
.prose > p, .prose > ul, .prose > ol { margin: 0 0 var(--space-4); }
.prose > img, .prose figure img { height: auto; margin: var(--space-8) 0; }
.prose .wp-block-button__link { display: inline-flex; background: var(--primary); color: var(--on-primary); padding: 12px 22px; border-radius: var(--radius-sm); text-decoration: none; font-weight: 500; }
.prose > .alignwide, .prose > .alignfull { max-width: none; }
.content-wide { max-width: none; }

/* Ratgeber */
.posts { display: grid; gap: var(--space-6); }
@media (min-width: 900px) { .posts { grid-template-columns: repeat(3, 1fr); } }
.post-card { display: block; text-decoration: none; color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius-md); overflow: hidden; }
.post-card:hover { box-shadow: var(--shadow-card); color: var(--ink); }
.post-card img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.post-card div { padding: var(--space-6); }
.post-card h2 { font-size: 22px; line-height: 28px; margin: var(--space-2) 0 var(--space-3); }
.post-card p { margin: 0; color: var(--ink-muted); font-size: 15px; line-height: 24px; }
.pagination { margin-top: var(--space-12); display: flex; gap: var(--space-3); }

/* Objekt-Detail */
.objekt-gallery { display: grid; gap: var(--space-2); }
.objekt-gallery img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
@media (min-width: 900px) { .objekt-gallery { grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; height: 520px; } .objekt-gallery img { aspect-ratio: auto; height: 100%; } .objekt-gallery img:first-child { grid-row: span 2; } }
.objekt { display: grid; gap: var(--space-12); }
@media (min-width: 1000px) { .objekt { grid-template-columns: 7fr 5fr; gap: var(--space-16); } .objekt aside { position: sticky; top: 96px; align-self: start; } }
.facts { display: grid; grid-template-columns: repeat(2, 1fr); border-top: 1px solid var(--line); border-left: 1px solid var(--line); margin: var(--space-8) 0; }
@media (min-width: 700px) { .facts { grid-template-columns: repeat(4, 1fr); } }
.facts div { padding: var(--space-4); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.facts dt { font-size: 13px; color: var(--ink-muted); }
.facts dd { margin: 0; font: 600 20px/28px var(--font-display); }
.objekt-text { white-space: pre-line; }
.objekt-price { font: 600 30px/36px var(--font-display); margin: var(--space-2) 0 var(--space-6); }

/* Inhalte der alten Seite (Orts-, Themen-, Ratgeberseiten) im neuen Design */
.prose img[src*="team-florian"] { width: 100%; max-height: 560px; object-fit: cover; object-position: 50% 22%; }
.prose .rb-eyebrow { font-size: 12px; line-height: 16px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-muted); margin: 64px 0 8px; }
.prose .rb-eyebrow + h2 { margin-top: 0; }
.prose > .rb-cards-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); max-width: none; margin: 24px 0; }
.rb-card { border: 1px solid var(--line); padding: 24px; background: var(--surface); }
.rb-card h3 { margin: 0 0 8px; font: 600 18px/24px var(--font-display); }
.rb-card p { margin: 0; color: var(--ink-muted); }

/* Ratgeber: Hinweiskasten, Download-Formular, Rechtshinweis */
.prose > .rb-tip { max-width: 70ch; margin: var(--space-8) 0; padding: var(--space-6); background: var(--surface-muted); }
.rb-tip p { margin: 0; }
.rb-tip__label { display: block; font-size: 12px; line-height: 16px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-muted); }
.rb-tip__label::after { content: ""; display: block; width: 32px; height: 3px; background: var(--accent); margin: var(--space-2) 0 var(--space-3); }
.prose > .rb-gate { max-width: 70ch; margin: var(--space-8) 0; padding: var(--space-6); border: 1px solid var(--line); border-radius: var(--radius-md); }
@media (min-width: 700px) { .prose > .rb-gate { padding: var(--space-8); } }
.rb-gate__intro strong { display: block; font: 600 22px/28px var(--font-display); letter-spacing: -0.015em; }
.rb-gate__intro p { margin: var(--space-2) 0 var(--space-6); color: var(--ink-muted); }
.rb-gate .wpcf7-form { display: grid; gap: var(--space-4); }
.rb-gate .wpcf7-form > p { margin: 0; }
.rb-gate-row { display: grid; gap: var(--space-4); }
@media (min-width: 700px) { .rb-gate-row { grid-template-columns: 1fr 1fr; } .rb-gate-row--anrede { grid-template-columns: 1fr 1fr; } }
.rb-gate .wpcf7-form-control-wrap { display: block; }
.rb-gate .wpcf7-acceptance input { width: auto; margin: 4px 8px 0 0; }
.rb-gate .wpcf7-acceptance label { display: flex; align-items: flex-start; font-size: 14px; line-height: 22px; color: var(--ink-muted); }
.rb-gate .wpcf7-list-item { margin: 0; }
.rb-gate .wpcf7-submit { width: auto; justify-self: start; background: var(--primary); color: var(--on-primary); border: 0; padding: 12px 22px; font-weight: 500; cursor: pointer; }
.rb-gate .wpcf7-submit:hover { background: var(--brand-graphit); }
.rb-gate .wpcf7-not-valid-tip { font-size: 14px; color: var(--accent); }
.rb-gate .wpcf7-response-output { margin: 0; padding: var(--space-3) var(--space-4); border: 1px solid var(--line); font-size: 14px; }
.rb-gate .wpcf7-spinner { display: none; }
.rb-gate__done { padding: var(--space-4) var(--space-6); border: 1px solid var(--line); border-left: 3px solid var(--accent); }
.prose > .rb-legal-note { margin-top: var(--space-12); padding-top: var(--space-4); border-top: 1px solid var(--line); font-size: 14px; line-height: 22px; color: var(--ink-muted); }
.prose .wp-block-buttons { display: flex; flex-wrap: wrap; gap: var(--space-4); margin: var(--space-8) 0; }
.prose .is-style-outline .wp-block-button__link { background: transparent; color: var(--ink); border: 1px solid var(--ink); }
.prose .is-style-outline .wp-block-button__link:hover { background: var(--surface-muted); }
.rb-gate .wpcf7-form { border: 0; padding: 0; background: none; border-radius: 0; }
.rb-gate-row > p { display: contents; }
.rb-gate-row br, .rb-gate .wpcf7-form > p > br { display: none; }
