/*
 * Home template only (Prompt 05, RMHN Home.dc.html). Loaded on the Home template, not sitewide.
 */

/* ---------------------------------------------------------------- 1 hero */
/* Full-width ink band; the photo (if any) sits under it via .rmhn-backdrop. Text is anchored
   bottom-left so faces in the upper part of a group photo stay clear. The height keeps both buttons
   above the 360×640 fold under the sticky header. */
.rmhn-hero {
	display: flex;
	align-items: flex-end;
	min-height: min(520px, calc(100svh - 72px));
	padding-block: 48px 40px;
}

.rmhn-hero > .rmhn-container {
	width: 100%;
}

.rmhn-hero__text {
	max-width: 640px;
}

.rmhn-hero .rmhn-eyebrow {
	margin: 0 0 16px;
	font-size: 12px;
	letter-spacing: 0.1em;
}

@media (min-width: 690px) {
	.rmhn-hero .rmhn-eyebrow {
		font-size: 13px;
		letter-spacing: 0.14em;
	}
}

.rmhn-hero h1 {
	margin: 0 0 20px;
}

.rmhn-hero__lead {
	margin: 0 0 28px;
	color: rgba(255, 255, 255, 0.9);
}

.rmhn-hero__actions {
	display: grid;
	gap: 12px;
	margin: 0;
}

.rmhn-hero__call {
	margin: 16px 0 0;
}

@media (min-width: 690px) {
	.rmhn-hero__actions {
		display: flex;
		flex-wrap: wrap;
		gap: 16px;
	}
}

@media (min-width: 1000px) {
	.rmhn-hero {
		min-height: 640px;
		padding-block: 120px 96px;
	}
}

/* ---------------------------------------------------------------- 2 who we are */
.rmhn-who__grid {
	display: grid;
	gap: 24px;
	justify-items: center;
	text-align: center;
}

.rmhn-who__media img {
	width: 200px;
	height: 200px;
}

.rmhn-who h2 {
	margin-bottom: 16px;
}

.rmhn-who__lead {
	margin: 0 0 20px;
}

.rmhn-who .rmhn-pills {
	justify-content: center;
}

@media (min-width: 1000px) {
	.rmhn-who__grid {
		grid-template-columns: 340px 1fr;
		gap: 72px;
		justify-items: start;
		align-items: center;
		text-align: start;
	}

	.rmhn-who__media img {
		width: 340px;
		height: 340px;
	}

	.rmhn-who__text {
		max-width: 620px;
	}

	.rmhn-who h2 {
		margin-bottom: 24px;
	}

	.rmhn-who__lead {
		font-size: 20px;
	}

	.rmhn-who .rmhn-pills {
		justify-content: flex-start;
	}
}

/* ---------------------------------------------------------------- 3 programs */
.rmhn-program-grid {
	display: grid;
	gap: 16px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.rmhn-program-card {
	display: grid;
	grid-template-columns: 52px 1fr;
	gap: 4px 16px;
	align-items: start;
	padding: 20px;
}

.rmhn-program-card .rmhn-icon-holder {
	grid-row: span 2;
}

.rmhn-program-card__title {
	margin: 0;
	font-size: 18px;
	line-height: 1.3;
}

.rmhn-program-card__summary {
	margin: 0;
	font-size: 16px;
	line-height: 1.5;
	color: var(--rmhn-muted);
}

@media (min-width: 690px) {
	.rmhn-program-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 24px;
	}

	.rmhn-program-card {
		display: flex;
		flex-direction: column;
		gap: 16px;
		padding: 32px;
	}

	.rmhn-program-card__title {
		font-size: 22px;
	}

	.rmhn-program-card__summary {
		flex: 1;
		font-size: 17px;
	}

	.rmhn-program-card--help {
		justify-content: center;
		background: var(--rmhn-blush);
		border-color: transparent;
	}

	.rmhn-program-card--help .rmhn-program-card__summary {
		flex: none;
		color: var(--rmhn-ink);
	}

	.rmhn-program-card--help .rmhn-btn {
		align-self: flex-start;
	}
}

@media (min-width: 1000px) {
	.rmhn-program-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

/* ---------------------------------------------------------------- 5 featured story */
.rmhn-story-home h2 {
	margin-bottom: 24px;
}

@media (min-width: 1000px) {
	.rmhn-story-home h2 {
		margin-bottom: 40px;
	}
}

/* ---------------------------------------------------------------- 6 donate band */
.rmhn-donate-band__card {
	display: grid;
	gap: 24px;
}

/* The panel is an ink card on the light section (it carries .rmhn-section--ink for its colours).
   The amount rows stay white tiles with ink text. */
.rmhn-card.rmhn-donate-band__card {
	background: var(--rmhn-ink-soft-a);
	background-image: var(--rmhn-ink-soft);
	border-color: transparent;
}

.rmhn-donate-band__card .rmhn-tier-links a {
	--rmhn-muted: #5C5550;
	background: var(--rmhn-white);
	border-color: var(--rmhn-white);
}

.rmhn-donate-band__card .rmhn-tier-links a:hover {
	border-color: var(--rmhn-white);
	box-shadow: inset 0 0 0 2px var(--rmhn-red);
}

.rmhn-donate-band__card .rmhn-tier-links a:focus-visible {
	outline-color: var(--rmhn-white);
}

.rmhn-donate-band h2 {
	margin-bottom: 16px;
}

.rmhn-donate-band__lead {
	margin: 0 0 24px;
	color: var(--rmhn-muted);
}

.rmhn-donate-band__note {
	margin: 12px 0 0;
	text-align: center;
}

.rmhn-tier-links {
	display: grid;
	gap: 12px;
	margin: 0 0 16px;
	padding: 0;
	list-style: none;
}

.rmhn-tier-links a {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-height: 56px;
	padding: 14px 16px;
	border: 1px solid var(--rmhn-border);
	border-radius: var(--rmhn-radius-callout);
	color: var(--rmhn-ink);
	text-decoration: none;
}

.rmhn-tier-links a:hover {
	border-color: var(--rmhn-ink);
}

.rmhn-tier-links__amount {
	font: 700 20px/1.2 var(--rmhn-font-heading);
}

.rmhn-tier-links__label {
	font-size: 15px;
	color: var(--rmhn-muted);
}

.rmhn-donate-band__usd {
	margin: 16px 0 0;
}

.rmhn-tier-links a.rmhn-tier-links__other {
	flex-direction: row;
	align-items: center;
	gap: 8px;
	font-weight: 600;
	color: var(--rmhn-red);
}

@media (min-width: 690px) {
	.rmhn-donate-band__card {
		padding: 56px;
	}

	.rmhn-donate-band__note {
		text-align: start;
	}

	.rmhn-tier-links a {
		flex-direction: row;
		align-items: center;
		justify-content: space-between;
		gap: 16px;
		padding: 16px 24px;
	}
}

@media (min-width: 1000px) {
	.rmhn-donate-band__card {
		grid-template-columns: 1fr 1.1fr;
		gap: 56px;
		align-items: start;
	}

	.rmhn-donate-band__lead {
		font-size: 20px;
	}
}

/* ---------------------------------------------------------------- 8 partners */
.rmhn-partners__title {
	margin: 0 0 24px;
	text-align: center;
	font-size: 15px;
}

.rmhn-partners__list {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 16px 32px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.rmhn-partners__list img {
	display: block;
	max-height: 56px;
	width: auto;
}

/* ---------------------------------------------------------------- 9 testimonials (carousel) */
/* A scroll-snap row: the quote in the middle is full size, the others smaller and dimmed at the
   sides. The track's side padding sets how much of the neighbours shows; each slide is the full
   content width (a % flex-basis is measured inside the padding). Dimming only starts once testimonials.js has marked the middle one (.is-ready), so without
   the script every quote reads at full strength. Dimmed text stays above 4.5:1 on ink. */
.rmhn-testimonials h2 {
	margin: 0 0 24px;
}

.rmhn-quotes__track {
	display: flex;
	gap: 16px;
	margin: 0 calc(-1 * var(--rmhn-gutter));
	padding: 8px 7.5%;
	list-style: none;
	overflow-x: auto;
	overscroll-behavior-x: contain;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
}

.rmhn-quotes__track::-webkit-scrollbar {
	display: none;
}

.rmhn-quote {
	flex: 0 0 100%;
	min-width: 0;
	scroll-snap-align: center;
}

.rmhn-quotes.is-ready .rmhn-quote {
	opacity: 0.6;
	transform: scale(0.9);
}

.rmhn-quotes.is-ready .rmhn-quote.is-active {
	opacity: 1;
	transform: none;
}

@media (prefers-reduced-motion: no-preference) {
	.rmhn-quote {
		transition: opacity 0.3s ease, transform 0.3s ease;
	}
}

.rmhn-quote figure {
	margin: 0;
	text-align: center;
}

.rmhn-quote__mark {
	display: block;
	height: 40px;
	font: 700 80px/1 var(--rmhn-font-heading);
	color: var(--rmhn-blush);
}

.rmhn-quote .rmhn-meta {
	justify-content: center;
	margin: 0 0 16px;
}

.rmhn-testimonial__quote {
	margin: 0 0 24px;
	padding: 0;
	border: 0;
}

.rmhn-testimonial__quote p {
	margin: 0;
	font: 600 20px/1.45 var(--rmhn-font-heading);
	color: var(--rmhn-white);
}

.rmhn-testimonial__by {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	text-align: start;
}

.rmhn-testimonial__photo {
	width: 48px;
	height: 48px;
	border-radius: 50%;
	object-fit: cover;
}

.rmhn-testimonial__name,
.rmhn-testimonial__role {
	display: block;
}

.rmhn-testimonial__name {
	font-weight: 600;
}

.rmhn-testimonial__role {
	font-size: 15px;
	color: var(--rmhn-muted);
}

/* One quote: no row, just the pull-quote. */
.rmhn-quotes--single .rmhn-quotes__track {
	display: block;
	margin: 0;
	padding: 0;
	overflow: visible;
}

.rmhn-quotes--single .rmhn-quote {
	max-width: 820px;
	margin-inline: auto;
}

.rmhn-quotes__controls {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 4px;
	margin-top: 24px;
}

.rmhn-quotes__controls[hidden] {
	display: none;
}

.rmhn-quotes__arrow,
.rmhn-quotes__toggle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	margin-inline: 8px;
	padding: 0;
	border: 1px solid rgba(255, 255, 255, 0.5);
	border-radius: 50%;
	background: transparent;
	color: var(--rmhn-white);
	cursor: pointer;
}

.rmhn-quotes__arrow:hover,
.rmhn-quotes__toggle:hover {
	background: var(--rmhn-white);
	color: var(--rmhn-ink);
}

/* Pause (two bars) / play (triangle), drawn in CSS: the sprite has neither. */
.rmhn-quotes__toggle-icon {
	display: block;
	width: 10px;
	height: 12px;
	border-inline: 3px solid currentColor;
}

.rmhn-quotes__toggle.is-paused .rmhn-quotes__toggle-icon {
	width: 0;
	height: 0;
	margin-left: 3px;
	border-block: 7px solid transparent;
	border-inline: 11px solid currentColor;
	border-right: 0;
}

.rmhn-quotes__prev-icon {
	transform: scaleX(-1);
}

/* 44px tap target around a 10px dot. */
.rmhn-quotes__dot {
	width: 44px;
	height: 44px;
	padding: 0;
	border: 0;
	background: transparent;
	cursor: pointer;
}

.rmhn-quotes__dot::before {
	content: "";
	display: block;
	width: 10px;
	height: 10px;
	margin: auto;
	border: 1px solid var(--rmhn-blush);
	border-radius: 50%;
}

.rmhn-quotes__dot[aria-current="true"]::before {
	background: var(--rmhn-blush);
}

@media (min-width: 690px) {
	.rmhn-quotes__track {
		padding-inline: 15%;
		gap: 24px;
		/* The neighbours fade out at the edges instead of being cut mid-word. */
		-webkit-mask-image: linear-gradient(to right, transparent, #000 12%, #000 88%, transparent);
		mask-image: linear-gradient(to right, transparent, #000 12%, #000 88%, transparent);
	}

	.rmhn-quotes--single .rmhn-quotes__track {
		-webkit-mask-image: none;
		mask-image: none;
	}

	.rmhn-testimonial__quote p {
		font-size: 24px;
	}
}

@media (min-width: 1000px) {
	.rmhn-testimonials h2 {
		margin-bottom: 40px;
	}

	.rmhn-quotes__track {
		margin-inline: 0;
		padding-inline: 20%;
	}

	.rmhn-testimonial__quote p {
		font-size: 28px;
	}
}

/* ---------------------------------------------------------------- 10 call to action */
.rmhn-cta-strip__inner {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 20px;
	padding-block: 32px;
	border-block: 1px solid var(--rmhn-border);
}

.rmhn-cta-strip__title {
	margin: 0;
	font-size: 22px;
}

@media (min-width: 690px) {
	.rmhn-cta-strip__inner {
		flex-direction: row;
		align-items: center;
		justify-content: space-between;
		gap: 32px;
	}
}

@media (min-width: 1000px) {
	.rmhn-cta-strip__title {
		font-size: 28px;
	}
}

/* ---------------------------------------------------------------- 11 newsletter */
.rmhn-newsletter-home__grid {
	display: grid;
	gap: 24px;
}

.rmhn-newsletter-home h2 {
	margin-bottom: 12px;
}

.rmhn-newsletter-home__lead {
	margin: 0;
	color: var(--rmhn-muted);
}

@media (min-width: 1000px) {
	.rmhn-newsletter-home__grid {
		grid-template-columns: 1fr 1fr;
		gap: 64px;
		align-items: end;
	}

	.rmhn-newsletter-home .rmhn-newsletter__form {
		display: grid;
		grid-template-columns: 1fr auto;
		align-items: end;
		gap: 12px;
	}

	.rmhn-newsletter-home .rmhn-newsletter__field {
		margin: 0;
	}

	.rmhn-newsletter-home .rmhn-newsletter__form--confirm {
		display: block;
	}
}
