/**
 * Animazione cerchi DIKW — homepage sezione 2.
 * Contenitore grafico: 705×705px (Figma), allineato al logo e al testo hero.
 *
 * @package GDS-Fullcreative
 */

.gds-home-section--cerchi {
	display: flex;
	align-items: stretch;
	overflow: visible;
	min-height: auto;
	background-color: var(--gds-home-cerchi-bg, #e5e2e4);
}

.gds-home-section--cerchi .cerchi-section {
	display: grid;
	grid-template-columns: minmax(0, 705px) minmax(0, 594px);
	justify-content: center;
	align-items: center;
	column-gap: clamp(48px, 7vw, 100px);
	padding-block: 80px;
	min-height: min(1080px, 100vh);
	background: transparent;
	position: relative;
	overflow: visible;
}

.cerchi-visual {
	position: relative;
	width: 100%;
	max-width: 705px;
	height: auto;
	aspect-ratio: 1 / 1;
	flex-shrink: 0;
	pointer-events: none;
	justify-self: center;
	margin: 0;
	container-type: inline-size;
	container-name: cerchi-visual;
	overflow: hidden;
}

.cerchi-visual__svg {
	width: 100%;
	height: 100%;
	object-fit: contain;
	display: block;
	transform-origin: 50% 50%;
}

.cerchi-visual__label {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	margin: 0;
	padding: 0;
	width: 48.16%;
	max-width: 340px;
	text-align: center;
	color: #003fda;
	font-family: var(--font-primary, "Helvetica Neue", Helvetica, Arial, sans-serif);
	font-size: clamp(22px, 5.67cqw, 40px);
	font-weight: 300;
	line-height: 1.25;
	letter-spacing: 0;
	pointer-events: none;
	z-index: 2;
}

html.gds-anim-js .gds-home-section--cerchi:not(.gds-anim-is-active) .cerchi-visual__label {
	opacity: 0;
	transform: translate(-50%, calc(-50% + 8px));
}

.gds-home-section--cerchi.gds-anim-is-active .cerchi-visual__label {
	animation: cerchi-label-in 0.85s ease 0.95s forwards;
}

html.gds-anim-js .gds-home-section--cerchi:not(.gds-anim-is-active) .cerchi-visual__svg {
	opacity: 0;
	transform: scale(0.96) rotate(-3deg);
}

html.gds-anim-js .gds-home-section--cerchi:not(.gds-anim-is-active) .cerchi-content {
	opacity: 0;
	transform: translateY(16px);
}

.gds-home-section--cerchi.gds-anim-is-active .cerchi-visual__svg {
	animation: cerchi-reveal 1.2s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.gds-home-section--cerchi.gds-anim-is-active .cerchi-content {
	animation: cerchi-content-in 0.8s ease 1.1s forwards;
}

.cerchi-content {
	width: 100%;
	max-width: 594px;
	margin: 0;
	color: var(--gds-color-slate, #2a2f3a);
	position: relative;
	z-index: 2;
	align-self: center;
	justify-self: center;
}

.cerchi-content p {
	margin: 0;
	font-family: var(--font-primary, "Helvetica Neue", Helvetica, Arial, sans-serif);
	font-size: 22px;
	font-weight: 300;
	line-height: 33px;
	letter-spacing: 0;
}

.cerchi-content p + p {
	margin-top: 33px;
}

.cerchi-cta {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	margin-top: 40px;
	width: 187px;
	min-height: 50px;
	padding: 0 20px;
	border: 1px solid var(--gds-color-red, #c72a29);
	border-radius: 999px;
	background: transparent;
	color: var(--gds-color-red, #c72a29);
	font-family: var(--font-primary, "Helvetica Neue", Helvetica, Arial, sans-serif);
	font-size: var(--gds-home-btn-fs, 16px);
	font-weight: 300;
	line-height: var(--gds-home-btn-lh, 18px);
	letter-spacing: 0;
	text-decoration: none;
	text-transform: uppercase;
	transition: color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.cerchi-cta:hover,
.cerchi-cta:focus-visible {
	color: #fff;
	border-color: var(--gds-color-red, #c72a29);
	background-color: var(--gds-color-red, #c72a29);
}

/* Mobile/tablet (DIKW.svg 430px): grafico bleed laterale, testo centrale ridotto nel container. */
@media (max-width: 1280px) {
	.gds-home-section--cerchi .cerchi-section {
		grid-template-columns: 1fr;
		justify-content: stretch;
		align-items: start;
		min-height: 0;
		row-gap: 0;
		padding-top: var(--gds-home-cerchi-pt);
		padding-bottom: clamp(40px, 8vw, 56px);
		overflow: visible;
	}

	/* Full-bleed: esce dal padding 36px per guadagnare spazio al centro. */
	.cerchi-visual {
		justify-self: stretch;
		width: calc(100% + 2 * var(--gds-home-pad-x));
		max-width: none;
		margin-inline: calc(-1 * var(--gds-home-pad-x));
		margin-bottom: var(--gds-home-gap-cerchi-text);
		overflow: visible;
	}

	.cerchi-visual__label {
		width: min(calc(100% - 2 * var(--gds-home-pad-x)), 210px);
		max-width: min(calc(100% - 2 * var(--gds-home-pad-x)), 210px);
		font-size: var(--gds-home-cerchi-label-fs);
		line-height: var(--gds-home-cerchi-label-lh);
		letter-spacing: 0;
		color: var(--gds-color-blue, #003fda);
	}

	.cerchi-content {
		justify-self: stretch;
		width: 100%;
		max-width: none;
		margin-inline: 0;
	}

	.cerchi-content p {
		font-size: var(--gds-home-text-fs);
		line-height: var(--gds-home-text-lh);
		letter-spacing: 0;
	}

	.cerchi-content p + p {
		margin-top: clamp(20px, 5vw, 28px);
	}

	.cerchi-cta {
		display: inline-flex;
		justify-self: start;
		align-self: start;
		width: auto;
		margin-top: var(--gds-home-gap-text-cta);
		margin-inline: 0;
	}
}

@media (min-width: 1281px) and (max-width: 1440px) {
	.gds-home-section--cerchi .cerchi-section {
		grid-template-columns: 1fr;
		justify-content: stretch;
		min-height: 0;
		row-gap: 32px;
		padding-block: 50px;
	}

	.cerchi-visual {
		justify-self: center;
		width: min(100%, 640px);
		max-width: 640px;
		margin-inline: auto;
	}

	.cerchi-visual__label {
		max-width: 52%;
		font-size: clamp(18px, 4.8cqw, 34px);
	}

	.cerchi-content {
		justify-self: stretch;
		width: 100%;
		max-width: none;
		margin-inline: 0;
	}

	.cerchi-content p {
		font-size: var(--gds-home-text-fs);
		line-height: var(--gds-home-text-lh);
		letter-spacing: 0;
	}

	.cerchi-content p + p {
		margin-top: clamp(20px, 5vw, 28px);
	}

	.cerchi-cta {
		display: flex;
		margin-inline: auto;
	}
}

@media (max-width: 768px) {
	.cerchi-visual__label {
		width: min(calc(100% - 2 * var(--gds-home-pad-x)), 195px);
		max-width: min(calc(100% - 2 * var(--gds-home-pad-x)), 195px);
	}
}

@keyframes cerchi-label-in {
	from {
		opacity: 0;
		transform: translate(-50%, calc(-50% + 8px));
	}

	to {
		opacity: 1;
		transform: translate(-50%, -50%);
	}
}

@keyframes cerchi-reveal {
	from {
		opacity: 0;
		transform: scale(0.96) rotate(-3deg);
	}

	to {
		opacity: 1;
		transform: scale(1) rotate(0deg);
	}
}

@keyframes cerchi-content-in {
	from {
		opacity: 0;
		transform: translateY(16px);
	}

	to {
		opacity: 1;
		transform: translateY(0);
	}
}

@media (prefers-reduced-motion: reduce) {
	.gds-home-section--cerchi .cerchi-visual__svg,
	.gds-home-section--cerchi .cerchi-content {
		animation: none !important;
		opacity: 1 !important;
		transform: none !important;
	}

	.gds-home-section--cerchi .cerchi-visual__label {
		animation: none !important;
		opacity: 1 !important;
		transform: translate(-50%, -50%) !important;
	}
}
