.tarot-stage {
	--tarot-rot-x: 10;
	--tarot-rot-y: 0;
	--tarot-rot-z: 0;
	--tarot-rise: 60;
	--tarot-arc: 10;
	--tarot-fan: 0.9;
	--tarot-active-scale: 1.38;
	position: relative;
	display: block;
	width: 100%;
	height: calc(100vh - 3vw);
	overflow: hidden;
	color: var(--primary);
	cursor: grab;
	touch-action: pan-y;
	user-select: none;
	-webkit-user-select: none;
}

.tarot-stage.is-dragging {
	cursor: grabbing;
}

.tarot-scene {
	position: absolute;
	inset: 0;
	z-index: 1;
	overflow: hidden;
	perspective: 1700px;
	perspective-origin: 50% 50%;
	isolation: isolate;
}

.tarot-track {
	position: absolute;
	top: calc(50% + 6px);
	left: 50%;
	width: 0;
	height: 0;
	margin: 0;
	padding: 0;
	list-style: none;
	transform-style: preserve-3d;
	transform: rotateX(calc(var(--tarot-rot-x) * 1deg)) rotateY(calc(var(--tarot-rot-y) * 1deg)) rotateZ(calc(var(--tarot-rot-z) * 1deg));
	z-index: 1;
}

.tarot-card {
	--card-w: 228px;
	position: absolute;
	top: 0;
	left: 0;
	width: var(--card-w);
	height: calc(var(--card-w) * 1.729);
	margin: calc(var(--card-w) * -0.8645) 0 0 calc(var(--card-w) * -0.5);
	transform-style: preserve-3d;
	will-change: transform, opacity;
	cursor: pointer;
}

.tarot-card-body {
	position: relative;
	width: 100%;
	height: 100%;
	border-radius: 12px;
	transform-style: preserve-3d;
	transition: transform 0.15s ease-out;
	transform: perspective(800px) rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg)) translateZ(var(--press, 0px)) rotateY(var(--flip, 0deg));
	box-shadow: 0 2px 0 rgb(255 240 215 / 35%) inset, 0 34px 60px -18px rgb(22 10 28 / 70%), 0 8px 18px rgb(22 10 28 / 35%);
}

.tarot-card-face {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: 12px;
	-webkit-user-drag: none;
	pointer-events: none;
	filter: sepia(0.18) saturate(0.88) brightness(0.97);
}

.tarot-card-body::before {
	content: '';
	position: absolute;
	inset: 0;
	border-radius: 12px;
	border: 1px solid rgb(221 190 151 / 70%);
	outline: 1px solid rgb(221 190 151 / 45%);
	outline-offset: 4px;
	pointer-events: none;
}

.tarot-card-body::after {
	content: '';
	position: absolute;
	inset: 0;
	border-radius: 12px;
	pointer-events: none;
	background: linear-gradient(115deg, transparent 32%, rgb(255 236 200 / 0.38) 47%, rgb(255 250 235 / 0.55) 50%, rgb(255 236 200 / 0.3) 53%, transparent 68%);
	background-size: 260% 100%;
	background-position: var(--sheen, 50%) 0;
	mix-blend-mode: soft-light;
}

.tarot-details {
	position: absolute;
	top: 16px;
	left: 22px;
	width: clamp(340px, 34vw, 600px);
	z-index: 3;
	pointer-events: none;
}

.tarot-details-title {
	margin: 0 0 clamp(6px, 0.5vw, 10px);
	font-family: 'PP Editorial';
	font-weight: normal;
	font-size: clamp(40px, 4.4vw, 72px);
	line-height: 0.95;
	letter-spacing: -0.3px;
	text-transform: uppercase;
	color: var(--primary);
	filter: url(#weathered);
}

.tarot-quotes {
	position: absolute;
	top: 26px;
	right: 22px;
	z-index: 3;
	pointer-events: none;
}

.tarot-quote {
	margin: 0;
	text-align: right;
}

.tarot-quote-text {
	margin: 0;
	font-family: 'PP Editorial';
	font-size: clamp(15px, 1.5vw, 24px);
	line-height: 1.1;
	letter-spacing: 1px;
	width: clamp(190px, 18.5vw, 300px);
	margin-left: auto;
	text-transform: uppercase;
	text-wrap: balance;
	filter: url(#weathered);
}

.tarot-counter {
	position: absolute;
	left: 50%;
	bottom: 30px;
	margin: 0;
	transform: translateX(-50%);
	z-index: 4;
	font-family: 'PP Editorial';
	font-size: 12px;
	letter-spacing: 3px;
	opacity: 0.8;
}

.tarot-control {
	position: absolute;
	top: 50%;
	z-index: 4;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 58px;
	height: 58px;
	margin-top: -29px;
	padding: 0;
	border: 1px solid var(--primary);
	border-radius: 50%;
	outline: 1px solid rgb(221 190 151 / 45%);
	outline-offset: 4px;
	background-color: #674f67;
	background-image: var(--bg-texture);
	background-size: auto 375vh;
	background-position: center;
	color: var(--primary);
	cursor: pointer;
	transition: color 0.3s ease, background-color 0.3s ease, outline-offset 0.4s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.3s ease, transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.tarot-prev {
	left: 40px;
}

.tarot-next {
	right: 40px;
}

.tarot-control:hover {
	color: #4a3a4f;
	background-color: var(--primary);
	background-image: none;
	outline-offset: 7px;
}

.tarot-prev:hover {
	transform: translateX(-3px);
}

.tarot-next:hover {
	transform: translateX(3px);
}

.tarot-control:disabled {
	cursor: default;
	color: rgb(221 190 151 / 35%);
	border-color: rgb(221 190 151 / 35%);
	outline-color: rgb(221 190 151 / 18%);
	background-color: #674f67;
	background-image: var(--bg-texture);
	outline-offset: 4px;
	transform: none;
}

.tarot-arrow {
	position: relative;
	display: block;
	width: 22px;
	height: 1px;
	background: currentColor;
}

.tarot-arrow::after {
	content: '';
	position: absolute;
	top: -4px;
	width: 8px;
	height: 8px;
	border-top: 1px solid currentColor;
}

.tarot-next .tarot-arrow::after {
	right: 0;
	border-right: 1px solid currentColor;
	transform: rotate(45deg);
}

.tarot-prev .tarot-arrow::after {
	left: 0;
	border-left: 1px solid currentColor;
	transform: rotate(-45deg);
}

.tarot-fade-out {
	opacity: 0;
	transform: translateY(-6px);
}

@media (prefers-reduced-motion: reduce) {
	.tarot-card-body {
		transition: none;
	}
}

html.is-mobile .tarot-stage {
	--tarot-inactive-scale: 0.62;
	--tarot-active-scale: 1.15;
	--tarot-gap-ratio: 0.86;
	--tarot-rot-x: 6;
	--tarot-rot-y: 0;
	--tarot-rot-z: 0;
	--tarot-rise: 34;
	--tarot-arc: 10;
	--tarot-fan: 0.9;
	height: 100svh;
}

html.is-mobile .tarot-details {
	top: 80px;
	left: 16px;
	right: 16px;
	width: auto;
}

html.is-mobile .tarot-details-title {
	font-size: 34px;
	margin-bottom: 8px;
}

html.is-mobile .tarot-track {
	top: 58%;
	left: 50%;
}

html.is-mobile .tarot-card {
	--card-w: min(52vw, 27svh);
}

html.is-mobile .tarot-quotes {
	display: none;
}

html.is-mobile .tarot-control {
	top: auto;
	bottom: 26px;
	width: 44px;
	height: 44px;
	margin-top: 0;
}

html.is-mobile .tarot-prev {
	left: calc(50% - 112px);
}

html.is-mobile .tarot-next {
	right: calc(50% - 112px);
}

html.is-mobile .tarot-prev:hover,
html.is-mobile .tarot-next:hover {
	transform: none;
}

html.is-mobile .tarot-counter {
	bottom: 40px;
}

html.is-mobile .tarot-arrow {
	width: 16px;
}

.tarot-scene,
.tarot-counter {
	transition: opacity 0.5s ease, transform 0.7s cubic-bezier(0.55, 0, 0.75, 0.2);
}

.tarot-details,
.tarot-quotes,
.tarot-details-credits {
	opacity: 0;
}

.tarot-stage.is-leaving .tarot-scene {
	opacity: 0;
	transform: translateY(60px);
}

.tarot-stage.is-leaving .tarot-control,
.tarot-stage.is-leaving .tarot-counter {
	opacity: 0 !important;
	pointer-events: none;
}

.tarot-card.is-departed {
	opacity: 0 !important;
}

.tarot-curtain {
	position: fixed;
	inset: 0;
	z-index: 5900;
	opacity: 0;
	pointer-events: none;
	background-color: #674f67;
	background-image: var(--bg-texture);
	background-size: auto 375vh;
	background-position: center;
}

.tarot-flyer {
	position: fixed;
	z-index: 6000;
	pointer-events: none;
}

.tarot-flyer img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: 12px;
	box-shadow: 0 40px 80px -20px rgb(22 10 28 / 70%);
	filter: sepia(0.18) saturate(0.88) brightness(0.97);
}

.tarot-details-credits {
	position: absolute;
	right: 22px;
	bottom: 18px;
	z-index: 3;
	display: flex;
	flex-wrap: wrap;
	justify-content: flex-end;
	align-items: center;
	gap: 0 14px;
	width: clamp(300px, 30vw, 520px);
	margin: 0;
	text-align: right;
	pointer-events: none;
	font-family: 'PP Editorial-light';
	font-size: clamp(12px, 0.95vw, 16px);
	text-transform: uppercase;
	letter-spacing: 0.5px;
	color: var(--primary);
	filter: url(#weathered);
}

.tarot-details-credits .project-credits-break {
	flex-basis: 100%;
	height: 0;
}

.tarot-details-credits .project-credit {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	padding: 3px 0;
}

.tarot-details-credits .project-credit small,
.tarot-details-credits .project-credit-name {
	display: block;
	line-height: 1;
	text-box: trim-both cap alphabetic;
}

.tarot-details-credits .project-credit small {
	font-family: 'PP Editorial';
	font-size: 0.55em;
	letter-spacing: 2.5px;
	opacity: 0.8;
}

html.is-mobile .tarot-details-credits {
	display: none;
}

.tarot-card[data-flip] .tarot-card-face {
	backface-visibility: hidden;
	-webkit-backface-visibility: hidden;
}

.tarot-card-back {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 12%;
	box-sizing: border-box;
	border-radius: 12px;
	background:
		radial-gradient(ellipse at 30% 20%, rgb(255 244 220 / 45%), transparent 60%),
		radial-gradient(ellipse at 75% 85%, rgb(120 80 40 / 25%), transparent 65%),
		#d6bd92;
	box-shadow: inset 0 0 0 10px #d6bd92, inset 0 0 0 11px #4b3652, inset 0 0 0 15px #d6bd92, inset 0 0 0 16px #4b3652, inset 0 0 40px rgb(90 55 30 / 35%);
	transform: rotateY(180deg);
	backface-visibility: hidden;
	-webkit-backface-visibility: hidden;
	pointer-events: none;
}

.tarot-card-back p {
	margin: 0;
	font-family: 'PP Editorial';
	font-size: calc(var(--card-w) * 0.058);
	line-height: 1.35;
	letter-spacing: 0.4px;
	text-align: center;
	text-transform: uppercase;
	color: #4b3652;
	filter: url(#weathered);
}

.tarot-card.is-flipped .tarot-card-body {
	--flip: 180deg;
}

.tarot-card.is-turning .tarot-card-body {
	transition: transform 0.85s cubic-bezier(0.65, 0, 0.35, 1);
}

.tarot-card-back-label {
	font-family: 'PP Editorial';
	font-style: italic;
	font-weight: 300;
	font-size: calc(var(--card-w) * 0.1);
	line-height: 1;
	letter-spacing: 0.5px;
	color: #4b3652;
	filter: url(#weathered);
}

.tarot-card-back-divider {
	position: relative;
	width: 86%;
	height: 1px;
	margin: calc(var(--card-w) * 0.07) 0 calc(var(--card-w) * 0.2);
	background: linear-gradient(to right, #4b3652 calc(50% - 11px), transparent calc(50% - 11px), transparent calc(50% + 11px), #4b3652 calc(50% + 11px));
}

.tarot-card-back-divider::after {
	content: '';
	position: absolute;
	top: 50%;
	left: 50%;
	width: 20px;
	height: 19px;
	background-color: #4b3652;
	-webkit-mask: url('../animations/hover/images/img_0.png') center / contain no-repeat;
	mask: url('../animations/hover/images/img_0.png') center / contain no-repeat;
	transform: translate(-50%, -50%);
}

.tarot-card-back-contact {
	margin-top: calc(var(--card-w) * 0.1);
	padding: calc(var(--card-w) * 0.035) calc(var(--card-w) * 0.09);
	border: 1px solid #4b3652;
	outline: none;
	border-radius: 0;
	background: transparent;
	font-family: 'PP Editorial';
	font-size: calc(var(--card-w) * 0.052);
	letter-spacing: 2px;
	text-transform: uppercase;
	color: #4b3652;
	text-decoration: none;
	cursor: pointer;
	pointer-events: none;
	transition: background-color 0.2s ease, color 0.2s ease;
}

.tarot-card.is-flipped:not(.is-turning) .tarot-card-back-contact {
	pointer-events: auto;
}

.tarot-card-back-contact:hover,
.tarot-card-back-contact:focus-visible {
	background-color: #4b3652;
	color: #d6bd92;
}
