/* Stesso aspetto dell'app: Inter, serif per i titoli, un solo colore (il bordeaux), tema scuro automatico. */
@font-face { font-family: 'Inter Variable'; font-weight: 100 900; font-display: swap; src: url('../fonts/inter-latin-wght-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Inter Variable'; font-weight: 100 900; font-display: swap; src: url('../fonts/inter-latin-ext-wght-normal.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Source Serif 4 Variable'; font-weight: 200 900; font-display: swap; src: url('../fonts/source-serif-4-latin-wght-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Source Serif 4 Variable'; font-weight: 200 900; font-display: swap; src: url('../fonts/source-serif-4-latin-ext-wght-normal.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --bg: #f4f5f7; --card: #ffffff; --ink: #1b2330; --muted: #5b6574; --line: #dde1e7;
  --accent: #7a1f2b; --accent-ink: #ffffff; --ok: #1f7a3d; --warn: #a15c00;
  --fondo-alt: #ffffff; --raggio: 12px; --ombra: 0 1px 2px rgba(16, 24, 40, .06), 0 8px 24px rgba(16, 24, 40, .06);
  --margine: clamp(16px, 4vw, 40px); --larghezza: 1120px; --larghezza-testo: 680px;
  --font-titoli: 'Source Serif 4 Variable', Georgia, 'Times New Roman', serif;
  --font: 'Inter Variable', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #12151a; --card: #1b2028; --ink: #e8ebf0; --muted: #9aa3b0; --line: #2d343f;
    --accent: #da767b; --accent-ink: #12151a; --ok: #6fc28a; --warn: #e0a64a;
    --fondo-alt: #171b21; --ombra: none; color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font: 17px/1.6 var(--font); -webkit-font-smoothing: antialiased; background: var(--bg); color: var(--ink); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-underline-offset: 3px; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -.01em; margin: 0; }
h1, h2 { font-family: var(--font-titoli); font-weight: 600; }
h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
h2 { font-size: clamp(1.5rem, 3.2vw, 2.1rem); }
h3 { font-size: 1.1rem; font-weight: 600; }
p { margin: 0; }
.muted { color: var(--muted); }
.contenitore { width: 100%; max-width: calc(var(--larghezza) + 2 * var(--margine)); margin: 0 auto; padding: 0 var(--margine); }
.testo { max-width: var(--larghezza-testo); }
.salta { position: absolute; left: -999px; top: 8px; background: var(--card); padding: 8px 12px; border-radius: 6px; z-index: 100; }
.salta:focus { left: 8px; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 55%, transparent); outline-offset: 2px; border-radius: 4px; }

/* ---------- testata ---------- */
.testata { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.testata .contenitore { display: flex; align-items: center; gap: 20px; min-height: 64px; }
.marchio { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 700; font-size: 1.15rem; letter-spacing: -.01em; }
.marchio img { width: 36px; height: 36px; border-radius: 9px; }
.navigazione { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.navigazione a { padding: 8px 12px; border-radius: 8px; color: var(--muted); text-decoration: none; font-size: .95rem; font-weight: 500; }
.navigazione a:hover { color: var(--ink); background: color-mix(in srgb, var(--ink) 6%, transparent); }
.navigazione a[aria-current='page'] { color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, transparent); font-weight: 600; }
.menu-telefono { display: none; margin-left: auto; position: relative; }
.menu-telefono summary { list-style: none; cursor: pointer; min-height: 44px; min-width: 44px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 10px; background: var(--card); font-weight: 600; font-size: .95rem; padding: 0 14px; }
.menu-telefono summary::-webkit-details-marker { display: none; }
.menu-telefono nav { position: absolute; right: 0; top: calc(100% + 8px); width: min(300px, calc(100vw - 32px)); display: grid; padding: 6px; background: var(--card); border: 1px solid var(--line); border-radius: var(--raggio); box-shadow: var(--ombra); }
.menu-telefono nav a { padding: 12px; border-radius: 8px; color: var(--ink); text-decoration: none; min-height: 44px; }
.menu-telefono nav a[aria-current='page'] { color: var(--accent); font-weight: 600; }
@media (max-width: 960px) { .navigazione { display: none; } .menu-telefono { display: block; } }

/* ---------- pulsanti ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 20px; border-radius: 10px; border: 1px solid var(--accent); background: var(--accent); color: var(--accent-ink); font: inherit; font-weight: 600; font-size: .98rem; text-decoration: none; cursor: pointer; }
.btn:hover { filter: brightness(1.08); }
.btn.secondario { background: transparent; color: var(--accent); }
.btn.secondario:hover { background: color-mix(in srgb, var(--accent) 8%, transparent); filter: none; }
.btn.piccolo { min-height: 40px; padding: 0 14px; font-size: .92rem; }
.azioni { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

/* ---------- sezioni ---------- */
section { padding: clamp(48px, 8vw, 88px) 0; }
section.alt { background: var(--fondo-alt); border-block: 1px solid var(--line); }
.intro { display: grid; gap: 14px; margin-bottom: clamp(28px, 5vw, 48px); }
.intro p { color: var(--muted); max-width: var(--larghezza-testo); font-size: 1.08rem; }
.occhiello { font-size: .78rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--accent); }

/* ---------- prima pagina ---------- */
.eroe { padding: clamp(40px, 7vw, 80px) 0 clamp(32px, 5vw, 56px); }
.eroe .contenitore { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: clamp(28px, 5vw, 64px); align-items: center; }
.eroe h1 { margin: 12px 0 18px; }
.eroe .sottotitolo { font-size: 1.18rem; color: var(--muted); max-width: 34em; }
.nota-demo { margin-top: 14px; font-size: .9rem; color: var(--muted); }
@media (max-width: 860px) { .eroe .contenitore { grid-template-columns: 1fr; } }

.schermata { border: 1px solid var(--line); border-radius: var(--raggio); overflow: hidden; background: var(--card); box-shadow: var(--ombra); }
.schermata img { width: 100%; }
.schermata figcaption { padding: 10px 14px; border-top: 1px solid var(--line); font-size: .88rem; color: var(--muted); }
figure { margin: 0; }
.telefoni { display: flex; gap: 16px; justify-content: center; align-items: flex-start; }
.telefoni figure { flex: 0 1 240px; }
.telefoni .schermata { border-radius: 22px; border-width: 2px; }

.griglia { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.scheda { display: grid; gap: 8px; align-content: start; padding: 22px; background: var(--card); border: 1px solid var(--line); border-radius: var(--raggio); }
.scheda p { color: var(--muted); font-size: .97rem; }
.scheda .icona { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 10px; background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--accent); margin-bottom: 4px; }
.scheda svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
a.scheda { color: inherit; text-decoration: none; }
a.scheda:hover { border-color: color-mix(in srgb, var(--accent) 50%, var(--line)); }
.numeri { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); }
.numeri b { display: block; font-family: var(--font-titoli); font-size: 2.2rem; line-height: 1.1; color: var(--accent); }
.numeri span { color: var(--muted); font-size: .95rem; }

/* ---------- funzioni: testo e schermata affiancati ---------- */
.funzione { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: clamp(24px, 5vw, 56px); align-items: center; padding: clamp(32px, 5vw, 56px) 0; border-top: 1px solid var(--line); }
.funzione:first-of-type { border-top: 0; padding-top: 0; }
.funzione:nth-of-type(even) .funzione-testo { order: 2; }
.funzione-testo { display: grid; gap: 14px; }
.funzione-testo p { color: var(--muted); }
.elenco { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.elenco li { position: relative; padding-left: 26px; }
.elenco li::before { content: ''; position: absolute; left: 4px; top: .5em; width: 7px; height: 11px; border: solid var(--accent); border-width: 0 2px 2px 0; transform: translateY(-30%) rotate(40deg); }
@media (max-width: 860px) { .funzione { grid-template-columns: 1fr; } .funzione:nth-of-type(even) .funzione-testo { order: 0; } }
.indice { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.indice a { padding: 6px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); color: var(--ink); text-decoration: none; font-size: .92rem; }
.indice a:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- tabelle e liste ---------- */
.tabella { width: 100%; border-collapse: collapse; background: var(--card); border: 1px solid var(--line); border-radius: var(--raggio); overflow: hidden; font-size: .97rem; }
.tabella th, .tabella td { padding: 12px 16px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.tabella th { background: color-mix(in srgb, var(--ink) 4%, var(--card)); font-weight: 600; }
.tabella tr:last-child td { border-bottom: 0; }
.scorri { overflow-x: auto; border-radius: var(--raggio); }
.scorri .tabella { min-width: 560px; }
.stato { display: inline-block; padding: 1px 10px; border-radius: 999px; font-size: .8rem; font-weight: 600; white-space: nowrap; }
.stato.si { background: color-mix(in srgb, var(--ok) 14%, transparent); color: var(--ok); }
.stato.presto { background: color-mix(in srgb, var(--warn) 16%, transparent); color: var(--warn); }
.avviso { padding: 16px 18px; border: 1px solid color-mix(in srgb, var(--warn) 40%, var(--line)); border-left-width: 4px; border-radius: 10px; background: color-mix(in srgb, var(--warn) 8%, var(--card)); }
.avviso b { display: block; margin-bottom: 2px; }
.passi { counter-reset: passo; display: grid; gap: 14px; margin: 0; padding: 0; list-style: none; }
.passi li { counter-increment: passo; position: relative; padding-left: 48px; }
.passi li::before { content: counter(passo); position: absolute; left: 0; top: 0; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font-weight: 700; font-size: .95rem; }
.passi b { display: block; }

/* ---------- invito finale e piede ---------- */
.invito { text-align: center; }
.invito .contenitore { display: grid; gap: 14px; justify-items: center; }
.invito p { color: var(--muted); max-width: 36em; }
.invito .azioni { justify-content: center; }
.piede { padding: 36px 0 48px; border-top: 1px solid var(--line); color: var(--muted); font-size: .92rem; }
.piede .contenitore { display: flex; flex-wrap: wrap; gap: 12px 32px; justify-content: space-between; }
.piede nav { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.piede a { color: var(--muted); }
.piede a:hover { color: var(--accent); }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* pulsante «Prova la demo» dentro i menu: vince sullo stile dei link del menu */
.navigazione a.btn, .menu-telefono nav a.btn { background: var(--accent); color: var(--accent-ink); font-weight: 600; margin-left: 8px; }
.navigazione a.btn:hover { background: var(--accent); filter: brightness(1.08); }
.menu-telefono nav a.btn { margin: 6px 0 0; justify-content: center; }
