/*!
 * RSW gallery pages — photo grids for /our-work/ and the five work galleries.
 * Uses the site layer's own tokens (--line, --mu, --ac, --card) so the pages
 * match the rest of the site. Loaded only on the gallery pages.
 */

/* page head: keep the hero copy readable, buttons side by side on desktop */
.rswg-hc { max-width: 860px; }
.rswg-hc h1 { font-size: clamp(30px, 4.2vw, 46px); line-height: 1.08; margin: 0; }
.rswg-hc .lead { max-width: 760px; }
.rswg-btns { display: flex; flex-wrap: wrap; gap: 14px; }

/* section heading block */
.sec > .wrap > .sh { margin-bottom: 36px; }
.sec > .wrap > .sh .lead { font-size: 17px; }

/* ---------- photo grid ---------- */
/* Flex, not grid: a last row that is not full is centred instead of leaving a hole. */
.rswg {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 26px 24px;
	align-items: flex-start;
}
.rswg-i {
	margin: 0;
	display: flex;
	flex-direction: column;
	gap: 12px;
	flex: 0 1 calc((100% - 48px) / 3);
	max-width: calc((100% - 48px) / 3);
}
.rswg-f {
	display: block;
	position: relative;
	aspect-ratio: 4 / 3;
	overflow: hidden;
	border-radius: 14px;
	border: 1px solid var(--line, #26384B);
	background: #0E1823;
}
.rswg-f img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
	display: block;
	transition: transform .6s cubic-bezier(.2, .7, .3, 1);
}
.rswg-i:hover .rswg-f img { transform: scale(1.05); }
.rswg-i figcaption {
	color: var(--mu, #9DB0C3);
	font-size: 14.5px;
	line-height: 1.5;
	margin: 0;
}

/* ---------- category cards on /our-work/ ---------- */
.rswg-cats { gap: 24px; }
a.card.rswg-cat { padding: 0; overflow: hidden; gap: 0; }
.rswg-cat .rswg-f { border: 0; border-radius: 0; aspect-ratio: 16 / 10; }
.rswg-cat h3 { margin: 22px 26px 0; font-size: 21px; line-height: 1.25; color: #fff; }
.rswg-cat .rswg-t { margin: 10px 26px 0; }
.rswg-cat .more { margin: 16px 26px 26px; }
a.card.rswg-cat:hover .rswg-f img { transform: scale(1.05); }

/* ---------- guide and FAQ cards ---------- */
a.card.rswg-g h3, .card.rswg-q h3 { margin: 0; font-size: 19px; line-height: 1.3; color: #fff; }
.card.rswg-q p { margin: 0; }
.rswg-g .more { margin-top: auto; }
/* card body text: a span, not a p — WordPress splits an <a> that contains a <p>. */
.rswg-t { display: block; color: var(--mu, #9DB0C3); font-size: 16px; line-height: 1.55; }

/* ---------- closing note ---------- */
.rswg-note { color: var(--mu, #9DB0C3); font-size: 14px; margin: 6px 0 0; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
	.rswg { gap: 18px 14px; }
	.rswg-i { flex-basis: calc((100% - 14px) / 2); max-width: calc((100% - 14px) / 2); }
	.rswg-i figcaption { font-size: 13px; line-height: 1.45; }
	.rswg-f { border-radius: 12px; }
	.sec > .wrap > .sh { margin-bottom: 26px; }
	.rswg-btns .btn { width: 100%; }
	.rswg-cat h3 { margin: 18px 20px 0; font-size: 19px; }
	.rswg-cat p { margin: 8px 20px 0; }
	.rswg-cat .more { margin: 14px 20px 20px; }
}
@media (max-width: 420px) {
	.rswg { gap: 14px 12px; }
	.rswg-i { flex-basis: calc((100% - 12px) / 2); max-width: calc((100% - 12px) / 2); }
}
@media (prefers-reduced-motion: reduce) {
	.rswg-f img { transition: none; }
	.rswg-i:hover .rswg-f img, a.card.rswg-cat:hover .rswg-f img { transform: none; }
}

/* print: show the photos, drop the hover chrome */
@media print {
	.rswg { gap: 10px; }
	.rswg-f { border-color: #ccc; }
}
