@charset "utf-8";

/* ==========================================================================
   INDICE
   1. Variabili (colori, ombre)
   2. Font (@font-face)
   3. Base / Globale (tutte le pagine)
   4. Utility condivise (home.php, win_si.php, win_no.php, registrazione.php)
   5. Componenti condivisi: bottoni (home.php, registrazione.php)
   6. Menu (menu.php)
   7. Home (home.php) - hero, come partecipare, premi
   8. Registrazione (registrazione.php) - form, upload OCR
   9. Footer (footer.php)
   ========================================================================== */


/* ============================
   1. VARIABILI
   ============================ */
:root {
	/* ==============================================
	   1. COLORI PRIMARI (ROSSO / BRAND)
	   ============================================== */
	/* Rosso principale di sfondo (ampia percentuale visiva) */
	--color-primary: #892E29;         /* Dark Burgundy Red */

	/* Rosso vivo (Logo Loriana, titoli e accenti principali) */
	--color-primary-bright: #C8102E;  /* Brand Red / Crimson (#B12435 / #C8102E) */

	/* Variant scura / Hover per il rosso */
	--color-primary-dark: #6E221E;


	/* ==============================================
	   2. COLORI SECONDARI & ACCENTI
	   ============================================== */
	/* Verde scuro ("e parti!", dettagli grafica) */
	--color-secondary-green: #1D3E26; /* Forest / Deep Green */

	/* Oro / Senape / Marrone dorato ("Scalda...", badge scooter) */
	--color-accent-gold: #B08533;     /* Warm Gold / Ochre */

	/* Giallo / Ocra chiaro per evidenziazioni (es. badge "LA PIADINA", "150€") */
	--color-accent-yellow: #CFA028;   /* Bright Ochre / Gold */


	/* ==============================================
	   3. SFONDI & SUPERFICI
	   ============================================== */
	/* Sfondo chiaro superiore (Cream/Beige con trama) */
	--bg-light: #E2D0B0;              /* Soft Warm Beige */

	/* Sfondo box / badge chiari (es. Buono Spesa) */
	--bg-card-light: #F4EBD5;         /* Off-white / Cream */

	/* Sfondo banner promozionale */
	--bg-banner: #EDE1CB;             /* Light Parchment */


	/* ==============================================
	   4. TIPOGRAFIA & TESTI
	   ============================================== */
	/* Testo scuro per massima leggibilità su fondi chiari */
	--text-dark: #353331;             /* Charcoal / Dark Slate */

	/* Testo chiaro per sfondi rossi/scuri */
	--text-light: #FFFFFF;            /* White */

	/* Testo dorato / ocra */
	--text-gold: #9C702C;


	/* ==============================================
	   5. VARIANTI DERIVATE
	   (hover, stati, trasparenze - coerenti col profilo sopra)
	   ============================================== */
	/* Hover per il verde secondario, derivato da --color-secondary-green */
	--color-secondary-green-hover: color-mix(in srgb, var(--color-secondary-green) 85%, black);
	--color-secondary-green-dark: color-mix(in srgb, var(--color-secondary-green) 70%, black);

	/* Stati e feedback */
	--color-danger: var(--color-primary-bright);

	/* Ombre e trasparenze */
	--color-primary-alpha-10: rgba(200, 16, 46, 0.1);
	--shadow-md: 0 4px 12px rgba(0, 0, 0, 0.12);
}


/* ============================
   2. FONT
   ============================ */

@font-face {
	font-family: 'Atomic Marker';
	src: url('../fonts/set-sail-studios-atomic-marker-regular.otf') format('opentype');
	font-weight: normal;
	font-style: normal;
}

/* Arvo (font di testo per l'intero sito) */
@font-face {
	font-display: swap;
	font-family: 'Arvo';
	font-style: normal;
	font-weight: 400;
	src: url('../fonts/arvo-v23-latin-regular.woff2') format('woff2'),
		url('../fonts/arvo-v23-latin-regular.woff') format('woff');
}

@font-face {
	font-display: swap;
	font-family: 'Arvo';
	font-style: italic;
	font-weight: 400;
	src: url('../fonts/arvo-v23-latin-italic.woff2') format('woff2'),
		url('../fonts/arvo-v23-latin-italic.woff') format('woff');
}

@font-face {
	font-display: swap;
	font-family: 'Arvo';
	font-style: normal;
	font-weight: 700;
	src: url('../fonts/arvo-v23-latin-700.woff2') format('woff2'),
		url('../fonts/arvo-v23-latin-700.woff') format('woff');
}

@font-face {
	font-display: swap;
	font-family: 'Arvo';
	font-style: italic;
	font-weight: 700;
	src: url('../fonts/arvo-v23-latin-700italic.woff2') format('woff2'),
		url('../fonts/arvo-v23-latin-700italic.woff') format('woff');
}

/* Kaushan Script (font per i titoli, stile brush simile al lettering del claim "Scalda, farcisci e parti!") */
@font-face {
	font-display: swap;
	font-family: 'Kaushan Script';
	font-style: normal;
	font-weight: 400;
	src: url('../fonts/kaushan-script-v19-latin-regular.woff2') format('woff2'),
		url('../fonts/kaushan-script-v19-latin-regular.woff') format('woff');
}


/* ============================
   3. BASE / GLOBALE
   (presenti in head.php su tutte le pagine)
   ============================ */

body {
	font-family: 'Arvo', serif;
	font-weight: normal;
	font-style: normal;
	font-size: 14px;
	color: var(--text-dark);
	background-position: top center;
	background-size: contain;
	background-repeat: repeat-y;
}

.row {
	margin-left: 0px;
	margin-right: 0px;
}

h1,
h2 {
	font-weight: bold;
}

a {
	text-decoration: none;
}

.skip-to-main-content-link {
	position: absolute;
	left: -9999px;
	z-index: 999;
	padding: 1em;
	background-color: black;
	color: white;
	opacity: 0;
}

.skip-to-main-content-link:focus {
	left: 50%;
	transform: translateX(-50%);
	opacity: 1;
}


/* ============================
   4. UTILITY CONDIVISE
   (home.php, win_si.php, win_no.php, registrazione.php)
   ============================ */

.text-red {
	color: var(--color-primary-bright);
}

.text-green {
	color: var(--color-secondary-green);
}

.text-beige {
	color: var(--color-accent-yellow);
}

.bg-red {
	background-color: var(--color-primary-bright);
}

.bg-green {
	background-color: var(--color-secondary-green);
}

.bg-citta {
	background-image: url('../img/sfondo_citta.jpg');
	background-size: cover;
	background-position: center;
	background-attachment: scroll;
}

.ff-atomic {
	font-family: 'Kaushan Script', cursive;
}


/* ============================
   5. COMPONENTI CONDIVISI: BOTTONI
   (home.php, registrazione.php)
   ============================ */

.button,
.button_green {
	color: var(--text-light);
	border-radius: 65px;
	border: 0px solid transparent;
	font-weight: bold;
	font-size: 2.2rem;
	padding: .25rem 2rem;
	width: max-content;
	box-shadow: 2px 4px 6px 1px rgba(0, 0, 0, .3);
	text-decoration: none;
}

.button {
	background: linear-gradient(to bottom, var(--color-primary-bright) 0%, var(--color-primary-bright) 20%, var(--color-primary) 100%);
}

.button:hover {
	color: var(--text-light);
	background: var(--color-primary-dark);
}

.button_green {
	background: linear-gradient(to bottom, var(--color-secondary-green) 0%, var(--color-secondary-green-dark) 20%, var(--color-secondary-green-hover) 100%);
}

.button_green:hover {
	color: var(--text-light);
	background: var(--color-secondary-green-dark);
}

@media screen and (max-width: 767px) {

	.button,
	.button_green {
		font-size: 1.5rem;
	}
}


/* ============================
   6. MENU (menu.php)
   ============================ */

#attiva_menu {
	max-width: 30px;
	margin: 10px 25px;
	cursor: pointer;
}

#logo_bar {
	background-color: var(--color-accent-gold);
	max-height: 50px;
}

#menu {
	background-color: var(--text-light);
	border-top: 10px solid var(--color-primary-bright);
}

#menu_list li {
	list-style-type: none;
	float: left;
}

#menu_list li a {
	display: block;
	text-align: center;
	text-decoration: none;
	color: var(--text-dark);
	font-size: 24px;
	position: relative;
}

#menu_list li a.active:after,
#menu_list li a:hover:after {
	content: url('../img/highlight.png');
	position: absolute;
	max-width: 80px;
	left: 50%;
	transform: translateX(-50%);
	bottom: -15px;
}

@media screen and (max-width: 767px) {
	#menu_list li {
		list-style-type: none;
		float: none;
		width: 100%;
		padding-bottom: 20px;
	}
}


/* ============================
   7. HOME (home.php)
   ============================ */

/* --- Hero --- */

@keyframes float {
	0% {
		transform: translateY(0);
	}

	50% {
		transform: translateY(-10px);
	}

	100% {
		transform: translateY(0);
	}
}

img.float-on-hover {
	display: block;
	transition: transform 0.3s ease;
}

img.float-on-hover:hover {
	animation: float 2s ease-in-out infinite;
}

/* --- Come partecipare (step cards) --- */

.step-line {
	position: absolute;
	top: 10px;
	left: 0%;
	right: 0%;
	height: 3px;
	background-image: linear-gradient(to right, var(--color-accent-yellow) 60%, transparent 0%);
	background-size: 18px 3px;
	background-repeat: repeat-x;
	z-index: 0;
}

.step-col {
	position: relative;
	z-index: 1;
}

.step-card {
	position: relative;
	margin-top: 28px;
	padding: 2.25rem 1.25rem 1.5rem;
	background-color: var(--text-light);
	border-radius: 1.25rem;
	border-top: 6px solid transparent;
	box-shadow: var(--shadow-md);
	transition: transform .3s ease, box-shadow .3s ease;
}

.step-card--red {
	background-color: var(--bg-card-light);
	border-top-color: var(--color-primary-bright);
}

.step-card--green {
	background-color: var(--bg-light);
	border-top-color: var(--color-secondary-green);
}

.step-card:hover,
.step-card:focus-within {
	transform: translateY(-8px);
	box-shadow: 0 10px 24px rgba(0, 0, 0, .18);
}

.step-number {
	position: absolute;
	top: -28px;
	left: 50%;
	transform: translateX(-50%);
	width: 56px;
	height: 56px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 1.7rem;
	line-height: 1;
	color: var(--color-accent-gold);
	background-color: var(--color-accent-yellow);
	border: 3px solid var(--text-light);
	border-radius: 50%;
	box-shadow: var(--shadow-md);
}

.step-icon {
	width: 64px;
	height: 64px;
	margin: 0 auto 1rem;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	color: var(--text-light);
	font-size: 1.6rem;
	transition: transform .3s ease;
}

.step-card:hover .step-icon {
	transform: scale(1.12) rotate(-6deg);
}

.reveal {
	opacity: 0;
	transform: translateY(30px);
	transition: opacity .6s ease, transform .6s ease;
	transition-delay: var(--step-delay, 0s);
}

.reveal.is-visible {
	opacity: 1;
	transform: translateY(0);
}

.cta-partecipa {
	position: relative;
}

.cta-partecipa::after {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: 65px;
	box-shadow: 0 0 0 0 var(--color-primary-alpha-10);
	animation: cta-pulse 2.2s ease-out infinite;
	pointer-events: none;
}

.cta-partecipa:hover::after {
	animation: none;
}

@keyframes cta-pulse {
	0% {
		box-shadow: 0 0 0 0 rgba(200, 16, 46, .35);
	}

	70% {
		box-shadow: 0 0 0 18px rgba(200, 16, 46, 0);
	}

	100% {
		box-shadow: 0 0 0 0 rgba(200, 16, 46, 0);
	}
}

@media (prefers-reduced-motion: reduce) {

	.step-card,
	.step-icon,
	.reveal,
	.cta-partecipa::after {
		transition: none !important;
		animation: none !important;
	}

	.reveal {
		opacity: 1;
		transform: none;
	}
}

/* --- Premi --- */

.prize-card {
	position: relative;
	padding: 2.75rem 1.5rem 2rem;
	border-radius: 1.5rem;
	box-shadow: var(--shadow-md);
	overflow: hidden;
	transition: transform .3s ease, box-shadow .3s ease;
}

.prize-card:hover {
	transform: translateY(-8px);
	box-shadow: 0 14px 30px rgba(0, 0, 0, .2);
}

.prize-card--instant {
	background-color: var(--bg-card-light);
	border-top: 6px solid var(--color-primary-bright);
}

.prize-card--final {
	background-color: var(--bg-light);
	border-top: 6px solid var(--color-secondary-green);
}

.prize-badge {
	position: absolute;
	top: 1.25rem;
	left: 1.25rem;
	padding: .35rem 1rem;
	border-radius: 50px;
	font-size: .75rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .04em;
	background-color: var(--color-primary-bright);
	color: var(--text-light);
}

.prize-badge--final {
	background-color: var(--color-secondary-green);
}

.prize-card-img {
	display: block;
}

.prize-card-img--round {
	width: 150px;
	height: 150px;
	object-fit: cover;
	border-radius: 50%;
	border: 4px solid var(--text-light);
	box-shadow: var(--shadow-md);
}

.prize-card-img--wide {
	width: 100%;
	max-width: 260px;
	object-fit: contain;
}

@media (prefers-reduced-motion: reduce) {
	.prize-card {
		transition: none !important;
	}
}

.peluche-avatar {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 96px;
	height: 96px;
	margin: 0 auto;
	overflow: hidden;
	border-radius: 50%;
	background-color: var(--text-light);
	border: 3px solid var(--text-light);
	box-shadow: var(--shadow-md);
}

@media (prefers-reduced-motion: reduce) {
	.peluche-avatar {
		transition: none !important;
	}
}

small.small {
	font-size: 10px;
	line-height: 9px;
}


/* ============================
   8. REGISTRAZIONE (registrazione.php)
   ============================ */

.form-step-icon {
	width: 64px;
	height: 64px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	background-color: var(--color-accent-yellow);
	color: var(--color-accent-gold);
	font-size: 1.6rem;
	box-shadow: var(--shadow-md);
}

/* Blocchi del form come card, in stile coerente con le step/prize card della home */
.reg-card {
	background-color: var(--text-light);
	border-radius: 1.25rem;
	border-top: 6px solid transparent;
	box-shadow: var(--shadow-md);
	padding: 2rem 1.5rem 1.5rem;
	transition: box-shadow .3s ease;
}

.reg-card:focus-within {
	box-shadow: 0 10px 24px rgba(0, 0, 0, .18);
}

.reg-card--red {
	background-color: var(--bg-card-light);
	border-top-color: var(--color-primary-bright);
}

.reg-card--green {
	background-color: var(--bg-light);
	border-top-color: var(--color-secondary-green);
}

.reg-card .form-step-icon {
	display: flex;
}

@media (prefers-reduced-motion: reduce) {
	.reg-card {
		transition: none !important;
	}
}

#errore {
	color: var(--color-danger);
	font-weight: bold;
	font-size: 24px;
}

.form-control,
.form-select {
	border-radius: 5px;
	border: 1px solid var(--color-primary);
	color: var(--text-dark);
}

.form-group {
	margin-bottom: 15px;
}

/* Checkbox di consenso: label a tutta larghezza per impilare testo e checkbox */
label[for=dati_reg],
label[for=ricez_info_1] {
	display: block;
}

label a {
	color: inherit;
	text-decoration: underline;
}

/* Modale di caricamento durante la lettura OCR dello scontrino */
#ocr_loading,
#ocr_loading>.modal-dialog,
#ocr_loading>.modal-dialog>.modal-content,
#ocr_loading>.modal-dialog>.modal-content>.modal-body {
	background-color: transparent !important;
}


/* ============================
   9. FOOTER (footer.php)
   ============================ */

footer {
	font-family: 'Arvo';
	font-size: 0.8rem;
	background-color: var(--color-primary);
}

footer p {
	color: var(--text-light);
	font-family: 'Arvo';
	font-weight: normal;
	font-style: normal;
	font-size: 0.8rem;
	text-align: start;
}

footer p a {
	color: var(--text-light);
	text-decoration: underline;
	font-weight: 700;
}
