/*
 * Social follow section at the end of articles. The card stays dark in both color modes
 * because its photo fades into #101016, the dark page color. Rules that reset article
 * content styles use two classes so .post-content heading, paragraph, link and list rules
 * do not reach them.
 */

.xy-social-follow {
	position: relative;
	isolation: isolate;
	overflow: hidden;
	container-type: inline-size;
	margin-block: 32px;
	border-radius: var(--box-roundness, 10px);
	background-color: #101016;
	color: #fff;
}

/* Hairline edge above the photo, so the card separates from the dark page. */
.xy-social-follow::after {
	position: absolute;
	inset: 0;
	border-radius: inherit;
	box-shadow: inset 0 0 0 1px rgb(255 255 255 / 8%);
	content: "";
	pointer-events: none;
}

/* Narrow columns: the photo bleeds off the top and fades to solid behind the headline. */
.xy-social-follow .xy-social-follow-image {
	position: absolute;
	z-index: -2;
	inset: 0 0 auto;
	width: 100%;
	max-width: none;
	height: 230px;
	margin: 0;
	border-radius: 0;
	object-fit: cover;
	object-position: 35% 30%;
}

.xy-social-follow-scrim {
	position: absolute;
	z-index: -1;
	inset: 0 0 auto;
	height: 232px;
	background: linear-gradient(180deg, rgb(16 16 22 / 0%) 25%, rgb(16 16 22 / 82%) 70%, #101016 100%);
}

.xy-social-follow-body {
	display: grid;
	gap: 10px;
	padding: 24px 16px 18px;
}

.xy-social-follow.has-image .xy-social-follow-body {
	padding-top: 172px;
}

.xy-social-follow .xy-social-follow-title {
	margin: 0;
	color: #fff;
	font-family: var(--ui-font, "Outfit", sans-serif);
	font-size: 20px;
	font-weight: 700;
	line-height: 1.25;
	letter-spacing: -0.015em;
	text-wrap: balance;
}

.xy-social-follow .xy-social-follow-text {
	margin: 0;
	color: rgb(255 255 255 / 70%);
	font-family: var(--body-font, "Inter", sans-serif);
	font-size: 14px;
	line-height: 1.55;
}

.xy-social-follow .xy-social-follow-event {
	color: #fff;
	font-weight: 600;
}

.xy-social-follow .tsi {
	font-size: 16px;
	line-height: 1;
}

.xy-social-follow .xy-social-follow-button {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 9px;
	box-sizing: border-box;
	min-height: 44px;
	margin-top: 8px;
	padding: 10px 18px;
	border-radius: var(--xy-radius-button, 6px);
	background-color: var(--c-main, #3c3fde);
	box-shadow: 0 2px 7px -4px rgb(0 0 0 / 16%);
	color: #fff;
	font-family: var(--ui-font, "Outfit", sans-serif);
	font-size: 14px;
	font-weight: 600;
	line-height: 1.3;
	text-decoration: none;
}

.xy-social-follow .xy-social-follow-button:hover {
	background-color: #3134c4;
	color: #fff;
}

.xy-social-follow-more {
	display: grid;
	gap: 8px;
	margin-top: 6px;
}

.xy-social-follow-more-label {
	color: rgb(255 255 255 / 60%);
	font-family: var(--ui-font, "Outfit", sans-serif);
	font-size: 12px;
	font-weight: 500;
	line-height: 1.4;
}

/* Phones: equal 44px buttons, one per remaining channel. */
.xy-social-follow .xy-social-follow-links {
	display: grid;
	grid-auto-columns: minmax(0, 1fr);
	grid-auto-flow: column;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.xy-social-follow .xy-social-follow-item {
	margin: 0;
	padding: 0;
	list-style: none;
}

.xy-social-follow .xy-social-follow-item::before {
	content: none;
}

.xy-social-follow .xy-social-follow-link {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 7px;
	box-sizing: border-box;
	min-height: 44px;
	padding: 0 8px;
	border: 1px solid rgb(255 255 255 / 20%);
	border-radius: 999px;
	color: rgb(255 255 255 / 85%);
	font-family: var(--ui-font, "Outfit", sans-serif);
	font-size: 13px;
	font-weight: 500;
	line-height: 1.3;
	text-decoration: none;
}

.xy-social-follow .xy-social-follow-link:hover {
	border-color: #a3a5ff;
	color: #fff;
}

.xy-social-follow .xy-social-follow-button:focus-visible,
.xy-social-follow .xy-social-follow-link:focus-visible {
	outline: 2px solid #a3a5ff;
	outline-offset: 2px;
}

/* Wider columns: the photo fills the card behind a left-to-right scrim. */
@container (width >= 540px) {
	.xy-social-follow .xy-social-follow-image {
		inset: 0;
		height: 100%;
		object-position: right center;
	}

	.xy-social-follow-scrim {
		inset: 0;
		height: auto;
		background: linear-gradient(90deg, #101016 0%, rgb(16 16 22 / 94%) 44%, rgb(16 16 22 / 45%) 70%, rgb(16 16 22 / 0%) 90%);
	}

	.xy-social-follow-body,
	.xy-social-follow.has-image .xy-social-follow-body {
		padding: 28px 28px 26px;
	}

	.xy-social-follow.has-image .xy-social-follow-body {
		max-width: 62%;
	}

	.xy-social-follow .xy-social-follow-title {
		font-size: 24px;
	}

	.xy-social-follow .xy-social-follow-button {
		justify-self: start;
	}

	.xy-social-follow-more {
		display: flex;
		flex-wrap: wrap;
		align-items: center;
		gap: 4px 12px;
	}

	.xy-social-follow .xy-social-follow-links {
		display: flex;
		flex-wrap: wrap;
		gap: 4px 12px;
	}

	.xy-social-follow .xy-social-follow-link {
		min-height: 32px;
		padding: 0;
		border: 0;
		border-radius: 0;
		text-decoration: underline;
		text-decoration-color: transparent;
		text-underline-offset: 4px;
	}

	.xy-social-follow .xy-social-follow-link:hover {
		text-decoration-color: currentcolor;
	}
}
