/* ==========================================================================
   Virtualway — Hub istituzionale
   CSS unico, no framework, mobile-first.
   ========================================================================== */

:root {
  /* Palette neutra */
  --bg: #0a0c10;
  --bg-soft: #0d1015;
  --surface: #14171f;
  --surface-2: #1b1f29;
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #f4f5f8;
  --text-muted: #a4abba;
  --text-dim: #6d7382;

  /* Retail 3D — Planogram 3D */
  --red: #e5312d;
  --red-dark: #b3211e;
  --red-soft: rgba(229, 49, 45, 0.12);

  /* AI Privata — isolAIted */
  --cyan: #17b6d4;
  --cyan-dark: #0e557b;
  --cyan-soft: rgba(23, 182, 212, 0.12);

  /* Virtualway — brand corporate (logo_virtualway.png) */
  --orange: #ff6600;
  --orange-dark: #cc5200;
  --orange-soft: rgba(255, 102, 0, 0.14);

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 24px;
  --shadow-lg: 0 24px 60px -20px rgba(0, 0, 0, 0.55);
  --shadow-md: 0 12px 30px -12px rgba(0, 0, 0, 0.45);

  --container: 1180px;
  --header-h: 76px;

  --ff: "Titillium Web", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 0px); }
body, h1, h2, h3, h4, p, figure, blockquote { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input, textarea, select { font: inherit; color: inherit; }
svg { display: block; }

body {
  font-family: var(--ff);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

.container--narrow { max-width: 780px; }

section { position: relative; }

/* ---------- Tipografia ---------- */
h1, h2, h3, h4 { font-weight: 700; letter-spacing: -0.02em; line-height: 1.12; color: var(--text); }
h1 { font-size: clamp(2.4rem, 5.4vw, 4.2rem); }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.75rem); }
h3 { font-size: 1.3rem; }

/* Pesi tipografici dedicati: hero più leggero del default, titoli di sezione molto leggeri */
.hero h1 { font-weight: 500; }
.section-head h2,
.final-cta h2 { font-weight: 200; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.badge {
  display: inline-block;
  padding: 7px 16px;
  border: 1px solid var(--border-strong);
  border-radius: 100px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  background: var(--surface);
  margin-bottom: 20px;
}
.badge--accent {
  border-color: var(--orange);
  padding: 10px 22px;
  font-size: 0.92rem;
  margin-bottom: 32px;
}

.section-head { max-width: 640px; margin-bottom: 56px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-sub {
  margin-top: 16px;
  color: var(--text-muted);
  font-size: 1.08rem;
}

.eyebrow-line { display: flex; align-items: center; gap: 10px; justify-content: inherit; }

/* ---------- Bottoni ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 28px;
  border-radius: 100px;
  font-weight: 600;
  font-size: 0.98rem;
  white-space: nowrap;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, border-color 0.18s ease;
  border: 1px solid transparent;
}
.btn:active { transform: translateY(1px) scale(0.99); }
.btn-sm { padding: 8px 20px; font-size: 0.88rem; }
.btn-lg { padding: 14px 36px; font-size: 1.05rem; }

/* Bottone inibito temporaneamente (es. link a un prodotto non ancora live):
   nessun hover/click, resta visivamente riconoscibile come CTA ma "spento". */
.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
}
.btn:disabled:hover { transform: none; }

.btn-red { background: var(--red); color: #fff; box-shadow: 0 10px 26px -8px rgba(229, 49, 45, 0.55); }
.btn-red:hover { background: #ff3b36; box-shadow: 0 14px 34px -8px rgba(229, 49, 45, 0.7); }

.btn-cyan { background: var(--cyan); color: #04141a; box-shadow: 0 10px 26px -8px rgba(23, 182, 212, 0.5); }
.btn-cyan:hover { background: #23c9e8; box-shadow: 0 14px 34px -8px rgba(23, 182, 212, 0.65); }

.btn-primary { background: var(--text); color: #0a0c10; }
.btn-primary:hover { background: #fff; box-shadow: 0 12px 30px -10px rgba(255,255,255,0.35); }

.btn-orange { background: var(--orange); color: #fff; box-shadow: 0 10px 26px -8px rgba(255, 102, 0, 0.5); }
.btn-orange:hover { background: #ff7a1f; box-shadow: 0 14px 34px -8px rgba(255, 102, 0, 0.65); }

.btn-outline { border-color: var(--border-strong); color: var(--text); }
.btn-outline:hover { border-color: var(--text); background: rgba(255,255,255,0.04); }

.btn-ghost { color: var(--text-muted); padding: 10px 4px; }
.btn-ghost:hover { color: var(--text); }

.btn-block { width: 100%; }

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  /* La classe "container" centra con max-width + margin:0 auto, ma il testo
     dell'hero (.hero-content) è ancorato al bordo sinistro reale della pagina
     (niente centratura, solo padding-left: 56px). Per allineare il logo header
     con l'inizio del titolo hero, annulliamo qui la stessa centratura. */
  max-width: none;
  margin-left: 0;
  margin-right: 0;
  padding-left: 56px;
}

.logo img { height: 34px; width: auto; }

.main-nav { display: flex; align-items: center; gap: 32px; }
.main-nav a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-muted);
  position: relative;
  padding: 6px 0;
  transition: color 0.15s ease;
}
.main-nav a:hover, .main-nav a.is-active { color: var(--text); }
.main-nav a.is-active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 2px;
  background: var(--orange);
  border-radius: 2px;
}

.header-actions { display: flex; align-items: center; gap: 18px; }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 34px;
  height: 34px;
}
.nav-toggle span,
.nav-toggle::before,
.nav-toggle::after {
  content: "";
  display: block;
  height: 2px;
  width: 100%;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.2s ease;
}
.nav-toggle.is-open::before { transform: translateY(7px) rotate(45deg); }
.nav-toggle.is-open span { opacity: 0; }
.nav-toggle.is-open::after { transform: translateY(-7px) rotate(-45deg); }

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  position: relative;
  padding: 120px 0 96px;
  overflow: hidden;
  isolation: isolate;
}

.hero-bg { position: absolute; inset: 0; z-index: -1; background: var(--bg); }

.hero-bg::before,
.hero-bg::after {
  content: "";
  position: absolute;
  top: -20%;
  bottom: -20%;
  width: 62%;
  filter: blur(0px);
}
.hero-bg::before {
  left: -8%;
  background: radial-gradient(ellipse at 30% 30%, var(--cyan-dark) 0%, transparent 62%);
  opacity: 0.55;
}
.hero-bg::after {
  right: -8%;
  background: radial-gradient(ellipse at 70% 60%, var(--red-dark) 0%, transparent 62%);
  opacity: 0.5;
}

.hero-grid {
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, black 20%, transparent 80%);
  opacity: 0.5;
}

.hero-divider {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(115deg,
    transparent 42%,
    rgba(23, 182, 212, 0.06) 46%,
    rgba(244, 245, 248, 0.05) 50%,
    rgba(229, 49, 45, 0.06) 54%,
    transparent 58%
  );
}

/* Prova: sfondo fotografico per l'hero (attivare aggiungendo la classe
   "hero--photo" alla sezione .hero, sempre presente). Nasconde griglia e
   divisore astratti per non competere con l'immagine. La leggibilità del
   testo è affidata a UNA delle varianti seguenti, da scegliere aggiungendo
   una delle classi alla sezione .hero insieme a "hero--photo":
   - "hero--plain"     → nessuna retinatura, nessun pannello: si sfrutta la
                         sfumatura al nero già presente nell'immagine stessa
                         (variante attiva di default, pensata per HeroBack04.png)
   - "hero--card"      → nessuna retinatura sull'immagine, testo dentro un pannello
                         semi-trasparente
   - "hero--scrim"     → retinatura scura uniforme su tutta l'immagine
   - "hero--gradient"  → sfumatura da sinistra (testo) a destra (immagine piena) */
.hero-photo {
  /* Niente più "cover": a viewport stretti/alti (es. scaling Windows 150%,
     o finestra ridotta) "cover" tagliava progressivamente il lato destro
     dell'immagine per riempire un riquadro diventato più stretto e alto.
     Forziamo invece SEMPRE la larghezza piena (l'immagine non perde mai i
     lati) e lasciamo che l'altezza segua le proporzioni naturali: se il
     riquadro hero diventa più alto dell'immagine risultante, si vede un
     piccolo margine dello sfondo scuro (.hero-bg) sotto — molto meno
     invasivo che perdere parte del contenuto dell'immagine. */
  position: absolute;
  top: 0;
  left: 0;
  z-index: -1;
  width: 100%;
  height: auto;
  display: block;
}
.hero-photo-overlay { position: absolute; inset: 0; z-index: -1; }

/* "hero--plain": nessuna regola necessaria, è lo stato di base (nessun
   overlay, nessun pannello) — la classe resta solo per documentare la scelta. */

.hero--scrim .hero-photo-overlay { background: rgba(10, 12, 16, 0.55); }

.hero--gradient .hero-photo-overlay {
  background: linear-gradient(90deg,
    var(--bg) 0%,
    rgba(10, 12, 16, 0.94) 26%,
    rgba(10, 12, 16, 0.6) 48%,
    rgba(10, 12, 16, 0.18) 70%,
    rgba(10, 12, 16, 0) 88%
  );
}

.hero--card .hero-content {
  max-width: 620px;
  background: rgba(8, 10, 14, 0.62);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  padding: 48px;
  box-shadow: var(--shadow-lg);
}

.hero--photo .hero-grid,
.hero--photo .hero-divider { display: none; }

/* Con la foto attiva, l'eventuale margine sotto l'immagine (riquadro più alto
   dell'immagine a larghezza piena, vedi .hero-photo) deve mostrare solo il
   colore pieno di .hero-bg (var(--bg), lo stesso dell'header) — non i due
   blob sfumati ciano/rosso pensati per la variante astratta senza foto. */
.hero--photo .hero-bg::before,
.hero--photo .hero-bg::after { display: none; }

/* .hero-content porta anche la classe "container", che centra con margin:0 auto.
   Qui annulliamo la centratura: il blocco di testo deve restare ancorato al
   bordo sinistro del frame (con un padding proprio, più ampio del default),
   non fluttuare centrato quando il viewport è più largo di 1180px. */
.hero-content {
  max-width: 880px;
  margin-left: 0;
  padding-left: 56px;
}

.hero h1 { margin-bottom: 24px; }
.hero h1 .accent {
  color: var(--orange);
}

.hero-sub {
  font-size: 1.18rem;
  color: var(--text-muted);
  max-width: 680px;
  margin-bottom: 40px;
}

.hero-cta { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 64px; }

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px 24px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
}
.hero-stats .stat-num {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--orange);
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.7);
}
.hero-stats .stat-label {
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 500;
  margin-top: 3px;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.85);
}

/* ==========================================================================
   Trusted-by (attualmente non usata in pagina — pronta per quando saranno
   disponibili le immagini definitive dei loghi clienti)
   ========================================================================== */
.trusted { padding: 56px 0; border-bottom: 1px solid var(--border); }
.trusted-label {
  text-align: center;
  color: var(--text-dim);
  font-size: 0.85rem;
  letter-spacing: 0.03em;
  margin-bottom: 32px;
}
.trusted-logos {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
}
.trusted-logos .chip {
  background: #fff;
  border-radius: var(--radius-sm);
  padding: 10px 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 56px;
  width: 132px;
}
.trusted-logos img { max-height: 30px; max-width: 100%; object-fit: contain; }

/* ==========================================================================
   Products (soluzioni)
   ========================================================================== */
.products { padding: 72px 0 120px; }
.products.section-light { background: var(--bg-soft); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

/* I box prodotto restano invariati (tema scuro) anche quando la sezione che li
   contiene passa al tema chiaro: si ridefiniscono localmente i token originali. */
.section-light .product-card {
  --surface: #14171f;
  --surface-2: #1b1f29;
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #f4f5f8;
  --text-muted: #a4abba;
  --text-dim: #6d7382;
}

.product-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}

.product-card {
  position: relative;
  border-radius: var(--radius-lg);
  padding: 44px;
  background: var(--surface);
  border: 1px solid var(--border);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease, border-color 0.25s ease;
}
.product-card:hover { transform: translateY(-4px); }

.product-card--red:hover { border-color: rgba(229, 49, 45, 0.45); }
.product-card--cyan:hover { border-color: rgba(23, 182, 212, 0.45); }

.product-card > * { position: relative; z-index: 1; }

.product-card .p-logo {
  height: 34px;
  width: auto;
  align-self: center; /* evita lo stretch orizzontale imposto da align-items:stretch del flex-container */
  object-fit: contain;
  margin-bottom: 28px;
}
.product-card--cyan .p-logo { height: 30px; }

.product-card--red .eyebrow { color: var(--red); }
.product-card--cyan .eyebrow { color: var(--cyan); }

.product-card h3 { font-size: 1.6rem; font-weight: 400; margin: 10px 0 16px; }
.product-card p.desc { color: var(--text-muted); margin-bottom: 24px; }

.product-card .feats { display: flex; flex-direction: column; gap: 12px; margin-bottom: 32px; }
.product-card .feats li { display: flex; align-items: flex-start; gap: 10px; font-size: 0.95rem; color: var(--text); }
.product-card .feats svg { flex-shrink: 0; margin-top: 3px; }
.product-card--red .feats svg { color: var(--red); }
.product-card--cyan .feats svg { color: var(--cyan); }

.product-card .p-cta { margin-top: auto; }

/* Riga CTA + badge "in arrivo" per prodotti non ancora live (vedi isolAIted) */
.product-card .p-cta-row {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.product-card .p-cta-row .p-cta { margin-top: 0; }

/* ==========================================================================
   Timeline
   ========================================================================== */
.timeline-section { padding: 72px 0 120px; background: var(--bg-soft); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

/* Tema chiaro per l'alternanza dark/light delle sezioni: ridefinisce le variabili
   neutre solo all'interno della sezione che porta questa classe. Tutti i componenti
   (badge, testo, bordi, timeline) leggono queste stesse variabili, quindi si
   "ritingono" da soli. Riutilizzabile su qualunque sezione (.products, .timeline-section, ...). */
.section-light {
  --bg-soft: #f4f5f7;
  --surface: #ffffff;
  --surface-2: #eceef2;
  --border: rgba(10, 12, 16, 0.09);
  --border-strong: rgba(10, 12, 16, 0.18);
  --text: #4f4f4f;
  --text-muted: #4c5262;
  --text-dim: #767c8c;
}
.section-light .timeline-item .t-logo-chip {
  display: inline-flex;
  align-items: center;
  background: #0a0c10;
  padding: 8px 14px;
  border-radius: 8px;
  margin-bottom: 14px;
}
.section-light .timeline-item .t-logo-chip .t-logo { margin-bottom: 0; }

.timeline { position: relative; max-width: 920px; margin: 0 auto; }
.timeline::before {
  content: "";
  position: absolute;
  left: 24px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: linear-gradient(180deg, var(--orange), var(--border) 16%, var(--border) 100%);
}

.timeline-item {
  position: relative;
  padding: 0 0 56px 66px;
}
.timeline-item:last-child { padding-bottom: 0; }

.timeline-item .dot {
  position: absolute;
  left: 15px;
  top: 4px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--bg-soft);
  border: 2px solid var(--border-strong);
  display: flex;
  align-items: center;
  justify-content: center;
}
.timeline-item .dot::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--text-dim); }
.timeline-item.is-product .dot { border-color: var(--red); }
.timeline-item.is-product .dot::after { background: var(--red); }
.timeline-item.is-ai .dot { border-color: var(--cyan); }
.timeline-item.is-ai .dot::after { background: var(--cyan); }
.timeline-item.is-corp .dot { border-color: var(--orange); }
.timeline-item.is-corp .dot::after { background: var(--orange); }

.timeline-item .year {
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--text-dim);
  margin-bottom: 8px;
  max-width: 620px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.timeline-item .year-group { display: flex; align-items: center; gap: 10px; }

/* Riutilizzabile ovunque serva segnalare "in arrivo" (timeline, card prodotto, footer) */
.tag-live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--cyan);
  background: var(--cyan-soft);
  border: 1px solid rgba(23, 182, 212, 0.35);
  padding: 3px 10px 3px 8px;
  border-radius: 100px;
  white-space: nowrap;
}
.tag-live .pulse {
  width: 6px; height: 6px; border-radius: 50%; background: var(--cyan);
  box-shadow: 0 0 0 0 rgba(23,182,212,0.6);
  animation: pulse 1.8s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(23,182,212,0.55); }
  70% { box-shadow: 0 0 0 8px rgba(23,182,212,0); }
  100% { box-shadow: 0 0 0 0 rgba(23,182,212,0); }
}

.timeline-item h3 { font-size: 1.25rem; margin-bottom: 10px; }
.timeline-item p { color: var(--text-muted); max-width: 620px; }
.timeline-item .t-logo { height: 22px; width: auto; flex-shrink: 0; }

/* L'animazione di reveal si attiva solo se JS è disponibile (classe aggiunta da main.js).
   Senza JS il contenuto resta sempre visibile: nessuna dipendenza critica dallo script. */
.js-ready .timeline-item {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.js-ready .timeline-item.in-view { opacity: 1; transform: translateY(0); }

/* ==========================================================================
   Final CTA
   ========================================================================== */
.final-cta {
  padding: 140px 0;
  text-align: center;
  background: #0f1420; /* colore pieno, nessuna sfumatura */
}
.final-cta-inner {
  max-width: 1050px;
  margin: 0 auto;
}
.final-cta h2 {
  margin-bottom: 18px;
  color: var(--text);
}
.final-cta p {
  color: var(--text-muted);
  font-size: 1.08rem;
  max-width: 560px;
  margin: 0 auto 36px;
}
@media (min-width: 900px) {
  .final-cta h2 { white-space: nowrap; }
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer { border-top: 1px solid var(--border); padding: 44px 0 0; background: var(--bg-soft); }

.footer-grid {
  display: grid;
  grid-template-columns: 2.2fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 32px;
}

.footer-col .f-logo { height: 34px; margin-bottom: 18px; }
.footer-col .f-claim { color: var(--text-dim); font-size: 0.95rem; max-width: none; white-space: nowrap; }

.footer-col h4 {
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 20px;
  font-weight: 700;
}
.footer-col ul { display: flex; flex-direction: column; gap: 14px; }
.footer-col a { color: var(--text-muted); font-size: 0.95rem; transition: color 0.15s ease; }
.footer-col a:hover { color: var(--orange); }
.footer-col .flogo-link img { height: 20px; width: auto; }
.footer-col .flogo-link { display: block; }
.footer-col .flogo-link.is-disabled { opacity: 0.45; cursor: not-allowed; }
.footer-col li:has(.flogo-link) { display: flex; flex-direction: column; gap: 8px; }
.footer-col .tag-live { align-self: flex-start; }

.footer-bottom {
  border-top: 1px solid var(--border);
  padding: 22px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  color: var(--text-dim);
  font-size: 0.85rem;
}

/* ==========================================================================
   Pagine interne (Contatti / Policy)
   ========================================================================== */
.page-header { padding: 132px 0 64px; text-align: center; }
.page-header h1 { margin-bottom: 18px; font-weight: 500; }
.page-header p { color: var(--text-muted); font-size: 1.1rem; max-width: 620px; margin: 0 auto; }

.contact-section { padding: 0 0 120px; }
.contact-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 32px;
  align-items: start;
}

.contact-form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.field { display: flex; flex-direction: column; gap: 8px; }
.field label { font-size: 0.88rem; font-weight: 600; color: var(--text-muted); }
.field .req { color: var(--red); }

.field input,
.field select,
.field textarea {
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 13px 16px;
  color: var(--text);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  width: 100%;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(255, 102, 0, 0.18);
}
.field textarea { min-height: 130px; resize: vertical; }

.field select {
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'><path d='M1 1l6 6 6-6' stroke='%23a4abba' stroke-width='1.6' fill='none' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
}

.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

.field-check {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 0.86rem;
  color: var(--text-muted);
}
.field-check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--orange); flex-shrink: 0; }
.field-check a { color: var(--text); text-decoration: underline; text-underline-offset: 2px; }

.honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.form-feedback {
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  font-size: 0.9rem;
  display: none;
}
.form-feedback.is-visible { display: block; }
.form-feedback.is-success { background: var(--cyan-soft); border: 1px solid rgba(23,182,212,0.4); color: #bdf1fa; }
.form-feedback.is-error { background: var(--red-soft); border: 1px solid rgba(229,49,45,0.4); color: #ffd4d2; }

.contact-info { display: flex; flex-direction: column; gap: 20px; }
.info-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.info-card .icon-wrap {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  display: flex; align-items: center; justify-content: center;
  color: var(--orange);
}
.info-card h3 { font-size: 1.05rem; }
.info-card p, .info-card a { color: var(--text-muted); font-size: 0.96rem; }
.info-card a:hover { color: var(--text); }
.info-card img.map-img { border-radius: var(--radius-sm); margin-top: 4px; height: 120px; width: 100%; object-fit: cover; }

/* ---------- Prose (policy pages) ---------- */
.prose { padding: 0 0 120px; }
.prose .updated { color: var(--text-dim); font-size: 0.88rem; margin-bottom: 48px; }
.prose h2 { font-size: 1.5rem; margin: 48px 0 16px; }
.prose h2:first-of-type { margin-top: 0; }
.prose h3 { font-size: 1.1rem; margin: 28px 0 12px; }
.prose p { color: var(--text-muted); margin-bottom: 16px; }
.prose ul { margin: 0 0 16px; display: flex; flex-direction: column; gap: 10px; }
.prose ul li { color: var(--text-muted); padding-left: 22px; position: relative; }
.prose ul li::before {
  content: "";
  position: absolute; left: 0; top: 9px;
  width: 6px; height: 6px; border-radius: 50%;
  background: linear-gradient(90deg, var(--cyan), var(--red));
}
.prose a { color: var(--text); text-decoration: underline; text-underline-offset: 2px; }
.prose strong { color: var(--text); }
.prose table { width: 100%; border-collapse: collapse; margin: 8px 0 24px; font-size: 0.92rem; }
.prose table th, .prose table td { text-align: left; padding: 12px 14px; border: 1px solid var(--border); color: var(--text-muted); }
.prose table th { color: var(--text); background: var(--surface); }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 900px) {
  .product-cards { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; row-gap: 40px; }
  .footer-col .f-claim { white-space: normal; max-width: 320px; }
  .contact-grid { grid-template-columns: 1fr; }
  .hero-stats { gap: 28px; }
}

/* Il menu con 4 voci ("Home", "Le nostre soluzioni", "La nostra storia",
   "Contatti") ha bisogno di più spazio prima di passare all'hamburger
   rispetto al resto del layout mobile: breakpoint dedicato e più alto. */
@media (max-width: 920px) {
  :root { --header-h: 68px; }
  .main-nav {
    position: fixed;
    top: var(--header-h);
    left: 0; right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 8px 24px 20px;
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
  }
  .main-nav.is-open { opacity: 1; transform: translateY(0); pointer-events: auto; }
  .main-nav a { padding: 12px 0; width: 100%; border-bottom: 1px solid var(--border); }
  .header-actions .btn-sm { display: none; }
  .nav-toggle { display: flex; }
}

@media (max-width: 760px) {
  .header-inner { padding-left: 24px; }
  .hero { padding: 96px 0 64px; }
  .hero-content { padding-left: 24px; }
  .hero--card .hero-content { max-width: 100%; padding: 28px; }

  .products, .timeline-section, .final-cta { padding: 80px 0; }
  .final-cta-inner { padding: 48px 24px; }

  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .field-row { grid-template-columns: 1fr; }
  .page-header { padding: 108px 0 48px; }
}

@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
  .trusted-logos .chip { width: 108px; height: 48px; }
  .hero-stats { grid-template-columns: 1fr; gap: 16px; }
}

/* ---------- Utility ---------- */
.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

::selection { background: var(--cyan); color: #04141a; }

/* Cookie — banner iniziale (solo tecnici + Google Fonts opzionale, gestibile) */
.cookie-toast {
  position: fixed;
  left: 20px; right: auto; bottom: 20px;
  z-index: 200;
  width: 100%;
  max-width: 380px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 22px;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  gap: 12px;
  transform: translateY(20px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.cookie-toast.is-visible { opacity: 1; transform: translateY(0); pointer-events: auto; }
.cookie-toast-title { font-size: 1.05rem; font-weight: 700; color: var(--text); }
.cookie-toast p { font-size: 0.88rem; color: var(--text-muted); }
.cookie-toast a { color: var(--text); text-decoration: underline; }
.cookie-toast .actions { display: flex; flex-direction: column; gap: 10px; margin-top: 4px; }

/* Cookie — toggle switch riutilizzabile (banner + pannello preferenze) */
.switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: 42px;
  height: 24px;
  border-radius: 100px;
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  cursor: pointer;
  flex-shrink: 0;
}
.switch input {
  position: absolute;
  inset: 0;
  opacity: 0;
  margin: 0;
  cursor: pointer;
}
.switch-dot {
  position: absolute;
  top: 2px; left: 2px;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--text-dim);
  transition: transform 0.2s ease, background 0.2s ease;
}
.switch input:checked ~ .switch-dot { transform: translateX(18px); background: var(--orange); }
.switch.is-locked { cursor: default; opacity: 0.7; }
.switch.is-locked .switch-dot { transform: translateX(18px); }

/* Cookie — pannello "Preferenze cookie" (modale, aperto dal banner o dal footer) */
.cookie-modal {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.cookie-modal.is-open { display: flex; }
.cookie-modal-backdrop { position: absolute; inset: 0; background: rgba(5, 6, 9, 0.72); }
.cookie-modal-panel {
  position: relative;
  width: 100%;
  max-width: 560px;
  max-height: 85vh;
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
}
.cookie-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 26px;
  border-bottom: 1px solid var(--border);
}
.cookie-modal-head h2 { font-size: 1.25rem; }
.cookie-modal-x {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted);
  transition: color 0.15s ease, border-color 0.15s ease;
  flex-shrink: 0;
}
.cookie-modal-x:hover { color: var(--text); border-color: var(--border-strong); }
.cookie-modal-body { padding: 22px 26px; display: flex; flex-direction: column; gap: 12px; }

.cookie-cat { border: 1px solid var(--border); border-radius: var(--radius-md); overflow: hidden; }
.cookie-cat-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 16px; background: var(--surface-2); }
.cookie-cat-label { display: flex; align-items: center; gap: 10px; font-size: 0.95rem; font-weight: 600; color: var(--text); }
.cookie-cat-label .chev { color: var(--text-dim); flex-shrink: 0; transition: transform 0.2s ease; }
.cookie-cat-label[aria-expanded="true"] .chev { transform: rotate(180deg); }
.cookie-cat-panel { padding: 14px 16px; border-top: 1px solid var(--border); }
.cookie-cat-panel p { color: var(--text-muted); font-size: 0.88rem; }
.cookie-cat-panel[hidden] { display: none; }

.cookie-info-box { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 16px 18px; }
.cookie-info-box h3 { font-size: 0.92rem; margin-bottom: 6px; }
.cookie-info-box p { color: var(--text-muted); font-size: 0.88rem; }
.cookie-info-box a { color: var(--text); text-decoration: underline; text-underline-offset: 2px; }

.cookie-modal-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 18px 26px;
  border-top: 1px solid var(--border);
}
.cookie-modal-foot-left { display: flex; gap: 10px; flex-wrap: wrap; }

@media (max-width: 480px) {
  .cookie-toast { left: 12px; right: 12px; max-width: none; }
  .cookie-modal-foot { flex-direction: column; align-items: stretch; }
  .cookie-modal-foot-left { flex-direction: column; }
  .cookie-modal-foot-left .btn, .cookie-modal-foot > .btn { width: 100%; }
}
