.tsc {
	--tsc-w: clamp(240px, 34vw, 520px);
	position: relative;
	width: 100%;
	height: var(--tsc-h, 100vh);
	background: var(--tsc-bg, #fff);
	overflow: hidden;
	contain: layout paint;
	-webkit-user-select: none;
	user-select: none;
}

/* Con lock="yes" el dedo mueve las tarjetas en vez de hacer scroll de la página */
.tsc[data-lock="yes"] {
	touch-action: none;
	cursor: grab;
}
.tsc[data-lock="yes"]:active {
	cursor: grabbing;
}

.tsc__track {
	position: absolute;
	inset: 0;
	perspective: 1400px;
	perspective-origin: 50% 50%;
}

.tsc__card {
	position: absolute;
	top: 0;
	left: 50%;
	width: var(--tsc-w);
	margin-left: calc(var(--tsc-w) / -2);
	display: block;
	color: inherit;
	text-decoration: none;
	will-change: transform;
	-webkit-user-drag: none;
	-webkit-tap-highlight-color: transparent;
	outline: none;
}

.tsc__inner {
	position: relative;
	display: block;
	width: 100%;
	aspect-ratio: var(--tsc-ratio, 16 / 10);
	border-radius: 14px;
	overflow: hidden;
	background: #ececec;
	box-shadow: 0 22px 44px -16px rgba(0, 0, 0, 0.35), 0 4px 12px rgba(0, 0, 0, 0.08);
	transition: transform 0.4s cubic-bezier(0.2, 0.7, 0.2, 1), box-shadow 0.4s;
}

.tsc__inner img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	pointer-events: none;
	-webkit-user-drag: none;
}

/* Nombre del proyecto (aparece al pasar el ratón) */
.tsc__title {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	padding: 2.2em 1.2em 1em;
	color: #fff;
	font-family: inherit;
	font-weight: 600;
	font-size: clamp(14px, 1.4vw, 20px);
	line-height: 1.2;
	letter-spacing: 0.01em;
	background: linear-gradient(to top, rgba(0, 0, 0, 0.75), rgba(0, 0, 0, 0));
	opacity: 0;
	transform: translateY(10px);
	transition: opacity 0.3s, transform 0.3s;
}

.tsc__inner--empty .tsc__title {
	background: none;
	color: #555;
	top: 0;
	display: flex;
	align-items: center;
	justify-content: center;
}

a.tsc__card:hover .tsc__inner,
a.tsc__card:focus-visible .tsc__inner,
.tsc__card:hover .tsc__inner {
	transform: scale(1.05);
	box-shadow: 0 30px 60px -18px rgba(0, 0, 0, 0.45), 0 6px 16px rgba(0, 0, 0, 0.1);
}

.tsc__card:hover .tsc__title,
.tsc__card:focus-visible .tsc__title {
	opacity: 1;
	transform: none;
}

a.tsc__card {
	cursor: pointer;
}

/* En pantallas táctiles no hay hover: el nombre se muestra siempre */
@media (hover: none) {
	.tsc__title {
		opacity: 1;
		transform: none;
	}
}

@media (max-width: 600px) {
	.tsc {
		--tsc-w: clamp(220px, 62vw, 340px);
	}
	.tsc__inner {
		border-radius: 10px;
	}
}
