/*
 * WayHome: new projects hub and developer archive.
 *
 * The project card carries four facts in a fixed order, so the cards line up
 * against each other when you are comparing three towers.
 */

.areas-intro {
	padding-block: var(--space-xl) var(--space-m);
}

.areas-intro h1 {
	margin: 0;
}

.lede {
	max-inline-size: var(--measure);
	margin-block-start: var(--space-s);
	font-size: var(--step-1);
	color: var(--grey-700);
}

/* --------------------------------------------------------------------------
 * Toolbar and jump links
 * ----------------------------------------------------------------------- */

.projects-toolbar {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	gap: var(--space-s);
}

.projects-toolbar .field {
	margin: 0;
	min-inline-size: 18rem;
}

.projects-jump {
	margin-block-start: var(--space-m);
}

.projects-jump ul {
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-2xs);
	margin: 0;
	padding: 0;
	list-style: none;
}

.projects-jump a {
	display: inline-flex;
	align-items: center;
	gap: var(--space-3xs);
	padding: 0.35rem 0.85rem;
	border: 1px solid var(--color-border);
	border-radius: var(--radius-pill);
	font-family: var(--font-heading);
	font-size: var(--step--1);
	font-weight: 600;
	text-decoration: none;
	color: var(--grey-700);
}

.projects-jump a:hover,
.projects-jump a:focus-visible {
	border-color: var(--navy-900);
	color: var(--ink);
}

.projects-jump__count {
	padding-inline: 0.4rem;
	border-radius: var(--radius-pill);
	background-color: var(--color-surface);
}

.projects-group {
	padding-block: var(--space-l);
	scroll-margin-block-start: 5rem;
}

.projects-group > .container > h2 {
	margin-block-end: var(--space-m);
}

.projects-group__more {
	margin-block-start: var(--space-m);
}
/*
 * WayHome: the property card and the grid it sits in.
 *
 * Shared by the listing index, the "similar properties" block and (from
 * Phase 4) the place pages, so it lives in its own sheet rather than being
 * written twice.
 */

.p-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr));
	gap: var(--space-m);
	margin-block: var(--space-l);
}

.p-card {
	position: relative;
	display: flex;
	flex-direction: column;
	overflow: hidden;
	background-color: var(--color-bg);
	border: 1px solid var(--color-border);
	border-radius: var(--radius-l);
	transition:
		box-shadow var(--dur) var(--ease),
		transform var(--dur) var(--ease),
		border-color var(--dur) var(--ease);
}

.p-card:hover,
.p-card:has(:focus-visible) {
	border-color: transparent;
	box-shadow: var(--shadow-2);
	transform: translateY(-2px);
}

.p-card__media {
	position: relative;
	overflow: hidden;
	aspect-ratio: 4 / 3;
	background-color: var(--grey-100);
}

.p-card__media-link {
	display: block;
	height: 100%;
}

.p-card__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform var(--dur-slow) var(--ease);
}

.p-card:hover .p-card__media img {
	transform: scale(1.04);
}

.p-card .media--empty {
	width: 100%;
	height: 100%;
}

.p-card__badges {
	position: absolute;
	inset-block-start: var(--space-2xs);
	inset-inline-start: var(--space-2xs);
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-3xs);
	max-width: calc(100% - var(--space-xl));
}

.p-card__ribbon {
	position: absolute;
	inset-block-end: 0;
	inset-inline: 0;
	margin: 0;
	padding: var(--space-2xs) var(--space-s);
	font-family: var(--font-heading);
	font-weight: 700;
	letter-spacing: var(--tracking-wide);
	text-transform: uppercase;
	font-size: var(--step--1);
	color: var(--color-text-invert);
	background-color: rgb(29 41 62 / 88%);
}

.p-card__whatsapp {
	position: absolute;
	inset-block-start: var(--space-2xs);
	inset-inline-end: var(--space-2xs);
	display: grid;
	place-items: center;
	width: 2.25rem;
	height: 2.25rem;
	color: var(--color-text-invert);
	background-color: var(--color-whatsapp);
	border-radius: var(--radius-pill);
	box-shadow: var(--shadow-1);
}

.p-card__whatsapp:hover {
	background-color: var(--whatsapp-dark);
}

.p-card__whatsapp .icon {
	width: 1.1rem;
	height: 1.1rem;
}

.p-card__body {
	display: flex;
	flex: 1;
	flex-direction: column;
	gap: var(--space-2xs);
	padding: var(--card-pad);
}

.p-card__price {
	margin: 0;
	font-family: var(--font-heading);
	font-size: var(--step-2);
	font-weight: var(--weight-heading-strong);
	font-variant-numeric: tabular-nums;
	letter-spacing: var(--tracking-snug);
	line-height: var(--lh-tight);
}

.p-card__title {
	margin: 0;
	max-width: none;
	font-family: var(--font-heading);
	font-size: var(--step-1);
	font-weight: var(--weight-heading);
	line-height: var(--lh-heading);
	letter-spacing: var(--tracking-snug);
	text-wrap: balance;
}

.p-card__title a {
	color: var(--color-text);
	text-decoration: none;
}

.p-card__title a::after {
	content: "";
	position: absolute;
	inset: 0;
}

.p-card__title a:hover {
	color: var(--color-link);
}

.p-card__where {
	display: flex;
	align-items: center;
	gap: var(--space-3xs);
	margin: 0;
	font-size: var(--step--1);
	color: var(--color-text-muted);
}

.p-card__where .icon {
	flex: none;
	width: 0.9rem;
	height: 0.9rem;
	color: var(--color-link);
}

.p-card__facts {
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-2xs) var(--space-s);
	margin: auto 0 0;
	padding: var(--space-2xs) 0 0;
	list-style: none;
	border-top: 1px solid var(--color-border);
	font-size: var(--step--1);
}

.p-card__facts li {
	display: flex;
	align-items: center;
	gap: var(--space-3xs);
}

.p-card__facts .icon {
	width: 1rem;
	height: 1rem;
	color: var(--color-text-muted);
}

.p-card__ref {
	margin: 0;
	font-size: var(--step--1);
	color: var(--grey-400);
	letter-spacing: var(--tracking-wide);
}

.p-card--closed .p-card__media img {
	filter: grayscale(0.55);
}

@media print {
	.p-card__whatsapp {
		display: none;
	}
}
/*
 * WayHome: lead forms.
 *
 * Only what the theme's components.css does not already cover. Field, label,
 * hint, error, reference, required marker and button styling come from the
 * theme; this file adds the layout, the honeypot, the choice rows, the notices
 * and the dialog. Every custom property carries a fallback, so a form still
 * looks right if it is rendered on a page that has not loaded tokens.css.
 *
 * This sheet is enqueued after the theme's bundle, so anything declared here at
 * the same specificity wins. Nothing the theme is meant to own may be set here.
 */

.wh-form-wrap {
	display: flow-root;
	max-width: 46rem;
}

.wh-form__title {
	margin: 0 0 var(--space-2xs, 0.5rem);
	font-family: var(--font-heading, system-ui, sans-serif);
	line-height: var(--lh-heading, 1.2);
}

.wh-form__intro {
	margin: 0 0 var(--space-m, 1.5rem);
	color: var(--color-text-muted, #484848);
}

.wh-form {
	display: flex;
	flex-direction: column;
	gap: var(--wh-form-gap, 0.75rem);
}

.wh-form__grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: var(--wh-form-gap, 0.75rem);
}

@media (min-width: 40em) {
	.wh-form__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.wh-form__grid > .field {
		grid-column: 1 / -1;
	}

	.wh-form__grid > .field--half {
		grid-column: auto;
	}
}

.wh-form-wrap--compact .wh-form__grid {
	grid-template-columns: 1fr;
}

/* The theme styles .field; these only fill the gaps. */

.field--checkbox_group {
	min-inline-size: 0;
	margin: 0;
	padding: 0;
	border: 0;
}

.field__error[hidden] {
	display: none;
}

.field__error::before {
	content: "!";
	display: inline-flex;
	align-items: center;
	justify-content: center;
	inline-size: 1.1em;
	block-size: 1.1em;
	margin-inline-end: 0.35em;
	font-weight: 700;
	color: var(--white, #fff);
	background-color: var(--coral-700, #c63b40);
	border-radius: var(--radius-pill, 999px);
}

/* --- Choices ----------------------------------------------------------- */

.wh-choices {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
	gap: var(--space-2xs, 0.5rem);
	margin-block-start: var(--space-3xs, 0.25rem);
}

.wh-choice {
	display: flex;
	align-items: flex-start;
	gap: var(--space-2xs, 0.5rem);
	padding: var(--space-2xs, 0.5rem);
	line-height: var(--lh-ui, 1.35);
	border-radius: var(--radius-m, 8px);
	cursor: pointer;
}

.wh-choice:hover {
	background-color: var(--grey-100, #f7f7f7);
}

.wh-choice input[type="checkbox"] {
	inline-size: 1.25rem;
	block-size: 1.25rem;
	min-block-size: 0;
	margin-block-start: 0.15em;
	flex: none;
	accent-color: var(--coral-700, #c63b40);
}

.field--consent {
	font-size: var(--step--1, 0.875rem);
}

.field--consent .wh-choice {
	padding-inline: 0;
}

.field--consent .wh-choice:hover {
	background-color: transparent;
}

/* --- Honeypot ----------------------------------------------------------
 * Off screen rather than display:none, because the simplest bots skip
 * anything that is display none and fill everything else.
 * -------------------------------------------------------------------- */

.wh-hp {
	position: absolute !important;
	inline-size: 1px;
	block-size: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

/* --- Reference row -------------------------------------------------------
 * A quiet line of context, not a highlighted panel. The theme sets the size
 * and the colour; only the line-up belongs here.
 * ---------------------------------------------------------------------- */

.wh-form__ref {
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-3xs, 0.25rem);
	align-items: baseline;
	margin: 0;
}

/* --- Actions, status, notices ------------------------------------------- */

.wh-form__actions {
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-s, 1rem);
	align-items: center;
}

.wh-form__busy {
	font-size: var(--step--1, 0.875rem);
	color: var(--color-text-muted, #484848);
}

.wh-form__busy[hidden] {
	display: none;
}

.wh-form__status:empty {
	display: none;
}

.wh-form__notice,
.wh-form__status:not(:empty) {
	padding: var(--space-xs, 0.75rem) var(--space-s, 1rem);
	margin-block-end: var(--space-m, 1.5rem);
	background-color: var(--color-bg-alt, #eef8fb);
	border-inline-start: 4px solid var(--sky-700, #0b6a7e);
	border-radius: var(--radius-s, 4px);
}

.wh-form__notice--error,
.wh-form__status--error {
	border-inline-start-color: var(--coral-700, #c63b40);
}

.wh-form__done[hidden] {
	display: none;
}

.wh-form__done {
	padding: var(--space-s, 1rem);
	background-color: var(--color-bg-alt, #eef8fb);
	border-inline-start: 4px solid var(--sky-700, #0b6a7e);
	border-radius: var(--radius-s, 4px);
}

.wh-form__done p {
	margin: 0 0 var(--space-2xs, 0.5rem);
}

.wh-form__done p:last-child {
	margin-block-end: 0;
}

.wh-form[data-wayhome-busy="true"] {
	opacity: 0.6;
	pointer-events: none;
}

.wh-form__turnstile {
	min-block-size: 65px;
}

/* --- Dialog ------------------------------------------------------------- */

.wh-dialog {
	inline-size: min(34rem, calc(100vw - 2rem));
	padding: 0;
	color: var(--color-text, #111);
	background-color: var(--color-bg, #fff);
	border: 1px solid var(--color-border, #ebebeb);
	border-radius: var(--radius-l, 16px);
	box-shadow: var(--shadow-2, 0 12px 32px rgb(17 17 17 / 18%));
}

.wh-dialog::backdrop {
	background-color: rgb(17 17 17 / 55%);
}

.wh-dialog__inner {
	position: relative;
	padding: var(--space-l, 2rem);
}

.wh-dialog__close {
	position: absolute;
	inset-block-start: var(--space-2xs, 0.5rem);
	inset-inline-end: var(--space-2xs, 0.5rem);
}

.wh-dialog .wh-form-wrap {
	max-width: none;
}

@media (prefers-reduced-motion: reduce) {
	.wh-form,
	.wh-choice {
		transition: none;
	}
}