/**
 * Revs Homepage Hero — 1:1 clone of the Uncode metro mosaic.
 *
 * Values come from the live hero + Uncode computed CSS. Do not "improve" them.
 *
 * @package UncodeChild
 */

.revs-hp-hero {
	display: grid;
	grid-template-columns: 2fr 1fr 1fr;
	grid-template-rows: 1fr 1fr;
	aspect-ratio: 2 / 1;
	width: 100%;
	margin: 0;
	padding: 0;
	background: #141618;
	overflow: hidden;
}

.revs-hp-hero__tile {
	position: relative;
	display: block;
	overflow: hidden;
	min-width: 0;
	min-height: 0;
	background: #141618;
	text-decoration: none;
	color: #ffffff;
}

.revs-hp-hero__tile--featured {
	grid-column: 1;
	grid-row: 1 / span 2;
}

.revs-hp-hero__tile--top-right { grid-column: 2; grid-row: 1; }
.revs-hp-hero__tile--far-right { grid-column: 3; grid-row: 1; }
.revs-hp-hero__tile--bot-left  { grid-column: 2; grid-row: 2; }
.revs-hp-hero__tile--bot-right { grid-column: 3; grid-row: 2; }

.revs-hp-hero__img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
	backface-visibility: hidden;
	transition-property: transform, filter, opacity;
	transition-timing-function: cubic-bezier(0.57, 0.21, 0.69, 1);
	transition-duration: 0.3s;
}

.revs-hp-hero__overlay {
	position: absolute;
	inset: 0;
	z-index: 2;
	pointer-events: none;
	opacity: 0.75;
	background-color: transparent;
	background-image: linear-gradient(to top, #141618 0%, rgba(20, 22, 24, 0) 80%);
}

.revs-hp-hero__cat {
	position: absolute;
	top: 36px;
	right: 36px;
	z-index: 4;
	margin: 0;
	padding: 2px 5px;
	background: #d22730;
	color: #ffffff;
	font-family: "Roboto Condensed", Roboto, sans-serif;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.55px;
	line-height: 16.5px;
	text-transform: none;
}

.revs-hp-hero__copy {
	position: absolute;
	left: 0;
	bottom: 0;
	z-index: 3;
	box-sizing: border-box;
	width: 75%;
	padding: 36px 0 36px 36px;
	text-align: left;
}

.revs-hp-hero a.revs-hp-hero__tile,
.revs-hp-hero a.revs-hp-hero__tile:hover,
.revs-hp-hero a.revs-hp-hero__tile:focus {
	color: #ffffff;
	text-decoration: none;
	outline: none;
}

.revs-hp-hero .revs-hp-hero__title {
	display: block;
	margin: 9px 0 0;
	padding: 0;
	color: #ffffff;
	font-family: "Roboto Condensed", sans-serif;
	font-size: 30px;
	font-weight: 600;
	line-height: 36px;
	letter-spacing: 0;
	text-transform: none;
	word-break: break-word;
}

.revs-hp-hero .revs-hp-hero__tile:not(.revs-hp-hero__tile--featured) .revs-hp-hero__title {
	font-size: 24px;
	line-height: 28.8px;
}

@media (hover: hover) and (pointer: fine) {
	.revs-hp-hero__tile:hover .revs-hp-hero__img,
	.revs-hp-hero__tile:focus .revs-hp-hero__img {
		transform: scale(1.05, 1.05);
	}
}

/* Tablet: featured full-width square, then 2×2. Uncode screen_lg = 960. */
@media (max-width: 959px) {
	.revs-hp-hero {
		grid-template-columns: 1fr 1fr;
		grid-template-rows: auto auto auto;
		aspect-ratio: auto;
	}

	.revs-hp-hero__tile--featured {
		grid-column: 1 / -1;
		grid-row: auto;
		aspect-ratio: 1 / 1;
	}

	.revs-hp-hero__tile--top-right { grid-column: 1; grid-row: auto; aspect-ratio: 1 / 1; }
	.revs-hp-hero__tile--far-right { grid-column: 2; grid-row: auto; aspect-ratio: 1 / 1; }
	.revs-hp-hero__tile--bot-left  { grid-column: 1; grid-row: auto; aspect-ratio: 1 / 1; }
	.revs-hp-hero__tile--bot-right { grid-column: 2; grid-row: auto; aspect-ratio: 1 / 1; }

	/* Uncode title-scale on ~450px tiles after isotope settles. */
	.revs-hp-hero .revs-hp-hero__tile:not(.revs-hp-hero__tile--featured) .revs-hp-hero__title {
		font-size: 19px;
		line-height: 22.8px;
	}
}

/* Mobile: five stacked near-squares. Uncode screen_sm = 640. */
@media (max-width: 639px) {
	.revs-hp-hero {
		grid-template-columns: 1fr;
		grid-template-rows: none;
	}

	.revs-hp-hero__tile,
	.revs-hp-hero__tile--featured,
	.revs-hp-hero__tile--top-right,
	.revs-hp-hero__tile--far-right,
	.revs-hp-hero__tile--bot-left,
	.revs-hp-hero__tile--bot-right {
		grid-column: 1;
		grid-row: auto;
		aspect-ratio: 639 / 648;
	}
}

/* Uncode title-scale collapse — featured only. Small tiles stay 24px. */
@media (max-width: 569px) {
	.revs-hp-hero__copy {
		width: 100%;
	}

	.revs-hp-hero .revs-hp-hero__tile--featured .revs-hp-hero__title {
		font-size: 17px;
		line-height: 1.2;
	}

	.revs-hp-hero .revs-hp-hero__tile:not(.revs-hp-hero__tile--featured) .revs-hp-hero__title {
		font-size: 24px;
		line-height: 28.8px;
	}
}
