/*
 * Home page v3, "bento" (Mark's choice, 7 Oct 2026; docs/design/concepts/home-v3-b-bento.png).
 * Front page only, loaded after components.css. Mobile first: rounded tiles, photo-backed
 * buttons, a pill search bar. Values come from tokens.css.
 */

.home .button {
	border-radius: var(--radius-pill);
}

.home-block {
	padding-block: var(--space-s);
}

.home-block--last {
	padding-bottom: var(--space-xl);
}

@media (min-width: 60rem) {
	.home-block {
		padding-block: var(--space-m);
	}
}

.home .section-header h2 {
	font-size: var(--step-3);
}

.home .section-header .section-header__intro {
	font-size: var(--step-ui);
}

/* Rounded tile: the building block of the page. */
.bento {
	position: relative;
	overflow: hidden;
	border: 1px solid var(--border);
	border-radius: var(--radius-xl);
	background: var(--bg-raised);
	box-shadow: var(--shadow-s);
}

.bento--green {
	border-color: var(--color-green-100);
	background: var(--color-green-50);
}

.bento--sand {
	border-color: transparent;
	background: var(--color-sand);
}

.bento--brand {
	border-color: transparent;
	background: var(--color-green-800);
	color: var(--color-green-100);
}

/* ---------- Hero ---------- */
/* Client feedback 22 Oct 2026: one photo (the old site's couple, on the sand of its banner), the
   headline, and a search bar running the full width with nothing beside it. */
.home-hero {
	position: relative;
	isolation: isolate;
	padding-top: var(--space-m);
	/* Sand with a soft light behind the couple and a darker corner (Mark, 26 Oct 2026: "not a
	   flat colour"), like the old banner. The fine lines are the ::before layer. */
	background:
		radial-gradient(ellipse 45% 70% at 78% 35%, rgb(255 255 255 / 0.65), transparent 70%),
		radial-gradient(ellipse 60% 80% at 0% 100%, rgb(207 226 207 / 0.45), transparent 70%),
		linear-gradient(160deg, var(--color-hero) 0%, var(--color-hero) 45%, var(--color-hero-deep) 100%);
	border-bottom: 1px solid var(--border);
}

/* Fine diagonal lines, strongest towards the right and fading out, for a little texture. */
.home-hero::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background: repeating-linear-gradient(135deg, rgb(255 255 255 / 0.5) 0 1px, transparent 1px 7px);
	-webkit-mask-image: radial-gradient(ellipse 70% 90% at 85% 30%, #000 0%, transparent 75%);
	mask-image: radial-gradient(ellipse 70% 90% at 85% 30%, #000 0%, transparent 75%);
	pointer-events: none;
}

.home-hero__grid {
	display: grid;
	align-items: end;
}

.home-hero__main {
	display: flex;
	flex-direction: column;
	gap: var(--space-xs);
	padding-bottom: var(--space-m);
	min-width: 0;
}

.home-hero__title {
	font-family: var(--font-serif);
	font-weight: 600;
	font-size: var(--step-4);
	line-height: 1.12;
	text-wrap: balance;
}

.home-hero__since {
	display: inline-flex;
	align-items: center;
	gap: var(--space-2xs);
	font-size: var(--step-1);
	font-weight: 600;
	color: var(--color-green-800);
}

.home-hero__photo {
	justify-self: end;
	width: min(100%, 24rem);
	margin: 0;
}

.home-hero__photo img {
	display: block;
	width: 100%;
	height: auto; /* a cut-out on a transparent background (ChatGPT clean-up of the old banner photo) */
	/* The crop at the waist fades out rather than ending in a hard line. */
	-webkit-mask-image: linear-gradient(to bottom, #000 82%, transparent 100%);
	mask-image: linear-gradient(to bottom, #000 82%, transparent 100%);
}

.home-hero__search {
	padding-block: var(--space-m) var(--space-l);
}

.home-hero__find {
	margin-bottom: var(--space-xs);
	font-family: var(--font-serif);
	font-weight: 600;
	font-size: var(--step-2);
}

@media (min-width: 48rem) {
	.home-hero__grid {
		grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
		gap: var(--space-l);
	}

	.home-hero__photo {
		width: 100%;
		max-width: 36rem;
	}

	.home-hero {
		padding-top: var(--space-2xs);
	}
}

@media (min-width: 60rem) {
	/* Less space between the header and the couple (Clive, 24 Nov 2026: "take some space out"). */
	.home-hero {
		padding-top: var(--space-2xs);
	}

	.home-hero__main {
		padding-bottom: var(--space-xl);
	}
}

/* ---------- Search (template-parts/search-hero.php) ----------
 * The old site's three searches side by side (feedback v2), each a white box with its own title,
 * fields and button. Stacked on phones. */
.search-boxes {
	display: grid;
	gap: var(--space-s);
}

.search-box {
	display: flex;
	flex-direction: column;
	gap: var(--space-xs);
	padding: var(--space-s);
	border: 1px solid var(--color-green-100);
	border-radius: var(--radius-l);
	background: var(--bg-raised);
	box-shadow: 0 12px 32px rgb(36 69 43 / 0.1), 0 2px 6px rgb(36 69 43 / 0.06);
}

.search-box__title {
	display: flex;
	align-items: center;
	gap: var(--space-2xs);
	margin: 0;
	font-family: var(--font-sans);
	font-size: var(--step-ui);
	font-weight: 700;
	line-height: 1.25;
	color: var(--brand);
}

.search-box__title .icon {
	flex: none;
}

.search-box__form {
	display: flex;
	flex: 1;
	flex-direction: column;
	gap: var(--space-2xs);
}

.search-box .field {
	gap: 2px;
}

.search-box .field > label {
	font-size: var(--step-small);
	font-weight: 600;
	color: var(--text-soft);
}

.search-box select,
.search-box input {
	min-height: var(--tap);
	background-color: var(--color-canvas);
	font-weight: 600;
}

.search-box .button {
	margin-top: auto; /* the three buttons line up at the bottom of their boxes */
	width: 100%;
}

@media (min-width: 60rem) {
	.search-boxes {
		/* Places has three fields, so it gets a little more room. */
		grid-template-columns: 1.25fr 1fr 1fr;
		align-items: stretch;
	}
}

/* "Please make this drop down more modern" (feedback v2): browsers that can style the open list
   (Chrome and Edge 135+) show it as a soft card with a green tick; others keep their own list. */
@supports (appearance: base-select) {
	.search-box select,
	.search-box select::picker(select) {
		appearance: base-select;
	}

	.search-box select {
		display: flex;
		align-items: center;
		width: 100%;
		padding-inline: var(--space-xs);
		border: 1px solid var(--border);
		border-radius: var(--radius-m);
	}

	/* Keep the site's green chevron (background image) rather than the browser's triangle. */
	.search-box select::picker-icon {
		display: none;
	}

	.search-box select::picker(select) {
		max-height: min(22rem, 60vh);
		margin-top: 4px;
		padding: var(--space-3xs);
		border: 1px solid var(--border);
		border-radius: var(--radius-m);
		background: var(--bg-raised);
		box-shadow: 0 12px 32px rgb(36 69 43 / 0.16);
	}

	.search-box option {
		padding: var(--space-2xs) var(--space-xs);
		border-radius: var(--radius-s);
		font-weight: 500;
	}

	.search-box option:hover,
	.search-box option:focus-visible {
		background: var(--color-green-50);
		outline: none;
	}

	.search-box option:checked {
		font-weight: 700;
		color: var(--brand);
	}

	.search-box option::checkmark {
		color: var(--brand);
	}
}

/* ---------- Numbers ---------- */
.home-stats {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: var(--space-m) var(--space-s);
	padding: var(--space-m);
	list-style: none;
	margin: 0;
}

.home-stat {
	display: flex;
	align-items: flex-start;
	gap: var(--space-xs);
}

.home-stat__icon {
	display: grid;
	place-items: center;
	flex: none;
	width: 2.75rem;
	height: 2.75rem;
	border-radius: 50%;
	background: var(--brand);
	color: #fff;
}

.home-stat__text {
	display: flex;
	flex-direction: column;
	min-width: 0;
	line-height: 1.25;
}

.home-stat__number {
	font-size: var(--step-2);
	font-weight: 700;
	color: var(--color-green-800);
	font-variant-numeric: tabular-nums;
}

.home-stat__label {
	font-size: var(--step-ui);
	color: var(--text);
}

.home-stat__line {
	margin-top: 2px;
	font-size: var(--step-small);
	color: var(--text-soft);
}

@media (max-width: 39.99rem) {
	.home-stat {
		flex-direction: column;
		gap: var(--space-2xs);
	}

	.home-stat__icon {
		width: 2.5rem;
		height: 2.5rem;
	}

	.home-stat__line {
		display: none;
	}
}

@media (min-width: 60rem) {
	.home-stats {
		grid-template-columns: repeat(4, minmax(0, 1fr));
		padding: var(--space-m) var(--space-l);
	}

	.home-stat__icon {
		width: 3.25rem;
		height: 3.25rem;
	}

	.home-stat + .home-stat {
		padding-left: var(--space-m);
		border-left: 1px solid var(--border);
	}
}

/* ---------- Sponsored ---------- */
.home .sponsored-strip {
	padding-block: var(--space-s);
	background: none;
}

.home .sponsored-strip__list {
	gap: var(--space-xs);
	margin-top: var(--space-3xs);
}

/* Banners are made at 290 x 100 (2.9:1): the tile has that shape, so each fills it edge to edge. */
.home .sponsored-tile {
	aspect-ratio: 29 / 10;
	border-radius: var(--radius-l);
	box-shadow: var(--shadow-s);
}

.home .sponsored-tile img {
	padding: 0;
	object-fit: cover;
	transform: scale(1.03); /* trims thin white edges some banners have drawn into the artwork */
}

.home .sponsored-tile--offers > span:last-child {
	display: inline-flex;
	align-items: center;
	gap: var(--space-3xs);
	white-space: nowrap;
}

.home .sponsored-tile--offers {
	display: grid;
	grid-template-columns: auto 1fr;
	align-content: center;
	gap: 0 var(--space-xs);
	border-color: transparent;
	aspect-ratio: 29 / 10;
	padding: var(--space-2xs) var(--space-s);
	background: var(--color-accent-100);
	color: var(--text);
	line-height: 1.3;
}

.home .sponsored-strip__list li {
	display: flex;
	align-items: flex-start;
}

.home .sponsored-tile--offers:hover {
	background: #f7dcc4;
	color: var(--text);
}

.sponsored-tile__icon {
	grid-row: 1 / 3;
	color: var(--cta);
}

.home .sponsored-tile__title {
	color: var(--color-accent-700);
}

/* However many banners there are, the row stays full. */
@media (min-width: 60rem) {
	.home .sponsored-strip__list {
		grid-template-columns: none;
		grid-auto-flow: column;
		grid-auto-columns: minmax(0, 1fr);
	}
}

@media (max-width: 59.99rem) {
	.home .sponsored-strip__list li {
		flex-basis: min(62%, 15rem);
	}
}

/* ---------- Photo tiles: care types and outlying areas ---------- */
.tile-row {
	display: flex;
	gap: var(--space-xs);
	margin: 0 calc(var(--gutter) * -1);
	padding: var(--space-3xs) var(--gutter) var(--space-2xs);
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scroll-padding-inline: var(--gutter);
	list-style: none;
	scrollbar-width: none;
}

.tile-row > li {
	flex: 0 0 min(70%, 16rem);
	scroll-snap-align: start;
}

@media (min-width: 60rem) {
	.tile-row {
		display: grid;
		grid-template-columns: repeat(5, minmax(0, 1fr));
		gap: var(--space-s);
		margin: 0;
		padding: 0;
		overflow: visible;
	}
}

.photo-tile {
	position: relative;
	isolation: isolate;
	display: flex;
	align-items: flex-end;
	width: 100%;
	aspect-ratio: 4 / 3;
	overflow: hidden;
	border-radius: var(--radius-l);
	background: var(--color-green-800);
	color: #fff;
}

.photo-tile > img {
	position: absolute;
	inset: 0;
	z-index: -2;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 400ms var(--ease);
}

.photo-tile::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background: linear-gradient(to top, rgb(16 24 18 / 0.78) 0%, rgb(16 24 18 / 0.35) 38%, transparent 62%);
}

.photo-tile:hover > img {
	transform: scale(1.04);
}

.photo-tile__text {
	flex: 1;
	min-width: 0;
	padding: var(--space-s);
	padding-right: 3rem;
}

.photo-tile__title {
	font-family: var(--font-sans);
	font-size: 1.125rem;
	font-weight: 700;
	line-height: 1.2;
	text-shadow: 0 1px 4px rgb(0 0 0 / 0.35);
}

.photo-tile__link {
	color: #fff;
	text-decoration: none;
}

.photo-tile__link:hover {
	color: #fff;
}

.photo-tile__link::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
}

.photo-tile__link:focus-visible {
	outline: none;
}

.photo-tile:has(.photo-tile__link:focus-visible) {
	outline: 3px solid var(--focus);
	outline-offset: 2px;
}

.photo-tile__line {
	margin-top: 2px;
	font-size: var(--step-small);
	line-height: 1.3;
	color: rgb(255 255 255 / 0.92);
}

.photo-tile__chevron {
	position: absolute;
	right: var(--space-s);
	bottom: var(--space-s);
	display: grid;
	place-items: center;
	width: 2rem;
	height: 2rem;
	border-radius: 50%;
	background: #fff;
	color: var(--text);
	transition: transform var(--duration) var(--ease);
}

.photo-tile:hover .photo-tile__chevron {
	transform: translateX(3px);
}

.photo-tile--region {
	aspect-ratio: 3 / 2;
}

.rail__item > .photo-tile {
	align-self: start;
}

/* ---------- Rails on the home page: four cards a view on desktop ---------- */
.home .rail__track {
	grid-auto-columns: min(72%, 17rem);
	gap: var(--space-s);
}

@media (min-width: 60rem) {
	.home .rail__track {
		grid-auto-columns: calc((100% - 3 * var(--space-s)) / 4);
	}
}

/* Featured listing cards: photo, name and place, a round chevron. */
.home-featured .listing-card {
	border-radius: var(--radius-l);
}

.home-featured .listing-card .card__facts {
	display: none;
}

.home-featured .listing-card .card__body {
	padding: var(--space-xs) 3.25rem var(--space-s) var(--space-s);
}

.home-featured .listing-card .card__chevron {
	position: absolute;
	right: var(--space-s);
	top: 50%;
	transform: translateY(-50%);
	margin: 0;
	width: 2rem;
	height: 2rem;
	background: var(--color-canvas);
	color: var(--text);
}

/* ---------- Tell us what matters most ---------- */
.matters {
	display: grid;
	gap: var(--space-m);
	padding: var(--space-m);
}

.matters__text {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: var(--space-xs);
}

.matters__text h2 {
	font-family: var(--font-serif);
	font-weight: 600;
	font-size: var(--step-3);
}

.matters__text p {
	font-size: var(--step-ui);
	color: var(--text-soft);
}

.matters__list {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(6.5rem, 1fr));
	gap: var(--space-xs);
	list-style: none;
	margin: 0;
	padding: 0;
}

.matter-tile {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: var(--space-2xs);
	height: 100%;
	min-height: 7rem;
	padding: var(--space-s) var(--space-2xs);
	border: 1px solid var(--color-green-100);
	border-radius: var(--radius-l);
	background: #fff;
	color: var(--text);
	font-size: var(--step-ui);
	font-weight: 600;
	line-height: 1.25;
	text-align: center;
	text-decoration: none;
	transition: transform var(--duration) var(--ease), box-shadow var(--duration) var(--ease);
}

@media (max-width: 39.99rem) {
	.matters__list {
		grid-template-columns: 1fr;
		gap: var(--space-2xs);
	}

	.matter-tile {
		flex-direction: row;
		justify-content: flex-start;
		gap: var(--space-xs);
		min-height: var(--tap-l);
		padding: var(--space-2xs) var(--space-s);
		text-align: left;
	}

	.matter-tile .icon {
		width: 24px;
		height: 24px;
	}
}

.matter-tile .icon {
	color: var(--brand);
}

.matter-tile:hover {
	color: var(--text);
	box-shadow: var(--shadow-m);
	transform: translateY(-2px);
}

@media (min-width: 60rem) {
	.matters {
		grid-template-columns: minmax(16rem, 0.8fr) 2fr;
		align-items: center;
		padding: var(--space-l);
	}
}

/* ---------- Partner row ---------- */
.partner-row {
	display: grid;
	gap: var(--space-s);
}

@media (min-width: 60rem) {
	.partner-row {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

/* Banner cards: text on the left, the photo filling the right side and fading in behind it. */
.promo {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 38%;
	min-height: 0;
}

.promo__text {
	position: relative;
	z-index: 1;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: var(--space-2xs);
	padding: var(--space-s) var(--space-2xs) var(--space-s) var(--space-m);
	font-size: var(--step-ui);
	line-height: 1.45;
	color: var(--text-soft);
}

.promo__text .button {
	margin-top: auto;
	padding-inline: var(--space-s);
	white-space: nowrap;
}

.promo__title {
	display: flex;
	align-items: center;
	gap: var(--space-2xs);
	font-family: var(--font-serif);
	font-weight: 600;
	font-size: 1.125rem;
	line-height: 1.2;
	color: var(--text);
}

.promo__mark {
	display: grid;
	place-items: center;
	flex: none;
	color: var(--brand);
}

.promo__mark--facebook {
	width: 2.25rem;
	height: 2.25rem;
	border-radius: 50%;
	background: var(--facebook);
	color: #fff;
}

.promo__photo {
	position: relative;
	margin-left: -1.5rem; /* the faded edge tucks under the text column */
}

.promo__photo img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: 55% 30%;
	-webkit-mask-image: linear-gradient(to right, transparent 0%, #000 35%);
	mask-image: linear-gradient(to right, transparent 0%, #000 35%);
}

/* ---------- Why use Senior Service (the page's own text) ---------- */
.about {
	display: grid;
	gap: var(--space-m);
	padding: var(--space-s);
}

.about__photo {
	position: relative;
	overflow: hidden;
	margin: 0;
	aspect-ratio: 4 / 3;
	border-radius: var(--radius-l);
}

.about__photo img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.about__text {
	padding-inline: var(--space-2xs);
	color: var(--text-soft);
}

.about__text h2 {
	font-family: var(--font-serif);
	font-weight: 600;
	font-size: var(--step-3);
	color: var(--text);
}

@media (min-width: 60rem) {
	.about {
		grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
		align-items: center;
		padding: var(--space-s) var(--space-l) var(--space-s) var(--space-s);
	}

	.about__photo {
		aspect-ratio: auto;
		height: 100%;
		min-height: 18rem;
	}
}

/* ---------- List your facility ---------- */
.cta-band {
	display: grid;
	gap: var(--space-s);
	justify-items: start;
	padding: var(--space-l) var(--space-m);
}

.cta-band__icon {
	color: #fff;
}

.cta-band__text h2 {
	font-family: var(--font-serif);
	font-weight: 600;
	font-size: var(--step-3);
	color: #fff;
}

.cta-band__text p {
	margin-top: var(--space-3xs);
	font-size: var(--step-ui);
}

@media (min-width: 60rem) {
	.cta-band {
		grid-template-columns: auto minmax(0, 1fr) auto;
		align-items: center;
		gap: var(--space-l);
		padding: var(--space-m) var(--space-l);
	}

	.cta-band__icon {
		padding-right: var(--space-l);
		border-right: 1px solid rgb(255 255 255 / 0.25);
	}
}
