/**
 * Keystone Theme — Split Section component
 *
 * Reusable two-column image + content layout.
 * Supports dark / light / grey variants and image-left / image-right ordering.
 *
 * BEM: .keystone-split
 *   Modifiers: --dark  --grey  --flip (reverses column order)
 *   Elements:  __inner  __content  __eyebrow  __heading  __body  __cta  __image
 */

/* ── Full-bleed wrapper ─────────────────────────────────────────────────────── */
.keystone-split {
	width: 100vw !important;
	max-width: none !important;
	position: relative;
	left: 50%;
	transform: translateX(-50%);
	padding-block: clamp(3.5rem, 7vw, 6rem);
	margin-block: 0;
}

/* ── Background variants ────────────────────────────────────────────────────── */
.keystone-split--dark {
	background: linear-gradient(160deg, #0a1828 0%, #1a1a72 100%);
	color: #fff;
}

.keystone-split--grey {
	background: #f5f6fa;
}

/* ── Constrained inner row ──────────────────────────────────────────────────── */
.keystone-split__inner {
	max-width: var(--wp--style--global--wide-size, 1340px);
	margin-inline: auto;
	padding-inline: var(--wp--preset--spacing--50, clamp(20px, 4vw, 50px));
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: clamp(2rem, 5vw, 5rem);
	align-items: center;
}

/* ── Flip: image on right (content left, image right) ─────────────────────── */
.keystone-split--flip .keystone-split__image {
	order: 2;
}
.keystone-split--flip .keystone-split__content {
	order: 1;
}

/* ── Content column ─────────────────────────────────────────────────────────── */
.keystone-split__content {
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.keystone-split__eyebrow {
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: #4a9eff;
	margin: 0;
}

.keystone-split--dark .keystone-split__eyebrow {
	color: #7fb3ff;
}

.keystone-split__heading {
	font-size: clamp(1.75rem, 3.5vw, 2.75rem);
	font-weight: 900;
	line-height: 1.1;
	letter-spacing: -0.02em;
	margin: 0;
	color: inherit;
}

.keystone-split--dark .keystone-split__heading {
	color: #ffffff;
}

.keystone-split__subheading {
	font-size: clamp(1rem, 1.5vw, 1.2rem);
	font-weight: 700;
	margin: 0;
	color: inherit;
}

.keystone-split--dark .keystone-split__subheading {
	color: rgba(255, 255, 255, 0.9);
}

.keystone-split__body {
	font-size: clamp(0.9rem, 1.2vw, 1rem);
	line-height: 1.75;
	color: var(--wp--preset--color--accent-4, #64748b);
	margin: 0;
}

.keystone-split--dark .keystone-split__body {
	color: rgba(255, 255, 255, 0.7);
}

.keystone-split__body + .keystone-split__body {
	margin-top: 0.5rem;
}

.keystone-split__body a {
	color: #4a9eff;
	text-decoration: none;
}
.keystone-split__body a:hover {
	text-decoration: underline;
}

.keystone-split__cta {
	margin-top: 0.5rem;
}

.keystone-split__cta a {
	display: inline-block;
	background: #1a1a72;
	color: #fff;
	font-size: 14px;
	font-weight: 700;
	padding: 12px 28px;
	border-radius: 6px;
	text-decoration: none;
	transition: background 0.2s;
}
.keystone-split__cta a:hover {
	background: #2a2aaa;
}

.keystone-split--dark .keystone-split__cta a {
	background: #fff;
	color: #1a1a72;
}
.keystone-split--dark .keystone-split__cta a:hover {
	background: rgba(255,255,255,0.9);
}

/* ── Image column ───────────────────────────────────────────────────────────── */
.keystone-split__image img {
	width: 100%;
	height: auto;
	border-radius: var(--keystone-card-radius, 12px);
	display: block;
}

.keystone-split--dark .keystone-split__image img {
	border-radius: var(--keystone-card-radius, 12px);
	box-shadow: 0 24px 64px rgba(0, 0, 0, 0.4);
}

/* ── Prose: single-column text-only variant ─────────────────────────────────── */
.keystone-split--prose .keystone-split__inner {
	grid-template-columns: 1fr;
	max-width: var(--wp--style--global--wide-size, 1340px);
}

/* ── Responsive: tablet ─────────────────────────────────────────────────────── */
@media (max-width: 900px) {
	.keystone-split__inner {
		grid-template-columns: 1fr;
		gap: 2rem;
	}
	.keystone-split--flip .keystone-split__image,
	.keystone-split--flip .keystone-split__content {
		order: unset;
	}
	.keystone-split__image {
		max-width: 520px;
		margin-inline: auto;
	}
}
