/* ==========================================================================
   points — sistema di design del sito
   Palette derivata dal logo dell'app: rosso #DF142C (Pantone 185 C).
   Nessuna dipendenza esterna: niente Bootstrap, niente jQuery, niente CDN.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Token
   -------------------------------------------------------------------------- */
:root {
	/* Scala del brand, costruita sul rosso del logo (--brand) */
	--p-50: #fff1f3;
	--p-100: #ffe0e5;
	--p-200: #ffc2cc;
	--p-300: #ff93a4;
	--p-400: #f94e6b;
	--p-500: #df142c; /* logo */
	--p-600: #be0f24; /* testo e link: 6,3:1 su bianco */
	--p-700: #9a0c1d;
	--p-800: #700815;
	--p-900: #4a050e;

	--brand: var(--p-500);
	--brand-ink: var(--p-600);

	/* Neutri */
	--ink: #14131a;
	--ink-soft: #4a4854;
	--ink-faint: #6d6b78;
	--line: #e6e4ea;
	--line-soft: #f1eff4;
	--surface: #ffffff;
	--surface-alt: #faf9fb;
	--surface-sunken: #f4f2f7;

	/* Tipografia fluida */
	--font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
		"Helvetica Neue", Arial, sans-serif;
	--step--1: clamp(0.875rem, 0.84rem + 0.17vw, 0.95rem);
	--step-0: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
	--step-1: clamp(1.125rem, 1.05rem + 0.37vw, 1.3125rem);
	--step-2: clamp(1.375rem, 1.23rem + 0.73vw, 1.75rem);
	--step-3: clamp(1.75rem, 1.47rem + 1.4vw, 2.5rem);
	--step-4: clamp(2.25rem, 1.7rem + 2.75vw, 3.75rem);

	/* Spaziatura e forma */
	--gutter: clamp(1rem, 0.6rem + 2vw, 2rem);
	--wrap: 72rem;
	--wrap-prose: 46rem;
	--r-sm: 0.5rem;
	--r-md: 0.875rem;
	--r-lg: 1.25rem;
	--r-xl: 1.75rem;
	--r-pill: 999px;

	--shadow-sm: 0 1px 2px rgba(20, 19, 26, 0.06),
		0 1px 3px rgba(20, 19, 26, 0.08);
	--shadow-md: 0 4px 12px rgba(20, 19, 26, 0.07),
		0 2px 4px rgba(20, 19, 26, 0.05);
	--shadow-lg: 0 18px 40px rgba(20, 19, 26, 0.12),
		0 4px 12px rgba(20, 19, 26, 0.06);
	--shadow-brand: 0 12px 30px rgba(223, 20, 44, 0.28);

	--header-h: 4.25rem;
	--ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) {
		--ink: #f4f2f7;
		--ink-soft: #bfbcc9;
		--ink-faint: #9b98a6;
		--line: #2e2c38;
		--line-soft: #26242e;
		--surface: #121119;
		--surface-alt: #191822;
		--surface-sunken: #1f1e29;
		/* Su fondo scuro il rosso pieno perde leggibilità: si schiarisce */
		--brand-ink: var(--p-300);
		--shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.5);
		--shadow-md: 0 4px 12px rgba(0, 0, 0, 0.45);
		--shadow-lg: 0 18px 40px rgba(0, 0, 0, 0.55);
	}
}

/* --------------------------------------------------------------------------
   2. Reset essenziale
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
	box-sizing: border-box;
}

* {
	margin: 0;
}

html {
	-webkit-text-size-adjust: 100%;
	scroll-behavior: smooth;
	scroll-padding-top: calc(var(--header-h) + 1rem);
}

body {
	font-family: var(--font);
	font-size: var(--step-0);
	line-height: 1.65;
	color: var(--ink);
	background: var(--surface);
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
	overflow-x: hidden;
}

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

h1,
h2,
h3,
h4 {
	line-height: 1.15;
	letter-spacing: -0.02em;
	text-wrap: balance;
	font-weight: 800;
}

p,
li {
	text-wrap: pretty;
}

a {
	color: var(--brand-ink);
	text-decoration-thickness: 0.08em;
	text-underline-offset: 0.18em;
}

a:hover {
	text-decoration-thickness: 0.14em;
}

ul[class],
ol[class] {
	list-style: none;
	padding: 0;
}

/* Messa a fuoco sempre visibile e sempre ad alto contrasto */
:focus-visible {
	outline: 3px solid var(--brand);
	outline-offset: 3px;
	border-radius: var(--r-sm);
}

@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) :focus-visible {
		outline-color: var(--p-300);
	}
}

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

/* --------------------------------------------------------------------------
   3. Utilità
   -------------------------------------------------------------------------- */
.wrap {
	width: min(100% - var(--gutter) * 2, var(--wrap));
	margin-inline: auto;
}

.wrap-prose {
	width: min(100% - var(--gutter) * 2, var(--wrap-prose));
	margin-inline: auto;
}

.section {
	padding-block: clamp(3.5rem, 2.5rem + 4vw, 6.5rem);
}

.section-alt {
	background: var(--surface-alt);
}

.sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.skip-link {
	position: absolute;
	top: 0;
	left: 50%;
	transform: translate(-50%, -120%);
	z-index: 1000;
	background: var(--brand);
	color: #fff;
	padding: 0.75rem 1.25rem;
	border-radius: 0 0 var(--r-md) var(--r-md);
	font-weight: 700;
	text-decoration: none;
	transition: transform 0.18s var(--ease);
}

.skip-link:focus-visible {
	transform: translate(-50%, 0);
	outline-offset: -3px;
}

.eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	font-size: var(--step--1);
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--brand-ink);
}

.section-head {
	max-width: 42rem;
	margin-bottom: clamp(2rem, 1.5rem + 2vw, 3.5rem);
}

.section-head h2 {
	font-size: var(--step-3);
	margin-top: 0.75rem;
}

.section-head p {
	margin-top: 1rem;
	font-size: var(--step-1);
	color: var(--ink-soft);
}

.section-head.is-centered {
	margin-inline: auto;
	text-align: center;
}

/* --------------------------------------------------------------------------
   4. Bottoni
   -------------------------------------------------------------------------- */
.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.6rem;
	min-height: 3rem; /* bersaglio tattile >= 44px */
	padding: 0.75rem 1.5rem;
	border: 2px solid transparent;
	border-radius: var(--r-pill);
	font: inherit;
	font-weight: 700;
	line-height: 1.2;
	text-decoration: none;
	cursor: pointer;
	transition: transform 0.18s var(--ease), box-shadow 0.18s var(--ease),
		background-color 0.18s var(--ease), border-color 0.18s var(--ease);
}

.btn:active {
	transform: translateY(1px);
}

.btn-primary {
	background: var(--brand);
	color: #fff;
	box-shadow: var(--shadow-brand);
}

.btn-primary:hover {
	background: var(--p-600);
	box-shadow: 0 16px 36px rgba(223, 20, 44, 0.34);
}

.btn-ghost {
	background: transparent;
	color: var(--ink);
	border-color: var(--line);
}

.btn-ghost:hover {
	border-color: var(--brand);
	color: var(--brand-ink);
}

.btn-row {
	display: flex;
	flex-wrap: wrap;
	gap: 0.875rem;
}

/* --------------------------------------------------------------------------
   5. Intestazione
   -------------------------------------------------------------------------- */
.site-header {
	position: sticky;
	top: 0;
	z-index: 100;
	background: color-mix(in srgb, var(--surface) 88%, transparent);
	backdrop-filter: saturate(180%) blur(12px);
	border-bottom: 1px solid transparent;
	transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.site-header[data-stuck="true"] {
	border-bottom-color: var(--line);
	box-shadow: var(--shadow-sm);
}

.site-header > .wrap {
	display: flex;
	align-items: center;
	gap: 1rem;
	min-height: var(--header-h);
}

.brand {
	display: inline-flex;
	align-items: center;
	gap: 0.625rem;
	color: var(--brand);
	text-decoration: none;
	font-weight: 800;
	font-size: 1.375rem;
	letter-spacing: -0.03em;
	margin-right: auto;
}

.brand svg {
	width: 2rem;
	height: 2rem;
	flex: none;
}

.brand span {
	color: var(--ink);
}

.nav {
	display: flex;
	align-items: center;
	gap: 0.25rem;
}

.nav a {
	display: inline-block;
	padding: 0.5rem 0.75rem;
	border-radius: var(--r-sm);
	color: var(--ink-soft);
	font-weight: 600;
	font-size: var(--step--1);
	text-decoration: none;
	transition: color 0.15s var(--ease), background-color 0.15s var(--ease);
}

.nav a:hover {
	color: var(--ink);
	background: var(--surface-sunken);
}

.nav a[aria-current="page"] {
	color: var(--brand-ink);
	background: var(--p-50);
}

@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) .nav a[aria-current="page"] {
		background: var(--surface-sunken);
	}
}

.nav-cta {
	margin-left: 0.5rem;
	min-height: 2.5rem;
	padding: 0.5rem 1.125rem;
	font-size: var(--step--1);
}

.nav-toggle {
	display: none;
	align-items: center;
	justify-content: center;
	width: 2.75rem;
	height: 2.75rem;
	border: 1px solid var(--line);
	border-radius: var(--r-sm);
	background: transparent;
	color: var(--ink);
	cursor: pointer;
}

.nav-toggle svg {
	width: 1.5rem;
	height: 1.5rem;
}

.nav-toggle .icon-close,
.nav-toggle[aria-expanded="true"] .icon-open {
	display: none;
}

.nav-toggle[aria-expanded="true"] .icon-close {
	display: block;
}

@media (max-width: 54rem) {
	.nav-toggle {
		display: inline-flex;
	}

	.nav {
		position: absolute;
		top: 100%;
		left: 0;
		right: 0;
		flex-direction: column;
		align-items: stretch;
		gap: 0.25rem;
		padding: 0.75rem var(--gutter) 1.25rem;
		background: var(--surface);
		border-bottom: 1px solid var(--line);
		box-shadow: var(--shadow-md);
	}

	.nav[hidden] {
		display: none;
	}

	.nav a {
		padding: 0.75rem;
		font-size: var(--step-0);
	}

	.nav-cta {
		margin-left: 0;
		margin-top: 0.5rem;
		min-height: 3rem;
	}
}

/* --------------------------------------------------------------------------
   6. Hero
   -------------------------------------------------------------------------- */
.hero {
	position: relative;
	overflow: hidden;
	padding-block: clamp(3rem, 2rem + 5vw, 6rem);
	background: linear-gradient(
		165deg,
		var(--p-600) 0%,
		var(--p-500) 45%,
		var(--p-400) 100%
	);
	color: #fff;
}

/* Trama di punti: richiama i bollini della tessera */
.hero::before {
	content: "";
	position: absolute;
	inset: 0;
	background-image: radial-gradient(
		circle at center,
		rgba(255, 255, 255, 0.16) 1.5px,
		transparent 1.6px
	);
	background-size: 28px 28px;
	mask-image: radial-gradient(ellipse 80% 70% at 70% 30%, #000 30%, transparent 75%);
	pointer-events: none;
}

.hero > .wrap {
	position: relative;
	display: grid;
	gap: clamp(2.5rem, 1rem + 6vw, 4.5rem);
	align-items: center;
	grid-template-columns: 1fr;
}

@media (min-width: 60rem) {
	.hero > .wrap {
		grid-template-columns: 1.05fr 0.95fr;
	}
}

.hero .eyebrow {
	color: var(--p-200);
}

.hero h1 {
	font-size: var(--step-4);
	margin-top: 1rem;
	letter-spacing: -0.035em;
}

.hero-lead {
	margin-top: 1.25rem;
	font-size: var(--step-1);
	color: rgba(255, 255, 255, 0.92);
	max-width: 34rem;
}

.hero .btn-row {
	margin-top: 2rem;
}

.hero-points {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 1.5rem;
	margin-top: 2rem;
	padding-top: 1.5rem;
	border-top: 1px solid rgba(255, 255, 255, 0.22);
	font-size: var(--step--1);
	color: rgba(255, 255, 255, 0.9);
}

.hero-points li {
	display: flex;
	align-items: center;
	gap: 0.45rem;
}

.hero-points svg {
	width: 1.1rem;
	height: 1.1rem;
	flex: none;
}

/* Bottoni store, su fondo rosso */
.btn-store {
	background: #fff;
	color: var(--p-700);
	box-shadow: 0 10px 24px rgba(74, 5, 14, 0.25);
}

.btn-store:hover {
	background: var(--p-50);
}

.btn-store svg {
	width: 1.35rem;
	height: 1.35rem;
	flex: none;
}

.btn-store small {
	display: block;
	font-size: 0.6875rem;
	font-weight: 600;
	letter-spacing: 0.03em;
	text-transform: uppercase;
	opacity: 0.72;
	line-height: 1.1;
}

.btn-store strong {
	display: block;
	font-size: 0.9375rem;
	line-height: 1.2;
}

.btn-store-outline {
	background: transparent;
	color: #fff;
	border-color: rgba(255, 255, 255, 0.55);
	box-shadow: none;
}

.btn-store-outline:hover {
	background: rgba(255, 255, 255, 0.12);
	border-color: #fff;
}

/* --------------------------------------------------------------------------
   7. Mockup della tessera (disegnato in CSS, nessuna immagine da scaricare)
   -------------------------------------------------------------------------- */
.hero-art {
	display: grid;
	place-items: center;
	perspective: 1200px;
}

.loyalty-card {
	width: min(100%, 23rem);
	padding: 1.5rem;
	border-radius: var(--r-xl);
	background: var(--surface);
	color: var(--ink);
	box-shadow: 0 30px 60px rgba(74, 5, 14, 0.35);
	transform: rotate(-3deg);
	transition: transform 0.4s var(--ease);
}

.loyalty-card:hover {
	transform: rotate(-1deg) translateY(-4px);
}

.loyalty-card__top {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	padding-bottom: 1rem;
	border-bottom: 1px dashed var(--line);
}

.loyalty-card__logo {
	display: grid;
	place-items: center;
	width: 2.75rem;
	height: 2.75rem;
	border-radius: var(--r-md);
	background: var(--brand);
	color: #fff;
	flex: none;
}

.loyalty-card__logo svg {
	width: 1.6rem;
	height: 1.6rem;
}

.loyalty-card__name {
	font-weight: 800;
	letter-spacing: -0.02em;
}

.loyalty-card__meta {
	font-size: var(--step--1);
	color: var(--ink-faint);
}

.loyalty-card__stamps {
	display: grid;
	grid-template-columns: repeat(5, 1fr);
	gap: 0.625rem;
	margin: 1.25rem 0;
}

.stamp {
	aspect-ratio: 1;
	display: grid;
	place-items: center;
	border-radius: var(--r-pill);
	border: 2px dashed var(--line);
	color: var(--line);
}

.stamp svg {
	width: 55%;
	height: 55%;
}

.stamp.is-filled {
	background: var(--brand);
	border-style: solid;
	border-color: var(--brand);
	color: #fff;
}

.loyalty-card__reward {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding: 0.75rem 1rem;
	border-radius: var(--r-md);
	background: var(--p-50);
	color: var(--p-700);
	font-size: var(--step--1);
	font-weight: 700;
}

@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) .loyalty-card__reward {
		background: var(--surface-sunken);
		color: var(--p-300);
	}
}

.loyalty-card__code {
	margin-top: 1rem;
	height: 3rem;
	border-radius: var(--r-sm);
	background: repeating-linear-gradient(
		90deg,
		var(--ink) 0 2px,
		transparent 2px 4px,
		var(--ink) 4px 7px,
		transparent 7px 11px,
		var(--ink) 11px 12px,
		transparent 12px 16px
	);
	opacity: 0.85;
}

/* --------------------------------------------------------------------------
   8. Griglie e schede
   -------------------------------------------------------------------------- */
.grid {
	display: grid;
	gap: clamp(1rem, 0.6rem + 1.5vw, 1.75rem);
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
}

.grid-2 {
	display: grid;
	gap: clamp(1.5rem, 1rem + 2vw, 3rem);
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr));
}

.card {
	padding: clamp(1.25rem, 1rem + 1vw, 1.875rem);
	border: 1px solid var(--line);
	border-radius: var(--r-lg);
	background: var(--surface);
	transition: transform 0.22s var(--ease), box-shadow 0.22s var(--ease),
		border-color 0.22s var(--ease);
}

.card:hover {
	transform: translateY(-3px);
	border-color: var(--p-200);
	box-shadow: var(--shadow-md);
}

.card h3 {
	font-size: var(--step-1);
	margin-bottom: 0.5rem;
}

.card p {
	color: var(--ink-soft);
}

.card-icon {
	display: grid;
	place-items: center;
	width: 3rem;
	height: 3rem;
	margin-bottom: 1.125rem;
	border-radius: var(--r-md);
	background: var(--p-50);
	color: var(--brand-ink);
}

.card-icon svg {
	width: 1.5rem;
	height: 1.5rem;
}

@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) .card-icon {
		background: var(--surface-sunken);
		color: var(--p-300);
	}
}

/* Blocco "per chi" con lista di vantaggi */
.audience {
	padding: clamp(1.5rem, 1.2rem + 1.5vw, 2.5rem);
	border-radius: var(--r-xl);
	border: 1px solid var(--line);
	background: var(--surface);
}

.audience.is-brand {
	border-color: transparent;
	background: linear-gradient(160deg, var(--p-600), var(--p-500));
	color: #fff;
}

.audience.is-brand .audience__role,
.audience.is-brand p {
	color: rgba(255, 255, 255, 0.9);
}

.audience__role {
	font-size: var(--step--1);
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--brand-ink);
}

.audience h3 {
	font-size: var(--step-2);
	margin: 0.625rem 0 0.875rem;
}

.checklist {
	display: grid;
	gap: 0.875rem;
	margin-top: 1.5rem;
}

.checklist li {
	display: grid;
	grid-template-columns: 1.5rem 1fr;
	gap: 0.75rem;
	align-items: start;
}

.checklist svg {
	width: 1.5rem;
	height: 1.5rem;
	margin-top: 0.1rem;
	color: var(--brand);
}

.audience.is-brand .checklist svg {
	color: #fff;
}

/* --------------------------------------------------------------------------
   9. Passaggi numerati
   -------------------------------------------------------------------------- */
.steps {
	counter-reset: step;
	display: grid;
	gap: clamp(1.25rem, 1rem + 1.5vw, 2rem);
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
}

.steps > li {
	counter-increment: step;
	position: relative;
	padding-top: 3.75rem;
}

.steps > li::before {
	content: counter(step);
	position: absolute;
	top: 0;
	left: 0;
	display: grid;
	place-items: center;
	width: 2.75rem;
	height: 2.75rem;
	border-radius: var(--r-pill);
	background: var(--brand);
	color: #fff;
	font-weight: 800;
	font-size: 1.125rem;
	box-shadow: var(--shadow-brand);
}

.steps h3 {
	font-size: var(--step-1);
	margin-bottom: 0.5rem;
}

.steps p {
	color: var(--ink-soft);
}

/* --------------------------------------------------------------------------
   10. Domande frequenti
   -------------------------------------------------------------------------- */
.faq {
	display: grid;
	gap: 0.75rem;
}

.faq details {
	border: 1px solid var(--line);
	border-radius: var(--r-md);
	background: var(--surface);
	overflow: hidden;
	transition: border-color 0.2s var(--ease);
}

.faq details[open] {
	border-color: var(--p-200);
	box-shadow: var(--shadow-sm);
}

.faq summary {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding: 1.125rem 1.25rem;
	min-height: 3.25rem;
	font-weight: 700;
	cursor: pointer;
	list-style: none;
}

.faq summary::-webkit-details-marker {
	display: none;
}

.faq summary::after {
	content: "";
	flex: none;
	width: 0.7rem;
	height: 0.7rem;
	border-right: 2.5px solid var(--brand);
	border-bottom: 2.5px solid var(--brand);
	transform: rotate(45deg) translate(-2px, -2px);
	transition: transform 0.22s var(--ease);
}

.faq details[open] summary::after {
	transform: rotate(-135deg) translate(-2px, -2px);
}

.faq summary:hover {
	background: var(--surface-alt);
}

.faq .faq__body {
	padding: 0 1.25rem 1.25rem;
	color: var(--ink-soft);
}

/* --------------------------------------------------------------------------
   11. Richiamo finale
   -------------------------------------------------------------------------- */
.cta-band {
	position: relative;
	overflow: hidden;
	padding: clamp(2.5rem, 2rem + 3vw, 4rem);
	border-radius: var(--r-xl);
	background: linear-gradient(150deg, var(--p-700), var(--p-500) 70%);
	color: #fff;
	text-align: center;
}

.cta-band::before {
	content: "";
	position: absolute;
	inset: 0;
	background-image: radial-gradient(
		circle at center,
		rgba(255, 255, 255, 0.14) 1.5px,
		transparent 1.6px
	);
	background-size: 26px 26px;
	pointer-events: none;
}

.cta-band > * {
	position: relative;
}

.cta-band h2 {
	font-size: var(--step-3);
}

.cta-band p {
	max-width: 36rem;
	margin: 1rem auto 0;
	color: rgba(255, 255, 255, 0.92);
	font-size: var(--step-1);
}

.cta-band .btn-row {
	justify-content: center;
	margin-top: 2rem;
}

/* --------------------------------------------------------------------------
   12. Pagine di testo (termini, privacy, supporto)
   -------------------------------------------------------------------------- */
.page-head {
	padding-block: clamp(2.5rem, 2rem + 2.5vw, 4rem);
	background: var(--surface-alt);
	border-bottom: 1px solid var(--line);
}

.page-head h1 {
	font-size: var(--step-3);
	margin-top: 0.5rem;
}

.page-head p {
	margin-top: 0.75rem;
	color: var(--ink-soft);
	max-width: 42rem;
}

.breadcrumb {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem;
	font-size: var(--step--1);
	color: var(--ink-faint);
}

.breadcrumb li {
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

.breadcrumb li + li::before {
	content: "/";
	color: var(--line);
}

.breadcrumb a {
	color: var(--ink-faint);
	text-decoration: none;
}

.breadcrumb a:hover {
	color: var(--brand-ink);
	text-decoration: underline;
}

.breadcrumb [aria-current="page"] {
	color: var(--ink);
	font-weight: 600;
}

/* Testo lungo: misura di riga leggibile e gerarchia chiara */
.prose {
	font-size: var(--step-0);
}

.prose > * + * {
	margin-top: 1.1em;
}

.prose h2 {
	font-size: var(--step-2);
	margin-top: 2.5em;
	padding-top: 1.5rem;
	border-top: 1px solid var(--line);
}

.prose h3 {
	font-size: var(--step-1);
	margin-top: 2em;
}

.prose h4 {
	font-size: var(--step-0);
	margin-top: 1.75em;
	color: var(--ink);
}

.prose h2:first-child,
.prose h3:first-child {
	margin-top: 0;
	padding-top: 0;
	border-top: 0;
}

.prose ul,
.prose ol {
	padding-left: 1.5rem;
}

.prose li + li {
	margin-top: 0.4em;
}

.prose a {
	overflow-wrap: anywhere;
}

.prose strong {
	color: var(--ink);
}

.prose hr {
	border: 0;
	border-top: 1px solid var(--line);
	margin-block: 2.5em;
}

.prose table {
	width: 100%;
	border-collapse: collapse;
	font-size: var(--step--1);
	display: block;
	overflow-x: auto;
}

.prose th,
.prose td {
	border: 1px solid var(--line);
	padding: 0.625rem 0.75rem;
	text-align: left;
}

.callout {
	padding: 1.25rem 1.5rem;
	border-radius: var(--r-md);
	border-left: 4px solid var(--brand);
	background: var(--surface-alt);
}

.callout > :first-child {
	margin-top: 0;
}

/* Indice laterale dei documenti lunghi */
.doc-layout {
	display: grid;
	gap: clamp(2rem, 1rem + 3vw, 3.5rem);
	align-items: start;
}

@media (min-width: 64rem) {
	.doc-layout {
		grid-template-columns: 16rem 1fr;
	}

	.doc-toc {
		position: sticky;
		top: calc(var(--header-h) + 1.5rem);
		max-height: calc(100vh - var(--header-h) - 3rem);
		overflow-y: auto;
	}
}

.doc-toc h2 {
	font-size: var(--step--1);
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--ink-faint);
	margin-bottom: 0.875rem;
}

.doc-toc ol {
	display: grid;
	gap: 0.125rem;
	counter-reset: toc;
}

.doc-toc a {
	display: block;
	padding: 0.4rem 0.625rem;
	border-radius: var(--r-sm);
	font-size: var(--step--1);
	color: var(--ink-soft);
	text-decoration: none;
	line-height: 1.4;
}

.doc-toc a:hover {
	background: var(--surface-sunken);
	color: var(--ink);
}

/* --------------------------------------------------------------------------
   13. Supporto
   -------------------------------------------------------------------------- */
.contact-card {
	display: grid;
	gap: 1.25rem;
	padding: clamp(1.5rem, 1.2rem + 1.5vw, 2.5rem);
	border: 1px solid var(--line);
	border-radius: var(--r-xl);
	background: var(--surface);
	box-shadow: var(--shadow-sm);
}

.contact-card__row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 1rem;
}

/* --------------------------------------------------------------------------
   14. Piè di pagina
   -------------------------------------------------------------------------- */
.site-footer {
	padding-block: clamp(2.5rem, 2rem + 2vw, 4rem) 2rem;
	background: var(--surface-alt);
	border-top: 1px solid var(--line);
	font-size: var(--step--1);
}

.site-footer .wrap {
	display: grid;
	gap: clamp(2rem, 1.5rem + 2vw, 3.5rem);
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr));
}

.site-footer h2 {
	font-size: var(--step--1);
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--ink-faint);
	margin-bottom: 1rem;
}

.site-footer ul {
	display: grid;
	gap: 0.625rem;
}

.site-footer a {
	color: var(--ink-soft);
	text-decoration: none;
}

.site-footer a:hover {
	color: var(--brand-ink);
	text-decoration: underline;
}

.footer-brand p {
	margin-top: 1rem;
	color: var(--ink-soft);
	max-width: 24rem;
}

.store-badges {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	margin-top: 0.25rem;
}

.badge-store {
	display: inline-flex;
	align-items: center;
	gap: 0.625rem;
	padding: 0.625rem 1rem;
	min-height: 3rem;
	border: 1px solid var(--line);
	border-radius: var(--r-md);
	background: var(--surface);
	color: var(--ink);
	text-decoration: none;
	transition: border-color 0.18s var(--ease), transform 0.18s var(--ease);
}

.badge-store:hover {
	border-color: var(--brand);
	transform: translateY(-2px);
	text-decoration: none;
}

.badge-store svg {
	width: 1.35rem;
	height: 1.35rem;
	flex: none;
}

.badge-store small {
	display: block;
	font-size: 0.625rem;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--ink-faint);
	line-height: 1.1;
}

.badge-store strong {
	display: block;
	font-size: 0.875rem;
	line-height: 1.2;
}

.footer-legal {
	grid-column: 1 / -1;
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 1.5rem;
	justify-content: space-between;
	align-items: center;
	padding-top: 1.75rem;
	border-top: 1px solid var(--line);
	color: var(--ink-faint);
}

/* --------------------------------------------------------------------------
   15. Pagina 404
   -------------------------------------------------------------------------- */
.error-page {
	display: grid;
	place-items: center;
	text-align: center;
	min-height: min(70vh, 34rem);
	padding-block: 4rem;
}

.error-code {
	font-size: clamp(4rem, 2rem + 14vw, 9rem);
	font-weight: 800;
	line-height: 1;
	letter-spacing: -0.05em;
	background: linear-gradient(140deg, var(--p-500), var(--p-300));
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
}

.error-page h1 {
	font-size: var(--step-3);
	margin-top: 1rem;
}

.error-page p {
	margin-top: 1rem;
	color: var(--ink-soft);
	max-width: 32rem;
}

.error-page .btn-row {
	margin-top: 2rem;
	justify-content: center;
}

/* --------------------------------------------------------------------------
   16. Comparsa progressiva (disattivata se si preferisce meno movimento)
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: no-preference) {
	.reveal {
		opacity: 0;
		transform: translateY(16px);
		transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
	}

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

@media print {
	.site-header,
	.site-footer,
	.skip-link,
	.cta-band {
		display: none !important;
	}

	body {
		color: #000;
		background: #fff;
	}
}

/* --------------------------------------------------------------------------
   17. Selettore di lingua
   -------------------------------------------------------------------------- */
.lang-switch {
	position: relative;
	margin-left: 0.25rem;
}

.lang-switch__button {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	min-height: 2.5rem;
	padding: 0.4rem 0.7rem;
	border: 1px solid var(--line);
	border-radius: var(--r-sm);
	background: transparent;
	color: var(--ink-soft);
	font: inherit;
	font-size: var(--step--1);
	font-weight: 700;
	text-transform: uppercase;
	cursor: pointer;
	transition: border-color 0.15s var(--ease), color 0.15s var(--ease);
}

.lang-switch__button:hover {
	border-color: var(--brand);
	color: var(--brand-ink);
}

.lang-switch__button svg {
	width: 1.1rem;
	height: 1.1rem;
	flex: none;
}

.lang-switch__list {
	position: absolute;
	top: calc(100% + 0.4rem);
	right: 0;
	z-index: 10;
	min-width: 10rem;
	padding: 0.375rem;
	border: 1px solid var(--line);
	border-radius: var(--r-md);
	background: var(--surface);
	box-shadow: var(--shadow-lg);
	display: grid;
	gap: 0.125rem;
	list-style: none;
	margin: 0;
}

.lang-switch__list[hidden] {
	display: none;
}

.lang-switch__list a {
	display: block;
	padding: 0.5rem 0.75rem;
	min-height: 2.75rem;
	line-height: 1.75rem;
	border-radius: var(--r-sm);
	color: var(--ink-soft);
	font-size: var(--step--1);
	font-weight: 600;
	text-decoration: none;
}

.lang-switch__list a:hover {
	background: var(--surface-sunken);
	color: var(--ink);
}

.lang-switch__list a[aria-current="true"] {
	color: var(--brand-ink);
	background: var(--p-50);
}

@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) .lang-switch__list a[aria-current="true"] {
		background: var(--surface-sunken);
		color: var(--p-300);
	}
}

@media (max-width: 54rem) {
	.lang-switch {
		margin: 0.5rem 0 0;
	}

	.lang-switch__button {
		width: 100%;
		justify-content: flex-start;
		min-height: 3rem;
	}

	.lang-switch__list {
		position: static;
		box-shadow: none;
		margin-top: 0.375rem;
	}
}

/* Avviso di traduzione sui documenti legali */
.notice {
	display: flex;
	gap: 0.875rem;
	padding: 1rem 1.25rem;
	margin-bottom: 2rem;
	border-radius: var(--r-md);
	border: 1px solid var(--p-200);
	background: var(--p-50);
	color: var(--p-800);
	font-size: var(--step--1);
}

.notice svg {
	width: 1.25rem;
	height: 1.25rem;
	flex: none;
	margin-top: 0.15rem;
}

.notice strong {
	display: block;
}

@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) .notice {
		background: var(--surface-sunken);
		border-color: var(--line);
		color: var(--ink-soft);
	}
}
