@font-face { font-family: 'Bebas Neue'; src: url('fonts/bebas-neue-latin-400-normal.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Montserrat'; src: url('fonts/montserrat-latin-400-normal.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Montserrat'; src: url('fonts/montserrat-latin-600-normal.woff2') format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Montserrat'; src: url('fonts/montserrat-latin-700-normal.woff2') format('woff2'); font-weight: 700; font-display: swap; }

:root {
  --navy: #0B1430; --blu: #0A4BA0; --blu-scuro: #083C82; --giallo: #FFD83A; --testo: #1B2338; --grigio: #667089;
  --linea: #D9DEE8; --chiaro: #F3F5F9; --bianco: #fff; --rosso: #C0392B; --verde: #1E8E5A;
  --titolo: 'Bebas Neue', 'Arial Narrow', Impact, sans-serif; --base: 'Montserrat', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--base); font-size: 16px; line-height: 1.5; color: var(--testo); background: var(--chiaro); }
[hidden] { display: none !important; }
a { color: var(--blu); }
small { font-weight: 400; color: var(--grigio); font-size: 13px; }

.testata { display: flex; align-items: center; justify-content: space-between; padding: 14px 20px; background: var(--navy); border-bottom: 4px solid var(--giallo); }
.testata img { display: block; height: 38px; width: auto; }
.testata-tel { color: var(--bianco); font-weight: 700; font-size: 14px; text-decoration: none; letter-spacing: .04em; }

/* Ingresso: lo stesso linguaggio dei post del profilo, titoli condensati bianchi e gialli su blu notte */
.hero { background: radial-gradient(120% 90% at 85% 0%, #17408f 0%, rgba(11, 20, 48, 0) 60%), linear-gradient(180deg, #0d1a40 0%, var(--navy) 100%); color: var(--bianco); padding: 0 20px 56px; text-align: center; }
.hero-in { max-width: 620px; margin: 0 auto; }
.linguetta { display: inline-block; margin: 0; padding: 10px 26px 8px; background: var(--blu); border-radius: 0 0 10px 10px; font-family: var(--titolo); font-size: 19px; letter-spacing: .06em; text-transform: uppercase; }
.hero h1 { margin: 34px 0 18px; font-family: var(--titolo); font-weight: 400; font-size: clamp(52px, 15vw, 92px); line-height: .92; text-transform: uppercase; letter-spacing: .01em; }
.hero h1 span { color: var(--giallo); }
.targa { display: inline-block; margin: 0; padding: 8px 14px; background: var(--giallo); color: var(--navy); font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; line-height: 1.35; }
.passi { list-style: none; margin: 34px 0 30px; padding: 0; text-align: left; display: grid; gap: 14px; }
.passi li { display: flex; gap: 14px; align-items: center; font-size: 15px; }
.passi b { flex: none; width: 38px; height: 38px; border-radius: 50%; border: 2px solid var(--giallo); color: var(--giallo); font-family: var(--titolo); font-size: 22px; font-weight: 400; display: grid; place-items: center; padding-top: 2px; }
.hero-nota { margin: 14px 0 0; font-size: 13px; color: #b9c3dc; }

.bottone { appearance: none; border: 0; cursor: pointer; display: inline-block; min-height: 54px; padding: 14px 30px 11px; border-radius: 8px; background: var(--giallo); color: var(--navy); font-family: var(--titolo); font-size: 24px; letter-spacing: .05em; text-transform: uppercase; text-decoration: none; text-align: center; transition: transform .12s, background .12s; }
.bottone:hover { background: #ffe26a; }
.bottone:active { transform: translateY(1px); }
.bottone:focus-visible, .scelte label:focus-within, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid var(--blu); outline-offset: 2px; }
.hero .bottone { width: 100%; max-width: 380px; }
.hero .bottone:focus-visible { outline-color: var(--bianco); }
.bottone-chiaro { background: transparent; color: var(--blu); box-shadow: inset 0 0 0 2px var(--linea); }
.bottone-chiaro:hover { background: var(--bianco); }
.bottone[disabled] { opacity: .5; cursor: default; }

/* Modulo a passi */
.modulo, .attesa, .esito { max-width: 660px; margin: 0 auto; padding: 26px 20px 56px; }
.avanzamento { height: 6px; background: var(--linea); border-radius: 3px; overflow: hidden; }
.avanzamento i { display: block; height: 100%; width: 0; background: var(--blu); transition: width .25s; }
.passo-n { margin: 12px 0 0; font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--blu); }
.passo { border: 0; margin: 0; padding: 0; min-width: 0; display: none; }
.passo.attivo { display: block; }
.passo-titolo { margin: 12px 0 22px; font-family: var(--titolo); font-weight: 400; font-size: clamp(34px, 9vw, 46px); line-height: 1; text-transform: uppercase; color: var(--navy); }
.passo-titolo::after { content: ''; display: block; width: 56px; height: 4px; margin-top: 10px; background: var(--giallo); }

.campo { display: block; margin: 0 0 22px; font-weight: 600; font-size: 15px; }
.campo > span { display: block; }
.campo input, .campo select, .campo textarea { display: block; width: 100%; margin-top: 8px; padding: 14px; border: 2px solid var(--linea); border-radius: 8px; background: var(--bianco); color: var(--testo); font: 400 16px/1.3 var(--base); }
.campo select { appearance: none; padding-right: 42px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9'%3E%3Cpath d='M1 1l6 6 6-6' fill='none' stroke='%230A4BA0' stroke-width='2'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 16px center; }
.campo textarea { resize: vertical; }
.due { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.scelte { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.scelte label { position: relative; cursor: pointer; padding: 11px 16px; border: 2px solid var(--linea); border-radius: 8px; background: var(--bianco); font-weight: 600; font-size: 14px; line-height: 1.2; user-select: none; }
.scelte input { position: absolute; opacity: 0; pointer-events: none; }
.scelte label:has(input:checked) { background: var(--blu); border-color: var(--blu); color: var(--bianco); }

.spunta { display: flex; gap: 12px; align-items: flex-start; margin: 0 0 16px; font-size: 14px; cursor: pointer; }
.spunta input { flex: none; width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--blu); }

.foto { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; }
.foto-aggiungi, .foto figure { aspect-ratio: 4 / 3; margin: 0; border-radius: 8px; overflow: hidden; position: relative; }
.foto-aggiungi { display: grid; place-items: center; border: 2px dashed var(--blu); color: var(--blu); font-weight: 700; font-size: 13px; text-align: center; cursor: pointer; background: var(--bianco); padding: 6px; }
.foto img { width: 100%; height: 100%; object-fit: cover; display: block; }
.foto figure button { position: absolute; top: 4px; right: 4px; width: 30px; height: 30px; border: 0; border-radius: 50%; background: rgba(11, 20, 48, .85); color: var(--bianco); font-size: 18px; line-height: 1; cursor: pointer; }

.errore { margin: 0 0 16px; padding: 12px 14px; border-left: 4px solid var(--rosso); background: #fdecea; color: #8a1f14; font-weight: 600; font-size: 14px; }
.azioni { display: flex; gap: 12px; margin-top: 8px; }
.azioni .bottone { flex: 1; }
.azioni .bottone-chiaro { flex: 0 0 auto; }

/* Attesa */
.attesa { text-align: center; padding-top: 80px; padding-bottom: 100px; }
.attesa h2 { margin: 26px 0 8px; font-family: var(--titolo); font-weight: 400; font-size: 36px; line-height: 1; text-transform: uppercase; color: var(--navy); }
.attesa p { margin: 0; color: var(--grigio); }
.giro { width: 56px; height: 56px; margin: 0 auto; border-radius: 50%; border: 5px solid var(--linea); border-top-color: var(--blu); animation: giro .9s linear infinite; }
@keyframes giro { to { transform: rotate(360deg); } }

/* Esito */
.esito h2 { margin: 6px 0 18px; font-family: var(--titolo); font-weight: 400; font-size: clamp(36px, 10vw, 50px); line-height: .98; text-transform: uppercase; color: var(--navy); }
.esito h3 { margin: 34px 0 12px; font-family: var(--titolo); font-weight: 400; font-size: 28px; line-height: 1; text-transform: uppercase; color: var(--navy); }
.esito h3::after { content: ''; display: block; width: 44px; height: 3px; margin-top: 8px; background: var(--giallo); }
.fascia { background: var(--blu); color: var(--bianco); border-radius: 10px; padding: 22px 22px 20px; }
.fascia .eti { margin: 0 0 10px; color: var(--giallo); font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.fascia .valori { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; font-family: var(--titolo); font-size: clamp(40px, 12vw, 60px); line-height: 1; }
.fascia .valori i { font-style: normal; font-family: var(--base); font-size: 12px; font-weight: 600; letter-spacing: .1em; }
.fascia .valori b { font-weight: 400; color: var(--giallo); }
.fascia p { margin: 12px 0 0; font-size: 14px; }
.tessere { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; }
.tessere div { background: var(--bianco); border-radius: 8px; padding: 12px; }
.tessere span { display: block; font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--grigio); line-height: 1.3; }
.tessere strong { display: block; margin-top: 6px; font-family: var(--titolo); font-weight: 400; font-size: 26px; line-height: 1; color: var(--navy); }
.avviso { margin: 16px 0 0; padding: 12px 14px; background: var(--bianco); border-left: 4px solid var(--giallo); font-size: 14px; }
.fattori { list-style: none; margin: 0; padding: 0; }
.fattori li { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--linea); font-size: 14px; }
.fattori b.su { color: var(--verde); } .fattori b.giu { color: var(--rosso); }
.prossimo { margin-top: 34px; background: var(--navy); color: var(--bianco); border-radius: 10px; padding: 24px 22px; }
.prossimo .eti { margin: 0 0 8px; color: var(--giallo); font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.prossimo h3 { margin: 0 0 10px; color: var(--bianco); font-size: 32px; }
.prossimo h3::after { display: none; }
.prossimo p { margin: 0 0 18px; font-size: 15px; }
.prossimo .azioni { flex-wrap: wrap; }
.prossimo .bottone-chiaro { color: var(--bianco); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .4); flex: 1; }
.prossimo .bottone-chiaro:hover { background: rgba(255, 255, 255, .08); }
.nota { margin: 22px 0 0; font-size: 12px; color: var(--grigio); }

.piede { padding: 28px 20px 40px; background: var(--navy); color: #b9c3dc; font-size: 13px; text-align: center; }
.piede a { color: var(--bianco); }
.piede p { margin: 0 0 10px; }

.pagina { max-width: 720px; margin: 0 auto; padding: 30px 20px 60px; }
.pagina h1 { font-family: var(--titolo); font-weight: 400; font-size: 44px; line-height: 1; text-transform: uppercase; color: var(--navy); }
.pagina h2 { margin-top: 28px; font-size: 17px; color: var(--navy); }

@media (min-width: 700px) {
  .hero { padding-bottom: 80px; }
  .passi { grid-template-columns: repeat(3, 1fr); gap: 20px; }
  .passi li { flex-direction: column; text-align: center; }
  .foto { grid-template-columns: repeat(4, 1fr); }
  .modulo, .esito { padding-top: 40px; }
}
@media (max-width: 420px) {
  .tessere { grid-template-columns: 1fr; }
  .tessere div { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
  .tessere strong { margin: 0; white-space: nowrap; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } .giro { animation-duration: 3s; } }
