/* =========================================================================
   LOVABYTE — Design System
   Un unico file di stile centralizzato. Aggiorna i token qui in alto e
   l'intero sito si aggiorna di conseguenza.

   CORREZIONI DI QUESTO GIRO
   - Testo secondario piu' scuro: --text-3 era #7b89a4, cioe' 3,4:1 su
     bianco. Sotto il minimo leggibile: descrizioni prodotto, etichette
     dei numeri e riga legale del footer erano al limite dell'invisibile.
     Ora e' #5c6b8a (circa 5:1).
   - Menu mobile: se le voci non ci stanno adesso scorre, e con il menu
     aperto la pagina sotto non scrolla piu' sotto le dita.
   - .mobile-cta esisteva nell'header ma non nel foglio di stile: le voci
     "Contatti" e "Area cliente" comparivano anche su desktop. Ora sono
     davvero solo mobile.
   - Aree toccabili portate ad almeno 40px e testi minimi a 13px sotto i
     520px di larghezza.
   - Tolto il blocco del carrello: il carrello non esiste piu' (vedi
     main.js), quindi non serve piu' vestirlo.
   ========================================================================= */

/* -------------------------------------------------------------------------
   0. FONT LOCALI (niente Google Fonts → niente IP verso Google al primo paint)
   ------------------------------------------------------------------------- */
@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/poppins-400.woff2") format("woff2");
}
@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/poppins-500.woff2") format("woff2");
}
@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/poppins-600.woff2") format("woff2");
}
@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/poppins-700.woff2") format("woff2");
}
@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("../fonts/poppins-800.woff2") format("woff2");
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/jetbrains-mono-400.woff2") format("woff2");
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/jetbrains-mono-500.woff2") format("woff2");
}

/* -------------------------------------------------------------------------
   1. DESIGN TOKENS
   ------------------------------------------------------------------------- */
:root {
  /* ===== Brand ufficiale Lovabyte ===== */
  --navy: #07074E;      /* primario scuro */
  --blue: #3372A9;      /* primario medio */
  --sky:  #6ACFF6;      /* primario chiaro */
  --pale: #D9F1FD;      /* primario pallido */
  --teal: #069A8E;      /* secondario */
  --mint: #A0E4CB;      /* secondario */
  --tan:  #E6CBA8;      /* secondario caldo */
  --grayb:#D3D1D1;      /* secondario neutro */

  /* Alias di compatibilità (i componenti usano questi nomi) → mappati sul brand */
  --violet-500: #3372A9;
  --violet-400: #2b6394;   /* usato per link e bordi: scurito per il contrasto */
  --violet-600: #07074E;
  --cyan-400: #6ACFF6;
  --cyan-300: #a7e2fb;
  --pink-400: #069A8E;

  /* Superfici (tema chiaro) */
  --bg: #ffffff;
  --bg-1: #f2f9fe;
  --bg-2: #e9f4fd;
  --surface: #ffffff;
  --surface-solid: #ffffff;
  --border: #07074e1f;
  --border-strong: #07074e33;

  /* Testo (navy su chiaro) */
  --text: #0d1741;
  --text-2: #3a4a6b;     /* ~7:1 su bianco — body secondario */
  --text-3: #4a5a7a;    /* testo terziario: ≥4.5:1 su bianco (era #5c6b8a al limite) */

  /* Accenti funzionali */
  --accent: var(--blue);
  --accent-2: var(--sky);
  --success: #0b7d73;
  --warning: #a9631a;
  --danger: #c2333a;

  /* Gradiente firma (blu monocromatico, sobrio) */
  --grad: linear-gradient(120deg, #2c62a0, #4a97d6);
  --grad-soft: linear-gradient(120deg, #6acff622, #a0e4cb22);

  /* Tipografia */
  --font-sans: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-display: "Poppins", var(--font-sans);
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* Raggi & ombre (morbide, blu tenue) */
  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 22px;
  --r-xl: 30px;
  --r-full: 999px;
  --shadow: 0 16px 40px -20px #07074e33;
  --shadow-glow: 0 10px 34px -14px #3372a955;

  /* Layout */
  --maxw: 1200px;
  --gutter: clamp(20px, 5vw, 48px);
  --nav-h: 72px;
}

/* -------------------------------------------------------------------------
   2. RESET
   ------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
ul { list-style: none; }
::selection { background: var(--sky); color: var(--navy); }

/* Il focus da tastiera deve vedersi ovunque: senza questo, chi naviga con
   Tab non sa dove si trova (button/a hanno lo sfondo tolto dal reset). */
:where(a, button, input, select, textarea, [tabindex]):focus-visible {
  outline: 3px solid var(--navy);
  outline-offset: 2px;
  border-radius: 6px;
}

/* Salta al contenuto: visibile solo quando riceve il focus.
   Non usare left:-9999px: allarga document.scrollWidth e peggiora
   il recovery dopo pinch-zoom su mobile Safari. */
.skip-link {
  position: absolute; left: 0; top: 0; z-index: 300;
  width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap;
  border: 0;
  background: var(--navy); color: #fff; font-weight: 600;
}
.skip-link:focus,
.skip-link:focus-visible {
  width: auto; height: auto; margin: 0; padding: 12px 18px;
  clip: auto; overflow: visible; white-space: normal;
  border-radius: 0 0 var(--r-sm) 0;
}

/* Honeypot anti-bot: clip pattern (mai left:-9999px — gonfia scrollWidth). */
.hp-campo {
  position: absolute !important;
  left: 0; top: 0;
  width: 1px !important; height: 1px !important;
  padding: 0 !important; margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  clip-path: inset(50%);
  white-space: nowrap !important;
  border: 0 !important;
  pointer-events: none;
}
.hp-campo input,
.hp-campo label {
  width: 1px !important;
  max-width: 1px !important;
  height: 1px !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* Solo per i lettori di schermo */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* Sfondo tenue brand */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(55% 45% at 12% 0%, #6acff626, transparent 60%),
    radial-gradient(45% 40% at 92% 6%, #a0e4cb22, transparent 55%);
}

/* -------------------------------------------------------------------------
   3. TIPOGRAFIA
   ------------------------------------------------------------------------- */
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 700; line-height: 1.1; letter-spacing: -0.02em; }
h1 { font-size: clamp(2.1rem, 6vw, 4.4rem); overflow-wrap: break-word; }
h2 { font-size: clamp(1.75rem, 4vw, 3rem); overflow-wrap: break-word; }
h3 { font-size: clamp(1.25rem, 2.5vw, 1.7rem); }
p { color: var(--text-2); }
.lead { font-size: clamp(1.02rem, 2vw, 1.3rem); color: var(--text-2); }
.mono { font-family: var(--font-mono); }
.gradient-text {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* -------------------------------------------------------------------------
   4. LAYOUT
   ------------------------------------------------------------------------- */
.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: clamp(56px, 10vw, 130px); }
.section-sm { padding-block: clamp(40px, 6vw, 80px); }
.grid { display: grid; gap: clamp(18px, 3vw, 32px); }
.cols-2 { grid-template-columns: repeat(2, 1fr); }
.cols-3 { grid-template-columns: repeat(3, 1fr); }
.cols-4 { grid-template-columns: repeat(4, 1fr); }
.center { text-align: center; }
.stack > * + * { margin-top: 1rem; }

@media (max-width: 900px) {
  .cols-3, .cols-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 620px) {
  .cols-2, .cols-3, .cols-4 { grid-template-columns: 1fr; }
}

/* Tabelle: su telefono devono scorrere DENTRO un contenitore, non
   sfondare la pagina. Chi mette una tabella la avvolga in .table-wrap. */
.table-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; }
.table-wrap > table { min-width: 520px; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 12px; font-size: .92rem; }
th { font-weight: 600; color: var(--text-2); }
tbody tr + tr td { border-top: 1px solid var(--border); }

/* -------------------------------------------------------------------------
   5. COMPONENTI — Pulsanti
   ------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 24px;
  min-height: 44px;
  max-width: 100%;
  border-radius: var(--r-full);
  font-weight: 600;
  font-size: .95rem;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease, border-color .2s;
  white-space: nowrap;
}
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 10px 30px -10px var(--violet-600); }
.btn-primary:hover { box-shadow: 0 14px 40px -8px var(--violet-500); }
.btn-ghost { background: #07074e0a; color: var(--text); border: 1px solid var(--border-strong); }
.btn-ghost:hover { background: #07074e14; border-color: var(--violet-400); color: var(--text); }
.btn-lg { padding: 16px 32px; min-height: 52px; font-size: 1.02rem; }
.btn-sm { padding: 10px 18px; min-height: 44px; font-size: .86rem; }
.btn:focus-visible {
  outline: 2px solid var(--violet-500);
  outline-offset: 2px;
}
.btn-primary:focus-visible { box-shadow: 0 0 0 3px #7c5cff55, 0 10px 30px -10px var(--violet-600); }
.btn-ghost:focus-visible { border-color: var(--violet-500); background: #07074e14; }
@media (hover: hover) { .btn:hover { transform: translateY(-2px); } }
@media (max-width: 400px) { .btn { white-space: normal; text-align: center; } }

/* -------------------------------------------------------------------------
   6. COMPONENTI — Card / superfici
   ------------------------------------------------------------------------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: clamp(20px, 3vw, 32px);
  box-shadow: 0 1px 2px #07074e0d, 0 8px 24px -18px #07074e24;
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
  position: relative;
  overflow: hidden;
}
@media (hover: hover) {
  .card:hover { transform: translateY(-4px); border-color: var(--sky); box-shadow: 0 14px 32px -18px #3372a94d; }
}
.card-glow::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: var(--grad);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity .3s;
}
.card-glow:hover::before { opacity: 1; }

/* Card-link: intera card cliccabile (shop / catalogo) */
a.card-link {
  display: block;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
}
a.card-link:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}
a.card-link .tag { pointer-events: none; }

.icon-badge {
  width: 52px; height: 52px;
  display: grid; place-items: center;
  border-radius: var(--r-md);
  background: var(--grad-soft);
  border: 1px solid var(--border-strong);
  font-size: 1.5rem;
  margin-bottom: 18px;
  color: var(--violet-600);
}
.icon-badge--svg { font-size: 0; line-height: 0; }
.icon-badge svg { display: block; }
.media-slot {
  /* Landscape nativo delle foto Hub (1600×900 ≈ 16:9). 16/11 tagliava troppo in verticale. */
  aspect-ratio: 16 / 9;
  background: linear-gradient(160deg, #dff0ff, #eafaf4);
  display: grid;
  place-items: center;
  position: relative;
  color: var(--violet-600);
  overflow: hidden;
}
.media-slot svg { width: min(32%, 120px); opacity: .88; }
.media-slot__img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
}
/* Stampanti + murales: soggetto in basso nel fotogramma */
.media-slot--pos-bottom .media-slot__img {
  object-position: center 78%;
}
/* Insegna / vetrina: logo e arco in alto */
.media-slot--pos-top .media-slot__img {
  object-position: center top;
}
.media-slot--pos-center .media-slot__img {
  object-position: center 35%;
}
/* Foto telefono (≈9:16): slot ritratto, non forzarne il crop in panoramica */
.media-slot--portrait {
  aspect-ratio: 3 / 4;
  width: 100%;
  max-width: min(100%, 440px);
  margin-inline: auto;
}
.media-slot--portrait .media-slot__img {
  object-position: center 46%;
}
.media-slot--portrait.media-slot--pos-bottom .media-slot__img {
  object-position: center 70%;
}
/* Colonna in griglia a 2: usa tutta la larghezza della colonna */
.media-slot--portrait-col {
  aspect-ratio: 3 / 4;
  width: 100%;
  max-width: none;
  margin-inline: 0;
}
@media (max-width: 900px) {
  .media-slot--portrait-col {
    max-width: min(100%, 380px);
    margin-inline: auto;
  }
}
.media-slot--hero {
  aspect-ratio: auto;
  border-radius: inherit;
}
.media-slot--hero .media-slot__img {
  border-radius: inherit;
  /* Hero visual è 1:1: ancora stampanti/murales verso il basso */
  object-position: center 72%;
}
.media-slot--gallery {
  /* Un solo rapporto per tutta la fila home */
  aspect-ratio: 16 / 9;
  width: 100%;
  border-radius: var(--r-md);
}
.media-slot--filled { background: #0b1220; }

/* Galleria home — overflow nativo, scroll-snap, no JS richiesto */
.home-gallery-section { padding-top: 0; }
.home-gallery-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin: 0 0 14px;
}
.home-gallery-dot {
  min-width: 36px;
  min-height: 36px;
  display: inline-grid;
  place-items: center;
  border-radius: var(--r-full);
  border: 1px solid var(--border-strong);
  background: #fff;
  color: var(--text-2);
  font-family: var(--font-mono);
  font-size: .82rem;
  text-decoration: none;
}
.home-gallery-dot:hover,
.home-gallery-dot:focus-visible {
  border-color: var(--blue);
  color: var(--navy);
  outline: none;
}
.home-gallery {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  padding: 4px 2px 14px;
  outline: none;
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
}
.home-gallery:focus-visible {
  box-shadow: 0 0 0 2px var(--blue);
  border-radius: var(--r-md);
}
.home-gallery-item {
  /* vw — non % del flex parent — altrimenti il contenitore cresce e allarga il documento */
  flex: 0 0 min(72vw, 560px);
  margin: 0;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  min-width: 0;
  /* Containing block per .sr-only absolute: senza relative le caption
     usano l'initial containing block e gonfiano documentElement.scrollWidth
     (sintomo tipico: colonna stretta + canvas bianco dopo pinch-zoom Safari). */
  position: relative;
  overflow: hidden;
}
@media (max-width: 720px) {
  .home-gallery {
    scroll-padding-inline: 0;
  }
  .home-gallery-item {
    /* 100% del gallery (larghezza definita), non del content-size flex parent */
    flex: 0 0 100%;
    max-width: 100%;
  }
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.tema .em svg, .canale .em svg { width: 1.35rem; height: 1.35rem; display: block; color: var(--violet-600); }
.canale .em svg { width: 1.75rem; height: 1.75rem; }
.stat-tile .n svg { margin-inline: auto; }

/* Chip / eyebrow */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: var(--r-full);
  background: #07074e0a;
  border: 1px solid var(--border-strong);
  font-family: var(--font-mono);
  font-size: .82rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--text-2);
}
.eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--blue); }

.tag {
  display: inline-block;
  padding: 4px 12px;
  border-radius: var(--r-full);
  font-size: .82rem;
  font-weight: 600;
  background: #3372a91f;
  color: #23557f;
  border: 1px solid #3372a944;
}

/* -------------------------------------------------------------------------
   7. HEADER / NAV
   ------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  transition: background .3s, border-color .3s;
  border-bottom: 1px solid transparent;
}
.site-header.scrolled {
  background: #fffffff2;
  backdrop-filter: blur(16px);
  border-bottom-color: var(--border);
}
.nav { display: flex; align-items: center; justify-content: space-between; width: 100%; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 700; font-size: 1.32rem; flex: 0 0 auto; }
.brand-mark { height: 34px; display: flex; align-items: center; flex: 0 0 auto; }
.brand-mark svg, .brand-mark img { height: 34px; width: auto; max-width: min(148px, 42vw); object-fit: contain; display: block; }
.brand-word { color: var(--navy); font-weight: 700; letter-spacing: -.02em; }
.nav-links { display: flex; align-items: center; gap: 2px; }
.nav-links a {
  padding: 9px 10px;
  border-radius: var(--r-full);
  font-size: .9rem;
  color: var(--text-2);
  transition: color .2s, background .2s;
  /* "Service 3D" e "Chi siamo" si spezzavano in due righe su tutte le pagine:
     un menu con le parole a capo e' il segnale piu' immediato di un sito
     messo insieme in fretta. Una voce di menu non va mai a capo; se lo spazio
     manca davvero, sotto i 960 pixel il menu diventa a tendina. */
  white-space: nowrap;
}
.nav-links a:hover, .nav-links a.active { color: var(--text); background: #07074e0f; }
.nav-cta { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }

/* Le voci duplicate nel menu servono solo quando la barra si chiude:
   su desktop "Contatti" e "Area cliente" stanno gia' a destra. */
.mobile-cta { display: none !important; }

.lang-switch { display: flex; gap: 2px; background: #07074e0a; border: 1px solid var(--border-strong); border-radius: var(--r-full); padding: 3px; }
.lang-switch button { padding: 6px 10px; border-radius: var(--r-full); font-size: .76rem; font-weight: 700; color: var(--text-3); cursor: pointer; background: none; border: none; min-height: 40px; min-width: 40px; }
.lang-switch button.on { background: var(--grad); color: #fff; }
.lang-switch--mobile { display: none; }

/* Pulsante tondo con icona (area cliente). .cart-btn resta come alias per
   le pagine non ancora aggiornate: stesso aspetto, nessun carrello. */
.icon-btn, .cart-btn {
  position: relative; display: grid; place-items: center;
  width: 44px; height: 44px; border-radius: var(--r-full);
  background: #07074e0a; border: 1px solid var(--border-strong);
  color: var(--text-2); transition: border-color .2s, color .2s;
}
.icon-btn:hover, .cart-btn:hover { border-color: var(--violet-400); color: var(--navy); }

.nav-toggle { display: none; flex-direction: column; gap: 5px; width: 44px; height: 44px; border-radius: var(--r-full); border: 1px solid var(--border-strong); align-items: center; justify-content: center; background: #07074e0a; }
.nav-toggle span { width: 18px; height: 2px; background: var(--text); border-radius: 2px; transition: .3s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 1280px) {
  .nav-links {
    position: fixed;
    inset: var(--nav-h) 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    background: #fffffff7;
    backdrop-filter: blur(20px);
    padding: 12px var(--gutter) 24px;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 18px 40px -24px #07074e66;
    transform: translateY(-120%);
    transition: transform .35s ease;
    /* se le voci non ci stanno, il pannello scorre da solo invece di
       finire sotto il bordo dello schermo */
    max-height: calc(100dvh - var(--nav-h));
    overflow-y: auto;
    overscroll-behavior: contain;
  }
  .nav-links.open { transform: translateY(0); }
  .nav-links a { padding: 13px 14px; font-size: 1.02rem; min-height: 46px; display: flex; align-items: center; }
  .lang-switch--desktop { display: none !important; }
  .lang-switch--mobile { display: flex; margin: 6px 0 10px; align-self: flex-start; }
  .mobile-cta { display: flex !important; font-weight: 600; color: var(--navy) !important; }
  .nav-toggle { display: flex; }
  .desktop-only { display: none !important; }
  /* con il menu aperto la pagina sotto non deve scorrere */
  body.menu-aperto { overflow: hidden; }
}

/* -------------------------------------------------------------------------
   8. HERO
   ------------------------------------------------------------------------- */
.hero { position: relative; padding-block: clamp(48px, 10vw, 120px) clamp(48px, 9vw, 100px); }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.hero h1 { margin: 18px 0; }
.hero .lead { max-width: 46ch; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }
.hero-stats { display: flex; gap: clamp(18px, 4vw, 44px); margin-top: 36px; flex-wrap: wrap; }
.hero-stat .n { font-family: var(--font-display); font-size: 1.9rem; font-weight: 700; }
.hero-stat .l { font-size: .86rem; color: var(--text-2); }

/* Visual 3D printer mockup */
.hero-visual { position: relative; aspect-ratio: 1/1; }
.printer-scene {
  position: absolute; inset: 0;
  border-radius: var(--r-xl);
  background: linear-gradient(160deg, #dcefff, #f6fbff);
  border: 1px solid var(--border);
  overflow: hidden;
  box-shadow: var(--shadow), var(--shadow-glow);
}
.printer-scene .floating {
  position: absolute;
  border-radius: var(--r-md);
  background: var(--surface-solid);
  border: 1px solid var(--border-strong);
  padding: 14px 16px;
  backdrop-filter: blur(10px);
  animation: float 6s ease-in-out infinite;
  box-shadow: var(--shadow);
  max-width: 78%;
}
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }

@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } .hero-visual { max-width: 460px; margin-inline: auto; } }

/* -------------------------------------------------------------------------
   9. SECTION HEADINGS
   ------------------------------------------------------------------------- */
.section-head { max-width: 62ch; margin-bottom: clamp(30px, 5vw, 56px); }
.section-head.center { margin-inline: auto; }
.section-head h2 { margin: 16px 0; }

/* -------------------------------------------------------------------------
   10. FEATURE / BUSINESS UNIT CARDS
   ------------------------------------------------------------------------- */
.bu-card { display: flex; flex-direction: column; height: 100%; }
.bu-card h3 { margin-bottom: 8px; }
.bu-card .arrow { margin-top: auto; padding-top: 18px; color: var(--violet-400); font-weight: 600; font-size: .92rem; display: inline-flex; align-items: center; gap: 6px; transition: gap .2s; }
.bu-card:hover .arrow { gap: 12px; }

/* -------------------------------------------------------------------------
   11. PRODUCT GRID
   ------------------------------------------------------------------------- */
.product-grid {
  display: grid;
  /* Reflow before cards compress: ~260px min practical card width */
  grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr));
  gap: 20px;
}
.product-card { display: flex; flex-direction: column; overflow: hidden; padding: 0; min-width: 0; }
.product-card__media {
  aspect-ratio: 1 / 1;
  position: relative;
  overflow: hidden;
  display: grid;
  place-items: center;
  background:
    linear-gradient(160deg, #e8f4fc 0%, #f3f8fc 55%, #eef2f7 100%);
}
.product-card__img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
  padding: 6%;
  box-sizing: border-box;
}
.product-card__media--empty {
  background:
    linear-gradient(145deg, #0d17410c, #3372a914 48%, #6acff612),
    linear-gradient(160deg, #e8f4fc, #edf2f8);
}
/* Badge disponibilità su foto prodotto: navy pieno + testo chiaro.
   Evita .tag blu su #0009 semitrasparente (poco contrasto sulle immagini). */
.product-avail-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  max-width: calc(100% - 20px);
  box-sizing: border-box;
  display: inline-block;
  padding: 6px 11px;
  border-radius: var(--r-full);
  font-size: .72rem;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: .01em;
  white-space: normal;
  text-align: left;
  background: var(--navy);
  color: #fff;
  border: 1px solid #ffffff2e;
  box-shadow: 0 4px 14px -4px #07074e66;
}
body.ad-on .product-avail-badge {
  background: var(--navy);
  color: #fff;
  border: 1px solid #ffffff2e;
  letter-spacing: .01em;
  border-radius: var(--ad-radius, var(--r-full));
}
/* Vince su body.ad-on .tag { background:transparent } (stessa specificità, file dopo). */
body.ad-on span.tag.product-avail-badge {
  background: var(--navy);
  color: #fff;
  border: 1px solid #ffffff2e;
  letter-spacing: .01em;
}
@media (max-width: 430px) {
  .product-avail-badge {
    top: 8px;
    left: 8px;
    max-width: calc(100% - 16px);
    padding: 5px 10px;
    font-size: .68rem;
  }
}
.product-card__noimg {
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: .72rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text-3, #5a6a7a);
  text-align: center;
  padding: 12px;
  max-width: 16ch;
  line-height: 1.35;
}
.product-media { aspect-ratio: 4/3; position: relative; display: grid; place-items: center; background: linear-gradient(160deg, #e3f4fe, #edf3f9); font-size: 3.4rem; }
.product-media .swatch { position: absolute; inset: 0; opacity: .18; }
.product-body { padding: 18px 20px 22px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.product-body .brand-line { font-family: var(--font-mono); font-size: .78rem; color: #0a6f66; letter-spacing: .05em; text-transform: uppercase; }
.product-body h4 { font-family: var(--font-display); font-size: 1.05rem; }
.product-body .desc { font-size: .88rem; color: var(--text-2); }
.product-foot { margin-top: auto; padding-top: 14px; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.price { font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; }
.price small { font-size: .78rem; color: var(--text-3); font-weight: 400; }
.color-dots { display: flex; gap: 5px; margin-top: 4px; flex-wrap: wrap; }
.color-dots span { width: 14px; height: 14px; border-radius: 50%; border: 1px solid #07074e33; }

/* Filtri shop */
.shop-toolbar { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 28px; }
.filter-chip { padding: 10px 16px; min-height: 40px; border-radius: var(--r-full); background: #07074e0a; border: 1px solid var(--border-strong); font-size: .88rem; color: var(--text-2); transition: .2s; }
.filter-chip:hover { color: var(--text); border-color: var(--violet-400); }
.filter-chip.active { background: var(--grad); color: #fff; border-color: transparent; }

/* -------------------------------------------------------------------------
   12. STATS / TRUST BAND
   ------------------------------------------------------------------------- */
.band { background: linear-gradient(180deg, #f3f9fe, #e8f3fd); border-block: 1px solid var(--border); }
.logo-row { display: flex; flex-wrap: wrap; gap: clamp(20px, 5vw, 56px); align-items: center; justify-content: center; }
.logo-row .logo { font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; color: var(--text-3); letter-spacing: -.01em; }

.stat-tile { text-align: center; }
.stat-tile .n { font-family: var(--font-display); font-size: clamp(1.9rem, 4vw, 3rem); font-weight: 700; }
.stat-tile .l { color: var(--text-3); font-size: .92rem; }

/* -------------------------------------------------------------------------
   13. STEPS / PROCESS
   ------------------------------------------------------------------------- */
.steps { counter-reset: step; display: grid; gap: 20px; }
.step { display: flex; gap: 16px; align-items: flex-start; }
.step-num { counter-increment: step; flex: 0 0 auto; width: 44px; height: 44px; border-radius: var(--r-full); display: grid; place-items: center; background: var(--grad-soft); border: 1px solid var(--border-strong); font-family: var(--font-display); font-weight: 700; }
.step-num::before { content: counter(step); }

/* -------------------------------------------------------------------------
   14. PRICING / PLANS
   ------------------------------------------------------------------------- */
.plan { display: flex; flex-direction: column; height: 100%; }
.plan.featured { border-color: var(--violet-500); box-shadow: var(--shadow-glow); }
.plan .price-big { font-family: var(--font-display); font-size: clamp(2rem, 5vw, 2.6rem); font-weight: 700; margin: 8px 0; }
.plan ul { display: grid; gap: 12px; margin: 22px 0; }
.plan li { display: flex; gap: 10px; align-items: flex-start; font-size: .94rem; color: var(--text-2); }
.plan li::before { content: "✓"; color: var(--success); font-weight: 700; }

/* -------------------------------------------------------------------------
   15. CTA BANNER
   ------------------------------------------------------------------------- */
.cta-banner { position: relative; border-radius: var(--r-xl); padding: clamp(32px, 6vw, 72px); overflow: hidden; background: linear-gradient(130deg, #e9f6ff, #dff2fb); border: 1px solid var(--border-strong); text-align: center; }
.cta-banner::before { content: ""; position: absolute; inset: 0; background: radial-gradient(60% 100% at 50% 0%, #3372a933, transparent 70%); }
.cta-banner > * { position: relative; }

/* -------------------------------------------------------------------------
   16. FAQ
   ------------------------------------------------------------------------- */
.faq-item { border: 1px solid var(--border); border-radius: var(--r-md); overflow: hidden; background: var(--surface); }
.faq-q { width: 100%; text-align: left; padding: 18px 20px; min-height: 56px; display: flex; justify-content: space-between; align-items: center; gap: 16px; font-weight: 600; font-family: var(--font-display); font-size: 1rem; color: var(--text); }
.faq-q .chev { transition: transform .3s; color: var(--violet-400); flex: 0 0 auto; }
.faq-item.open .chev { transform: rotate(180deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .35s ease; }
.faq-a p { padding: 0 20px 20px; }

/* -------------------------------------------------------------------------
   17. FORM
   ------------------------------------------------------------------------- */
.form { display: grid; gap: 16px; }
.field { display: grid; gap: 7px; }
.field label { font-size: .88rem; color: var(--text); font-weight: 500; }
.input, .textarea, select.input {
  width: 100%;
  padding: 13px 16px;
  min-height: 46px;
  border-radius: var(--r-sm);
  background: #fff;
  border: 1px solid var(--border-strong);
  color: var(--text);
  font-family: inherit;
  font-size: 1rem;          /* 16px: sotto questa misura iOS zooma da solo */
  transition: border-color .2s, background .2s;
}
.input:focus, .textarea:focus, select.input:focus { outline: none; border-color: var(--violet-400); background: #fff; box-shadow: 0 0 0 3px #3372a92e; }
.textarea { resize: vertical; min-height: 130px; }
.input::placeholder, .textarea::placeholder { color: #4a5a78; }
.field .hint { font-size: .82rem; color: var(--text-3); }
.field .errore { font-size: .84rem; color: var(--danger); }

/* -------------------------------------------------------------------------
   18. FOOTER
   ------------------------------------------------------------------------- */
.site-footer { border-top: 1px solid var(--border); background: #eef6fd; padding-block: 56px 28px; margin-top: 40px; }
/* La prima colonna tiene indirizzo, email, telefono e SEI icone social: con
   1.6fr non ci stavano, e la sesta (MakerWorld) andava a capo da sola sotto
   le altre cinque. Un po' piu' di larghezza e un po' meno spazio fra le
   colonne la rimettono in fila. */
.footer-grid { display: grid; grid-template-columns: 2fr repeat(4, 1fr); gap: 28px; }
.footer-col h5 { font-family: var(--font-display); font-size: .84rem; text-transform: uppercase; letter-spacing: .08em; color: var(--text-2); margin-bottom: 14px; }
.footer-col a { display: block; padding: 8px 0; color: var(--text-2); font-size: .94rem; transition: color .2s; }
.footer-col a:hover { color: var(--violet-400); text-decoration: underline; }
.footer-about p { max-width: 36ch; font-size: .94rem; margin: 14px 0 14px; }
.footer-nap { font-size: .92rem; color: var(--text-2); margin-bottom: 18px !important; line-height: 1.8; }
/* I link del footer sono a blocco (uno per riga, come si vuole nelle colonne
   di navigazione). Qui pero' email e telefono stanno sulla stessa riga con un
   puntino in mezzo: a blocco, quel puntino restava da solo su una riga tutta
   sua. In questo paragrafo, e solo qui, i link tornano in linea. */
.footer-nap a { display: inline; color: var(--text-2); text-decoration: underline; }
.footer-nap a:hover { color: var(--navy); }
.footer-news-note { font-size: .9rem; margin-bottom: 12px; }
.social-row { display: flex; gap: 8px; flex-wrap: wrap; }
.social-row a { width: 42px; height: 42px; display: grid; place-items: center; border-radius: var(--r-full); background: #07074e0a; border: 1px solid var(--border-strong); color: var(--text-2); transition: .2s; }
.social-row a:hover { border-color: var(--violet-400); color: var(--navy); transform: translateY(-2px); }
.footer-bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 40px; padding-top: 22px; border-top: 1px solid var(--border); color: var(--text-2); font-size: .88rem; }
.footer-bottom a { text-decoration: underline; }
.footer-bottom a:hover { color: var(--navy); }
/* La soglia era 860: fra 860 e 1100 le cinque colonne restavano, ma cosi'
   strette che la casella della newsletter tornava illeggibile e le icone
   social si spezzavano. Sotto i 1100 si passa a due colonne, dove ci sta
   tutto. */
@media (max-width: 1100px) { .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; } .footer-about { grid-column: 1 / -1; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } .footer-bottom { flex-direction: column; gap: 10px; } }

/* -------------------------------------------------------------------------
   19. NEWSLETTER INLINE
   ------------------------------------------------------------------------- */
.news-form { display: flex; gap: 10px; max-width: 440px; }
.news-form .input { flex: 1; min-width: 0; }
.cta-banner .news-form { flex-wrap: wrap; max-width: min(520px, 100%); justify-content: center; align-items: center; }
.cta-banner .news-form .news-consenso { flex: 1 1 100%; text-align: left; max-width: 420px; margin-inline: auto; }
.cta-banner .news-form .btn { flex: 0 0 auto; }
/* Nel pie' di pagina la colonna e' stretta: casella e pulsante affiancati
   lasciavano alla casella 71 pixel, tanto che il suggerimento "La tua email"
   si leggeva "La tu" e chi scriveva vedeva cinque caratteri per volta. Uno
   sotto l'altro, come gia' succede sul telefono, e la casella torna leggibile.
   Nelle pagine dove il modulo sta in mezzo alla pagina (Academy, Community)
   lo spazio c'e' e resta affiancato. */
.footer-col .news-form { flex-direction: column; gap: 8px; }
.footer-col .news-form .btn { width: 100%; }
.news-consenso { display: flex; align-items: flex-start; gap: 8px; font-size: .82rem; color: var(--text-2); line-height: 1.45; }
.news-consenso input { width: 18px; height: 18px; margin-top: 2px; flex: 0 0 auto; }
.news-esito { font-size: .88rem; margin-top: 10px; color: #0b6b34; font-weight: 600; }
.news-esito.ko { color: #a3282e; }
.lb-toast-wrap { position: fixed; right: 16px; bottom: 16px; z-index: 120; display: flex; flex-direction: column; gap: 10px; max-width: min(360px, calc(100vw - 32px)); pointer-events: none; }
.lb-toast { padding: 13px 16px; border-radius: var(--r-md); font-size: .9rem; line-height: 1.45; font-weight: 600; box-shadow: 0 16px 40px -12px #07074e55; border: 1px solid var(--border-strong); background: #fff; color: var(--navy); opacity: 0; transform: translateY(10px); transition: opacity .25s ease, transform .25s ease; }
.lb-toast-in { opacity: 1; transform: none; }
.lb-toast-ok { border-left: 4px solid #0b7d73; }
.lb-toast-err { border-left: 4px solid #a3282e; }
.lb-toast-info { border-left: 4px solid var(--blue); }
@media (max-width: 520px) { .news-form { flex-direction: column; } .lb-toast-wrap { left: 16px; right: 16px; max-width: none; } }

/* -------------------------------------------------------------------------
   COOKIE BANNER — Accetta e Rifiuta alla pari; scelta in lb_cookie_consent
   ------------------------------------------------------------------------- */
#lb-cookie-banner {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 200;
  padding: 14px var(--gutter) calc(14px + env(safe-area-inset-bottom, 0px));
  background: #0d1741f2;
  color: #f4f7fb;
  border-top: 1px solid #ffffff22;
  box-shadow: 0 -12px 40px -16px #07074e88;
}
.lb-cookie-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px 20px;
}
.lb-cookie-title { font-weight: 700; font-size: 1rem; margin: 0 0 4px; color: #fff; }
.lb-cookie-text { margin: 0; font-size: .88rem; line-height: 1.5; color: #d5dde8; max-width: 62ch; }
.lb-cookie-text a { color: #9fd6f5; text-decoration: underline; }
.lb-cookie-actions { display: flex; flex-wrap: wrap; gap: 10px; flex: 0 0 auto; }
.lb-cookie-btn {
  min-height: 44px;
  min-width: 120px;
  padding: 10px 18px;
  border-radius: var(--r-full);
  font-weight: 700;
  font-size: .92rem;
  cursor: pointer;
  border: 1px solid transparent;
}
.lb-cookie-accept {
  background: #fff;
  color: var(--navy);
}
.lb-cookie-accept:hover { background: var(--pale); }
.lb-cookie-reject {
  background: transparent;
  color: #fff;
  border-color: #ffffff55;
}
.lb-cookie-reject:hover { border-color: #fff; background: #ffffff14; }
@media (max-width: 640px) {
  #lb-cookie-banner {
    padding: 8px 12px calc(8px + env(safe-area-inset-bottom, 0px));
  }
  .lb-cookie-inner {
    gap: 6px 10px;
    align-items: stretch;
  }
  .lb-cookie-title {
    font-size: .88rem;
    margin: 0;
  }
  .lb-cookie-text {
    font-size: .78rem;
    line-height: 1.35;
  }
  .lb-cookie-actions {
    width: 100%;
    gap: 8px;
    margin-top: 2px;
  }
  .lb-cookie-btn {
    flex: 1 1 calc(50% - 4px);
    min-width: 0;
    min-height: 44px;
    padding: 8px 10px;
    font-size: .86rem;
  }
}

/* -------------------------------------------------------------------------
   20. PAGE HERO (interne)
   ------------------------------------------------------------------------- */
.page-hero { padding-block: clamp(40px, 8vw, 90px) clamp(28px, 5vw, 56px); text-align: center; }
.page-hero .lead { max-width: 60ch; margin: 18px auto 0; }
.breadcrumb { font-family: var(--font-mono); font-size: .82rem; color: var(--text-3); margin-bottom: 18px; }
.breadcrumb a { text-decoration: underline; }
.breadcrumb a:hover { color: var(--violet-400); }

/* -------------------------------------------------------------------------
   21. AVVISI
   ------------------------------------------------------------------------- */
.avviso {
  border: 1px solid var(--border-strong);
  border-left: 4px solid var(--blue);
  background: #f2f9fe;
  border-radius: var(--r-sm);
  padding: 14px 18px;
  font-size: .94rem;
  color: var(--text-2);
}
.avviso strong { color: var(--navy); }

/* -------------------------------------------------------------------------
   22. UTILITY & ANIMAZIONI SCROLL
   ------------------------------------------------------------------------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }
/* Senza JavaScript (o con JS bloccato) il contenuto non deve restare invisibile. */
@media (scripting: none) {
  .reveal { opacity: 1; transform: none; }
}
.mt-0 { margin-top: 0; } .mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; } .mt-4 { margin-top: 40px; }
.muted { color: var(--text-2); } /* contrast: text-3 era insufficiente su bande pale */
.divider { height: 1px; background: var(--border); border: 0; margin-block: clamp(40px, 8vw, 90px); }
.badge-live { display: inline-flex; align-items: center; gap: 7px; font-size: .86rem; color: var(--success); }
.badge-live .pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 0 #0b7d7366; animation: pulse 2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 #0b7d7366; } 70% { box-shadow: 0 0 0 10px #0b7d7300; } 100% { box-shadow: 0 0 0 0 #0b7d7300; } }

/* -------------------------------------------------------------------------
   24. SCHEDA PRODOTTO (prodotto.html)
   ------------------------------------------------------------------------- */
.product-detail { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 5vw, 48px); align-items: start; text-align: left; }
.product-gallery { background: #eef6fd; border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; }
.product-gallery-main { aspect-ratio: 1/1; display: grid; place-items: center; background: #eef6fd; }
.product-gallery-main img { width: 100%; height: 100%; object-fit: cover; display: block; }
.product-gallery-thumbs { display: flex; gap: 8px; padding: 10px; overflow-x: auto; border-top: 1px solid var(--border); }
.product-gallery-thumbs button { flex: 0 0 64px; width: 64px; height: 64px; border-radius: var(--r-sm); overflow: hidden; border: 2px solid transparent; padding: 0; cursor: pointer; background: #fff; }
.product-gallery-thumbs button.on { border-color: var(--blue); }
.product-gallery-thumbs img { width: 100%; height: 100%; object-fit: cover; display: block; }
.product-buybox h1 { font-size: clamp(1.5rem, 3vw, 2rem); margin: 8px 0 12px; }
.product-price { font-family: var(--font-display); font-weight: 700; font-size: 1.65rem; margin: 12px 0 18px; }
.variant-picker { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0; }
.variant-picker button { padding: 10px 14px; border-radius: var(--r-full); border: 1px solid var(--border-strong); background: #fff; font-size: .88rem; cursor: pointer; min-height: 42px; }
.variant-picker button.on { background: var(--grad); color: #fff; border-color: transparent; }
.custom-field { margin: 16px 0; }
.custom-field label { display: block; font-size: .88rem; font-weight: 600; margin-bottom: 6px; color: var(--navy); }
.custom-field input, .custom-field textarea { width: 100%; padding: 12px 14px; border-radius: var(--r-sm); border: 1px solid var(--border-strong); font-family: inherit; font-size: .95rem; }
.custom-field .hint { font-size: .82rem; color: var(--text-3); margin-top: 6px; }
.product-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.product-status { display: inline-flex; align-items: center; gap: 6px; font-size: .86rem; margin-top: 10px; }
@media (max-width: 900px) { .product-detail { grid-template-columns: 1fr; } }

/* -------------------------------------------------------------------------
   23. TELEFONO — nessun testo sotto i 13px, niente elementi che sfondano
   ------------------------------------------------------------------------- */
@media (max-width: 520px) {
  .eyebrow, .tag, .breadcrumb, .hero-stat .l, .stat-tile .l,
  .product-body .desc, .product-body .brand-line, .price small,
  .footer-bottom, .footer-col h5, .field .hint, .muted { font-size: .84rem; }
  .footer-col a, .plan li, .footer-about p, .footer-nap { font-size: .95rem; }
  .hero-stats { gap: 20px 28px; }
  .hero-stat { min-width: 120px; }
  .card { padding: 20px; }
  /* niente elemento piu' largo del suo contenitore */
  pre, code, .mono { overflow-wrap: anywhere; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}

/* =========================================================================
   30. FINAL POLISH — tipografia, hero, path, process, nav densità, mobile
   Nessun nuovo colore di brand: solo layout, ritmo e gerarchia.
   ========================================================================= */

/* Tipografia più presente */
h1 { font-weight: 800; letter-spacing: -0.035em; }
h2 { font-weight: 700; letter-spacing: -0.03em; }
.lead { font-size: clamp(1.05rem, 1.5vw, 1.2rem); line-height: 1.55; color: var(--text-2); }

/* Header: più presenza, CTA chiara */
.site-header {
  background: #fffffff5;
  border-bottom-color: var(--border);
  backdrop-filter: blur(12px);
}
.brand-mark { height: 36px; }
.brand-mark svg, .brand-mark img { height: 36px; }
.nav-links a {
  font-size: .86rem;
  font-weight: 500;
  padding: 8px 9px;
}
.nav-links a.active {
  color: var(--navy);
  background: #3372a918;
  font-weight: 600;
}
.nav-cta .btn-primary.btn-sm {
  padding: 10px 16px;
  font-weight: 600;
}

/* Hamburger: regole base sopra (max-width: 1280px). Qui solo ritocchi polish. */
@media (min-width: 1281px) {
  .nav-links a.active {
    color: var(--navy);
    background: #3372a918;
    font-weight: 600;
  }
}

/* Hero homepage: più peso, meno clutter */
.hero--home {
  padding-block: clamp(36px, 7vw, 88px) clamp(40px, 8vw, 96px);
}
.hero--home .hero-grid {
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1.1fr);
  gap: clamp(24px, 4vw, 56px);
  align-items: center;
}
.hero--home h1 {
  font-size: clamp(2.45rem, 7vw, 4.75rem);
  margin: 14px 0 18px;
  max-width: 11ch;
  line-height: 1.02;
}
.hero--home .lead {
  max-width: 42ch;
  font-size: clamp(1.08rem, 1.7vw, 1.25rem);
}
.hero--home .hero-actions { margin-top: 32px; gap: 14px; }
.hero--home .hero-visual {
  aspect-ratio: 4 / 3;
  max-height: none;
}
.hero--home .printer-scene {
  border-radius: clamp(18px, 2.5vw, 28px);
  box-shadow: 0 28px 60px -28px #07074e55;
}
.hero--home .floating { display: none; }
.hero--home .floating--hub {
  display: block;
  top: 14px;
  left: 14px;
  right: auto;
  bottom: auto;
  background: #fffffff2;
  border: 1px solid var(--border-strong);
  border-radius: var(--r-md);
  padding: 10px 14px;
  box-shadow: 0 8px 24px -12px #07074e44;
}
@media (max-width: 900px) {
  .hero--home .hero-grid { grid-template-columns: 1fr; }
  .hero--home h1 { max-width: none; }
  .hero--home .hero-visual {
    order: -1;
    aspect-ratio: 16 / 10;
    max-width: none;
    width: 100%;
  }
  .hero--home { padding-top: 20px; }
}

/* Page heroes: più presenza */
.page-hero {
  padding-block: clamp(48px, 9vw, 100px) clamp(32px, 5vw, 64px);
}
.page-hero h1 {
  font-size: clamp(2.1rem, 5.5vw, 3.6rem);
  font-weight: 800;
  max-width: 18ch;
  margin-inline: auto;
}
.page-hero .lead {
  font-size: clamp(1.05rem, 1.6vw, 1.22rem);
  max-width: 48ch;
}

/* Ritmo sezioni più variabile */
.section { padding-block: clamp(64px, 11vw, 140px); }
.section-sm { padding-block: clamp(36px, 5vw, 72px); }
.section-head { margin-bottom: clamp(28px, 4vw, 48px); }
.section-head--wide { max-width: 70ch; }
.section-head h2 { margin: 12px 0 10px; }

/* Path / offerte: righe editoriali al posto della griglia card */
.path-list {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--border-strong);
}
.path-item {
  display: grid;
  grid-template-columns: 7.5rem 1fr auto;
  gap: clamp(16px, 3vw, 28px);
  align-items: start;
  padding: clamp(22px, 3vw, 32px) 0;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  color: inherit;
  transition: background .2s ease;
}
.path-item:hover { background: #3372a908; }
.path-item:focus-visible { outline-offset: -2px; }
.path-item .tag { margin-top: 2px; }
.path-item h3 {
  font-size: clamp(1.15rem, 2vw, 1.45rem);
  margin: 0 0 6px;
}
.path-item p {
  margin: 0;
  color: var(--text-2);
  font-size: .98rem;
  max-width: 62ch;
}
.path-item .arrow {
  color: var(--blue);
  font-weight: 600;
  font-size: .92rem;
  white-space: nowrap;
  align-self: center;
  transition: transform .2s;
}
.path-item:hover .arrow { transform: translateX(4px); }
.path-note {
  margin-top: clamp(28px, 4vw, 40px);
  padding: clamp(18px, 3vw, 24px);
  border-radius: var(--r-md);
  border: 1px dashed var(--border-strong);
  background: #fff;
}
.path-note h3 { font-size: 1.05rem; margin-bottom: 8px; }
.path-note p { color: var(--text-2); font-size: .95rem; margin: 0 0 12px; max-width: 70ch; }
.path-note .path-note-links { display: flex; flex-wrap: wrap; gap: 10px 18px; }
.path-note a { font-weight: 600; color: var(--blue); }
@media (max-width: 720px) {
  .path-item {
    grid-template-columns: 1fr;
    gap: 10px;
    padding-block: 20px;
  }
  .path-item .arrow { align-self: start; }
}

/* Process strip (service steps) — no cards */
.process-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  counter-reset: lbstep;
  border-top: 1px solid var(--border-strong);
}
.process-step {
  padding: clamp(20px, 3vw, 28px) clamp(12px, 2vw, 22px);
  border-right: 1px solid var(--border);
  position: relative;
}
.process-step:last-child { border-right: 0; }
.process-step::before {
  counter-increment: lbstep;
  content: counter(lbstep);
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--navy);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .95rem;
  margin-bottom: 14px;
}
.process-step h3 {
  font-size: 1.05rem;
  margin-bottom: 8px;
  line-height: 1.25;
}
.process-step p {
  margin: 0;
  font-size: .92rem;
  color: var(--text-2);
  line-height: 1.5;
}
@media (max-width: 900px) {
  .process-strip { grid-template-columns: 1fr 1fr; }
  .process-step:nth-child(2n) { border-right: 0; }
  .process-step { border-bottom: 1px solid var(--border); }
}
@media (max-width: 560px) {
  .process-strip { grid-template-columns: 1fr; }
  .process-step { border-right: 0; padding-inline: 0; }
}

/* Spec inline (LovaPrint) al posto di mini-card */
.spec-inline {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 28px;
  margin: 28px 0 8px;
  padding: 0;
  list-style: none;
}
.spec-inline li {
  padding-top: 12px;
  border-top: 1px solid var(--border-strong);
}
.spec-inline strong {
  display: block;
  font-size: .98rem;
  color: var(--navy);
  margin-bottom: 2px;
}
.spec-inline span {
  font-size: .88rem;
  color: var(--text-2);
}
@media (max-width: 520px) {
  .spec-inline { grid-template-columns: 1fr; }
}

/* Editorial photo panel */
.photo-panel {
  border-radius: clamp(16px, 2vw, 24px);
  overflow: hidden;
  border: 1px solid var(--border);
  background: #eef6fd;
  aspect-ratio: 4 / 3;
}
.photo-panel .media-slot,
.photo-panel .media-slot__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.photo-panel .media-slot { padding-top: 0 !important; aspect-ratio: auto; min-height: 100%; }

/* Topic rows (community) */
.topic-list { display: grid; gap: 0; border-top: 1px solid var(--border-strong); }
.topic-row {
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
}
.topic-row .tag { margin-bottom: 8px; }
.topic-row h3 { font-size: 1.15rem; margin: 0 0 6px; }
.topic-row p { margin: 0; font-size: .9rem; color: var(--text-2); }

/* Trust strip più leggibile */
.logo-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px 28px;
}
.logo-row .logo {
  font-size: clamp(.95rem, 1.4vw, 1.1rem);
  color: var(--text-2);
  font-weight: 600;
}

/* CTA banner più sobrio */
.cta-banner {
  background: linear-gradient(160deg, #f2f9fe, #e5f3fc);
  padding: clamp(40px, 7vw, 80px) clamp(24px, 5vw, 56px);
}
.cta-banner h2 { font-size: clamp(1.8rem, 4vw, 2.8rem); }

/* Gallery: meno “widget”, più editoriale */
.home-gallery-nav { gap: 8px; margin-bottom: 16px; }
.home-gallery-dot {
  width: 36px;
  height: 36px;
  font-size: .82rem;
}
/* Non usare % sul flex-basis: con larghezza indefinita del parent
   min(78%, …) ricrea overflow documento. Preferire vw / px. */
.home-gallery-item { flex: 0 0 min(72vw, 640px); }
.home-gallery-section .section-head { max-width: 54ch; }

/* Cards: meno lift, più calma (dove restano) */
.card { box-shadow: none; }
@media (hover: hover) {
  .card:hover { transform: translateY(-2px); }
}
.card-glow::before { opacity: 0 !important; }

/* Confronta stampanti — più aria */
.printer-card, .cmp-card, #printerGrid .card {
  padding: clamp(18px, 2.5vw, 26px);
}
#printerGrid {
  gap: clamp(16px, 2.5vw, 24px) !important;
}

/* Footer più leggibile */
.site-footer { padding-block: clamp(48px, 8vw, 80px) 28px; }
.footer-col a {
  padding: 4px 0;
  display: inline-block;
}
.footer-about p { max-width: 36ch; line-height: 1.55; }

/* Form focus più chiaro */
.input, input.input, textarea.input, select.input,
input[type="text"], input[type="email"], input[type="tel"],
textarea, select {
  transition: border-color .2s, box-shadow .2s;
}
.input:focus, input:focus, textarea:focus, select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px #3372a933;
  outline: none;
}

/* Mobile: bottoni full-width in hero */
@media (max-width: 520px) {
  .hero--home .hero-actions,
  .page-hero .hero-actions,
  .cta-banner .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .hero--home .hero-actions .btn,
  .page-hero .hero-actions .btn,
  .cta-banner .hero-actions .btn {
    width: 100%;
    justify-content: center;
  }
  .path-note .path-note-links { flex-direction: column; }
}
