/* ==========================================================================
   Elite Realty — main stylesheet
   Colour role tokens (--er-bg, --er-text …, plus -rgb channels) are generated
   from inc/tones.php and printed inline after this file. Everything else is here.
   Breakpoints (mobile-first): 600 · 810 · 1200 · 1440.
   ========================================================================== */

/* 1. Tokens
   ------------------------------------------------------------------------ */
:root {
	/* Type */
	--er-font-sans: var(--wp--preset--font-family--sans, "Albert Sans", system-ui, sans-serif);
	--er-font-display: var(--wp--preset--font-family--display, "Cormorant Garamond", Georgia, serif);
	--er-fs-meta: 12px;
	--er-fs-small: 14px;
	--er-fs-body: 16px;
	--er-fs-card: 18px;
	--er-fs-name: 24px;
	--er-fs-section: clamp(26px, 1.4rem + 0.9vw, 32px);
	--er-fs-hero: clamp(34px, 1.6rem + 1.5vw, 46px);

	/* Layout (LuxeRealty-measured) */
	--er-container: 1440px;
	--er-gutter: 16px;
	/* Fits the measured LuxeRealty spacer: 124 @1440, 54 @1024, 44 @768 and below. */
	--er-space-section: clamp(44px, 16.8vw - 118px, 124px);
	--er-box-lg: 640px;
	--er-box-md: 501px;
	--er-box-sm: 422px;
	--er-header-top: 16px;
	--er-header-h: 65px;
	--er-header-offset: calc(var(--er-header-top) + var(--er-header-h));

	/* Shape */
	--er-radius: 4px;
	--er-radius-action: 8px;
	--er-rule-w: 154px;

	/* Motion */
	--er-ease-out: cubic-bezier(.16, 1, .3, 1);
	--er-ease-io: cubic-bezier(.7, 0, .3, 1);
	--er-dur-fast: 300ms;
	--er-dur-md: 450ms;
	--er-dur-slow: 700ms;
	--er-dur-xslow: 1200ms;
	--er-stagger: 80ms;

	/* Glass (global, not tone-dependent) */
	/* Tinted with the palette's darkest base (--er-ink-rgb, from Elite Style; 11 11 11 by default). */
	--er-glass: rgb(var(--er-ink-rgb, 11 11 11) / .28);
	/* brightness() darkens whatever is behind the bar so ivory nav text keeps
	   ≥4.5:1 even over the ivory page (plain .28 glass gives ~1.9:1). */
	--er-glass-filter: blur(44px) brightness(var(--er-glass-brightness, .58)); /* per palette (Elite Style); .58 by default */

	color-scheme: light;
}

/* Derived colours must be declared wherever the role tokens change. */
:root,
.er-tone-light,
.er-tone-soft,
.er-tone-brand,
.er-tone-dark,
.er-tone-accent {
	--er-border: rgb(var(--er-text-rgb) / .16);
	--er-border-strong: rgb(var(--er-text-rgb) / .32);
	--er-hover-veil: rgb(var(--er-heading-rgb) / .08);
}

.er-tone-light,
.er-tone-soft,
.er-tone-brand,
.er-tone-dark,
.er-tone-accent {
	background-color: var(--er-bg);
	color: var(--er-text);
}

.er-tone-brand,
.er-tone-dark { color-scheme: dark; }

/* Veil: translucent panel fill that reads on the section (form panels). Dark
   tones darken with the palette's base; light tones lift toward the card. */
:root,
.er-tone-light,
.er-tone-soft,
.er-tone-accent { --er-veil: rgb(var(--er-card-rgb) / .6); }
.er-tone-brand,
.er-tone-dark { --er-veil: rgb(var(--er-ink-rgb, 11 11 11) / .26); }

@media (min-width: 600px) { :root { --er-gutter: 24px; } }
@media (min-width: 1200px) { :root { --er-gutter: 32px; } }
@media (min-width: 1440px) { :root { --er-gutter: 40px; } }

/* 2. Base
   ------------------------------------------------------------------------ */
*,
*::before,
*::after { box-sizing: border-box; }

html {
	/* Keep focused elements and anchor targets clear of the fixed header (WCAG 2.4.11). */
	scroll-padding-top: calc(var(--er-header-offset) + 24px + var(--wp-admin--admin-bar--height, 0px));
	scrollbar-gutter: stable;
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
}

html:has(dialog[open]) { overflow: hidden; }

body {
	margin: 0;
	background: var(--er-bg);
	color: var(--er-text);
	font-family: var(--er-font-sans);
	font-size: var(--er-fs-body);
	line-height: 1.5;
	font-weight: 400;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

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

a { color: var(--er-accent-strong); text-underline-offset: .2em; }
a:hover { color: var(--er-heading); }

h1, h2, h3, h4, h5, h6 {
	margin: 0 0 .5em;
	color: var(--er-heading);
	font-weight: 400;
	line-height: 1.1;
	text-wrap: balance;
}

p { margin: 0 0 1em; }

button,
input,
select,
textarea { font: inherit; color: inherit; }

:focus-visible {
	outline: 2px solid var(--er-focus);
	outline-offset: 3px;
}

.er-main:focus { outline: none; }

.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

.er-skip-link {
	position: fixed;
	top: 8px;
	left: 8px;
	z-index: 1000;
	padding: 12px 20px;
	border-radius: var(--er-radius);
	background: var(--er-brand);
	color: var(--er-on-brand);
	font-size: var(--er-fs-small);
	text-transform: uppercase;
	text-decoration: none;
	transform: translateY(-200%);
}
.er-skip-link:focus { transform: none; color: var(--er-on-brand); }

/* 3. Layout
   ------------------------------------------------------------------------ */
.er-container {
	width: 100%;
	max-width: var(--er-container);
	margin-inline: auto;
	padding-inline: var(--er-gutter);
}

.er-section { padding-block: var(--er-space-section); }

.er-prose { max-width: 760px; overflow-wrap: break-word; }
.er-prose > :first-child { margin-top: 0; }
.er-prose :is(h2, h3, h4) { margin-top: 1.6em; }
.er-prose h2 { font-size: var(--er-fs-name); }
.er-prose h3 { font-size: var(--er-fs-card); font-weight: 500; }
.er-prose img { border-radius: var(--er-radius); }
.er-prose .alignwide { max-width: min(var(--er-container), 100vw - 2 * var(--er-gutter)); }
/* Editor content: quotes, captions and tables in the same language as the
   theme; long values (URLs, certificate numbers) wrap instead of overflowing. */
.er-prose blockquote {
	margin: 1.6em 0;
	padding: 4px 0 4px 24px;
	border-left: 2px solid var(--er-accent);
	color: var(--er-heading);
	font-size: var(--er-fs-card);
}
.er-prose blockquote p { margin: 0; }
.er-prose blockquote cite {
	display: block;
	margin-top: 12px;
	color: var(--er-muted);
	font-size: var(--er-fs-small);
	font-style: normal;
	letter-spacing: .02em;
	text-transform: uppercase;
}
.er-prose figure { margin: 1.6em 0; }
.er-prose figcaption {
	margin-top: 10px;
	color: var(--er-muted);
	font-size: var(--er-fs-small);
}
.er-prose table { width: 100%; border-collapse: collapse; font-size: var(--er-fs-small); }
.er-prose :is(th, td) {
	padding: 12px 16px 12px 0;
	border-bottom: 1px solid var(--er-border);
	text-align: left;
	vertical-align: top;
	overflow-wrap: anywhere;
}

/* 4. Typography
   ------------------------------------------------------------------------ */
.er-h1,
.er-page-hero__title {
	font-size: var(--er-fs-hero);
	line-height: 1.2;
	letter-spacing: -0.03em;
	text-transform: uppercase;
}

.er-h2 {
	font-size: var(--er-fs-section);
	line-height: 1.1;
	letter-spacing: -0.01em;
	text-transform: uppercase;
}

.er-h3 { font-size: var(--er-fs-card); font-weight: 500; line-height: 1.4; }
.er-h4 { font-size: var(--er-fs-name); line-height: 1.5; letter-spacing: -0.02em; }

.er-eyebrow {
	margin: 0;
	color: var(--er-heading);
	font-size: var(--er-fs-body);
	line-height: 1.5;
	letter-spacing: -0.01em;
	text-transform: uppercase;
}

.er-lead { color: var(--er-muted); font-size: var(--er-fs-body); line-height: 1.5; }
.er-small { font-size: var(--er-fs-small); line-height: 1.5; }

.er-meta {
	margin: 0;
	color: var(--er-muted);
	font-size: var(--er-fs-meta);
	line-height: 1.5;
	letter-spacing: .04em;
	text-transform: uppercase;
}

.er-display,
.er-wordmark {
	font-family: var(--er-font-display);
	font-weight: 500;
}

.er-wordmark {
	color: inherit;
	letter-spacing: .08em;
	line-height: 1;
	text-decoration: none;
	text-transform: uppercase;
	white-space: nowrap;
}

/* 5. UI primitives
   ------------------------------------------------------------------------ */
.er-rule {
	display: block;
	width: var(--er-rule-w);
	max-width: 100%;
	height: 2px;
	margin-block: 12px 16px;
	background: var(--er-accent);
}
.er-rule--short { --er-rule-w: 94px; }
.er-rule--hair { height: 1px; }

.er-heading-row {
	display: grid;
	gap: 14px 24px;
	align-items: end;
}
.er-heading-row__intro { max-width: 60ch; margin: 0; color: var(--er-muted); }
.er-heading-row + .er-grid { margin-top: 40px; }
@media (min-width: 810px) {
	.er-heading-row { grid-template-columns: 1fr auto; }
}

.er-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 44px;
	padding: 10px clamp(24px, 3.75vw, 54px);
	border: 1px solid transparent;
	border-radius: var(--er-radius);
	background: none;
	font-size: var(--er-fs-small);
	font-weight: 500;
	line-height: 1.3;
	letter-spacing: .02em;
	text-decoration: none;
	text-transform: uppercase;
	cursor: pointer;
	transition:
		transform var(--er-dur-fast) var(--er-ease-out),
		background-color var(--er-dur-fast) var(--er-ease-out),
		border-color var(--er-dur-fast) var(--er-ease-out),
		color var(--er-dur-fast) var(--er-ease-out);
}
.er-btn:hover { transform: scale(.95); }
.er-btn:active { transform: scale(.93); }

.er-btn--light {
	border-color: var(--er-border);
	background: var(--wp--preset--color--white, #fff);
	color: var(--wp--preset--color--forest, #10211d);
}
.er-btn--light:hover { border-color: var(--er-accent); color: var(--wp--preset--color--obsidian, #0b0b0b); }

.er-btn--solid {
	border-radius: var(--er-radius-action);
	background: var(--er-brand);
	color: var(--er-on-brand);
}
.er-btn--solid:hover {
	background: color-mix(in srgb, var(--er-brand) 86%, var(--er-accent));
	color: var(--er-on-brand);
}

.er-btn--ghost {
	border-color: var(--er-border-strong);
	color: var(--er-heading);
}
.er-btn--ghost:hover { border-color: var(--er-accent); color: var(--er-heading); }

.er-btn--accent {
	border-radius: var(--er-radius-action);
	background: var(--er-accent);
	color: var(--er-on-accent);
}
.er-btn--accent:hover { background: var(--er-accent-hover); color: var(--er-on-accent); }

.er-btn--block { width: 100%; }

.er-link-arrow {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	color: var(--er-heading);
	font-size: var(--er-fs-small);
	letter-spacing: .02em;
	text-decoration: none;
	text-transform: uppercase;
}
.er-link-arrow .er-icon { width: 16px; height: 16px; transition: transform var(--er-dur-fast) var(--er-ease-out); }
.er-link-arrow:hover { color: var(--er-heading); }
.er-link-arrow:hover .er-icon { transform: translateX(4px); }

.er-chip {
	display: inline-flex;
	align-items: center;
	padding: 5px 14px;
	border: 1px solid var(--er-border-strong);
	border-radius: var(--er-radius);
	color: var(--er-heading);
	font-size: var(--er-fs-meta);
	line-height: 1.5;
	letter-spacing: .04em;
	text-transform: uppercase;
}
.er-chip--glass {
	border-color: transparent;
	background: rgb(255 255 255 / .72);
	color: var(--wp--preset--color--forest, #10211d);
	-webkit-backdrop-filter: blur(8px);
	backdrop-filter: blur(8px);
}

.er-icon-btn {
	display: inline-grid;
	place-items: center;
	width: 44px; /* WCAG 2.5.5 target size */
	height: 44px;
	padding: 0;
	border: 0;
	border-radius: var(--er-radius);
	background: none;
	color: inherit;
	cursor: pointer;
	transition: background-color var(--er-dur-fast) var(--er-ease-out);
}
.er-icon-btn:hover { background: var(--er-hover-veil); color: inherit; }

.er-field {
	width: 100%;
	min-height: 48px;
	padding: 12px 16px;
	border: 1px solid var(--er-border-strong);
	border-radius: var(--er-radius);
	background: var(--er-card);
	color: var(--er-heading);
}
.er-field::placeholder { color: var(--er-muted); opacity: 1; }
.er-field:focus-visible { outline-offset: 1px; border-color: var(--er-focus); }

.er-search-form {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
}
.er-search-form .er-field { flex: 1 1 240px; }
.er-prose .er-search-form { margin-bottom: 24px; }
.er-actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* 6. Header
   ------------------------------------------------------------------------ */
.er-header {
	position: fixed;
	top: var(--er-header-top);
	left: 0;
	right: 0;
	z-index: 50;
	pointer-events: none;
}

/* Logged-in editors: sit below the WordPress admin bar (core sets the variable). */
.admin-bar .er-header { top: calc(var(--er-header-top) + var(--wp-admin--admin-bar--height, 0px)); }
.admin-bar .er-page-hero { padding-top: calc(var(--er-header-offset) + var(--wp-admin--admin-bar--height, 0px) + clamp(40px, 6vw, 96px)); }

.er-header__bar {
	display: grid;
	grid-template-columns: 1fr auto 1fr;
	align-items: center;
	gap: 16px;
	width: calc(100% - 32px);
	height: var(--er-header-h);
	margin-inline: auto;
	padding-inline: 12px;
	border-radius: var(--er-radius);
	background: var(--er-glass);
	color: var(--er-heading);
	-webkit-backdrop-filter: var(--er-glass-filter);
	backdrop-filter: var(--er-glass-filter);
	pointer-events: auto;
}

.er-header__brand { justify-self: center; font-size: 24px; letter-spacing: .06em; }
.er-header__brand img { width: auto; max-height: 39px; }
.er-brand a { display: block; }
.er-header__utils { display: flex; justify-self: end; gap: 8px; }
.er-header__nav { display: none; }

/* Narrow phones: keep 44px targets inside the bar. Tighter gaps, and the
   contact icon gives way (Contact is in the menu, one tap away); the
   wordmark scales down on the very narrowest screens. */
@media (max-width: 959px) {
	.er-header__bar { gap: 8px; }
}
@media (max-width: 419px) {
	.er-header__contact { display: none; }
}
@media (max-width: 359px) {
	.er-header__brand { font-size: 20px; }
}

@media (min-width: 960px) {
	.er-header__bar {
		grid-template-columns: auto 1fr auto;
		gap: 24px;
		padding-inline: 40px 32px;
	}
	.er-header__toggle { display: none; }
	.er-header__brand { justify-self: start; }
	.er-header__nav { display: block; justify-self: center; }
}

@media (min-width: 1200px) {
	/* 822px (reference), growing only if longer (translated) labels need it. */
	.er-header__bar {
		width: fit-content;
		min-width: min(822px, 100% - 32px);
		max-width: calc(100% - 32px);
		gap: 32px;
	}
}

.er-nav {
	display: flex;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.er-nav a {
	display: block;
	padding: 5px 12px;
	border-radius: var(--er-radius);
	color: var(--er-heading);
	font-size: var(--er-fs-small);
	line-height: 1.5;
	text-decoration: none;
	text-transform: uppercase;
}

.er-nav .current-menu-item > a,
.er-nav .current-menu-ancestor > a { box-shadow: inset 0 -1px 0 var(--er-accent); }

/* Rolling label: the visible text slides up and its duplicate (drawn from
   data-label, with empty alt text so it is not announced) slides in. */
.er-roll { display: block; height: 1.5em; overflow: hidden; }
.er-roll__text {
	display: block;
	position: relative;
	transition: transform var(--er-dur-md) var(--er-ease-out);
}
.er-roll__text::after {
	content: attr(data-label);
	content: attr(data-label) / "";
	position: absolute;
	top: 100%;
	left: 0;
}
.er-nav a:focus-visible .er-roll__text { transform: translateY(-100%); }
@media (hover: hover) {
	.er-nav a:hover .er-roll__text { transform: translateY(-100%); }
}

/* 7. Dialogs (mobile menu, search)
   ------------------------------------------------------------------------ */
.er-dialog {
	max-width: none;
	max-height: none;
	margin: 0;
	padding: 0;
	border: 0;
	transition:
		translate var(--er-dur-md) var(--er-ease-out),
		opacity var(--er-dur-md) var(--er-ease-out),
		display var(--er-dur-md) allow-discrete,
		overlay var(--er-dur-md) allow-discrete;
}
.er-dialog::backdrop {
	background: rgb(11 11 11 / .6);
	-webkit-backdrop-filter: blur(4px);
	backdrop-filter: blur(4px);
	opacity: 0;
	transition: opacity var(--er-dur-md) var(--er-ease-out), display var(--er-dur-md) allow-discrete, overlay var(--er-dur-md) allow-discrete;
}
.er-dialog[open]::backdrop { opacity: 1; }
@starting-style { .er-dialog[open]::backdrop { opacity: 0; } }

.er-menu {
	inset: 0 auto 0 0;
	width: min(100%, 440px);
	height: 100dvh;
	translate: -100% 0;
}
.er-menu[open] { translate: 0 0; }
@starting-style { .er-menu[open] { translate: -100% 0; } }

.er-menu__panel {
	display: flex;
	flex-direction: column;
	gap: 32px;
	min-height: 100%;
	padding: 16px 24px 32px;
}

.er-menu__top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	min-height: var(--er-header-h);
	border-bottom: 1px solid var(--er-border);
}
.er-menu__brand { font-size: 26px; color: var(--er-heading); }

.er-menu__list,
.er-menu__list .sub-menu { margin: 0; padding: 0; list-style: none; }

.er-menu__list > li { border-bottom: 1px solid var(--er-border); }

.er-menu__list a {
	display: block;
	padding: 14px 0;
	color: var(--er-heading);
	font-size: var(--er-fs-name);
	line-height: 1.3;
	text-decoration: none;
	text-transform: uppercase;
}
.er-menu__list .sub-menu { padding: 0 0 12px 16px; }
.er-menu__list .sub-menu a { padding: 8px 0; font-size: var(--er-fs-body); color: var(--er-text); }
.er-menu__list a:hover,
.er-menu__list .current-menu-item > a { color: var(--er-accent-strong); }
.er-menu__cta { margin-top: auto; }

.er-search {
	inset: auto;
	top: calc(var(--er-header-top) + var(--er-header-h) + 12px);
	left: 50%;
	width: min(var(--er-box-lg), 100% - 32px);
	translate: -50% 0;
	opacity: 1;
	background: transparent;
}
.er-search:not([open]) { opacity: 0; translate: -50% -12px; }
@starting-style { .er-search[open] { opacity: 0; translate: -50% -12px; } }
/* Search and the image viewer open quickly; only the menu slides (450ms). */
.er-search,
.er-search::backdrop { transition-duration: var(--er-dur-fast); }

.er-search__panel {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	padding: 20px;
	border-radius: var(--er-radius);
	background: var(--er-card);
	color: var(--er-text);
	box-shadow: 0 24px 64px rgb(11 11 11 / .24);
}
.er-search__panel .er-search-form { flex: 1; }

/* 8. Footer
   ------------------------------------------------------------------------ */
.er-footer__inner {
	max-width: var(--er-container);
	margin-inline: auto;
	padding: 56px var(--er-gutter) 40px;
}

.er-footer__brand { text-align: center; }
.er-footer__wordmark {
	display: inline-block;
	color: var(--er-heading);
	font-size: clamp(36px, 1.5rem + 2.5vw, 64px);
}
.er-footer__wordmark:hover { color: var(--er-heading); }
.er-footer__tagline {
	margin: 16px 0 0;
	color: var(--er-text);
	letter-spacing: .02em;
	text-transform: uppercase;
}

.er-footer__rule {
	position: relative;
	height: 1px;
	margin-block: 40px 56px;
	background: linear-gradient(90deg, transparent, rgb(var(--er-text-rgb) / .22) 15%, rgb(var(--er-text-rgb) / .22) 85%, transparent);
}
.er-footer__rule::after {
	content: "";
	position: absolute;
	left: 50%;
	top: 0;
	width: 94px;
	height: 1px;
	background: var(--er-accent);
	translate: -50% 0;
}

.er-footer__cols {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 40px 24px;
}
@media (min-width: 810px) {
	.er-footer__cols {
		display: flex;
		justify-content: center;
		gap: clamp(48px, 7vw, 100px);
	}
}

.er-footer__title {
	margin: 0 0 16px;
	color: var(--er-heading);
	font-size: var(--er-fs-body);
	letter-spacing: -0.01em;
	text-transform: uppercase;
}

.er-footer__links {
	display: grid;
	gap: 10px;
	margin: 0;
	padding: 0;
	list-style: none;
}
.er-footer__links a {
	color: var(--er-text);
	font-size: var(--er-fs-meta);
	line-height: 1.5;
	letter-spacing: .04em;
	text-decoration: none;
	text-transform: uppercase;
	background: linear-gradient(var(--er-accent), var(--er-accent)) 0 100% / 0 1px no-repeat;
	transition: background-size var(--er-dur-fast) var(--er-ease-out), color var(--er-dur-fast) var(--er-ease-out);
}
.er-footer__links a:is(:hover, :focus-visible) { color: var(--er-heading); background-size: 100% 1px; }

.er-footer__legal {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 8px 24px;
	margin-top: 56px;
	color: var(--er-muted);
	font-size: var(--er-fs-small);
	text-align: center;
}
.er-footer__legal p { margin: 0; }
.er-footer__legal a { color: var(--er-text); text-decoration: none; }
.er-footer__legal a:hover { color: var(--er-heading); }

/* 9. Page scaffolding
   ------------------------------------------------------------------------ */
.er-page-hero {
	padding-top: calc(var(--er-header-offset) + clamp(40px, 6vw, 96px));
	padding-bottom: clamp(40px, 6vw, 88px);
}
.er-page-hero__inner > .er-eyebrow + .er-rule { margin-top: 12px; }
.er-page-hero__title { margin: 0; max-width: 22ch; }
.er-page-hero__intro {
	max-width: 56ch;
	margin: 20px 0 0;
	font-size: 17px;
	line-height: 1.7;
}
.er-page-hero__cta { margin-top: 28px; }

.er-post-list { display: grid; gap: 40px; max-width: 760px; }
.er-post-summary { padding-bottom: 40px; border-bottom: 1px solid var(--er-border); }
.er-post-summary__title { margin: 8px 0 12px; font-size: var(--er-fs-name); line-height: 1.3; }
.er-post-summary__title a { color: var(--er-heading); text-decoration: none; }
.er-post-summary__title a:hover { color: var(--er-accent-strong); }
.er-post-summary__excerpt { color: var(--er-muted); }

.navigation.pagination { margin-top: 48px; }
.nav-links { display: flex; flex-wrap: wrap; gap: 8px; }
.nav-links .page-numbers {
	display: inline-grid;
	place-items: center;
	min-width: 44px;
	min-height: 44px;
	padding: 0 12px;
	border: 1px solid var(--er-border);
	border-radius: var(--er-radius);
	color: var(--er-heading);
	text-decoration: none;
}
.nav-links .page-numbers.current { border-color: var(--er-accent); }

/* 9b. Grids and cards
   Property card: LuxeRealty anatomy (4:5 photo, chips, location, 94px rule,
   title, price, facts). Panel cards (agent, journal): photo fills the card,
   an ivory panel is inset at the bottom. The title link is stretched over
   the whole card; hover and keyboard focus behave the same.
   ------------------------------------------------------------------------ */
.er-grid {
	display: grid;
	grid-template-columns: repeat(var(--er-cols, 1), minmax(0, 1fr));
	gap: var(--er-grid-gap, 24px);
}
.er-grid--agents { --er-grid-gap: 10px; }
@media (min-width: 600px) {
	.er-grid--property,
	.er-grid--agents,
	.er-grid--posts { --er-cols: 2; }
}
@media (min-width: 1200px) {
	.er-grid--property { --er-cols: 4; }
	.er-grid--agents,
	.er-grid--posts { --er-cols: 3; }
}

.er-card {
	position: relative;
	display: flex;
	flex-direction: column;
	min-width: 0;
	color: var(--er-text);
}

.er-card__media {
	position: relative;
	overflow: hidden;
	background: var(--er-surface);
}

.er-card__img,
.er-card__placeholder {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform var(--er-dur-md) var(--er-ease-out);
}

.er-card__placeholder {
	background:
		radial-gradient(circle at 70% 18%, rgb(var(--er-accent-rgb) / .2), transparent 45%),
		linear-gradient(160deg, var(--wp--preset--color--forest, #10211d), var(--wp--preset--color--obsidian, #0b0b0b));
}

.er-card__rule {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 2px;
	background: var(--er-accent);
	/* 94px → full width, drawn with clip-path (paint only, no layout). */
	clip-path: inset(0 calc(100% - 94px) 0 0);
	transition: clip-path var(--er-dur-md) var(--er-ease-out);
}

.er-card__link {
	color: inherit;
	text-decoration: none;
}
.er-card__link::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
}
.er-card__link:hover { color: inherit; }
.er-card__link:focus-visible { outline: none; }
/* Linked photo (same destination as the title): looks like the old div. */
a.er-card__media,
a.er-card__media:hover { display: block; color: inherit; text-decoration: none; }
a.er-card__media:focus-visible { outline: none; }
.er-card:has(.er-card__link:focus-visible, a.er-card__media:focus-visible) {
	outline: 2px solid var(--er-focus);
	outline-offset: 4px;
}

.er-card:is(:hover, :focus-within) .er-card__rule { clip-path: inset(0); }
.er-card--property:is(:hover, :focus-within) .er-card__img { transform: scale(1.1); }
.er-card--panel:is(:hover, :focus-within) .er-card__img { transform: scale(1.05); }

/* Property card */
.er-card--property .er-card__media {
	order: -1;
	aspect-ratio: 4 / 5;
}

.er-card__tag,
.er-card__status {
	position: absolute;
	top: 20px;
	margin: 0;
}
.er-card__tag { left: 20px; }
.er-card__status { right: 20px; }

.er-card__location {
	position: absolute;
	left: 20px;
	bottom: 20px;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	max-width: calc(100% - 40px);
	margin: 0;
	padding: 4px 10px;
	border-radius: var(--er-radius);
	background: rgb(11 11 11 / .42);
	-webkit-backdrop-filter: blur(8px);
	backdrop-filter: blur(8px);
	color: var(--wp--preset--color--white, #fff);
	font-size: var(--er-fs-meta);
	line-height: 1.5;
	letter-spacing: .04em;
	text-transform: uppercase;
}
.er-card__location .er-icon { flex: none; width: 16px; height: 16px; }
/* Long location names stay a compact chip over the photograph (full text in the DOM). */
.er-card__location-text {
	display: -webkit-box;
	overflow: hidden;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
}

.er-card--property .er-card__body {
	position: relative;
	padding: 12px 10px 0;
}

.er-card__title {
	margin: 0 0 6px;
	color: var(--er-heading);
	font-size: var(--er-fs-card);
	font-weight: 500;
	line-height: 1.4;
}

.er-card__price {
	margin: 0 0 8px;
	color: var(--er-heading);
	font-size: var(--er-fs-body);
	font-variant-numeric: tabular-nums;
}

.er-card__facts {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 0;
	margin: 0;
	padding: 0;
	list-style: none;
	color: var(--er-muted);
	font-size: var(--er-fs-small);
	line-height: 1.5;
	text-transform: uppercase;
}
.er-card__fact { display: inline-flex; align-items: center; gap: 6px; }
.er-card__fact + .er-card__fact::before {
	content: "·";
	content: "·" / "";
	margin: 0 10px;
}
.er-card__fact .er-icon { width: 16px; height: 16px; }

/* Panel cards (agent, journal) */
.er-card--panel {
	justify-content: flex-end;
	aspect-ratio: 442 / 572;
	padding: 16px;
	overflow: hidden;
	isolation: isolate;
}
.er-card--post,
.er-card--location { aspect-ratio: 430 / 572; }

.er-card--panel .er-card__media {
	position: absolute;
	inset: 0;
	z-index: -1;
}

.er-card__panel {
	position: relative;
	padding: 28px 24px 24px;
}

.er-card__chip { margin: 0 0 14px; }

.er-card__name {
	margin: 0;
	color: var(--er-heading);
	font-size: var(--er-fs-name);
	line-height: 1.5;
	letter-spacing: -0.02em;
}

.er-card__role {
	margin: 0;
	color: var(--er-muted);
	font-size: var(--er-fs-small);
	letter-spacing: .04em;
	text-transform: uppercase;
}

.er-card__contact { margin: 8px 0 0; color: var(--er-muted); overflow-wrap: anywhere; }
.er-card__contact a {
	position: relative;
	z-index: 2;
	color: var(--er-muted);
	text-decoration: none;
	overflow-wrap: anywhere;
}
.er-card__contact a:hover { color: var(--er-accent-strong); text-decoration: underline; }

.er-card__meta {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 12px;
	margin: 0 0 10px;
	color: var(--er-heading);
	font-size: var(--er-fs-small);
	letter-spacing: .02em;
	text-transform: uppercase;
}
.er-card__meta time { color: var(--er-muted); }
.er-card__count { color: var(--er-muted); }
.er-card__excerpt {
	display: -webkit-box;
	margin: 8px 0 0;
	overflow: hidden;
	color: var(--er-muted);
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
}

.er-card--post .er-card__title,
.er-card--location .er-card__title {
	margin: 0;
	font-size: 20px;
	font-weight: 400;
	line-height: 1.35;
}

/* 9c. Section building blocks (homepage and later templates)
   Block-specific styles live in blocks/{name}/style.css and load only
   where the block is used.
   ------------------------------------------------------------------------ */
.er-section-head {
	display: grid;
	gap: 14px 24px;
	align-items: end;
	margin-bottom: 40px;
}
@media (min-width: 810px) {
	.er-section-head--row { grid-template-columns: 1fr auto; }
}
.er-section-head .er-eyebrow + .er-rule { margin: 12px 0 16px; }
.er-section-head .er-h2 { margin: 0; }
.er-section-head__intro { max-width: 62ch; margin: 14px 0 0; color: var(--er-muted); }
.er-tone-brand .er-section-head__intro,
.er-tone-dark .er-section-head__intro { color: var(--er-text); }

.er-section-head--center {
	justify-items: center;
	max-width: var(--er-box-lg);
	margin-inline: auto;
	text-align: center;
}
.er-section-head--center .er-rule,
.er-section-head--center .er-eyebrow + .er-rule { margin-inline: auto; }
.er-section-head--center .er-section-head__intro { margin-inline: auto; }

.er-section-head--stack { margin-bottom: 0; }
.er-section-head--stack .er-section-head__cta { justify-self: start; margin-top: 10px; }

/* Full-bleed photographic sections (About, Global reach, Newsletter, Hero). */
.er-media-section {
	position: relative;
	display: grid;
	min-height: 100vh;
	min-height: 100svh;
	overflow: hidden;
	isolation: isolate;
}
.er-media-section__media {
	position: absolute;
	inset: 0;
	z-index: -1;
	background: var(--wp--preset--color--obsidian, #0b0b0b);
}
.er-media-section__img,
.er-media-section__fallback {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}
.er-media-section__fallback {
	background:
		radial-gradient(circle at 70% 20%, rgb(var(--er-gold-rgb, 201 168 106) / .16), transparent 45%),
		linear-gradient(160deg, var(--wp--preset--color--forest, #10211d), var(--wp--preset--color--obsidian, #0b0b0b));
}

/* Floating information panels. */
.er-panel { padding: clamp(32px, 4.5vw, 64px); }

/* Photo glass: the warm smoked panel for text set directly over photography
   (Featured Properties card, About, heroes, panel cards). Pair it with
   .er-tone-dark for the ivory text and champagne accent; size, position, type
   and spacing stay with each component. brightness() darkens only what is
   behind the glass, so ivory copy keeps ≥4.5:1 even over white stucco. */
.er-photo-glass {
	border: 1px solid rgb(var(--er-accent-rgb) / .28);
	border-radius: 0;
	background: rgb(28 22 18 / .38);
	box-shadow: none;
	-webkit-backdrop-filter: blur(11px) brightness(.6) saturate(1.05);
	backdrop-filter: blur(11px) brightness(.6) saturate(1.05);
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
	.er-photo-glass { background: rgb(28 22 18 / .78); }
}
/* Grey secondary text cannot hold 4.5:1 on glass over a bright photograph:
   muted copy is ivory too, set apart by size and case. Two classes: beats the
   tone tokens printed after this file. */
.er-tone-dark.er-photo-glass {
	--er-muted: var(--er-text);
	--er-muted-rgb: var(--er-text-rgb);
}

/* Champagne corner brackets on the border line (needs a positioned box). */
:where(.er-photo-glass--brackets) { position: relative; }
.er-photo-glass--brackets::before {
	content: "";
	position: absolute;
	inset: -1px;
	--er-b: linear-gradient(var(--er-accent), var(--er-accent));
	background:
		var(--er-b) top left / var(--er-bracket, 18px) 1px,
		var(--er-b) top left / 1px var(--er-bracket, 18px),
		var(--er-b) top right / var(--er-bracket, 18px) 1px,
		var(--er-b) top right / 1px var(--er-bracket, 18px),
		var(--er-b) bottom left / var(--er-bracket, 18px) 1px,
		var(--er-b) bottom left / 1px var(--er-bracket, 18px),
		var(--er-b) bottom right / var(--er-bracket, 18px) 1px,
		var(--er-b) bottom right / 1px var(--er-bracket, 18px);
	background-repeat: no-repeat;
	pointer-events: none;
}
@media (max-width: 599px) {
	.er-photo-glass--brackets { --er-bracket: 14px; }
}

.er-about {
	place-items: center;
	padding: 94px var(--er-gutter);
}
.er-about__panel { width: min(var(--er-box-md), 100%); }

.er-newsletter {
	align-items: center;
	justify-items: center;
	padding: 96px var(--er-gutter);
}
@media (min-width: 810px) {
	.er-newsletter { justify-items: end; padding-block: 156px; }
	.er-newsletter__panel {
		display: grid;
		align-content: center;
		min-height: 420px;
		margin-right: clamp(0px, 5vw, 80px);
	}
}
.er-newsletter__panel {
	width: min(var(--er-box-lg), 100%);
	padding: 32px clamp(24px, 4.5vw, 64px);
}
.er-newsletter__form { display: grid; gap: 20px; margin-top: 24px; }

/* Forest branded backdrop (LuxeRealty violet gradient → EDS forest). */
.er-gradient {
	background:
		radial-gradient(ellipse 60% 55% at 100% 0%, rgb(var(--er-gold-rgb, 201 168 106) / .12), transparent 70%),
		linear-gradient(180deg, var(--wp--preset--color--forest, #10211d) 0%, var(--er-forest-deep, #0d1a17) 100%);
}

/* 9d. Enquiry forms (contact section, property pages) — tone-aware. */
.er-form__grid {
	display: grid;
	gap: 20px 24px;
	margin-bottom: 24px;
}
@media (min-width: 600px) {
	.er-form__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.er-form__field--full { grid-column: 1 / -1; }
}

.er-form__field { display: grid; gap: 10px; }
.er-form__field > label { color: var(--er-heading); }
.er-form__optional { color: var(--er-muted); font-size: var(--er-fs-small); }

.er-form__input {
	width: 100%;
	min-height: 56px;
	padding: 14px 16px;
	border: 1px solid rgb(var(--er-text-rgb) / .32);
	border-radius: var(--er-radius);
	background: transparent;
	color: var(--er-heading);
}
textarea.er-form__input { min-height: 120px; resize: vertical; }
.er-form__input:focus-visible { outline-offset: 1px; border-color: var(--er-focus); }

.er-form__consent {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	font-size: var(--er-fs-small);
}
.er-form__consent input { flex: none; width: 24px; height: 24px; margin: 0; accent-color: var(--er-accent); }
.er-form__consent a { color: var(--er-accent-strong); }

.er-form__honeypot {
	position: absolute;
	left: -10000px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.er-form__status {
	margin: 0 0 24px;
	padding: 14px 16px;
	border-left: 2px solid var(--er-accent);
	background: rgb(var(--er-heading-rgb) / .06);
	color: var(--er-heading);
}
.er-form__status--error { border-left-color: #c87474; }

.er-form__submit {
	border-radius: var(--er-radius-action);
	background: var(--er-brand);
	color: var(--er-on-brand);
}
.er-form__submit:hover {
	background: color-mix(in srgb, var(--er-brand) 86%, var(--er-accent));
	color: var(--er-on-brand);
}

/* Breadcrumbs */
.er-breadcrumbs ol {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 0;
	margin: 0;
	padding: 0;
	list-style: none;
	font-size: var(--er-fs-meta);
	letter-spacing: .04em;
	text-transform: uppercase;
}
.er-breadcrumbs li + li::before {
	content: "/";
	content: "/" / "";
	margin: 0 10px;
	color: var(--er-muted);
}
.er-breadcrumbs a { display: inline-block; padding-block: 5px; color: inherit; text-decoration: none; }
.er-breadcrumbs a:hover { text-decoration: underline; }
.er-breadcrumbs [aria-current] { color: var(--er-muted); }

/* 9e. Shared marquee engine (logo tiles, agent portraits) — assets/js/marquee.js
   sets --er-marquee-shift/-duration and adds aria-hidden clones as needed. */
.er-marquee__viewport { overflow: hidden; }
.er-marquee__track {
	display: flex;
	column-gap: var(--er-marquee-gap, 12px);
	width: max-content;
}
.er-marquee__group {
	display: flex;
	gap: var(--er-marquee-gap, 12px);
	margin: 0;
	padding: 0;
	list-style: none;
}
@media (prefers-reduced-motion: no-preference) {
	.er-marquee__viewport.is-ready .er-marquee__track {
		animation: er-marquee var(--er-marquee-duration, 40s) linear infinite;
	}
	.er-marquee__viewport:is(:hover, :focus-within, .is-offscreen) .er-marquee__track,
	.er-tab-hidden .er-marquee__viewport .er-marquee__track {
		animation-play-state: paused;
	}
}
@keyframes er-marquee {
	to { transform: translateX(var(--er-marquee-shift, -50%)); }
}
/* Clones stay hidden until the script has measured the loop. Without JS
   (html lacks .er-js) the single set wraps into a static layout; with JS the
   pre-ready row is already the final single row, so nothing shifts (CLS). */
.er-marquee__viewport:not(.is-ready) .er-marquee__group--clone { display: none; }
html:not(.er-js) .er-marquee__track,
html:not(.er-js) .er-marquee__group { flex-wrap: wrap; width: auto; }
@media (prefers-reduced-motion: reduce) {
	.er-marquee__group--clone { display: none; }
	.er-marquee__track,
	.er-marquee__group { flex-wrap: wrap; width: auto; }
	.er-marquee__track { animation: none !important; }
}

/* Video pause/play toggle (assets/js/bg-video.js). */
.er-video-toggle {
	background: var(--er-glass);
	color: var(--wp--preset--color--ivory, #f5f0e6);
	-webkit-backdrop-filter: var(--er-glass-filter);
	backdrop-filter: var(--er-glass-filter);
}
.er-video-toggle:hover { background: rgb(11 11 11 / .5); color: var(--wp--preset--color--ivory, #f5f0e6); }
.er-video-toggle .er-video-toggle__play,
.er-video-toggle.is-paused .er-video-toggle__pause { display: none; }
.er-video-toggle.is-paused .er-video-toggle__play { display: inline; }

/* Editor-only hint for sections with nothing to show (never on the site). */
.er-block-empty {
	padding: 32px;
	border: 1px dashed var(--er-border-strong);
	background: var(--er-surface);
	color: var(--er-text);
	text-align: center;
}
.er-block-empty p { margin: 0; }

/* 9f. Social profile links (agent profile, contact page). */
.er-social-links {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}
.er-social-links a {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	padding: 0 16px;
	border: 1px solid var(--er-border);
	color: var(--er-heading);
	font-size: var(--er-fs-small);
	text-decoration: none;
}
.er-social-links a:hover { border-color: var(--er-accent); }

/* 9g. Maps (OpenStreetMap iframe: property, location, office) — ert_map_html(). */
.er-map {
	aspect-ratio: 16 / 10;
	margin-top: 16px;
	border: 1px solid var(--er-border);
	background: var(--er-surface);
}
.er-map iframe { display: block; width: 100%; height: 100%; border: 0; }
.er-map__links {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 8px 24px;
	margin: 12px 0 0;
	font-size: var(--er-fs-small);
}
.er-map__credit { color: var(--er-muted); }
.er-map__credit a { color: inherit; }

/* 10. Motion — see assets/js/motion.js
   Start states only apply when JS is present (html.er-js, set inline in <head>)
   and the visitor has not asked for reduced motion.
   ------------------------------------------------------------------------ */
@media (prefers-reduced-motion: no-preference) {
	html { scroll-behavior: smooth; }

	.er-js [data-motion] {
		transition:
			opacity var(--er-motion-dur, var(--er-dur-slow)) var(--er-ease-out),
			transform var(--er-motion-dur, var(--er-dur-slow)) var(--er-ease-out);
		transition-delay: var(--er-delay, 0ms);
	}

	.er-js [data-motion="fade-up"]:not(.is-in) {
		opacity: 0;
		transform: translate3d(0, var(--er-rise, 80px), 0);
	}

	.er-js [data-motion="scale"] { --er-motion-dur: var(--er-dur-md); }
	.er-js [data-motion="scale"].is-in { transform: scale(var(--er-scale, 1.2)); }

	.er-js [data-motion="stagger"] > * {
		transition:
			opacity var(--er-dur-slow) var(--er-ease-out),
			transform var(--er-dur-slow) var(--er-ease-out);
		/* Capped: later cards in a long grid do not wait (rows enter separately). */
		transition-delay: calc(var(--er-delay, 0ms) + min(var(--er-i, 0), 3) * var(--er-stagger));
	}
	.er-js [data-motion="stagger"]:not(.is-in) > * {
		opacity: 0;
		transform: translate3d(0, var(--er-rise, 40px), 0);
	}

	.er-js [data-motion="split"] [data-split] {
		display: inline-block;
		transition: transform var(--er-dur-xslow) var(--er-ease-out);
	}
	.er-js [data-motion="split"]:not(.is-in) [data-split="start"] { transform: translate3d(calc(-1 * var(--er-split, 24vw)), 0, 0); }
	.er-js [data-motion="split"]:not(.is-in) [data-split="end"] { transform: translate3d(var(--er-split, 24vw), 0, 0); }
}

/* 11. Reduced motion — content stays visible and usable; nothing loops,
   scales or smooth-scrolls.
   ------------------------------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: .001ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: .001ms !important;
		transition-delay: 0ms !important;
		scroll-behavior: auto !important;
	}

	[data-motion],
	[data-motion] > *,
	[data-motion] [data-split] {
		opacity: 1 !important;
		transform: none !important;
	}

	.er-btn:hover,
	.er-btn:active,
	.er-card .er-card__img { transform: none !important; }

	/* Navigation: no rolling label; hover/focus shows the gold rule instead. */
	.er-nav a .er-roll__text { transform: none !important; }
	.er-nav a:is(:hover, :focus-visible) { box-shadow: inset 0 -1px 0 var(--er-accent); }
}
