/**
 * ZeltaCode Project Cards — front-end styles.
 */

.zcpc {
	background: #000;
}

.zcpc *,
.zcpc *::before,
.zcpc *::after {
	box-sizing: border-box;
}

.zcpc .zcpc__heading {
	margin: 0 0 28px;
	font-size: 30px;
	font-weight: 600;
	letter-spacing: -0.6px;
	line-height: 1.2;
	color: #fff;
}

.zcpc__grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	column-gap: 20px;
	row-gap: 20px;
	align-items: stretch;
}

/* ------------------------------------------------------------------ */
/* Card                                                                */
/* ------------------------------------------------------------------ */

.zcpc__card {
	position: relative;
	display: flex;
	flex-direction: column;
	overflow: hidden;
	border: 1px solid #1a1d23;
	border-radius: 8px;
	background-color: #0b0d11;
	transition-property: background-color, border-color, transform, box-shadow;
	transition-duration: 0.25s;
	transition-timing-function: ease;
}

.zcpc__card.has-link {
	cursor: pointer;
}

/* Stretched link — makes the whole card clickable without nesting blocks. */
.zcpc__link {
	position: absolute;
	inset: 0;
	z-index: 4;
	text-decoration: none;
}

.zcpc__link:focus-visible {
	outline: 2px solid #5e9eff;
	outline-offset: -3px;
}

.zcpc .screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* ------------------------------------------------------------------ */
/* Window chrome bar                                                   */
/* ------------------------------------------------------------------ */

.zcpc__bar {
	display: flex;
	align-items: center;
	gap: 9px;
	flex: 0 0 auto;
	padding: 11px 13px;
}

.zcpc__dots {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	flex: 0 0 auto;
}

.zcpc__dot {
	display: block;
	width: 4px;
	height: 4px;
	border-radius: 50%;
	background-color: #3a404b;
}

.zcpc__bar-label {
	font-size: 8.5px;
	font-weight: 600;
	letter-spacing: 1.1px;
	line-height: 1;
	text-transform: uppercase;
	color: #6b7280;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* ------------------------------------------------------------------ */
/* Thumbnail                                                           */
/* ------------------------------------------------------------------ */

.zcpc__thumb {
	position: relative;
	flex: 0 0 auto;
	aspect-ratio: 2 / 1;
	overflow: hidden;
	background-color: #05060a;
}

.zcpc__thumb-img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center top;
	transition: transform 0.4s ease;
}

.zcpc__watermark {
	position: absolute;
	top: 10px;
	right: 12px;
	z-index: 2;
	width: 28px;
	height: auto;
	opacity: 0.9;
	pointer-events: none;
}

/* ------------------------------------------------------------------ */
/* Body                                                                */
/* ------------------------------------------------------------------ */

.zcpc__body {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	flex: 1 1 auto;
	padding: 15px 15px 16px;
}

.zcpc__pill {
	display: inline-block;
	margin-bottom: 13px;
	padding: 5px 8px;
	border: 1px solid #242c3a;
	border-radius: 3px;
	background-color: rgba(94, 158, 255, 0.06);
	color: #a9b4c8;
	font-size: 8.5px;
	font-weight: 600;
	letter-spacing: 0.9px;
	line-height: 1;
	text-transform: uppercase;
}

.zcpc .zcpc__title {
	margin: 0 0 8px;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.35;
	letter-spacing: -0.2px;
	color: #fff;
	transition: color 0.25s ease;
}

.zcpc .zcpc__desc {
	margin: 0;
	font-size: 12px;
	line-height: 1.6;
	color: #7a8190;
}

/* Optional line trimming, so uneven copy still leaves the logo rows aligned. */
.zcpc .zcpc__desc.is-clamped {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* ------------------------------------------------------------------ */
/* Tool logos                                                          */
/* ------------------------------------------------------------------ */

/**
 * margin-top:auto pins the row to the bottom of the card, so the logos line up
 * across a row even when the descriptions differ in length. The "Spacing Above"
 * control therefore drives padding-top, which is the minimum breathing room —
 * setting margin-top there would cancel the pinning.
 */
.zcpc__tools {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 9px;
	width: 100%;
	margin-top: auto;
	padding-top: 16px;
}

.zcpc__tool {
	display: block;
	width: 18px;
	height: 18px;
	object-fit: contain;
	flex: 0 0 auto;
	transition: filter 0.25s ease, opacity 0.25s ease;
}

.zcpc-tools-gray-yes .zcpc__tool {
	filter: grayscale(1);
}

.zcpc-tools-gray-yes .zcpc__card:hover .zcpc__tool {
	filter: grayscale(0);
}

/* ------------------------------------------------------------------ */
/* Footer link                                                         */
/* ------------------------------------------------------------------ */

.zcpc__footer {
	margin-top: 26px;
}

.zcpc .zcpc__more {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	color: #c7cbd1;
	font-size: 12.5px;
	font-weight: 500;
	line-height: 1.2;
	text-decoration: none;
	transition: color 0.25s ease;
}

.zcpc .zcpc__more:hover {
	color: #5e9eff;
	text-decoration: none;
}

.zcpc__more-icon {
	display: inline-flex;
	align-items: center;
	line-height: 0;
	transition: transform 0.25s ease;
}

.zcpc__more-icon svg {
	width: 1em;
	height: 1em;
	fill: currentColor;
}

.zcpc .zcpc__more:hover .zcpc__more-icon {
	transform: translateX(3px);
}

/* ------------------------------------------------------------------ */
/* Motion                                                              */
/* ------------------------------------------------------------------ */

@media (prefers-reduced-motion: reduce) {
	.zcpc__card,
	.zcpc__thumb-img,
	.zcpc__title,
	.zcpc__tool,
	.zcpc__more,
	.zcpc__more-icon {
		transition: none !important;
	}

	.zcpc__card:hover {
		transform: none !important;
	}

	.zcpc__card:hover .zcpc__thumb-img {
		transform: none !important;
	}
}
