/*	NETTuno Timbratura - © NETTuno S.r.l. 2026
	Pagina del chiosco, come nelle Schermate Presenze: fondo scuro caldo, QR su bianco a sinistra, ora grande a destra.
	Font Atkinson Hyperlegible, scaricato in font/ e servito da qui. */

/*	Atkinson Hyperlegible (Braille Institute, licenza SIL OFL 1.1 in font/OFL.txt), solo caratteri latini, servito da qui:
	niente font da Google, la pagina non chiama terzi */
@font-face {
	font-family: 'Atkinson Hyperlegible';
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url('../font/atkinson-hyperlegible-400.woff2') format('woff2');
}

@font-face {
	font-family: 'Atkinson Hyperlegible';
	font-style: normal;
	font-weight: 700;
	font-display: swap;
	src: url('../font/atkinson-hyperlegible-700.woff2') format('woff2');
}

:root {
	--fondo: #2a2521;
	--testo: #f4f1ec;
	--tenue: #cfc6bb;
	--barra: #4a423b;
	--barra-piena: #e9dfd2;
	--in-linea: #26402f;
	--in-linea-testo: #cdebd6;
	--in-linea-punto: #6fd08f;
	--senza-rete: #4a2a22;
	--senza-rete-testo: #f3c9bd;
	--senza-rete-punto: #e0785f;
	--font: 'Atkinson Hyperlegible', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
	margin: 0;
	height: 100%;
	background: var(--fondo);
	color: var(--testo);
	font-family: var(--font);
}

.schermo {
	min-height: 100vh;
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	gap: 4vw;
	align-items: center;
	padding: 4vw;
}

/*	Con !important: .schermo.centrato (display: flex) altrimenti vincerebbe su hidden */
[hidden] { display: none !important; }

.schermo.centrato {
	display: flex;
	flex-direction: column;
	justify-content: center;
	text-align: center;
}

h1 { font-size: clamp(24px, 3.4vw, 40px); margin: 0 0 16px 0; }

p { font-size: clamp(16px, 2vw, 22px); max-width: 760px; line-height: 1.5; margin: 0 auto; }

.tenue { color: var(--tenue); font-size: clamp(14px, 1.6vw, 18px); margin-top: 12px; }

/*	Codice di abbinamento */
.codice {
	font-size: clamp(56px, 11vw, 128px);
	font-weight: 700;
	letter-spacing: 0.25em;
	margin: 32px 0 8px 0.25em;
	font-variant-numeric: tabular-nums;
}

/*	QR: su bianco, quadrato, il piu' grande che sta nella meta' sinistra */
.riquadro-qr {
	background: #ffffff;
	border-radius: 18px;
	padding: 3%;
	aspect-ratio: 1 / 1;
	width: 100%;
	max-height: calc(100vh - 8vw);
	max-width: calc(100vh - 8vw);
	justify-self: center;
	display: flex;
	align-items: center;
	justify-content: center;
}

#qr {
	width: 100%;
	height: 100%;
	image-rendering: pixelated;
	display: block;
}

/*	Lato destro: punto, ora, data, istruzioni, barra dei 30 secondi */
.lato {
	display: flex;
	flex-direction: column;
	gap: clamp(8px, 1.6vw, 18px);
	min-width: 0;
}

.punto { font-size: clamp(18px, 2.6vw, 30px); font-weight: 700; }

.ora { font-size: clamp(56px, 10vw, 120px); font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; }

.data { color: var(--tenue); font-size: clamp(15px, 1.9vw, 22px); }

.istruzioni { font-size: clamp(16px, 2.2vw, 26px); margin: 0; }

.barra { height: 10px; border-radius: 99px; background: var(--barra); overflow: hidden; }

.barra i { display: block; height: 100%; width: 100%; background: var(--barra-piena); }

.meta {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
	font-size: clamp(13px, 1.5vw, 17px);
	color: var(--tenue);
	font-variant-numeric: tabular-nums;
}

/*	Stato della rete: detto a parole, non solo col colore */
.pillola {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	background: var(--in-linea);
	color: var(--in-linea-testo);
	border-radius: 99px;
	padding: 3px 12px;
}

.pillola::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--in-linea-punto); }

.pillola.senza-rete { background: var(--senza-rete); color: var(--senza-rete-testo); }

.pillola.senza-rete::before { background: var(--senza-rete-punto); }

/*	Tablet in verticale o schermo stretto: una colonna, QR sopra */
@media (max-aspect-ratio: 1/1) {
	.schermo { grid-template-columns: 1fr; align-content: center; }
	.riquadro-qr { max-width: min(90vw, 60vh); max-height: none; }
	.lato { text-align: center; }
}

/*	Tessera: anteprima della fotocamera e invito, solo nei punti dove la tessera vale */
.tessera {
	display: flex;
	align-items: center;
	gap: 12px;
	border: 1px dashed #7d7166;
	border-radius: 12px;
	padding: 8px 10px;
	font-size: clamp(13px, 1.6vw, 17px);
	color: var(--tenue);
}

.tessera video { width: 96px; height: 72px; object-fit: cover; border-radius: 8px; background: #000000; transform: scaleX(-1); flex: none; }

/*	Velo della tessera, sopra tutto */
.velo {
	position: fixed;
	inset: 0;
	background: rgba(20, 17, 15, 0.92);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 4vw;
	z-index: 10;
}

.finestra {
	background: var(--testo);
	color: var(--fondo);
	border-radius: 24px;
	width: min(560px, 100%);
	padding: 28px;
	display: flex;
	flex-direction: column;
	gap: 18px;
	text-align: center;
}

.finestra h2 { margin: 0; font-size: 26px; }

.iniziali { font-size: 40px; font-weight: 700; }

.versi { display: flex; flex-direction: column; gap: 14px; margin-top: 14px; }

.verso {
	min-height: 80px;
	border: 2px solid #d8d0c6;
	background: #ffffff;
	color: var(--fondo);
	border-radius: 16px;
	font: 700 26px var(--font);
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 12px;
	cursor: pointer;
}

.verso .etichetta { display: none; font-size: 14px; background: #e3eaf5; color: #2f4f7f; padding: 3px 10px; border-radius: 99px; }

.verso.proposto { border-color: #2f4f7f; box-shadow: 0 0 0 3px #c9d6ea; }

.verso.proposto .etichetta { display: inline-block; }

.punti-pin { font-size: 40px; letter-spacing: 0.4em; min-height: 52px; margin-left: 0.4em; }

.tastierino { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }

.tastierino button {
	min-height: 64px;
	border: 2px solid #d8d0c6;
	background: #ffffff;
	color: var(--fondo);
	border-radius: 14px;
	font: 700 26px var(--font);
	cursor: pointer;
}

.ora-esito { font-size: 72px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1; }

.messaggio { margin: 0; font-size: 20px; min-height: 1.2em; }

.messaggio.ok { color: #1f6b43; font-weight: 700; }

.messaggio.errore { color: #8e2418; font-weight: 700; }

.annulla { background: transparent; border: 0; color: #5c4f42; font: 700 18px var(--font); min-height: 48px; cursor: pointer; }
