/* =========================================================
   NipoteSubito — v1.6.35
   Base hero approvata + banner menu separato in HTML/CSS.
   Hover menu sincronizzato in 0.5s: testo, pallino e barra.
   ========================================================= */

:root {
	--ns-background-image: none;
	--ns-fallback-dark: #063f3a;
	--ns-menu-white: #f8f9f6;
	--ns-menu-mint: #58efcd;
}

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

html,
body {
	margin: 0;
	padding: 0;
	width: 100%;
	min-height: 100%;
}

html {
	background: var(--ns-fallback-dark);
}

body {
	min-height: 100vh;
	min-height: 100dvh;
	overflow-x: hidden;
	background: transparent;
	font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

img,
svg,
video {
	display: block;
	max-width: 100%;
	height: auto;
}

.ns-site-background {
	position: fixed;
	inset: 0;
	z-index: 0;
	pointer-events: none;
	background-color: var(--ns-fallback-dark);
	background-image: var(--ns-background-image);
	background-repeat: no-repeat;
	background-position: center center;
	background-size: cover;
}

.ns-site {
	position: relative;
	z-index: 1;
	width: 100%;
	min-height: 100vh;
	min-height: 100dvh;
	background: transparent;
}

.ns-main,
.ns-home,
.ns-home-hero,
.ns-home-stage {
	width: 100%;
	min-height: 100vh;
	min-height: 100dvh;
}

.ns-home-hero {
	position: relative;
	overflow-x: hidden;
	overflow-y: visible;
}

.ns-home-stage {
	position: relative;
}

/* =========================================================
   MENU / BANNER — solo i cinque elementi.
   ========================================================= */
.ns-hero-nav {
	position: absolute;
	top: 18px;
	right: 230px;
	z-index: 20;
	display: flex;
	align-items: flex-start;
	gap: 28px;
	white-space: nowrap;
}

.ns-hero-nav-link {
	--ns-hover-progress: 0;
	position: relative;
	display: inline-block;
	padding: 0 0 15px;
	color: var(--ns-menu-white);
	font-size: 18px;
	font-weight: 500;
	line-height: 1;
	letter-spacing: -0.02em;
	text-decoration: none;
	transition: color 0.3s cubic-bezier(.4,0,.2,1);

	/* Materializzazione iniziale sincronizzata col telefono:
	   le voci partono in cascata da sinistra, ma terminano tutte a 3s. */
	opacity: 0;
	will-change: opacity;
	animation-name: ns-nav-materialize;
	animation-timing-function: ease-in-out;
	animation-fill-mode: forwards;
}

.ns-hero-nav-link:nth-child(1) {
	animation-delay: 0s;
	animation-duration: 2.8s;
}

.ns-hero-nav-link:nth-child(2) {
	animation-delay: .4s;
	animation-duration: 2.4s;
}

.ns-hero-nav-link:nth-child(3) {
	animation-delay: .8s;
	animation-duration: 2s;
}

.ns-hero-nav-link:nth-child(4) {
	animation-delay: 1.2s;
	animation-duration: 1.6s;
}

.ns-hero-nav-link:nth-child(5) {
	animation-delay: 1.6s;
	animation-duration: 1.2s;
}

@keyframes ns-nav-materialize {
	from { opacity: 0; }
	to   { opacity: 1; }
}

@keyframes ns-contact-materialize {
	from { opacity: 0; }
	to   { opacity: 1; }
}

/* Pallino superiore: invisibile a riposo, completamente visibile a 0.5s. */
.ns-hero-nav-link::before {
	content: '';
	position: absolute;
	left: 50%;
	top: -11px;
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: var(--ns-menu-mint);
	opacity: 0;
	transform: translateX(-50%) scale(.35);
	box-shadow: 0 0 0 rgba(88, 239, 205, 0);
	transition:
		opacity 0.3s cubic-bezier(.4,0,.2,1),
		transform 0.3s cubic-bezier(.4,0,.2,1),
		box-shadow 0.3s cubic-bezier(.4,0,.2,1);
}

/* Barra: a riposo è un punto centrato, ma invisibile. In hover si apre. */
.ns-hero-nav-link::after {
	content: '';
	position: absolute;
	left: 50%;
	bottom: 0;
	width: 6px;
	height: 4px;
	border-radius: 999px;
	background: var(--ns-menu-mint);
	opacity: 0;
	transform: translateX(-50%);
	box-shadow: 0 0 0 rgba(88, 239, 205, 0);
	transition:
		width 0.3s cubic-bezier(.4,0,.2,1),
		opacity 0.3s cubic-bezier(.4,0,.2,1),
		box-shadow 0.3s cubic-bezier(.4,0,.2,1);
}

@media (hover: hover) and (pointer: fine) {
	.ns-hero-nav-link:hover,
	.ns-hero-nav-link:focus-visible {
		color: var(--ns-menu-mint);
	}

	.ns-hero-nav-link:hover::before,
	.ns-hero-nav-link:focus-visible::before {
		opacity: 1;
		transform: translateX(-50%) scale(1);
		box-shadow: 0 0 10px rgba(88, 239, 205, .32);
	}

	.ns-hero-nav-link:hover::after,
	.ns-hero-nav-link:focus-visible::after {
		width: 100%;
		opacity: 1;
		box-shadow: 0 0 12px rgba(88, 239, 205, .25);
	}
}

.ns-hero-nav-link:focus-visible {
	outline: none;
}

/* =========================================================
   HERO — comportamento approvato v1.4.6.
   ========================================================= */
.ns-hero-media {
	--ns-hero-final-transform: translateX(0);
	--ns-hero-start-transform: translateX(28px);
	position: absolute;
	left: clamp(48px, 5.5vw, 92px);
	top: 2vh;
	width: min(42vw, 800px);
	height: auto;
	transform: var(--ns-hero-final-transform);
	z-index: 2;
	pointer-events: none;
	opacity: 0;
	animation: ns-hero-slide-fade-in 2.8s ease-in-out forwards;
}

.ns-hero-phone {
	display: block;
	width: 100%;
	height: auto;
	max-width: 100%;
	object-fit: contain;
}


/* =========================================================
   CONTENUTO HERO DESTRA — sequenza di materializzazione.
   Telefono: 0–3s (animazione esistente).
   Logo:     3–4s.
   Frase 1:  4–5s.
   Frase 2:  5–6s.
   Tutti usano lo stesso fade ease-in-out del telefono.
   ========================================================= */
.ns-hero-content {
	position: absolute;
	left: 53.2%;
	top: 16.4vh;
	z-index: 5;
	width: 44.3%;
	pointer-events: none;
}

.ns-hero-content-item {
	position: relative;
	display: block;
}

.ns-hero-content-item img {
	display: block;
	width: 100%;
	height: auto;
	max-width: none;
}

.ns-hero-brand {
	width: 41.1%;
	margin: 0 0 15px 0;
	opacity: 0;
	will-change: opacity;
	animation: ns-hero-fade-in .8s ease-in-out 3s forwards;
}

.ns-hero-title {
	width: 100%;
	margin: 0 0 15px 0;
	opacity: 0;
	will-change: opacity;
	animation: ns-hero-fade-in .8s ease-in-out 4s forwards;
}

.ns-hero-description {
	width: 89%;
	margin: 0;
	opacity: 0;
	will-change: opacity;
	animation: ns-hero-fade-in .8s ease-in-out 5s forwards;
}

/* Testi hero in HTML/CSS: stessa composizione dei PNG precedenti,
   ma renderizzati dal browser per massima nitidezza anche su Retina/HiDPI. */
.ns-hero-title-text {
	margin: 0;
	padding: 0;
	font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
	font-size: clamp(42px, 4.34vw, 84px);
	font-weight: 800;
	line-height: .98;
	letter-spacing: -0.045em;
	white-space: nowrap;
	text-rendering: geometricPrecision;
	-webkit-font-smoothing: antialiased;
}

.ns-hero-title-white {
	color: #ffffff;
}

.ns-hero-title-mint {
	color: #1febb1;
}

.ns-hero-description-text {
	margin: 0;
	padding: 0;
	color: #c8e2da;
	font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
	font-size: clamp(15px, 1.39vw, 27px);
	font-weight: 400;
	line-height: 1.42;
	letter-spacing: -0.018em;
	text-rendering: optimizeLegibility;
	-webkit-font-smoothing: antialiased;
}

@keyframes ns-hero-fade-in {
	from { opacity: 0; }
	to   { opacity: 1; }
}

@keyframes ns-store-divider-reveal {
	0% {
		opacity: 0;
		transform: scaleX(0.002);
	}
	100% {
		opacity: 1;
		transform: scaleX(1);
	}
}

@keyframes ns-hero-slide-fade-in {
	from {
		opacity: 0;
		transform: var(--ns-hero-start-transform);
	}
	to {
		opacity: 1;
		transform: var(--ns-hero-final-transform);
	}
}

/* =========================================================
   STORE BADGES — asset forniti, separati dallo sfondo.
   Desktop: affiancati sotto la descrizione, come mockup approvato.
   Tablet: affiancati. Smartphone: impilati per preservare leggibilità.
   ========================================================= */
.ns-store-badges {
	display: flex;
	align-items: center;
	gap: 8px;
	width: 96%;
	max-width: 700px;
	margin-left: 0.6%;
	margin-top: 20px;
	opacity: 0;
	will-change: opacity;
	animation: ns-hero-fade-in .175s ease-in-out 6.75s forwards;
	pointer-events: auto;
}

.ns-store-badge {
	display: block;
	flex: 1 1 0;
	min-width: 0;
	width: 100%;
	height: auto;
	object-fit: contain;
	pointer-events: auto;
	transform-origin: center center;
	transition: filter .01s ease, transform .01s ease;
}

.ns-store-divider {
	width: 91%;
	height: 2px;
	margin-top: 28px;
	margin-left: 0.6%;
	border-radius: 999px;
	background: rgba(88, 239, 205, 0.92);
	box-shadow: 0 0 10px rgba(88, 239, 205, 0.12);
	opacity: 0;
	transform: scaleX(0.002);
	transform-origin: left center;
	will-change: transform, opacity;
	animation: ns-store-divider-reveal .65s ease-out 8s forwards;
}

.ns-powered-by-row {
	display: flex;
	align-items: center;
	gap: 2px;
	width: 91%;
	margin-top: 10px;
	margin-left: 0.6%;
	opacity: 1;
}

.ns-powered-by-text {
	display: inline-block;
	flex: 0 0 auto;
	color: rgba(233, 240, 237, 0.76);
	font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
	font-size: clamp(13px, 1.24vw, 19px);
	font-weight: 400;
	line-height: 1;
	letter-spacing: -0.03em;
	text-rendering: optimizeLegibility;
	-webkit-font-smoothing: antialiased;
	opacity: 0;
	will-change: opacity;
	animation: ns-hero-fade-in .65s ease-out 8s forwards;
}

.ns-powered-by-sventa {
	display: block;
	flex: 0 0 auto;
	width: clamp(94px, 9.55vw, 144px);
	height: auto;
	object-fit: contain;
	margin-left: -7px;
	opacity: 0;
	will-change: opacity;
	animation: ns-hero-fade-in .65s ease-out 8.48s forwards;
}

/* Stesso feedback visivo della pill "Contattaci":
   al passaggio del mouse la singola targhetta si illumina e cresce appena. */
@media (hover: hover) and (pointer: fine) {
	.ns-store-badge:hover {
		filter:
			brightness(1.16)
			contrast(1.06)
			saturate(1.08)
			drop-shadow(0 0 6px rgba(88, 239, 205, .42))
			drop-shadow(0 0 14px rgba(88, 239, 205, .20));
		transform: scale(1.015);
	}
}

/* Feedback tattile coerente con Contattaci su dispositivi touch. */
@media (hover: none) and (pointer: coarse) {
	.ns-store-badge:active {
		filter:
			brightness(1.22)
			drop-shadow(0 0 6px rgba(88, 239, 205, .48))
			drop-shadow(0 0 12px rgba(88, 239, 205, .22));
		transform: scale(1.025);
	}
}

/* Tablet */
@media (max-width: 1024px) {
	.ns-site-background {
		background-size: 100% 100%;
		background-position: center center;
	}

	.ns-main,
	.ns-home,
	.ns-home-hero,
	.ns-home-stage {
		min-height: 100svh;
	}

	.ns-hero-nav {
		top: 18px;
		left: 18px;
		right: auto;
		transform: none;
		gap: 18px;
	}

	.ns-hero-nav-link {
		font-size: 13px;
		padding-bottom: 13px;
	}

	.ns-hero-nav-link::before {
		top: -9px;
		width: 5px;
		height: 5px;
	}

	.ns-hero-nav-link::after {
		height: 3px;
	}

	.ns-hero-media {
		left: 50%;
		top: 114px;
		height: auto;
		width: min(76vw, 590px);
		--ns-hero-final-transform: translateX(-50%);
		--ns-hero-start-transform: translateX(calc(-50% + 24px));
		transform: var(--ns-hero-final-transform);
	}

	.ns-hero-phone {
		width: 100%;
		height: auto;
		max-width: 100%;
	}

	.ns-home-stage {
		min-height: 145svh;
	}

	.ns-hero-content {
		left: 8%;
		/* Mantiene la composizione approvata ma impedisce sovrapposizioni
		   tra telefono e copy sulle larghezze tablet intermedie. */
		top: clamp(720px, 106vw, 830px);
		width: 84%;
	}

	.ns-hero-brand {
		width: 31%;
		margin-bottom: 16px;
	}

	.ns-hero-title {
		width: 82%;
		margin-bottom: 17px;
	}

	.ns-hero-description {
		width: 76%;
	}

	.ns-hero-title-text {
		font-size: 6.73vw;
	}

	.ns-hero-description-text {
		font-size: 2.245vw;
	}

	.ns-store-badges {
		width: 88%;
		max-width: none;
		gap: 14px;
		margin-top: 26px;
	}

	.ns-store-divider {
		width: 88%;
		margin-top: 24px;
		margin-left: 0;
	}

	.ns-powered-by-row {
		width: 88%;
		margin-top: 9px;
		margin-left: 0;
		gap: 2px;
	}

	.ns-powered-by-text {
		font-size: 15px;
	}

	.ns-powered-by-sventa {
		width: 102px;
		margin-left: -6px;
	}

}

/* Smartphone */
@media (max-width: 640px) {
	.ns-hero-nav {
		top: 13px;
		left: 8px;
		gap: 0;
		width: calc(100% - 8px - 8px - 116px - 12px);
		justify-content: space-between;
	}

	.ns-hero-nav-link {
		font-size: 10px;
		padding-bottom: 9px;
	}

	.ns-hero-nav-link::before {
		top: -7px;
		width: 4px;
		height: 4px;
	}

	.ns-hero-nav-link::after {
		min-width: 4px;
		height: 2px;
	}

	.ns-hero-media {
		top: 86px;
		width: min(92vw, 408px);
		--ns-hero-start-transform: translateX(calc(-50% + 18px));
	}

	.ns-home-stage {
		min-height: 1350px;
	}

	.ns-hero-content {
		left: 6%;
		/* Scala con la larghezza dello smartphone; desktop invariato. */
		top: clamp(465px, 145vw, 600px);
		width: 88%;
	}

	.ns-hero-brand {
		width: 43%;
		margin-bottom: 15px;
	}

	.ns-hero-title {
		width: 100%;
		margin-bottom: 18px;
	}

	.ns-hero-description {
		width: 100%;
	}

	.ns-hero-title-text {
		font-size: 8.60vw;
		letter-spacing: -0.04em;
	}

	.ns-hero-description-text {
		font-size: 3.10vw;
		line-height: 1.44;
		letter-spacing: -0.012em;
	}

	.ns-copy-break {
		display: none;
	}

	.ns-store-badges {
		flex-direction: row;
		align-items: center;
		justify-content: flex-start;
		gap: 10px;
		width: 100%;
		max-width: none;
		margin-top: 22px;
		margin-left: 0;
	}

	.ns-store-badge {
		flex: 0 0 calc(50% - 5px);
		width: calc(50% - 5px);
		max-width: calc(50% - 5px);
	}

	.ns-store-divider {
		width: 100%;
		margin-top: 18px;
		margin-left: 0;
		height: 2px;
	}

	.ns-powered-by-row {
		width: 100%;
		margin-top: 9px;
		margin-left: 0;
		gap: 2px;
	}

	.ns-powered-by-text {
		font-size: 12px;
	}

	.ns-powered-by-sventa {
		width: 94px;
		margin-left: -5px;
	}

}

@media (max-width: 390px) {
	.ns-hero-nav {
		top: 13px;
		left: 8px;
		width: calc(100% - 8px - 8px - 112px - 11px);
		gap: 0;
	}

	.ns-hero-nav-link {
		font-size: 10px;
	}

	.ns-hero-media {
		top: 86px;
		width: 92vw;
		--ns-hero-start-transform: translateX(calc(-50% + 16px));
	}

}

@media (max-width: 350px) {
	.ns-hero-nav {
		top: 12px;
		left: 6px;
		width: calc(100% - 6px - 6px - 96px - 9px);
		gap: 0;
	}

	.ns-hero-nav-link {
		font-size: 8px;
	}
}


/* =========================================================
   CONTATTACI — elemento isolato approvato.
   Stessa pill sottile del riferimento "Scarica l'app".
   ========================================================= */
.ns-contact-pill {
	position: absolute;
	top: 6px;
	right: 14px;
	z-index: 21;
	display: block;
	width: 190px;
	height: 44px;
	text-decoration: none;
	-webkit-tap-highlight-color: transparent;

	/* FAQ termina la sua materializzazione a 3s.
	   Da quel momento Contattaci compare con lo stesso fade, in 1s. */
	opacity: 0;
	will-change: opacity;
	animation: ns-contact-materialize .8s ease-in-out 3s forwards;
}

.ns-contact-pill-image {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
	filter: none;
	transition: filter .01s ease, transform .01s ease;
}

.ns-contact-pill picture {
	display: block;
	width: 100%;
	height: 100%;
}

@media (hover: hover) and (pointer: fine) {
	.ns-contact-pill:hover .ns-contact-pill-image,
	.ns-contact-pill:focus-visible .ns-contact-pill-image {
		filter:
			brightness(1.16)
			contrast(1.06)
			saturate(1.08)
			drop-shadow(0 0 6px rgba(88, 239, 205, .42))
			drop-shadow(0 0 14px rgba(88, 239, 205, .20));
		transform: scale(1.015);
	}
}

.ns-contact-pill:focus-visible {
	outline: none;
}

@media (max-width: 1024px) {
	.ns-contact-pill {
		top: 7px;
		right: 10px;
		width: 146px;
		height: 38px;
	}
}

@media (max-width: 640px) {
	.ns-contact-pill {
		display: block;
		top: 3px;
		right: 8px;
		width: 110px;
		height: 30px;
	}
}



/* Feedback tattile: sui dispositivi touch il bottone si illumina mentre viene premuto. */
@media (hover: none) and (pointer: coarse) {
	.ns-contact-pill .ns-contact-pill-image {
		transition:
			filter .01s ease,
			transform .01s ease;
	}

	.ns-contact-pill:active .ns-contact-pill-image,
	.ns-contact-pill:focus .ns-contact-pill-image {
		filter:
			brightness(1.22)
			drop-shadow(0 0 6px rgba(88, 239, 205, .48))
			drop-shadow(0 0 12px rgba(88, 239, 205, .22));
		transform: scale(1.025);
	}
}

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		scroll-behavior: auto !important;
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
	}

	.ns-hero-media,
	.ns-hero-nav-link,
	.ns-contact-pill,
	.ns-hero-brand,
	.ns-hero-title,
	.ns-hero-description,
	.ns-store-badges,
	.ns-store-divider,
	.ns-powered-by-row,
	.ns-powered-by-text,
	.ns-powered-by-sventa {
		opacity: 1 !important;
		animation: none !important;
		transform: none !important;
	}
}

@media (max-width: 390px) {
	.ns-contact-pill {
		top: 3px;
		right: 8px;
		width: 110px;
		height: 30px;
	}
}

@media (max-width: 350px) {
	.ns-contact-pill {
		top: 4px;
		right: 6px;
		width: 94px;
		height: 26px;
	}
}


/* =========================================================
   SECONDA SEZIONE HOME — nuovo sfondo sotto la hero
   predisposto per iniziare a popolare la home.
   ========================================================= */

.ns-home-secondary {
	position: relative;
	z-index: 1;
	min-height: 100svh;
	width: 100%;
	margin-top: 0;
	padding: 0;
	background: transparent;
	overflow: hidden;
}

.ns-home-secondary::before {
	content: none;
}

.ns-home-secondary-inner {
	position: relative;
	z-index: 1;
	width: 100%;
	min-height: 100svh;
	margin: 0;
	border-radius: 0;
	border: 0;
	background: transparent;
	box-shadow: none;
	backdrop-filter: none;
}

@media (max-width: 1024px) {
	.ns-home-secondary,
	.ns-home-secondary-inner {
		min-height: 100svh;
	}
}

@media (max-width: 640px) {
	.ns-home-secondary,
	.ns-home-secondary-inner {
		min-height: 82svh;
	}
}
