/* ===========================================================================
   reasoonai — landing page
   ---------------------------------------------------------------------------
   Impostazione cromatica: sito prevalentemente CHIARO (fiducia, chiarezza,
   linguaggio enterprise) con BANDE SCURE navy nei momenti tecnici (problema,
   architettura, contatti) e una banda BLU per la CTA intermedia.

   I colori non si usano mai direttamente nei componenti: ogni sezione dichiara
   una "band" (.band--dark, .band--brand, .band--muted) che ridefinisce i token
   semantici (--text, --muted, --surface, --line, --accent). Così card, bottoni,
   eyebrow e liste funzionano identici su fondo chiaro e scuro senza duplicare
   regole. Per cambiare l'aspetto di una sezione basta cambiarle la band.
   =========================================================================== */

/* ---------------------------------------------------------------------------
   Font self-hostati. File .woff2 in website/fonts/. Comfortaa e Inter sono
   font variabili: un solo file per famiglia copre tutti i pesi usati.
   Le unicode-range separano "latin" (contenuti attuali) da "latin-ext"
   (scaricato dal browser solo se serve). Nessuna richiesta verso CDN esterni.
   --------------------------------------------------------------------------- */
@font-face {
  font-family: "Comfortaa";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("fonts/comfortaa-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Comfortaa";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("fonts/comfortaa-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/inter-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/inter-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---------------------------------------------------------------------------
   Avviso per browser senza CSS custom properties (IE11 e precedenti). Quei
   browser ignorano @supports, quindi vedono la barra; tutti gli altri no.
   Valori letterali: nessun var() qui.
   --------------------------------------------------------------------------- */
.legacy-banner {
  display: block;
  margin: 0;
  padding: 14px 20px;
  background: #0b1220;
  color: #ffffff;
  font-family: "Segoe UI", Tahoma, Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  text-align: center;
}
.legacy-banner a { color: #7ab6ff; }
@supports (--reasoonai: 0) {
  .legacy-banner { display: none; }
}

/* ---------------------------------------------------------------------------
   Token
   --------------------------------------------------------------------------- */
:root {
  /* Palette di marca (valori assoluti, non cambiano mai con la band) */
  --brand: #1b54d6;          /* blu istituzionale — 6.4:1 su bianco */
  --brand-strong: #1541b0;   /* hover / bande */
  --brand-deep: #17347e;
  --brand-tint: #eef3fe;
  --brand-tint-2: #dbe6fd;
  --cyan: #1aa0e8;           /* accento tecnico, richiama il logo */
  --ink: #0b1220;            /* navy quasi nero delle bande scure */
  --ink-2: #111c33;
  --ink-3: #18253f;
  --ok: #0f7a52;
  --danger: #b42318;

  /* Token semantici — default: banda chiara */
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-2: #f5f8fc;
  --text: #0f172a;
  --muted: #4a5a72;
  --faint: #6b7c96;
  --line: #e3e8f0;
  --line-strong: #cbd5e4;
  --accent: #1b54d6;
  --shadow-sm: 0 1px 2px rgba(11, 18, 32, 0.05), 0 2px 8px rgba(11, 18, 32, 0.04);
  --shadow-md: 0 2px 4px rgba(11, 18, 32, 0.05), 0 12px 28px rgba(11, 18, 32, 0.08);
  --shadow-lg: 0 8px 24px rgba(11, 18, 32, 0.10), 0 32px 64px rgba(11, 18, 32, 0.12);

  --radius: 14px;
  --radius-lg: 20px;
  --max-width: 1200px;
  --section-y: clamp(64px, 7.5vw, 108px);
  color-scheme: light;
}

/* Banda scura: navy. Ridefinisce solo i token, i componenti si adattano. */
.band--dark {
  --bg: var(--ink);
  --surface: #111c33;
  --surface-2: #0e1729;
  --text: #ffffff;
  --muted: #afbed6;
  --faint: #8b9bb8;
  --line: rgba(255, 255, 255, 0.12);
  --line-strong: rgba(255, 255, 255, 0.24);
  --accent: #5ea9ff;        /* schiarito: 7.7:1 sul navy, vedi nota WCAG */
  --shadow-sm: none;
  --shadow-md: 0 12px 32px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 24px 64px rgba(0, 0, 0, 0.45);
  color-scheme: dark;
}

/* Banda blu: usata solo per la CTA intermedia. */
.band--brand {
  --bg: var(--brand-strong);
  --surface: rgba(255, 255, 255, 0.10);
  --surface-2: rgba(255, 255, 255, 0.06);
  --text: #ffffff;
  --muted: #cfe0ff;
  --faint: #b7d0ff;
  --line: rgba(255, 255, 255, 0.22);
  --line-strong: rgba(255, 255, 255, 0.38);
  --accent: #ffffff;
  color-scheme: dark;
}

/* Banda chiara alternativa: grigio-azzurro freddo. */
.band--muted {
  --bg: #f5f8fc;
  --surface: #ffffff;
  --surface-2: #eef2f8;
}

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

html {
  scroll-behavior: smooth;
  /* Compensa l'header sticky: le sezioni raggiunte dai link del menu si
     fermano sotto l'header. Tenere allineato con headerOffset in script.js. */
  scroll-padding-top: 88px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

h1, h2, h3, h4 { margin: 0; line-height: 1.18; font-weight: 600; }

/* Comfortaa solo sui titoli di sezione (h1/h2): è un display rotondo, in dosi
   piccole dà identità, su tutto il testo abbassa il registro professionale.
   h3 e sotto usano Inter. */
h1, h2 {
  font-family: "Comfortaa", "Inter", sans-serif;
  letter-spacing: -0.02em;
}
h3, h4 { font-family: "Inter", sans-serif; letter-spacing: -0.01em; }

p { margin: 0; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul, ol { margin: 0; padding: 0; list-style: none; }

::selection { background: var(--brand-tint-2); color: var(--ink); }

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 40px);
}

.wrap--narrow { max-width: 940px; }

/* Sezione = una banda a piena larghezza. Il colore lo dà la classe .band--*. */
.section {
  position: relative;
  padding: var(--section-y) 0;
  background: var(--bg);
  color: var(--text);
}

/* Hairline solo tra due bande chiare consecutive: fra bande di colore diverso
   lo stacco lo dà già il fondo. */
.section--hairline { border-top: 1px solid var(--line); }

/* ---------------------------------------------------------------------------
   Accessibilità
   --------------------------------------------------------------------------- */
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -80px;
  z-index: 300;
  padding: 10px 18px;
  border-radius: 0 0 10px 10px;
  background: var(--ink);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 600;
  transition: top 0.15s ease;
}
.skip-link:focus { top: 0; }

/* Anello di focus unico per tutta la pagina. Prima esisteva solo su skip-link
   e input: la navigazione da tastiera era invisibile ovunque. */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}
main:focus { outline: none; }

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

/* ---------------------------------------------------------------------------
   Elementi tipografici ricorrenti
   --------------------------------------------------------------------------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 16px;
}

/* Trattino corto prima dell'eyebrow: segna l'inizio della sezione senza pesare */
.eyebrow::before {
  content: "";
  width: 18px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  flex: none;
}

.section-head { max-width: 720px; margin-bottom: clamp(36px, 4vw, 56px); }
.section-head h2 {
  font-size: clamp(1.75rem, 3.4vw, 2.6rem);
  margin-bottom: 16px;
}
.section-head p {
  color: var(--muted);
  font-size: clamp(1rem, 1.4vw, 1.12rem);
  max-width: 62ch;
}
.section-head--center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head--center p { margin-left: auto; margin-right: auto; }
.section-head--center .eyebrow::before { display: none; }

/* Testo con l'accento della banda corrente. Sostituisce .gradient-text:
   un solo colore pieno legge meglio, resta leggibile in alto contrasto e non
   dipende da background-clip. */
.hl { color: var(--accent); }

/* ---------------------------------------------------------------------------
   Bottoni
   --------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 24px;
  border-radius: 10px;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.2;
  cursor: pointer;
  border: 1px solid transparent;
  text-align: center;
  transition: background-color 0.18s ease, border-color 0.18s ease,
              color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}
.btn:active { transform: translateY(1px); }
.btn svg { width: 18px; height: 18px; flex: none; }

.btn-primary {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 1px 2px rgba(21, 65, 176, 0.28), 0 8px 20px rgba(21, 65, 176, 0.22);
}
.btn-primary:hover { background: var(--brand-strong); }

.btn-ghost {
  background: transparent;
  border-color: var(--line-strong);
  color: var(--text);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

/* Sulle bande scure il primario blu perde stacco: diventa bianco pieno. */
.band--dark .btn-primary {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}
.band--dark .btn-primary:hover { background: #e8eefb; }
.band--brand .btn-primary { background: #fff; color: var(--brand-strong); }
.band--brand .btn-primary:hover { background: var(--brand-tint); }

.btn-block { width: 100%; }
.btn-lg { padding: 15px 30px; font-size: 1rem; }

/* Link testuale con freccia, per le CTA secondarie in linea */
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--accent);
  font-weight: 600;
  font-size: 0.95rem;
}
.link-arrow svg { width: 16px; height: 16px; transition: transform 0.18s ease; }
.link-arrow:hover svg { transform: translateX(3px); }

/* ---------------------------------------------------------------------------
   Header
   --------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.88);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}
/* Ombra/bordo solo dopo lo scroll: in cima l'header si fonde con l'hero. */
.site-header.is-scrolled {
  border-bottom-color: var(--line);
  box-shadow: 0 1px 3px rgba(11, 18, 32, 0.06);
}

.nav {
  display: flex;
  align-items: center;
  gap: 28px;
  /* Nessun padding orizzontale proprio: lo dà .wrap, così il logo è allineato
     al contenuto delle sezioni a ogni larghezza (prima erano disallineati). */
  padding-top: 12px;
  padding-bottom: 12px;
}

.brand { display: flex; align-items: center; flex: none; }
.brand-logo { height: 38px; width: auto; }

.nav-links { display: flex; gap: 26px; align-items: center; }
/* La CTA duplicata serve solo dentro il menu mobile aperto (vedi in fondo). */
.nav-links .btn { display: none; }
.nav-links a {
  position: relative;
  white-space: nowrap;
  font-size: 0.93rem;
  font-weight: 500;
  color: var(--muted);
  padding: 6px 0;
  transition: color 0.18s ease;
}
.nav-links a:hover { color: var(--text); }

/* Voce attiva: sottolineatura sottile guidata dallo scroll-spy in script.js */
.nav-links a.is-active { color: var(--brand); font-weight: 600; }
.nav-links a.is-active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 2px;
  border-radius: 2px;
  background: var(--brand);
}

.nav-cta { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.nav-cta .btn { padding: 10px 20px; font-size: 0.9rem; }

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  color: var(--text);
  cursor: pointer;
}
.nav-toggle svg { width: 22px; height: 22px; }
.nav-toggle .icon-close { display: none; }
body.nav-open .nav-toggle .icon-close { display: block; }
body.nav-open .nav-toggle .icon-menu { display: none; }

/* ---------------------------------------------------------------------------
   Hero
   --------------------------------------------------------------------------- */
.hero {
  position: relative;
  padding: clamp(48px, 6vw, 84px) 0 clamp(56px, 6vw, 88px);
  background: linear-gradient(180deg, #f7fafd 0%, #ffffff 62%);
  overflow: hidden;
}

/* Reticolo tecnico appena percepibile + alone blu: dà profondità all'hero
   senza il "glow viola" da startup. */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(27, 84, 214, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(27, 84, 214, 0.045) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(70% 60% at 50% 30%, #000 0%, transparent 78%);
  mask-image: radial-gradient(70% 60% at 50% 30%, #000 0%, transparent 78%);
  pointer-events: none;
}
.hero::after {
  content: "";
  position: absolute;
  top: -240px; right: -160px;
  width: 720px; height: 720px;
  background: radial-gradient(circle, rgba(27, 84, 214, 0.10), transparent 62%);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(0, 0.82fr);
  gap: clamp(32px, 4vw, 64px);
  align-items: center;
}

.hero h1 {
  font-size: clamp(2rem, 3.6vw, 3.05rem);
  margin-bottom: 20px;
  text-wrap: balance;
}

.hero-lede {
  font-size: clamp(1.05rem, 1.5vw, 1.2rem);
  color: var(--muted);
  max-width: 52ch;
  margin-bottom: 28px;
}
.hero-lede strong { color: var(--text); font-weight: 600; }

.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 28px; }

/* Riga di rassicurazione sotto le CTA: fatti, non aggettivi. */
.hero-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  align-content: start;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}
.hero-trust li {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.88rem;
  color: var(--muted);
  font-weight: 500;
}
.hero-trust svg { width: 16px; height: 16px; color: var(--ok); flex: none; }

/* --- Mock del prodotto (HTML, non immagine: nitido e responsive) --- */
.hero-visual { position: relative; }
@media (min-width: 941px) {
  /* Riserva l'altezza del badge appeso sotto la card. */
  .hero-visual { margin-bottom: 66px; }
}

.mock {
  position: relative;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.mock-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  background: #fbfcfe;
}
.mock-dots { display: flex; gap: 6px; }
.mock-dots span {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--line-strong);
}
.mock-title {
  font-size: 0.78rem;
  color: var(--faint);
  font-weight: 500;
  letter-spacing: 0.01em;
}
.mock-lock {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--ok);
  background: rgba(15, 122, 82, 0.09);
  border-radius: 999px;
  padding: 3px 9px;
}
.mock-lock svg { width: 12px; height: 12px; }

.mock-body { padding: 20px 18px; display: flex; flex-direction: column; gap: 14px; }

.mock-msg { max-width: 90%; font-size: 0.9rem; line-height: 1.5; }
.mock-msg--user {
  align-self: flex-end;
  background: var(--brand);
  color: #fff;
  border-radius: 14px 14px 4px 14px;
  padding: 11px 15px;
}
.mock-msg--ai {
  align-self: flex-start;
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 14px 14px 14px 4px;
  padding: 13px 15px;
}
.mock-msg--ai strong { font-weight: 600; }

/* Chip "fonte": è il segnale che l'AI cita il documento interno (valore RAG) */
.mock-source {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--brand-tint);
  border: 1px solid var(--brand-tint-2);
  color: var(--brand);
  font-size: 0.72rem;
  font-weight: 600;
}
.mock-source svg { width: 12px; height: 12px; }

.mock-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 16px;
  border-top: 1px solid var(--line);
  background: #fbfcfe;
  font-size: 0.74rem;
  color: var(--faint);
}
.mock-foot svg { width: 14px; height: 14px; color: var(--faint); flex: none; }
.mock-foot strong { color: var(--muted); font-weight: 600; }

/* Badge "nessun dato in uscita": aggancia il mock alla promessa dell'H1 */
.hero-badge {
  position: absolute;
  /* Sotto la card, non sopra: sovrapposto copriva la riga "nessun dato in
     uscita", cioe' proprio il messaggio che deve rinforzare. */
  left: 6px;
  bottom: -66px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 16px;
  background: var(--ink);
  color: #fff;
  border-radius: 12px;
  box-shadow: var(--shadow-md);
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.3;
}
.hero-badge svg { width: 20px; height: 20px; color: #5ea9ff; flex: none; }
.hero-badge span { display: block; }
.hero-badge small {
  display: block;
  font-weight: 400;
  font-size: 0.72rem;
  color: #afbed6;
}

@media (min-width: 941px) {
  /* Nel layout affiancato le quattro voci non stanno su una riga sola:
     due colonne evitano l'ultima voce spaiata. */
  .hero-trust { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 940px) {
  .hero-inner { grid-template-columns: 1fr; gap: 40px; }
  .hero-visual { max-width: 520px; }
  .hero-badge { left: auto; right: 8px; bottom: -16px; }
}

@media (max-width: 560px) {
  .hero { padding-top: 32px; }
  .hero-actions { gap: 10px; }
  .hero-actions .btn { width: 100%; }
  .hero-trust { flex-direction: column; gap: 9px; }
  .hero-trust li { font-size: 0.85rem; }
  /* Il mock resta, ma alleggerito: su schermo stretto la terza riga di
     conversazione allunga la pagina senza aggiungere significato. */
  .mock-msg--hide-sm { display: none; }
  .hero-badge {
    position: static;
    margin-top: 14px;
    justify-content: center;
  }
}

/* ---------------------------------------------------------------------------
   Striscia di prova sociale (background del team)
   --------------------------------------------------------------------------- */
.proof {
  padding: clamp(32px, 4vw, 48px) 0;
  background: var(--bg);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.proof-label {
  text-align: center;
  font-size: 0.76rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--faint);
  font-weight: 600;
  margin-bottom: 24px;
}

.proof-groups { display: flex; flex-direction: column; gap: 30px; }

.marquee {
  width: 100%;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 72px, #000 calc(100% - 72px), transparent 100%);
  mask-image: linear-gradient(to right, transparent 0, #000 72px, #000 calc(100% - 72px), transparent 100%);
}
.marquee-track {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  width: max-content;
  gap: 56px;
  animation: marquee-scroll 46s linear infinite;
}
.marquee-track:hover { animation-play-state: paused; }
@keyframes marquee-scroll {
  from { transform: translateX(-50%); }
  to { transform: translateX(0); }
}
@media (prefers-reduced-motion: reduce) {
  .marquee-track { animation: none; }
}

.proof-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 28px 48px;
}

.proof-logo {
  /* height/max-width tarati sull'altezza OTTICA: i wordmark larghi restavano
     bassi perché limitati dal max-width, quindi serve un po' di margine. */
  height: 27px;
  width: auto;
  max-width: 140px;
  object-fit: contain;
  /* Grigio-blu uniforme: su fondo chiaro i loghi originali a colori
     litigherebbero fra loro e con il blu del brand. */
  filter: grayscale(1) brightness(0) opacity(0.42);
  transition: filter 0.2s ease;
}
.proof-logo:hover { filter: grayscale(1) brightness(0) opacity(0.72); }

/* Loghi con simbolo: il glifo "legge" più piccolo di quanto misura. */
.proof-logo.logo-alcoa,
.proof-logo.logo-arcelormittal,
.proof-logo.logo-unibz,
.proof-logo.logo-bt { height: 34px; }
.proof-logo.logo-autodesk { height: 23px; max-width: 190px; }
.proof-logo.logo-unibo { height: 34px; max-width: 200px; }
.proof-logo.logo-caltech { height: 32px; max-width: 160px; }

@media (max-width: 640px) {
  .marquee {
    -webkit-mask-image: linear-gradient(to right, transparent 0, #000 28px, #000 calc(100% - 28px), transparent 100%);
    mask-image: linear-gradient(to right, transparent 0, #000 28px, #000 calc(100% - 28px), transparent 100%);
  }
  .marquee-track { gap: 40px; }
  .proof-row { gap: 20px 30px; }
  .proof-logo { height: 24px; max-width: 112px; }
  /* Anche i loghi con regola propria: la loro specificita' (0,2,0) batte
     quella di .proof-logo, quindi vanno riscalati esplicitamente o restano
     grandi il doppio degli altri. */
  .proof-logo.logo-alcoa,
  .proof-logo.logo-arcelormittal,
  .proof-logo.logo-unibz,
  .proof-logo.logo-bt { height: 30px; }
  .proof-logo.logo-autodesk { height: 18px; max-width: 140px; }
  .proof-logo.logo-unibo { height: 26px; max-width: 150px; }
  .proof-logo.logo-caltech { height: 22px; max-width: 110px; }
}

/* ---------------------------------------------------------------------------
   Griglie e card
   --------------------------------------------------------------------------- */
.grid { display: grid; gap: 20px; }

/* Gli elementi di una griglia non scendono sotto il proprio min-content se non
   glielo si dice: basta un figlio a larghezza fissa (un iframe, una tabella)
   per allargare la traccia e far sbordare la pagina su mobile. */
.grid > *,
.hero-inner > *,
.problem-grid > *,
.arch-layout > *,
.contact-grid > *,
.compare > * { min-width: 0; }

/* auto-fit invece di repeat(3,1fr): i tablet ottengono 2 colonne invece di
   saltare da 3 a 1 come faceva la versione precedente. */
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(clamp(240px, 30%, 300px), 1fr)); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(22px, 2.4vw, 30px);
  box-shadow: var(--shadow-sm);
}

.card h3 { font-size: 1.08rem; margin-bottom: 8px; }
.card p { color: var(--muted); font-size: 0.95rem; }

/* Icona: quadrato con tinta di marca, niente emoji (rendono diversamente su
   ogni sistema operativo e abbassano il registro del sito). */
.icon-box {
  width: 44px; height: 44px;
  border-radius: 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--brand-tint);
  color: var(--brand);
  margin-bottom: 18px;
}
.icon-box svg { width: 22px; height: 22px; }
.band--dark .icon-box { background: rgba(94, 169, 255, 0.14); color: var(--accent); }
.band--brand .icon-box { background: rgba(255, 255, 255, 0.16); color: #fff; }

/* --- Card "principio": numerata, con l'accento sul bordo superiore --- */
.pillar {
  position: relative;
  padding-top: 30px;
  overflow: hidden;
}
.pillar::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--brand);
  opacity: 0.9;
}
.pillar-num {
  position: absolute;
  top: 22px; right: 24px;
  font-family: "Comfortaa", sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  color: #a3b2c8;
}

/* ---------------------------------------------------------------------------
   Sezione problema (banda scura)
   --------------------------------------------------------------------------- */
.problem-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}

.problem-claim {
  font-family: "Comfortaa", sans-serif;
  font-size: clamp(1.9rem, 4vw, 3rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
  text-wrap: balance;
}

.problem-lede { color: var(--muted); font-size: clamp(1rem, 1.4vw, 1.1rem); max-width: 46ch; }

.risk-list { display: flex; flex-direction: column; gap: 14px; }
.risk {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 18px 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.risk-icon {
  flex: none;
  width: 38px; height: 38px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 138, 118, 0.12);
  color: #ff9a86;
}
.risk-icon svg { width: 20px; height: 20px; }
.risk h3 { font-size: 1rem; margin-bottom: 3px; }
.risk p { color: var(--muted); font-size: 0.9rem; }

/* Frase di chiusura della sezione: il ponte problema → soluzione */
.problem-turn {
  margin-top: clamp(36px, 4vw, 56px);
  padding-top: clamp(28px, 3vw, 40px);
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.problem-turn p {
  font-family: "Comfortaa", sans-serif;
  font-size: clamp(1.15rem, 2.2vw, 1.6rem);
  line-height: 1.3;
  letter-spacing: -0.01em;
  max-width: 30ch;
}

@media (max-width: 860px) {
  .problem-grid { grid-template-columns: 1fr; }
}

/* ---------------------------------------------------------------------------
   Confronto cloud pubblico / on-premise
   --------------------------------------------------------------------------- */
.compare {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin-top: clamp(36px, 4vw, 52px);
}

.compare-col {
  border-radius: var(--radius-lg);
  padding: clamp(24px, 2.6vw, 32px);
  border: 1px solid var(--line);
  background: var(--surface);
}

/* Colonna "prima": volutamente spenta, bordo tratteggiato, nessuna ombra. */
.compare-col--before {
  background: transparent;
  border-style: dashed;
  border-color: var(--line-strong);
}
/* Colonna "dopo": è la nostra, quindi è l'unica con peso visivo. */
.compare-col--after {
  border-color: var(--brand);
  box-shadow: var(--shadow-md);
  position: relative;
}

.compare-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 16px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--line);
}
.compare-head h3 { font-size: 1.05rem; }
.compare-tag {
  margin-left: auto;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  white-space: nowrap;
}

.compare-list { display: flex; flex-direction: column; gap: 13px; }
.compare-list li {
  display: flex;
  gap: 11px;
  align-items: flex-start;
  font-size: 0.94rem;
  color: var(--muted);
}
.compare-list svg { width: 19px; height: 19px; flex: none; margin-top: 1px; }
.compare-col--before svg { color: var(--faint); }
.compare-col--after svg { color: var(--ok); }
.compare-col--after li { color: var(--text); }
.compare-list b { font-weight: 600; color: var(--text); }

/* ---------------------------------------------------------------------------
   Piattaforma — esempio di workflow (HTML, non SVG)
   ---------------------------------------------------------------------------
   La versione precedente era un'unica SVG larga 925px che su mobile andava in
   scorrimento orizzontale con testo a ~10px. In HTML le fasi si impilano e il
   testo resta alla dimensione giusta a ogni larghezza.
   --------------------------------------------------------------------------- */
.flow-panel {
  margin-top: clamp(32px, 4vw, 48px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(24px, 3vw, 36px);
  box-shadow: var(--shadow-sm);
}

.flow-title {
  font-size: 0.76rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--faint);
  font-weight: 700;
  margin-bottom: 22px;
  text-align: center;
}

.flow {
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.flow-step {
  flex: 1 1 158px;
  max-width: 220px;
  text-align: center;
  padding: 20px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
}
.flow-step .icon-box { margin: 0 auto 12px; width: 40px; height: 40px; border-radius: 10px; }
.flow-step .icon-box svg { width: 20px; height: 20px; }
.flow-step h4 { font-size: 0.92rem; margin-bottom: 4px; }
.flow-step p { font-size: 0.8rem; color: var(--faint); }

.flow-arrow {
  display: flex;
  align-items: center;
  color: var(--line-strong);
  flex: none;
}
.flow-arrow svg { width: 20px; height: 20px; }

@media (max-width: 980px) {
  .flow { flex-direction: column; align-items: stretch; }
  .flow-step {
    /* In colonna l'asse principale e' verticale: il flex-basis di 158px
       diventerebbe un'ALTEZZA minima, gonfiando ogni fase. */
    flex: 0 0 auto;
    max-width: none;
    text-align: left;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    column-gap: 14px;
    align-items: center;
    padding: 14px 16px;
  }
  .flow-step .icon-box { grid-row: 1 / span 2; margin: 0; }
  .flow-step h4 { align-self: end; }
  .flow-step p { align-self: start; }
  .flow-arrow { justify-content: center; transform: rotate(90deg); }
}

/* ---------------------------------------------------------------------------
   Architettura (banda scura) — diagramma a strati in HTML
   --------------------------------------------------------------------------- */
.arch-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
  gap: clamp(32px, 4.5vw, 64px);
  align-items: center;
}

/* Titolo di sezione quando la colonna di testo non usa .section-head */
.band-title { font-size: clamp(1.75rem, 3.4vw, 2.6rem); margin-bottom: 16px; }
.band-lede { color: var(--muted); max-width: 46ch; }

.arch-copy h3 { font-size: 1.02rem; margin-bottom: 6px; }
.arch-points { display: flex; flex-direction: column; gap: 22px; margin-top: 28px; }
.arch-point { display: flex; gap: 15px; }
.arch-point p { color: var(--muted); font-size: 0.93rem; }
.arch-point .icon-box { margin-bottom: 0; flex: none; width: 40px; height: 40px; }

/* Perimetro aziendale: tutto ciò che sta dentro il tratteggio non esce. */
.perimeter {
  position: relative;
  border: 1.5px dashed var(--line-strong);
  border-radius: var(--radius-lg);
  padding: clamp(26px, 3vw, 34px) clamp(18px, 2.4vw, 28px) clamp(22px, 2.6vw, 28px);
  background:
    radial-gradient(120% 80% at 50% 0%, rgba(94, 169, 255, 0.10), transparent 70%),
    var(--surface-2);
}

.perimeter-label {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translate(-50%, -50%);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--ink);
  border: 1px solid var(--line-strong);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
}
.perimeter-label svg { width: 14px; height: 14px; color: var(--accent); }

.arch-layer { text-align: center; }
.arch-layer-name {
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--faint);
  font-weight: 700;
  margin-bottom: 10px;
}

.arch-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.arch-chip {
  padding: 7px 13px;
  border-radius: 8px;
  background: var(--surface);
  border: 1px solid var(--line);
  font-size: 0.82rem;
  color: var(--muted);
  white-space: nowrap;
}

/* Blocco centrale: il motore. È l'unico elemento con l'accento pieno. */
.arch-core {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 18px 20px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(94, 169, 255, 0.16), rgba(27, 84, 214, 0.16));
  border: 1px solid rgba(94, 169, 255, 0.42);
}
.arch-core-item { display: flex; align-items: center; gap: 9px; font-size: 0.88rem; font-weight: 600; }
.arch-core-item svg { width: 18px; height: 18px; color: var(--accent); flex: none; }
.arch-core-sep { color: var(--faint); }

.arch-connector {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 30px;
  color: var(--line-strong);
}
.arch-connector svg { width: 18px; height: 18px; }

/* Nota fuori dal perimetro: chiude il concetto "niente esce". */
.arch-outside {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  margin-top: 20px;
  font-size: 0.85rem;
  color: var(--faint);
}
.arch-outside svg { width: 17px; height: 17px; flex: none; }

@media (max-width: 900px) {
  .arch-layout { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .arch-chip { font-size: 0.76rem; padding: 6px 10px; }
  .perimeter-label { font-size: 0.7rem; }
}

/* ---------------------------------------------------------------------------
   Banda CTA intermedia
   --------------------------------------------------------------------------- */
.cta-band {
  padding: clamp(52px, 6vw, 76px) 0;
  background: var(--bg);
  color: var(--text);
  background-image: linear-gradient(120deg, var(--brand-strong) 0%, var(--brand-deep) 100%);
}
.cta-band-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  flex-wrap: wrap;
}
.cta-band h2 {
  font-size: clamp(1.5rem, 2.8vw, 2.1rem);
  margin-bottom: 8px;
  max-width: 22ch;
}
.cta-band p { color: var(--muted); max-width: 46ch; }

/* ---------------------------------------------------------------------------
   Casi studio
   --------------------------------------------------------------------------- */
.case {
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.case:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--line-strong); }

.case-sector {
  display: inline-flex;
  align-self: flex-start;
  padding: 4px 10px;
  border-radius: 6px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
}
.case h3 { font-size: 1.08rem; }
.case-body { display: flex; flex-direction: column; gap: 10px; }
.case-body div { font-size: 0.91rem; color: var(--muted); }
.case-body dt {
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
  font-weight: 700;
  margin-bottom: 2px;
}
.case-body dd { margin: 0; }

/* Il risultato è la riga che il lettore cerca: fondo pieno, non prosa. */
.case-result {
  margin-top: auto;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 13px 15px;
  border-radius: 10px;
  background: var(--brand-tint);
  color: var(--brand-strong);
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.45;
}
.case-result svg { width: 18px; height: 18px; flex: none; margin-top: 2px; }

.disclaimer {
  margin-top: 26px;
  font-size: 0.82rem;
  color: var(--faint);
  max-width: 76ch;
}

/* ---------------------------------------------------------------------------
   Configurazioni
   --------------------------------------------------------------------------- */
.tier { display: flex; flex-direction: column; position: relative; }

/* Una sola configurazione evidenziata: senza gerarchia le tre si annullano. */
.tier--featured {
  border-color: var(--brand);
  box-shadow: var(--shadow-md);
}
.tier-flag {
  position: absolute;
  top: -11px; left: clamp(22px, 2.4vw, 30px);
  padding: 3px 11px;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.tier-name {
  font-family: "Comfortaa", sans-serif;
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 4px;
}
.tier-audience { color: var(--faint); font-size: 0.86rem; margin-bottom: 20px; }

.tier-list {
  display: flex;
  flex-direction: column;
  gap: 11px;
  margin-bottom: 22px;
  font-size: 0.92rem;
  color: var(--muted);
}
.tier-list li { display: flex; gap: 10px; align-items: flex-start; }
.tier-list svg { width: 17px; height: 17px; color: var(--brand); flex: none; margin-top: 3px; }

.tier-price {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 0.86rem;
  color: var(--faint);
}
.tier-price strong { color: var(--text); font-weight: 600; }

/* ---------------------------------------------------------------------------
   Processo — timeline
   --------------------------------------------------------------------------- */
.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  position: relative;
}

/* Linea che unisce i quattro pallini: rende evidente che è un percorso e non
   quattro card indipendenti. */
.steps::before {
  content: "";
  position: absolute;
  top: 17px;
  left: 8%;
  right: 8%;
  height: 2px;
  background: linear-gradient(90deg, var(--brand) 0%, var(--line-strong) 100%);
  opacity: 0.35;
}

.step { position: relative; padding-top: 52px; display: flex; flex-direction: column; }
.step-dot {
  position: absolute;
  top: 0; left: 0;
  width: 36px; height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  border: 2px solid var(--brand);
  color: var(--brand);
  font-family: "Comfortaa", sans-serif;
  font-weight: 700;
  font-size: 0.85rem;
}
.step h3 { font-size: 1rem; margin-bottom: 6px; }
.step p { color: var(--muted); font-size: 0.9rem; }
.step-when {
  display: block;
  /* In fondo alla colonna: le quattro etichette si allineano fra loro anche
     quando i paragrafi hanno lunghezze diverse. */
  margin-top: auto;
  padding-top: 10px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--brand);
}

@media (max-width: 900px) {
  .steps { grid-template-columns: repeat(2, 1fr); gap: 32px 24px; }
  .steps::before { display: none; }
}
@media (max-width: 560px) {
  .steps { grid-template-columns: 1fr; gap: 22px; }
  /* In colonna singola la numerazione a lato costa meno altezza. */
  .step { padding-top: 0; padding-left: 52px; }
  .step-dot { width: 34px; height: 34px; }
}

/* ---------------------------------------------------------------------------
   FAQ
   --------------------------------------------------------------------------- */
.faq {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
  gap: 12px 24px;
  align-items: start;
}

.faq-item {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
}
.faq-item[open] { border-color: var(--line-strong); }

.faq-item summary {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 17px 20px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.97rem;
  list-style: none;
  color: var(--text);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "";
  margin-left: auto;
  flex: none;
  width: 11px; height: 11px;
  border-right: 2px solid var(--faint);
  border-bottom: 2px solid var(--faint);
  transform: rotate(45deg) translate(-2px, -2px);
  transition: transform 0.2s ease;
}
.faq-item[open] summary::after { transform: rotate(-135deg) translate(-2px, -2px); }
.faq-item summary:hover { color: var(--brand); }

.faq-item .faq-answer {
  padding: 0 20px 19px;
  color: var(--muted);
  font-size: 0.93rem;
}

/* ---------------------------------------------------------------------------
   Contatti
   --------------------------------------------------------------------------- */
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: clamp(32px, 4.5vw, 64px);
  align-items: start;
}

.contact-copy h2 { font-size: clamp(1.8rem, 3.4vw, 2.5rem); margin-bottom: 16px; }
.contact-copy > p { color: var(--muted); margin-bottom: 26px; font-size: 1.05rem; max-width: 44ch; }

.contact-list { display: flex; flex-direction: column; gap: 13px; margin-bottom: 30px; }
.contact-list li { display: flex; gap: 11px; align-items: flex-start; color: var(--muted); font-size: 0.95rem; }
.contact-list svg { width: 19px; height: 19px; color: var(--accent); flex: none; margin-top: 2px; }

.contact-direct {
  padding-top: 22px;
  border-top: 1px solid var(--line);
  font-size: 0.9rem;
  color: var(--faint);
}
.contact-direct a { color: var(--accent); font-weight: 600; }
.contact-direct a:hover { text-decoration: underline; }

/* Form su card chiara anche dentro la banda scura: un modulo bianco comunica
   "compilabile" molto più di uno scuro, e alza il contrasto del punto di
   conversione rispetto al resto della sezione. */
.form-card {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: clamp(24px, 3vw, 34px);
  box-shadow: var(--shadow-lg);
  color: #0f172a;
  /* Ripristina i token chiari: la card non deve ereditare quelli della banda. */
  --text: #0f172a;
  --muted: #4a5a72;
  --faint: #6b7c96;
  --line: #e3e8f0;
  --line-strong: #cbd5e4;
  --accent: #1b54d6;
  color-scheme: light;
}

/* La card ripristina i token chiari, ma ".band--dark .btn-primary" ha la
   stessa specificita' e vincerebbe per ordine: qui lo riportiamo al blu. */
.form-card .btn-primary { background: var(--brand); color: #fff; }
.form-card .btn-primary:hover { background: var(--brand-strong); }

.form-title { font-size: 1.1rem; font-weight: 600; margin-bottom: 4px; color: var(--text); }
.form-sub { font-size: 0.87rem; color: var(--faint); margin-bottom: 22px; }

.field { margin-bottom: 15px; display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 0.83rem; font-weight: 500; color: var(--muted); }
.field-opt { color: var(--faint); font-weight: 400; }

.field input,
.field textarea {
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  padding: 11px 13px;
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}
.field input::placeholder,
.field textarea::placeholder { color: #9aa8bd; }

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(27, 84, 214, 0.15);
}
/* Evidenzia il campo non valido solo dopo un tentativo di invio. */
.form-card.was-validated :invalid { border-color: var(--danger); }

.field textarea { resize: vertical; min-height: 84px; }

.field-consent {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 4px 0 16px;
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.5;
}
.field-consent input { margin-top: 3px; flex: none; width: 16px; height: 16px; accent-color: var(--brand); }
.field-consent a { color: var(--brand); text-decoration: underline; }

/* Honeypot: fuori dal viewport invece di display:none (alcuni bot lo saltano) */
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Il widget Turnstile e' un iframe di 300px fissi: sotto i ~420px di viewport
   non entra nella card, quindi lo si riduce invece di far scorrere la pagina. */
.cf-turnstile { margin-bottom: 16px; min-height: 65px; max-width: 100%; }

@media (max-width: 420px) {
  .form-card { padding: 22px 18px; }
  .cf-turnstile { transform: scale(0.9); transform-origin: left center; }
}
@media (max-width: 360px) {
  .cf-turnstile { transform: scale(0.8); }
}

.form-note { margin-top: 13px; font-size: 0.82rem; color: var(--faint); text-align: center; }
.form-note.is-error { color: var(--danger); font-weight: 500; }
.form-note.is-success { color: var(--ok); font-weight: 600; }

@media (max-width: 900px) {
  .contact-grid { grid-template-columns: 1fr; }
}

/* ---------------------------------------------------------------------------
   CTA fissa su mobile
   ---------------------------------------------------------------------------
   Su desktop il bottone dell'header è sempre visibile; su mobile spariva
   (era nascosto sotto i 960px) e la pagina restava senza CTA per tutta la
   scrollata. Compare dopo l'hero e si nasconde quando il form è a schermo.
   --------------------------------------------------------------------------- */
.mobile-cta {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 90;
  display: none;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, 0.94);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
  transform: translateY(110%);
  transition: transform 0.28s ease;
}
.mobile-cta.is-visible { transform: translateY(0); }

/* Col menu aperto la barra fissa duplicherebbe la CTA che sta gia' nel menu. */
body.nav-open .mobile-cta { transform: translateY(110%); }

@media (max-width: 720px) {
  .mobile-cta { display: block; }
  /* Sotto i 720 la CTA dell'header lascia il posto alla barra fissa. */
  .nav-cta .btn { display: none; }
}

/* ---------------------------------------------------------------------------
   Footer
   --------------------------------------------------------------------------- */
.site-footer {
  background: #070d19;
  color: #afbed6;
  padding: clamp(40px, 5vw, 56px) 0 32px;
  --text: #ffffff;
  --muted: #afbed6;
  --faint: #8b9bb8;
  --line: rgba(255, 255, 255, 0.10);
  --accent: #5ea9ff;
  color-scheme: dark;
}

.footer-top {
  display: grid;
  grid-template-columns: minmax(220px, 1.4fr) repeat(3, minmax(140px, 1fr));
  gap: 36px 28px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--line);
}

.footer-brand-logo { height: 34px; width: auto; margin-bottom: 14px; }
.footer-tagline { font-size: 0.9rem; color: var(--muted); max-width: 34ch; margin-bottom: 16px; }

.footer-badges { display: flex; flex-wrap: wrap; gap: 8px; }
.footer-badge {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 11px;
}

.footer-col-title {
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--faint);
  font-weight: 700;
  margin-bottom: 14px;
}
.footer-col ul { display: flex; flex-direction: column; gap: 9px; }
.footer-col a, .footer-col li { font-size: 0.89rem; color: var(--muted); transition: color 0.18s ease; }
.footer-col a:hover { color: var(--accent); }

.social-list { display: flex; flex-direction: row; gap: 10px; }
/* ".footer-col ul" (0,1,1) imporrebbe flex-direction:column anche qui:
   serve una regola almeno altrettanto specifica per rimetterle in riga. */
.footer-col .social-list { flex-direction: row; margin-top: 14px; }
.social-list a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px; height: 34px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--muted);
  transition: color 0.18s ease, border-color 0.18s ease, background-color 0.18s ease;
}
.social-list a:hover { color: #fff; border-color: var(--accent); background: rgba(94, 169, 255, 0.12); }
.social-icon { width: 17px; height: 17px; }

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  padding-top: 24px;
  font-size: 0.82rem;
  color: var(--faint);
}

.lang-switch { display: flex; align-items: center; gap: 8px; }
.lang-opt { color: var(--faint); }
.lang-opt.is-current { color: #fff; font-weight: 600; }
.lang-switch li + li::before { content: "·"; margin-right: 8px; color: var(--faint); }
.lang-switch li { display: flex; align-items: center; }

@media (max-width: 860px) {
  .footer-top { grid-template-columns: repeat(2, 1fr); }
  .footer-brand-col { grid-column: 1 / -1; }
}
@media (max-width: 520px) {
  .footer-top { grid-template-columns: 1fr; gap: 28px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}

/* ---------------------------------------------------------------------------
   Comparsa progressiva
   ---------------------------------------------------------------------------
   La classe .js-reveal la mette script.js: senza JavaScript (o con
   prefers-reduced-motion) il contenuto è visibile da subito, mai nascosto.
   --------------------------------------------------------------------------- */
.js-reveal [data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.js-reveal [data-reveal].is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .js-reveal [data-reveal] { opacity: 1; transform: none; }
}

/* ---------------------------------------------------------------------------
   Navigazione mobile
   --------------------------------------------------------------------------- */
@media (max-width: 980px) {
  .nav-links { display: none; }
  .nav-toggle { display: inline-flex; }

  body.nav-open .nav-links {
    display: flex;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px clamp(20px, 4vw, 40px) 20px;
    background: #fff;
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-md);
    max-height: calc(100vh - 100%);
    overflow-y: auto;
  }
  body.nav-open .nav-links a {
    padding: 14px 0;
    font-size: 1rem;
    border-bottom: 1px solid var(--line);
    color: var(--text);
  }
  body.nav-open .nav-links a.is-active::after { display: none; }
  /* La CTA vive dentro il menu aperto: era l'unico punto in cui, su mobile,
     mancava del tutto una via di conversione dall'header. */
  body.nav-open .nav-links .btn {
    display: inline-flex;
    margin-top: 18px;
    border-bottom: none;
    color: #fff;
  }
}

/* ---------------------------------------------------------------------------
   Pagine legali (/privacy/, /note-legali/)
   --------------------------------------------------------------------------- */
.legal {
  max-width: 760px;
  margin: 0 auto;
  padding: clamp(40px, 5vw, 64px) clamp(20px, 4vw, 24px) 88px;
}
.legal h1 { font-size: clamp(1.8rem, 3.5vw, 2.4rem); margin-bottom: 8px; }
.legal-updated { color: var(--faint); font-size: 0.85rem; margin-bottom: 40px; }
.legal h2 { font-size: 1.2rem; margin: 38px 0 12px; }
.legal h3 { font-size: 1rem; margin: 22px 0 8px; }
.legal p, .legal li { color: var(--muted); font-size: 0.96rem; }
.legal p { margin-bottom: 12px; }
.legal ul { padding-left: 22px; margin: 0 0 12px; list-style: disc; }
.legal li { margin-bottom: 6px; }
.legal a { color: var(--brand); text-decoration: underline; }
.legal strong { color: var(--text); }
.legal table { width: 100%; border-collapse: collapse; margin: 12px 0 20px; font-size: 0.9rem; }
.legal th, .legal td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  vertical-align: top;
}
.legal th { color: var(--text); font-weight: 600; }
.legal .table-wrap { overflow-x: auto; }
.legal-note {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
  padding: 16px 18px;
  font-size: 0.92rem;
  margin: 20px 0;
}
.legal-back { margin-top: 32px; }

/* ---------------------------------------------------------------------------
   Contrasto elevato di Windows
   --------------------------------------------------------------------------- */
@media (forced-colors: active) {
  .card, .compare-col, .faq-item, .form-card, .mock, .perimeter { border: 1px solid CanvasText; }
  .btn { border: 1px solid CanvasText; }
}


/* ===========================================================================
   COMPATIBILITA' CON LE PAGINE NON ANCORA AGGIORNATE (/privacy/, /note-legali/)
   ---------------------------------------------------------------------------
   Quelle pagine condividono questo foglio di stile ma hanno ancora l'header e
   il footer della versione precedente. Questo blocco le tiene presentabili
   finche' non si copia dentro il markup nuovo di index.html.
   Una volta aggiornate, l'intero blocco si puo' cancellare.
   =========================================================================== */

/* Il lockup storico ha il fondo scuro incorporato: sull'header ora chiaro
   comparirebbe come un riquadro nero. Sostituisce solo l'immagine, non il
   markup, e non tocca index.html (che usa gia' il file _ink). */
.site-header .brand-logo[src$="reasoonai_lockup.svg"] {
  content: url("assets/reasoonai_lockup_ink.svg");
}

/* Footer della vecchia struttura: <footer> senza classe .site-footer */
footer:not(.site-footer) {
  background: #070d19;
  color: #afbed6;
  padding: 40px 0;
  --text: #ffffff;
  --muted: #afbed6;
  --faint: #8b9bb8;
  --line: rgba(255, 255, 255, 0.10);
  --accent: #5ea9ff;
  color-scheme: dark;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 24px;
}

.footer-label {
  display: block;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
  font-weight: 600;
  margin-bottom: 6px;
}

.footer-contact,
.footer-social,
.footer-legal,
.footer-lang { font-size: 0.85rem; }

.footer-contact a,
.footer-legal a { color: var(--muted); transition: color 0.2s ease; }
.footer-contact a:hover,
.footer-legal a:hover { color: var(--accent); }
.footer-legal a { white-space: nowrap; }
.footer-legal a + a::before { content: "·"; margin: 0 8px; color: var(--faint); }

.footer-brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  color: var(--faint);
  font-size: 0.85rem;
}
.footer-brand-row { display: flex; align-items: center; gap: 12px; }
.footer-brand .brand-mark { height: 32px; width: auto; }
.footer-copyright { color: var(--faint); white-space: nowrap; }
.footer-lang { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }

@media (max-width: 860px) {
  .footer-inner { flex-direction: column; align-items: center; text-align: center; }
  .footer-brand, .footer-lang { align-items: center; }
  .social-list, .lang-switch { justify-content: center; }
}
