/* ==========================================================================
   DOORSTEPMEDIA.IT — PROFESSIONAL CIVIC PLATFORM & DESIGN SYSTEM
   Clean, institutional, mobile-first. No gimmicks.
   ========================================================================== */

:root {
  /* Sfondo leggermente freddo, con un'ombra di verde-azzurro: fa risaltare
     il blu petrolio senza entrare in competizione con lui. */
  --bg: #f4f7f8;
  --bg-white: #ffffff;
  --bg-subtle: #eef3f4;

  /* Blu petrolio */
  --primary: #0e5c6b;
  --primary-hover: #0a454f;
  --primary-50: #f0f7f9;
  --primary-100: #d3e9ee;
  --primary-200: #a3cfd8;

  --green: #059669;
  --green-50: #ecfdf5;
  --green-100: #d1fae5;
  --cyan: #0284c7;
  --cyan-50: #f0f9ff;
  --amber: #d97706;
  --amber-50: #fffbeb;
  --amber-200: #fde68a;
  --red: #dc2626;
  --red-50: #fef2f2;
  --indigo: #4f46e5;
  --indigo-50: #eef2ff;

  --text-900: #111827;
  --text-700: #374151;
  --text-500: #6b7280;
  --text-400: #9ca3af;

  --border: #e5e7eb;
  --border-strong: #d1d5db;

  --radius-sm: 8px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 18px;
  --radius-full: 9999px;

  --shadow-xs: 0 1px 2px rgba(0,0,0,.04);
  --shadow-sm: 0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,.06);
  --shadow-lg: 0 10px 28px rgba(0,0,0,.07);
  --shadow-btn: 0 1px 3px rgba(14,92,107,.28);
  --ring: 0 0 0 3px rgba(14,92,107,.20);

  --font: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --ease: cubic-bezier(.16,1,.3,1);
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-family: var(--font); background: var(--bg); color: var(--text-700); line-height: 1.6; scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body { min-height: 100vh; display: flex; flex-direction: column; overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
button, input, textarea, select { font: inherit; color: inherit; }
[hidden] { display: none !important; }

/* Focus visibile e coerente su tutti gli elementi interattivi */
a:focus-visible, button:focus-visible, input:focus-visible,
textarea:focus-visible, select:focus-visible {
  outline: 2px solid var(--primary); outline-offset: 2px;
}

/* Accessibility: Skip Link per screen reader e navigazione da tastiera */
.skip-link {
  position: absolute; top: -100px; left: 1rem; z-index: 1000;
  background: var(--primary); color: #fff;
  padding: .6rem 1.2rem; border-radius: var(--radius-sm);
  font-weight: 700; font-size: .9rem; text-decoration: none;
  box-shadow: var(--shadow-md); transition: top .2s var(--ease);
}
.skip-link:focus { top: 1rem; outline: 3px solid #fff; }

/* ---- Layout ---- */
.container { width: 100%; max-width: 1040px; margin: 0 auto; padding: 0 1.25rem; }
.container-narrow { max-width: 720px; }

/* ================================================================
   HEADER
   ================================================================ */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.95);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: .85rem 0;
}
.nav-wrapper { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand-link { display: flex; align-items: center; gap: .75rem; min-width: 0; text-decoration: none; }
.brand-icon-box {
  width: 44px; height: 44px; flex-shrink: 0;
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(14, 92, 107, 0.22);
}
.brand-icon-box img,
.brand-icon-box svg {
  width: 100%; height: 100%; display: block; object-fit: contain;
}
.brand-icon-box--sm { width: 32px; height: 32px; }
.brand-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-900);
  letter-spacing: -.03em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.15;
}
.site-footer .brand-title {
  font-size: 1.05rem;
}
.nav-actions { flex-shrink: 0; }
.btn-nav { padding: .55rem 1.15rem; font-size: .9rem; font-weight: 700; }

/* ================================================================
   HERO
   ================================================================ */
.hero { padding: 3.5rem 0 2rem; text-align: center; }
.hero .container { max-width: 1200px; }
.hero-eyebrow { font-size: .88rem; font-weight: 750; color: var(--primary); text-transform: uppercase; letter-spacing: .12em; margin-bottom: .85rem; }
.hero-title {
  font-size: clamp(1.3rem, 5.2vw, 2.75rem);
  font-weight: 800; color: var(--text-900);
  letter-spacing: -.035em; line-height: 1.2;
  margin-bottom: 1.25rem;
}
.hero-title-line {
  display: block;
  white-space: nowrap;
}
@media (min-width: 960px) {
  .hero-title {
    font-size: clamp(2.15rem, 2.7vw, 2.85rem);
    white-space: nowrap;
  }
  .hero-title-line {
    display: inline;
    white-space: nowrap;
  }
}
.hero-desc {
  font-size: clamp(.98rem, 2vw, 1.12rem);
  color: var(--text-500); max-width: 660px;
  margin: 0 auto 1.1rem; line-height: 1.65;
}
/* Firma editoriale: presente ma sottovoce, non deve competere col titolo. */
.hero-credit {
  font-size: .86rem; color: var(--text-400);
  max-width: 560px; margin: 0 auto 2.25rem; line-height: 1.55;
}
.hero-ctas { display: flex; align-items: center; justify-content: center; gap: .75rem; flex-wrap: wrap; margin-bottom: 3rem; }

/* ---- Trust Grid ---- */
.trust-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .85rem; }
.trust-card {
  background: var(--bg-white); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 1.15rem;
  display: flex; align-items: flex-start; gap: .85rem;
  transition: box-shadow .2s var(--ease), border-color .2s var(--ease);
}
.trust-card:hover { border-color: var(--border-strong); box-shadow: var(--shadow-sm); }
.trust-icon {
  width: 42px; height: 42px; flex-shrink: 0;
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
}
/* Trattamento unico e sobrio: contorno sottile e icona in petrolio.
   Le pastiglie pastello colorate davano un'aria da applicazione consumer,
   fuori luogo su un progetto di giornalismo d'inchiesta. */
.trust-icon--blue,
.trust-icon--green,
.trust-icon--cyan,
.trust-icon--indigo,
.trust-icon--amber {
  background: transparent;
  color: var(--primary);
  border: 1px solid var(--primary-200);
}
.trust-title { font-size: .92rem; font-weight: 750; color: var(--text-900); margin-bottom: .15rem; }
.trust-desc { font-size: .82rem; color: var(--text-500); line-height: 1.45; }

/* ================================================================
   CITAZIONE — fascia a tutta larghezza, in petrolio pieno.
   È l'unico blocco scuro della pagina: serve a dare respiro fra
   la presentazione e il modulo, e a dichiarare la linea editoriale.
   ================================================================ */
.quote-band {
  background: var(--primary);
  color: #fff;
  padding: 3.25rem 0;
  margin: 1.5rem 0 2.5rem;
}
.quote-block {
  max-width: 780px; margin: 0 auto; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 1.15rem;
}
.quote-mark { color: rgba(255,255,255,.28); flex-shrink: 0; }
.quote-text {
  font-size: clamp(1.25rem, 3.2vw, 1.85rem);
  font-weight: 700; line-height: 1.4; letter-spacing: -.015em;
  color: #fff; margin: 0;
}
.quote-author {
  font-size: .88rem; font-weight: 600; letter-spacing: .08em;
  text-transform: uppercase; color: rgba(255,255,255,.72);
}
.quote-author::before { content: "— "; }

/* ================================================================
   SECTION HEADERS
   ================================================================ */
.section-header { text-align: center; margin-bottom: 2rem; }
.section-tag { font-size: .78rem; font-weight: 700; color: var(--primary); text-transform: uppercase; letter-spacing: .1em; margin-bottom: .4rem; }
.section-title { font-size: 1.75rem; font-weight: 800; color: var(--text-900); letter-spacing: -.025em; margin-bottom: .4rem; }
.section-subtitle { font-size: .95rem; color: var(--text-500); max-width: 580px; margin: 0 auto; }

/* ================================================================
   FORM CARD
   ================================================================ */
.report-section { padding: 1rem 0 2.5rem; }
.form-card {
  background: var(--bg-white); border: 1px solid var(--border);
  border-radius: var(--radius-xl); padding: clamp(1.5rem, 5vw, 2.75rem);
  box-shadow: var(--shadow-md); position: relative;
}
.form-card::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  background: var(--primary);
}
.form-group { margin-bottom: 1.75rem; }
.form-label {
  display: flex; align-items: center; gap: .4rem;
  font-size: .92rem; font-weight: 700; color: var(--text-900); margin-bottom: .55rem;
}
.step-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 20px; height: 20px; background: var(--primary-50); color: var(--primary);
  border-radius: 50%; font-size: .72rem; font-weight: 800; flex-shrink: 0;
}
.required { color: var(--red); font-weight: 800; }
.optional-tag { font-size: .75rem; font-weight: 500; color: var(--text-400); margin-left: auto; flex-shrink: 0; }
.form-hint { display: block; font-size: .78rem; color: var(--text-400); margin-top: .35rem; }

/* ---- 1. AMBITO: elenco di schede con titolo e descrizione ---- */
.category-list { display: grid; gap: .55rem; }
.category-option { display: block; position: relative; }
.category-option input[type="radio"] { position: absolute; opacity: 0; width: 0; height: 0; }
.category-btn {
  display: flex; align-items: flex-start; gap: .85rem;
  padding: .9rem 1rem;
  background: var(--bg-white); border: 1.5px solid var(--border);
  border-radius: var(--radius-md); cursor: pointer;
  transition: border-color .18s var(--ease), background-color .18s var(--ease), box-shadow .18s var(--ease);
}
.cat-icon {
  width: 38px; height: 38px; flex-shrink: 0;
  border-radius: var(--radius-sm);
  background: var(--bg-subtle); color: var(--text-400);
  display: flex; align-items: center; justify-content: center;
  transition: background-color .18s var(--ease), color .18s var(--ease);
}
.cat-body { display: flex; flex-direction: column; gap: .12rem; min-width: 0; }
.cat-title { font-size: .9rem; font-weight: 750; color: var(--text-900); line-height: 1.3; }
.cat-desc { font-size: .8rem; color: var(--text-500); line-height: 1.45; }
.cat-check {
  width: 20px; height: 20px; flex-shrink: 0; margin-top: .55rem;
  border-radius: 50%; border: 1.5px solid var(--border-strong);
  display: flex; align-items: center; justify-content: center;
  color: transparent;
  transition: all .18s var(--ease);
}
.category-btn:hover { border-color: var(--border-strong); background: var(--bg-subtle); }
.category-option input:checked + .category-btn {
  border-color: var(--primary); background: var(--primary-50);
  box-shadow: 0 0 0 1px var(--primary);
}
.category-option input:checked + .category-btn .cat-icon { background: var(--primary-100); color: var(--primary); }
.category-option input:checked + .category-btn .cat-title { color: var(--primary-hover); }
.category-option input:checked + .category-btn .cat-check { background: var(--primary); border-color: var(--primary); color: #fff; }
.category-option input:focus-visible + .category-btn { border-color: var(--primary); box-shadow: var(--ring); }

/* ---- 2. RISCONTRO ---- */
.evidence-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; }
.evidence-option { display: block; position: relative; }
.evidence-option input[type="radio"] { position: absolute; opacity: 0; width: 0; height: 0; }
.evidence-btn {
  height: 100%;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-start;
  text-align: center; gap: .5rem; padding: .95rem .55rem;
  background: var(--bg-white); border: 1.5px solid var(--border);
  border-radius: var(--radius-md); cursor: pointer;
  font-size: .8rem; font-weight: 650; color: var(--text-500); line-height: 1.35;
  transition: all .18s var(--ease);
}
.evidence-btn svg { color: var(--text-400); transition: color .18s var(--ease); }
.evidence-btn:hover { border-color: var(--border-strong); background: var(--bg-subtle); }
.evidence-option input:checked + .evidence-btn {
  border-color: var(--primary); background: var(--primary-50);
  color: var(--primary-hover); box-shadow: 0 0 0 1px var(--primary);
}
.evidence-option input:checked + .evidence-btn svg { color: var(--primary); }
.evidence-option input:focus-visible + .evidence-btn { border-color: var(--primary); box-shadow: var(--ring); }

/* ---- Inputs ---- */
.input-control {
  width: 100%; padding: .8rem 1rem;
  background: var(--bg-white); border: 1.5px solid var(--border);
  border-radius: var(--radius-md); color: var(--text-900);
  font-size: .92rem; transition: all .18s var(--ease);
}
.input-control:focus { outline: none; border-color: var(--primary); box-shadow: var(--ring); }
.input-control::placeholder { color: var(--text-400); }
textarea.input-control { resize: vertical; min-height: 130px; line-height: 1.55; }

/* ---- 3. Luogo ---- */
.location-input-group { display: flex; gap: .5rem; }
.btn-gps {
  flex-shrink: 0; display: inline-flex; align-items: center; gap: .35rem;
  padding: .8rem 1rem; background: var(--primary-50);
  border: 1.5px solid var(--primary-200); color: var(--primary);
  border-radius: var(--radius-md); font-weight: 700;
  font-size: .86rem; cursor: pointer; transition: all .18s var(--ease); white-space: nowrap;
}
.btn-gps:hover { background: var(--primary-100); border-color: var(--primary); }
.btn-gps:disabled { opacity: .65; cursor: default; }
.btn-gps.gps-active { background: var(--green-50); border-color: var(--green); color: var(--green); }
.gps-feedback { font-size: .82rem; color: var(--green); font-weight: 600; margin-top: .4rem; display: flex; align-items: center; gap: .35rem; }

/* ---- 5. Descrizione ---- */
.textarea-footer { display: flex; justify-content: flex-end; margin-top: .3rem; }
.char-counter { font-size: .75rem; color: var(--text-400); font-weight: 600; }

/* ---- 6. Allegati ---- */
.file-upload-box {
  border: 2px dashed var(--border); border-radius: var(--radius-md);
  padding: 1.25rem 1rem; text-align: center;
  background: var(--bg-subtle); cursor: pointer;
  position: relative; transition: all .18s var(--ease);
}
.file-upload-box:hover { border-color: var(--primary); background: var(--primary-50); }
.file-upload-input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.file-upload-input:focus-visible + .file-upload-content { outline: 2px solid var(--primary); outline-offset: 6px; border-radius: var(--radius-sm); }
.file-upload-content { display: flex; flex-direction: column; align-items: center; gap: .3rem; color: var(--text-500); font-size: .88rem; font-weight: 500; }
.file-upload-content svg { color: var(--text-400); }
.upload-hint { font-size: .75rem; color: var(--text-400); }
.file-selected-name {
  font-weight: 700; color: var(--primary); font-size: .82rem;
  display: none; word-break: break-word;
  padding: .45rem .75rem; background: var(--primary-50);
  border: 1px solid var(--primary-200); border-radius: var(--radius-sm); margin-top: .55rem;
}

/* ---- 7. Contatto facoltativo ---- */
.contact-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: .6rem; }
.contact-option { display: block; position: relative; }
.contact-option input[type="radio"] { position: absolute; opacity: 0; width: 0; height: 0; }
.contact-btn {
  height: 100%;
  display: flex; align-items: center; justify-content: center; gap: .45rem;
  text-align: center; padding: .8rem .65rem;
  background: var(--bg-white); border: 1.5px solid var(--border);
  border-radius: var(--radius-md); cursor: pointer;
  font-size: .85rem; font-weight: 700; color: var(--text-500);
  transition: all .18s var(--ease);
}
.contact-btn svg { flex-shrink: 0; color: var(--text-400); transition: color .18s var(--ease); }
.contact-btn:hover { border-color: var(--border-strong); background: var(--bg-subtle); }
.contact-option input:checked + .contact-btn {
  border-color: var(--primary); background: var(--primary-50);
  color: var(--primary-hover); box-shadow: 0 0 0 1px var(--primary);
}
.contact-option input:checked + .contact-btn svg { color: var(--primary); }
.contact-option input:focus-visible + .contact-btn { border-color: var(--primary); box-shadow: var(--ring); }

.contact-field-wrap { margin-top: .65rem; display: flex; flex-direction: column; gap: .55rem; }
.contact-warning {
  display: flex; align-items: flex-start; gap: .55rem;
  background: var(--amber-50); border: 1px solid var(--amber-200);
  border-radius: var(--radius-md); padding: .7rem .85rem;
  font-size: .8rem; color: #92400e; line-height: 1.45;
}
.contact-warning svg { flex-shrink: 0; margin-top: 1px; color: var(--amber); }

/* ---- Dichiarazione ---- */
.privacy-box { background: var(--bg-subtle); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 1rem; }
.checkbox-label { display: flex; align-items: flex-start; gap: .65rem; font-size: .85rem; color: var(--text-700); cursor: pointer; line-height: 1.5; }
.checkbox-label input[type="checkbox"] { accent-color: var(--primary); width: 17px; height: 17px; margin-top: 2px; flex-shrink: 0; }

/* ---- Nota finale ---- */
.form-footer-note {
  text-align: center; font-size: .78rem; color: var(--text-400); margin-top: 1rem;
  display: flex; align-items: center; justify-content: center; gap: .35rem;
}

/* ================================================================
   BUTTONS
   ================================================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  padding: .7rem 1.35rem; font-weight: 700; font-size: .9rem;
  border-radius: var(--radius-md); cursor: pointer;
  transition: all .18s var(--ease); border: none; line-height: 1.2;
}
.btn-primary { background: var(--primary); color: #fff; box-shadow: var(--shadow-btn); }
.btn-primary:hover { background: var(--primary-hover); }
.btn-primary:disabled { opacity: .75; cursor: default; }
.btn-secondary { background: var(--bg-white); color: var(--text-900); border: 1.5px solid var(--border); }
.btn-secondary:hover { background: var(--bg-subtle); border-color: var(--border-strong); }
.btn-ghost { background: transparent; color: var(--text-700); }
.btn-ghost:hover { background: var(--bg-subtle); color: var(--text-900); }
.btn-block { width: 100%; }
.btn-lg { padding: .9rem 1.75rem; font-size: .98rem; }
.btn-text { display: inline-flex; align-items: center; gap: .45rem; }

/* Spinner */
.spinner { width: 18px; height: 18px; border: 2px solid rgba(255,255,255,.4); border-top-color: #fff; border-radius: 50%; animation: spin .8s linear infinite; display: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading .spinner { display: inline-block; }
.hidden-field { display: none !important; }

/* ================================================================
   QR SECTION
   ================================================================ */
.qr-section { padding: 2.5rem 0 4rem; }
.qr-card {
  background: var(--bg-white); border: 1px solid var(--border);
  border-radius: var(--radius-xl); padding: clamp(1.5rem, 4vw, 2.5rem);
  box-shadow: var(--shadow-md);
  display: grid; grid-template-columns: auto 1fr; gap: 2.5rem; align-items: center;
}
.qr-display-wrapper { display: flex; flex-direction: column; align-items: center; text-align: center; }
.qr-frame {
  background: #fff; padding: 1.15rem; border-radius: var(--radius-lg);
  border: 1px solid var(--border); box-shadow: var(--shadow-sm);
  display: inline-block; margin-bottom: .85rem;
}
.qr-frame img, .qr-frame canvas { display: block; }
.qr-meta { font-size: .8rem; color: var(--text-400); max-width: 240px; }
.qr-info-column { display: flex; flex-direction: column; gap: 1.15rem; }
.qr-info-column h3 { font-size: 1.35rem; font-weight: 800; color: var(--text-900); letter-spacing: -.02em; }
.qr-info-column p { font-size: .92rem; color: var(--text-500); line-height: 1.6; }
.qr-url-box { background: var(--bg-subtle); border: 1.5px solid var(--border); border-radius: var(--radius-md); padding: .55rem .75rem; display: flex; align-items: center; gap: .45rem; }
.qr-url-input { background: transparent; border: none; color: var(--text-700); font-size: .85rem; font-weight: 600; width: 100%; }
.qr-url-input:focus { outline: none; }
.qr-actions-row { display: flex; gap: .6rem; flex-wrap: wrap; }

/* ================================================================
   FOOTER
   ================================================================ */
.site-footer { border-top: 1px solid var(--border); background: var(--bg-white); padding: 2rem 0 1.5rem; margin-top: auto; }
.footer-content { display: flex; flex-direction: column; gap: 1.25rem; }
.footer-top { display: flex; flex-direction: column; align-items: center; text-align: center; gap: .75rem; }
.footer-disclaimer { max-width: 640px; font-size: .78rem; color: var(--text-400); line-height: 1.55; }
.footer-bottom { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding-top: 1rem; border-top: 1px solid var(--border); font-size: .8rem; color: var(--text-400); flex-wrap: wrap; }
.footer-tagline { text-align: right; }

.footer-nav {
  display: flex; align-items: center; justify-content: center; flex-wrap: wrap;
  gap: .5rem .85rem; padding: .5rem 0; font-size: .84rem;
}
.footer-link {
  color: var(--text-700); font-weight: 600; text-decoration: none;
  transition: color .18s var(--ease);
}
.footer-link:hover { color: var(--primary); text-decoration: underline; }
.footer-sep { color: var(--border-strong); font-size: .8rem; user-select: none; }
.footer-link-btn {
  background: none; border: none; padding: 0;
  color: var(--primary); font-size: .84rem; font-weight: 700;
  cursor: pointer; display: inline-flex; align-items: center; gap: .3rem;
  text-decoration: underline; transition: color .18s var(--ease);
}
.footer-link-btn:hover { color: var(--primary-hover); }
.footer-subtle-link { color: var(--text-700); font-weight: 600; text-decoration: underline; }
.footer-subtle-link:hover { color: var(--primary); }

/* ================================================================
   MODALS
   ================================================================ */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(17,24,39,.5); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  padding: 1rem; z-index: 100;
  opacity: 0; pointer-events: none; transition: opacity .2s ease;
  overflow-y: auto;
}
.modal-overlay.active { opacity: 1; pointer-events: auto; }
.modal-box {
  background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius-xl); box-shadow: var(--shadow-lg);
  width: 100%; max-width: 460px; padding: 2rem;
  position: relative; transform: scale(.97);
  transition: transform .2s var(--ease);
}
.modal-overlay.active .modal-box { transform: scale(1); }
.modal-close-btn {
  position: absolute; top: 1rem; right: 1rem;
  background: var(--bg-subtle); border: none; color: var(--text-400);
  font-size: 1.3rem; cursor: pointer;
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%; transition: all .18s var(--ease);
}
.modal-close-btn:hover { background: var(--border); color: var(--text-900); }
.modal-success-icon {
  width: 60px; height: 60px;
  background: var(--green-50); border: 2px solid var(--green);
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  color: var(--green); margin: 0 auto 1.15rem;
}
.modal-title { font-size: 1.3rem; font-weight: 800; text-align: center; color: var(--text-900); margin-bottom: .4rem; }
.modal-desc { font-size: .9rem; color: var(--text-500); text-align: center; line-height: 1.55; margin-bottom: 1.5rem; }
.modal-box code { background: var(--bg-subtle); border: 1px solid var(--border); border-radius: 4px; padding: 1px 5px; font-size: .85em; }

/* ================================================================
   TOAST
   ================================================================ */
/* Notifica bassa e allungata: una fascia sottile, non un blocco scuro.
   Serve per gli avvisi del modulo, quindi resta leggibile ma discreta. */
.toast-notice {
  position: fixed; bottom: 1.25rem; left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: rgba(10, 44, 51, .95); color: #fff;
  padding: .45rem 1.5rem; border-radius: var(--radius-full);
  box-shadow: 0 6px 18px rgba(10, 44, 51, .22);
  font-size: .8rem; font-weight: 600; line-height: 1.5;
  white-space: nowrap;
  z-index: 150; opacity: 0; max-width: calc(100vw - 2rem); text-align: center;
  overflow: hidden; text-overflow: ellipsis;
  transition: all .3s var(--ease); pointer-events: none;
}
.toast-notice.show { transform: translateX(-50%) translateY(0); opacity: 1; }

/* ================================================================
   RESPONSIVE
   ================================================================ */
@media (max-width: 768px) {
  /* ---- Leggibilità su smartphone ----------------------------------------
     I corpi sotto i 15px su schermo piccolo affaticano la lettura, e un
     campo di testo sotto i 16px fa ingrandire la pagina da solo su iPhone
     appena lo si tocca: qui li portiamo tutti sopra quella soglia. */
  .input-control { font-size: 1rem; padding: .85rem 1rem; }
  textarea.input-control { min-height: 150px; }

  .hero-desc { font-size: 1.05rem; line-height: 1.7; }
  .hero-credit { font-size: .92rem; }
  .section-subtitle { font-size: 1rem; line-height: 1.6; }

  .trust-title { font-size: 1rem; }
  .trust-desc { font-size: .92rem; line-height: 1.55; }

  .form-label { font-size: 1rem; }
  .form-hint { font-size: .86rem; }
  .optional-tag { font-size: .82rem; }

  .cat-title { font-size: 1rem; }
  .cat-desc { font-size: .9rem; line-height: 1.5; }
  .evidence-btn { font-size: .92rem; }
  .contact-btn { font-size: .95rem; }
  .contact-warning { font-size: .88rem; line-height: 1.55; }
  .checkbox-label { font-size: .93rem; line-height: 1.6; }
  .checkbox-label input[type="checkbox"] { width: 20px; height: 20px; }

  .upload-hint { font-size: .82rem; }
  .file-upload-content { font-size: .95rem; }
  .file-selected-name { font-size: .88rem; }
  .char-counter { font-size: .82rem; }
  .form-footer-note { font-size: .84rem; }
  .footer-disclaimer { font-size: .86rem; line-height: 1.65; }
  .qr-meta { font-size: .88rem; }
  .toast-notice { font-size: .85rem; white-space: normal; }

  .quote-band { padding: 2.5rem 0; }

  .hero { padding: 2.5rem 0 1.5rem; }
  .hero-ctas { flex-direction: column; align-items: stretch; }
  .hero-ctas .btn { justify-content: center; }

  .trust-grid { grid-template-columns: 1fr; gap: .65rem; }

  .evidence-grid { grid-template-columns: 1fr; }
  .evidence-btn { flex-direction: row; justify-content: flex-start; text-align: left; gap: .65rem; padding: .8rem .9rem; }
  .evidence-text br { display: none; }

  .contact-grid { grid-template-columns: 1fr; }

  .location-input-group { flex-direction: column; }
  .btn-gps { justify-content: center; }

  .qr-card { grid-template-columns: 1fr; text-align: center; gap: 1.5rem; }
  .qr-info-column { align-items: center; }
  .qr-actions-row { justify-content: center; }

  .footer-bottom { flex-direction: column; gap: .5rem; text-align: center; }
  .footer-tagline { text-align: center; }

  .nav-actions .btn-nav { padding: .45rem .85rem; font-size: .84rem; }
  .brand-title { font-size: 1.18rem; }
  .brand-icon-box { width: 38px; height: 38px; }
}

@media (max-width: 420px) {
  .brand-title { font-size: 1.05rem; }
  .brand-icon-box { width: 34px; height: 34px; }
  .container { padding: 0 1rem; }
  .hero-title { font-size: clamp(1.22rem, 5.2vw, 1.45rem); line-height: 1.22; }
  .category-btn { padding: .8rem .85rem; gap: .7rem; }
  .cat-icon { width: 34px; height: 34px; }
  .cat-check { display: none; }
  .modal-box { padding: 1.5rem 1.25rem; }
}

/* ================================================================
   COOKIE BANNER & CONSENT MODAL (GDPR / GARANTE PRIVACY)
   ================================================================ */
.cookie-banner {
  position: fixed; bottom: 0; left: 0; right: 0;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--border);
  box-shadow: 0 -8px 30px rgba(0,0,0,.08);
  z-index: 95;
  transform: translateY(100%);
  transition: transform .32s var(--ease);
}
.cookie-banner--visible { transform: translateY(0); }
.cookie-banner-container {
  width: 100%; max-width: 1040px; margin: 0 auto;
  padding: 1.15rem 1.25rem;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.5rem;
}
.cookie-banner-content { flex: 1; min-width: 0; }
.cookie-badge {
  display: inline-flex; align-items: center; gap: .35rem;
  background: var(--primary-50); color: var(--primary);
  border: 1px solid var(--primary-100);
  border-radius: var(--radius-sm);
  padding: .2rem .55rem; font-size: .75rem; font-weight: 700;
  margin-bottom: .45rem;
}
.cookie-banner-text {
  font-size: .84rem; color: var(--text-700); line-height: 1.55; margin: 0;
}
.cookie-inline-link {
  color: var(--primary); font-weight: 600; text-decoration: underline;
}
.cookie-inline-link:hover { color: var(--primary-hover); }
.cookie-banner-actions {
  display: flex; align-items: center; gap: .55rem; flex-shrink: 0; flex-wrap: wrap;
}

/* Modale Gestione Cookie Dettagliata */
.cookie-modal-box { max-width: 580px; text-align: left; }
.cookie-modal-header {
  display: flex; align-items: flex-start; gap: .85rem; margin-bottom: 1.25rem;
}
.cookie-modal-icon {
  width: 42px; height: 42px; border-radius: var(--radius-md);
  background: var(--primary-50); color: var(--primary);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.cookie-modal-subtitle {
  font-size: .85rem; color: var(--text-500); line-height: 1.45; margin-top: .15rem;
}
.cookie-categories-list {
  display: flex; flex-direction: column; gap: .85rem;
  margin: 1.25rem 0 1.5rem; max-height: 380px; overflow-y: auto; padding-right: .3rem;
}
.cookie-category-item {
  background: var(--bg-subtle); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: .95rem 1.05rem;
}
.cookie-cat-top {
  display: flex; align-items: center; justify-content: space-between;
  gap: .75rem; margin-bottom: .35rem;
}
.cookie-cat-info {
  display: flex; align-items: center; gap: .55rem; flex-wrap: wrap; font-size: .9rem;
}
.cookie-pill {
  font-size: .7rem; font-weight: 700; padding: .15rem .5rem;
  border-radius: var(--radius-full);
}
.cookie-pill--required {
  background: var(--green-50); color: var(--green); border: 1px solid var(--green-100);
}
.cookie-pill--disabled {
  background: #e5e7eb; color: var(--text-500);
}
.cookie-cat-desc {
  font-size: .81rem; color: var(--text-500); line-height: 1.5; margin: 0;
}
.cookie-toggle {
  width: 18px; height: 18px; accent-color: var(--primary); cursor: not-allowed;
}
.cookie-modal-footer {
  display: flex; justify-content: flex-end; gap: .75rem;
  padding-top: 1rem; border-top: 1px solid var(--border);
}

@media (max-width: 768px) {
  .cookie-banner-container {
    flex-direction: column; align-items: stretch; gap: 1rem;
  }
  .cookie-banner-actions {
    display: grid; grid-template-columns: 1fr 1fr; gap: .5rem;
  }
  .cookie-banner-actions #cookieAcceptAllBtn {
    grid-column: span 2;
  }
}

/* ================================================================
   LEGAL PAGES (PRIVACY, COOKIE, NOTE LEGALI)
   ================================================================ */
.legal-page { padding: 2rem 0 4rem; }
.legal-hero { text-align: center; margin-bottom: 2rem; }
.legal-eyebrow {
  display: inline-flex; align-items: center; gap: .4rem;
  font-size: .8rem; font-weight: 700; color: var(--primary);
  background: var(--primary-50); border: 1px solid var(--primary-100);
  border-radius: var(--radius-full); padding: .3rem .85rem;
  margin-bottom: .85rem; text-transform: uppercase; letter-spacing: .06em;
}
.legal-title {
  font-size: clamp(1.75rem, 4vw, 2.35rem); font-weight: 800;
  color: var(--text-900); letter-spacing: -.03em; margin-bottom: .5rem;
}
.legal-lead {
  font-size: 1rem; color: var(--text-500); max-width: 680px; margin: 0 auto; line-height: 1.6;
}
.legal-card {
  background: var(--bg-white); border: 1px solid var(--border);
  border-radius: var(--radius-xl); box-shadow: var(--shadow-md);
  padding: clamp(1.5rem, 5vw, 3rem);
}
.legal-meta-bar {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center;
  gap: .85rem; background: var(--bg-subtle); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: .85rem 1.15rem; margin-bottom: 2rem;
  font-size: .84rem; color: var(--text-700);
}
.legal-meta-item { display: flex; align-items: center; gap: .45rem; }
.legal-section { margin-bottom: 2.25rem; }
.legal-section:last-of-type { margin-bottom: 0; }
.legal-section h2 {
  font-size: 1.22rem; font-weight: 800; color: var(--text-900);
  margin-bottom: .85rem; display: flex; align-items: center; gap: .55rem;
  letter-spacing: -.02em; border-bottom: 1px solid var(--border); padding-bottom: .5rem;
}
.legal-section h3 {
  font-size: 1.02rem; font-weight: 700; color: var(--text-900); margin: 1.15rem 0 .45rem;
}
.legal-section p {
  font-size: .92rem; color: var(--text-700); line-height: 1.7; margin-bottom: .85rem;
}
.legal-section p:last-child { margin-bottom: 0; }
.legal-section ul, .legal-section ol {
  padding-left: 1.4rem; margin: .65rem 0 .95rem; font-size: .92rem; color: var(--text-700); line-height: 1.7;
}
.legal-section li { margin-bottom: .45rem; }
.legal-box {
  background: var(--bg-subtle); border-left: 4px solid var(--primary);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: 1rem 1.25rem; margin: 1.25rem 0; font-size: .88rem; line-height: 1.6;
}
.legal-contact-box {
  background: #f0fdf4; border: 1.5px solid #bbf7d0; border-radius: var(--radius-lg);
  padding: 1.25rem; margin: 1.5rem 0;
}
.legal-contact-box h4 {
  color: #166534; font-size: 1rem; font-weight: 700; margin-bottom: .35rem; display: flex; align-items: center; gap: .45rem;
}
.legal-contact-box p { color: #15803d; font-size: .88rem; margin: 0; }
.legal-back-nav { margin-bottom: 1.5rem; }
.btn-back-home {
  display: inline-flex; align-items: center; gap: .5rem; font-size: .88rem;
  font-weight: 700; color: var(--primary); text-decoration: none;
  transition: transform .18s var(--ease);
}
.btn-back-home:hover { transform: translateX(-3px); }

/* ================================================================
   PRINT (LOCANDINA A4)
   ================================================================ */
@media print {
  body { background: #fff !important; color: #000 !important; }
  .site-header, .hero, .report-section, .qr-section, .site-footer,
  .modal-overlay, .toast-notice { display: none !important; }

  .printable-flyer {
    display: block !important;
    width: 100% !important; max-width: 190mm !important;
    margin: 0 auto !important; padding: 16mm 15mm !important;
    text-align: center !important; color: #0f172a !important;
  }
  .flyer-header { border-bottom: 2.5px solid #0e5c6b; padding-bottom: 9mm; margin-bottom: 10mm; }
  .flyer-badge { display: inline-block; background: #0e5c6b; color: #fff; padding: 3mm 8mm; border-radius: 4px; font-weight: 800; font-size: 11pt; letter-spacing: 2px; margin-bottom: 5mm; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .flyer-title { font-size: 26pt; font-weight: 900; line-height: 1.15; margin-bottom: 4mm; }
  .flyer-subtitle { font-size: 13pt; color: #374151; max-width: 90%; margin: 0 auto; line-height: 1.4; }
  .flyer-call-to-action { font-size: 16pt; font-weight: 800; color: #059669; margin-bottom: 4mm; }
  .flyer-qr-container { margin: 8mm 0; padding: 8mm; border: 3px solid #0e5c6b; border-radius: 12px; display: inline-block; }
  .flyer-qr-container img { width: 72mm !important; height: 72mm !important; display: block; margin: 0 auto; }
  .flyer-instruction { font-size: 15pt; font-weight: 800; color: #0f172a; margin: 4mm 0; }
  .flyer-steps { display: flex; justify-content: space-around; gap: 4mm; margin: 8mm 0; border-top: 1px solid #e5e7eb; border-bottom: 1px solid #e5e7eb; padding: 6mm 0; }
  .flyer-step-item { font-size: 10pt; font-weight: 700; }
  .flyer-footer { margin-top: 8mm; font-size: 9pt; color: #6b7280; border-top: 1px dashed #d1d5db; padding-top: 6mm; }

  @page { size: A4; margin: 0; }
}
.printable-flyer { display: none; }
