/* Capofila — sito vetrina. Stile coerente col design system dell'app (tokens.css).
   Mobile-first: si legge dal furgone prima che dalla scrivania. */

/* ── Font self-hosted: niente CDN esterni (provvedimento Garante su Google Fonts) ── */
@font-face {
    font-family: 'Instrument Sans'; font-style: normal; font-weight: 400;
    src: url('../fonts/instrument-sans-400.woff2') format('woff2'); font-display: swap;
}
@font-face {
    font-family: 'Instrument Sans'; font-style: normal; font-weight: 500;
    src: url('../fonts/instrument-sans-500.woff2') format('woff2'); font-display: swap;
}
@font-face {
    font-family: 'Instrument Sans'; font-style: normal; font-weight: 600;
    src: url('../fonts/instrument-sans-600.woff2') format('woff2'); font-display: swap;
}

:root {
    --brand: #16324F;
    --brand-scuro: #0f2438;
    --brand-tinta: #e8eef4;
    --azione: #d97706;
    --azione-scuro: #b45309;
    --azione-tinta: #fdf2e2;
    --sem-verde: #16a34a;
    --sem-giallo: #ca8a04;
    --sem-rosso: #dc2626;
    --sem-verde-ink: #15803d;
    --sem-giallo-ink: #a16207;
    --sem-rosso-ink: #b91c1c;
    --sem-rosso-vivo: #FF6B5B;
    --sem-giallo-vivo: #FFC53D;
    --sem-verde-vivo: #4ADE80;
    --quadro: #0F1B26;
    --bg: #f4f4f2;
    --bg-caldo: #f5f2ec;
    --paper: #fbfaf6;
    --superficie: #ffffff;
    --bordo: #ececec;
    --bordo-caldo: #e7e2d6;
    --testo: #1c1c1a;
    --muted: #5B564C;
    --r-sm: 8px;
    --r-md: 10px;
    --r-lg: 14px;
    --r-card: 18px;
    --r-pill: 999px;
    --gutter: 20px;
    --max: 1120px;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
    margin: 0;
    font-family: 'Instrument Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 17px; line-height: 1.6; color: var(--testo); background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--brand); text-decoration-thickness: 1px; text-underline-offset: 2px; }

h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 .6em; font-weight: 600; }
h1 { font-size: clamp(2rem, 7vw, 3.5rem); }
h2 { font-size: clamp(1.6rem, 5vw, 2.5rem); }
h3 { font-size: clamp(1.1rem, 3vw, 1.35rem); }
p { margin: 0 0 1em; }

.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.sezione { padding-block: clamp(3.5rem, 9vw, 6.5rem); }
.occhiello {
    font-size: .8rem; font-weight: 600; letter-spacing: .09em; text-transform: uppercase;
    color: var(--azione-scuro); margin: 0 0 .8rem;
}
.sopratitolo { font-size: clamp(1.05rem, 2.6vw, 1.3rem); color: var(--muted); max-width: 60ch; }
.salta {
    position: absolute; left: -9999px; top: 0; background: var(--superficie); color: var(--brand);
    padding: .7rem 1rem; z-index: 100; border-radius: var(--r-sm);
}
.salta:focus { left: 1rem; top: 1rem; }

/* ── Barra di navigazione ─────────────────────────────────────────────────── */
.topbar {
    background: var(--quadro); position: sticky; top: 0; z-index: 40;
    border-bottom: 1px solid rgba(255, 255, 255, .10);
}
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 62px; }
.topbar .logo img { height: 26px; width: auto; }
.topbar nav { display: none; gap: 1.6rem; }
.topbar nav a { color: rgba(255, 255, 255, .82); text-decoration: none; font-size: .95rem; font-weight: 500; }
.topbar nav a:hover { color: #fff; }
@media (min-width: 860px) { .topbar nav { display: flex; } }

/* ── Bottoni ──────────────────────────────────────────────────────────────── */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
    min-height: 52px; padding: .85rem 1.6rem; border-radius: var(--r-pill);
    font-size: 1.02rem; font-weight: 600; text-decoration: none; border: 1px solid transparent;
    cursor: pointer; transition: background-color .15s ease, border-color .15s ease;
}
.btn-primario { background: var(--azione); color: #fff; }
.btn-primario:hover { background: var(--azione-scuro); }
.btn-fantasma { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .32); }
.btn-fantasma:hover { border-color: #fff; background: rgba(255, 255, 255, .07); }
.btn-scuro { background: var(--brand); color: #fff; }
.btn-scuro:hover { background: var(--brand-scuro); }
.azioni { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 2rem; }

/* ── Hero ─────────────────────────────────────────────────────────────────── */
.hero { background: var(--quadro); color: #fff; padding-block: clamp(3rem, 8vw, 5.5rem); }
.hero h1 { color: #fff; max-width: 16ch; }
.hero .sopratitolo { color: rgba(255, 255, 255, .78); max-width: 54ch; font-size: clamp(1.05rem, 2.6vw, 1.25rem); }
.hero-griglia { display: grid; gap: clamp(2.2rem, 5vw, 3.4rem); align-items: center; }
@media (min-width: 900px) {
    .hero-griglia { grid-template-columns: 1.15fr .85fr; }
    .hero-griglia .striscia-fiducia { grid-column: 1 / -1; }
}

/* Il semaforo: il quadro che fa da protagonista visivo */
.quadro-semaforo {
    background: linear-gradient(160deg, #16324F 0%, #0f2438 100%);
    border: 1px solid rgba(255, 255, 255, .12); border-radius: var(--r-card);
    padding: 1.6rem 1.4rem; box-shadow: 0 22px 50px rgba(0, 0, 0, .35);
}
.quadro-semaforo .etichetta {
    font-size: .78rem; letter-spacing: .09em; text-transform: uppercase;
    color: rgba(255, 255, 255, .62); margin-bottom: 1.1rem; font-weight: 600;
}
.numeroni { display: grid; grid-template-columns: repeat(3, 1fr); gap: .8rem; }
.numerone .cifra { font-size: clamp(2.4rem, 9vw, 3.4rem); font-weight: 600; line-height: 1; letter-spacing: -.03em; }
.numerone .voce { font-size: .82rem; color: rgba(255, 255, 255, .72); margin-top: .35rem; line-height: 1.3; }
.numerone.rosso .cifra { color: var(--sem-rosso-vivo); }
.numerone.giallo .cifra { color: var(--sem-giallo-vivo); }
.numerone.verde .cifra { color: var(--sem-verde-vivo); }
.riga-accusa {
    margin-top: 1.3rem; padding-top: 1.1rem; border-top: 1px solid rgba(255, 255, 255, .12);
    font-size: .95rem; color: rgba(255, 255, 255, .88); line-height: 1.45;
}
.riga-accusa b { color: #fff; }

.striscia-fiducia {
    display: flex; flex-wrap: wrap; gap: .6rem 1.6rem; margin-top: 2.4rem;
    padding-top: 1.6rem; border-top: 1px solid rgba(255, 255, 255, .13);
    font-size: .92rem; color: rgba(255, 255, 255, .76);
}
.striscia-fiducia span { display: inline-flex; align-items: center; gap: .45rem; }
.striscia-fiducia .spunta { color: var(--sem-verde-vivo); font-weight: 600; }

/* ── Sezioni chiare / carte ───────────────────────────────────────────────── */
.chiaro { background: var(--bg); }
.carta-chiara { background: var(--paper); }
.scuro { background: var(--quadro); color: #fff; }
.scuro h2 { color: #fff; }
.scuro .sopratitolo { color: rgba(255, 255, 255, .75); }

.carte { display: grid; gap: 1.2rem; margin-top: 2.5rem; }
@media (min-width: 760px) { .carte-3 { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 760px) { .carte-2 { grid-template-columns: repeat(2, 1fr); } }
.carta {
    background: var(--superficie); border: 1px solid var(--bordo); border-radius: var(--r-card);
    padding: 1.5rem;
}
.carta h3 { margin-bottom: .5rem; }
.carta p:last-child { margin-bottom: 0; }
.carta .numero {
    display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px;
    border-radius: var(--r-pill); background: var(--brand-tinta); color: var(--brand);
    font-weight: 600; font-size: 1rem; margin-bottom: .9rem;
}

/* Conseguenze (il problema) */
.conseguenze { list-style: none; margin: 2rem 0 0; padding: 0; display: grid; gap: .9rem; }
.conseguenza {
    background: var(--superficie); border: 1px solid var(--bordo); border-left: 4px solid var(--sem-rosso);
    border-radius: var(--r-md); padding: 1.1rem 1.3rem;
}
.conseguenza b { display: block; margin-bottom: .15rem; }
.conseguenza span { color: var(--muted); font-size: .96rem; }

/* ── Il cancello: chi vede cosa ───────────────────────────────────────────── */
.perimetri { display: grid; gap: 1rem; margin-top: 2.5rem; }
@media (min-width: 820px) { .perimetri { grid-template-columns: repeat(3, 1fr); } }
.perimetro {
    background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .14);
    border-radius: var(--r-card); padding: 1.4rem;
}
.perimetro h3 { font-size: 1.08rem; margin-bottom: .9rem; color: #fff; }
.perimetro ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .55rem; }
.perimetro li { font-size: .95rem; color: rgba(255, 255, 255, .82); display: flex; gap: .55rem; align-items: flex-start; line-height: 1.45; }
.perimetro li .si { color: var(--sem-verde-vivo); font-weight: 600; flex-shrink: 0; }
.perimetro li .no { color: rgba(255, 255, 255, .38); font-weight: 600; flex-shrink: 0; }
.perimetro li.negato { color: rgba(255, 255, 255, .45); }

.nota-muro {
    margin-top: 2rem; padding: 1.3rem 1.5rem; border-radius: var(--r-card);
    background: rgba(217, 119, 6, .13); border: 1px solid rgba(217, 119, 6, .35);
    font-size: 1rem; color: rgba(255, 255, 255, .92); line-height: 1.55;
}
.nota-muro b { color: #fff; }

/* ── Schermate del telefono ───────────────────────────────────────────────── */
/* Mobile: carosello a scorrimento — impilare quattro telefoni allungherebbe
   la pagina di 3.000px. Da 760px in su tornano una griglia affiancata. */
.telefoni {
    display: flex; gap: 1.2rem; margin-top: 2.5rem;
    overflow-x: auto; scroll-snap-type: x mandatory;
    padding-bottom: 1rem; margin-inline: calc(var(--gutter) * -1);
    padding-inline: var(--gutter);
    scrollbar-width: thin;
}
.telefoni > .telefono { flex: 0 0 74%; scroll-snap-align: center; }
@media (min-width: 760px) {
    .telefoni {
        display: grid; gap: 2rem; margin-top: 3rem; overflow: visible;
        grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
        margin-inline: 0; padding-inline: 0; padding-bottom: 0;
    }
    .telefoni > .telefono { flex: initial; }
}
.scorri-nota {
    margin-top: .3rem; font-size: .88rem; color: var(--muted);
    display: flex; align-items: center; gap: .4rem;
}
@media (min-width: 760px) { .scorri-nota { display: none; } }
.telefono figure { margin: 0; }
.telefono .schermo {
    border-radius: 30px; border: 9px solid #10161c; background: #10161c; overflow: hidden;
    box-shadow: 0 18px 40px rgba(15, 27, 38, .22);
}
.telefono .schermo img { width: 100%; display: block; border-radius: 21px; }
.telefono figcaption { margin-top: 1rem; font-size: .96rem; color: var(--muted); line-height: 1.5; }
.telefono figcaption b { color: var(--testo); display: block; margin-bottom: .15rem; }

/* ── Elenco «cosa non facciamo» ───────────────────────────────────────────── */
.no-lista { list-style: none; margin: 2rem 0 0; padding: 0; display: grid; gap: .8rem; }
@media (min-width: 760px) { .no-lista { grid-template-columns: repeat(2, 1fr); } }
.no-lista li {
    background: var(--superficie); border: 1px solid var(--bordo); border-radius: var(--r-md);
    padding: 1rem 1.2rem; display: flex; gap: .7rem; align-items: flex-start; font-size: .98rem;
}
.no-lista .segno { color: var(--muted); font-weight: 600; flex-shrink: 0; }

/* ── Fiducia ──────────────────────────────────────────────────────────────── */
.fiducia { display: grid; gap: 1.2rem; margin-top: 2.5rem; }
@media (min-width: 760px) { .fiducia { grid-template-columns: repeat(2, 1fr); } }
.punto-fiducia {
    background: var(--carta, var(--superficie)); border: 1px solid var(--bordo-caldo);
    border-radius: var(--r-card); padding: 1.4rem;
}
.punto-fiducia h3 { font-size: 1.08rem; margin-bottom: .4rem; }
.punto-fiducia p { margin: 0; color: var(--muted); font-size: .98rem; }

/* ── FAQ ──────────────────────────────────────────────────────────────────── */
.faq { margin-top: 2.5rem; display: grid; gap: .8rem; }
.faq details {
    background: var(--superficie); border: 1px solid var(--bordo); border-radius: var(--r-md);
    padding: 1.1rem 1.3rem;
}
.faq summary {
    cursor: pointer; font-weight: 600; font-size: 1.05rem; list-style: none;
    display: flex; justify-content: space-between; align-items: center; gap: 1rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; font-size: 1.5rem; color: var(--azione-scuro); font-weight: 400; line-height: 1; flex-shrink: 0; }
.faq details[open] summary::after { content: '−'; }
.faq details p { margin: .9rem 0 0; color: var(--muted); }
.faq details p:last-child { margin-bottom: 0; }

/* ── Chiusura + contatti ──────────────────────────────────────────────────── */
.chiusura { text-align: center; }
.chiusura h2 { max-width: 22ch; margin-inline: auto; }
.chiusura .sopratitolo { margin-inline: auto; }
.chiusura .azioni { justify-content: center; }
.contatto-diretto { margin-top: 2rem; font-size: 1.05rem; color: rgba(255, 255, 255, .82); }
.contatto-diretto a { color: #fff; font-weight: 600; }

/* ── Footer ───────────────────────────────────────────────────────────────── */
.footer { background: var(--brand-scuro); color: rgba(255, 255, 255, .68); padding-block: 2.5rem; font-size: .92rem; }
.footer .wrap { display: flex; flex-wrap: wrap; gap: 1.2rem; justify-content: space-between; align-items: center; }
.footer a { color: rgba(255, 255, 255, .82); }
.footer .dati { line-height: 1.7; }
.footer .legami { display: flex; flex-wrap: wrap; gap: 1.2rem; }

/* ── Pagine di testo (privacy, cookie) ────────────────────────────────────── */
.testo { max-width: 74ch; }
.testo h2 { font-size: clamp(1.3rem, 3.4vw, 1.7rem); margin-top: 2.5rem; }
.testo h2:first-of-type { margin-top: 1rem; }
.testo ul { padding-left: 1.3rem; }
.testo li { margin-bottom: .5rem; }
.aggiornato { color: var(--muted); font-size: .92rem; }
