/*
 * Blanky Studio – Works: Latest Work (patterns/studio-works-latest.php)
 *
 * Opens the posts page with the newest work, large. The archive hero that
 * archive-main brings along is hidden here, because this band carries the heading.
 *
 * @package blanky-studio
 * @since 2.5
 */

.blanky-studio-archive:has(> .studio-latest) .studio-page-hero {
	display: none;
}

.studio-latest {
	position: relative;
	background-color: #000;
	color: #fff;
}

.studio-latest .studio-latest-template {
	margin: 0;
	padding: 0;
	list-style: none;
}

.studio-latest .studio-latest-item {
	position: relative;
	min-height: 90svh;
	display: flex;
	align-items: flex-end;
	overflow: hidden;
}

.studio-latest .studio-latest-item::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
	pointer-events: none;
	background:
		linear-gradient(to bottom, rgba(0, 0, 0, 0.4) 0%, rgba(0, 0, 0, 0) 25%),
		linear-gradient(to right, rgba(0, 0, 0, 0.72) 0%, rgba(0, 0, 0, 0.1) 70%);
}

.studio-latest .studio-latest-img {
	position: absolute;
	inset: 0;
	z-index: 0;
	margin: 0;
	height: 100%;
}

.studio-latest .studio-latest-img img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	filter: grayscale(100%);
}

.studio-latest .studio-latest-body {
	position: relative;
	z-index: 2;
	width: 100%;
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	align-items: end;
	gap: var(--wp--preset--spacing--50);
	padding: var(--wp--preset--spacing--70) var(--wp--preset--spacing--40) var(--wp--preset--spacing--60);
}

.studio-latest .studio-latest-label.wp-block-heading {
	display: inline-flex;
	align-items: center;
	gap: var(--wp--preset--spacing--20);
	margin: 0 0 var(--wp--preset--spacing--40);
	font-family: var(--wp--preset--font-family--noto-sans);
	font-size: 0.75rem;
	font-weight: 500;
	line-height: 1.5;
	letter-spacing: 0.3em;
	text-transform: uppercase;
	color: #fff;
}

.studio-latest .studio-latest-label.wp-block-heading::before {
	content: "";
	width: 3rem;
	height: 1px;
	background-color: currentColor;
}

.studio-latest .studio-latest-title.wp-block-post-title {
	margin: 0;
	font-family: var(--wp--preset--font-family--newsreader);
	font-weight: 300;
	font-style: normal;
	font-size: clamp(3rem, 1.5rem + 7vw, 8rem);
	line-height: 0.95;
	letter-spacing: -0.03em;
	color: #fff;
}

.studio-latest .studio-latest-meta {
	gap: var(--wp--preset--spacing--30);
	margin-top: var(--wp--preset--spacing--40);
	font-family: var(--wp--preset--font-family--noto-sans);
	font-size: 0.875rem;
	letter-spacing: 0.15em;
	color: rgba(255, 255, 255, 0.85);
}

.studio-latest .studio-latest-meta a {
	color: inherit;
}

.studio-latest .studio-latest-more.wp-block-read-more {
	justify-self: start;
	display: inline-block;
	padding: 1rem 2rem;
	border: 1px solid rgba(255, 255, 255, 0.7);
	font-family: var(--wp--preset--font-family--noto-sans);
	font-size: 0.8125rem;
	letter-spacing: 0.2em;
	text-transform: uppercase;
	text-decoration: none;
	white-space: nowrap;
	color: #fff;
	transition: background-color 0.3s, color 0.3s;
}

.studio-latest .studio-latest-more.wp-block-read-more:hover,
.studio-latest .studio-latest-more.wp-block-read-more:focus-visible {
	background-color: #fff;
	color: #000;
}

@media (width >= 768px) {
	.studio-latest .studio-latest-body {
		grid-template-columns: minmax(0, 1fr) auto;
		padding-inline: var(--wp--preset--spacing--60);
	}

	.studio-latest .studio-latest-more.wp-block-read-more {
		justify-self: end;
	}
}

/* style.css sets the Japanese font on every element under :lang(ja); keep the title link in the heading's face. */
.studio-latest .studio-latest-title a {
	font-family: inherit;
	color: inherit;
	text-decoration: none;
}
