.tt-team-stack {
	--tt-ts-height: 620px;
	--tt-ts-card-w: 320px;
	--tt-ts-card-h: 440px;
	--tt-ts-peek: 28px;
	--tt-ts-stack-rotate: 4deg;
	--tt-ts-spread: 190px;
	--tt-ts-arc-radius: 200px;
	--tt-ts-arc-angle: 9deg;
	--tt-ts-lift: 34px;
	--tt-ts-radius: 20px;
	--tt-ts-card-bg: #f3f1ea;
	--tt-ts-card-border: rgba(0, 0, 0, 0.06);
	--tt-ts-ease: cubic-bezier(0.76, 0, 0.24, 1);
	--tt-ts-tx: 0px;
	--tt-ts-rot: 0deg;
	--tt-ts-scale: 1;
	--tt-ts-ty: 0px;
	position: relative;
	width: 100%;
	min-height: var(--tt-ts-height);
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: visible;
}

.tt-team-stack__stage {
	position: relative;
	width: var(--tt-ts-card-w);
	height: var(--tt-ts-card-h);
	margin: 0 auto;
}

/* ─── Card ─── */
.tt-team-stack__card {
	position: absolute;
	top: 50%;
	left: 50%;
	width: var(--tt-ts-card-w);
	height: var(--tt-ts-card-h);
	border-radius: var(--tt-ts-radius);
	background: var(--tt-ts-card-bg);
	border: 1px solid var(--tt-ts-card-border);
	overflow: hidden;
	cursor: pointer;
	user-select: none;
	will-change: transform;
	box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
	transition:
		transform 0.65s var(--tt-ts-ease),
		box-shadow 0.65s var(--tt-ts-ease);
	transform-origin: center bottom;
	transform: translate(-50%, -50%) translate(var(--tt-ts-tx), var(--tt-ts-ty)) rotate(var(--tt-ts-rot)) scale(var(--tt-ts-scale));
}

.tt-team-stack:not(.is-ready) .tt-team-stack__card {
	transition: none;
}

.tt-team-stack__card.is-active {
	box-shadow: 0 16px 48px rgba(0, 0, 0, 0.14);
}

.tt-team-stack.is-fanned .tt-team-stack__card.is-active,
.tt-team-stack.is-fanned .tt-team-stack__card.is-lifted {
	box-shadow: 0 24px 60px rgba(0, 0, 0, 0.18);
}

.tt-team-stack:not(.is-fanned) .tt-team-stack__card:not(.is-active) {
	pointer-events: none;
}

.tt-team-stack.is-fanned:not(.is-interactive) .tt-team-stack__card {
	pointer-events: none;
}

.tt-team-stack.is-fanned.is-interactive .tt-team-stack__card:not(.is-lifted):hover {
	transform: translate(-50%, -50%) translate(var(--tt-ts-tx), calc(var(--tt-ts-ty) - 12px)) rotate(var(--tt-ts-rot)) scale(var(--tt-ts-scale));
	box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
}

.tt-team-stack__card-inner {
	position: relative;
	display: flex;
	flex-direction: column;
	height: 100%;
	padding: 14px;
	box-sizing: border-box;
}

/* ─── Photo area ─── */
.tt-team-stack__photo {
	position: relative;
	flex: 1 1 auto;
	min-height: 0;
	overflow: hidden;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: calc(var(--tt-ts-radius) - 6px);
	background: rgba(0, 0, 0, 0.04);
}

.tt-team-stack__photo img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.tt-team-stack__initials {
	font-size: 48px;
	font-weight: 700;
	line-height: 1;
	color: #000;
	letter-spacing: 0.04em;
	opacity: 0.3;
}

.tt-team-stack__badge {
	position: absolute;
	right: 12px;
	bottom: 12px;
	z-index: 2;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 36px;
	height: 28px;
	padding: 0 10px;
	border-radius: 14px;
	background: #1a1a1a;
	color: #ffffff;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.06em;
	line-height: 1;
}

.tt-team-stack__arrow-btn {
	position: absolute;
	top: 12px;
	right: 12px;
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: #1a1a1a;
	color: #ffffff;
	text-decoration: none;
	transition: transform 0.3s ease, background-color 0.3s ease, opacity 0.35s ease;
}

.tt-team-stack__arrow-btn:hover {
	background: #333;
	transform: scale(1.08);
}

.tt-team-stack__arrow-btn svg {
	width: 14px;
	height: 14px;
}

.tt-team-stack__socials {
	position: absolute;
	right: 12px;
	bottom: 12px;
	z-index: 2;
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.tt-team-stack__social-link {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border-radius: 18px;
	background: #1a1a1a;
	color: #ffffff;
	text-decoration: none;
	font-size: 14px;
	transition: transform 0.3s ease, background-color 0.3s ease;
}

.tt-team-stack__social-link:hover {
	background: #333;
	transform: scale(1.08);
}

.tt-team-stack__social-link i {
	font-size: 14px;
	line-height: 1;
}

.tt-team-stack__social-link svg {
	width: 14px;
	height: 14px;
	fill: currentColor;
}

/* ─── Info bar ─── */
.tt-team-stack__info {
	flex: 0 0 auto;
	padding: 14px 6px 4px;
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.tt-team-stack__role {
	order: -1;
	font-size: 11px;
	font-weight: 600;
	line-height: 1.3;
	color: rgba(0, 0, 0, 0.45);
	text-transform: uppercase;
	letter-spacing: 0.08em;
	transition: opacity 0.4s ease, transform 0.4s ease;
}

.tt-team-stack__name {
	margin: 0;
	padding: 0;
	line-height: 1.15;
	color: #1a1a1a;
	font-family: inherit;
}

.tt-team-stack__name a {
	color: inherit;
	text-decoration: none;
}

.tt-team-stack__desc {
	margin: 6px 0 0;
	font-size: 13px;
	font-weight: 400;
	line-height: 1.5;
	color: rgba(0, 0, 0, 0.55);
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
	line-clamp: 3;
	overflow: hidden;
}

/* ─── Responsive ─── */
@media (max-width: 767px) {
	.tt-team-stack:not(.tt-team-stack--list) {
		--tt-ts-card-w: 260px;
		--tt-ts-card-h: 400px;
		--tt-ts-peek: 28px;
		--tt-ts-spread: 110px;
		--tt-ts-arc-radius: 120px;
		--tt-ts-arc-angle: 8deg;
		min-height: 520px;
	}

	.tt-team-stack--list {
		--tt-ts-card-h: 400px;
	}
}

/* ─── List: one card below the other, no fan ─── */
.tt-team-stack--list {
	min-height: 0;
	display: block;
	align-items: stretch;
	justify-content: flex-start;
}

.tt-team-stack--list .tt-team-stack__stage {
	display: flex;
	flex-direction: column;
	align-items: center;
	width: 100%;
	height: auto;
	gap: var(--tt-ts-list-gap, 24px);
}

.tt-team-stack--list .tt-team-stack__card {
	position: relative;
	top: auto;
	left: auto;
	flex: 0 0 auto;
	width: var(--tt-ts-card-w);
	max-width: 100%;
	box-sizing: border-box;
	transform: none;
	cursor: default;
	will-change: auto;
	pointer-events: auto;
}

.tt-team-stack.tt-team-stack--list .tt-team-stack__card,
.tt-team-stack.tt-team-stack--list .tt-team-stack__card:not(.is-active) {
	pointer-events: auto;
}

@media (max-width: 1024px), (hover: none) and (pointer: coarse) {
	.tt-team-stack--fan {
		min-height: 0;
		display: block;
		align-items: stretch;
		justify-content: flex-start;
	}

	.tt-team-stack--fan .tt-team-stack__stage {
		display: flex;
		flex-direction: column;
		align-items: center;
		width: 100% !important;
		height: auto !important;
		gap: var(--tt-ts-list-gap, 24px);
	}

	.tt-team-stack--fan .tt-team-stack__card {
		position: relative;
		top: auto;
		left: auto;
		flex: 0 0 auto;
		width: var(--tt-ts-card-w);
		max-width: 100%;
		box-sizing: border-box;
		transform: none !important;
		cursor: default;
		will-change: auto;
		pointer-events: auto;
	}

	.tt-team-stack--fan .tt-team-stack__card:not(.is-active) {
		pointer-events: auto;
	}
}

@media (prefers-reduced-motion: reduce) {
	.tt-team-stack__card {
		transition: none !important;
	}
}
