/*
 * Work card — the collage cell.
 *
 * Live values: 16:9 panel, cover image, hover veil black at 0.65 over
 * 0.2s, text fading in over 0.5s; title 30px (24px phones), excerpt 18px
 * (hidden on phones and in narrow slots), TOURING badge 14px uppercase
 * 1.9px tracking. Text block capped at 685px. Cards fade in on entry.
 */

.tek-work-card {
	position: relative;
	display: flex;
	width: 100%;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	background-color: rgb(0 0 0 / 0.1);
	color: var(--wp--preset--color--background);
	opacity: 0;
	transform: none;
}

/* The featured image: a real, natively lazy <img>, covering the panel. */
.tek-work-card__media {
	position: absolute;
	inset: 0;
	z-index: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.tek-work-card.is-inview {
	animation: tek-card-in 1s ease 0.3s forwards;
}

@keyframes tek-card-in {
	from { opacity: 0; }
	to   { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
	.tek-work-card {
		opacity: 1;
		animation: none;
	}
}

.tek-work-card__veil {
	position: absolute;
	inset: 0;
	z-index: 1;
	background: var(--wp--preset--color--foreground);
	opacity: 0;
	transition: opacity 0.2s ease;
}

.tek-work-card:hover .tek-work-card__veil,
.tek-work-card:focus-visible .tek-work-card__veil {
	opacity: 0.65;
}

.tek-work-card__reveal {
	position: relative;
	z-index: 2;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	width: 100%;
	padding: 30px 20px;
	opacity: 0;
	transition: opacity 0.5s ease;
}

.tek-work-card:hover .tek-work-card__reveal,
.tek-work-card:focus-visible .tek-work-card__reveal {
	opacity: 1;
}

.tek-work-card__text {
	display: block;
	max-width: 685px;
}

.tek-work-card__title {
	display: block;
	font-size: 30px;
	line-height: 1.2;
}

.tek-work-card__excerpt {
	display: block;
	font-size: 18px;
	margin-top: 0.5em;
}

.tek-work-card__badge {
	display: block;
	font-size: 14px;
	text-transform: uppercase;
	letter-spacing: 1.9px;
}

/* Hide utilities also come from Grid.Shift (item-width driven); these
   viewport fallbacks match the old site's hide-on-mobile flags. */
@media (max-width: 767px) {
	.tek-work-card__title {
		font-size: 24px;
	}

	.tek-work-card__excerpt {
		display: none;
	}
}
