/**
 * Pilbe — Search Landing
 *
 * Shared styles for the for-sale, to-rent and new-builds page templates.
 * Scoped entirely under .psl-page. Tokens only — no raw hex literals.
 *
 * @package Pilbe
 * @version 1.0.0
 */

/* ================================================================
   ROOT / LAYOUT
   ================================================================ */
.psl-page {
	font-family: var(--pilbe-font);
	color: var(--pilbe-text-primary);
	background: var(--pilbe-bg-page);
	font-size: var(--pilbe-text-base);
	line-height: var(--pilbe-lh-base);
	font-weight: 400;
	-webkit-font-smoothing: antialiased;
}

.psl-page *,
.psl-page *::before,
.psl-page *::after {
	box-sizing: border-box;
}

.psl-shell {
	width: 100%;
	max-width: 1140px;
	margin: 0 auto;
	padding-left: var(--pilbe-space-5);
	padding-right: var(--pilbe-space-5);
}

.psl-section {
	padding-top: var(--pilbe-space-16);
	padding-bottom: var(--pilbe-space-16);
}

.psl-page h1,
.psl-page h2,
.psl-page h3 {
	margin: 0;
	color: var(--pilbe-text-primary);
	font-weight: 700;
}

.psl-page p {
	margin: 0;
}

/* ================================================================
   BUTTONS
   ================================================================ */
.psl-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: var(--pilbe-space-2);
	font-family: var(--pilbe-font);
	font-size: var(--pilbe-text-base);
	font-weight: 700;
	line-height: 1;
	border: 1px solid transparent;
	border-radius: var(--pilbe-radius-md);
	padding: var(--pilbe-space-3) var(--pilbe-space-5);
	cursor: pointer;
	text-decoration: none;
	white-space: nowrap;
	transition: background-color var(--pilbe-duration-fast) var(--pilbe-ease-standard),
		box-shadow var(--pilbe-duration-fast) var(--pilbe-ease-standard),
		transform var(--pilbe-duration-fast) var(--pilbe-ease-standard);
}

/* Solid brand-blue — used for the hero search submit (not the gradient). */
.psl-btn--primary {
	background: var(--pilbe-brand-500);
	color: var(--pilbe-text-inverse);
}

.psl-btn--primary:hover {
	background: var(--pilbe-brand-600);
	box-shadow: var(--pilbe-shadow-md);
}

/* Gradient — the single primary CTA per page (bottom of page). */
.psl-btn--gradient {
	background: var(--pilbe-gradient);
	color: var(--pilbe-text-inverse);
}

.psl-btn--gradient:hover {
	background: var(--pilbe-gradient-hover);
	box-shadow: var(--pilbe-shadow-lg);
	transform: translateY(-2px);
}

.psl-btn--lg {
	padding: var(--pilbe-space-4) var(--pilbe-space-8);
	font-size: var(--pilbe-text-lg);
}

/* ================================================================
   HERO
   ================================================================ */
.psl-hero {
	padding-top: var(--pilbe-space-20);
	padding-bottom: var(--pilbe-space-20);
	background: var(--pilbe-bg-surface);
	border-bottom: 1px solid var(--pilbe-border-default);
}

.psl-hero .psl-shell {
	max-width: 860px;
	text-align: center;
}

.psl-hero-kicker {
	display: inline-block;
	font-size: var(--pilbe-text-sm);
	font-weight: 700;
	color: var(--pilbe-brand-600);
	margin-bottom: var(--pilbe-space-4);
}

.psl-hero-title {
	font-size: var(--pilbe-text-display);
	line-height: var(--pilbe-lh-display);
	font-weight: 900;
	letter-spacing: -0.02em;
	margin-bottom: var(--pilbe-space-5);
}

.psl-hero-lead {
	font-size: var(--pilbe-text-lg);
	line-height: var(--pilbe-lh-lg);
	color: var(--pilbe-text-secondary);
	max-width: 680px;
	margin: 0 auto var(--pilbe-space-10);
}

/* ── Search bar ─────────────────────────────────────────────── */
.psl-searchbar {
	display: flex;
	align-items: flex-end;
	gap: var(--pilbe-space-3);
	background: var(--pilbe-bg-surface);
	border: 1px solid var(--pilbe-border-default);
	border-radius: var(--pilbe-radius-xl);
	padding: var(--pilbe-space-4);
	box-shadow: var(--pilbe-shadow-md);
	max-width: 720px;
	margin: 0 auto;
	text-align: left;
}

.psl-searchbar-field {
	flex: 1 1 auto;
	display: flex;
	flex-direction: column;
	gap: var(--pilbe-space-2);
	min-width: 0;
}

.psl-searchbar-label {
	font-size: var(--pilbe-text-sm);
	line-height: var(--pilbe-lh-sm);
	font-weight: 700;
	color: var(--pilbe-text-primary);
	padding-left: var(--pilbe-space-1);
}

.psl-searchbar-input {
	display: flex;
	align-items: center;
	gap: var(--pilbe-space-3);
	background: var(--pilbe-bg-subtle);
	border: 1px solid var(--pilbe-border-default);
	border-radius: var(--pilbe-radius-md);
	padding: 0 var(--pilbe-space-4);
	transition: border-color var(--pilbe-duration-fast) var(--pilbe-ease-standard),
		box-shadow var(--pilbe-duration-fast) var(--pilbe-ease-standard);
}

.psl-searchbar-input:focus-within {
	border-color: var(--pilbe-border-focus);
	box-shadow: var(--pilbe-shadow-focus);
	background: var(--pilbe-bg-surface);
}

.psl-searchbar-input i {
	color: var(--pilbe-text-secondary);
	font-size: var(--pilbe-icon-sm);
	flex: 0 0 auto;
}

.psl-searchbar-input input {
	flex: 1 1 auto;
	min-width: 0;
	border: 0;
	background: transparent;
	font-family: var(--pilbe-font);
	font-size: var(--pilbe-text-base);
	line-height: var(--pilbe-lh-base);
	color: var(--pilbe-text-primary);
	padding: var(--pilbe-space-3) 0;
}

.psl-searchbar-input input::placeholder {
	color: var(--pilbe-text-muted);
}

.psl-searchbar-input input:focus {
	outline: none;
}

.psl-searchbar .psl-btn {
	flex: 0 0 auto;
	height: 48px;
}

/* ── Hero trust row ─────────────────────────────────────────── */
.psl-hero-trust {
	list-style: none;
	margin: var(--pilbe-space-8) 0 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: var(--pilbe-space-3) var(--pilbe-space-8);
}

.psl-hero-trust li {
	display: inline-flex;
	align-items: center;
	gap: var(--pilbe-space-2);
	font-size: var(--pilbe-text-sm);
	line-height: var(--pilbe-lh-sm);
	color: var(--pilbe-text-secondary);
	font-weight: 700;
}

.psl-hero-trust i {
	color: var(--pilbe-brand-500);
	font-size: var(--pilbe-icon-sm);
}

/* ================================================================
   SECTION HEADINGS
   ================================================================ */
.psl-section-head {
	margin-bottom: var(--pilbe-space-10);
	max-width: 680px;
}

.psl-section-head--row {
	max-width: none;
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: var(--pilbe-space-6);
	flex-wrap: wrap;
}

.psl-section-title {
	font-size: var(--pilbe-text-h2);
	line-height: var(--pilbe-lh-h2);
	font-weight: 700;
	letter-spacing: -0.01em;
}

.psl-section-sub {
	margin-top: var(--pilbe-space-3);
	font-size: var(--pilbe-text-lg);
	line-height: var(--pilbe-lh-lg);
	color: var(--pilbe-text-secondary);
}

.psl-textlink {
	display: inline-flex;
	align-items: center;
	gap: var(--pilbe-space-2);
	font-size: var(--pilbe-text-base);
	font-weight: 700;
	color: var(--pilbe-text-link);
	text-decoration: none;
	white-space: nowrap;
	transition: color var(--pilbe-duration-fast) var(--pilbe-ease-standard);
}

.psl-textlink:hover {
	color: var(--pilbe-brand-700);
}

.psl-textlink i {
	font-size: var(--pilbe-icon-xs);
	transition: transform var(--pilbe-duration-fast) var(--pilbe-ease-standard);
}

.psl-textlink:hover i {
	transform: translateX(3px);
}

/* ================================================================
   POPULAR LOCATIONS / CHIPS
   ================================================================ */
.psl-locations {
	padding-top: var(--pilbe-space-16);
	padding-bottom: var(--pilbe-space-8);
}

.psl-chips {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: var(--pilbe-space-3);
}

.psl-chip {
	display: inline-flex;
	align-items: center;
	gap: var(--pilbe-space-2);
	background: var(--pilbe-bg-surface);
	border: 1px solid var(--pilbe-border-default);
	border-radius: var(--pilbe-radius-pill);
	padding: var(--pilbe-space-3) var(--pilbe-space-5);
	font-size: var(--pilbe-text-base);
	font-weight: 700;
	color: var(--pilbe-text-primary);
	text-decoration: none;
	box-shadow: var(--pilbe-shadow-xs);
	transition: border-color var(--pilbe-duration-fast) var(--pilbe-ease-standard),
		color var(--pilbe-duration-fast) var(--pilbe-ease-standard),
		box-shadow var(--pilbe-duration-fast) var(--pilbe-ease-standard),
		transform var(--pilbe-duration-fast) var(--pilbe-ease-standard);
}

.psl-chip i {
	color: var(--pilbe-brand-500);
	font-size: var(--pilbe-icon-sm);
}

.psl-chip:hover {
	border-color: var(--pilbe-brand-300);
	color: var(--pilbe-brand-700);
	box-shadow: var(--pilbe-shadow-sm);
	transform: translateY(-2px);
}

.psl-chip--ghost {
	background: transparent;
	border-style: dashed;
	border-color: var(--pilbe-border-strong);
	color: var(--pilbe-text-secondary);
}

.psl-chip--ghost:hover {
	border-style: solid;
}

/* ================================================================
   FEATURED GRID + LISTING CARDS
   ================================================================ */
.psl-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: var(--pilbe-space-6);
}

.psl-card {
	display: flex;
	flex-direction: column;
	background: var(--pilbe-bg-surface);
	border: 1px solid var(--pilbe-border-default);
	border-radius: var(--pilbe-radius-lg);
	box-shadow: var(--pilbe-shadow-sm);
	overflow: hidden;
	transition: box-shadow var(--pilbe-duration-base) var(--pilbe-ease-standard),
		transform var(--pilbe-duration-base) var(--pilbe-ease-standard);
}

.psl-card:hover {
	box-shadow: var(--pilbe-shadow-lg);
	transform: translateY(-2px);
}

.psl-card-media {
	position: relative;
	display: block;
	aspect-ratio: 4 / 3;
	background: var(--pilbe-bg-subtle);
	overflow: hidden;
}

.psl-card-img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform var(--pilbe-duration-slow) var(--pilbe-ease-standard);
}

.psl-card:hover .psl-card-img {
	transform: scale(1.04);
}

.psl-card-img--placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--pilbe-text-muted);
	font-size: var(--pilbe-icon-2xl);
}

.psl-card-badge {
	position: absolute;
	top: var(--pilbe-space-3);
	left: var(--pilbe-space-3);
	background: var(--pilbe-brand-500);
	color: var(--pilbe-text-inverse);
	font-size: var(--pilbe-text-xs);
	line-height: var(--pilbe-lh-xs);
	font-weight: 700;
	padding: var(--pilbe-space-1) var(--pilbe-space-3);
	border-radius: var(--pilbe-radius-pill);
}

.psl-card-flag {
	position: absolute;
	top: var(--pilbe-space-3);
	right: var(--pilbe-space-3);
	background: var(--pilbe-bg-surface);
	color: var(--pilbe-text-primary);
	font-size: var(--pilbe-text-xs);
	line-height: var(--pilbe-lh-xs);
	font-weight: 700;
	padding: var(--pilbe-space-1) var(--pilbe-space-3);
	border-radius: var(--pilbe-radius-pill);
	box-shadow: var(--pilbe-shadow-xs);
}

.psl-card-body {
	display: flex;
	flex-direction: column;
	gap: var(--pilbe-space-2);
	padding: var(--pilbe-space-5);
}

.psl-card-price {
	font-size: var(--pilbe-text-h3);
	line-height: var(--pilbe-lh-h3);
	font-weight: 900;
	color: var(--pilbe-text-primary);
}

.psl-card-price-postfix {
	font-size: var(--pilbe-text-sm);
	font-weight: 400;
	color: var(--pilbe-text-secondary);
}

.psl-card-title {
	font-size: var(--pilbe-text-h4);
	line-height: var(--pilbe-lh-h4);
	font-weight: 700;
}

.psl-card-title a {
	color: var(--pilbe-text-primary);
	text-decoration: none;
}

.psl-card-title a:hover {
	color: var(--pilbe-brand-600);
}

.psl-card-address {
	display: flex;
	align-items: flex-start;
	gap: var(--pilbe-space-2);
	font-size: var(--pilbe-text-sm);
	line-height: var(--pilbe-lh-sm);
	color: var(--pilbe-text-secondary);
}

.psl-card-address i {
	color: var(--pilbe-text-muted);
	font-size: var(--pilbe-icon-xs);
	margin-top: 3px;
	flex: 0 0 auto;
}

.psl-card-specs {
	list-style: none;
	margin: var(--pilbe-space-2) 0 0;
	padding: var(--pilbe-space-4) 0 0;
	border-top: 1px solid var(--pilbe-border-default);
	display: flex;
	flex-wrap: wrap;
	gap: var(--pilbe-space-2) var(--pilbe-space-5);
}

.psl-card-specs li {
	display: inline-flex;
	align-items: center;
	gap: var(--pilbe-space-2);
	font-size: var(--pilbe-text-sm);
	line-height: var(--pilbe-lh-sm);
	font-weight: 700;
	color: var(--pilbe-text-primary);
}

.psl-card-specs i {
	color: var(--pilbe-brand-500);
	font-size: var(--pilbe-icon-sm);
}

.psl-card-spec-unit {
	font-weight: 400;
	color: var(--pilbe-text-secondary);
}

/* ── Empty state ────────────────────────────────────────────── */
.psl-empty {
	text-align: center;
	background: var(--pilbe-bg-surface);
	border: 1px dashed var(--pilbe-border-strong);
	border-radius: var(--pilbe-radius-lg);
	padding: var(--pilbe-space-16) var(--pilbe-space-6);
}

.psl-empty i {
	font-size: var(--pilbe-icon-2xl);
	color: var(--pilbe-brand-300);
	margin-bottom: var(--pilbe-space-4);
}

.psl-empty h3 {
	font-size: var(--pilbe-text-h3);
	line-height: var(--pilbe-lh-h3);
	margin-bottom: var(--pilbe-space-3);
}

.psl-empty p {
	font-size: var(--pilbe-text-base);
	line-height: var(--pilbe-lh-base);
	color: var(--pilbe-text-secondary);
	max-width: 480px;
	margin: 0 auto;
}

/* ================================================================
   EXPLAINER CARD (new-builds)
   ================================================================ */
.psl-explain {
	padding-top: var(--pilbe-space-12);
	padding-bottom: 0;
}

.psl-explain-card {
	display: flex;
	gap: var(--pilbe-space-5);
	background: var(--pilbe-brand-50);
	border: 1px solid var(--pilbe-brand-100);
	border-radius: var(--pilbe-radius-lg);
	padding: var(--pilbe-space-6) var(--pilbe-space-8);
}

.psl-explain-icon {
	flex: 0 0 auto;
	color: var(--pilbe-brand-600);
	font-size: var(--pilbe-icon-lg);
	line-height: 1;
	margin-top: 2px;
}

.psl-explain-title {
	font-size: var(--pilbe-text-h3);
	line-height: var(--pilbe-lh-h3);
	margin-bottom: var(--pilbe-space-2);
}

.psl-explain-body p {
	font-size: var(--pilbe-text-base);
	line-height: var(--pilbe-lh-base);
	color: var(--pilbe-text-primary);
}

.psl-explain-body strong {
	font-weight: 700;
}

/* ================================================================
   HELP / GUIDANCE CARDS
   ================================================================ */
.psl-help {
	background: var(--pilbe-bg-surface);
	border-top: 1px solid var(--pilbe-border-default);
	border-bottom: 1px solid var(--pilbe-border-default);
}

.psl-help-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: var(--pilbe-space-6);
}

.psl-help-card {
	background: var(--pilbe-bg-page);
	border: 1px solid var(--pilbe-border-default);
	border-radius: var(--pilbe-radius-lg);
	padding: var(--pilbe-space-6);
}

.psl-help-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	border-radius: var(--pilbe-radius-md);
	background: var(--pilbe-brand-50);
	color: var(--pilbe-brand-600);
	font-size: var(--pilbe-icon-md);
	margin-bottom: var(--pilbe-space-4);
}

.psl-help-card h3 {
	font-size: var(--pilbe-text-h4);
	line-height: var(--pilbe-lh-h4);
	margin-bottom: var(--pilbe-space-2);
}

.psl-help-card p {
	font-size: var(--pilbe-text-base);
	line-height: var(--pilbe-lh-base);
	color: var(--pilbe-text-secondary);
}

/* ================================================================
   PRIMARY CTA BAND
   ================================================================ */
.psl-cta {
	padding-top: var(--pilbe-space-16);
	padding-bottom: var(--pilbe-space-16);
}

.psl-cta-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--pilbe-space-8);
	background: var(--pilbe-neutral-950);
	border-radius: var(--pilbe-radius-2xl);
	padding: var(--pilbe-space-12);
}

.psl-cta-title {
	font-size: var(--pilbe-text-h2);
	line-height: var(--pilbe-lh-h2);
	font-weight: 900;
	color: var(--pilbe-text-inverse);
	margin-bottom: var(--pilbe-space-2);
}

.psl-cta-sub {
	font-size: var(--pilbe-text-lg);
	line-height: var(--pilbe-lh-lg);
	color: var(--pilbe-neutral-300);
	max-width: 520px;
}

.psl-cta .psl-btn {
	flex: 0 0 auto;
}

/* ================================================================
   RESPONSIVE
   ================================================================ */
@media (max-width: 920px) {
	.psl-grid,
	.psl-help-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 768px) {
	.psl-hero {
		padding-top: var(--pilbe-space-12);
		padding-bottom: var(--pilbe-space-12);
	}

	.psl-hero-title {
		font-size: var(--pilbe-text-h1);
		line-height: var(--pilbe-lh-h1);
	}

	.psl-section {
		padding-top: var(--pilbe-space-12);
		padding-bottom: var(--pilbe-space-12);
	}

	.psl-searchbar {
		flex-direction: column;
		align-items: stretch;
	}

	.psl-searchbar .psl-btn {
		width: 100%;
	}

	.psl-cta-inner {
		flex-direction: column;
		align-items: flex-start;
		padding: var(--pilbe-space-8);
	}
}

@media (max-width: 560px) {
	.psl-grid,
	.psl-help-grid {
		grid-template-columns: 1fr;
	}

	.psl-hero-title {
		font-size: var(--pilbe-text-h2);
		line-height: var(--pilbe-lh-h2);
	}

	.psl-explain-card {
		flex-direction: column;
		gap: var(--pilbe-space-3);
		padding: var(--pilbe-space-5);
	}
}

/* ================================================================
   REDUCED MOTION
   ================================================================ */
@media (prefers-reduced-motion: reduce) {
	.psl-page * {
		transition: none !important;
	}

	.psl-card:hover .psl-card-img {
		transform: none;
	}

	.psl-chip:hover,
	.psl-card:hover,
	.psl-btn--gradient:hover {
		transform: none;
	}
}
