/* =========================================================
   Smartfeed — foglio di stile del sito
   Font: Archivo (variabile, assi wdth/wght), ospitato in locale
   Colori derivati dal logo (teal #20A8A0 / menta #68D8C8)
   ========================================================= */

@font-face {
  font-family: "Archivo";
  src: url("../fonts/archivo-var.woff") format("woff");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}

:root {
  --paper: #F3F7F7;
  --paper-2: #E4EEEE;
  --surface: #FFFFFF;
  --ink: #0F2A2E;
  --ink-soft: #3C5558;
  --line: #C5D6D6;
  --teal: #18918A;      /* grafica (contrasto ≥3:1), mai testo piccolo */
  --teal-ink: #0A6B66;  /* testo e link, contrasto AA su --paper */
  --mint: #68D8C8;
  --signal: #C27600;    /* il punto di controllo umano */
  --signal-ink: #8A5300;
  --band: #0F2A2E;      /* fascia scura */
  --band-text: #E8F3F2;
  --band-soft: #A9C6C4;
  --focus: #C27600;
  --tint: #DDF3EF;
  --brand: #0A6B66;    /* fondo pulsanti e fascia contatti */
  --btn-bg: #0A6B66;
  --btn-fg: #FFFFFF;
  --field-border: #5F7F82;
  --error: #B3261E;

  --wide: 125%;
  --measure: 66ch;
  --max: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
  --radius-s: 4px;
  --radius-m: 10px;

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0C2124;
    --paper-2: #123034;
    --surface: #10292C;
    --ink: #E6F1F0;
    --ink-soft: #A9C2C0;
    --line: #2A4A4D;
    --teal: #3CC2B8;
    --teal-ink: #7FE0D2;
    --signal: #F2B04A;
    --signal-ink: #F6C478;
    --band: #06171A;
    --tint: #123034;
    --btn-bg: #68D8C8;
    --btn-fg: #0F2A2E;
    --field-border: #7FA3A6;
    --error: #FF8A80;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #0C2124; --paper-2: #123034; --surface: #10292C; --ink: #E6F1F0;
  --ink-soft: #A9C2C0; --line: #2A4A4D; --teal: #3CC2B8; --teal-ink: #7FE0D2;
  --signal: #F2B04A; --signal-ink: #F6C478; --band: #06171A; --tint: #123034;
  --btn-bg: #68D8C8; --btn-fg: #0F2A2E; --field-border: #7FA3A6; --error: #FF8A80; color-scheme: dark;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  font-stretch: 100%;
  font-weight: 400;
  text-rendering: optimizeLegibility;
}
img, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--teal-ink); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 2px; }

h1, h2, h3 {
  font-stretch: var(--wide);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin: 0 0 .6em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.1rem, 1.3rem + 3.6vw, 3.9rem); line-height: 1.04; }
h2 { font-size: clamp(1.7rem, 1.2rem + 2vw, 2.6rem); }
h3 { font-size: clamp(1.15rem, 1.05rem + .45vw, 1.4rem); line-height: 1.2; }
p { margin: 0 0 1em; max-width: var(--measure); }
.lede { font-size: clamp(1.125rem, 1.05rem + .35vw, 1.3rem); color: var(--ink-soft); line-height: 1.55; }

.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.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;
}

.skip-link {
  position: absolute; left: 12px; top: -100px; z-index: 100;
  background: var(--ink); color: var(--paper); padding: 10px 16px; border-radius: var(--radius-s);
  font-weight: 600; text-decoration: none;
}
.skip-link:focus { top: 12px; }

/* ---------- pulsanti ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 48px; padding: .7em 1.3em;
  border-radius: var(--radius-s);
  font: inherit; font-weight: 600; font-size: 1rem; text-decoration: none; cursor: pointer;
  border: 2px solid var(--btn-bg); background: var(--btn-bg); color: var(--btn-fg);
}
.btn:hover { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.btn--ghost { background: transparent; color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 68px; }
.brand { display: inline-flex; align-items: center; min-height: 44px; }
.brand img { width: 168px; height: auto; }
.brand .logo-dark { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .brand .logo-light { display: none; }
  :root:not([data-theme="light"]) .brand .logo-dark { display: block; }
}

.nav-toggle {
  display: none; min-height: 44px; min-width: 44px; padding: 0 14px;
  background: transparent; color: var(--ink); border: 1.5px solid var(--line); border-radius: var(--radius-s);
  font: inherit; font-weight: 600; cursor: pointer;
}
.site-nav ul { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.site-nav a {
  display: block; padding: 10px 12px; color: var(--ink); text-decoration: none; font-weight: 500; font-size: .98rem; white-space: nowrap;
  border-radius: var(--radius-s);
}
.site-nav a:hover { background: var(--paper-2); }
.site-nav a.nav-cta { background: var(--btn-bg); color: var(--btn-fg); margin-left: 8px; }
.site-nav a.nav-cta:hover { background: var(--ink); color: var(--paper); }

@media (max-width: 1180px) {
  .nav-toggle { display: inline-flex; align-items: center; }
  .site-nav { display: none; position: absolute; left: 0; right: 0; top: 100%;
    background: var(--paper); border-bottom: 1px solid var(--line); }
  .site-nav.is-open { display: block; }
  .site-nav ul { flex-direction: column; padding: 8px var(--gutter) 20px; }
  .site-nav a { padding: 14px 4px; border-bottom: 1px solid var(--line); border-radius: 0; }
  .site-nav a.nav-cta { margin: 12px 0 0; text-align: center; border-radius: var(--radius-s); }
}

/* ---------- sezioni ---------- */
.section { padding-block: clamp(64px, 9vw, 120px); }
.section--white { background: var(--surface); }
.section--tint { background: var(--tint); }
.section-head { max-width: 760px; margin-bottom: clamp(32px, 5vw, 56px); }

/* ---------- hero ---------- */
.hero { padding-block: clamp(40px, 7vw, 96px) clamp(56px, 8vw, 104px); background: var(--tint); position: relative; overflow: hidden; }
.hero::before { content: ""; position: absolute; width: 720px; height: 720px; right: -220px; top: -260px; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--mint) 45%, transparent) 0%, transparent 65%); pointer-events: none; }
.hero .wrap { position: relative; }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
.hero h1 { max-width: 14ch; }
.hero .lede { max-width: 54ch; text-wrap: pretty; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero-note { flex: 1 0 100%; max-width: 46ch; margin: 4px 0 0; font-size: .95rem; color: var(--ink-soft); }
.hero-note strong { color: var(--ink); font-weight: 600; }
@media (max-width: 920px) { .hero .wrap { grid-template-columns: 1fr; } }
/* telefono: una frase sola e un solo pulsante pieno; il secondo diventa un link */
@media (max-width: 560px) {
  .lede-more { display: none; }
  .hero-actions { flex-direction: column; align-items: stretch; gap: 4px; margin-top: 24px; }
  .hero-note { order: 1; flex: none; margin: 6px 0 2px; text-align: center; }
  .hero-actions .btn--ghost { order: 2; border-color: transparent; min-height: 44px; text-decoration: underline; text-underline-offset: .2em; }
  .hero-actions .btn--ghost:hover { background: transparent; border-color: transparent; color: var(--teal-ink); text-decoration-thickness: 2px; }
}

/* diagramma prima / dopo */
.ba { width: 100%; }
.ba text { font-family: "Archivo", system-ui, sans-serif; }
.ba .panel { stroke-width: 1.5; }
.ba-before .panel { fill: var(--paper); stroke: var(--line); }
.ba-after .panel { fill: var(--surface); stroke: var(--teal); stroke-width: 2; }
.ba-title { font-size: 18px; font-weight: 700; font-stretch: 125%; fill: var(--ink); }
.ba-sub, .ba-note { font-size: 14px; fill: var(--ink-soft); }
.ba .box rect { fill: var(--surface); stroke: var(--field-border); stroke-width: 1.5; }
.ba-after .box rect { fill: var(--tint); stroke: var(--teal); }
.ba .box text { font-size: 16px; font-weight: 600; fill: var(--ink); text-anchor: middle; }
.ba .manual path { fill: none; stroke: var(--signal); stroke-width: 2.5; stroke-dasharray: 5 6; stroke-linecap: round; }
.ba .manual .head { stroke-dasharray: none; stroke-linejoin: round; }
.ba .doc rect { fill: var(--surface); stroke: var(--signal); stroke-width: 2; }
.ba .person circle, .ba .person path { fill: var(--ink-soft); }
.ba .person.ok circle:not(.badge), .ba .person.ok path:not(.tick) { fill: var(--ink); }
.ba .warn circle { fill: var(--signal); }
.ba .warn path { stroke: #fff; stroke-width: 3; stroke-linecap: round; }
.ba .link path { fill: none; stroke: var(--teal); stroke-width: 4; stroke-linecap: round; }
.ba .link-flow path { fill: none; stroke: var(--mint); stroke-width: 4; stroke-linecap: round; stroke-dasharray: 2 14; }
.ba .badge { fill: var(--mint); stroke: var(--ink); stroke-width: 2; }
.ba .tick { fill: none; stroke: var(--ink); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.flow-fig { margin: 0; }
.flow-fig figcaption { margin-top: 12px; font-size: .95rem; color: var(--ink-soft); max-width: 60ch; }

@media (prefers-reduced-motion: no-preference) {
  .ba-after { opacity: 0; transform: translateY(10px); animation: rise .7s .5s cubic-bezier(.2,.7,.2,1) forwards; }
  .ba .link path { stroke-dasharray: 500; stroke-dashoffset: 500; animation: draw 1s 1.1s ease-out forwards; }
  .ba .link-flow path { opacity: 0; animation: fadein .4s 2s forwards, run 1.6s 2s linear infinite; }
}
@keyframes rise { to { opacity: 1; transform: none; } }
@keyframes run { to { stroke-dashoffset: -32; } }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fadein { to { opacity: 1; } }

/* ---------- approccio ---------- */
.approach .wrap { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(32px, 6vw, 96px); }
.approach h2 { max-width: 16ch; }
.approach .body p { font-size: 1.125rem; }
.approach .body p:first-child { font-size: clamp(1.2rem, 1.1rem + .5vw, 1.45rem); line-height: 1.45; color: var(--ink); }
@media (max-width: 820px) { .approach .wrap { grid-template-columns: 1fr; } }

/* ---------- cosa facciamo ---------- */
.areas { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 clamp(32px, 5vw, 72px); }
.areas { row-gap: clamp(40px, 5vw, 64px); }
.area-img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; border-radius: var(--radius-m); margin-bottom: 22px; background: var(--tint); }
.area ul { margin: 14px 0 0; padding: 0; list-style: none; }
.area li { position: relative; padding-left: 22px; margin-bottom: 8px; color: var(--ink-soft); max-width: 60ch; }
.area li::before { content: ""; position: absolute; left: 2px; top: .7em; width: 10px; height: 2px; background: var(--teal); }
@media (max-width: 820px) {
  .areas { grid-template-columns: 1fr; }
  .area-img { display: none; }
}

/* processi coperti */
.processes { margin-top: clamp(40px, 6vw, 72px); padding-block: clamp(24px, 3.5vw, 40px); border-block: 1px solid var(--line); }
.processes > h3 { margin-bottom: 4px; }
.processes > p { margin: 0; color: var(--ink-soft); }
.process-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px clamp(24px, 4vw, 48px); margin: 28px 0 0; }
.process-grid dt { font-weight: 700; font-stretch: 112%; margin-bottom: 4px; }
.process-grid dd { margin: 0; color: var(--ink-soft); font-size: .98rem; }
@media (max-width: 900px) { .process-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .process-grid { grid-template-columns: 1fr; } }

/* ---------- metodo ---------- */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; counter-reset: step; }
.steps li { counter-increment: step; position: relative; padding: 56px 24px 8px 0; border-top: 2px solid var(--line); }
.steps li::before {
  content: counter(step); position: absolute; top: -18px; left: 0;
  width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  background: #0A6B66; border: 2px solid #0A6B66; color: #fff;
  font-weight: 700; font-size: .95rem;
}
.steps li:last-child::before { background: #8A5300; border-color: #8A5300; color: #fff; }
.steps li { border-top-color: color-mix(in srgb, var(--teal) 45%, transparent); }
.steps p { color: var(--ink-soft); font-size: 1rem; }
@media (max-width: 900px) {
  .steps { grid-template-columns: 1fr; }
  .steps li { border-top: 0; border-left: 2px solid var(--line); padding: 0 0 32px 36px; }
  .steps li::before { top: -4px; left: -18px; }
}

/* ---------- strumenti ---------- */
.tools { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(24px, 3vw, 40px); }
.tool { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-m); padding: clamp(24px, 3.5vw, 40px); }
.tool--feature { grid-row: span 2; display: flex; flex-direction: column; }
.tool-kind { font-size: .9rem; color: var(--teal-ink); font-weight: 600; margin-bottom: 6px; }
.tool-img { width: 100%; height: auto; border-radius: var(--radius-s); margin-bottom: 20px; }
/* logo del prodotto: riquadro sempre bianco, leggibile anche nel tema scuro */
.tool-logo { display: flex; align-items: center; justify-content: center; height: 180px; padding: 20px 28px; margin-bottom: 20px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-s); }
.tool-logo img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
.tool p { color: var(--ink-soft); }
.tool dl { margin: 16px 0 0; display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: .96rem; }
.tool dt { font-weight: 600; }
.tool dd { margin: 0; color: var(--ink-soft); }
.protocols { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 14px 0 0; padding: 0; }
.protocols li { font-size: .88rem; padding: 4px 10px; border: 1px solid var(--line); border-radius: 999px; color: var(--ink); background: var(--paper); }
@media (max-width: 900px) { .tools { grid-template-columns: 1fr; } .tool--feature { grid-row: auto; } }

/* video con consenso */
.video { margin-top: auto; padding-top: 24px; }
.video-frame { position: relative; aspect-ratio: 16 / 9; min-height: 0; border-radius: var(--radius-s); overflow: hidden; background: var(--ink); }
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-frame:has(.video-gate) { aspect-ratio: auto; min-height: 240px; }
.video-gate { position: relative; min-height: 240px; display: flex; flex-direction: column; justify-content: center; gap: 14px; padding: clamp(16px, 4vw, 32px); color: #E8F3F2; }
.video-gate p { color: #C9DEDC; font-size: .95rem; margin: 0; max-width: 46ch; }
.video-gate a { color: var(--mint); }
.video-gate .btn { align-self: flex-start; background: var(--mint); border-color: var(--mint); color: #0F2A2E; }
.video-gate .btn:hover { background: #fff; border-color: #fff; }

/* ---------- prodotto Label Scanner ---------- */
.product { background: var(--band); color: var(--band-text); }
.product .wrap { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(32px, 5vw, 72px); align-items: start; }
.product h2 { color: #fff; }
.product .lede { color: #CFE7E4; }
.product p { color: var(--band-soft); }
.product a:not(.btn) { color: var(--mint); }
.product .btn { background: var(--mint); border-color: var(--mint); color: #0F2A2E; }
.product .btn:hover { background: #fff; border-color: #fff; }
.kicker { color: var(--mint) !important; font-weight: 600; margin-bottom: 14px; }
.ls-logo { width: 190px; background: #fff; padding: 12px 14px; border-radius: var(--radius-m); margin-bottom: 22px; }
.checks { list-style: none; margin: 0 0 28px; padding: 0; }
.checks li { position: relative; padding-left: 32px; margin-bottom: 12px; color: #fff; max-width: 56ch; }
.checks li::before { content: ""; position: absolute; left: 0; top: .3em; width: 18px; height: 18px; border-radius: 50%; background: var(--mint); }
.checks li::after { content: ""; position: absolute; left: 5px; top: calc(.3em + 5px); width: 7px; height: 4px; border-left: 2px solid #0F2A2E; border-bottom: 2px solid #0F2A2E; transform: rotate(-45deg); }
.product-media img { display: block; width: 100%; height: auto; border-radius: var(--radius-m); border: 1px solid #2C4C50; }
.product .video { padding-top: 20px; }
.product .video-frame { background: #123F44; }
@media (max-width: 900px) { .product .wrap { grid-template-columns: 1fr; } }

/* ---------- perché noi (fascia scura) ---------- */
.band { background: var(--band); color: var(--band-text); border-top: 0 !important; }
.band + .section { border-top: 0; }
.band h2 { color: #fff; }
.band .lede { color: var(--band-soft); }
.band a { color: var(--mint); }
.compare-wrap { overflow-x: auto; }
.compare { width: 100%; border-collapse: collapse; min-width: 640px; }
.compare caption { text-align: left; color: var(--band-soft); padding-bottom: 16px; font-size: .95rem; }
.compare th, .compare td { text-align: left; vertical-align: top; padding: 18px 20px 18px 0; border-bottom: 1px solid #2C4C50; }
.compare thead th { font-weight: 600; color: var(--band-soft); font-size: .95rem; border-bottom: 2px solid #3E6266; }
.compare thead th.us { color: var(--mint); }
.compare tbody th { font-weight: 700; font-stretch: 112%; color: #fff; width: 22%; }
.compare td.them { color: #A9C2C0; width: 33%; }
.compare td.us { color: #fff; }
.compare td.us::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--mint); margin-right: 10px; vertical-align: .05em; }

@media (max-width: 720px) {
  .compare, .compare tbody { display: block; min-width: 0; width: 100%; }
  .compare thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .compare tr { display: block; padding: 18px 0; border-bottom: 1px solid #2C4C50; }
  .compare th, .compare td { display: block; width: auto !important; padding: 4px 0; border: 0; }
  .compare tbody th { margin-bottom: 6px; }
  .compare td::before { content: attr(data-label); display: block; font-size: .85rem; color: var(--band-soft); }
  .compare td.us::before { content: attr(data-label); display: block; width: auto; height: auto; background: none; border-radius: 0; margin: 6px 0 0; color: var(--mint); }
}

/* ---------- Open Group ---------- */
.partner .wrap { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: clamp(32px, 6vw, 88px); align-items: start; }
.partner-list-title { font-size: 1.15rem; margin-bottom: 6px; }
.og-facts { display: flex; flex-wrap: wrap; gap: 16px 36px; margin: 28px 0 0; }
.og-facts dt { font-stretch: var(--wide); font-weight: 700; font-size: 1.35rem; color: var(--teal-ink); line-height: 1.2; }
.og-facts dd { margin: 0; color: var(--ink-soft); font-size: .95rem; }
.partner-list { list-style: none; margin: 8px 0 0; padding: 0; }
.partner-list li { padding: 14px 0 14px 18px; border-top: 1px solid var(--line); border-left: 3px solid var(--teal); margin-bottom: 8px; }
.partner-list li strong { display: block; font-stretch: 112%; }
.partner-list li span { color: var(--ink-soft); font-size: .98rem; }
@media (max-width: 900px) { .partner .wrap { grid-template-columns: 1fr; } }

/* ---------- contatti e modulo ---------- */
.contact { background: var(--brand); color: #fff; }
.contact .wrap { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(32px, 6vw, 80px); align-items: start; }
.contact h2 { color: #fff; }
.contact .lede { color: #DDF3EF; }
.contact address { font-style: normal; display: grid; gap: 14px; margin-top: 32px; }
.contact address div { border-top: 1px solid rgba(255,255,255,.28); padding-top: 12px; }
.contact address .label { display: block; font-size: .9rem; color: #CFE7E4; }
.contact address a, .contact address span.v { font-size: 1.1rem; font-weight: 600; color: #fff; }
.contact address a { display: inline-block; padding-block: 6px; margin-right: 16px; }
.contact a:focus-visible, .contact button:focus-visible { outline-color: #FFD27A; }

.contact-form { background: var(--surface); color: var(--ink); border-radius: var(--radius-m); padding: clamp(22px, 3.5vw, 40px); box-shadow: 0 24px 60px -30px rgba(0, 0, 0, .55); }
.contact-form a { color: var(--teal-ink); }
.contact-form :focus-visible { outline-color: var(--focus); }
.form-note { font-size: .92rem; color: var(--ink-soft); margin-bottom: 18px; }
.field { margin-bottom: 18px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.field label { display: block; font-weight: 600; margin-bottom: 6px; }
.field input[type="text"], .field input[type="email"], .field input[type="tel"], .field textarea {
  width: 100%; min-height: 48px; padding: 10px 12px; font: inherit; color: var(--ink);
  background: var(--surface); border: 1.5px solid var(--field-border); border-radius: var(--radius-s);
}
.field textarea { resize: vertical; min-height: 140px; }
.field input:focus-visible, .field textarea:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; border-color: var(--ink); }
.field [aria-invalid="true"] { border-color: var(--error); border-width: 2px; }
.field-hint { font-size: .9rem; color: var(--ink-soft); margin: 6px 0 0; }
.field-error { font-size: .92rem; color: var(--error); font-weight: 600; margin: 6px 0 0; }
.field--check { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; align-items: start; }
.field--check input { width: 24px; height: 24px; margin: 0; accent-color: var(--brand); }
.field--check label { font-weight: 500; margin: 0; }
.field--check .field-error { grid-column: 2; }
.hp { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.btn--submit { width: 100%; margin-top: 6px; }
.btn--submit[disabled] { opacity: .6; cursor: progress; }
.form-status:not(:empty) { margin-top: 16px; padding: 14px 16px; border-radius: var(--radius-s); font-weight: 600; }
.form-status.is-ok { background: var(--tint); color: var(--ink); border-left: 4px solid var(--teal); }
.form-status.is-error { background: color-mix(in srgb, var(--error) 10%, var(--surface)); color: var(--ink); border-left: 4px solid var(--error); }
@media (max-width: 900px) { .contact .wrap { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .field-row { grid-template-columns: 1fr; } }

/* ---------- footer ---------- */
.site-footer { background: var(--band); color: var(--band-soft); padding-block: 40px; font-size: .94rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 20px 40px; }
.site-footer p { margin: 0; max-width: none; }
.site-footer a, .site-footer button.linklike { color: var(--band-text); }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 22px; }
button.linklike { background: none; border: 0; padding: 0; font: inherit; text-decoration: underline; text-underline-offset: .18em; cursor: pointer; }
.todo { background: #FFE9B8; color: #5A3A00; padding: 0 4px; border-radius: 2px; }

/* ---------- pagine legali ---------- */
.legal { padding-block: clamp(48px, 7vw, 88px); }
.legal .wrap { max-width: 860px; }
.legal h1 { font-size: clamp(1.9rem, 1.4rem + 2vw, 2.8rem); }
.legal h2 { font-size: clamp(1.3rem, 1.15rem + .6vw, 1.6rem); margin-top: 2em; }
.legal li { margin-bottom: .4em; max-width: var(--measure); }
.legal table { border-collapse: collapse; width: 100%; margin: 1em 0 1.5em; font-size: .96rem; }
.legal th, .legal td { text-align: left; vertical-align: top; padding: 10px 12px 10px 0; border-bottom: 1px solid var(--line); }
.legal .updated { color: var(--ink-soft); }
.legal-table-wrap { overflow-x: auto; }

/* ---------- banner cookie ---------- */
.consent {
  position: fixed; z-index: 60; left: 16px; right: 16px; bottom: 16px;
  max-width: 560px; margin-left: auto;
  background: var(--surface); color: var(--ink);
  border: 1px solid var(--line); border-radius: var(--radius-m);
  box-shadow: 0 18px 50px -20px rgba(6, 30, 33, .45);
  padding: 22px 22px 20px;
}
.consent[hidden] { display: none; }
.consent .consent-title { font-size: 1.15rem; font-weight: 700; font-stretch: var(--wide); line-height: 1.12; letter-spacing: -.01em; color: var(--ink); margin: 0 44px 8px 0; }
.consent p { font-size: .95rem; color: var(--ink-soft); margin-bottom: 14px; }
.consent-close { position: absolute; top: 10px; right: 10px; width: 44px; height: 44px; border: 0; background: transparent; color: var(--ink); border-radius: var(--radius-s); cursor: pointer; font: inherit; font-size: 1.5rem; line-height: 1; }
.consent-close:hover { background: var(--paper-2); }
.consent-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.consent-actions .btn { min-height: 44px; padding: .5em .8em; font-size: .95rem; }
.consent-prefs { border-top: 1px solid var(--line); margin: 4px 0 14px; padding-top: 12px; }
.consent-prefs fieldset { border: 0; margin: 0; padding: 0; }
.consent-prefs legend { font-weight: 600; margin-bottom: 8px; }
.consent-row { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; align-items: start; padding: 10px 0; border-bottom: 1px solid var(--line); }
.consent-row input { width: 22px; height: 22px; margin: 2px 0 0; accent-color: var(--teal-ink); }
.consent-row label { font-weight: 600; }
.consent-row .desc { grid-column: 2; font-size: .9rem; color: var(--ink-soft); }
/* telefono: barra bassa, tre pulsanti su una riga, mai sopra il pulsante dell'hero */
@media (max-width: 520px) {
  .consent { left: 8px; right: 8px; bottom: 8px; padding: 12px 14px; max-height: calc(100vh - 16px); overflow-y: auto; }
  .consent .consent-title { font-size: 1rem; margin: 0 40px 4px 0; }
  .consent p { font-size: .875rem; line-height: 1.4; margin-bottom: 10px; }
  .consent-close { top: 2px; right: 2px; }
  .consent-actions { gap: 6px; }
  .consent-actions .btn { padding: .4em .2em; font-size: .85rem; }
}
@media (max-width: 340px) {
  .consent-actions { grid-template-columns: 1fr 1fr; }
  .consent-actions .btn:last-child { grid-column: 1 / -1; }
}

@media print {
  .site-header, .consent, .hero-actions, .video { display: none !important; }
  .band, .site-footer { background: none; color: #000; }
}
