/* ==========================================================
   PIM4IAM – bozza nuovo sito
   Palette ripresa dal logo: navy + azzurro "quadrati"
   ========================================================== */

/* font ospitati in locale (niente chiamate a Google Fonts, GDPR) */
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("../fonts/inter.woff2") format("woff2"); }
@font-face { font-family: "Manrope"; font-style: normal; font-weight: 200 800; font-display: swap; src: url("../fonts/manrope.woff2") format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 100 800; font-display: swap; src: url("../fonts/jetbrains-mono.woff2") format("woff2"); }

:root {
  --navy-950: #0B1630;
  --navy-900: #122247;
  --navy-800: #1B2F55;   /* quadrati scuri del logo */
  --navy-600: #2E4A80;
  --blue-500: #2F6FDE;   /* accento */
  --blue-400: #5B8FEA;
  --blue-200: #BFD0EC;   /* quadrati chiari del logo */
  --blue-100: #DDE7F7;
  --blue-50:  #F3F7FD;
  --ink:      #14203A;
  --ink-soft: #4A5875;
  --line:     #DCE3EF;
  --white:    #FFFFFF;
  --ok:   #1FA463;
  --wait: #E8A317;
  --err:  #D9463B;

  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 10px 30px -12px rgba(18, 34, 71, .25);
  --container: 1160px;
  --font-head: "Manrope", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
}

/* ---------- lingua ---------- */
html[data-lang="it"] [data-l="en"],
html[data-lang="en"] [data-l="it"] { display: none !important; }

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue-500); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { font-family: var(--font-head); line-height: 1.2; margin: 0 0 .6em; color: var(--navy-900); }
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); font-weight: 800; letter-spacing: -.02em; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); font-weight: 800; letter-spacing: -.015em; }
h3 { font-size: 1.15rem; font-weight: 700; }
p { margin: 0 0 1em; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 24px; }
@media (max-width: 600px) { .container { padding: 0 16px; } }

/* ---------- bottoni ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: .5em; padding: .85em 1.5em;
  border-radius: 999px; font-weight: 600; font-size: .98rem;
  border: 2px solid transparent; cursor: pointer;
  transition: background .2s, color .2s, border-color .2s, transform .2s;
  font-family: var(--font-body);
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--blue-500); color: var(--white); }
.btn-primary:hover { background: var(--navy-600); }
.btn-ghost { border-color: var(--blue-200); color: var(--navy-800); background: transparent; }
.btn-ghost:hover { border-color: var(--navy-800); }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 24px; height: 70px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--navy-900); }
.brand:hover { text-decoration: none; }
.brand-text { font-family: var(--font-head); font-weight: 800; font-size: 1.35rem; letter-spacing: .02em; }
.brand-text b { color: var(--blue-500); }

.main-nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.main-nav a {
  color: var(--ink-soft); font-weight: 500; font-size: .95rem;
  padding: .45em .8em; border-radius: 999px;
}
.main-nav a:hover { color: var(--navy-900); background: var(--blue-50); text-decoration: none; }
.main-nav .nav-cta { background: var(--navy-800); color: var(--white); margin-left: 6px; }
.main-nav .nav-cta:hover { background: var(--blue-500); color: var(--white); }

.header-tools { display: flex; align-items: center; gap: 10px; }
.brand + .header-tools { margin-left: auto; }
.lang-switch { display: flex; border: 1px solid var(--line); border-radius: 999px; padding: 3px; }
.lang-switch button {
  border: 0; background: transparent; cursor: pointer;
  font: 600 .8rem var(--font-body); color: var(--ink-soft);
  padding: .35em .7em; border-radius: 999px;
}
.lang-switch button[aria-pressed="true"] { background: var(--navy-800); color: var(--white); }

.nav-toggle { display: none; width: 42px; height: 42px; border: 0; background: transparent; cursor: pointer; padding: 10px; }
.nav-toggle span { display: block; height: 2px; background: var(--navy-900); margin: 5px 0; transition: transform .25s, opacity .25s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 980px) {
  .nav-toggle { display: block; }
  .header-tools { margin-left: auto; }
  .main-nav {
    position: absolute; top: 70px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--white); border-bottom: 1px solid var(--line);
    padding: 8px 16px 16px; margin: 0;
    display: none;
  }
  .main-nav.open { display: flex; }
  .main-nav a { padding: .8em .6em; border-radius: var(--radius-sm); }
  .main-nav .nav-cta { margin: 8px 0 0; text-align: center; }
}

/* ---------- hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(900px 500px at 85% 10%, var(--blue-100), transparent 60%),
    linear-gradient(180deg, var(--blue-50), var(--white));
  padding: 80px 0 48px;
}
.hero-inner { display: grid; grid-template-columns: 1.15fr .85fr; gap: 56px; align-items: center; }
.eyebrow {
  display: inline-block; font-weight: 600; font-size: .85rem; color: var(--navy-600);
  background: var(--white); border: 1px solid var(--blue-200);
  padding: .35em .9em; border-radius: 999px; margin-bottom: 1.4em;
}
.hero h1 em { font-style: normal; color: var(--blue-500); }
.lead { font-size: 1.15rem; color: var(--ink-soft); max-width: 36em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 1.8em; }

/* il badge TecAlliance ha già la sua cornice: niente riquadri attorno */
.hero-partner {
  display: inline-flex; align-items: center; gap: 18px; margin-top: 2.2em;
  color: var(--ink-soft); font-size: .9rem; line-height: 1.35;
  transition: transform .2s;
}
.hero-partner:hover { text-decoration: none; transform: translateY(-1px); }
.hero-partner img { height: 64px; width: auto; filter: drop-shadow(0 4px 10px rgba(18,34,71,.12)); }
.hero-partner > span { border-left: 1px solid var(--line); padding-left: 18px; }
.hero-partner b { display: block; color: var(--navy-900); font-size: .98rem; }
@media (max-width: 480px) {
  .hero-partner { flex-direction: column; align-items: flex-start; gap: 10px; }
  .hero-partner > span { border-left: 0; padding-left: 0; }
}

.hero-visual { position: relative; min-height: 380px; }
.sq { position: absolute; border: 4px solid var(--blue-200); }
.sq-1 { width: 110px; height: 110px; top: 0; left: 18%; }
.sq-2 { width: 190px; height: 80px; top: 50px; left: 45%; }
.sq-3 { width: 120px; height: 120px; top: 140px; left: 0; border-color: var(--navy-800); border-width: 5px; }
.sq-4 { width: 120px; height: 120px; top: 210px; left: 12%; border-color: var(--navy-800); border-width: 5px; }
.sq-5 { width: 90px; height: 100px; bottom: 0; right: 6%; }

.hero-card {
  position: absolute; right: 0; top: 90px; width: min(340px, 88%);
  background: var(--white); border-radius: var(--radius);
  box-shadow: var(--shadow); border: 1px solid var(--line);
  overflow: hidden;
}
.hc-head {
  display: flex; align-items: center; gap: 6px;
  background: var(--navy-900); color: var(--blue-100);
  padding: 10px 14px; font-size: .8rem; font-weight: 600;
}
.hc-head .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--navy-600); }
.hc-title { margin-left: 8px; }
.hc-list { list-style: none; margin: 0; padding: 6px 0; }
.hc-list li {
  display: flex; align-items: center; gap: 12px;
  padding: 9px 16px; font-size: .88rem; border-bottom: 1px solid var(--blue-50);
}
.hc-list li:last-child { border-bottom: 0; }
.hc-list code { font-family: var(--font-mono); font-size: .82rem; color: var(--navy-900); }
.hc-meta { margin-left: auto; color: var(--ink-soft); font-size: .78rem; }
.light { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.light.ok   { background: var(--ok);   box-shadow: 0 0 0 3px rgba(31,164,99,.18); }
.light.wait { background: var(--wait); box-shadow: 0 0 0 3px rgba(232,163,23,.18); }
.light.err  { background: var(--err);  box-shadow: 0 0 0 3px rgba(217,70,59,.18); }

.stats {
  list-style: none; margin: 64px 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px;
  background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
}
.stats li { background: var(--white); padding: 22px 20px; font-size: .92rem; color: var(--ink-soft); }
.stats strong { display: block; font-family: var(--font-head); font-size: 1.8rem; color: var(--navy-800); line-height: 1.2; margin-bottom: 2px; }

@media (max-width: 900px) {
  .hero { padding-top: 48px; }
  .hero-inner { grid-template-columns: 1fr; gap: 24px; }
  .hero-visual { min-height: 330px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .hero-visual { min-height: 300px; }
  .sq-2 { width: 130px; }
  .hero-card { top: 70px; }
}

/* ---------- partner TecAlliance ---------- */
.partner { position: relative; z-index: 0; padding: 72px 0;border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--white); }
.partner-inner { display: grid; grid-template-columns: .9fr 1.1fr; gap: 64px; align-items: center; }
.partner-logo { position: relative; max-width: 520px; margin-left: 18px; }
.partner-logo::before {
  content: ""; position: absolute; inset: -18px 18px 18px -18px; z-index: -1;
  border: 4px solid var(--blue-200); border-radius: 16px;
}
.partner-logo img { display: block; width: 100%; filter: drop-shadow(0 12px 24px rgba(18,34,71,.18)); }
.partner-copy > p { color: var(--ink-soft); }
.partner-copy b { color: var(--navy-900); }
.partner-points { list-style: none; margin: 1.2em 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.partner-points li {
  font-size: .88rem; font-weight: 600; color: var(--navy-800);
  background: var(--blue-50); border: 1px solid var(--blue-100);
  padding: .45em .9em; border-radius: 999px;
}
.partner-highlight {
  position: relative; overflow: hidden;
  display: flex; align-items: center; gap: 36px;
  margin-top: 64px; padding: 36px 44px;
  background: linear-gradient(120deg, var(--navy-900), var(--navy-600));
  border-radius: 20px; color: var(--blue-100);
  box-shadow: 0 20px 40px -20px rgba(18,34,71,.55);
}
.partner-highlight::after {
  content: ""; position: absolute; right: -40px; top: -40px; width: 180px; height: 180px;
  border: 5px solid rgba(191,208,236,.15); pointer-events: none;
}
.ph-number {
  flex: none; font-family: var(--font-head); font-weight: 800; line-height: 1;
  font-size: clamp(3.6rem, 8vw, 5.5rem); color: var(--white); letter-spacing: -.03em;
}
.ph-number span { color: var(--blue-400); }
.ph-copy { flex: 1; border-left: 2px solid rgba(191,208,236,.25); padding-left: 36px; }
.ph-title { font-family: var(--font-head); font-weight: 800; font-size: clamp(1.4rem, 3vw, 2rem); line-height: 1.2; color: var(--white); margin: 0 0 .35em; }
.ph-text { margin: 0; font-size: 1.05rem; color: var(--blue-200); }
.ph-text b { color: var(--white); }
.ph-btn { flex: none; position: relative; z-index: 1; background: var(--white); color: var(--navy-900); }
.ph-btn:hover { background: var(--blue-100); }
@media (max-width: 900px) {
  .partner-highlight { flex-direction: column; align-items: flex-start; gap: 18px; padding: 28px 24px; margin-top: 48px; }
  .ph-copy { border-left: 0; padding-left: 0; }
}

@media (max-width: 900px) {
  .partner { padding: 56px 0; }
  .partner-inner { grid-template-columns: 1fr; gap: 40px; }
  .partner-logo { margin-top: 18px; }
}

/* ---------- sezioni ---------- */
.section { padding: 96px 0; }
.section-tint { background: var(--blue-50); }
.section-head { max-width: 760px; margin-bottom: 48px; }
.section-head p:last-child { color: var(--ink-soft); font-size: 1.08rem; }
.kicker {
  font-family: var(--font-mono); font-size: .8rem; font-weight: 500;
  letter-spacing: .08em; text-transform: uppercase; color: var(--blue-500);
  margin-bottom: .8em;
}
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.split > div > p { color: var(--ink-soft); }
@media (max-width: 900px) {
  .section { padding: 64px 0; }
  .split { grid-template-columns: 1fr; gap: 40px; }
  .split-reverse > :last-child { order: 2; }
}

/* confronto prima / dopo */
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.compare-col { border-radius: var(--radius); padding: 24px; }
.compare-col h3 { font-size: 1rem; margin-bottom: 1em; }
.compare-col ul { list-style: none; margin: 0; padding: 0; }
.compare-col li { padding: .55em 0 .55em 1.6em; position: relative; font-size: .95rem; border-top: 1px solid rgba(0,0,0,.06); }
.compare-col li::before { position: absolute; left: 0; font-weight: 700; }
.before { background: #F7F8FA; border: 1px dashed #C9D0DC; }
.before h3 { color: var(--ink-soft); }
.before li { color: var(--ink-soft); }
.before li::before { content: "✕"; color: var(--err); }
.after { background: var(--navy-800); color: var(--blue-100); }
.after h3 { color: var(--white); }
.after li { border-top-color: rgba(255,255,255,.1); }
.after li::before { content: "✓"; color: #7FE0AE; }
@media (max-width: 480px) { .compare { grid-template-columns: 1fr; } }

/* card */
.cards { display: grid; gap: 20px; }
.cards-4 { grid-template-columns: repeat(4, 1fr); }
.cards-3 { grid-template-columns: repeat(3, 1fr); }
.card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px 24px; transition: box-shadow .2s, transform .2s;
}
.card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.card p { color: var(--ink-soft); font-size: .95rem; margin: 0; }
.card-icon {
  width: 44px; height: 44px; border-radius: 10px; background: var(--blue-50);
  display: grid; place-items: center; margin-bottom: 18px; border: 1px solid var(--blue-100);
}
.card-icon svg, .node-db svg { width: 22px; height: 22px; fill: none; stroke: var(--blue-500); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 980px) { .cards-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 760px) { .cards-3 { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .cards-4 { grid-template-columns: 1fr; } }

/* ---------- architettura ---------- */
.arch {
  display: grid; grid-template-columns: 1fr 60px 1fr 60px 1fr; align-items: center;
  background: var(--blue-50); border: 1px solid var(--line); border-radius: 20px;
  padding: 36px;
}
.arch-col { display: flex; flex-direction: column; gap: 12px; }
.arch-label { font-family: var(--font-mono); font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-soft); margin: 0 0 4px; }
.node {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 12px 16px; font-weight: 600; font-size: .92rem; color: var(--navy-900);
}
.node-key { border-color: var(--blue-400); box-shadow: inset 3px 0 0 var(--blue-500); }
.node small { display: block; font-weight: 500; color: var(--ink-soft); font-size: .8rem; }
.arch-core { align-items: stretch; text-align: center; }
.node-db { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.node-db svg { width: 28px; height: 28px; }
.sync { text-align: center; font-size: 1.4rem; color: var(--blue-500); line-height: 1; }
.node-core {
  background: var(--navy-800); color: var(--white); border: 0;
  padding: 28px 16px; border-radius: var(--radius);
  box-shadow: 0 0 0 6px var(--blue-100);
}
.node-core strong { font-family: var(--font-head); font-size: 1.5rem; letter-spacing: .03em; display: block; }
.node-core small { color: var(--blue-200); }
.node .tag {
  font-family: var(--font-mono); font-size: .7rem; background: var(--blue-500); color: var(--white);
  padding: 2px 7px; border-radius: 999px; margin-left: 6px; vertical-align: 1px;
}
.arch-arrow { height: 2px; background: var(--blue-400); position: relative; margin: 0 6px; }
.arch-arrow::after {
  content: ""; position: absolute; right: -2px; top: -5px;
  border-left: 9px solid var(--blue-400); border-top: 6px solid transparent; border-bottom: 6px solid transparent;
}
@media (max-width: 900px) {
  .arch { grid-template-columns: 1fr; padding: 24px 20px; gap: 0; }
  .arch-arrow { width: 2px; height: 36px; margin: 10px auto; }
  .arch-arrow::after { right: -5px; top: auto; bottom: -2px; border-left: 6px solid transparent; border-right: 6px solid transparent; border-top: 9px solid var(--blue-400); border-bottom: 0; }
}

/* ---------- caratteristiche (dark) ---------- */
.section-dark { background: var(--navy-950); color: var(--blue-100); position: relative; overflow: hidden; }
.section-dark::before {
  content: ""; position: absolute; right: -60px; top: -60px; width: 260px; height: 260px;
  border: 5px solid rgba(191, 208, 236, .12); box-shadow: 70px 70px 0 -5px transparent;
}
.section-dark::after {
  content: ""; position: absolute; right: 80px; top: 90px; width: 160px; height: 160px;
  border: 5px solid rgba(191, 208, 236, .08);
}
.section-dark h2, .section-dark h3 { color: var(--white); }
.section-dark .kicker { color: var(--blue-400); }
.section-dark .section-head p:last-child { color: var(--blue-200); }
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: rgba(191,208,236,.14); border-radius: var(--radius); overflow: hidden; position: relative; z-index: 1; }
.feature { background: var(--navy-950); padding: 30px 28px; }
.feature:nth-child(1) { grid-row: span 2; background: var(--navy-900); display: flex; flex-direction: column; justify-content: flex-end; }
.feature:nth-child(1) h3 { font-size: 1.7rem; }
.feature p { color: var(--blue-200); font-size: .95rem; margin: 0; }
@media (max-width: 900px) {
  /* su schermi stretti i quadrati decorativi finiscono dietro al titolo */
  .section-dark::before, .section-dark::after { display: none; }
  .features { grid-template-columns: 1fr 1fr; }
  .feature:nth-child(1) { grid-row: auto; grid-column: 1 / -1; }
}
@media (max-width: 560px) { .features { grid-template-columns: 1fr; } }

/* ---------- IDP ---------- */
.checklist { list-style: none; padding: 0; margin: 1.4em 0; }
.checklist li { position: relative; padding: .5em 0 .5em 2em; color: var(--ink-soft); }
.checklist li::before {
  content: "✓"; position: absolute; left: 0; top: .72em; width: 20px; height: 20px;
  background: var(--blue-500); color: var(--white); border-radius: 5px;
  font-size: .75rem; font-weight: 700; line-height: 20px; text-align: center;
}
.checklist b { color: var(--navy-900); }
.note {
  font-size: .92rem; background: var(--blue-50); border-left: 3px solid var(--blue-500);
  padding: .8em 1em; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; color: var(--navy-800) !important;
}
.idp-visual { display: flex; flex-direction: column; gap: 28px; }
.partner-badge { text-align: center; }
.partner-badge img { width: 100%; max-width: 420px; margin: 0 auto 12px; filter: drop-shadow(0 8px 18px rgba(18,34,71,.14)); }
.partner-badge p { margin: 0; font-size: .85rem; font-weight: 600; color: var(--navy-600); }
.timeline { position: relative; display: flex; flex-direction: column; gap: 14px; }
.timeline::before { content: ""; position: absolute; left: 20px; top: 20px; bottom: 20px; width: 2px; background: var(--blue-200); }
.tl-step {
  position: relative; display: flex; align-items: center; gap: 16px;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 12px 18px 12px 12px; font-weight: 600; color: var(--navy-900); font-size: .95rem;
}
.tl-n {
  flex: none; width: 30px; height: 30px; border-radius: 8px;
  display: grid; place-items: center; background: var(--navy-800); color: var(--white);
  font-family: var(--font-mono); font-size: .85rem;
}
.tl-step:last-child .tl-n { background: var(--ok); }

/* ---------- quote ---------- */
.quote { padding: 80px 0; background: var(--navy-800); }
.quote blockquote {
  margin: 0 auto; max-width: 900px; text-align: center;
  font-family: var(--font-head); font-weight: 700; font-size: clamp(1.35rem, 2.8vw, 2rem);
  line-height: 1.35; color: var(--white);
}

/* ---------- contatti ---------- */
#contatti .split { align-items: start; }
.people { display: grid; gap: 16px; margin: 1.6em 0; }
.person { border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; }
.person h3 { margin-bottom: .1em; }
.person .role { font-size: .88rem; color: var(--blue-500); font-weight: 600; margin-bottom: .6em; }
.person p:last-child { margin: 0; font-size: .95rem; word-break: break-word; }
.address { font-size: .95rem; }

.contact-form {
  background: var(--blue-50); border: 1px solid var(--line); border-radius: 20px;
  padding: 32px; display: flex; flex-direction: column; gap: 16px;
}
.contact-form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.contact-form label { display: flex; flex-direction: column; gap: 6px; font-size: .88rem; font-weight: 600; color: var(--navy-900); }
.contact-form input:not([type="checkbox"]), .contact-form textarea {
  font: 400 1rem var(--font-body); color: var(--ink);
  border: 1px solid var(--line); background: var(--white); border-radius: var(--radius-sm);
  padding: .7em .85em; width: 100%;
}
.contact-form input:focus, .contact-form textarea:focus { outline: 2px solid var(--blue-400); outline-offset: 1px; border-color: transparent; }
.contact-form .consent { flex-direction: row; align-items: flex-start; gap: 10px; font-weight: 400; color: var(--ink-soft); }
.contact-form .consent input { margin-top: 5px; }
.contact-form .btn { align-self: flex-start; }
.contact-form .btn:disabled { opacity: .6; cursor: wait; transform: none; }
.form-msg { margin: 0; font-size: .92rem; border-radius: var(--radius-sm); padding: .8em 1em; }
.form-ok { color: #125C38; background: #E6F6EE; border: 1px solid #A8DEC2; }
.form-err { color: #8A2820; background: #FCEBEA; border: 1px solid #F0B7B2; }
.form-msg[hidden] { display: none; }
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
@media (max-width: 520px) {
  .contact-form { padding: 22px 18px; }
  .contact-form .row { grid-template-columns: 1fr; }
}

/* ---------- pagine legali / 404 ---------- */
.back-link { margin-left: auto; font-weight: 600; font-size: .95rem; }
.legal { padding: 64px 0 96px; }
.legal .container { max-width: 800px; }
.legal h1 { font-size: clamp(2rem, 4vw, 2.6rem); }
.legal h2 { font-size: 1.3rem; margin-top: 2.2em; }
.legal p, .legal li { color: var(--ink-soft); }
.legal ul { padding-left: 1.2em; }
.legal li { margin-bottom: .4em; }
.legal b { color: var(--ink); }
.legal .updated { font-size: .9rem; font-family: var(--font-mono); color: var(--blue-500); }
.legal table { width: 100%; border-collapse: collapse; font-size: .92rem; margin: 1em 0; }
.legal th, .legal td { text-align: left; padding: .7em .8em; border-bottom: 1px solid var(--line); vertical-align: top; }
.legal th { color: var(--navy-900); background: var(--blue-50); }
.notfound { min-height: 60vh; display: grid; place-items: center; text-align: center; padding: 80px 0; }
.notfound .code { font-family: var(--font-mono); color: var(--blue-500); font-size: 1rem; letter-spacing: .1em; }

/* ---------- footer ---------- */
.site-footer { background: var(--navy-950); color: var(--blue-200); padding: 36px 0; font-size: .88rem; }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 32px; }
.footer-inner p { margin: 0; }
.brand-footer .brand-text { color: var(--white); font-size: 1.1rem; }
.brand-footer img { filter: brightness(1.6); }
.footer-partner { display: inline-flex; }
.footer-partner img { height: 46px; width: auto; }
.footer-links { margin-left: auto !important; display: flex; gap: 18px; }
.footer-links a { color: var(--blue-200); }
@media (max-width: 700px) { .footer-links { margin-left: 0 !important; } }
