/* ReviewsV5 — Castle Windows (Figma 15301:27889): light band with kicker flair
   and dual CTAs beside a single-card review carousel; a full-strength photo
   spans the bottom of the section (the card overlaps it), with half-width deco
   strips on the photo's top-left and bottom-right edges. */

.rvw.v5 {
	/* design renders the photo at full opacity (global default dims to 0.2) */
	--img-bg-o: 1;

	/* comp leaves 346px of photo-only space below the card (791px section,
	   photo band from y312) — the extra bottom padding buys that space so the
	   bottom-anchored band clears the subhead and buttons */
	padding-bottom: 21.625rem;

	/* photo band: bottom 479px of the 791px comp.
	   The comp's button row straddles that top edge — the row starts ~6px above it
	   and hangs the rest over the photo. Our fluid rhythm runs 43px taller than
	   the comp's fixed 96/8/8/24 stack above the buttons while the band only
	   moved 6px (it scales with the section), so the edge landed level with the
	   subhead and the buttons cleared it entirely, reading as two chips dropped
	   onto the photo. Trimming the 37px difference off the band height restores
	   the straddle; the band is bottom-anchored, so only its TOP edge moves and
	   the 346px of photo-only space below the card is untouched. */
	--rvw-v5-band-drop: 2.3125rem; /* { min: 0, max: 6, step: 0.0625, friendly: 'Reviews Photo Band Top Drop' } */

	> .bg {
		top: auto;
		bottom: 0;
		height: calc(60.5% - var(--rvw-v5-band-drop));

		/* photo-band top deco strip — the band's own ledge continuing over the
		   photo, so it reads from --background rather than a pinned palette token
		   and follows the section's data-colors. The strip at the section's bottom
		   edge is the next section's flr-tab-tp-rt panel-deco tab (panel-deco.css). */
		&::before {
			content: '';
			position: absolute;
			z-index: 1;
			top: 0;
			left: 0;
			width: 50%;
			height: 1.5rem;
			background-color: var(--background);
		}
	}

	/* The card's white surface needs no override: alternate-light already resolves
	   --inner-theme to the palette's white, which is why the section runs that
	   theme rather than primary-light (where the pair is inverted and the card
	   came out tinted against a white band). */
	.rvw-crd {

		/* Comp runs the quote title at 30px (fnt-t-4 in the design file) against
		   the framework's 20px step — it is the card's headline, not a label.
		   Rebinding the size token keeps family/weight/leading on fnt_t-4, and the
		   two-step mobile/desktop split mirrors how --fnt-t-2-s is authored. */
		.fnt_t-4 {
			--fnt-t-4-s: 1.5rem; /* { min: 1, max: 2.5, step: 0.0625, friendly: 'Review Quote Title Size Mobile' } */

			@media screen and (width >= 1280px) {
				--fnt-t-4-s: 1.875rem; /* { min: 1, max: 2.5, step: 0.0625, friendly: 'Review Quote Title Size Desktop' } */
			}
		}
	}
}

/* Stacked, the CTAs have to follow the carousel they act on — "here are the
   reviews, now go leave one". The DOM nests them inside the masthead half, so
   stacking puts both buttons above the feed, which reads as a dead end before
   the reader has seen anything.

   display:contents dissolves the masthead half, promoting the heading block and
   the button row to items of the stacked row itself, so `order` can drop the
   buttons past the feed half. The markup never changes, so the desktop split is
   untouched. Unlike the ContentV5 case this needs only one wrapper dissolved —
   .btn-con is already a direct child of the half, and there is no f_rev to undo.

   Row-gap replaces the old `.half + .half` margin: the stack is three items now,
   not two, and that adjacent-sibling rule would still match the feed half (
   display:contents doesn't change selector matching) and double up on the gap.

   With no buttons authored, .btn-con never renders, :has() fails, the half stays
   a normal block and the stack is two items in source order — same as before. */
@media screen and (max-width: 1279px) {

	.rvw.v5 .mn_wd[class*="flx-at-1280"]:not([class*="sw-"]) {
		display: flex;
		flex-direction: column;
		row-gap: var(--sp-vm-clc);
	}

	.rvw.v5 .half:has(> .btn-con) {
		display: contents;
	}

	/* Heading block and feed half stay at order 0 in source order; CTAs go last. */
	.rvw.v5 .half > .btn-con {
		order: 1;
	}

}

/* rvw-v5-bg-full — local home board (Figma 15405-17111). The corporate board
   above anchors a full-strength photo to the bottom 60.5% of the section; the
   local board instead runs a light siding texture edge to edge behind the whole
   band, so every part of that geometry is undone here. Opt in from the layout:
   <ReviewsV5 classList="rvw-v5-bg-full" />. */
.rvw.v5.rvw-v5-bg-full {
	/* Harvest: the comp's texture sits ~0.2 over the white ground, not full strength. */
	--img-bg-o: 0.2;

	/* No photo-only space to reserve — back to the plain pd_v the class asks for. */
	padding-bottom: var(--pd-v);

	> .bg {
		top: 0;
		bottom: auto;
		height: 100%;

		/* The deco strip marks the top edge of the photo band; there is no band. */
		&::before {
			content: none;
		}
	}
}
