/* Homepage v2. Plugin-owned topbar and collage on is_front_page() && is_home()
 * only. Astra masthead is hidden here; footer stays theme-owned.
 * Photograph files live at ../images/home/region-nw.webp,
 * region-ne.webp, region-sw.webp and region-se.webp.
 * Splash artwork is ../images/home/splash.webp (one-file replacement).
 */

.ks-home #masthead,
.ks-home .ast-mobile-header-wrap,
.ks-home #ast-desktop-header,
.ks-home #ast-mobile-header,
.ks-home .main-header-bar,
.ks-home .ast-main-header-wrap {
	display: none !important;
}

.home.blog.ks-home #content,
.ks-home #content,
.home.blog.ks-home .site-content,
.ks-home .site-content {
	padding: 0;
	margin: 0;
}

.home.blog.ast-no-sidebar.ks-home #primary.content-area,
.ks-home.ast-no-sidebar #primary.content-area,
.ks-home #primary.content-area {
	width: 100%;
	max-width: none;
	margin: 0;
	padding: 0;
	background: transparent;
	border: 0;
	box-shadow: none;
}

.ks-home .ast-container,
.ks-home #content > .ast-container {
	max-width: none;
	padding-left: 0;
	padding-right: 0;
}

/* Astra's content wrapper is display:flex; flex-direction:row, which
 * places the plugin topbar beside the hero. Homepage-only: stack them.
 */
.ks-home #content > .ast-container,
.ks-home .site-content > .ast-container {
	display: block;
}

/* Desktop/tablet short pages: let the existing four-photo hero absorb
 * leftover viewport height so the job strip sits at the footer instead
 * of leaving an empty light band. Splash size stays unchanged and
 * centered; photos crop via object-fit. Mobile stays content-driven.
 */
@media (min-width: 641px) {
	.ks-home #content,
	.ks-home .site-content {
		display: flex;
		flex-direction: column;
	}

	.ks-home #content > .ast-container,
	.ks-home .site-content > .ast-container {
		display: flex;
		flex-direction: column;
		flex: 1 1 auto;
		width: 100%;
	}

	.home.blog.ast-no-sidebar.ks-home #primary.content-area,
	.ks-home.ast-no-sidebar #primary.content-area,
	.ks-home #primary.content-area,
	.ks-home #main.site-main,
	.ks-home__page {
		display: flex;
		flex-direction: column;
		flex: 1 1 auto;
		min-height: 0;
	}

	.ks-home__hero {
		flex: 1 1 auto;
	}

	.ks-home__jobs {
		flex: 0 0 auto;
	}
}

.ks-home-topbar {
	position: relative;
	z-index: 3;
	background: #f7f5f0;
	border-bottom: 1px solid #ddd8cf;
}

.ks-home-topbar__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	min-height: 3.25rem;
	padding: 0.65rem 1.25rem;
}

.ks-home-topbar__brand {
	color: #2a2a2a;
	text-decoration: none;
	font-size: 1.125rem;
	font-weight: 800;
	letter-spacing: 0.22em;
	line-height: 1.2;
	text-transform: uppercase;
}

.ks-home-topbar__brand:hover,
.ks-home-topbar__brand:focus {
	color: #2a2a2a;
}

.ks-home-topbar__search {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 2.25rem;
	min-height: 2.25rem;
	color: #2a2a2a;
	text-decoration: none;
}

.ks-home-topbar__search:hover,
.ks-home-topbar__search:focus {
	color: #2a2a2a;
}

.ks-home-topbar__search-text {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
}

.ks-home__page {
	margin: 0;
	padding: 0;
	overflow-x: hidden;
}

.ks-home__hero {
	position: relative;
	min-height: min(44rem, 88vh);
	background: #b7b1a6;
}

.ks-home__scene {
	position: absolute;
	inset: 0;
	display: grid;
	grid-template-columns: 1fr 1fr;
	grid-template-rows: 1fr 1fr;
	gap: 0.2rem;
}

.ks-home__region {
	margin: 0;
	min-width: 0;
	min-height: 0;
	overflow: hidden;
	background: #c5bfb4;
}

.ks-home__region--nw {
	background: #b8b2a8;
}

.ks-home__region--ne {
	background: #c6c0b6;
}

.ks-home__region--sw {
	background: #aea89e;
}

.ks-home__region--se {
	background: #c2bcb2;
}

.ks-home__region-img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.ks-home__read {
	position: absolute;
	inset: 0;
	z-index: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 2.25rem 1.5rem;
}

.ks-home__splash {
	position: absolute;
	left: 50%;
	top: 50%;
	width: min(58rem, 94%);
	height: min(44rem, 94%);
	transform: translate(-50%, -50%);
	background: #ffffff;
	pointer-events: none;
	-webkit-mask-image: url("../images/home/splash.webp");
	mask-image: url("../images/home/splash.webp");
	-webkit-mask-mode: alpha;
	mask-mode: alpha;
	-webkit-mask-source-type: alpha;
	-webkit-mask-repeat: no-repeat;
	mask-repeat: no-repeat;
	-webkit-mask-position: center;
	mask-position: center;
	-webkit-mask-size: 117% 117%;
	mask-size: 117% 117%;
}

.ks-home__copy {
	position: relative;
	z-index: 2;
	width: min(38rem, 62%);
	padding: 0.85rem 1.1rem 1rem;
	text-align: center;
}

.ks-home__headline {
	margin: 0 0 0.42em;
	font-size: clamp(1.45rem, 2.15vw, 1.95rem);
	line-height: 1.18;
	font-weight: 700;
	letter-spacing: -0.015em;
	color: #1e1e1e;
}

.ks-home__lede {
	margin: 0 0 0.95em;
	font-size: 1.0625rem;
	line-height: 1.28;
	font-weight: 500;
	color: #2c2c2c;
}

.ks-home__prompt {
	margin: 0 0 0.5em;
	font-size: 1.125rem;
	font-weight: 700;
	line-height: 1.25;
	color: #1e1e1e;
}

.ks-home__vehicle {
	position: relative;
}

.ks-home__brand-control {
	margin: 0 auto;
	max-width: 24rem;
}

.ks-home__brand-label {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
}

.ks-home__brand-field {
	position: relative;
	display: flex;
	align-items: center;
}

.ks-home__brand-input {
	display: block;
	width: 100%;
	min-height: 2.35rem;
	padding: 0.4rem 2.15rem 0.4rem 2.4rem;
	border: 1px solid #c8c8c8;
	border-radius: 6px;
	background: #fff;
	font-size: 0.9375rem;
	font-weight: 500;
	line-height: 1.3;
	color: #1e1e1e;
}

/* Astra inline input[type=text] uses padding:12px 16px (0,1,1). Match that
 * specificity so the icon gutter applies without changing the outer box.
 */
input.ks-home__brand-input {
	padding-left: 2.75rem;
	padding-right: 2.15rem;
}

/* Astra input[type=text] forces 16px. That fits the 24rem desktop
 * field; tablet/mobile 24rem boxes clip the resting placeholder.
 * Keep desktop padding/type, free a little internal width below 922px.
 */
@media (max-width: 921px) {
	input.ks-home__brand-input {
		padding-left: 2.5rem;
		padding-right: 2rem;
		font-size: 15px;
	}
}

.ks-home__brand-input::placeholder {
	color: #2a2a2a;
	opacity: 1;
	font-weight: 500;
}

.ks-home__brand-car,
.ks-home__brand-chevron {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	pointer-events: none;
	color: #1e1e1e;
}

.ks-home__brand-car {
	left: 0.6rem;
	width: 1.25rem;
	height: 1.25rem;
}

.ks-home__brand-chevron {
	right: 0.5rem;
	width: 1.125rem;
	height: 1.125rem;
}

.ks-home__brand-car path,
.ks-home__brand-car circle,
.ks-home__brand-chevron path {
	stroke-width: 2;
}

.ks-home__brands,
.ks-home__generations,
.ks-home__jobs-list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.ks-home__brands {
	display: none;
	position: absolute;
	left: 50%;
	top: calc(100% + 0.3rem);
	z-index: 3;
	width: min(24rem, 100%);
	max-height: 11rem;
	overflow: auto;
	transform: translateX(-50%);
	padding: 0.35rem 0.7rem 0.45rem;
	border: 1px solid #d8d8d8;
	border-radius: 6px;
	background: #fff;
	text-align: left;
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
}

.ks-home__vehicle:focus-within .ks-home__brands {
	display: block;
}

.ks-home__brand + .ks-home__brand {
	margin-top: 0.35rem;
}

.ks-home__brand summary {
	cursor: pointer;
	font-size: 0.9375rem;
	line-height: 1.4;
	color: #1e1e1e;
}

.ks-home__generations {
	margin: 0.35rem 0 0.15rem 0.9rem;
}

.ks-home__generations a {
	display: inline-block;
	padding: 0.3rem 0;
	font-size: 0.9375rem;
	line-height: 1.4;
	color: #045cb4;
}

.ks-home__jobs {
	background: #fff;
	border-top: 1px solid #e6e1d8;
	padding: 0.8rem 1.25rem 0.9rem;
}

.ks-home__jobs-list {
	display: flex;
	flex-wrap: nowrap;
	justify-content: space-between;
	gap: 0;
}

.ks-home__job-item {
	flex: 1 1 0;
	min-width: 0;
	padding: 0 1rem;
	border-right: 1px solid #e4e4e4;
}

.ks-home__job-item:first-child {
	padding-left: 0;
}

.ks-home__job-item:last-child {
	padding-right: 0;
	border-right: 0;
}

.ks-home__job {
	display: flex;
	flex-direction: row;
	align-items: flex-start;
	gap: 0.6rem;
	min-height: 0;
	color: #2a2a2a;
	text-decoration: none;
	cursor: default;
}

a.ks-home__job--link {
	cursor: pointer;
}

a.ks-home__job--link:hover .ks-home__job-title,
a.ks-home__job--link:focus .ks-home__job-title {
	color: #045cb4;
}

.ks-home__job-icon {
	flex: 0 0 auto;
	width: 1.25rem;
	height: 1.25rem;
	margin-top: 0.12rem;
	color: #2a2a2a;
}

.ks-home__job-icon svg {
	display: block;
	width: 1.25rem;
	height: 1.25rem;
}

.ks-home__job-text {
	display: flex;
	flex-direction: column;
	gap: 0.12rem;
	min-width: 0;
}

.ks-home__job-title {
	font-size: 0.9rem;
	font-weight: 700;
	line-height: 1.3;
}

.ks-home__job-subline {
	font-size: 0.8125rem;
	line-height: 1.35;
	color: #6b6b6b;
}

@media (max-width: 640px) {
	.ks-home-topbar__inner {
		padding: 0.55rem 0.9rem;
	}

	.ks-home__hero {
		position: relative;
		min-height: 0;
		display: flex;
		flex-direction: column;
		background: #fff;
	}

	.ks-home__read {
		position: relative;
		order: 1;
		padding: 1.25rem 1rem 1.5rem;
		background: #fff;
	}

	.ks-home__splash {
		inset: 0;
		width: 100%;
		height: 100%;
		transform: none;
		left: 0;
		top: 0;
		-webkit-mask-image: none;
		mask-image: none;
		background: #fff;
	}

	.ks-home__copy {
		width: 100%;
		padding: 0.5rem 0 0;
		text-align: left;
	}

	.ks-home__headline {
		font-size: 1.5rem;
		font-weight: 700;
	}

	.ks-home__lede,
	.ks-home__prompt,
	.ks-home__brand summary,
	.ks-home__generations a {
		font-size: 1.0625rem;
	}

	.ks-home__brand-control {
		max-width: none;
		margin: 0;
	}

	.ks-home__brands {
		left: 0;
		width: 100%;
		transform: none;
	}

	.ks-home__scene {
		position: relative;
		order: 2;
		display: block;
		height: 28vh;
		min-height: 7.5rem;
		max-height: 12rem;
		gap: 0;
	}

	.ks-home__region--ne,
	.ks-home__region--sw,
	.ks-home__region--se {
		display: none;
	}

	.ks-home__region--nw {
		height: 100%;
	}

	.ks-home__jobs-list {
		flex-direction: column;
		flex-wrap: nowrap;
	}

	.ks-home__job-item {
		flex: 1 1 auto;
		min-width: 0;
		width: 100%;
		padding: 0.45rem 0;
		border-right: 0;
		border-bottom: 1px solid #ececec;
	}

	.ks-home__job-item:first-child,
	.ks-home__job-item:last-child {
		padding-left: 0;
		padding-right: 0;
	}

	.ks-home__job-item:last-child {
		border-bottom: 0;
	}

	.ks-home__job {
		min-height: 0;
		padding: 0.15rem 0;
	}

	.ks-home__job-title {
		font-size: 1.0625rem;
	}

	.ks-home__job-subline {
		font-size: 1rem;
	}
}
