/* Punto e via · Valigia e aeroplanino */

.pevv-defs {
	position: absolute;
	width: 0;
	height: 0;
	overflow: hidden;
}

/* La valigia */
.pevv-box {
	position: fixed;
	left: 8px;
	bottom: 8px;
	width: 96px;
	z-index: 40;
	pointer-events: none;
	opacity: 0;
	transform: translateY(14px);
	transition: opacity .35s, transform .35s;
}
.pevv-box.pevv-vis {
	opacity: 1;
	transform: none;
}
.pevv-box > svg {
	display: block;
	width: 100%;
	height: auto;
	overflow: visible;
}

.pevv-it { opacity: 0; transform-box: fill-box; transform-origin: 50% 100%; transition: opacity .2s; }
.pevv-it.pevv-on { opacity: 1; animation: pevv-cala .62s cubic-bezier(.3,.7,.4,1) both; }
@keyframes pevv-cala {
	0% { transform: translateY(-52px) rotate(-16deg); opacity: 0; }
	30% { opacity: 1; }
	78% { transform: translateY(2px) rotate(2deg) scale(1.04,.95); }
	100% { transform: none; opacity: 1; }
}
.pevv-carico { transition: transform .3s ease-in; }
.pevv-chiude .pevv-carico { transform: translateY(54px); }
.pevv-c-aperto { transform-box: fill-box; transform-origin: 50% 100%; transition: transform .2s ease-in .22s; }
.pevv-chiude .pevv-c-aperto { transform: scaleY(0); }
.pevv-c-chiuso { transform-box: fill-box; transform-origin: 50% 100%; transform: scaleY(0); }
.pevv-chiude .pevv-c-chiuso { animation: pevv-scatta .36s cubic-bezier(.3,.8,.4,1) .4s both; }
@keyframes pevv-scatta { 0% { transform: scaleY(0); } 70% { transform: scaleY(1.07); } 100% { transform: scaleY(1); } }
.pevv-corpo { transform-box: fill-box; transform-origin: 50% 100%; }
.pevv-chiude .pevv-corpo { animation: pevv-schiaccia .28s ease-out .62s; }
@keyframes pevv-schiaccia { 40% { transform: scale(1.02,.95); } 100% { transform: none; } }
.pevv-gancio { transform-box: fill-box; transform-origin: 50% 0; transform: scaleY(0); }
.pevv-chiude .pevv-gancio { animation: pevv-gancio .22s ease-out .76s both; }
@keyframes pevv-gancio { 0% { transform: scaleY(-.6); } 100% { transform: scaleY(1); } }
.pevv-cartellino { transform-origin: 190px 124px; }
.pevv-dondola { animation: pevv-dondola 1.3s ease-out; }
@keyframes pevv-dondola { 20% { transform: rotate(14deg); } 45% { transform: rotate(-8deg); } 70% { transform: rotate(4deg); } 100% { transform: none; } }
.pevv-vapore { animation: pevv-vapore 2.4s ease-in-out infinite; }
@keyframes pevv-vapore { 0% { opacity: 0; transform: translateY(3px); } 40% { opacity: .9; } 100% { opacity: 0; transform: translateY(-5px); } }
.pevv-sc { transform-box: fill-box; transform-origin: center; animation: pevv-sc .9s ease-out both; }
@keyframes pevv-sc { 0% { transform: scale(0) rotate(0); opacity: 1; } 40% { transform: scale(1.15) rotate(30deg); opacity: 1; } 100% { transform: scale(0) rotate(80deg); opacity: 0; } }
.pevv-pet { transform-box: fill-box; transform-origin: 50% 100%; animation: pevv-pet .8s ease-out both; }
@keyframes pevv-pet { 0% { transform: scale(.2); opacity: 0; } 35% { opacity: 1; } 100% { transform: scale(1) translateY(-6px); opacity: 0; } }

.pevv-pev {
	position: absolute;
	left: 50%;
	bottom: 62px;
	font-family: var(--wp--preset--font-family--titoli, "Caveat Brush", cursive);
	font-size: 21px;
	line-height: 1;
	white-space: nowrap;
	color: #5C6337;
	opacity: 0;
	transform: translate(-50%, 8px) rotate(-5deg) scale(.7);
	transition: opacity .2s, transform .2s;
	-webkit-text-stroke: 3px #FBF4E6;
	paint-order: stroke fill;
}
.pevv-chiude .pevv-pev {
	opacity: 1;
	transform: translate(-50%, 0) rotate(-5deg);
	transition: opacity .25s .86s, transform .35s cubic-bezier(.3,1.5,.5,1) .86s;
}
.pevv-pev path { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 0s; }
.pevv-chiude .pevv-pev path { stroke-dashoffset: 0; transition: stroke-dashoffset .45s ease-out 1.15s; }

/* L'aeroplanino del torna su */
.pevv-torna {
	position: fixed;
	right: 14px;
	bottom: 16px;
	width: 56px;
	height: 56px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: none;
	box-shadow: none;
	cursor: pointer;
	z-index: 41;
	opacity: 0;
	transform: scale(.5);
	pointer-events: none;
	transition: opacity .25s, transform .3s cubic-bezier(.3,1.5,.5,1);
}
.pevv-torna.pevv-on {
	opacity: 1;
	transform: none;
	pointer-events: auto;
}
.pevv-torna:focus-visible {
	outline: 2px solid #5C6337;
	outline-offset: 4px;
}
.pevv-torna .pevv-anello {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
}
.pevv-torna .pevv-aer {
	position: absolute;
	left: -1px;
	top: -4px;
	width: 62px;
	max-width: none;
	height: auto;
	animation: pevv-fluttua 2.8s ease-in-out infinite;
}
@keyframes pevv-fluttua { 0%, 100% { transform: translate(0,1px) rotate(-4deg); } 50% { transform: translate(2px,-3px) rotate(3deg); } }
.pevv-torna .pevv-st {
	position: absolute;
	right: -6px;
	top: -8px;
	width: 14px;
	height: 14px;
	animation: pevv-brilla 3.2s ease-in-out infinite;
}
@keyframes pevv-brilla { 0%, 60%, 100% { transform: scale(0) rotate(0); } 75% { transform: scale(1) rotate(45deg); } }

.pevv-volo {
	position: fixed;
	left: 0;
	top: 0;
	width: 100vw;
	height: 100vh;
	overflow: visible;
	pointer-events: none;
	z-index: 60;
}
.pevv-volante {
	position: fixed;
	left: 0;
	top: 0;
	width: 66px;
	max-width: none;
	height: auto;
	opacity: 0;
	pointer-events: none;
	z-index: 61;
}

@media (min-width: 960px) {
	.pevv-box { left: 16px; bottom: 14px; width: 124px; }
	.pevv-pev { bottom: 80px; font-size: 27px; }
	.pevv-torna { right: 22px; bottom: 22px; width: 64px; height: 64px; }
	.pevv-torna .pevv-aer { width: 72px; }
}

/* Chi preferisce meno movimento vede la valigia riempirsi e chiudersi senza animazioni */
@media (prefers-reduced-motion: reduce) {
	.pevv-box, .pevv-box *, .pevv-torna, .pevv-torna * { animation: none !important; transition: none !important; }
	.pevv-chiude .pevv-c-chiuso, .pevv-chiude .pevv-gancio { transform: none; }
}

@media print {
	.pevv-box, .pevv-torna, .pevv-volo, .pevv-volante { display: none !important; }
}
