/* Landing pubblica di installazione della PWA (/installa).
   Non riusa app.css: quello e' tarato sul guscio dell'app (header fisso, bottom-nav,
   safe-area) e qui porterebbe solo regole inutili su una pagina a se stante. */

:root {
    --s27-blu-notte: #072E41;
    --s27-blu: #2D6281;
    --s27-principale: #3A84A0;
    --gray-100: #f1f3f5;
    --gray-600: #868e96;
    --gray-800: #343a40;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    min-height: 100vh;
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    color: #fff;
    background: linear-gradient(160deg, var(--s27-blu-notte) 0%, var(--s27-blu) 55%, var(--s27-principale) 100%);
    background-attachment: fixed;
    padding: 2rem 1rem calc(2rem + env(safe-area-inset-bottom, 0px));
    display: flex;
    justify-content: center;
}

.wrap { width: 100%; max-width: 460px; }

.hidden { display: none !important; }

/* ── Intestazione ────────────────────────────────────────────────────────── */

.intro { text-align: center; margin-bottom: 1.75rem; }

.brand-logo { width: 148px; max-width: 60%; margin-bottom: 1.5rem; }

.intro h1 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 .6rem;
    line-height: 1.25;
}

.intro .lead {
    font-size: .95rem;
    line-height: 1.55;
    margin: 0;
    color: rgba(255, 255, 255, .82);
}

/* ── Pannello bianco ─────────────────────────────────────────────────────── */

.card-panel {
    background: #fff;
    color: var(--gray-800);
    border-radius: 18px;
    padding: 1.75rem 1.35rem;
    box-shadow: 0 18px 45px rgba(7, 46, 65, .28);
}

.card-panel h2 {
    font-size: 1.15rem;
    font-weight: 700;
    margin: 0 0 .5rem;
}

.card-panel p { font-size: .92rem; line-height: 1.5; }

.esito-icona {
    font-size: 2.6rem;
    line-height: 1;
    color: var(--s27-principale);
    margin-bottom: .75rem;
}

#stato-installata .esito-icona { color: #1D7A4C; }

.nota-sotto {
    font-size: .82rem;
    color: var(--gray-600);
    margin: .9rem 0 0;
}

/* Un <button> perche' non naviga da nessuna parte: cambia solo la sezione mostrata.
   Va vestito da link, altrimenti eredita l'aspetto di pulsante del browser. */
.link-inline {
    border: 0;
    background: none;
    padding: 0;
    font: inherit;
    color: var(--s27-blu);
    font-weight: 600;
    text-decoration: underline;
}

/* ── Pulsanti ────────────────────────────────────────────────────────────── */

.btn-brand {
    background: var(--s27-blu);
    border: 1px solid var(--s27-blu);
    color: #fff;
    font-weight: 600;
    padding: .7rem 1rem;
}

.btn-brand:hover, .btn-brand:focus {
    background: var(--s27-blu-notte);
    border-color: var(--s27-blu-notte);
    color: #fff;
}

.btn-outline-brand {
    border: 1px solid var(--s27-blu);
    color: var(--s27-blu);
    background: #fff;
    font-weight: 600;
}

.btn-outline-brand:hover, .btn-outline-brand:focus {
    background: var(--s27-blu);
    color: #fff;
}

/* ── Elenco passi ────────────────────────────────────────────────────────── */

.passi {
    list-style: none;
    margin: 1.25rem 0 0;
    padding: 0;
}

.passi li {
    display: flex;
    gap: .85rem;
    align-items: flex-start;
    font-size: .95rem;
    line-height: 1.5;
    padding: .7rem 0;
    border-top: 1px solid var(--gray-100);
}

.passi li:first-child { border-top: 0; padding-top: 0; }

.passo-num {
    flex: 0 0 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--s27-principale);
    color: #fff;
    font-size: .85rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ios-share, .menu-dots {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 6px;
    vertical-align: -.35rem;
    margin: 0 .1rem;
}

/* Il glifo Condividi di iOS: riprodotto in SVG e non con le icone da CDN, perche'
   e' il passaggio che l'utente deve riconoscere sullo schermo del telefono e non
   puo' sparire se la rete non consegna il font. */
.ios-share { background: #0a84ff; color: #fff; }

.menu-dots { background: var(--gray-100); color: var(--gray-800); }

/* ── Avviso e copia link ─────────────────────────────────────────────────── */

.avviso {
    display: flex;
    gap: .75rem;
    align-items: flex-start;
    background: #fff8e6;
    border: 1px solid #f2d894;
    border-radius: 10px;
    padding: .85rem 1rem;
    font-size: .9rem;
    line-height: 1.5;
}

.avviso i { color: #9C5522; font-size: 1.1rem; }

.copia-link { display: flex; gap: .5rem; margin-top: 1rem; }

.copia-link input {
    font-size: .82rem;
    background: var(--gray-100);
    border-color: #dee2e6;
}

.qr-box {
    display: flex;
    justify-content: center;
    padding: 1rem;
    background: #fff;
    border: 1px solid var(--gray-100);
    border-radius: 12px;
}

/* ── Pannello "Come si entra" ────────────────────────────────────────────── */

.panel-accesso {
    margin-top: 1.1rem;
    /* Ombra piu' leggera del pannello principale: e' la seconda cosa da leggere,
       prima si installa e poi si entra. */
    box-shadow: 0 10px 28px rgba(7, 46, 65, .18);
}

.panel-accesso h2 { display: flex; align-items: center; }

/* Il blu piu' scuro, non --s27-principale: quello su fondo bianco resta troppo
   chiaro e l'icona sparisce accanto al titolo in grassetto. */
.panel-accesso h2 i { color: var(--s27-blu); }

/* ── Chiusura ────────────────────────────────────────────────────────────── */

.link-app {
    display: block;
    text-align: center;
    margin-top: 1.5rem;
    color: rgba(255, 255, 255, .9);
    font-size: .92rem;
    font-weight: 600;
    text-decoration: none;
}

.link-app:hover { color: #fff; text-decoration: underline; }

.pie {
    margin-top: 1.5rem;
    text-align: center;
    font-size: .8rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, .65);
}

.pie p { margin: 0; }
