/* BeFirst Immobilien – page-level styles on top of tokens.css + components.css */

html { scroll-behavior: smooth; }
img { max-width: 100%; height: auto; }
/* Text links only inside content – components (header, footer, buttons, cards) style their own links. */
.bf-prose a, .bf-page-lead a, .bf-tabs-count a, .bf-check a, .bf-notice a, .bf-loc-route { color: var(--link); }
.bf-prose a:hover, .bf-page-lead a:hover, .bf-tabs-count a:hover, .bf-check a:hover, .bf-notice a:hover, .bf-loc-route:hover { color: var(--primary-hover); text-decoration: underline; text-underline-offset: 4px; }

/* Explicit text colours for every button state (never inherit a link colour). */
.bf-btn-primary, .bf-btn-primary:hover, .bf-btn-primary:focus-visible { color: var(--on-primary); }
.bf-btn-secondary { color: var(--primary); }
.bf-btn-secondary:hover, .bf-btn-secondary:focus-visible { color: var(--on-primary); }
.bf-btn-ghost, .bf-btn-ghost:hover { color: var(--primary); }
.bf-btn-inverse { color: var(--befirst-blau); }
.bf-btn-inverse:hover, .bf-btn-inverse:focus-visible { color: var(--on-brand); }
.bf-btn-outline-light { color: var(--on-brand); }
.bf-btn-outline-light:hover, .bf-btn-outline-light:focus-visible { color: var(--befirst-blau); }
.bf-nav-link, .bf-nav-link:hover, .bf-nav-phone, .bf-nav-phone:hover { color: var(--on-brand); }
.bf-footer a, .bf-footer a:hover, .bf-teaser-list a, .bf-teaser-list a:hover { color: var(--on-brand); }
.bf-card-link, .bf-card-link:hover { color: var(--heading); }
.bf-contact-item:hover .bf-contact-value, .bf-insta-handle:hover { text-decoration: underline; text-underline-offset: 4px; }
:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
h1, h2, h3 { font-family: var(--font-sans); }

.bf-skip { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--surface); color: var(--heading); padding: 8px 16px; }
.bf-skip:focus { left: 8px; }
.bf-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.bf-center-cta { display: flex; justify-content: center; margin-top: var(--space-12); }
.bf-notice { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: var(--space-8); color: var(--ink-muted); text-align: center; }
.bf-overline + h1, .bf-overline + h2, .bf-overline + h3 { margin-top: 0; }

/* ---------- Hero ---------- */
.bf-hero-overlay { background: rgba(0, 20, 109, 0.5); }
.bf-hero .bf-hero-sub { color: #ffffff; }
.bf-hero-home { min-height: 620px; }
.bf-hero-home .bf-hero-inner { padding-bottom: 160px; }

/* ---------- Startseite: Vorteile auf einen Blick ---------- */
.bf-usp-section { display: flow-root; background: var(--surface); }
.bf-usp-section > .bf-container { position: relative; margin-top: -96px; }
.bf-usp { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
.bf-usp-item { background: var(--surface); border-radius: var(--radius-sm); box-shadow: var(--shadow-card); padding: 32px 28px; display: flex; flex-direction: column; gap: 16px; }
.bf-usp-ic { width: 56px; height: 56px; display: flex; align-items: center; justify-content: center; background: var(--surface-tint); color: var(--heading); border-radius: var(--radius-sm); }
.bf-usp-item h3 { margin: 0; font-size: 20px; line-height: 28px; font-weight: 700; color: var(--heading); }
.bf-usp-item p { margin: 0; font-size: 15px; line-height: 24px; color: var(--ink-muted); }

/* ---------- Zwei Wege ---------- */
.bf-paths { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; margin-top: var(--space-12); }
.bf-path { background: var(--surface-alt); border-radius: var(--radius-sm); padding: 48px 40px; display: flex; flex-direction: column; gap: 16px; align-items: flex-start; }
.bf-path .bf-overline { margin: 0; }
.bf-path h3 { margin: 0; font-size: 28px; line-height: 36px; font-weight: 400; color: var(--heading); }
.bf-path p { margin: 0; max-width: 440px; }
.bf-path-cta { margin-top: auto; padding-top: 8px; }
.bf-path-brand { background: var(--surface-brand); color: var(--on-brand); }
.bf-path-brand .bf-overline, .bf-path-brand p { color: var(--on-brand-muted); }
.bf-path-brand h3 { color: var(--on-brand); }

/* ---------- Warum BeFirst (Foto) ---------- */
.bf-why-section { position: relative; padding: var(--space-24) 0; background: var(--surface-brand); color: var(--on-brand); overflow: hidden; }
.bf-why-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.bf-why-overlay { position: absolute; inset: 0; background: var(--overlay); }
.bf-why-inner { position: relative; }
.bf-why { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; margin-top: var(--space-12); }
.bf-why-item { border: 1px solid rgba(255, 255, 255, 0.28); border-radius: var(--radius-sm); padding: 40px 32px; display: flex; flex-direction: column; gap: 16px; align-items: center; text-align: center; }
.bf-why-ic { width: 64px; height: 64px; display: flex; align-items: center; justify-content: center; background: var(--surface); color: var(--heading); border-radius: var(--radius-sm); }
.bf-why-item h3 { margin: 0; font-size: 22px; line-height: 30px; font-weight: 700; color: var(--on-brand); min-height: 30px; }
.bf-why-item p { margin: 0; color: var(--on-brand-muted); }

/* ---------- Ablauf ---------- */
.bf-steps { list-style: none; margin: var(--space-12) 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 32px; }
.bf-step { display: flex; flex-direction: column; gap: 16px; }
.bf-step-head { display: flex; align-items: center; gap: 16px; }
.bf-step-ic { width: 64px; height: 64px; flex: none; display: flex; align-items: center; justify-content: center; background: var(--surface-brand); color: var(--on-brand); border-radius: var(--radius-sm); }
.bf-step-line { flex: 1; height: 1px; background: var(--line-strong); }
.bf-step-label { margin: 0; font-size: 12px; line-height: 18px; font-weight: 700; letter-spacing: 0.3em; text-transform: uppercase; color: var(--ink-muted); }
.bf-step h3 { margin: 0; font-size: 22px; line-height: 30px; font-weight: 700; color: var(--heading); }
.bf-step p { margin: 0; color: var(--ink-muted); }

/* ---------- Über uns ---------- */
.bf-about { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 64px; align-items: center; }
.bf-about-img { display: block; width: 100%; max-width: 440px; justify-self: center; aspect-ratio: 4 / 5; object-fit: cover; object-position: center top; border-radius: var(--radius-sm); background: var(--surface-tint); }
.bf-about-body { display: flex; flex-direction: column; gap: 20px; align-items: flex-start; }
.bf-about-body .bf-overline { margin: 0; }
.bf-about-title { margin: 0; font-size: 36px; line-height: 44px; font-weight: 400; color: var(--heading); }
.bf-about-body .bf-rule { margin: 0; }
.bf-about-lead { margin: 0; font-size: 20px; line-height: 32px; }
.bf-about-text { margin: 0; color: var(--ink-muted); }
.bf-about-name { margin: 0; font-weight: 700; color: var(--heading); }
.bf-about-role { margin: 0; font-size: 14px; line-height: 22px; color: var(--ink-muted); }

/* ---------- Instagram ---------- */
.bf-insta-feed { margin-top: var(--space-12); }
.bf-insta-cta { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: center; margin-top: 40px; }
.bf-insta-handle { display: inline-flex; gap: 12px; align-items: center; text-decoration: none; color: var(--heading); font-size: 18px; line-height: 26px; }

/* ---------- Kontakt ---------- */
.bf-contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 64px; align-items: start; }
.bf-contact-info { display: flex; flex-direction: column; gap: 32px; }
.bf-contact-list { display: flex; flex-direction: column; gap: 20px; }
.bf-contact-item { display: flex; gap: 16px; align-items: center; text-decoration: none; color: var(--ink); }
.bf-contact-ic { width: 48px; height: 48px; flex: none; display: flex; align-items: center; justify-content: center; background: var(--surface-tint); color: var(--heading); border-radius: var(--radius-sm); }
.bf-contact-label { display: block; font-size: 14px; line-height: 20px; font-weight: 700; color: var(--ink-muted); }
.bf-contact-value { display: block; font-size: 20px; line-height: 28px; color: var(--heading); overflow-wrap: anywhere; }
.bf-contact-form, .bf-detail-form { box-shadow: var(--shadow-card); }

.bf-locs { display: flex; flex-direction: column; gap: 16px; }
.bf-locs-title { margin: 0; font-size: 13px; line-height: 20px; font-weight: 700; letter-spacing: 0.3em; text-transform: uppercase; color: var(--heading); }
.bf-locs-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.bf-loc { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 24px; display: flex; flex-direction: column; gap: 12px; background: var(--surface); }
.bf-loc p { margin: 0; }
.bf-loc-head { display: flex; gap: 12px; align-items: center; }
.bf-loc-ic { width: 40px; height: 40px; flex: none; display: flex; align-items: center; justify-content: center; background: var(--surface-brand); color: var(--on-brand); border-radius: var(--radius-sm); }
.bf-loc-n { font-size: 12px; line-height: 18px; font-weight: 700; letter-spacing: 0.25em; text-transform: uppercase; color: var(--ink-muted); }
.bf-loc-name { font-size: 20px; line-height: 28px; color: var(--heading); }
.bf-loc-addr { font-size: 16px; line-height: 24px; }
.bf-loc-route { display: inline-flex; gap: 6px; align-items: center; font-size: 14px; line-height: 20px; font-weight: 700; text-decoration: none; margin-top: auto; }

/* Footer: two locations */
.bf-footer li { align-items: flex-start; }
.bf-footer li > .bf-icon { flex: none; margin-top: 3px; }
.bf-footer-loc strong { display: block; color: var(--on-brand); font-weight: 700; }

/* ---------- Objektliste, Referenzen, Seitenköpfe ---------- */
.bf-list-page, .bf-detail-page { background: var(--surface-alt); padding: var(--space-12) 0 var(--space-24); }
.bf-list-page > .bf-container { display: flex; flex-direction: column; gap: 32px; }
.bf-page-head { background: var(--surface-alt); padding: var(--space-12) 0 var(--space-8); }
.bf-page-plain { background: var(--surface); padding-bottom: var(--space-24); }
.bf-page-title { margin: 12px 0 0; font-size: 40px; line-height: 48px; font-weight: 400; color: var(--heading); }
.bf-page-lead { font-size: 20px; line-height: 32px; color: var(--ink-muted); max-width: 720px; }
.bf-page-lead p { margin: 0; }
.bf-list-page .bf-crumbs + .bf-page-title { margin-top: -20px; }

.bf-tabs-bar { display: flex; flex-wrap: wrap; gap: 16px 32px; align-items: flex-end; justify-content: space-between; border-bottom: 1px solid var(--line); }
.bf-tabs { display: flex; gap: 32px; }
.bf-tab { padding: 12px 0; margin-bottom: -1px; border-bottom: 2px solid transparent; font-size: 14px; line-height: 20px; font-weight: 700; letter-spacing: 0.15em; text-transform: uppercase; text-decoration: none; color: var(--ink-muted); }
.bf-tab:hover { color: var(--heading); }
.bf-tab.is-active { border-bottom-color: var(--heading); color: var(--heading); }
.bf-tabs-count { margin: 0; padding: 12px 0; font-size: 14px; line-height: 20px; color: var(--ink-muted); }

.bf-band { background: var(--surface-brand); color: var(--on-brand); padding: var(--space-16) 0; }
.bf-band-inner { display: flex; flex-wrap: wrap; gap: 32px; align-items: center; justify-content: space-between; }
.bf-band-text { display: flex; flex-direction: column; gap: 8px; max-width: 620px; }
.bf-band-text .bf-overline { margin: 0; color: var(--on-brand-muted); }
.bf-band-text h2 { margin: 0; font-size: 32px; line-height: 40px; font-weight: 400; color: var(--on-brand); }
.bf-band-text p { margin: 0; color: var(--on-brand-muted); }
.bf-band-actions { display: flex; flex-wrap: wrap; gap: 12px; }

.bf-prose { max-width: 760px; }
.bf-prose h2 { font-size: 28px; line-height: 36px; font-weight: 400; color: var(--heading); margin: 40px 0 16px; }
.bf-prose h3 { font-size: 20px; line-height: 28px; font-weight: 700; color: var(--heading); margin: 32px 0 12px; }
.bf-prose p, .bf-prose ul, .bf-prose ol { margin: 0 0 16px; }
.bf-panel.bf-prose { max-width: none; }
.bf-panel.bf-prose h2 { margin-top: 0; }

/* ---------- Objektdetail ---------- */
.bf-detail-head { display: flex; flex-direction: column; gap: 32px; }
.bf-detail-actions { gap: 12px; }
.bf-detail-side { align-self: start; }
@media (min-width: 961px) { .bf-detail-side { position: sticky; top: 24px; } }
.bf-costs { display: grid; grid-template-columns: minmax(0, 1fr) auto; row-gap: 12px; column-gap: 24px; margin: 0; }
.bf-costs dt { color: var(--ink-muted); }
.bf-costs dd { margin: 0; text-align: right; font-weight: 700; color: var(--heading); }
.bf-energy { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px; }
.bf-energy div { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 16px; }
.bf-energy span { display: block; font-size: 14px; line-height: 20px; color: var(--ink-muted); }
.bf-energy strong { font-size: 20px; line-height: 28px; color: var(--heading); }
.bf-mobile-cta { display: none; }

/* ---------- Verkaufen & Vermieten ---------- */
.bf-quote { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 64px; align-items: center; }
.bf-quote-body { display: flex; flex-direction: column; gap: 32px; }
.bf-quote-body .bf-overline, .bf-quote-body .bf-rule { margin: 0; }
.bf-quote-text { margin: 0; font-size: 32px; line-height: 44px; font-weight: 400; color: var(--heading); }
.bf-quote-author { display: flex; gap: 16px; align-items: center; }
.bf-quote-author img { width: 64px; height: 64px; object-fit: cover; object-position: center top; border-radius: var(--radius-sm); flex: none; }
.bf-seal { justify-self: center; width: 280px; height: 280px; border-radius: var(--radius-full); background: var(--surface-brand); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 20px; text-align: center; padding: 40px; box-sizing: border-box; }
.bf-seal p { margin: 0; font-size: 17px; line-height: 24px; color: var(--on-brand); hyphens: auto; }
.bf-seal img { height: 44px; width: auto; }

.bf-service { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; margin-top: var(--space-12); }
.bf-service-item { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 28px 24px; display: flex; flex-direction: column; gap: 12px; }
.bf-service-ic { width: 48px; height: 48px; display: flex; align-items: center; justify-content: center; background: var(--surface-tint); color: var(--heading); border-radius: var(--radius-sm); }
.bf-service-ic .bf-icon { width: 22px; height: 22px; }
.bf-service-item h3 { margin: 0; font-size: 19px; line-height: 27px; font-weight: 700; color: var(--heading); }
.bf-service-item p { margin: 0; font-size: 15px; line-height: 24px; color: var(--ink-muted); }

.bf-valuation { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 64px; align-items: start; }
.bf-valuation-info { display: flex; flex-direction: column; gap: 32px; }
.bf-vform { background: var(--surface); border-radius: var(--radius-sm); padding: 32px; box-shadow: var(--shadow-card); display: flex; flex-direction: column; gap: 24px; }
.bf-vform-title { margin: 0; font-size: 22px; line-height: 30px; font-weight: 700; color: var(--heading); }
.bf-vform-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.bf-form-msg { margin: 0; padding: 12px 16px; border-radius: var(--radius-sm); font-size: 14px; line-height: 22px; }
.bf-form-msg-error { background: var(--danger-soft); color: var(--danger); }
.bf-form-done { scroll-margin-top: 24px; }

.bf-faq-wrap { max-width: 860px; }
.bf-faq { margin-top: var(--space-12); border-top: 1px solid var(--line); }
.bf-faq details { border-bottom: 1px solid var(--line); padding: 20px 0; }
.bf-faq summary { cursor: pointer; font-size: 18px; line-height: 28px; font-weight: 700; color: var(--heading); }
.bf-faq details > div { margin-top: 12px; color: var(--ink-muted); }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
	.bf-service { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 960px) {
	.bf-usp { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
}
@media (max-width: 640px) {
	.bf-hero { min-height: 0; }
	.bf-hero-inner { padding: 64px 16px; width: 100%; box-sizing: border-box; min-width: 0; }
	.bf-hero-home .bf-hero-inner { padding-bottom: 144px; }
	.bf-hero-title { font-size: 28px; line-height: 36px; hyphens: auto; overflow-wrap: break-word; }
	.bf-hero-sub { font-size: 18px; line-height: 28px; }
	.bf-hero-actions .bf-btn { width: 100%; }

	.bf-usp { grid-template-columns: 1fr; gap: 12px; }
	.bf-usp-item { display: grid; grid-template-columns: 48px minmax(0, 1fr); column-gap: 16px; row-gap: 4px; padding: 20px 16px; }
	.bf-usp-ic { grid-row: 1 / span 2; width: 48px; height: 48px; }
	.bf-usp-item h3 { font-size: 18px; line-height: 26px; }

	.bf-path { padding: 32px 24px; }
	.bf-step-line { display: none; }
	.bf-service { grid-template-columns: 1fr; }
	.bf-quote-text { font-size: 26px; line-height: 36px; }
	.bf-seal { width: 240px; height: 240px; }
	.bf-page-title { font-size: 32px; line-height: 40px; }
	.bf-about-title { font-size: 30px; line-height: 38px; }
	.bf-tabs { gap: 24px; }
	.bf-vform { padding: 24px 16px; }

	/* Sticky call/request bar on property detail pages. */
	.bf-mobile-cta { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; padding: 8px 12px calc(8px + env(safe-area-inset-bottom, 0px)); background: var(--surface); box-shadow: 0 -4px 16px rgba(0, 20, 109, 0.12); }
	.bf-mobile-cta .bf-btn { justify-content: center; }
	body:has(.bf-mobile-cta) .bf-footer { padding-bottom: 72px; }
}
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
}

/* ---------- Footer always at the bottom on short pages ---------- */
body { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; }
body > main#inhalt { flex: 1 0 auto; }
body > .bf-header, body > .bf-footer { flex-shrink: 0; }
body.admin-bar { min-height: calc(100vh - 32px); min-height: calc(100dvh - 32px); }
@media (max-width: 782px) { body.admin-bar { min-height: calc(100vh - 46px); min-height: calc(100dvh - 46px); } }

.bf-ref-actions { display: flex; flex-direction: column; gap: 12px; }
