:root {
  --ink: #15243a;
  --ink-2: #26364d;
  --muted: #65738a;
  --line: #dce6ee;
  --blue: #3e83c5;
  --blue-dark: #286da9;
  --blue-soft: #edf6fd;
  --green: #6fa94b;
  --green-dark: #4f8431;
  --green-soft: #f1f7eb;
  --brand-red: #c91432;
  --surface: #ffffff;
  --page: #f8fbfd;
  --shadow: 0 18px 44px rgba(31, 56, 83, .09);
  --shadow-hover: 0 22px 54px rgba(31, 56, 83, .14);
  --radius-lg: 18px;
  --radius-md: 12px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--page);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
svg { display: block; }
.shell { width: min(1160px, calc(100% - 40px)); margin-inline: auto; }

:focus-visible { outline: 3px solid rgba(201,20,50,.30); outline-offset: 3px; }
.skip-link {
  position: fixed; left: 16px; top: 12px; z-index: 100; padding: 10px 14px;
  border-radius: 8px; background: var(--ink); color: #fff; transform: translateY(-160%);
  transition: transform .18s ease;
}
.skip-link:focus { transform: translateY(0); }

.site-header {
  height: 92px;
  position: relative;
  z-index: 20;
  background: rgba(255,255,255,.97);
  border-bottom: 1px solid #e7edf2;
}
.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
}
.brand { display: inline-flex; align-items: center; flex: 0 0 auto; }
.brand img { width: 154px; height: auto; display: block; }
.top-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink-2);
}
.nav-link, .nav-ticket {
  min-height: 44px;
  padding: 0 15px;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: color .18s ease, background .18s ease, border-color .18s ease, transform .18s ease;
}
.nav-link:hover { color: var(--blue-dark); background: var(--blue-soft); }
.nav-ticket {
  gap: 9px;
  color: #315d20;
  border: 1px solid #cfe3c0;
  background: #edf7e6;
}
.nav-ticket:hover { transform: translateY(-1px); border-color: #bdd8aa; background: #e6f3dc; }
.nav-ticket svg {
  width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round;
}
.nav-label-short { display: none; }

.hero {
  position: relative;
  overflow: hidden;
  padding: 66px 0 56px;
  background:
    radial-gradient(circle at 18% 12%, rgba(213,235,252,.78), transparent 25%),
    radial-gradient(circle at 92% 88%, rgba(225,241,211,.72), transparent 25%),
    linear-gradient(180deg,#fff 0%,#f8fbfd 100%);
  border-bottom: 1px solid #e7eef3;
}
.hero-grid {
  position: absolute;
  inset: 0;
  opacity: .30;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(80,119,154,.06) 1px,transparent 1px),
    linear-gradient(90deg,rgba(80,119,154,.06) 1px,transparent 1px);
  background-size: 42px 42px;
  -webkit-mask-image: linear-gradient(to bottom,rgba(0,0,0,.9),transparent 92%);
  mask-image: linear-gradient(to bottom,rgba(0,0,0,.9),transparent 92%);
}
.hero-inner { position: relative; z-index: 1; }
.intro { max-width: 800px; text-align: center; margin: 0 auto; }
.eyebrow, .section-kicker {
  margin: 0 0 15px;
  color: var(--green-dark);
  font-size: 12px;
  line-height: 1.3;
  font-weight: 800;
  letter-spacing: .15em;
  text-transform: uppercase;
}
h1 {
  max-width: 780px;
  margin: 0 auto;
  font-size: clamp(39px,5.2vw,59px);
  line-height: 1.04;
  letter-spacing: -.045em;
}
.lead {
  max-width: 720px;
  margin: 22px auto 0;
  color: var(--muted);
  font-size: clamp(17px,2vw,20px);
  line-height: 1.58;
}
.process-label {
  width: min(100%,920px);
  margin: 46px auto 18px;
  display: flex;
  align-items: center;
  gap: 16px;
  color: #66758a;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.process-rule { height: 1px; flex: 1; background: #d9e5ed; }

.action-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 18px; }
.action-card {
  min-height: 298px;
  padding: 22px 24px 23px;
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-lg);
  border: 1px solid #e1e9ef;
  background: rgba(255,255,255,.96);
  box-shadow: var(--shadow);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.action-card:hover { transform: translateY(-4px); border-color: #cfdde7; box-shadow: var(--shadow-hover); }
.action-card.action-primary { border-top: 4px solid #8abb69; padding-top: 19px; }
.service-type {
  color: #718096;
  font-size: 10.5px;
  line-height: 1.3;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.icon-box {
  width: 68px;
  height: 68px;
  margin: 21px 0 19px;
  display: grid;
  place-items: center;
  border-radius: 16px;
}
.icon-box.icon-green { color: #679d45; background: var(--green-soft); }
.icon-box.icon-blue { color: #3479b8; background: var(--blue-soft); }
.icon-box svg, .utility-icon svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 2.35;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.icon-box svg { width: 36px; height: 36px; }
.card-copy strong { display: block; font-size: 21px; line-height: 1.2; letter-spacing: -.025em; }
.card-copy small { display: block; margin-top: 11px; color: var(--muted); font-size: 14.5px; line-height: 1.58; }
.card-link {
  margin-top: auto;
  padding-top: 21px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--blue-dark);
  font-size: 13px;
  font-weight: 800;
}
.action-primary .card-link { color: var(--green-dark); }
.card-link span { font-size: 19px; font-weight: 500; }
.operational-note {
  width: min(100%,920px);
  margin: 22px auto 0;
  padding: 13px 16px;
  border: 1px solid #dce7ee;
  border-left: 3px solid var(--brand-red);
  border-radius: 10px;
  color: #5d6b7c;
  background: rgba(255,255,255,.76);
  font-size: 13px;
  line-height: 1.55;
  text-align: left;
}
.operational-note strong { color: var(--ink-2); }

.service-section { padding: 50px 0 56px; background: #fff; }
.utility-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.utility {
  min-width: 0;
  min-height: 326px;
  padding: 27px;
  display: flex;
  flex-direction: column;
  border: 1px solid #dce7ee;
  border-radius: var(--radius-lg);
}
.utility-blue { background: linear-gradient(145deg,#f5faff 0%,#ecf6fd 100%); }
.utility-green { background: linear-gradient(145deg,#f8fbf5 0%,#f0f7e9 100%); }
.utility-heading { display: grid; grid-template-columns: 60px minmax(0,1fr); gap: 17px; align-items: start; }
.utility-icon {
  width: 60px;
  height: 60px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  color: var(--blue-dark);
  background: rgba(255,255,255,.9);
  border: 1px solid rgba(200,218,232,.75);
}
.utility-green .utility-icon { color: var(--green-dark); border-color: rgba(207,225,194,.8); }
.utility-icon svg { width: 33px; height: 33px; }
.utility-kicker {
  margin: 1px 0 5px !important;
  color: var(--blue-dark) !important;
  font-size: 10px !important;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.utility-green .utility-kicker { color: var(--green-dark) !important; }
.utility-copy h2 { margin: 0; font-size: 22px; line-height: 1.2; letter-spacing: -.025em; }
.utility-copy p { margin: 9px 0 0; color: var(--muted); font-size: 14px; line-height: 1.55; }
.compact-instruction {
  margin: 20px 0 0;
  padding: 10px 12px;
  border-radius: 9px;
  color: #5a697b;
  background: rgba(255,255,255,.60);
  font-size: 12.5px;
  line-height: 1.45;
}
.compact-instruction strong { color: var(--ink-2); }
.download-actions, .contact-actions {
  margin-top: auto;
  padding-top: 20px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.tool-button, .contact-button {
  min-height: 66px;
  padding: 11px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid rgba(178,204,224,.95);
  border-radius: var(--radius-md);
  background: rgba(255,255,255,.86);
  transition: transform .18s ease, background .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.tool-button:hover, .contact-button:hover {
  transform: translateY(-2px);
  background: #fff;
  border-color: #a9c4d8;
  box-shadow: 0 10px 24px rgba(47,83,112,.08);
}
.tool-button > svg { width: 28px; height: 28px; flex: 0 0 auto; fill: var(--blue-dark); }
.tool-button span, .contact-button > span:last-child { min-width: 0; font-size: 15px; font-weight: 800; line-height: 1.18; }
.tool-button small, .contact-button small {
  display: block;
  margin-bottom: 3px;
  color: #778397;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
}
.contact-button { border-color: rgba(194,216,178,.98); }
.contact-button:hover { border-color: #b4d09f; }
.contact-symbol {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--green-dark);
  background: #f1f7ec;
}
.contact-symbol svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.contact-button strong { display: block; color: #304526; font-size: 14px; white-space: nowrap; }
.utility-note { margin: 11px 0 0; color: #6c798b; font-size: 11.5px; line-height: 1.45; }
.utility-note a { color: var(--blue-dark); text-decoration: underline; text-underline-offset: 2px; }
.utility-note-urgent { padding-left: 10px; border-left: 2px solid var(--brand-red); }

.site-footer {
  padding: 25px 0 29px;
  color: #778397;
  background: #f8fafb;
  border-top: 1px solid var(--line);
  font-size: 12px;
}
.footer-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px 24px;
  align-items: start;
}
.footer-inner p { margin: 0; }
.footer-company { margin-bottom: 4px !important; color: var(--ink-2); font-weight: 800; }
.footer-links { display: flex; gap: 18px; flex-wrap: wrap; justify-content: flex-end; }
.footer-links a { color: #5d6d81; }
.footer-links a:hover { color: var(--blue-dark); text-decoration: underline; text-underline-offset: 3px; }
.footer-copy { grid-column: 1 / -1; padding-top: 12px; border-top: 1px solid #e4ebf0; }

/* Pagine informative */
.subpage-header { height: 92px; background: #fff; border-bottom: 1px solid var(--line); }
.subpage-header .header-inner { height: 100%; }
.subpage-back { color: var(--blue-dark); font-size: 14px; font-weight: 800; }
.legal-main { padding: 56px 0 66px; background: #fff; }
.legal-shell { width: min(860px, calc(100% - 40px)); margin: 0 auto; }
.legal-intro { margin-bottom: 32px; }
.legal-intro h1 { margin: 0; max-width: none; font-size: clamp(34px,5vw,50px); }
.legal-intro p { color: var(--muted); line-height: 1.65; }
.legal-card { padding: 25px 27px; border: 1px solid var(--line); border-radius: 15px; background: #fbfdfe; }
.legal-card + .legal-card { margin-top: 15px; }
.legal-card h2 { margin: 0 0 11px; font-size: 21px; }
.legal-card h3 { margin: 19px 0 8px; font-size: 16px; }
.legal-card p, .legal-card li { color: #58687b; font-size: 14px; line-height: 1.65; }
.legal-card ul { margin: 10px 0 0; padding-left: 20px; }
.legal-card a { color: var(--blue-dark); text-decoration: underline; text-underline-offset: 2px; }
.legal-meta { color: #7a8798; font-size: 12px; }

.error-main { min-height: 70vh; display: grid; place-items: center; padding: 60px 20px; background: #fff; }
.error-card { max-width: 620px; text-align: center; }
.error-code { margin: 0; color: var(--brand-red); font-size: 14px; font-weight: 900; letter-spacing: .16em; }
.error-card h1 { margin-top: 12px; }
.error-card p { color: var(--muted); font-size: 17px; line-height: 1.6; }
.primary-button { min-height: 48px; padding: 0 20px; display: inline-flex; align-items: center; justify-content: center; border-radius: 10px; color: #fff; background: var(--ink); font-weight: 800; }

@media (max-width: 940px) {
  .action-grid { grid-template-columns: 1fr; max-width: 700px; margin-inline: auto; }
  .action-card { min-height: 0; }
  .process-label, .operational-note { max-width: 700px; }
  .utility-grid { grid-template-columns: 1fr; max-width: 700px; }
  .utility { min-height: 0; }
}

@media (max-width: 680px) {
  .shell, .legal-shell { width: min(100% - 28px,1160px); }
  .site-header, .subpage-header { height: 82px; }
  .brand img { width: 132px; }
  .top-nav { gap: 5px; }
  .nav-link, .nav-ticket { min-height: 40px; padding: 0 11px; font-size: 12px; }
  .nav-contact { display: none; }
  .hero { padding: 48px 0 43px; }
  .process-label { margin-top: 37px; }
  .action-card { padding: 20px; }
  .operational-note { text-align: left; }
  .service-section { padding: 36px 0 42px; }
  .utility { padding: 21px; }
  .download-actions, .contact-actions { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
  .footer-links { justify-content: flex-start; }
  .footer-copy { grid-column: auto; }
  .legal-main { padding: 42px 0 52px; }
  .legal-card { padding: 21px; }
}

@media (max-width: 430px) {
  .brand img { width: 115px; }
  .nav-label-long { display: none; }
  .nav-label-short { display: inline; }
  .nav-ticket svg { display: none; }
  h1 { font-size: 38px; }
  .lead { font-size: 16px; }
  .process-label { gap: 11px; }
  .utility-heading { grid-template-columns: 50px 1fr; gap: 13px; }
  .utility-icon { width: 50px; height: 50px; border-radius: 13px; }
  .utility-icon svg { width: 28px; height: 28px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

/* Consenso Google Analytics */
.footer-link-button,
.inline-settings-button {
  margin: 0;
  padding: 0;
  border: 0;
  color: #5d6d81;
  background: transparent;
  font: inherit;
  cursor: pointer;
}
.footer-link-button:hover,
.inline-settings-button:hover {
  color: var(--blue-dark);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.inline-settings-button {
  color: var(--blue-dark);
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.consent-banner {
  position: fixed;
  z-index: 1000;
  right: 18px;
  bottom: 18px;
  left: 18px;
  color: var(--ink);
}
.consent-banner[hidden] { display: none; }
.consent-inner {
  width: min(980px, 100%);
  margin: 0 auto;
  padding: 18px 20px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 20px;
  border: 1px solid #d8e2ea;
  border-radius: 15px;
  background: rgba(255,255,255,.98);
  box-shadow: 0 20px 58px rgba(35,52,72,.18);
  backdrop-filter: blur(10px);
}
.consent-copy strong {
  display: block;
  margin-bottom: 5px;
  color: var(--ink);
  font-size: 15px;
}
.consent-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.48;
}
.consent-copy a {
  display: inline-block;
  margin-top: 6px;
  color: var(--blue-dark);
  font-size: 12px;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.consent-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}
.consent-button {
  min-height: 42px;
  padding: 0 15px;
  border-radius: 9px;
  font: inherit;
  font-size: 12px;
  font-weight: 850;
  cursor: pointer;
}
.consent-reject {
  color: #49596c;
  border: 1px solid #cfd9e2;
  background: #fff;
}
.consent-accept {
  color: #fff;
  border: 1px solid var(--ink);
  background: var(--ink);
}
.consent-button:hover { transform: translateY(-1px); }
.consent-button:focus-visible,
.footer-link-button:focus-visible,
.inline-settings-button:focus-visible {
  outline: 3px solid rgba(47,125,217,.28);
  outline-offset: 3px;
}

@media (max-width: 720px) {
  .consent-banner { right: 10px; bottom: 10px; left: 10px; }
  .consent-inner {
    padding: 17px;
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .consent-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .consent-button { width: 100%; }
}

@media (max-width: 430px) {
  .consent-actions { grid-template-columns: 1fr; }
}


/* Chat assistenza tawk.to: caricamento solo su azione dell’utente */
.chat-launcher {
  position: fixed;
  z-index: 900;
  right: 22px;
  bottom: 22px;
  min-height: 54px;
  padding: 8px 17px 8px 12px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 1px solid #d5e2eb;
  border-radius: 16px;
  color: var(--ink);
  background: rgba(255,255,255,.98);
  box-shadow: 0 15px 40px rgba(35,52,72,.18);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease;
}
.chat-launcher:hover { transform: translateY(-2px); box-shadow: 0 19px 46px rgba(35,52,72,.22); }
.chat-launcher svg { width: 31px; height: 31px; padding: 6px; border-radius: 10px; color: #fff; background: var(--blue); fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.chat-launcher small, .chat-launcher strong { display: block; }
.chat-launcher small { margin-bottom: 1px; color: var(--muted); font-size: 10px; font-weight: 750; letter-spacing: .04em; text-transform: uppercase; }
.chat-launcher strong { font-size: 13px; }
.tawk-loaded .chat-launcher { display: none; }
.consent-banner:not([hidden]) ~ .chat-launcher { bottom: 128px; }
.chat-launcher:focus-visible { outline: 3px solid rgba(47,125,217,.28); outline-offset: 3px; }
@media (max-width: 720px) {
  .chat-launcher { right: 12px; bottom: 12px; min-height: 50px; padding: 7px 13px 7px 9px; border-radius: 14px; }
  .chat-launcher svg { width: 29px; height: 29px; }
  .consent-banner:not([hidden]) ~ .chat-launcher { bottom: 215px; }
}

/* Modulo dati prima della chat */
.chat-gate[hidden] { display: none; }
.chat-gate {
  position: fixed;
  inset: 0;
  z-index: 120;
}
.chat-gate-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(18, 31, 47, .48);
  backdrop-filter: blur(2px);
}
.chat-gate-dialog {
  position: relative;
  z-index: 1;
  width: min(520px, calc(100% - 28px));
  margin: min(10vh, 70px) auto 0;
  padding: 28px 26px 24px;
  border-radius: 20px;
  border: 1px solid #dde8ef;
  background: #fff;
  box-shadow: 0 28px 70px rgba(20, 37, 56, .22);
}
.chat-gate-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  color: #5f6f82;
  background: #f3f7fa;
  cursor: pointer;
}
.chat-gate-close:hover { background: #eaf1f6; }
.chat-gate-close span { font-size: 24px; line-height: 1; }
.chat-gate-kicker {
  margin: 0 0 8px;
  color: var(--green-dark);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.chat-gate-dialog h2 {
  margin: 0;
  max-width: none;
  font-size: clamp(26px, 4vw, 34px);
  line-height: 1.08;
  letter-spacing: -.03em;
}
.chat-gate-lead {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}
.chat-gate-form { margin-top: 20px; }
.chat-field { display: block; }
.chat-field + .chat-field { margin-top: 14px; }
.chat-field span {
  display: block;
  margin-bottom: 7px;
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 700;
}
.chat-field input {
  width: 100%;
  min-height: 50px;
  padding: 0 14px;
  border: 1px solid #cfdde7;
  border-radius: 11px;
  color: var(--ink);
  background: #fff;
  font: inherit;
}
.chat-field input:focus {
  border-color: #94b7d2;
  box-shadow: 0 0 0 4px rgba(62, 131, 197, .12);
  outline: 0;
}
.chat-gate-note {
  margin: 14px 0 0;
  color: #6a7788;
  font-size: 12px;
  line-height: 1.5;
}
.chat-gate-actions {
  margin-top: 18px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}
.secondary-button,
.primary-chat-button {
  min-height: 46px;
  padding: 0 16px;
  border-radius: 10px;
  font: inherit;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
}
.secondary-button {
  border: 1px solid #d3e0e8;
  color: #5d6d81;
  background: #fff;
}
.secondary-button:hover { background: #f8fbfd; }
.primary-chat-button {
  border: 0;
  color: #fff;
  background: var(--ink);
}
.primary-chat-button:hover { background: #20314b; }
body.chat-gate-open { overflow: hidden; }
@media (max-width: 520px) {
  .chat-gate-dialog { margin-top: 22px; padding: 24px 18px 20px; }
  .chat-gate-actions { flex-direction: column-reverse; }
  .secondary-button, .primary-chat-button { width: 100%; }
}
