/*
 * Janda Events — Resources.
 *
 * Figma "Resources" (desktop 51284:5187 1440×4192, mobile 51288:2254 428×4540).
 *
 * The hero is the shared we-hero; everything below it is particular to this
 * page, so it lives here rather than in the wedding-pages sheet.
 */

/* ==========================================================================
   Featured article — Figma "Background" 51284:5195 (1440×595)

   #3E3E3E band, the photo in the left 632 of the container at a 16px radius
   and the copy in the right 632, 80px apart.
   ========================================================================== */

.res-featured {
	padding-block: var(--space-48);
	background-color: var(--c-ground-dark);
	color: var(--c-text-on-dark);
}

.res-featured__inner {
	display: grid;
	gap: var(--space-32);
	width: 100%;
	max-width: calc(var(--container) + (var(--gutter) * 2));
	margin-inline: auto;
	padding-inline: var(--gutter);
}

.res-featured__media {
	margin: 0;
}

.res-featured__media img {
	width: 100%;
	height: auto;
	aspect-ratio: 632 / 467;
	object-fit: cover;
	border-radius: var(--radius-lg);
}

.res-featured__copy {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: var(--space-24);
}

/* The eyebrow is white on this ground, not the teal it takes on a light one. */
.res-featured__eyebrow {
	color: var(--c-white);
}

.res-featured__title {
	margin: 0;
}

.res-featured__title a {
	color: var(--c-primary-500);
	text-decoration: none;
}

.res-featured__title a:hover {
	color: var(--c-primary-100);
}

.res-featured__text {
	margin: 0;
	color: rgba(255, 255, 255, 0.8);
	font-size: var(--fs-body-lg);
}

@media (min-width: 64em) {
	.res-featured {
		padding-block: var(--space-64);
	}

	.res-featured__inner {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		align-items: center;
		column-gap: var(--space-80);
	}

	.res-featured__copy {
		gap: var(--space-32);
	}
}

/* ==========================================================================
   Real Weddings & Good Times — Figma "Frame 81" 51284:5253 (1440×842)

   Alternating 400 and 540 squares, vertically centred, running past both frame
   edges. Same rail as the artist gallery, with prev/next added.
   ========================================================================== */

.res-gallery {
	display: flex;
	flex-direction: column;
	gap: var(--space-32);
	padding-block: var(--space-48);
	overflow: hidden;
	background-color: var(--c-white);
}

.res-gallery__head {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: var(--space-8);
	padding-inline: var(--gutter);
	text-align: center;
}

.res-gallery__title {
	margin: 0;
	color: var(--c-primary-500);
}

.res-gallery__carousel {
	display: flex;
	flex-direction: column;
	gap: var(--space-24);
}

/* No scroll snapping — it would pull the rail onto an item boundary and undo
   the designed part-cropped opening position. */
.res-gallery__rail {
	display: flex;
	align-items: center;
	gap: var(--space-24);
	margin: 0;
	padding: 0 var(--gutter);
	overflow-x: auto;
	scrollbar-width: none;
	list-style: none;
}

.res-gallery__rail::-webkit-scrollbar {
	display: none;
}

.res-gallery__item {
	flex: 0 0 auto;
}

.res-gallery__item img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	/* 25% down, as the artist card frames its portraits — keeps faces in. */
	object-position: 50% 25%;
}

.res-gallery__item--short {
	width: 240px;
	height: 240px;
}

.res-gallery__item--tall {
	width: 320px;
	height: 320px;
}

.res-gallery__nav {
	display: flex;
	justify-content: center;
	gap: var(--space-8);
}

.res-gallery__nav .rail-btn:first-child .icon {
	transform: scaleX(-1);
}

@media (min-width: 64em) {
	.res-gallery {
		gap: var(--space-48);
		padding-block: var(--space-64);
	}

	.res-gallery__rail {
		gap: 60px;
		/* The design's row is wider than the frame, so it opens already cut by
		   both edges rather than flush with the container gutter. */
		padding-inline: 149px;
	}

	.res-gallery__item--short {
		width: 400px;
		height: 400px;
	}

	.res-gallery__item--tall {
		width: 540px;
		height: 540px;
	}
}

/* ==========================================================================
   Hero wash — Resources only
   ========================================================================== */

/*
 * The Resources frame does not carry the shared --hero-wash. Differencing the
 * frame export (Design Site QA, "Container.png" at 2880x1480) against the live
 * render of the same photo, in the text-free outer columns and using only
 * pixels bright enough to be reliable, the frame's own wash alpha sits at
 * essentially zero from y=292 to y=644 (0.014, 0.020, 0.001, 0.003, 0.027,
 * -0.005, 0.005, -0.007) while the shared token was laying 0.57 down to 0.30
 * across that same band. The photo is already dark where the headline crosses
 * it, so the frame lets it show.
 *
 * Scoped to this template rather than changed in tokens.css: --hero-wash is
 * read by 13 templates, and the Wedding Entertainment and Wedding Artists
 * frames were both confirmed against it earlier today (greyscale overlay mean
 * absolute difference 5.2 and 2.2). Lightening the token would break those.
 *
 * A little is kept at the very top, where the fixed header's white nav sits
 * over the photo and the export cannot be measured cleanly.
 */
.page-template-template-resources .we-hero__media::after {
	background-image: linear-gradient(
		to bottom,
		rgba(0, 0, 0, 0.35),
		rgba(0, 0, 0, 0) 45%
	);
}
