/* GeoJonica — "Viaggio nel sottosuolo": blocco geologico 3D guidato dallo scroll */

.gjm-geo {
	position: relative;
	height: 640vh;
	background:
		radial-gradient(80% 60% at 50% 45%, rgba(25, 156, 56, .22), transparent 70%),
		radial-gradient(60% 40% at 80% 100%, rgba(79, 195, 255, .10), transparent 70%),
		linear-gradient(180deg, #021309 0%, #04210f 45%, #020d06 100%);
	color: #eafbe9;
	font-family: "Barlow", system-ui, sans-serif;
}
.gjm-geo-sticky {
	position: sticky; top: 0;
	height: 100vh; height: 100svh;
	overflow: hidden;
}
.gjm-geo-canvas { position: absolute; inset: 0; width: 100% !important; height: 100% !important; display: block; }

/* Etichette agganciate agli oggetti 3D */
.gjm-geo-labels { position: absolute; inset: 0; pointer-events: none; }
.gjm-geo-label {
	position: absolute; left: 0; top: 0;
	display: flex; align-items: center; gap: 8px; white-space: nowrap;
	padding: 7px 12px 7px 9px; border-radius: 99px;
	background: rgba(2, 25, 10, .62); color: #f1fff2;
	-webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .16), 0 10px 24px -12px rgba(0, 0, 0, .7);
	font: 600 13px/1 "Sora", sans-serif; letter-spacing: -0.01em;
	opacity: 0; transition: opacity .35s ease;
	will-change: transform, opacity;
}
.gjm-geo-label small { font: 500 11px/1 "Barlow", sans-serif; color: rgba(225, 255, 228, .7); letter-spacing: .02em; }
.gjm-geo-label i { width: 10px; height: 10px; border-radius: 50%; flex: none; box-shadow: 0 0 0 3px rgba(255, 255, 255, .14); }
.gjm-geo-label.is-on { opacity: 1; }
.gjm-geo-label--alert i { animation: gjm-pulse 1s ease-in-out infinite; }
@keyframes gjm-pulse { 50% { box-shadow: 0 0 0 7px rgba(255, 200, 80, .0), 0 0 14px 4px rgba(255, 200, 80, .55); } }

/* Testi delle tappe */
.gjm-geo-steps { position: absolute; inset: 0; pointer-events: none; }
.gjm-geo-step {
	/* Desktop: testo centrato in alto (sotto l'header), il blocco 3D sotto e al centro */
	position: absolute; left: 50%; top: 138px;
	width: min(820px, 86vw); text-align: center;
	transform: translate(-50%, 18px); opacity: 0; filter: blur(8px);
	transition: opacity .7s cubic-bezier(.2, .8, .2, 1), transform .7s cubic-bezier(.2, .8, .2, 1), filter .7s ease;
}
.gjm-geo-step.is-active { opacity: 1; transform: translate(-50%, 0); filter: none; pointer-events: auto; }
.gjm-geo-steps::before {
	content: ""; position: absolute; inset: 0; pointer-events: none;
	background: linear-gradient(180deg, rgba(2, 17, 8, .92) 0%, rgba(2, 17, 8, .7) 30%, rgba(2, 17, 8, 0) 50%);
}
.gjm-geo-step p { max-width: 640px; margin-left: auto !important; margin-right: auto !important; }
@media (min-width: 768px) { .gjm-geo-step h2 br, .gjm-geo-hint { display: none !important; } }

.gjm-geo-eyebrow {
	display: inline-block; margin-bottom: 14px; padding: 8px 14px; border-radius: 99px;
	font: 600 12px/1 "Sora", sans-serif; letter-spacing: .16em; text-transform: uppercase;
	color: #9ff0ae; background: rgba(159, 240, 174, .1); box-shadow: inset 0 0 0 1px rgba(159, 240, 174, .3);
}
.gjm-geo-step h2 {
	margin: 0 0 14px; color: #fff !important;
	font: 700 clamp(28px, 3.1vw, 46px)/1.08 "Sora", sans-serif !important; letter-spacing: -0.035em;
	text-shadow: 0 4px 30px rgba(0, 0, 0, .6);
}
.gjm-geo-step p {
	margin: 0; font-size: clamp(16px, 1.3vw, 19px); line-height: 1.6; color: rgba(230, 255, 233, .85);
	text-shadow: 0 2px 16px rgba(0, 0, 0, .8);
}
.gjm-geo-hint {
	display: inline-flex; flex-direction: column; align-items: center; gap: 10px; margin-top: 16px;
	font: 600 11px/1 "Sora", sans-serif; letter-spacing: .2em; text-transform: uppercase; color: rgba(230, 255, 233, .7);
}
.gjm-geo-hint i {
	width: 22px; height: 36px; border-radius: 12px; box-shadow: inset 0 0 0 2px rgba(230, 255, 233, .6); position: relative;
}
.gjm-geo-hint i::after {
	content: ""; position: absolute; left: 50%; top: 7px; width: 4px; height: 8px; margin-left: -2px; border-radius: 2px;
	background: #9ff0ae; animation: gjm-rotella 1.6s ease-in-out infinite;
}
@keyframes gjm-rotella { 0% { transform: translateY(0); opacity: 1; } 70% { transform: translateY(12px); opacity: 0; } 100% { opacity: 0; } }

.gjm-geo-actions { display: flex; gap: 14px 22px; justify-content: center; align-items: center; flex-wrap: wrap; margin-top: 24px; }
.gjm-geo-btn {
	display: inline-flex; align-items: center; gap: 12px; padding: 17px 28px; border-radius: 99px; text-decoration: none;
	background: #c9ffd2; color: #013a0f !important; font: 700 16px/1 "Sora", sans-serif;
	box-shadow: 0 0 0 6px rgba(201, 255, 210, .12), 0 18px 40px -14px rgba(0, 0, 0, .8);
	transition: transform .3s cubic-bezier(.2, .8, .2, 1), gap .3s ease;
}
.gjm-geo-btn:hover { transform: translateY(-3px); gap: 18px; }
.gjm-geo-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.gjm-geo-link { color: #c9ffd2 !important; font: 600 15px/1 "Sora", sans-serif; text-decoration: underline; text-underline-offset: 5px; }
.gjm-geo a:focus-visible { outline: 3px solid #9ff0ae; outline-offset: 4px; }

/* Indicatore di avanzamento */
.gjm-geo-dots {
	position: absolute; right: clamp(14px, 3vw, 40px); top: 50%; transform: translateY(-50%);
	display: flex; flex-direction: column; gap: 12px; margin: 0; padding: 0; list-style: none;
}
.gjm-geo-dots li {
	width: 8px; height: 8px; border-radius: 99px; background: rgba(230, 255, 233, .28);
	transition: height .5s cubic-bezier(.2, .8, .2, 1), background-color .4s ease;
}
.gjm-geo-dots li.is-active { height: 28px; background: #9ff0ae; }

/* Telefono: testi in basso, scena sopra */
@media (max-width: 767px) {
	.gjm-geo { height: 560vh; }
	.gjm-geo-step,
	.gjm-geo-step[data-step="0"], .gjm-geo-step[data-step="5"] {
		left: 50%; right: auto; width: calc(100vw - 40px); text-align: left;
		top: auto; bottom: 22px; transform: translate(-50%, 16px);
		padding: 18px 18px 20px; border-radius: 20px;
		background: rgba(2, 22, 9, .72); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
		box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1);
	}
	.gjm-geo-step.is-active,
	.gjm-geo-step[data-step="0"].is-active, .gjm-geo-step[data-step="5"].is-active { transform: translate(-50%, 0); }
	.gjm-geo-steps::before { background: linear-gradient(0deg, rgba(2, 17, 8, .9) 0%, rgba(2, 17, 8, .5) 30%, rgba(2, 17, 8, 0) 50%); }
	.gjm-geo-step h2 { font-size: 26px !important; margin-bottom: 8px; }
	.gjm-geo-step p { font-size: 15px; }
	.gjm-geo-eyebrow { margin-bottom: 10px; font-size: 10.5px; }
	.gjm-geo-hint { margin-top: 14px; }
	.gjm-geo-actions { justify-content: flex-start; margin-top: 16px; }
	.gjm-geo-btn { padding: 15px 22px; font-size: 15px; }
	.gjm-geo-dots { top: 90px; transform: none; right: 12px; gap: 8px; }
	.gjm-geo-dots li { width: 6px; height: 6px; }
	.gjm-geo-dots li.is-active { height: 20px; }
	.gjm-geo-label { font-size: 11.5px; padding: 6px 10px 6px 8px; }
	.gjm-geo-label small { display: none; }
}

/* Senza WebGL: niente scena bloccata, solo i testi uno dopo l'altro */
.gjm-geo.gjm-geo--fallback { height: auto; padding: 80px 0; }
.gjm-geo--fallback .gjm-geo-sticky { position: relative; height: auto; overflow: visible; }
.gjm-geo--fallback .gjm-geo-canvas, .gjm-geo--fallback .gjm-geo-dots, .gjm-geo--fallback .gjm-geo-hint { display: none; }
.gjm-geo--fallback .gjm-geo-steps { position: relative; display: grid; gap: 48px; max-width: 720px; margin: 0 auto; padding: 0 20px; }
.gjm-geo--fallback .gjm-geo-step { position: static; opacity: 1; filter: none; transform: none !important; width: auto; text-align: left; background: none; padding: 0; }
