/**
 * Single house detail page (single-house.php).
 *
 * Ported from the Claude Design prototype "Hausdetail Select 157"
 * (src-v2/detail-*.jsx), whose layout lives in inline style objects — those are
 * reconstructed here as classes. The shared layer (design tokens, .wrap, .btn,
 * .chip, .eyebrow, .h-display, .iconbtn) comes from assets/css/global.css, which
 * this file is enqueued against; only the page's own deltas live here.
 *
 * Blocks follow the section order of the template:
 *   1 fmt-house-hero
 *   2 fmt-house-merkmale
 *   3 fmt-house-grundriss
 *   4 fmt-house-galerie  (+ fmt-house-lightbox)
 *   5 fmt-house-rundgang
 *   6 fmt-house-referenz
 *   7 fmt-house-crosssell     (pending)
 *   8 fmt-house-kontakt       (pending)
 *
 * Plus fmt-house-sticky, the fixed price-request CTA — page chrome, not a
 * section, so it sits at the end of the section blocks, and fmt-gate, which
 * wraps whole sections on exclusive houses (includes/exclusive.php).
 *
 * Responsive rules are grouped at the end of the file.
 */

/* =========================================================
   Shared: "Genau Mein Haus" signet
   ========================================================= */

/*
 * The seal the design lays over hero and reference photos. Square, contained
 * and lifted off the image by a soft drop shadow; each placement sets its own
 * size and corner.
 */
.fmt-house-badge {
	display: block;
	aspect-ratio: 1 / 1;
	object-fit: contain;
	box-shadow: 0 10px 26px -12px rgba(20, 18, 12, .45);
}

/* =========================================================
   Shared: Exklusiv gate
   ========================================================= */

/*
 * The gate (src-v2/detail-app.jsx → ExclusiveGate) wraps a whole section on a
 * house flagged exclusive: the section blurs and an invitation card sits over
 * it. Used on Grundriss and the 360° tour, so it lives up here with the signet
 * rather than inside either section's block.
 *
 * The card comes first in the markup and is lifted on top by the panel, so the
 * way out of the gate is what a screen reader reads; the blurred part is
 * aria-hidden and inert.
 */
.fmt-gate {
	position: relative;
}
.fmt-gate__content {
	overflow: hidden;
	filter: blur(7px);
	pointer-events: none;
	user-select: none;
}
.fmt-gate__panel {
	position: absolute;
	inset: 0;
	z-index: 5;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 48px 24px;
}
.fmt-gate__card {
	/*
	 * The design centres the card in its section, which works for the sections it
	 * gates in a 1440px mock-up but not for a Grundriss with four storeys — there
	 * the centre of the section is a screen and a half below its top. Sticky keeps
	 * the card where the design puts it and then holds it in view while the
	 * blurred section scrolls past, instead of letting the visitor scroll into a
	 * blurred nowhere.
	 */
	position: sticky;
	top: 120px;
	max-width: 440px;
	padding: 32px 36px;
	border: 1px solid var(--line);
	border-radius: var(--radius-lg);
	background: rgba(255, 255, 255, .94);
	box-shadow: var(--shadow-pop);
	text-align: center;
}
.fmt-gate__icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 50px;
	height: 50px;
	margin: 0 auto 18px;
	border-radius: 50%;
	background: var(--ink);
	color: #fff;
}
.fmt-gate__eyebrow {
	margin-bottom: 10px;
}
.fmt-gate__title {
	margin: 0 0 10px;
	font-size: 23px;
	font-weight: 500;
	letter-spacing: -0.015em;
}
.fmt-gate__text {
	margin: 0 0 22px;
	font-size: 15px;
	line-height: 1.55;
	color: var(--ink-soft);
}
/* The label sits centred under a centred card, so the button fills the width the
   card gives it rather than hugging its text. */
.fmt-gate__btn {
	justify-content: center;
	width: 100%;
}

/* =========================================================
   1 · Hero
   ========================================================= */

.fmt-house-hero {
	background: var(--bg);
	padding: 28px 0 56px;
}

/*
 * The hero is one named grid. Desktop puts the price-request CTA beside the
 * headline, the mobile design puts it below the intro text over the full width
 * — named areas serve both from a single button in the markup, which is why the
 * markup order follows the phone layout.
 *
 * The shared .wrap keeps supplying max-width and gutters; this only adds the
 * layout on top of it, scoped to the hero.
 *
 * The design splits the headline row 1.4fr / 1fr, sized for short model names.
 * The actions only need the width of their buttons, so they get exactly that
 * and the headline takes the rest — long titles would otherwise break onto
 * three or four lines. Media and intro span both columns and are unaffected.
 */
.fmt-house-hero > .wrap {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	column-gap: 64px;
	grid-template-areas:
		"breadcrumb breadcrumb"
		"titles     actions"
		"media      media"
		"intro      intro";
}
.fmt-house-hero__breadcrumb {
	grid-area: breadcrumb;
}
.fmt-house-hero__titles {
	grid-area: titles;
}
.fmt-house-hero__actions {
	grid-area: actions;
}
.fmt-house-hero__media {
	grid-area: media;
}
.fmt-house-hero__intro {
	grid-area: intro;
}

/* Breadcrumb */
.fmt-house-hero__breadcrumb {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 24px;
	font-size: 12px;
	color: var(--ink-mute);
}
.fmt-house-hero__breadcrumb a {
	color: var(--ink-soft);
}
.fmt-house-hero__breadcrumb a:hover {
	color: var(--red);
}
.fmt-house-hero__breadcrumb-current {
	color: var(--ink);
}

/* Headline block */
.fmt-house-hero__eyebrow {
	margin-bottom: 14px;
}
/* Larger than the shared .h-display default, per the design. No max-width:
   the design's 760px cap is what pushed long titles onto extra lines. */
.fmt-house-hero__title {
	font-size: 76px;
	line-height: .95;
	text-wrap: balance;
}
/* Bottom-aligned with the headline it sits next to. */
.fmt-house-hero__actions {
	display: flex;
	align-items: center;
	gap: 12px;
	align-self: end;
	justify-self: end;
	padding-bottom: 8px;
}

/* Image stack — one large stage plus two stacked detail tiles */
.fmt-house-hero__media {
	display: grid;
	grid-template-columns: 2.2fr 1fr;
	gap: 16px;
	margin-top: 32px;
}
.fmt-house-hero__stage {
	position: relative;
	margin: 0;
	aspect-ratio: 16 / 10;
	border-radius: 16px;
	overflow: hidden;
	box-shadow: var(--shadow-card);
	background: var(--bg-3);
}
.fmt-house-hero__stage-img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}
.fmt-house-hero__tiles {
	display: grid;
	grid-template-rows: 1fr 1fr;
	gap: 16px;
}
.fmt-house-hero__tile {
	position: relative;
	margin: 0;
	border-radius: 16px;
	overflow: hidden;
	box-shadow: var(--shadow-card);
	background: var(--bg-3);
}
/*
 * Taken out of the flow so the photo never sizes its tile. On desktop the
 * tiles have no aspect ratio of their own and share the stage's height; an
 * in-flow portrait or square photo would stretch them past it instead and
 * leave a gap under the stage. Below 900px the tiles carry an aspect ratio.
 */
.fmt-house-hero__tile-img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* Signet — top left of the stage */
.fmt-house-hero__signet {
	position: absolute;
	left: 20px;
	top: 20px;
	z-index: 2;
	width: 64px;
	height: 64px;
}

/* Floating price plate — bottom left of the stage */
.fmt-house-hero__price {
	position: absolute;
	left: 22px;
	bottom: 22px;
	display: flex;
	flex-direction: column;
	gap: 2px;
	padding: 14px 18px;
	border-radius: 8px;
	background: rgba(255, 255, 255, .96);
	backdrop-filter: blur(8px);
	box-shadow: var(--shadow-card);
}
.fmt-house-hero__price-label {
	font-size: 10px;
	letter-spacing: .15em;
	text-transform: uppercase;
	color: var(--ink-mute);
}
.fmt-house-hero__price-value {
	font-size: 20px;
	font-weight: 500;
	letter-spacing: -0.01em;
	color: var(--ink);
}
/* Signed-out state: the amount stays in the DOM but is unreadable. */
.fmt-house-hero__price-value--locked {
	filter: blur(5px);
	user-select: none;
}
.fmt-house-hero__price-note {
	display: flex;
	align-items: center;
	gap: 4px;
	font-size: 11px;
	color: var(--ink-soft);
}
.fmt-house-hero__price-note .icon {
	color: var(--red);
}

/* 360° badge — top right, jumps to the tour section */
.fmt-house-hero__tour {
	position: absolute;
	right: 22px;
	top: 22px;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 10px 14px;
	border-radius: 999px;
	background: rgba(20, 18, 12, .84);
	backdrop-filter: blur(8px);
	color: #fff;
	font-size: 12px;
	font-weight: 500;
	letter-spacing: .02em;
	transition: background .2s ease;
}
.fmt-house-hero__tour:hover {
	background: rgba(20, 18, 12, .94);
	color: #fff;
}

/* Image counter — bottom right, jumps to the gallery */
.fmt-house-hero__count {
	position: absolute;
	right: 22px;
	bottom: 22px;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 6px 12px;
	border-radius: 999px;
	background: rgba(20, 18, 12, .7);
	color: #fff;
	font-size: 12px;
	transition: background .2s ease;
}
.fmt-house-hero__count:hover {
	background: rgba(20, 18, 12, .9);
	color: #fff;
}
.fmt-house-hero__count .arr {
	transition: transform .2s ease;
}
.fmt-house-hero__count:hover .arr {
	transform: translateX(3px);
}

/* Intro — label column plus the single marketing text block */
.fmt-house-hero__intro {
	display: grid;
	grid-template-columns: 1fr 1.6fr;
	gap: 64px;
	align-items: start;
	margin-top: 56px;
}
.fmt-house-hero__intro-eyebrow {
	padding-top: 8px;
}
.fmt-house-hero__intro-text {
	max-width: 760px;
	font-size: 16px;
	line-height: 1.6;
	letter-spacing: -0.01em;
	color: var(--ink);
	text-wrap: pretty;
}
/* the_content() emits paragraphs; the design shows one flush block. */
.fmt-house-hero__intro-text > :first-child {
	margin-top: 0;
}
.fmt-house-hero__intro-text > :last-child {
	margin-bottom: 0;
}

/* =========================================================
   2 · Merkmale
   ========================================================= */

.fmt-house-merkmale {
	background: var(--bg);
	padding: 0 0 16px;
}
.fmt-house-merkmale__eyebrow {
	margin-bottom: 18px;
}

/*
 * One card, cells divided by hairlines. The design hardcodes
 * repeat(items.length, 1fr); auto-flow column reaches the same equal split
 * without the count having to reach the markup, so a house with three filled
 * attributes lays out just as well as one with four.
 */
.fmt-house-merkmale__box {
	display: grid;
	grid-auto-flow: column;
	grid-auto-columns: 1fr;
	background: var(--paper);
	border: 1px solid var(--line);
	border-radius: 16px;
	box-shadow: var(--shadow-card);
	overflow: hidden;
}
.fmt-house-merkmale__cell {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 10px;
	padding: 26px 18px 24px;
	text-align: center;
}
/* Equivalent to the design's border-right-on-all-but-last. */
.fmt-house-merkmale__cell + .fmt-house-merkmale__cell {
	border-left: 1px solid var(--line);
}
.fmt-house-merkmale__icon-wrap {
	width: 40px;
	height: 40px;
	color: var(--ink-2);
}
.fmt-house-merkmale__icon {
	display: block;
	width: 100%;
	height: 100%;
}
.fmt-house-merkmale__value {
	font-size: 16px;
	font-weight: 500;
	letter-spacing: -0.005em;
	color: var(--ink);
	font-variant-numeric: tabular-nums;
}
.fmt-house-merkmale__label {
	font-size: 11px;
	line-height: 1.3;
	text-transform: uppercase;
	letter-spacing: .1em;
	color: var(--ink-mute);
}

/* =========================================================
   3 · Grundriss
   ========================================================= */

.fmt-house-grundriss {
	background: var(--bg);
	padding: 104px 0 88px;
}
.fmt-house-grundriss__head {
	margin-bottom: 36px;
}
.fmt-house-grundriss__eyebrow {
	margin-bottom: 14px;
}
.fmt-house-grundriss__title {
	max-width: 760px;
}

/* Floor chips left, overall living area right */
.fmt-house-grundriss__bar {
	display: flex;
	justify-content: space-between;
	align-items: center;
	flex-wrap: wrap;
	gap: 12px;
	margin-bottom: 28px;
}
.fmt-house-grundriss__tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}
.fmt-house-grundriss__total {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 13px;
	color: var(--ink-soft);
}
.fmt-house-grundriss__total strong {
	font-weight: 500;
	color: var(--ink);
	font-variant-numeric: tabular-nums;
}

/*
 * Plan card left, room table and CTA stacked in the column right of it. Each
 * floor's plan card and room table occupies the same slot; only the pair
 * carrying .is-active is displayed. The CTA is identical for every floor and
 * therefore rendered once, below the table.
 *
 * align-self keeps the right column at its content height rather than being
 * stretched to the plan card: a floor with fewer rooms gets a shorter table and
 * the CTA moves up with it.
 */
.fmt-house-grundriss__body {
	display: grid;
	grid-template-columns: 1.4fr 1fr;
	column-gap: 28px;
}
/* Placed explicitly: all plan cards share one slot and overlap, but only the
   active one is displayed, so the column never depends on which floor is open. */
.fmt-house-grundriss__plan {
	grid-column: 1;
	grid-row: 1;
}
.fmt-house-grundriss__side {
	grid-column: 2;
	grid-row: 1;
	display: flex;
	flex-direction: column;
	gap: 24px;
	align-self: start;
}
.fmt-house-grundriss__plan,
.fmt-house-grundriss__rooms {
	display: none;
}
.fmt-house-grundriss__plan.is-active {
	display: flex;
}
.fmt-house-grundriss__rooms.is-active {
	display: block;
}

/* Plan card */
.fmt-house-grundriss__plan {
	flex-direction: column;
	gap: 12px;
	padding: 26px 28px 16px;
	background: var(--paper);
	border: 1px solid var(--line);
	border-radius: 16px;
	box-shadow: var(--shadow-card);
}
.fmt-house-grundriss__plan-head {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 16px;
}
.fmt-house-grundriss__plan-label {
	margin-bottom: 4px;
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: .15em;
	color: var(--ink-mute);
}
.fmt-house-grundriss__plan-name {
	font-size: 22px;
	font-weight: 500;
	letter-spacing: -0.015em;
}
.fmt-house-grundriss__plan-expand {
	flex-shrink: 0;
}
/* On this width the caption carries the floor total, so the head copy is off. */
.fmt-house-grundriss__plan-total {
	display: none;
}
/* The plan fills the card and pushes the caption to the bottom edge. */
.fmt-house-grundriss__plan-figure {
	flex: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 380px;
	padding: 8px 4px;
}
/* Scales to the card width, exactly as the design sizes its plan. */
.fmt-house-grundriss__plan-img {
	width: 100%;
	height: auto;
}
.fmt-house-grundriss__plan-caption {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 16px;
	padding-top: 12px;
	border-top: 1px solid var(--line);
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: .12em;
	color: var(--ink-mute);
}

/* Room table — Netto-Raumfläche nach DIN 277 */
.fmt-house-grundriss__rooms {
	padding: 20px 24px;
	background: var(--paper);
	border: 1px solid var(--line);
	border-radius: 16px;
}
.fmt-house-grundriss__rooms-head {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 12px;
	margin-bottom: 14px;
}
.fmt-house-grundriss__rooms-title {
	margin: 0;
	font-size: 15px;
	font-weight: 500;
}
.fmt-house-grundriss__rooms-floor {
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: .1em;
	color: var(--ink-mute);
	white-space: nowrap;
}
.fmt-house-grundriss__rooms-list {
	list-style: none;
	margin: 0;
	padding: 0;
}
.fmt-house-grundriss__room {
	display: flex;
	justify-content: space-between;
	gap: 16px;
	padding: 10px 0;
	font-size: 14px;
}
.fmt-house-grundriss__room + .fmt-house-grundriss__room {
	border-top: 1px solid var(--line);
}
.fmt-house-grundriss__room-area {
	color: var(--ink-soft);
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}
/* The sum sits under a heavier rule and carries the value in full colour.
   Same specificity as the hairline rule above, so file order decides. */
.fmt-house-grundriss__room--total {
	margin-top: 2px;
	padding: 14px 0 4px;
	font-weight: 600;
}
.fmt-house-grundriss__room + .fmt-house-grundriss__room--total {
	border-top: 2px solid var(--ink-2);
}
.fmt-house-grundriss__room--total .fmt-house-grundriss__room-area {
	color: inherit;
}

/* Dark sub-CTA — the "every plan is only a proposal" note */
.fmt-house-grundriss__cta {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 18px 22px;
	border-radius: 16px;
	background: var(--ink-2);
	color: #fff;
}
.fmt-house-grundriss__cta-label {
	margin-bottom: 4px;
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: .12em;
	color: rgba(255, 255, 255, .6);
}
.fmt-house-grundriss__cta-text {
	font-size: 14px;
	color: rgba(255, 255, 255, .92);
}
.fmt-house-grundriss__cta-btn {
	flex-shrink: 0;
}

/* =========================================================
   4 · Galerie
   ========================================================= */

.fmt-house-galerie {
	background: var(--bg-2);
	padding: 104px 0 96px;
}
.fmt-house-galerie__head {
	display: flex;
	justify-content: space-between;
	align-items: flex-end;
	flex-wrap: wrap;
	gap: 36px;
	margin-bottom: 32px;
}
.fmt-house-galerie__eyebrow {
	margin-bottom: 14px;
}
.fmt-house-galerie__title {
	max-width: 760px;
}
.fmt-house-galerie__lead {
	max-width: 360px;
	margin: 0;
	font-size: 15px;
	color: var(--ink-soft);
}

/* Two columns of fixed-height tiles */
.fmt-house-galerie__grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	grid-auto-rows: 260px;
	gap: 14px;
}
/*
 * Preview cap. Everything is in the markup; these rules decide how much of it
 * shows until the toggle sets .is-expanded — four tiles here, six on phones.
 */
.fmt-house-galerie__grid:not(.is-expanded) .fmt-house-galerie__tile:nth-child(n+5) {
	display: none;
}
.fmt-house-galerie__tile {
	position: relative;
	padding: 0;
	border: 1px solid var(--line);
	border-radius: 12px;
	overflow: hidden;
	background: var(--bg-3);
	cursor: pointer;
	transition: transform .25s ease, box-shadow .25s ease;
}
.fmt-house-galerie__tile:hover {
	transform: scale(1.01);
	box-shadow: 0 18px 40px -20px rgba(20, 18, 12, .25);
}
.fmt-house-galerie__tile-img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/*
 * Expand / collapse. SimpleGallery has no toggle — it caps hard at four — so
 * the placement follows the design's other desktop galleries, which centre it
 * 32px below the grid (ReferenzGallery, MassivGalleryCategory).
 */
.fmt-house-galerie__toggle-row {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 14px;
	margin-top: 32px;
}
.fmt-house-galerie__toggle-icon {
	display: inline-flex;
}
.fmt-house-galerie__toggle[aria-expanded="true"] .fmt-house-galerie__toggle-icon--more,
.fmt-house-galerie__toggle[aria-expanded="false"] .fmt-house-galerie__toggle-icon--less {
	display: none;
}

/* =========================================================
   5 · 360°-Rundgang
   ========================================================= */

.fmt-house-rundgang {
	background: var(--bg);
	padding: 104px 0;
}
.fmt-house-rundgang__head {
	display: flex;
	justify-content: space-between;
	align-items: flex-end;
	flex-wrap: wrap;
	gap: 36px;
	margin-bottom: 36px;
}
.fmt-house-rundgang__eyebrow {
	margin-bottom: 14px;
}
.fmt-house-rundgang__title {
	max-width: 720px;
}
.fmt-house-rundgang__lead {
	max-width: 360px;
	margin: 0;
	font-size: 15px;
	color: var(--ink-soft);
}

/* Switch buttons, only rendered when a house has a second tour. */
.fmt-house-rundgang__tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 20px;
}

/*
 * The facade. Until the visitor presses play this is a poster, a gradient and a
 * button; the iframe is inserted on top and .is-playing takes the rest away.
 */
.fmt-house-rundgang__stage {
	position: relative;
	aspect-ratio: 16 / 8;
	border-radius: 16px;
	overflow: hidden;
	box-shadow: var(--shadow-pop);
	background: var(--bg-3);
}
.fmt-house-rundgang__poster {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}
/* Darkens towards the bottom so the info plate keeps its contrast. */
.fmt-house-rundgang__stage::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
	background: linear-gradient(180deg, rgba(0, 0, 0, .05) 0%, rgba(0, 0, 0, .35) 100%);
}
.fmt-house-rundgang__play {
	position: absolute;
	top: 50%;
	left: 50%;
	z-index: 2;
	transform: translate(-50%, -50%);
	display: flex;
	align-items: center;
	justify-content: center;
	width: 88px;
	height: 88px;
	padding: 0;
	border: none;
	border-radius: 50%;
	background: rgba(255, 255, 255, .96);
	color: var(--ink);
	cursor: pointer;
	box-shadow: 0 20px 50px -10px rgba(0, 0, 0, .4);
	transition: transform .2s ease, background .2s ease;
}
.fmt-house-rundgang__play:hover {
	transform: translate(-50%, -50%) scale(1.05);
	background: #fff;
}
.fmt-house-rundgang__plate {
	position: absolute;
	left: 24px;
	bottom: 24px;
	z-index: 2;
	max-width: 360px;
	padding: 14px 18px;
	border-radius: 8px;
	background: rgba(20, 18, 12, .74);
	backdrop-filter: blur(8px);
	color: #fff;
}
.fmt-house-rundgang__plate-label {
	margin-bottom: 4px;
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: .12em;
	opacity: .7;
}
.fmt-house-rundgang__plate-title {
	font-size: 16px;
	font-weight: 500;
}

/* Playing: the tour owns the stage. */
.fmt-house-rundgang__frame {
	position: absolute;
	inset: 0;
	z-index: 3;
	width: 100%;
	height: 100%;
	border: 0;
}
.fmt-house-rundgang__stage.is-playing::after,
.fmt-house-rundgang__stage.is-playing .fmt-house-rundgang__poster,
.fmt-house-rundgang__stage.is-playing .fmt-house-rundgang__play,
.fmt-house-rundgang__stage.is-playing .fmt-house-rundgang__plate {
	display: none;
}

/* =========================================================
   6 · Referenz-Hinweis
   ========================================================= */

.fmt-house-referenz {
	background: var(--bg-2);
	padding: 72px 0;
}
/*
 * Copy left, photo right — and stacked the other way round on phones, where the
 * design leads with the image. Named areas do that swap, so the markup can keep
 * the heading and the link first for reading order.
 */
.fmt-house-referenz__card {
	display: grid;
	grid-template-columns: 1.15fr 1fr;
	grid-template-areas: "body media";
	background: var(--paper);
	border: 1px solid var(--line);
	border-radius: 16px;
	overflow: hidden;
	box-shadow: var(--shadow-card);
}
.fmt-house-referenz__body {
	grid-area: body;
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 14px;
	padding: 38px 42px;
}
/* Its own scale, not the shared .h-display. */
.fmt-house-referenz__title {
	margin: 0;
	font-size: 30px;
	font-weight: 500;
	line-height: 1.12;
	letter-spacing: -0.015em;
}
.fmt-house-referenz__title em {
	font-style: italic;
	font-weight: 400;
	color: var(--em);
}
.fmt-house-referenz__text {
	max-width: 460px;
	margin: 0;
	font-size: 15px;
	line-height: 1.6;
	color: var(--ink-soft);
}
.fmt-house-referenz__actions {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 14px;
	margin-top: 4px;
}
.fmt-house-referenz__note {
	font-size: 12px;
	color: var(--ink-mute);
}

/* Photo half — overlay chrome sits above a bottom-weighted gradient */
.fmt-house-referenz__media {
	grid-area: media;
	position: relative;
	min-height: 250px;
}
.fmt-house-referenz__img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}
.fmt-house-referenz__media::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
	background: linear-gradient(180deg, rgba(0, 0, 0, 0) 50%, rgba(0, 0, 0, .5) 100%);
}
/* Signet top right, the "Bereits gebaut" chip top left. */
.fmt-house-referenz__signet {
	position: absolute;
	top: 16px;
	right: 16px;
	z-index: 2;
	width: 64px;
	height: 64px;
}
.fmt-house-referenz__badge {
	position: absolute;
	top: 18px;
	left: 18px;
	z-index: 2;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 7px 13px;
	border-radius: 999px;
	background: rgba(255, 255, 255, .94);
	backdrop-filter: blur(6px);
	color: var(--ink);
	font-size: 11px;
	font-weight: 500;
	text-transform: uppercase;
	letter-spacing: .1em;
}
.fmt-house-referenz__badge .icon {
	color: var(--red);
}
.fmt-house-referenz__caption {
	position: absolute;
	left: 20px;
	bottom: 18px;
	z-index: 2;
	color: #fff;
}
.fmt-house-referenz__caption-title {
	font-size: 18px;
	font-weight: 500;
}

/* =========================================================
   Lightbox — shared by the gallery, rendered once
   ========================================================= */

.fmt-house-lightbox {
	position: fixed;
	inset: 0;
	z-index: 200;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 40px;
	background: rgba(20, 18, 12, .88);
	backdrop-filter: blur(6px);
}
/* [hidden] alone loses to display:flex, so it is spelled out. */
.fmt-house-lightbox[hidden] {
	display: none;
}
.fmt-house-lightbox__img {
	max-width: 86vw;
	max-height: 80vh;
	border-radius: var(--radius);
	box-shadow: var(--shadow-pop);
}

/* Caption left, position strip right — both clear of the image */
.fmt-house-lightbox__info {
	position: absolute;
	left: 40px;
	right: 40px;
	bottom: 32px;
	display: flex;
	justify-content: space-between;
	align-items: flex-end;
	gap: 24px;
	color: #fff;
	pointer-events: none;
}
.fmt-house-lightbox__eyebrow {
	margin-bottom: 6px;
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: .14em;
	opacity: .65;
}
.fmt-house-lightbox__caption {
	font-size: 18px;
	font-weight: 500;
}
.fmt-house-lightbox__caption:empty {
	display: none;
}
.fmt-house-lightbox__dots {
	display: flex;
	flex-shrink: 0;
	gap: 4px;
}
.fmt-house-lightbox__dot {
	width: 8px;
	height: 4px;
	border-radius: 999px;
	background: rgba(255, 255, 255, .3);
	transition: width .2s ease;
}
.fmt-house-lightbox__dot.is-current {
	width: 22px;
	background: #fff;
}

/* Close and prev/next share the translucent circle treatment */
.fmt-house-lightbox__close,
.fmt-house-lightbox__nav {
	position: absolute;
	display: flex;
	align-items: center;
	justify-content: center;
	border: none;
	border-radius: 50%;
	background: rgba(255, 255, 255, .12);
	color: #fff;
	cursor: pointer;
	transition: background .15s ease;
}
.fmt-house-lightbox__close:hover,
.fmt-house-lightbox__nav:hover {
	background: rgba(255, 255, 255, .22);
}
.fmt-house-lightbox__close {
	top: 24px;
	right: 24px;
	width: 40px;
	height: 40px;
}
.fmt-house-lightbox__nav {
	top: 50%;
	width: 48px;
	height: 48px;
	transform: translateY(-50%);
}
.fmt-house-lightbox__nav--prev {
	left: 24px;
}
.fmt-house-lightbox__nav--next {
	right: 24px;
}
/* A single image needs no navigation. */
.fmt-house-lightbox--single .fmt-house-lightbox__nav,
.fmt-house-lightbox--single .fmt-house-lightbox__dots {
	display: none;
}

/* =========================================================
   Sticky Preisanfrage — page chrome
   ========================================================= */

/*
 * Corner stack bottom right, primary action on top. Parked out of frame until
 * .is-visible arrives, and non-interactive while parked so it cannot swallow
 * clicks meant for the page.
 */
.fmt-house-sticky {
	position: fixed;
	right: 22px;
	bottom: 22px;
	z-index: 80;
	display: flex;
	flex-direction: column;
	gap: 10px;
	transform: translateY(140%);
	transition: transform .3s ease;
	pointer-events: none;
}
.fmt-house-sticky.is-visible {
	transform: translateY(0);
	pointer-events: auto;
}
.fmt-house-sticky__request {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	padding: 14px 22px;
	border-radius: 6px;
	background: var(--red);
	color: #fff;
	font-size: 14px;
	font-weight: 500;
	box-shadow: 0 18px 36px -10px rgba(227, 0, 15, .55), 0 4px 12px -4px rgba(0, 0, 0, .2);
	transition: transform .15s ease;
}
.fmt-house-sticky__request:hover {
	transform: translateY(-2px);
	color: #fff;
}
.fmt-house-sticky__phone {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 10px 16px;
	border: 1px solid var(--line);
	border-radius: 6px;
	background: rgba(255, 255, 255, .96);
	backdrop-filter: blur(6px);
	color: var(--ink);
	font-size: 13px;
	font-weight: 500;
	box-shadow: 0 8px 20px -8px rgba(0, 0, 0, .18);
}
.fmt-house-sticky__phone .icon {
	color: var(--red);
}

/* Set on the body while the lightbox is open, so the page cannot scroll behind
   the overlay. Lives here rather than as an inline style from the script. */
.fmt-house-lightbox-open {
	overflow: hidden;
}

/* The design does not gate its motion; production should. */
@media (prefers-reduced-motion: reduce) {
	.fmt-house-sticky,
	.fmt-house-sticky__request,
	.fmt-house-galerie__tile,
	.fmt-house-lightbox__dot {
		transition: none;
	}
}

/* =========================================================
   Responsive

   The design has no responsive layer: desktop is authored at a fixed 1440px
   viewport, and the phone layout is a separate component tree
   (src-v2/mobile-detail.jsx) capped at 460px with a 20px gutter.

   So the breakpoints below split into two kinds:
   · up to 680px  — values taken from the mobile design
   · 1100/900px   — the tablet range, which the design does not cover at all;
                    these are our own, bridging the two authored layouts
   ========================================================= */

/* --- Tablet range · not covered by the design ------------- */

@media (max-width: 1100px) {
	/* global.css scales .h-display to 48px here; the hero sits one step above. */
	.fmt-house-hero__title {
		font-size: 58px;
	}
	.fmt-house-hero > .wrap {
		column-gap: 40px;
	}
	.fmt-house-hero__intro {
		gap: 40px;
	}

	/*
	 * The Grundriss CTA lives in the narrow right column, which shrinks to about
	 * 344px just before the section goes single-column — too little for the note
	 * and the button side by side. Stacking starts here so the transition runs
	 * one way: row → stacked → stacked full-width, never back.
	 */
	.fmt-house-grundriss__cta {
		flex-direction: column;
		align-items: flex-start;
		gap: 14px;
	}
}

@media (max-width: 900px) {
	/*
	 * Single column. The CTA takes up the position the mobile design gives it —
	 * below the intro text — but stays at its own width until the phone layout.
	 */
	.fmt-house-hero > .wrap {
		grid-template-columns: 1fr;
		grid-template-areas:
			"breadcrumb"
			"titles"
			"media"
			"intro"
			"actions";
	}
	.fmt-house-hero__actions {
		justify-self: start;
		padding-bottom: 0;
		margin-top: 28px;
	}
	/* Stage goes full width, the two detail tiles sit side by side below it. */
	.fmt-house-hero__media {
		grid-template-columns: 1fr;
	}
	.fmt-house-hero__tiles {
		grid-template-rows: none;
		grid-template-columns: 1fr 1fr;
	}
	.fmt-house-hero__tile {
		aspect-ratio: 4 / 3;
	}
	.fmt-house-hero__intro {
		grid-template-columns: 1fr;
		gap: 16px;
		margin-top: 40px;
	}
	.fmt-house-hero__intro-eyebrow {
		padding-top: 0;
	}

	/* Plan card above the table column; the second grid column is dropped, so
	   both get an explicit row to sit in. */
	.fmt-house-grundriss {
		padding: 72px 0 64px;
	}
	.fmt-house-grundriss__body {
		grid-template-columns: 1fr;
		row-gap: 24px;
	}
	.fmt-house-grundriss__plan {
		grid-column: 1;
		grid-row: 1;
	}
	.fmt-house-grundriss__side {
		grid-column: 1;
		grid-row: 2;
	}
	.fmt-house-grundriss__plan-figure {
		min-height: 280px;
	}

	.fmt-house-galerie {
		padding: 72px 0 64px;
	}
	.fmt-house-galerie__grid {
		grid-auto-rows: 220px;
	}

	.fmt-house-rundgang {
		padding: 72px 0;
	}
}

/* --- Phone · values from the mobile design ---------------- */

@media (max-width: 680px) {
	/* The mobile design's .mwrap gutter, narrower than global.css's 24px. */
	.fmt-house .wrap {
		padding: 0 20px;
	}

	/* Gate — src-v2/mobile-detail-app.jsx → MExclusiveGate: same card, one step
	   tighter, and the header is short enough here to sit closer to the top. */
	.fmt-gate__panel {
		padding: 32px 20px;
	}
	.fmt-gate__card {
		top: 88px;
		padding: 28px 24px;
	}
	.fmt-gate__icon {
		width: 48px;
		height: 48px;
		margin-bottom: 16px;
	}
	.fmt-gate__title {
		font-size: 21px;
	}
	.fmt-gate__text {
		margin-bottom: 20px;
		font-size: 14px;
	}

	/* Hero */
	.fmt-house-hero {
		padding: 14px 0 40px;
	}
	.fmt-house-hero__breadcrumb {
		margin-bottom: 14px;
	}
	.fmt-house-hero__title {
		font-size: 38px;
	}
	.fmt-house-hero__media {
		gap: 12px;
	}
	.fmt-house-hero__stage {
		aspect-ratio: 4 / 3;
	}
	.fmt-house-hero__tiles {
		gap: 12px;
	}
	/* Square tiles on a smaller radius than the stage above them. */
	.fmt-house-hero__tile {
		aspect-ratio: 1 / 1;
		border-radius: 14px;
	}
	.fmt-house-hero__signet {
		left: 16px;
		top: 16px;
		width: 54px;
		height: 54px;
	}
	.fmt-house-hero__price {
		left: 16px;
		bottom: 16px;
		padding: 12px 16px;
		border-radius: 10px;
	}
	.fmt-house-hero__price-value {
		font-size: 19px;
	}
	.fmt-house-hero__tour {
		right: 16px;
		top: 16px;
		padding: 9px 13px;
	}
	/* The badge shortens to "360°" — there is no room for the word. */
	.fmt-house-hero__tour-word {
		display: none;
	}
	.fmt-house-hero__count {
		right: 16px;
		bottom: 16px;
	}
	.fmt-house-hero__count .arr {
		display: none;
	}
	.fmt-house-hero__intro {
		gap: 12px;
		margin-top: 28px;
	}
	.fmt-house-hero__intro-text {
		font-size: 15.5px;
	}
	/* Full-width CTA closing the hero. */
	.fmt-house-hero__actions {
		justify-self: stretch;
		margin-top: 22px;
	}
	.fmt-house-hero__actions .btn {
		width: 100%;
		justify-content: center;
	}

	/*
	 * Merkmale — the mobile design lays these out 2×2 with a right hairline on
	 * even indices and a top hairline from the third cell. Expressed here as a
	 * left hairline on every second cell, which draws the same lines.
	 */
	.fmt-house-merkmale {
		padding: 40px 0 8px;
	}
	.fmt-house-merkmale__eyebrow {
		margin-bottom: 14px;
	}
	.fmt-house-merkmale__box {
		grid-auto-flow: row;
		grid-template-columns: 1fr 1fr;
	}
	.fmt-house-merkmale__cell + .fmt-house-merkmale__cell {
		border-left: none;
	}
	.fmt-house-merkmale__cell:nth-child(2n) {
		border-left: 1px solid var(--line);
	}
	.fmt-house-merkmale__cell:nth-child(n+3) {
		border-top: 1px solid var(--line);
	}
	.fmt-house-merkmale__cell {
		padding: 22px 16px;
		gap: 8px;
	}
	.fmt-house-merkmale__icon-wrap {
		width: 36px;
		height: 36px;
	}
	.fmt-house-merkmale__label {
		font-size: 10.5px;
	}

	/* Grundriss */
	.fmt-house-grundriss {
		padding: 56px 0;
		border-top: 1px solid var(--line);
	}
	.fmt-house-grundriss__head {
		margin-bottom: 16px;
	}
	.fmt-house-grundriss__eyebrow {
		margin-bottom: 12px;
	}
	/* The mobile design's .mh2, smaller than global.css's .h-display here. */
	.fmt-house-grundriss__title {
		font-size: 28px;
		line-height: 1.04;
		letter-spacing: -0.02em;
	}
	/*
	 * The overall living area drops out here, as it does in the mobile design:
	 * it is already the first Merkmale tile above, and the per-floor figure is
	 * still in the plan caption and the table's Gesamt row. That leaves the tabs
	 * alone in the bar.
	 */
	.fmt-house-grundriss__total {
		display: none;
	}
	/* Tabs scroll sideways instead of wrapping, with the scrollbar hidden. */
	.fmt-house-grundriss__bar {
		margin-bottom: 16px;
	}
	.fmt-house-grundriss__tabs {
		flex-wrap: nowrap;
		overflow-x: auto;
		padding-bottom: 4px;
		scrollbar-width: none;
	}
	.fmt-house-grundriss__tabs::-webkit-scrollbar {
		display: none;
	}
	.fmt-house-grundriss__tab {
		flex-shrink: 0;
		white-space: nowrap;
	}
	.fmt-house-grundriss__body {
		row-gap: 16px;
	}
	.fmt-house-grundriss__plan {
		padding: 18px 18px 12px;
		gap: 8px;
	}
	.fmt-house-grundriss__plan-label {
		margin-bottom: 3px;
		font-size: 10.5px;
		letter-spacing: .14em;
	}
	.fmt-house-grundriss__plan-name {
		font-size: 18px;
	}
	/*
	 * The floor total swaps into the card head and the full-view link drops out —
	 * the mobile design gives this slot to the figure, not to a control.
	 */
	.fmt-house-grundriss__plan-total {
		display: block;
		flex-shrink: 0;
		font-size: 12px;
		color: var(--ink-soft);
		font-variant-numeric: tabular-nums;
		white-space: nowrap;
	}
	.fmt-house-grundriss__plan-expand {
		display: none;
	}
	.fmt-house-grundriss__plan-caption-total {
		display: none;
	}
	.fmt-house-grundriss__plan-figure {
		min-height: 180px;
		padding: 6px 0;
	}
	.fmt-house-grundriss__plan-caption {
		margin-top: 6px;
		padding-top: 10px;
		font-size: 10.5px;
		letter-spacing: .1em;
	}
	/* Both halves would not fit on one line at this width. */
	.fmt-house-grundriss__plan-caption-prefix {
		display: none;
	}
	.fmt-house-grundriss__rooms {
		padding: 18px 20px;
	}
	.fmt-house-grundriss__rooms-head {
		margin-bottom: 12px;
	}
	.fmt-house-grundriss__rooms-title {
		font-size: 14px;
	}
	.fmt-house-grundriss__rooms-floor {
		font-size: 10.5px;
	}
	.fmt-house-grundriss__room {
		padding: 9px 0;
	}
	.fmt-house-grundriss__room--total {
		padding: 12px 0 2px;
	}
	/*
	 * The mobile design has no sub-CTA in this section at all — the sticky bar
	 * below carries the price request instead, so the dark note card would only
	 * repeat it.
	 */
	.fmt-house-grundriss__cta {
		display: none;
	}

	/* Galerie */
	.fmt-house-galerie {
		padding: 56px 0;
	}
	.fmt-house-galerie__head {
		display: block;
		margin-bottom: 20px;
	}
	.fmt-house-galerie__eyebrow {
		margin-bottom: 12px;
	}
	.fmt-house-galerie__title {
		margin-bottom: 12px;
		font-size: 28px;
		line-height: 1.04;
		letter-spacing: -0.02em;
	}
	.fmt-house-galerie__lead {
		max-width: none;
	}
	/* Tiles size themselves instead of sitting on a fixed 260px row. */
	.fmt-house-galerie__grid {
		grid-auto-rows: auto;
		gap: 12px;
	}
	.fmt-house-galerie__tile {
		aspect-ratio: 4 / 3;
	}
	/* Six fit the phone preview, two more than the desktop cap. */
	.fmt-house-galerie__grid:not(.is-expanded) .fmt-house-galerie__tile:nth-child(n+5) {
		display: block;
	}
	.fmt-house-galerie__grid:not(.is-expanded) .fmt-house-galerie__tile:nth-child(n+7) {
		display: none;
	}
	/* Up to six images are all visible here, so the toggle has nothing to do. */
	.fmt-house-galerie__toggle--wide {
		display: none;
	}
	/* Full width at the mobile design's tighter 16px offset. */
	.fmt-house-galerie__toggle-row {
		margin-top: 16px;
	}
	.fmt-house-galerie__toggle {
		width: 100%;
		justify-content: center;
	}

	/* Rundgang */
	.fmt-house-rundgang {
		padding: 56px 0;
	}
	.fmt-house-rundgang__head {
		display: block;
		margin-bottom: 20px;
	}
	.fmt-house-rundgang__eyebrow {
		margin-bottom: 12px;
	}
	.fmt-house-rundgang__title {
		margin-bottom: 12px;
		font-size: 28px;
		line-height: 1.04;
		letter-spacing: -0.02em;
	}
	.fmt-house-rundgang__lead {
		max-width: none;
	}
	/* Same scrolling row as the Grundriss tabs. */
	.fmt-house-rundgang__tabs {
		flex-wrap: nowrap;
		overflow-x: auto;
		margin-bottom: 16px;
		padding-bottom: 4px;
		scrollbar-width: none;
	}
	.fmt-house-rundgang__tabs::-webkit-scrollbar {
		display: none;
	}
	.fmt-house-rundgang__tab {
		flex-shrink: 0;
		white-space: nowrap;
	}
	/* Taller stage, and the gradient reaches a little further. */
	.fmt-house-rundgang__stage {
		aspect-ratio: 16 / 11;
	}
	.fmt-house-rundgang__stage::after {
		background: linear-gradient(180deg, rgba(0, 0, 0, .05) 0%, rgba(0, 0, 0, .4) 100%);
	}
	.fmt-house-rundgang__play {
		width: 72px;
		height: 72px;
	}
	.fmt-house-rundgang__play svg {
		width: 28px;
		height: 28px;
	}
	/* Plate spans the stage width here rather than capping at 360px. */
	.fmt-house-rundgang__plate {
		left: 16px;
		right: 16px;
		bottom: 16px;
		max-width: none;
		padding: 12px 16px;
	}
	.fmt-house-rundgang__plate-label {
		font-size: 10px;
	}
	.fmt-house-rundgang__plate-title {
		font-size: 15px;
	}

	/* Referenz-Hinweis — the design leads with the photo here. */
	.fmt-house-referenz {
		padding: 48px 0;
	}
	.fmt-house-referenz__card {
		grid-template-columns: 1fr;
		grid-template-areas:
			"media"
			"body";
	}
	.fmt-house-referenz__media {
		min-height: 0;
		aspect-ratio: 16 / 10;
	}
	.fmt-house-referenz__signet {
		top: 14px;
		right: 14px;
		width: 54px;
		height: 54px;
	}
	.fmt-house-referenz__badge {
		top: 16px;
		left: 16px;
		padding: 6px 12px;
	}
	.fmt-house-referenz__caption {
		left: 18px;
		bottom: 16px;
	}
	.fmt-house-referenz__caption-title {
		font-size: 17px;
	}
	.fmt-house-referenz__body {
		padding: 24px 22px;
	}
	.fmt-house-referenz__title {
		font-size: 24px;
	}
	.fmt-house-referenz__text {
		max-width: none;
	}
	/* Two sentences instead of three, and no supporting note. */
	.fmt-house-referenz__text-extra,
	.fmt-house-referenz__note {
		display: none;
	}
	.fmt-house-referenz__actions {
		margin-top: 0;
	}
	/* Full width, and the larger size the design switches to here (.btn--lg). */
	.fmt-house-referenz__actions .btn {
		width: 100%;
		justify-content: center;
		padding: 14px 22px;
		font-size: 15px;
	}

	/* Lightbox — tighter inset, caption stacked so it clears the nav buttons. */
	.fmt-house-lightbox {
		padding: 16px;
	}
	.fmt-house-lightbox__img {
		max-width: 92vw;
		max-height: 70vh;
	}
	.fmt-house-lightbox__info {
		left: 16px;
		right: 16px;
		bottom: 16px;
		flex-direction: column;
		align-items: flex-start;
		gap: 10px;
	}
	.fmt-house-lightbox__caption {
		font-size: 15px;
	}
	.fmt-house-lightbox__nav {
		width: 40px;
		height: 40px;
	}
	.fmt-house-lightbox__nav--prev {
		left: 12px;
	}
	.fmt-house-lightbox__nav--next {
		right: 12px;
	}

	/*
	 * Sticky CTA becomes a bar across the bottom edge. The mobile prototype caps
	 * it at its own 460px canvas width; on a real phone the full width is right,
	 * so no max-width here.
	 */
	.fmt-house-sticky {
		right: 0;
		left: 0;
		bottom: 0;
		flex-direction: row;
		padding: 12px;
	}
	/* Phone moves to the left of the button and loses its label. */
	.fmt-house-sticky__phone {
		order: -1;
		flex-shrink: 0;
		width: 48px;
		height: 48px;
		padding: 0;
		border-radius: 8px;
		background: rgba(255, 255, 255, .98);
		box-shadow: 0 8px 24px -8px rgba(0, 0, 0, .25);
		color: var(--red);
	}
	.fmt-house-sticky__phone-label {
		display: none;
	}
	.fmt-house-sticky__request {
		flex: 1;
		height: 48px;
		padding: 0 18px;
		box-shadow: 0 12px 28px -8px rgba(227, 0, 15, .5);
	}
}
