/**
 * MetrYMMO shared visual system.
 * Loaded after page and brand styles so shared controls stay consistent.
 */
:root {
	--mm-ink: var(--metrymmo-black, #0b0b0b);
	--mm-cream: var(--metrymmo-cream, #f5eee3);
	--mm-paper: var(--metrymmo-cream-soft, #fbfaf7);
	--mm-gold: var(--metrymmo-gold, #c99a55);
	--mm-gold-light: var(--metrymmo-gold-light, #e0bb80);
	--mm-gold-dark: var(--metrymmo-gold-dark, #a86f3d);
	--mm-brown: var(--metrymmo-brown-dark, #21160f);
	--mm-display: Georgia, "Times New Roman", serif;
	--mm-body: var(--font-primary, "Segoe UI", Arial, sans-serif);
	--mm-radius-card: 18px;
	--mm-radius-panel: 20px;
	--mm-radius-control: 10px;
	--mm-content-width: 1240px;
	--mm-reading-width: 760px;
	--mm-section-space: clamp(64px, 8vw, 112px);
	--mm-control-height: 48px;
	--mm-focus: 3px solid #a86f3d;
}

/* Shared content widths and section-heading hierarchy. */
.mm-container,
.container {
	width: min(calc(100% - 48px), var(--mm-content-width));
	margin-inline: auto;
}

:is(.section-heading, .section__header, .mm-section-heading, .buy-section-heading, .sell-section-heading, .location-section-heading, .estimation-page-section-heading, .estimation-page-section-title, .financing-page-section-heading, .contact-page-section-heading, .finance-section-heading, .property-archive-section-heading) {
	text-wrap: balance;
}

:is(.section-title, .section__title, .mm-section-heading h2, .section-heading h2, .buy-section-heading h2, .sell-section-heading h2, .location-section-heading h2, .estimation-page-section-heading h2, .estimation-page-section-title h2, .financing-page-section-heading h2, .contact-page-section-heading h2, .finance-section-heading h2, .property-archive-section-heading h2) {
	font-family: var(--mm-display);
	font-weight: 600;
	letter-spacing: -.03em;
	line-height: 1.12;
	text-wrap: balance;
}

:is(.legal-block h2, .property-location-heading h2, .property-single-gallery h2, .property-contact-card h2, .finance-story__copy h3) {
	font-family: var(--mm-display);
	font-weight: 600;
	letter-spacing: -.025em;
}

.property-single-title {
	font-family: var(--mm-display);
	font-weight: 600;
	letter-spacing: -.035em;
}

:is(.section-subtitle, .buy-section-label, .sell-section-label, .location-section-label, .property-section-label, .financing-page-section-label, .estimation-page-section-label, .finance-eyebrow, .contact-section-label) {
	font-size: .72rem;
	font-weight: 750;
	letter-spacing: .15em;
	line-height: 1.5;
	text-transform: uppercase;
}

.legal-content-section { padding-block: var(--mm-section-space); }
.legal-layout { width: min(100%, 1120px); margin-inline: auto; }

/* Gold actions and quiet outlined actions share sizing and focus behavior. */
:is(.btn-primary, .button-primary, .hero-button-primary, .buy-button-primary, .sell-button-primary, .financing-page-button--primary, .contact-button, .finance-button:not(.finance-button--secondary), .mm-button--primary, .wp-element-button, input[type="submit"]) {
	box-sizing: border-box;
	min-height: var(--mm-control-height);
	padding: 12px 22px;
	border: 1px solid var(--mm-gold);
	border-radius: 999px;
	background: linear-gradient(135deg, var(--mm-gold-light), var(--mm-gold));
	color: var(--mm-ink);
	font-family: var(--mm-body);
	font-size: .94rem;
	font-weight: 700;
	line-height: 1.25;
	text-decoration: none;
	transition: color .2s ease, background-color .2s ease, border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}

:is(.btn-primary, .button-primary, .hero-button-primary, .buy-button-primary, .sell-button-primary, .financing-page-button--primary, .contact-button, .finance-button:not(.finance-button--secondary), .mm-button--primary, .wp-element-button, input[type="submit"]):hover {
	border-color: var(--mm-gold-light);
	background: linear-gradient(135deg, #f0d7ae, var(--mm-gold-light));
	color: var(--mm-ink);
	transform: translateY(-1px);
}

:is(.btn-outline, .btn-ghost, .button-outline, .button-secondary, .hero-button-secondary, .buy-button-secondary, .sell-button-secondary, .financing-page-button--secondary, .finance-button--secondary, .mm-button--secondary) {
	box-sizing: border-box;
	min-height: var(--mm-control-height);
	padding: 11px 21px;
	border: 1px solid currentColor;
	border-radius: 999px;
	background: transparent;
	font-family: var(--mm-body);
	font-size: .94rem;
	font-weight: 650;
	line-height: 1.25;
	text-decoration: none;
	transition: color .2s ease, background-color .2s ease, border-color .2s ease, transform .2s ease;
}

:is(.mm-button, .hero-button, .buy-button, .sell-button, .financing-page-button, .contact-button, .button-primary, .button-secondary, .finance-button, .btn-primary, .btn-outline, .btn-ghost, .wp-element-button, input[type="submit"]):focus-visible,
:is(.property-filters, .metrymmo-form, .contact-page-form, .estimation-page-form, .sell-form, .financing-request-form) :focus-visible,
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
	outline: var(--mm-focus);
	outline-offset: 3px;
}

/* Form controls use one height, border, radius and readable focus state. */
:is(.contact-page-form, .estimation-page-form, .sell-form, .financing-request-form, .contact-form, .property-filter) :is(input:not([type="checkbox"]):not([type="radio"]):not([type="file"]), select, textarea),
.property-filter__input,
.property-filter__select {
	box-sizing: border-box;
	min-height: var(--mm-control-height);
	border: 1px solid rgba(11, 11, 11, .2);
	border-radius: var(--mm-radius-control);
	background: #fff;
	color: var(--mm-ink);
	font: inherit;
}

:is(.contact-page-form, .estimation-page-form, .sell-form, .financing-request-form, .contact-form) textarea {
	min-height: 132px;
	padding: 12px 14px;
}

/* Card and CTA surfaces use common geometry while retaining page-specific color. */
:is(.property-card, .buy-process-card, .sell-process-card, .sell-service-card, .location-process-card, .financing-page-service, .finance-feature, .finance-access-grid article, .mm-editorial-step, .mm-sell-path, .legal-info-card, .estimation-page-form-card, .financing-request-card) {
	border-radius: var(--mm-radius-card);
}

:is(.cta-box, .buy-cta, .sell-cta, .location-cta, .contact-page-cta__inner, .estimation-page-cta__inner, .financing-page-cta__inner, .finance-final-cta > .container) {
	border-radius: var(--mm-radius-panel);
}

:is(.estimation-image, .financing-image, .mm-sell-photo, .property-card__image, .property-single-gallery) {
	position: relative;
	overflow: hidden;
	border-radius: var(--mm-radius-panel);
}

.site-photo-caption {
	position: absolute;
	right: 12px;
	bottom: 12px;
	left: 12px;
	padding: 8px 11px;
	border: 1px solid rgba(255, 255, 255, .18);
	border-radius: 8px;
	background: rgba(11, 11, 11, .78);
	color: #fff;
	font-size: .76rem;
	line-height: 1.45;
}

:is(.service-icon, .why-icon) svg {
	display: block;
	width: 30px;
	height: 30px;
	flex: 0 0 auto;
}

.estimation-upload {
	box-sizing: border-box;
	width: 100%;
	margin: 26px 0;
	padding: 22px;
	border: 1px solid rgba(11, 11, 11, .14);
	border-radius: var(--mm-radius-card);
	background: var(--mm-paper);
}

.estimation-upload legend { padding-inline: 7px; color: var(--mm-ink); font-weight: 700; }
.estimation-upload label { display: block; margin: 4px 0 9px; font-weight: 600; }
.estimation-upload input[type="file"] { box-sizing: border-box; width: 100%; min-height: 44px; font: inherit; }
.estimation-upload p { margin: 12px 0 0; color: #514b42; font-size: .92rem; line-height: 1.6; }

/* Keep every shared hero clear of the responsive sticky header. */
:target { scroll-margin-top: calc(var(--mm-header-height, 120px) + 20px); }

@media (max-width: 1350px) {
	:root { --mm-header-height: 80px; }
}

@media (max-width: 700px) {
	.mm-container,
	.container { width: min(calc(100% - 32px), var(--mm-content-width)); }
	:root { --mm-control-height: 46px; }
	.estimation-upload { padding: 18px; }
}

@media (prefers-reduced-motion: reduce) {
	:is(.mm-button, .hero-button, .buy-button, .sell-button, .financing-page-button, .contact-button, .button-primary, .button-secondary, .finance-button, .btn-primary, .btn-outline, .btn-ghost, .wp-element-button, input[type="submit"]) { transition-duration: .01ms !important; }
}

/* Contained page heroes: warm cream remains the canvas, dark panels carry the content. */
:is(.buy-hero, .sell-hero, .location-hero, .estimation-page-hero, .financing-page-hero, .contact-page-hero, .property-archive-hero, .finance-hero, .legal-hero, .services-page__intro) {
	box-sizing: border-box;
	min-height: 0 !important;
	padding-block: clamp(18px, 2.8vw, 36px) !important;
	/* These pages sit beneath a fixed header; reserve its full height plus a visible cream inset. */
	padding-block-start: calc(var(--mm-header-height, 120px) + clamp(24px, 2.2vw, 34px)) !important;
	background: var(--mm-cream) !important;
	color: var(--mm-ink) !important;
}

:is(.buy-hero, .sell-hero, .location-hero, .financing-page-hero, .property-archive-hero) > .container,
:is(.estimation-page-hero__inner, .contact-page-hero__inner, .finance-hero__inner, .legal-hero-content) {
	position: relative;
	isolation: isolate;
	overflow: hidden;
	box-sizing: border-box;
	width: min(calc(100% - 48px), var(--mm-content-width));
	max-width: var(--mm-content-width);
	min-height: 0 !important;
	margin-inline: auto;
	padding: clamp(38px, 5vw, 68px) clamp(24px, 5vw, 68px) !important;
	border: 1px solid rgba(201, 154, 85, .24);
	border-radius: var(--mm-radius-panel);
	background:
		radial-gradient(ellipse at 84% 42%, rgba(141, 91, 50, .16), transparent 46%),
		linear-gradient(125deg, #0b0b0b 0%, #11100f 57%, #21160f 100%);
	box-shadow: 0 22px 54px rgba(33, 22, 15, .09);
	color: var(--mm-cream);
}

/* Keep one shared monogram inside each Vendre/Location hero card. */
:is(.buy-hero > .container, .financing-page-hero > .container, .property-archive-hero > .container, .estimation-page-hero__inner, .contact-page-hero__inner, .finance-hero__inner, .legal-hero-content)::before {
	position: absolute;
	top: 50%;
	right: -1.5%;
	z-index: 0;
	color: rgba(201, 154, 85, .045);
	font: 600 clamp(18rem, 34vw, 30rem)/.76 Georgia, "Times New Roman", serif;
	letter-spacing: -.08em;
	content: "M";
	transform: translateY(-47%);
	pointer-events: none;
	user-select: none;
}

.sell-hero-card::after,
.location-hero-card::after {
	position: absolute;
	right: 12px;
	bottom: -10px;
	z-index: 0;
	color: rgba(201, 154, 85, .055);
	font: 600 clamp(11rem, 21vw, 16rem)/.76 Georgia, "Times New Roman", serif;
	letter-spacing: -.08em;
	content: "M";
	pointer-events: none;
	user-select: none;
}

.location-hero-card { overflow: hidden; }
.location-hero-card::before { z-index: 1; pointer-events: none; }
.location-hero-card > * { z-index: 2; }

:is(.buy-hero, .sell-hero, .location-hero, .estimation-page-hero, .financing-page-hero, .contact-page-hero, .property-archive-hero, .finance-hero, .legal-hero)::before,
:is(.location-hero, .estimation-page-hero, .financing-page-hero, .contact-page-hero)::after,
.contact-page-hero__glow {
	display: none !important;
}

.location-hero-inner { min-height: 0 !important; padding-block: 0 !important; }
.financing-page-hero__inner { min-height: 0 !important; padding-block: 0 !important; }
.contact-page-hero__inner { min-height: 0 !important; }
.finance-hero__inner {
	grid-template-columns: minmax(0, 1.02fr) minmax(0, .98fr) !important;
	gap: clamp(24px, 4vw, 56px) !important;
}
.finance-hero__copy { max-width: 620px; }
.finance-hero h1 { font-size: clamp(2.7rem, 4.7vw, 4.5rem) !important; }
.finance-hero__copy > p:not(.finance-access-note) { margin-top: 20px; line-height: 1.7; }
.finance-hero__actions { gap: 10px; }
.finance-hero__actions .finance-button { margin-top: 20px; }
.finance-ui--dashboard { transform: none; }
.finance-preview-caption { margin-top: 12px; }

.financing-overview-visual {
	display: grid;
	place-items: center;
	padding: clamp(22px, 4vw, 44px);
	background:
		radial-gradient(circle at 92% 8%, rgba(201, 154, 85, .18), transparent 36%),
		linear-gradient(145deg, #21160f, #0b0b0b 70%);
}
.financing-overview-visual::after { content: none; }
.financing-overview-card { width: min(100%, 460px); }
.financing-overview-kicker { color: var(--mm-gold-light); font-size: .7rem; font-weight: 750; letter-spacing: .14em; }
.financing-overview-card h3 { margin: 12px 0 22px; color: var(--mm-cream); font: 600 clamp(1.7rem, 3vw, 2.35rem)/1.1 var(--mm-display); letter-spacing: -.03em; }
.financing-overview-card ol { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.financing-overview-card li { display: grid; grid-template-columns: 42px minmax(0, 1fr); align-items: start; gap: 14px; padding: 17px 0; border-top: 1px solid rgba(245, 238, 227, .14); }
.financing-overview-card li > span { color: var(--mm-gold-light); font-size: .75rem; font-weight: 800; letter-spacing: .08em; }
.financing-overview-card li strong, .financing-overview-card li small { display: block; }
.financing-overview-card li strong { color: var(--mm-cream); font-size: .98rem; }
.financing-overview-card li small { margin-top: 5px; color: rgba(245, 238, 227, .67); font-size: .84rem; line-height: 1.45; }
.financing-overview-card > p { margin: 16px 0 0; color: rgba(245, 238, 227, .59); font-size: .77rem; line-height: 1.55; }

/* Cream transitions around selected dark content panels and closing calls to action. */
.metrymmo-location-page,
.metrymmo-estimation-page,
.metrymmo-financing-page,
.metrymmo-contact-page,
.metrymmo-finance-page { background: var(--mm-cream); }

.buy-finance-section,
.sell-cta-section,
.location-cta-section,
.cta {
	box-sizing: border-box;
	padding-block: clamp(34px, 5vw, 64px) !important;
	background: var(--mm-cream) !important;
}

.buy-finance-card,
.sell-cta,
.location-cta,
.cta-box {
	box-sizing: border-box;
	padding: clamp(28px, 4.5vw, 56px);
	border: 1px solid rgba(201, 154, 85, .24);
	border-radius: var(--mm-radius-panel);
	background: linear-gradient(125deg, #0b0b0b 0%, #11100f 57%, #21160f 100%);
	box-shadow: 0 22px 54px rgba(33, 22, 15, .08);
	color: var(--mm-cream);
}

.sell-estimation-card { border-radius: var(--mm-radius-panel); }

.buy-finance-card :is(h2, p),
.sell-cta :is(h2, p),
.location-cta :is(h2, p),
.cta-box :is(h2, p) { color: var(--mm-cream); }

.estimation-page-process,
.estimation-page-cta,
.financing-page-cta,
.contact-page-cta,
.finance-privacy {
	box-sizing: border-box;
	padding-block: clamp(34px, 5vw, 64px) !important;
	background: var(--mm-cream) !important;
	color: var(--mm-ink);
}

.estimation-page-process .estimation-page-container,
.estimation-page-cta__inner,
.financing-page-cta__inner,
.contact-page-cta__inner,
.finance-privacy__inner {
	box-sizing: border-box;
	padding: clamp(28px, 4.5vw, 56px);
	border: 1px solid rgba(201, 154, 85, .24);
	border-radius: var(--mm-radius-panel);
	background: linear-gradient(125deg, #0b0b0b 0%, #11100f 57%, #21160f 100%);
	box-shadow: 0 22px 54px rgba(33, 22, 15, .08);
	color: var(--mm-cream);
}

.estimation-page-process .estimation-page-container { width: min(calc(100% - 48px), var(--mm-content-width)); }
.estimation-page-process__heading h2 { color: var(--mm-cream); }
.estimation-page-process-step h3 { color: var(--mm-cream); }
.estimation-page-process-step p { color: rgba(245, 238, 227, .74); }
.estimation-page-cta__inner,
.financing-page-cta__inner,
.contact-page-cta__inner { gap: clamp(24px, 4vw, 55px); }
.financing-page-cta__inner::after { color: rgba(201, 154, 85, .055); }
.finance-privacy__inner { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); }
.finance-privacy h2 { color: var(--mm-cream); }
.finance-privacy__inner > p { color: rgba(245, 238, 227, .76); }

/* A sold/let property reads as unavailable before any historic listing detail. */
.property-single-status-notice {
	display: flex;
	align-items: center;
	gap: 12px;
	width: fit-content;
	max-width: 100%;
	margin: 0 0 20px;
	padding: 11px 15px;
	border: 1px solid rgba(224, 187, 128, .56);
	border-radius: 999px;
	background: rgba(201, 154, 85, .14);
	color: var(--mm-cream);
	font-size: .9rem;
	font-weight: 750;
}
.property-single-status-notice strong { color: var(--mm-gold-light); letter-spacing: .08em; text-transform: uppercase; }
.property-single-price--historic { display: block; color: rgba(245, 238, 227, .68); font-size: clamp(1.2rem, 1.8vw, 1.55rem); line-height: 1.45; }
.property-single-price--historic .property-single-price-label { display: block; margin-bottom: 4px; color: rgba(245, 238, 227, .52); font-size: .72rem; font-weight: 650; letter-spacing: .08em; text-transform: uppercase; }
.property-single-actions .property-unavailable-action { white-space: normal; }

/* The fixed header must not cover the property hero or its availability notice. */
.property-single-hero {
	padding-block-start: calc(var(--mm-header-height, 120px) + 24px) !important;
}

/* Contain the remaining dark editorial sections within the cream canvas. */
.estimation,
.why-us,
.financing-page-process {
	box-sizing: border-box;
	padding-block: clamp(34px, 5vw, 68px) !important;
	background: var(--mm-cream) !important;
}

.estimation::before,
.estimation::after,
.why-us::before,
.why-us::after {
	display: none;
}

.estimation > .container,
.why-us > .container,
.financing-page-process > .container {
	position: relative;
	isolation: isolate;
	box-sizing: border-box;
	width: min(calc(100% - 48px), var(--mm-content-width));
	max-width: var(--mm-content-width);
	margin-inline: auto;
	padding: clamp(30px, 4.5vw, 56px);
	border: 1px solid rgba(201, 154, 85, .24);
	border-radius: var(--mm-radius-panel);
	background:
		radial-gradient(ellipse at 84% 42%, rgba(141, 91, 50, .13), transparent 46%),
		linear-gradient(125deg, #0b0b0b 0%, #11100f 57%, #21160f 100%);
	box-shadow: 0 22px 54px rgba(33, 22, 15, .08);
	color: var(--mm-cream);
}

.estimation > .container { overflow: hidden; }

.why-us > .container {
	overflow: hidden;
	color: var(--mm-cream);
}

.why-us > .container::before {
	position: absolute;
	top: 50%;
	right: -2%;
	z-index: 0;
	color: rgba(201, 154, 85, .045);
	font: 600 clamp(18rem, 34vw, 30rem)/.76 Georgia, "Times New Roman", serif;
	letter-spacing: -.08em;
	content: "M";
	transform: translateY(-47%);
	pointer-events: none;
	user-select: none;
}

.why-us > .container > * { position: relative; z-index: 1; }
.why-us .section-title { color: var(--mm-cream); }
.why-us .section-description { color: rgba(245, 238, 227, .74); }

.footer-trademark-notice {
	max-width: 68ch;
	margin: 8px auto 0;
	color: rgba(245, 238, 227, .58);
	font-size: .72rem;
	line-height: 1.55;
	text-align: center;
}

.financing-page-process > .container { color: var(--mm-cream); }
.financing-page-process__header h2,
.financing-page-process__item h3 { color: var(--mm-cream); }
.financing-page-process__item p { color: rgba(245, 238, 227, .74); }

/* Keep consent, privacy details and anti-spam challenge readable in the estimation form. */
.estimation-page-form__footer {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	grid-template-areas:
		"consent consent"
		"captcha submit"
		"privacy privacy";
	align-items: start;
	justify-content: stretch;
	gap: 16px 24px;
}

.estimation-page-form__footer > .metrymmo-privacy-consent { grid-area: consent; max-width: none; }
.estimation-page-form__footer > .cf-turnstile { grid-area: captcha; min-width: 0; max-width: 100%; }
.estimation-page-form__footer > p { grid-area: privacy; width: 100%; max-width: 58rem; color: #62594f; font-size: .88rem; line-height: 1.65; }
.estimation-page-form__footer > button { grid-area: submit; align-self: center; }

@media (max-width: 700px) {
	.estimation > .container,
	.why-us > .container,
	.financing-page-process > .container {
		width: min(calc(100% - 32px), var(--mm-content-width));
		padding: 28px 22px;
		border-radius: 17px;
	}

	.estimation-page-form__footer {
		grid-template-columns: minmax(0, 1fr);
		grid-template-areas: "consent" "captcha" "privacy" "submit";
		gap: 15px;
	}

	.estimation-page-form__footer > button { width: 100%; }
}

@media (max-width: 950px) {
	.finance-hero__inner { grid-template-columns: minmax(0, 1fr) !important; }
	.finance-showcase-wrap { width: min(100%, 720px); margin-inline: auto; }
	.finance-privacy__inner { grid-template-columns: 1fr; }
}

@media (max-width: 700px) {
	:is(.buy-hero, .sell-hero, .location-hero, .financing-page-hero, .property-archive-hero) > .container,
	:is(.estimation-page-hero__inner, .contact-page-hero__inner, .finance-hero__inner, .legal-hero-content) {
		width: min(calc(100% - 32px), var(--mm-content-width));
		padding: 30px 22px !important;
		border-radius: 17px;
	}
	.location-hero-inner { gap: 34px !important; }
	.financing-overview-visual { min-height: 340px; padding: 24px; }
	.finance-hero__actions { align-items: stretch; flex-direction: column; }
	.finance-hero__actions .finance-button { width: 100%; margin-top: 0; }
	.finance-hero__actions .finance-button:first-child { margin-top: 8px; }
	.estimation-page-process .estimation-page-container { width: min(calc(100% - 32px), var(--mm-content-width)); padding: 28px 22px; }
	.estimation-page-process__grid { grid-template-columns: 1fr; }
	.estimation-page-process-step:not(:last-child) { margin-right: 0; border-right: 0; border-bottom: 1px solid rgba(255,255,255,.12); }
	:is(.estimation-page-cta__inner, .financing-page-cta__inner, .contact-page-cta__inner, .finance-privacy__inner) { padding: 28px 22px; }
	:is(.buy-finance-card, .sell-cta, .location-cta, .cta-box) { padding: 28px 22px; }
	.property-single-status-notice { align-items: flex-start; flex-direction: column; gap: 3px; border-radius: 14px; }
}
