/* =========================================================================
   Base comune. I colori e i caratteri di ciascun sito sono definiti
   nella sezione "Tema" in fondo al file.
   Nessun font esterno: si usano solo i caratteri di sistema.
   ========================================================================= */

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  color-scheme: light;
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg, canvas { display: block; max-width: 100%; }
.icon { width: 1.5rem; height: 1.5rem; flex: none; }

a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { color: var(--link-hover); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 4px; }
main:focus { outline: none; }

h1, h2, h3 {
  font-family: var(--font-head);
  color: var(--heading);
  line-height: 1.15;
  margin: 0 0 .6em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.1rem, 1.3rem + 3.2vw, 3.6rem); font-weight: 800; letter-spacing: -.025em; }
h2 { font-size: clamp(1.6rem, 1.15rem + 1.7vw, 2.4rem); font-weight: 750; letter-spacing: -.02em; }
h3 { font-size: 1.18rem; font-weight: 700; letter-spacing: -.005em; line-height: 1.3; }
p { margin: 0 0 1em; }
ul, ol { margin: 0 0 1em; padding-left: 1.25em; }
code { font-family: var(--font-mono); font-size: .9em; background: var(--grey-50); padding: .1em .35em; border-radius: 4px; }

.container { width: min(100% - 2.5rem, var(--container)); margin-inline: auto; }
.container.narrow { width: min(100% - 2.5rem, 820px); }

.skip-link {
  position: absolute; left: 1rem; top: -100px; z-index: 100;
  background: var(--navy); color: #fff; padding: .6rem 1rem; border-radius: 8px; font-weight: 700;
}
.skip-link:focus { top: 1rem; color: #fff; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
[hidden] { display: none !important; }

/* --- Intestazione e menu ------------------------------------------------ */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--header-bg);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s ease, box-shadow .3s ease;
}
.site-header.is-scrolled { border-color: var(--line); box-shadow: 0 10px 30px -24px rgba(10, 30, 60, .55); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 74px; }

.brand { display: flex; align-items: center; gap: .7rem; text-decoration: none; color: var(--heading); }
.brand img { width: 40px; height: 40px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name { font-family: var(--font-head); font-weight: 800; font-size: 1.05rem; letter-spacing: -.01em; }
.brand-person { font-size: .8rem; color: var(--muted); }

.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: .15rem; }
.main-nav a {
  position: relative; display: block; padding: .55rem .75rem; border-radius: 8px;
  color: var(--heading); text-decoration: none; font-weight: 600; font-size: .95rem;
  transition: background-color .2s ease, color .2s ease;
}
.main-nav a:hover { background: var(--blue-soft); color: var(--heading); }
.main-nav a[aria-current="page"]::after {
  content: ""; position: absolute; left: .75rem; right: .75rem; bottom: .3rem;
  height: 2px; border-radius: 2px; background: var(--accent);
}
.main-nav .is-cta { margin-left: .5rem; }
.main-nav .is-cta a { background: var(--navy); color: #fff; padding-inline: 1.1rem; border-radius: 999px; }
.main-nav .is-cta a:hover { background: var(--blue); color: #fff; }
.main-nav .is-cta a[aria-current="page"]::after { display: none; }

.nav-toggle { display: none; }

@media (max-width: 960px) {
  .nav-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    width: 46px; height: 46px; border: 1px solid var(--line-strong); border-radius: 12px;
    background: var(--surface); cursor: pointer; color: var(--heading);
  }
  .nav-toggle-bars { position: relative; width: 20px; height: 14px; }
  .nav-toggle-bars span {
    position: absolute; left: 0; width: 100%; height: 2px; border-radius: 2px; background: currentColor;
    transition: transform .3s ease, opacity .2s ease, top .3s ease;
  }
  .nav-toggle-bars span:nth-child(1) { top: 0; }
  .nav-toggle-bars span:nth-child(2) { top: 6px; }
  .nav-toggle-bars span:nth-child(3) { top: 12px; }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bars span:nth-child(1) { top: 6px; transform: rotate(45deg); }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bars span:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bars span:nth-child(3) { top: 6px; transform: rotate(-45deg); }

  .main-nav {
    position: absolute; left: 0; right: 0; top: 100%;
    background: var(--surface); border-bottom: 1px solid var(--line);
    box-shadow: 0 30px 40px -30px rgba(10, 30, 60, .45);
    padding: .75rem 1.25rem 1.5rem;
    max-height: calc(100vh - 74px); overflow-y: auto;
  }
  .main-nav ul { flex-direction: column; align-items: stretch; gap: .1rem; }
  .main-nav a { padding: .9rem 1rem; font-size: 1.05rem; border-radius: 10px; }
  .main-nav a[aria-current="page"]::after { left: 1rem; right: auto; width: 22px; bottom: .5rem; }
  .main-nav .is-cta { margin: .6rem 0 0; }
  .main-nav .is-cta a { text-align: center; }

  .js .main-nav {
    visibility: hidden; opacity: 0; transform: translateY(-10px);
    transition: opacity .22s ease, transform .3s ease, visibility 0s linear .3s;
  }
  .js .main-nav.is-open {
    visibility: visible; opacity: 1; transform: none;
    transition: opacity .22s ease, transform .3s ease, visibility 0s;
  }
  .js .main-nav li { opacity: 0; transform: translateY(-6px); transition: opacity .25s ease, transform .3s ease; }
  .js .main-nav.is-open li { opacity: 1; transform: none; }
  .js .main-nav.is-open li:nth-child(2) { transition-delay: .03s; }
  .js .main-nav.is-open li:nth-child(3) { transition-delay: .06s; }
  .js .main-nav.is-open li:nth-child(4) { transition-delay: .09s; }
  .js .main-nav.is-open li:nth-child(5) { transition-delay: .12s; }
  .js .main-nav.is-open li:nth-child(6) { transition-delay: .15s; }

  .no-js .header-inner { flex-wrap: wrap; }
  .no-js .main-nav { position: static; box-shadow: none; border: 0; padding: 0 0 1rem; width: 100%; }
}

/* --- Breadcrumb ---------------------------------------------------------- */
.breadcrumb { font-size: .9rem; color: var(--muted); margin-bottom: 1.75rem; }
.breadcrumb ol { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .3rem; }
.breadcrumb li + li::before { content: "/"; margin-right: .3rem; color: var(--line-strong); }
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--heading); text-decoration: underline; }
.breadcrumb [aria-current] { color: var(--heading); font-weight: 600; }

/* --- Pulsanti ----------------------------------------------------------- */
.btn {
  --btn-bg: var(--accent);
  --btn-fg: var(--on-accent);
  --btn-border: transparent;
  position: relative; isolation: isolate; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .85rem 1.4rem; min-height: 48px;
  border: 2px solid var(--btn-border); border-radius: 999px;
  background: var(--btn-bg); color: var(--btn-fg);
  font: inherit; font-weight: 700; font-size: 1rem; line-height: 1.2;
  text-decoration: none; cursor: pointer;
  transition: transform .2s ease, box-shadow .25s ease, background-color .2s ease, border-color .2s ease;
}
.btn::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, .45) 50%, transparent 65%);
  transform: translateX(-120%);
  transition: transform .7s ease;
}
.btn:hover { color: var(--btn-fg); transform: translateY(-2px); box-shadow: 0 12px 24px -14px rgba(10, 30, 60, .6); }
.btn:hover::after { transform: translateX(120%); }
.btn:active { transform: translateY(0); box-shadow: none; }
.btn-secondary { --btn-bg: transparent; --btn-fg: var(--heading); --btn-border: var(--line-strong); }
.btn-secondary:hover { --btn-border: var(--heading); box-shadow: none; }
.btn-secondary::after { display: none; }
.btn-small { padding: .55rem 1.05rem; min-height: 40px; font-size: .92rem; }
.btn.is-loading { cursor: progress; opacity: .8; }
.btn.is-loading::before {
  content: ""; width: 1em; height: 1em; border-radius: 50%;
  border: 2px solid currentColor; border-right-color: transparent;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* --- Hero ----------------------------------------------------------------- */
.hero { position: relative; overflow: hidden; padding: clamp(2.5rem, 6vw, 5.5rem) 0 clamp(3rem, 6vw, 5.5rem); }
.hero-grid { display: grid; gap: clamp(2.5rem, 5vw, 4.5rem); align-items: center; }
@media (min-width: 961px) { .hero-grid { grid-template-columns: 1.05fr .95fr; } }

.eyebrow { font-size: .95rem; font-weight: 700; color: var(--accent-ink); margin-bottom: .9rem; }
.lead { font-size: clamp(1.08rem, 1rem + .4vw, 1.27rem); color: var(--text-soft); max-width: 60ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.75rem; }

.hero-copy > * { animation: rise .7s cubic-bezier(.2, .7, .2, 1) both; }
.hero-copy > :nth-child(2) { animation-delay: .07s; }
.hero-copy > :nth-child(3) { animation-delay: .14s; }
.hero-copy > :nth-child(4) { animation-delay: .21s; }
.hero-copy > :nth-child(5) { animation-delay: .28s; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

.hero-points { list-style: none; padding: 0; margin: 1.75rem 0 0; display: flex; flex-wrap: wrap; gap: .5rem 1.4rem; color: var(--text-soft); font-size: .95rem; }
.hero-points li { display: inline-flex; align-items: center; gap: .45rem; }
.hero-points .icon { width: 1.1rem; height: 1.1rem; color: var(--accent-ink); }

.page-hero { position: relative; overflow: hidden; padding: clamp(1.5rem, 3vw, 2.5rem) 0 clamp(2.75rem, 5vw, 4.5rem); background: var(--hero-bg); border-bottom: 1px solid var(--line); }
.page-hero-grid { display: grid; gap: 2rem; align-items: center; }
@media (min-width: 961px) { .page-hero-grid { grid-template-columns: 1.4fr .6fr; } }
.page-hero h1 { max-width: 20ch; }
.page-hero-plain h1 { max-width: none; }
.meta-line { font-size: .9rem; color: var(--muted); margin: 0; }

/* Orbite decorative delle pagine interne */
.orbit { position: relative; width: min(100%, 280px); aspect-ratio: 1; margin-inline: auto; }
.orbit-ring { position: absolute; border-radius: 50%; border: 1px solid var(--orbit-line); animation: orbit-spin 24s linear infinite; }
.orbit-ring-1 { inset: 0; }
.orbit-ring-2 { inset: 16%; animation-duration: 17s; animation-direction: reverse; border-style: dashed; }
.orbit-ring-3 { inset: 32%; animation-duration: 11s; }
.orbit-dot { position: absolute; top: -5px; left: calc(50% - 5px); width: 10px; height: 10px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 5px var(--accent-glow); }
.orbit-ring-2 .orbit-dot { background: var(--blue); box-shadow: 0 0 0 5px var(--blue-glow); top: auto; bottom: -5px; }
.orbit-ring-3 .orbit-dot { width: 7px; height: 7px; top: -3.5px; left: calc(50% - 3.5px); box-shadow: none; }
.orbit-core {
  position: absolute; inset: 41%; border-radius: 50%; display: grid; place-items: center;
  background: var(--orbit-core); color: var(--orbit-core-fg);
  box-shadow: 0 16px 34px -16px rgba(10, 30, 60, .7);
}
.orbit-core .icon { width: 44%; height: 44%; }
@keyframes orbit-spin { to { transform: rotate(360deg); } }
@media (max-width: 960px) { .page-hero-visual { display: none; } }

/* --- Sezioni --------------------------------------------------------------- */
.section { padding: clamp(3.5rem, 7vw, 6rem) 0; }
.section + .section { border-top: 1px solid var(--line); }
.section-alt { background: var(--grey-50); }
.section + .section-alt, .section-alt + .section { border-top: 0; }
.section-head { max-width: 46rem; margin-bottom: clamp(2rem, 4vw, 3rem); }
.section-head p { color: var(--text-soft); font-size: 1.1rem; }
.text-block { max-width: 46rem; }
.text-block p { color: var(--text-soft); }
.text-block h3 { margin-top: 1.6rem; }
.small-note { font-size: .95rem; color: var(--muted); }

.split { display: grid; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
@media (min-width: 961px) {
  .split { grid-template-columns: 1fr 1fr; }
  .split-wide-text { grid-template-columns: 1.2fr .8fr; }
}

.grid { display: grid; gap: 1.25rem; }
@media (min-width: 700px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1040px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } .grid-4 { grid-template-columns: repeat(4, 1fr); } }

/* Schede servizio */
.card {
  position: relative; display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.6rem 1.5rem 1.5rem;
  transition: border-color .25s ease;
}
.card:hover { border-color: var(--line-strong); }
.card h3 { margin-bottom: .45rem; }
.card p { color: var(--text-soft); margin-bottom: 1rem; }
.card-icon {
  width: 46px; height: 46px; border-radius: 12px; margin-bottom: 1.1rem;
  display: grid; place-items: center; background: var(--blue-soft); color: var(--blue);
}
.card-link { margin-top: auto; font-weight: 700; text-decoration: none; }
.card-link:hover { text-decoration: underline; }
.card ul { padding-left: 1.1em; color: var(--text-soft); margin-bottom: 1.2rem; }
.card ul li + li { margin-top: .25rem; }

/* Elenco caratteristiche (senza schede) */
.feature-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 2rem 2.5rem; }
@media (min-width: 700px) { .feature-list { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1040px) { .feature-list { grid-template-columns: repeat(3, 1fr); } }
.feature-list li { display: grid; grid-template-columns: auto 1fr; gap: .25rem 1rem; align-items: start; }
.feature-list .icon { grid-row: span 2; width: 1.75rem; height: 1.75rem; color: var(--accent-ink); margin-top: .1rem; }
.feature-list h3 { margin: 0; font-size: 1.08rem; }
.feature-list p { margin: 0; color: var(--text-soft); }

/* Passaggi in sequenza */
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: .9rem; counter-reset: step; }
.steps li { position: relative; padding: 1.15rem 1.25rem 1.2rem 4rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.steps li::before {
  counter-increment: step; content: counter(step);
  position: absolute; left: 1.15rem; top: 1.1rem;
  width: 1.9rem; height: 1.9rem; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--navy); color: #fff; font-weight: 800; font-size: .9rem;
}
.steps h3 { margin: 0 0 .3rem; font-size: 1.06rem; }
.steps p { margin: 0; color: var(--text-soft); }
@media (min-width: 900px) { .steps-cols { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .steps-cols-3 { grid-template-columns: repeat(3, 1fr); } }

/* Elenchi con spunta */
.checklist { list-style: none; padding: 0; margin: 0 0 1.25rem; display: grid; gap: .75rem; }
.checklist li { position: relative; padding-left: 2rem; color: var(--text-soft); }
.checklist li::before {
  content: ""; position: absolute; left: 0; top: .2em; width: 1.3rem; height: 1.3rem; border-radius: 50%;
  background: var(--blue-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.8 8.4l2.7 2.7 5.7-6.2' fill='none' stroke='%232c62b0' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 72% no-repeat;
}
@media (min-width: 760px) { .checklist-2 { grid-template-columns: 1fr 1fr; column-gap: 2rem; } }

.tags { list-style: none; padding: 0; margin: 0 0 1.5rem; display: flex; flex-wrap: wrap; gap: .5rem; }
.tags li { padding: .4rem .85rem; border-radius: 999px; background: var(--blue-soft); color: var(--navy); font-weight: 600; font-size: .92rem; }

.link-list { list-style: none; padding: 0; margin: 1.5rem 0 0; display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; }
.link-list a { font-weight: 700; }

/* Riquadro che rimanda al sito ufficiale */
.note-box {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem 2rem;
  padding: 1.5rem 1.75rem; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--accent);
}
.note-box h2, .note-box h3 { font-size: 1.2rem; margin: 0 0 .25rem; }
.note-box p { margin: 0; color: var(--text-soft); max-width: 52ch; }
.note-box .btn .icon { width: 1.1rem; height: 1.1rem; }

/* Domande frequenti */
.faq { display: grid; gap: .75rem; max-width: 52rem; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 0 1.25rem; transition: border-color .2s ease; }
.faq details[open] { border-color: var(--line-strong); }
.faq summary { cursor: pointer; list-style: none; position: relative; padding: 1.1rem 2.25rem 1.1rem 0; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary h3 { margin: 0; font-size: 1.05rem; display: inline; }
.faq summary::after {
  content: ""; position: absolute; right: .3rem; top: 50%; width: 9px; height: 9px;
  border-right: 2px solid var(--blue); border-bottom: 2px solid var(--blue);
  transform: translateY(-70%) rotate(45deg); transition: transform .25s ease;
}
.faq details[open] summary::after { transform: translateY(-25%) rotate(-135deg); }
.faq details p { margin: 0; padding-bottom: 1.15rem; color: var(--text-soft); }

/* Fascia finale di invito al contatto */
.cta-band {
  position: relative; overflow: hidden; isolation: isolate;
  display: grid; gap: 1.5rem; align-items: center;
  padding: clamp(2rem, 5vw, 3.5rem); border-radius: 24px;
  background: var(--navy); color: #c9d6e8;
}
@media (min-width: 861px) { .cta-band { grid-template-columns: 1fr auto; } }
.cta-band h2 { color: #fff; margin-bottom: .4rem; }
.cta-band p { margin: 0; max-width: 54ch; }
.cta-band::before {
  content: ""; position: absolute; z-index: -1; right: -90px; top: -90px; width: 280px; height: 280px; border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .14);
  box-shadow: 0 0 0 46px rgba(255, 255, 255, .03), 0 0 0 92px rgba(255, 255, 255, .02);
  animation: breathe 9s ease-in-out infinite;
}
@keyframes breathe { 50% { transform: scale(1.08); } }

/* --- Pannello con nodi e linee (canvas) ------------------------------------ */
.panel {
  position: relative; overflow: hidden; border-radius: 20px;
  background: var(--panel-bg); border: 1px solid var(--panel-border);
}
.panel-network { aspect-ratio: 5 / 4; }
.panel-network canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.panel-tag {
  position: absolute; z-index: 1;
  display: inline-flex; align-items: center; gap: .45rem;
  padding: .45rem .8rem; border-radius: 999px;
  background: var(--tag-bg); color: var(--tag-fg); border: 1px solid var(--tag-border);
  font-size: .85rem; font-weight: 700; box-shadow: 0 12px 26px -18px rgba(10, 30, 60, .6);
  animation: drift 7s ease-in-out infinite;
}
.panel-tag::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.panel-tag:nth-of-type(2) { animation-delay: -1.4s; }
.panel-tag:nth-of-type(3) { animation-delay: -2.8s; }
.panel-tag:nth-of-type(4) { animation-delay: -4.2s; }
.panel-tag:nth-of-type(5) { animation-delay: -5.6s; }
.tag-a { top: 12%; left: 8%; }
.tag-b { top: 22%; right: 9%; }
.tag-c { top: 50%; left: 34%; }
.tag-d { bottom: 18%; left: 10%; }
.tag-e { bottom: 10%; right: 12%; }
@keyframes drift { 50% { transform: translateY(-7px); } }

/* --- Flusso di dati (HTML + CSS) ------------------------------------------- */
.flow { list-style: none; padding: 0; margin: 0 0 1.5rem; display: grid; gap: 2.5rem; counter-reset: none; }
@media (min-width: 861px) { .flow { grid-template-columns: repeat(5, 1fr); gap: 2.75rem; } }
.flow-step {
  position: relative; text-align: center; padding: 1.1rem 1rem 1.2rem;
  background: var(--flow-bg); border: 1px solid var(--flow-border); border-radius: 14px;
}
.flow-step .flow-icon {
  width: 44px; height: 44px; margin: 0 auto .65rem; border-radius: 50%;
  display: grid; place-items: center; background: var(--flow-icon-bg); color: var(--flow-icon-fg);
}
.flow-step strong { display: block; color: var(--flow-title); font-size: 1rem; }
.flow-step .flow-sub { display: block; font-size: .88rem; color: var(--flow-sub); margin-top: .15rem; }
.flow-conn {
  position: absolute; left: 50%; top: 100%; width: 2px; height: 2.5rem; transform: translateX(-50%);
  background: repeating-linear-gradient(to bottom, var(--flow-line) 0 6px, transparent 6px 12px);
  background-size: 2px 12px;
  animation: flow-v .9s linear infinite;
}
.flow-conn::after {
  content: ""; position: absolute; left: 50%; top: 0; width: 9px; height: 9px; margin-left: -4.5px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 0 4px var(--accent-glow);
  animation: dot-v 2.2s ease-in-out infinite;
}
.flow-step:nth-child(2) .flow-conn::after { animation-delay: .45s; }
.flow-step:nth-child(3) .flow-conn::after { animation-delay: .9s; }
.flow-step:nth-child(4) .flow-conn::after { animation-delay: 1.35s; }
.flow-step:last-child .flow-conn { display: none; }
@keyframes flow-v { to { background-position: 0 12px; } }
@keyframes dot-v { 0% { top: 0; opacity: 0; } 15%, 85% { opacity: 1; } 100% { top: 100%; opacity: 0; } }
@keyframes flow-h { to { background-position: 12px 0; } }
@keyframes dot-h { 0% { left: 0; opacity: 0; } 15%, 85% { opacity: 1; } 100% { left: 100%; opacity: 0; } }
@media (min-width: 861px) {
  .flow-conn {
    left: 100%; top: 50%; width: 2.75rem; height: 2px; transform: translateY(-50%);
    background: repeating-linear-gradient(to right, var(--flow-line) 0 6px, transparent 6px 12px);
    background-size: 12px 2px; animation-name: flow-h;
  }
  .flow-conn::after { top: 50%; left: 0; margin: -4.5px 0 0 -4.5px; animation-name: dot-h; }
}

/* --- Contatti e modulo ------------------------------------------------------- */
.contact-layout { display: grid; gap: clamp(2rem, 5vw, 3.5rem); align-items: start; }
@media (min-width: 961px) { .contact-layout { grid-template-columns: .85fr 1.15fr; } }
.contact-list { list-style: none; padding: 0; margin: 0 0 1.5rem; display: grid; gap: .75rem; }
.contact-list li { display: flex; gap: .9rem; align-items: flex-start; padding: .95rem 1rem; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.ci-icon { flex: none; width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: var(--blue-soft); color: var(--blue); }
.ci-icon .icon { width: 1.3rem; height: 1.3rem; }
.ci-label { display: block; font-size: .85rem; color: var(--muted); font-weight: 600; }
.contact-list a { font-weight: 600; word-break: break-word; }
.ci-note { font-size: .9rem; color: var(--muted); }

.form-card { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: clamp(1.25rem, 3vw, 2.25rem); box-shadow: 0 30px 60px -45px rgba(10, 30, 60, .6); }
.form-card > h2 { font-size: 1.5rem; }
.form-grid { position: relative; display: grid; gap: 1.15rem; }
@media (min-width: 640px) { .form-grid { grid-template-columns: 1fr 1fr; } }
.field-full { grid-column: 1 / -1; }
.field label { display: block; font-weight: 600; font-size: .95rem; margin-bottom: .35rem; color: var(--heading); }
.req { color: var(--accent-ink); }
.optional { font-weight: 400; color: var(--muted); }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; font-size: 1rem; color: var(--text);
  background: #fff; border: 1.5px solid var(--line-strong); border-radius: 10px; padding: .75rem .9rem;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.field select {
  appearance: none; -webkit-appearance: none; padding-right: 2.5rem;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 6l4 4 4-4' fill='none' stroke='%235d6b7e' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") right .85rem center / 16px no-repeat;
}
.field textarea { min-height: 170px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 4px var(--blue-glow); }
.field [aria-invalid="true"] { border-color: #b42318; }
.field-hint { font-size: .87rem; color: var(--muted); margin: .35rem 0 0; }
.field-error { font-size: .9rem; color: #b42318; font-weight: 600; margin: .35rem 0 0; }
.checkbox { display: flex !important; gap: .7rem; align-items: flex-start; font-weight: 400 !important; color: var(--text) !important; }
.checkbox input { width: 1.2rem; height: 1.2rem; margin: .2rem 0 0; flex: none; accent-color: var(--blue); }
.field-hp { position: absolute !important; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.form-actions { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; justify-content: space-between; margin-top: 1.4rem; }
.form-note { font-size: .88rem; color: var(--muted); margin: 0; }

.alert { padding: 1rem 1.2rem; border-radius: 12px; border: 1px solid; margin-bottom: 1.4rem; }
.alert:focus { outline: none; box-shadow: 0 0 0 3px var(--blue-glow); }
.alert-success { background: #ecfdf3; border-color: #a6f4c5; color: #05603a; }
.alert-error { background: #fef3f2; border-color: #fecdca; color: #912018; }

/* --- Testi legali ------------------------------------------------------------ */
.prose h2 { font-size: 1.45rem; margin-top: 2.4rem; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin-top: 1.5rem; }
.prose p, .prose li { color: var(--text-soft); }
.table-wrap { overflow-x: auto; margin: 0 0 1.25rem; border: 1px solid var(--line); border-radius: 12px; }
.prose table { width: 100%; min-width: 560px; border-collapse: collapse; font-size: .95rem; }
.prose th, .prose td { text-align: left; vertical-align: top; padding: .75rem .9rem; border-bottom: 1px solid var(--line); }
.prose th { background: var(--grey-50); color: var(--heading); }
.prose tr:last-child td { border-bottom: 0; }

/* --- Footer ------------------------------------------------------------------- */
.site-footer { background: var(--footer-bg); color: #b4c2d6; padding: clamp(3rem, 6vw, 4.5rem) 0 0; font-size: .95rem; }
.site-footer a { color: #e6edf7; }
.site-footer a:hover { color: var(--accent-light); }
.footer-grid { display: grid; gap: 2.25rem; }
@media (min-width: 720px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1040px) { .footer-grid { grid-template-columns: 1.5fr 1.1fr .8fr .8fr; } }
.footer-brand { display: flex; align-items: center; gap: .6rem; color: #fff; font-family: var(--font-head); font-weight: 800; font-size: 1.1rem; }
.footer-owner strong { color: #fff; }
.footer-title { font-size: 1rem; color: #fff; margin-bottom: 1rem; letter-spacing: 0; }
.site-footer address { font-style: normal; display: grid; gap: .45rem; }
.footer-links { list-style: none; padding: 0; margin: 0; display: grid; gap: .45rem; }
.footer-data { margin: 0; display: grid; gap: .6rem; }
.footer-data dt { font-size: .85rem; color: #8ea1bb; }
.footer-data dd { margin: 0; color: #e6edf7; font-variant-numeric: tabular-nums; }
.footer-bottom {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1.5rem;
  margin-top: 2.75rem; padding: 1.25rem 0 1.6rem; border-top: 1px solid rgba(255, 255, 255, .1); font-size: .88rem;
}
.footer-bottom p { margin: 0; }
.footer-bottom ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 1.25rem; }

/* --- Avviso cookie --------------------------------------------------------- */
.cookie-banner {
  position: fixed; z-index: 80; left: 1rem; right: 1rem; bottom: 1rem; max-width: 540px;
  display: flex; align-items: center; gap: 1rem;
  padding: 1rem 1.1rem 1rem 1.35rem; border-radius: 16px;
  background: var(--surface); color: var(--text); border: 1px solid var(--line);
  box-shadow: 0 24px 50px -24px rgba(10, 30, 60, .55);
  opacity: 0; transform: translateY(24px) scale(.98);
  transition: opacity .35s ease, transform .45s cubic-bezier(.2, .8, .2, 1);
}
.cookie-banner::before { content: ""; position: absolute; left: 0; top: 16px; bottom: 16px; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent); }
.cookie-banner.is-visible { opacity: 1; transform: none; }
.cookie-banner.is-leaving { opacity: 0; transform: translateY(16px); }
.cookie-banner p { margin: 0; font-size: .92rem; line-height: 1.5; }
@media (max-width: 520px) { .cookie-banner { flex-direction: column; align-items: stretch; } }

/* --- Entrata delle sezioni ------------------------------------------------------ */
.js .reveal {
  opacity: 0; transform: translateY(18px);
  transition: opacity .7s ease, transform .8s cubic-bezier(.2, .7, .2, 1);
  transition-delay: var(--reveal-delay, 0ms);
}
.js .reveal.is-visible { opacity: 1; transform: none; }

/* Animazioni ferme quando l'elemento non è visibile (vedi motion.js) */
.is-offscreen, .is-offscreen * { animation-play-state: paused !important; }

/* --- Movimento ridotto -------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    animation-delay: 0s !important;
    transition-duration: .001ms !important;
    transition-delay: 0s !important;
  }
  .js .reveal { opacity: 1; transform: none; }
  .btn:hover { transform: none; }
}

/* --- Stampa -------------------------------------------------------------------- */
@media print {
  .site-header, .cookie-banner, .hero-visual, .page-hero-visual, .cta-band::before { display: none !important; }
  body { color: #000; }
}

/* Spaziature tra blocchi consecutivi */
.faq + .note-box, .checklist + .note-box { margin-top: 2.5rem; }
.section-head + .tags { margin-top: -1rem; }
.tags + .feature-list { margin-top: 2.5rem; }
.note-box + .cta-band { margin-top: 2rem; }
.contact-layout h3 { margin-top: 1.75rem; }

/* =========================================================================
   Tema webdesignerfirenze.it – chiaro, editoriale, orientato al design
   ========================================================================= */
:root {
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-head: "Avenir Next", Avenir, "Segoe UI Variable Display", "Segoe UI", "Helvetica Neue", system-ui, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;

  --navy: #10284a;
  --blue: #2c62b0;
  --blue-soft: #e9f0fa;
  --blue-glow: rgba(44, 98, 176, .16);
  --accent: #f07b22;
  --accent-ink: #a8500a;
  --accent-light: #ffb27a;
  --accent-glow: rgba(240, 123, 34, .2);
  --on-accent: #10284a;

  --bg: #ffffff;
  --surface: #ffffff;
  --grey-50: #f5f7fa;
  --line: #e4e9f0;
  --line-strong: #c3ccd8;
  --muted: #5b687a;
  --text: #1a2534;
  --text-soft: #3d4a5c;
  --heading: #10284a;
  --link: #2c62b0;
  --link-hover: #10284a;
  --focus: #f07b22;

  --header-bg: rgba(255, 255, 255, .92);
  --hero-bg: #f5f7fa;
  --footer-bg: #10284a;
  --radius: 14px;
  --container: 1180px;

  --orbit-line: #c9d5e6;
  --orbit-core: #10284a;
  --orbit-core-fg: #ffffff;

  --panel-bg: #f5f7fa;
  --panel-border: #e4e9f0;
  --tag-bg: #ffffff;
  --tag-fg: #10284a;
  --tag-border: #e4e9f0;
  --net-node: #2c62b0;
  --net-line: 44, 98, 176;
  --net-packet: #f07b22;

  --flow-bg: #ffffff;
  --flow-border: #e4e9f0;
  --flow-icon-bg: #e9f0fa;
  --flow-icon-fg: #2c62b0;
  --flow-title: #10284a;
  --flow-sub: #5b687a;
  --flow-line: #9db4d6;
}

/* Hero della home: la pagina che si compone da sola */
.hero-home {
  background-color: var(--grey-50);
  background-image: radial-gradient(circle at 1px 1px, #d5deea 1px, transparent 0);
  background-size: 22px 22px;
  border-bottom: 1px solid var(--line);
}
.hero-home h1 { max-width: 19ch; }

.hero-visual { position: relative; padding: 1.5rem 0; }
.mock {
  position: relative; border-radius: 18px; background: #fff; border: 1px solid var(--line);
  box-shadow: 0 40px 70px -40px rgba(16, 40, 74, .55), 0 2px 6px rgba(16, 40, 74, .06);
}
.mock svg { width: 100%; height: auto; }

.m-frame { fill: #fff; stroke: none; }
.m-bar { fill: #f5f7fa; }
.m-line { stroke: #e4e9f0; stroke-width: 1; fill: none; }
.m-dot { fill: #d3dbe6; }
.m-url { fill: #fff; stroke: #e4e9f0; }
.m-url-text { font: 600 11px var(--font-body); fill: #8592a4; }
.m-brand { fill: #10284a; }
.m-ink { fill: #10284a; }
.m-ink2 { fill: #3d4a5c; }
.m-soft { fill: #dfe5ee; }
.m-soft-blue { fill: #e9f0fa; }
.m-navy { fill: #10284a; }
.m-accent { fill: #f07b22; }
.m-media { fill: #e9f0fa; }
.m-sun { fill: #f07b22; opacity: .85; }
.m-mount { fill: #2c62b0; opacity: .55; }
.m-mount-2 { fill: #10284a; opacity: .7; }
.m-card { fill: #fff; stroke: #e4e9f0; }
.m-cursor { fill: #10284a; stroke: #fff; stroke-width: 1.5; }

.build {
  opacity: 0; transform-box: fill-box; transform-origin: left center;
  animation: build-in .7s cubic-bezier(.2, .8, .2, 1) forwards;
}
.pop {
  opacity: 0; transform-box: fill-box; transform-origin: center;
  animation: pop-in .55s cubic-bezier(.3, 1.5, .5, 1) forwards;
}
.d1 { animation-delay: .25s; } .d2 { animation-delay: .45s; } .d3 { animation-delay: .7s; }
.d4 { animation-delay: .95s; } .d5 { animation-delay: 1.2s; } .d6 { animation-delay: 1.45s; }
.d7 { animation-delay: 1.6s; } .d8 { animation-delay: 1.75s; } .d9 { animation-delay: 2s; }
@keyframes build-in { from { opacity: 0; transform: scaleX(.15); } to { opacity: 1; transform: none; } }
@keyframes pop-in { from { opacity: 0; transform: scale(.5); } to { opacity: 1; transform: none; } }

.cursor { opacity: 0; animation: cursor-move 8s ease-in-out 2.6s infinite; }
@keyframes cursor-move {
  0% { opacity: 0; transform: translate(0, 0); }
  8% { opacity: 1; }
  30%, 38% { transform: translate(-370px, -100px); }
  34% { transform: translate(-370px, -100px) scale(.85); }
  62%, 70% { transform: translate(-160px, -20px); }
  92% { opacity: 1; }
  100% { opacity: 0; transform: translate(0, 0); }
}
.m-press { opacity: 0; transform-box: fill-box; transform-origin: center; animation: press 8s ease-out 2.6s infinite; }
@keyframes press { 0%, 33% { opacity: 0; transform: scale(.6); } 35% { opacity: .5; } 45%, 100% { opacity: 0; transform: scale(1.6); } }

.chip {
  position: absolute; z-index: 2; display: inline-flex; align-items: center; gap: .45rem;
  padding: .5rem .85rem; border-radius: 999px; background: #fff; border: 1px solid var(--line);
  box-shadow: 0 16px 30px -20px rgba(16, 40, 74, .6);
  font-size: .86rem; font-weight: 700; color: var(--heading);
  opacity: 0; animation: chip-in .6s cubic-bezier(.2, .8, .2, 1) forwards, drift 7s ease-in-out infinite;
}
.chip .icon { width: 1rem; height: 1rem; color: var(--accent-ink); }
.chip-a { top: 0; left: -1rem; animation-delay: 2.2s, 2.8s; }
.chip-b { top: 46%; right: -1.25rem; animation-delay: 2.4s, 3.4s; }
.chip-c { bottom: 0; left: 18%; animation-delay: 2.6s, 4s; }
@keyframes chip-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@media (max-width: 600px) { .chip-a { left: 0; } .chip-b { right: 0; } }

/* Pannello "come lavoro" */
.panel-it { background: #fff; }

/* Rifiniture dopo la verifica visiva */
.cookie-banner .btn { flex: none; white-space: nowrap; }
.hero-dark .code-card { border: 1px solid rgba(255, 255, 255, .12); }
