/* Stile comune delle pagine di Protocollo Michelangelo. Pensato prima per il telefono. */
:root {
  --scuro: #0f1115;
  --scuro-2: #1a1d24;
  --testo: #1d1f24;
  --testo-2: #555b66;
  --chiaro: #f4f5f7;
  --bianco: #ffffff;
  --oro: #d9a521;
  --rosso: #d63a3a;
  --cta: #f26a1b;
  --cta-scuro: #c9500c;
  --verde: #22c55e;
  --bordo: #e3e5ea;
  --raggio: 14px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); color: var(--testo); background: var(--bianco); font-size: 17px; line-height: 1.5; }
img { max-width: 100%; display: block; }
.contenitore { width: 100%; max-width: 640px; margin: 0 auto; padding: 0 18px; }
.largo { max-width: 960px; }
section { padding: 36px 0; }
.sez-chiara { background: var(--chiaro); }
.sez-scura { background: var(--scuro); color: var(--bianco); }

h1, h2, h3 { margin: 0; line-height: 1.12; letter-spacing: -0.01em; }
h2 { font-size: clamp(24px, 6.4vw, 34px); font-weight: 800; text-align: center; text-transform: uppercase; }
.sottotitolo-sez { text-align: center; color: var(--testo-2); margin: 8px 0 22px; font-size: 17px; }
.sez-scura .sottotitolo-sez { color: #b9bec8; }
.rosso { color: var(--rosso); }
.oro { color: var(--oro); }

/* Striscia in alto */
.striscia { background: var(--rosso); color: #fff; text-align: center; font-weight: 800; text-transform: uppercase; font-size: 13.5px; letter-spacing: 0.02em; padding: 9px 14px; line-height: 1.3; }

/* Pulsante principale */
.cta { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 100%; max-width: 560px; min-height: 64px; margin: 0 auto; padding: 14px 18px; border: 0; border-radius: 12px; background: var(--cta); color: #fff; font: 800 18px/1.15 var(--font); text-transform: uppercase; text-align: center; text-decoration: none; cursor: pointer; box-shadow: 0 6px 0 var(--cta-scuro), 0 10px 24px rgba(242, 106, 27, 0.35); transition: transform 0.08s ease; -webkit-tap-highlight-color: transparent; }
.cta:active { transform: translateY(3px); box-shadow: 0 3px 0 var(--cta-scuro); }
.cta small { display: block; margin-top: 4px; font-size: 12.5px; font-weight: 600; text-transform: none; opacity: 0.92; }
.cta-pulsa { animation: pulsa 2.2s ease-in-out infinite; }
@keyframes pulsa { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.025); } }
.sotto-cta { text-align: center; font-size: 13px; color: var(--testo-2); margin-top: 10px; }
.sez-scura .sotto-cta { color: #b9bec8; }
.blocco-cta { padding: 8px 0 4px; }

/* Numeri */
.numeri { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; text-align: center; }
.numeri b { display: block; font-size: 24px; font-weight: 800; color: var(--cta); }
.numeri span { font-size: 12px; color: var(--testo-2); line-height: 1.25; display: block; }

/* Prima e dopo */
.galleria { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.trasf { background: var(--bianco); border: 1px solid var(--bordo); border-radius: var(--raggio); overflow: hidden; }
.trasf-foto { display: grid; grid-template-columns: 1fr 1fr; }
.trasf-foto figure { margin: 0; position: relative; aspect-ratio: 540 / 800; background: #ddd; }
.trasf-foto img { width: 100%; height: 100%; object-fit: cover; }
.trasf-foto figcaption { position: absolute; left: 4px; bottom: 4px; font-size: 10px; font-weight: 800; text-transform: uppercase; color: #fff; background: rgba(0, 0, 0, 0.65); padding: 2px 6px; border-radius: 4px; }
.trasf-foto figure:last-child figcaption { background: var(--verde); }
.trasf p { margin: 0; padding: 7px 8px; font-size: 13px; font-weight: 700; text-align: center; }
.trasf p span { font-weight: 500; color: var(--testo-2); }
.nascosta { display: none; }
.mostra-altre { display: block; margin: 16px auto 0; background: none; border: 2px solid var(--testo); border-radius: 10px; padding: 10px 18px; font: 700 15px var(--font); cursor: pointer; color: var(--testo); }

/* Schede */
.schede { display: grid; gap: 12px; }
.scheda { background: var(--bianco); border: 1px solid var(--bordo); border-radius: var(--raggio); padding: 16px 18px; }
.scheda h3 { font-size: 18px; margin-bottom: 4px; }
.scheda p { margin: 0; color: var(--testo-2); font-size: 15.5px; }
.sez-scura .scheda { background: var(--scuro-2); border-color: #2a2e37; }
.sez-scura .scheda p { color: #c3c8d1; }

/* Testimonianze scritte */
.testim { background: var(--bianco); border: 1px solid var(--bordo); border-radius: var(--raggio); padding: 16px 18px; }
.stelle { color: var(--oro); letter-spacing: 2px; font-size: 15px; }
.testim blockquote { margin: 6px 0 10px; font-size: 15.5px; }
.testim .risultato { display: inline-block; background: #e9f9ef; color: #127a3a; font-weight: 800; font-size: 13px; padding: 3px 9px; border-radius: 6px; }
.testim .chi { margin-top: 8px; font-size: 14px; font-weight: 700; }
.testim .chi span { display: block; font-weight: 500; color: var(--testo-2); font-size: 13px; }

/* Chi è Andrea */
.bio { display: grid; gap: 16px; align-items: center; }
.bio img { border-radius: var(--raggio); width: 100%; max-height: 460px; object-fit: cover; object-position: top; }
@media (min-width: 720px) { .bio { grid-template-columns: 1fr 1.2fr; } }

/* Video */
.video-box { position: relative; width: 100%; border-radius: var(--raggio); overflow: hidden; background: #000; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25); }

/* Pop-up (form e uscita) */
dialog { border: 0; padding: 0; width: min(520px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); border-radius: 18px; background: var(--bianco); color: var(--testo); box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45); }
dialog::backdrop { background: rgba(8, 10, 14, 0.75); }
.modale { padding: 24px 20px 20px; position: relative; }
.chiudi { position: absolute; top: 6px; right: 8px; width: 40px; height: 40px; border: 0; background: none; font-size: 26px; line-height: 1; color: #888; cursor: pointer; }
.modale h3 { font-size: 22px; font-weight: 800; text-transform: uppercase; text-align: center; padding: 0 24px; }
.modale .sott { text-align: center; color: var(--testo-2); margin: 8px 0 16px; font-size: 15px; }
.progresso { height: 12px; background: #eceef2; border-radius: 99px; overflow: hidden; margin: 0 0 6px; }
.progresso i { display: block; height: 100%; width: 50%; background: repeating-linear-gradient(45deg, #22c55e 0 10px, #3bd273 10px 20px); background-size: 28px 28px; animation: strisce 1.2s linear infinite; }
@keyframes strisce { to { background-position: 28px 0; } }
.progresso-testo { text-align: center; font-size: 12.5px; font-weight: 700; color: var(--testo-2); margin-bottom: 14px; }
.campo { margin-bottom: 10px; }
.campo input { width: 100%; height: 54px; border: 1.5px solid #cfd3da; border-radius: 10px; padding: 0 14px; font: 16px var(--font); color: var(--testo); background: #fbfbfc; }
.campo input:focus { outline: none; border-color: var(--cta); background: #fff; }
.campo .errore { color: var(--rosso); font-size: 13px; margin-top: 4px; display: none; }
.campo.ko input { border-color: var(--rosso); }
.campo.ko .errore { display: block; }
.privacy { font-size: 12px; color: var(--testo-2); text-align: center; margin: 10px 0 0; }
.privacy a { color: inherit; }
.errore-invio { display: none; background: #fdecec; color: #8c1d1d; border-radius: 8px; padding: 10px 12px; font-size: 14px; margin-top: 10px; }

/* Barra fissa sul telefono */
.barra-fissa { position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; display: none; padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); background: rgba(15, 17, 21, 0.96); box-shadow: 0 -6px 20px rgba(0, 0, 0, 0.25); }
.barra-fissa .cta { min-height: 52px; font-size: 16px; box-shadow: none; }
body.con-barra .barra-fissa { display: block; }
body.con-barra { padding-bottom: 80px; }
@media (min-width: 768px) { body.con-barra .barra-fissa { display: none; } body.con-barra { padding-bottom: 0; } }

footer { background: var(--scuro); color: #8b919c; text-align: center; font-size: 12.5px; padding: 22px 18px 28px; }
footer a { color: #b9bec8; }
footer p { margin: 4px 0; }
