/* ==========================================================================
   Bannati per errore — stylesheet mobile-first
   Palette indaco/neutri, zero dipendenze, veloce.
   ========================================================================== */

:root {
  --bg: #ffffff;
  --bg-alt: #f5f6fb;
  --ink: #16181f;
  --ink-soft: #4b5060;
  --line: #e5e7f0;
  --brand: #4f46e5;
  --brand-d: #3f38c4;
  --brand-t: #eef0ff;
  --danger: #dc2626;
  --ok: #059669;
  --radius: 14px;
  --radius-s: 10px;
  --shadow: 0 1px 2px rgba(16,18,31,.06), 0 8px 24px rgba(16,18,31,.06);
  --wrap: 1080px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 { line-height: 1.2; letter-spacing: -.01em; margin: 0 0 .5em; }
h1 { font-size: clamp(1.9rem, 6vw, 3.1rem); font-weight: 800; }
h2 { font-size: clamp(1.5rem, 4.5vw, 2.2rem); font-weight: 750; }
h3 { font-size: 1.15rem; font-weight: 700; }
p { margin: 0 0 1em; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: 20px; }
.narrow { max-width: 720px; }

.skip {
  position: absolute; left: -999px; top: 0;
  background: var(--brand); color: #fff; padding: 10px 16px; border-radius: 0 0 var(--radius-s) 0; z-index: 100;
}
.skip:focus { left: 0; }

/* ---- Header ---- */
.site-head {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.8);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.head-in { display: flex; align-items: center; justify-content: space-between; min-height: 64px; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; color: var(--ink); letter-spacing: -.01em; }
.brand:hover { text-decoration: none; }
.brand-badge {
  display: inline-grid; place-items: center; width: 38px; height: 38px; flex: none;
  border-radius: 11px; color: #fff;
  background: linear-gradient(145deg, var(--brand), #6d64ff);
  box-shadow: 0 4px 12px rgba(79,70,229,.35);
}
.brand-txt { font-size: 1.02rem; }
.nav { display: flex; align-items: center; gap: 8px; }
.nav > a { display: none; color: var(--ink-soft); font-size: .93rem; font-weight: 600; padding: 8px 10px; border-radius: 8px; }
.nav > a:hover { color: var(--brand); background: var(--brand-t); text-decoration: none; }
.head-cta { display: none; }

/* ---- Lang switch ---- */
.lang-switch { display: inline-flex; gap: 2px; border: 1px solid var(--line); border-radius: 999px; padding: 3px; margin-left: 4px; }
.lang-switch a { font-size: .78rem; font-weight: 700; color: var(--ink-soft); padding: 4px 10px; border-radius: 999px; line-height: 1; }
.lang-switch a:hover { text-decoration: none; color: var(--brand); }
.lang-switch a.on { background: var(--brand); color: #fff; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font: inherit; font-weight: 700; cursor: pointer;
  padding: 13px 22px; border-radius: 999px; border: 1px solid transparent;
  transition: transform .08s ease, background .15s ease, box-shadow .15s ease;
  text-align: center;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brand); color: #fff; box-shadow: var(--shadow); }
.btn-primary:hover { background: var(--brand-d); }
.btn-ghost { background: transparent; color: var(--brand); border-color: var(--line); }
.btn-ghost:hover { background: var(--brand-t); }
.btn-sm { padding: 9px 16px; font-size: .9rem; }

/* ---- Hero ---- */
.hero {
  padding: 54px 0 44px;
  background:
    radial-gradient(1200px 400px at 100% -10%, var(--brand-t), transparent 60%),
    linear-gradient(180deg, #fff, var(--bg-alt));
}
.eyebrow {
  text-transform: uppercase; letter-spacing: .08em; font-size: .78rem;
  font-weight: 700; color: var(--brand); margin: 0 0 12px;
}
.hero h1 { margin-bottom: .4em; }
.hl { color: var(--brand); }
.lead { font-size: clamp(1.05rem, 2.6vw, 1.25rem); color: var(--ink-soft); max-width: 640px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin: 26px 0 30px; }
.hero-cta .btn { flex: 1 1 auto; min-width: 180px; }

.counter {
  margin: 0; padding: 18px 20px; border: 1px solid var(--line);
  border-radius: var(--radius); background: #fff; box-shadow: var(--shadow);
  display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
}
.counter dt { color: var(--ink-soft); font-size: .95rem; margin: 0; }
.counter dd { margin: 0; font-size: 2rem; font-weight: 800; color: var(--brand); font-variant-numeric: tabular-nums; }

/* ---- Sections ---- */
.sec { padding: 48px 0; }
.sec-alt { background: var(--bg-alt); border-block: 1px solid var(--line); }
.sec-intro { color: var(--ink-soft); max-width: 680px; margin-bottom: 26px; }

blockquote {
  margin: 24px 0; padding: 18px 22px; border-left: 4px solid var(--brand);
  background: var(--brand-t); border-radius: 0 var(--radius-s) var(--radius-s) 0;
}
blockquote p { margin: 0; }

/* ---- Cards ---- */
.cards { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow);
}
.card h3 { color: var(--ink); }
.card p { margin: 0; color: var(--ink-soft); }
.sources { font-size: .9rem; color: var(--ink-soft); margin-top: 22px; }

/* ---- Steps ---- */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; counter-reset: s; }
.step {
  display: flex; gap: 16px; background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow);
}
.step-n {
  flex: none; width: 38px; height: 38px; border-radius: 50%;
  background: var(--brand); color: #fff; font-weight: 800;
  display: grid; place-items: center;
}
.step h3 { margin-bottom: .3em; }
.step p { margin: 0 0 .6em; color: var(--ink-soft); }
.link { font-weight: 700; }
.note {
  margin-top: 22px; padding: 16px 18px; background: #fff;
  border: 1px dashed var(--line); border-radius: var(--radius-s); color: var(--ink-soft);
}

/* ---- Form ---- */
.form { display: grid; gap: 16px; }
.grid2 { display: grid; gap: 16px; }
.field { display: grid; gap: 6px; }
.field > span { font-size: .9rem; font-weight: 600; }
.field em { color: var(--ink-soft); font-style: normal; font-weight: 400; }
.field input, .field textarea {
  font: inherit; color: var(--ink);
  padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-s);
  background: #fff; width: 100%; resize: vertical;
}
.field input:focus, .field textarea:focus {
  outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-t);
}
.counter-txt { color: var(--ink-soft); font-size: .8rem; justify-self: end; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-msg { margin: 0; font-weight: 600; min-height: 1.2em; }
.form-msg.ok { color: var(--ok); }
.form-msg.err { color: var(--danger); }
.privacy-note { font-size: .82rem; color: var(--ink-soft); margin: 0; }

/* ---- Share ---- */
.share-row { display: flex; flex-wrap: wrap; gap: 12px; }
.sh {
  display: inline-flex; align-items: center; gap: 9px;
  font: inherit; font-weight: 700; font-size: .95rem; cursor: pointer;
  color: #fff; border: 0; border-radius: 999px; padding: 12px 18px;
  background: #555; box-shadow: var(--shadow);
  transition: transform .12s ease, filter .15s ease, box-shadow .15s ease;
  flex: 1 1 auto; justify-content: center; min-width: 130px;
}
.sh:hover { text-decoration: none; transform: translateY(-2px); filter: brightness(1.05); box-shadow: 0 6px 18px rgba(16,18,31,.16); }
.sh:active { transform: translateY(0); }
.sh svg { flex: none; }
.sh-wa { background: #25d366; }
.sh-tg { background: #29a9eb; }
.sh-x  { background: #14171a; }
.sh-rd { background: #ff4500; }
.sh-fb { background: #1877f2; }
.sh-copy { background: var(--brand); }
.sh-copy.done { background: var(--ok); }

/* ---- Testimonials ---- */
.testi { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.testi-item {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; box-shadow: var(--shadow);
}
.testi-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.testi-name { font-weight: 700; }
.testi-meta { font-size: .82rem; color: var(--ink-soft); }
.testi-item p { margin: 0; white-space: pre-line; }
.testi-empty { color: var(--ink-soft); }

/* ---- FAQ ---- */
.faq { display: grid; gap: 10px; }
.faq details {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-s); padding: 4px 18px;
}
.faq summary {
  cursor: pointer; font-weight: 700; padding: 14px 0; list-style: none;
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; font-weight: 700; color: var(--brand); font-size: 1.4rem; line-height: 1;
}
.faq details[open] summary::after { content: "\2212"; }
.faq details p { margin: 0 0 14px; color: var(--ink-soft); }

/* ---- Admin ---- */
.adm-actions { display: flex; gap: 10px; margin-top: 14px; }
.adm-actions form { margin: 0; }
.adm-actions .btn { padding: 9px 16px; font-size: .9rem; }
.btn-danger { color: var(--danger); border-color: var(--line); }
.btn-danger:hover { background: #fde8e8; }
.adm-badge {
  display: inline-block; min-width: 26px; text-align: center; font-size: .95rem;
  background: var(--brand); color: #fff; border-radius: 999px; padding: 2px 9px; vertical-align: middle;
}
.adm-badge-ok { background: var(--ok); }

/* ---- Footer ---- */
.site-foot { background: #14161f; color: #c7cad6; padding: 44px 0 24px; margin-top: 8px; }
.foot-grid { display: grid; gap: 30px; }
.foot-brand .brand { color: #fff; }
.foot-tag { margin: 14px 0 0; font-size: .92rem; color: #9aa0b4; max-width: 34ch; line-height: 1.55; }
.foot-col { display: flex; flex-direction: column; gap: 10px; }
.foot-col h3 {
  margin: 0 0 4px; font-size: .78rem; text-transform: uppercase; letter-spacing: .08em;
  color: #7c8296; font-weight: 700;
}
.foot-col a { color: #c7cad6; font-size: .93rem; font-weight: 500; width: max-content; }
.foot-col a:hover { color: #fff; text-decoration: none; }
.foot-bottom {
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px;
  margin-top: 34px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.08);
}
.foot-bottom p { margin: 0; font-size: .82rem; color: #7c8296; }
.foot-bottom .foot-upd { color: #6a7086; }
/* Footer pagine legali (privacy.php) */
.foot-in { padding-top: 8px; }
.foot-back { color: #c7cad6; font-weight: 700; }
.foot-back:hover { color: #fff; }

/* ==== Tablet+ ==== */
@media (min-width: 640px) {
  .grid2 { grid-template-columns: 1fr 1fr; }
  .cards { grid-template-columns: 1fr 1fr; }
  .hero-cta .btn { flex: 0 0 auto; }
  .head-cta { display: inline-flex; }
  .foot-grid { grid-template-columns: 1.6fr 1fr 1fr; gap: 40px; }
}

/* ==== Desktop ==== */
@media (min-width: 900px) {
  .nav > a { display: inline-block; }
  .nav { gap: 6px; }
  .head-cta { margin-left: 8px; }
  .sec { padding: 68px 0; }
  .hero { padding: 80px 0 64px; }
  .cards { grid-template-columns: repeat(4, 1fr); }
  .testi { grid-template-columns: 1fr 1fr; }
  .site-foot { padding: 56px 0 26px; }
}

/* ---- Icone coerenti ---- */
.ic { display: inline-block; vertical-align: middle; }
.ic-inline { width: 15px; height: 15px; vertical-align: -2px; opacity: .8; }
.h2-ic, .step-ic { display: inline-grid; place-items: center; color: var(--brand); }
h2 .h2-ic { margin-right: 10px; vertical-align: -4px; }
.card-ic {
  display: inline-grid; place-items: center; width: 46px; height: 46px;
  border-radius: 12px; background: var(--brand-t); color: var(--brand); margin-bottom: 14px;
}
.step h3 { display: flex; align-items: center; gap: 9px; }
.step-ic { color: var(--brand); }

/* ---- Consenso GDPR ---- */
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: .9rem; color: var(--ink-soft); }
.consent input { margin-top: 3px; width: 18px; height: 18px; accent-color: var(--brand); flex: none; }
.consent a { font-weight: 600; }

/* ---- Cookie notice ---- */
.cookie {
  position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 80;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: 0 8px 30px rgba(16,18,31,.18);
}
.cookie-in { display: flex; align-items: center; gap: 14px; padding: 16px 18px; flex-wrap: wrap; }
.cookie-ic { color: var(--brand); flex: none; display: inline-grid; place-items: center; }
.cookie p { margin: 0; font-size: .9rem; color: var(--ink-soft); flex: 1 1 240px; }
.cookie .btn { padding: 10px 20px; white-space: nowrap; }

/* ---- Footer link + pagine legali ---- */
.foot-links { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.foot-links a { color: #cfd2dc; font-weight: 600; }
.foot-links a:hover { color: #fff; }
.foot-back { color: #cfd2dc; font-weight: 700; }
.legal h1 { margin-bottom: .3em; }
.legal-sec { margin: 26px 0; }
.legal-sec h2 { font-size: 1.25rem; display: flex; align-items: center; gap: 12px; }
.legal-n {
  flex: none; width: 30px; height: 30px; border-radius: 8px;
  background: var(--brand-t); color: var(--brand); font-size: .95rem; font-weight: 800;
  display: grid; place-items: center;
}
.legal-sec ul { margin: 0 0 1em; padding-left: 20px; }
.legal-sec li { margin-bottom: 6px; color: var(--ink-soft); }
.legal-sec p { color: var(--ink-soft); }

/* ==== Motion prefs ==== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .sh, .card, .step { transition: none; }
}
