/**
 * Page Sections: Split banner.
 *
 * Full-bleed 50/50 split: image on one side, coloured copy block on the other.
 * Image side / copy side are reversed by the `--img-right` modifier.
 * No vertical .section padding — this is intentionally edge-to-edge.
 */

.ps-splitbanner {
	width: 100%;
	display: grid;
	grid-template-columns: 1fr 1fr;
	align-items: stretch;
	min-height: 460px;
	overflow: hidden;
}

/* Image-on-right reverses the visual order without touching the DOM. */
.ps-splitbanner--img-right .ps-splitbanner__media { order: 2; }
.ps-splitbanner--img-right .ps-splitbanner__copy  { order: 1; }

/* ---- Media side ---- */

.ps-splitbanner__media {
	position: relative;
	min-height: 100%;
	min-width: 0;
	background: var(--sand);
	aspect-ratio: 4 / 3;
}

.ps-splitbanner__img,
.ps-splitbanner__media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
	position: absolute;
	inset: 0;
}

/* ---- Copy side ---- */

.ps-splitbanner__copy {
	display: flex;
	align-items: center;
	justify-content: flex-start;
	padding: clamp(40px, 6vw, 80px);
	min-width: 0;
}

.ps-splitbanner__inner {
	width: 100%;
	max-width: 480px;
}

.ps-splitbanner__eyebrow {
	color: var(--red);
	margin: 0 0 .6em;
}

/* Red eyebrow is illegible on the green panel — reverse it to white there. */
.ps-splitbanner--green .ps-splitbanner__eyebrow {
	color: rgba(255, 255, 255, .85);
}

.ps-splitbanner__heading {
	font-family: var(--font-heading);
	font-size: clamp(2rem, 3.6vw, 3rem);
	line-height: 1.1;
	margin: 0 0 .45em;
	letter-spacing: .005em;
}

.ps-splitbanner__text {
	font-size: 1.02rem;
	line-height: 1.6;
	margin: 0 0 1.6em;
	max-width: 52ch;
}

.ps-splitbanner__cta {
	margin-top: .5em;
}

/* ---- Colour variants ---- */

.ps-splitbanner--plum  .ps-splitbanner__copy { background: var(--plum); }
.ps-splitbanner--teal  .ps-splitbanner__copy { background: var(--teal); }
.ps-splitbanner--green .ps-splitbanner__copy { background: var(--green); }
.ps-splitbanner--sand  .ps-splitbanner__copy { background: var(--sand); }

/* Dark backgrounds: heading, body, and CTA text all reverse to white. */
.ps-splitbanner--plum  .ps-splitbanner__heading,
.ps-splitbanner--teal  .ps-splitbanner__heading,
.ps-splitbanner--green .ps-splitbanner__heading {
	color: #fff;
}

.ps-splitbanner--plum  .ps-splitbanner__text,
.ps-splitbanner--teal  .ps-splitbanner__text,
.ps-splitbanner--green .ps-splitbanner__text {
	color: rgba(255, 255, 255, .88);
}

/* Sand keeps the teal text for legibility. */
.ps-splitbanner--sand .ps-splitbanner__heading,
.ps-splitbanner--sand .ps-splitbanner__text {
	color: var(--teal);
}

/* Inverted CTA on dark backgrounds: white pill with teal text. */
.ps-splitbanner__btn--invert {
	background: #fff;
	color: var(--teal);
	border-color: #fff;
}

.ps-splitbanner__btn--invert:hover {
	background: var(--cream);
	color: var(--teal);
	border-color: var(--cream);
}

/* Desktop — give the copy block more room and a slightly bigger heading */
@media (min-width: 1024px) {
	.ps-splitbanner { min-height: 460px; }
	.ps-splitbanner__inner { max-width: 500px; }
	.ps-splitbanner__text { font-size: 1.04rem; }
}

@media (min-width: 1280px) {
	.ps-splitbanner { min-height: 480px; }
	.ps-splitbanner__inner { max-width: 520px; }
}

/* Tablet — landscape: tighter heading, narrower copy block */
@media (min-width: 861px) and (max-width: 1023px) {
	.ps-splitbanner { min-height: 380px; }
	.ps-splitbanner__inner { max-width: 420px; }
	.ps-splitbanner__heading { font-size: clamp(1.6rem, 3.4vw, 2.2rem); }
}

/* ---- Responsive ---- */

@media (max-width: 860px) {
	.ps-splitbanner {
		grid-template-columns: 1fr;
		min-height: 0;
	}
	/* Image always goes on top when stacked, regardless of left/right setting. */
	.ps-splitbanner__media,
	.ps-splitbanner--img-right .ps-splitbanner__media {
		order: 1;
		aspect-ratio: 16 / 10;
	}
	.ps-splitbanner__copy,
	.ps-splitbanner--img-right .ps-splitbanner__copy {
		order: 2;
		padding: clamp(28px, 6vw, 56px) clamp(20px, 5vw, 40px);
	}
	.ps-splitbanner__inner { max-width: none; }
}

@media (max-width: 479px) {
	/* Match the ≤860 selector pair so the --img-right variant is also covered. */
	.ps-splitbanner__media,
	.ps-splitbanner--img-right .ps-splitbanner__media {
		aspect-ratio: 4 / 3;
	}
	.ps-splitbanner__copy,
	.ps-splitbanner--img-right .ps-splitbanner__copy {
		padding: 28px 20px 32px;
	}
	.ps-splitbanner__heading {
		font-size: clamp(1.6rem, 7vw, 2.1rem);
	}
	.ps-splitbanner__text {
		font-size: .98rem;
		margin-bottom: 1.3em;
	}
}
