/**
 * Media page.
 *
 * Three places the temple publishes - YouTube, Instagram, Facebook - and the
 * videos themselves.
 *
 * The videos are facades: a thumbnail and a play button, with the real
 * YouTube player swapped in only when someone clicks. Nine live iframes on
 * one page pulls in several megabytes of player before anybody has watched
 * anything. See assets/js/video-embeds.js.
 */

.media {
	--md-accent: #ed9321;
	--md-ink: #17323f;
	--md-body: #4d6069;

	font-family: "Montserrat", sans-serif;
}

.media__inner {
	max-width: 1240px;
	margin: 0 auto;
	padding: 3.5rem 1.25rem;
}

.media__eyebrow {
	margin: 0 0 0.6rem;
	color: var(--md-accent);
	font-size: 0.76rem;
	font-weight: 700;
	letter-spacing: 0.28em;
	text-transform: uppercase;
}

.media .media__title {
	margin: 0 0 0.8rem;
	color: var(--md-ink);
	font-family: "Roboto Slab", Georgia, serif;
	font-size: clamp(1.9rem, 1.2rem + 2.4vw, 2.8rem);
	font-weight: 400;
	line-height: 1.15;
}

.media__lead {
	margin: 0 0 2.5rem;
	max-width: 40rem;
	color: var(--md-body);
	font-size: 1.02rem;
	line-height: 1.7;
}

/* ---- the three channels ---- */

.media__channels {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
	gap: 1rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.channel {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	padding: 1.5rem;
	border: 1px solid rgba(23, 50, 63, 0.12);
	border-radius: 14px;
	background: #ffffff;
	text-decoration: none;
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.channel:hover,
.channel:focus-visible {
	transform: translateY(-2px);
	box-shadow: 0 10px 24px rgba(23, 50, 63, 0.12);
}

/* The brand mark sits in its own colour; the card stays neutral. */
.channel__mark {
	display: grid;
	place-items: center;
	width: 2.75rem;
	height: 2.75rem;
	border-radius: 10px;
	color: #ffffff;
}

.channel__mark svg {
	width: 1.4rem;
	height: 1.4rem;
	fill: currentColor;
}

.channel--youtube .channel__mark {
	background: #ff0000;
}

.channel--instagram .channel__mark {
	background: linear-gradient(45deg, #f09433, #dc2743 50%, #bc1888);
}

.channel--facebook .channel__mark {
	background: #1877f2;
}

.channel__name {
	margin-top: 0.35rem;
	color: var(--md-ink);
	font-size: 1.1rem;
	font-weight: 700;
}

.channel__handle {
	color: var(--md-body);
	font-size: 0.88rem;
	word-break: break-word;
}

.channel__cta {
	margin-top: 0.35rem;
	color: var(--md-accent);
	font-size: 0.88rem;
	font-weight: 700;
}

/* ---- videos ---- */

.media__section-title {
	margin: 3.5rem 0 1.5rem;
	color: var(--md-ink);
	font-family: "Roboto Slab", Georgia, serif;
	font-size: clamp(1.4rem, 1.1rem + 1.2vw, 1.9rem);
	font-weight: 400;
}

.media__videos {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr));
	gap: 1.15rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.video {
	display: flex;
	flex-direction: column;
	gap: 0.6rem;
}

/* The thumbnail, and later the player, live in here. */
.video__frame {
	position: relative;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	border-radius: 12px;
	background: #12232e center / cover no-repeat;
	box-shadow: 0 4px 14px rgba(23, 50, 63, 0.12);
}

/* Two lines, so a long title cannot make one card taller than the rest. */
.video__title {
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	margin: 0;
	color: var(--md-ink);
	font-size: 0.92rem;
	font-weight: 600;
	line-height: 1.45;
}

/* The button covering the thumbnail, before the player is loaded. */
.video__play {
	position: absolute;
	inset: 0;
	display: grid;
	place-items: center;
	width: 100%;
	padding: 0;
	border: 0;
	background: transparent;
	cursor: pointer;
}

.video__play::before {
	content: "";
	position: absolute;
	inset: 0;
	background: rgba(12, 18, 26, 0.25);
	transition: background-color 0.15s ease;
}

.video__play:hover::before,
.video__play:focus-visible::before {
	background: rgba(12, 18, 26, 0.1);
}

.video__icon {
	position: relative;
	display: grid;
	place-items: center;
	width: 4rem;
	height: 2.8rem;
	border-radius: 0.7rem;
	background: rgba(255, 0, 0, 0.92);
	transition: transform 0.15s ease;
}

.video__play:hover .video__icon {
	transform: scale(1.06);
}

.video__icon::after {
	content: "";
	border-style: solid;
	border-width: 0.5rem 0 0.5rem 0.85rem;
	border-color: transparent transparent transparent #ffffff;
}

.video iframe {
	width: 100%;
	height: 100%;
	border: 0;
}

/* ---- the page feed ---- */

.media__feed {
	margin-top: 1.5rem;
	border: 1px solid rgba(23, 50, 63, 0.12);
	border-radius: 14px;
	overflow: hidden;
	background: #ffffff;
}

.media__feed iframe {
	display: block;
	width: 100%;
	height: 500px;
	border: 0;
}

.media__note {
	margin: 1rem 0 0;
	color: var(--md-body);
	font-size: 0.86rem;
	line-height: 1.6;
}

@media (max-width: 620px) {
	.media__inner {
		padding: 2.5rem 1.25rem;
	}

	.media__section-title {
		margin-top: 2.5rem;
	}
}

/* The photographs link, sized so it does not stretch the full width. */
.media__photos-link {
	max-width: 26rem;
}
