/*
 * VISÉVA — pagina "in arrivo" (versione B: polvere + luce morbida).
 * Colori: tavola di identità di Donato e decisioni di Andrea del 17/11/2026.
 * Font: Montserrat (SIL Open Font License 1.1), solo i pesi usati, sottoinsieme latino.
 */

@font-face {
	font-family: "Montserrat";
	font-style: normal;
	font-weight: 300;
	font-display: swap;
	src: url("../fonts/montserrat-light-latin.woff2") format("woff2");
}

@font-face {
	font-family: "Montserrat";
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url("../fonts/montserrat-regular-latin.woff2") format("woff2");
}

:root {
	--avorio: #f7f4ee;
	--greige: #d9d1c5;
	--champagne: #c9b28a;
	--salvia: #dce4db;
	--nero: #1d1d1b;
}

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	background: var(--avorio);
	color: var(--nero);
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
}

body {
	margin: 0;
	font-family: "Montserrat", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	font-weight: 300;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

.page {
	position: relative;
	display: flex;
	flex-direction: column;
	min-height: 100vh;
	min-height: 100svh;
	overflow: hidden;
}

/* ---------- Luce morbida (si muove solo transform: composizione GPU) ---------- */

.light {
	position: absolute;
	inset: 0;
	z-index: 0;
	overflow: hidden;
	background: var(--avorio);
	pointer-events: none;
}

.light i {
	position: absolute;
	width: 110vmax;
	height: 110vmax;
	border-radius: 50%;
	will-change: transform;
	animation: 60s ease-in-out infinite alternate;
}

/* Greige seta: ombra calda in alto a sinistra. */
.light .l1 {
	top: -55vmax;
	left: -45vmax;
	background: radial-gradient(closest-side, rgba(217, 209, 197, 0.95), rgba(217, 209, 197, 0));
	animation-name: drift-1;
}

/* Verde salvia chiarissimo: in basso a destra. */
.light .l2 {
	right: -50vmax;
	bottom: -60vmax;
	background: radial-gradient(closest-side, rgba(220, 228, 219, 1), rgba(220, 228, 219, 0));
	animation-name: drift-2;
	animation-duration: 74s;
}

/* Champagne: riflesso caldo e tenue al centro. */
.light .l3 {
	top: -10vmax;
	left: -5vmax;
	width: 80vmax;
	height: 80vmax;
	background: radial-gradient(closest-side, rgba(201, 178, 138, 0.32), rgba(201, 178, 138, 0));
	animation-name: drift-3;
	animation-duration: 52s;
}

/* Avorio: la luce piena che scivola sopra le altre. */
.light .l4 {
	top: 10vmax;
	right: -30vmax;
	width: 90vmax;
	height: 90vmax;
	background: radial-gradient(closest-side, rgba(247, 244, 238, 1), rgba(247, 244, 238, 0));
	animation-name: drift-4;
	animation-duration: 66s;
}

@keyframes drift-1 {
	from { transform: translate3d(0, 0, 0) scale(1); }
	to   { transform: translate3d(14vmax, 10vmax, 0) scale(1.12); }
}

@keyframes drift-2 {
	from { transform: translate3d(0, 0, 0) scale(1.05); }
	to   { transform: translate3d(-16vmax, -8vmax, 0) scale(0.95); }
}

@keyframes drift-3 {
	from { transform: translate3d(-6vmax, 6vmax, 0) scale(0.9); }
	to   { transform: translate3d(22vmax, -4vmax, 0) scale(1.1); }
}

@keyframes drift-4 {
	from { transform: translate3d(0, 0, 0) scale(1); }
	to   { transform: translate3d(-30vmax, 12vmax, 0) scale(1.15); }
}

/* Grana finissima, statica: rumore generato in SVG, nessuna immagine da scaricare. */
.grain {
	position: absolute;
	inset: 0;
	z-index: 1;
	pointer-events: none;
	opacity: 0.55;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.92' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.11 0 0 0 0 0.11 0 0 0 0 0.1 0.7 0 0 0 -0.3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
	background-size: 220px 220px;
}

/* ---------- Particelle ---------- */

.dust {
	position: absolute;
	inset: 0;
	z-index: 2;
	width: 100%;
	height: 100%;
	pointer-events: none;
}

/* ---------- Contenuti ---------- */

.hero {
	position: relative;
	z-index: 3;
	display: flex;
	flex: 1;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: clamp(56px, 12vh, 140px) 24px 24px;
	text-align: center;
	/* Il dito disperde la polvere invece di scorrere la pagina; lo zoom resta possibile. */
	touch-action: pinch-zoom;
}

.logo {
	width: min(86vw, 760px, 118vh);
	margin: 0;
	line-height: 0;
}

.logo svg {
	display: block;
	width: 100%;
	height: auto;
	fill: var(--nero);
}

/* Con l'animazione attiva il logo vettoriale resta nella pagina (accessibilità, impaginazione)
   ma lo disegnano le particelle. */
.js-anim .logo svg {
	opacity: 0;
}

.claim {
	margin: clamp(30px, 6vh, 60px) 0 0;
	font-size: clamp(15px, 0.85rem + 0.45vw, 20px);
	line-height: 1.7;
	letter-spacing: 0.02em;
}

.claim span {
	display: block;
}

.invite {
	min-height: 1.7em;
	margin: clamp(16px, 2.6vh, 24px) 0 0;
	font-size: 15px;
	line-height: 1.7;
	letter-spacing: 0.06em;
	color: rgba(29, 29, 27, 0.92);
	opacity: 0;
	transform: translateY(4px);
	transition: opacity 1.4s ease, transform 1.4s ease;
}

.invite.is-visible {
	opacity: 1;
	transform: none;
}

.invite.is-leaving {
	transition-duration: 0.9s;
}

.invite span {
	display: none;
}

.invite[data-mode="touch"] .invite__touch,
.invite[data-mode="pointer"] .invite__pointer {
	display: inline;
}

/* ---------- Dati societari ---------- */

.legal {
	position: relative;
	z-index: 3;
	padding: 16px 20px calc(18px + env(safe-area-inset-bottom, 0px));
	font-size: 12px;
	font-weight: 400;
	line-height: 1.75;
	letter-spacing: 0.03em;
	text-align: center;
	color: rgba(29, 29, 27, 0.82);
}

.legal p {
	margin: 0;
}

.legal__item {
	white-space: nowrap;
}

.legal .sep {
	margin: 0 0.2em;
}

/* Se iOS riconoscesse comunque un dato come numero o indirizzo, non diventa un link. */
.legal a[x-apple-data-detectors],
.legal a[href^="tel:"] {
	color: inherit !important;
	text-decoration: none !important;
	pointer-events: none;
}

/* Tablet e smartphone larghi: due righe, il separatore tra i gruppi sparisce. */
@media (max-width: 819.98px) {
	.legal__group {
		display: block;
	}

	.legal .sep--groups {
		display: none;
	}
}

/* Smartphone: tre righe pulite, nessun separatore a fine riga. */
@media (max-width: 479.98px) {
	.legal__group--sede .legal__item {
		display: block;
		white-space: normal;
	}

	.legal__group--sede .sep {
		display: none;
	}
}

@media (prefers-reduced-motion: reduce) {
	/* Stessa specificità delle singole luci, altrimenti l'animazione resterebbe attiva. */
	.light .l1,
	.light .l2,
	.light .l3,
	.light .l4 {
		animation: none;
	}

	.invite {
		display: none;
	}
}
