/* ============================================================
   DAM Vending — Distribuzione Automatica Mediterranea
   Foglio di stile principale — design "liquid glass"
   Palette brand: oro #F6D586 · marrone #6D5429 (manuale identità 2026)
   Tipografia: Poppins (titoli) + Source Sans 3 (testo), auto-ospitati
   ============================================================ */

/* Font auto-ospitati: nessuna richiesta a server esterni. */
@font-face {
  font-family: "Poppins";
  src: url("../fonts/poppins-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Poppins";
  src: url("../fonts/poppins-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Source Sans 3";
  src: url("../fonts/sourcesans.woff2") format("woff2");
  font-weight: 300 600;
  font-style: normal;
  font-display: swap;
}

:root {
  --gold: #f6d586;
  --gold-deep: #c19a3f;
  --brown: #6d5429;
  --brown-dark: #46351a;
  --ink: #1c1c1c;
  --muted: #6f6a60;
  --line: #e7e3da;
  --white: #ffffff;
  --green: #4e7a3a;
  --radius: 18px;
  --radius-sm: 12px;
  --font: "Source Sans 3", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-display: "Poppins", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --container: 1180px;
  /* Liquid glass */
  --glass-bg: rgba(255, 255, 255, .52);
  --glass-bg-strong: rgba(255, 255, 255, .68);
  --glass-border: rgba(255, 255, 255, .75);
  --glass-edge: rgba(109, 84, 41, .10);
  --glass-shadow: 0 12px 36px rgba(70, 53, 26, .10);
  --glass-blur: blur(22px) saturate(1.5);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.65;
  color: var(--ink);
  background:
    radial-gradient(1100px 750px at 88% -5%, rgba(246, 213, 134, .38), transparent 58%),
    radial-gradient(950px 700px at -8% 28%, rgba(214, 229, 197, .32), transparent 55%),
    radial-gradient(900px 700px at 108% 62%, rgba(246, 213, 134, .22), transparent 55%),
    radial-gradient(800px 600px at -5% 92%, rgba(242, 222, 180, .28), transparent 55%),
    var(--white);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--brown); text-decoration: none; }
ul { list-style: none; }
b, strong { font-weight: 500; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 500;
  color: var(--ink);
  line-height: 1.2;
  /* Poppins è geometrico e piuttosto spaziato: ai corpi grandi va stretto un po' */
  letter-spacing: -0.02em;
}
h1, h2 { font-weight: 500; }

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

/* ---------- Utility ---------- */
/* Etichetta sopra i titoli: chip con bordo verde, uguale in tutto il sito */
.eyebrow {
  display: inline-flex;
  align-items: center;
  padding: 6px 15px;
  border: 1px solid rgba(78, 122, 58, .34);
  border-radius: 999px;
  background: rgba(78, 122, 58, .09);
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: .01em;
  color: #3f6330;
  margin-bottom: 20px;
}

/* Sezioni bianche a tinta piatta: si distinguono grazie al separatore, non al colore */
.section {
  padding: 96px 0;
  background: #ffffff;
  border-top: 1px solid rgba(109, 84, 41, .16);
}
/* "cream" mantenuta come classe ma resa bianca, per non toccare l'HTML */
.section.cream { background: #ffffff; }
/* Sezione su fondo bianco pieno */
.section.white { background: #ffffff; }

/* Sezione su fondo grigio chiaro */
.section.grey { background: #f3f3f1; }

/* Sezione su fondo verde (Gustoverde) — tinta piatta */
.section.green { background: #e4f0d7; }

/* Sezione su fondo marrone scuro */
.section.dark {
  background:
    radial-gradient(900px 560px at 88% 0%, rgba(246, 213, 134, .10), transparent 60%),
    linear-gradient(160deg, #5a4524 0%, #40311a 55%, #2b2110 100%);
  border-top-color: rgba(0, 0, 0, .3);
}
/* su fondo scuro il verde scuro sparirebbe: chip in verde chiaro */
.section.dark .eyebrow,
.page-hero.dark .eyebrow {
  border-color: rgba(163, 204, 139, .40);
  background: rgba(163, 204, 139, .13);
  color: #b9d9a4;
}
.section.dark .section-head h2 { color: #ffffff; }
.section.dark .section-head p { color: rgba(251, 240, 214, .78); }
.section.dark .card {
  position: relative;
  overflow: hidden;
  background: #ffffff;
  border-color: rgba(255, 255, 255, .5);
  outline-color: rgba(255, 255, 255, .10);
  box-shadow: 0 14px 38px rgba(0, 0, 0, .26);
}
/* Barra oro in alto che si rivela al passaggio del mouse */
.section.dark .card::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  height: 3px; width: 0;
  background: var(--gold-deep);
  transition: width .38s cubic-bezier(.2, .7, .2, 1);
}
.section.dark .card:hover::before { width: 100%; }
.section.dark .card:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 54px rgba(0, 0, 0, .36);
}
.section.dark .card h3 { color: var(--ink); }
.section.dark .card p { color: var(--muted); }
.section.dark .card .icon {
  background: rgba(246, 213, 134, .40);
  border-color: rgba(255, 255, 255, .6);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .7);
  color: var(--brown);
  transition: background .28s ease, color .28s ease, border-color .28s ease;
}
/* Icona che si accende in oro pieno */
.section.dark .card:hover .icon {
  background: var(--gold-deep);
  border-color: var(--gold-deep);
  color: #ffffff;
}

.section-head { max-width: 680px; margin-bottom: 56px; }
/* intestazioni allineate a sinistra: occupano tutta la larghezza della sezione */
.section-head:not(.center) { max-width: none; }
.section-head h2 { font-size: clamp(27px, 3.4vw, 38px); margin-bottom: 16px; }
.section-head p { color: var(--muted); font-size: 17.5px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font);
  font-weight: 500;
  font-size: 15.5px;
  padding: 14px 28px;
  border-radius: 6px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background .2s ease, color .2s ease, border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
/* CTA unificate: nere su tutto il sito (prima alcune erano marroni) */
.btn-primary, .btn-gold, .btn-outline {
  background: #1c1c20;
  color: var(--white);
  border-color: transparent;
  box-shadow: 0 8px 22px rgba(0, 0, 0, .18), inset 0 1px 0 rgba(255, 255, 255, .10);
}
.btn-primary:hover, .btn-gold:hover, .btn-outline:hover {
  background: #000000;
  color: var(--white);
  transform: translateY(-1px);
}
/* Azione secondaria: solo contorno, per distinguerla dalla primaria piena */
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: rgba(109, 84, 41, .32);
  box-shadow: none;
}
.btn-ghost:hover {
  background: rgba(246, 213, 134, .18);
  border-color: var(--gold-deep);
  color: var(--brown);
  transform: translateY(-1px);
}

/* ---------- Glass panel base ---------- */
.card, .cert, .gustoverde, .contact-grid {
  background: var(--glass-bg);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  outline: 1px solid var(--glass-edge);
  outline-offset: -1px;
  box-shadow: var(--glass-shadow), inset 0 1px 0 rgba(255, 255, 255, .8);
}

/* ---------- Header flottante ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: transparent;
  /* padding laterale = padding del .container, così la card non tocca mai i bordi */
  padding: 22px 24px 14px;
}
/* Allo scroll l'header si compatta, restando bianco pieno e staccato dal bordo */
.site-header.scrolled { padding-top: 16px; padding-bottom: 12px; }
.site-header.scrolled .header-inner {
  height: 62px;
  background: #ffffff;
  box-shadow: 0 14px 40px rgba(70, 53, 26, .18);
}
.site-header.scrolled .brand img { width: 42px; height: 42px; }
.site-header.scrolled .main-nav a { padding-top: 13px; padding-bottom: 13px; }

/* i social vivono solo nel menu mobile: su desktop non compaiono */
.nav-social { display: none; }

/* CTA nell'header: più compatta dei pulsanti in pagina */
.header-cta {
  flex: none;
  margin-left: 16px;
  padding: 11px 20px;
  font-size: 14px;
  white-space: nowrap;
}
/* Header compresso: la CTA vira dal nero al marrone del brand.
   Solo da desktop, perche sotto gli 860px la CTA non e in pagina. */
@media (min-width: 861px) {
  .site-header.scrolled .header-cta {
    background: var(--brown);
    box-shadow: 0 8px 22px rgba(109, 84, 41, .28), inset 0 1px 0 rgba(255, 255, 255, .12);
  }
  .site-header.scrolled .header-cta:hover { background: var(--brown-dark); }
}

/* il modulo non deve finire sotto l'header quando ci si arriva dall'ancora */
#contact-form { scroll-margin-top: 120px; }

.header-inner {
  /* larghezza ridotta del padding del container: i bordi della card
     cadono esattamente sulle stesse linee verticali del contenuto */
  position: relative;
  max-width: calc(var(--container) - 48px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  height: 80px;
  padding: 0 18px 0 22px;
  border-radius: var(--radius-sm);
  background: #ffffff;
  border: 1px solid rgba(109, 84, 41, .10);
  box-shadow: var(--glass-shadow);
  transition: height .32s cubic-bezier(.2, .7, .2, 1), background .32s ease,
              border-color .32s ease, box-shadow .28s ease;
}

.brand { display: flex; align-items: center; perspective: 600px; }
.brand img {
  width: 56px;
  height: 56px;
  /* la rotazione a moneta resta, si aggiunge il rimpicciolimento allo scroll */
  transition: transform .7s ease, width .32s cubic-bezier(.2, .7, .2, 1), height .32s cubic-bezier(.2, .7, .2, 1);
  transform-style: preserve-3d;
}
.brand:hover img { transform: rotateY(360deg); }

.main-nav {
  display: flex;
  align-items: center;
  gap: 34px;
  margin-left: auto;
  margin-right: 10px;
}
/* Menu centrato. Da 1000px in su e centrato sulla mezzeria reale
   dell'header; sotto resta il centraggio elastico, che non rischia
   di far collidere le voci con la CTA. */
@media (min-width: 861px) {
  .main-nav { margin-left: auto; margin-right: auto; }
}
@media (min-width: 1000px) {
  .main-nav {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    margin: 0;
  }
}
.main-nav a {
  position: relative;
  display: inline-block;
  font-size: 15px;
  font-weight: 450;
  letter-spacing: .01em;
  color: var(--ink);
  padding: 22px 0;
  transition: color .22s ease, transform .22s ease, letter-spacing .22s ease,
              padding .32s cubic-bezier(.2, .7, .2, 1);
}
.main-nav a::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 16px;
  width: 0;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--gold), var(--gold-deep));
  transform: translateX(-50%);
  transition: width .28s ease;
}
/* effetto hover "roll": il testo scorre in alto e una copia entra dal basso */
.nav-roll {
  position: relative;
  display: block;
  overflow: hidden;
}
.nav-roll-t {
  display: block;
  transition: transform .4s cubic-bezier(.2, .7, .2, 1);
}
.nav-roll-t.dup {
  position: absolute;
  top: 100%;
  left: 0;
  white-space: nowrap;
}
.main-nav a:hover .nav-roll-t { transform: translateY(-100%); }
@media (prefers-reduced-motion: reduce) {
  .nav-roll-t { transition: none; }
  .main-nav a:hover .nav-roll-t { transform: none; }
}
.main-nav a:hover { color: var(--brown); }
.main-nav a:hover::after { width: 100%; }
.main-nav a.active { color: var(--brown); font-weight: 600; }
.main-nav a.active::after { width: 100%; }

/* Icone social nell'header */

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--ink);
  position: relative;
  transition: transform .22s ease, opacity .22s ease;
}
.nav-toggle span::before, .nav-toggle span::after { content: ""; position: absolute; }
.nav-toggle span::before { top: -7px; }
.nav-toggle span::after { top: 7px; }
body.nav-open .nav-toggle span { background: transparent; }
body.nav-open .nav-toggle span::before { transform: translateY(7px) rotate(45deg); }
body.nav-open .nav-toggle span::after { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  margin-top: -116px;  /* risale dietro l'header flottante (22 + 80 + 14) */
  /* spaziature legate all'altezza della finestra: su schermi bassi si comprimono */
  padding-top: clamp(120px, 14vh, 136px);
  padding-bottom: clamp(36px, 7vh, 76px);
  background:
    radial-gradient(950px 620px at 88% -12%, rgba(246, 213, 134, .10), transparent 62%),
    radial-gradient(720px 520px at -6% 112%, rgba(255, 255, 255, .04), transparent 58%),
    linear-gradient(155deg, #6a5230 0%, #4a3820 52%, #2b2110 100%);
}
.hero-inner {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  align-items: center;
  gap: 64px;
  padding: clamp(24px, 5vh, 64px) 0 clamp(28px, 7vh, 88px);
}
.hero h1 {
  /* min() fa scegliere il vincolo più stretto tra larghezza e altezza schermo */
  font-size: clamp(32px, min(4.6vw, 6.4vh), 54px);
  margin-bottom: clamp(16px, 2.6vh, 24px);
  color: var(--white);
}
.hero h1 em {
  font-style: normal;
  color: var(--gold);
}
.hero .eyebrow {
  border-color: rgba(163, 204, 139, .40);
  background: rgba(163, 204, 139, .13);
  color: #b9d9a4;
}
.hero p.lead {
  font-size: 18.5px;
  color: rgba(251, 240, 214, .82);
  max-width: 500px;
  margin-bottom: clamp(22px, 4.2vh, 36px);
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 0; }
.btn-white {
  background: #ffffff;
  color: var(--brown-dark);
  box-shadow: 0 8px 22px rgba(0, 0, 0, .16), inset 0 1px 0 rgba(255, 255, 255, .6);
}
.btn-white:hover { background: #f3ece0; transform: translateY(-1px); }
.hero .btn-outline {
  background: rgba(255, 255, 255, .12);
  color: var(--white);
  border-color: rgba(255, 255, 255, .35);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25);
}
.hero .btn-outline:hover { border-color: var(--gold); color: var(--gold); }

.hero-badges {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px 26px;
  padding: 16px 24px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .12);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  border: 1px solid rgba(255, 255, 255, .28);
  outline: 1px solid rgba(255, 255, 255, .10);
  outline-offset: -1px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, .14), inset 0 1px 0 rgba(255, 255, 255, .28);
}
.hero-badges .badge {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13.5px;
  font-weight: 500;
  color: #fdf6e3;
}
.hero-badges .badge svg { width: 20px; height: 20px; color: var(--gold); flex: none; }


/* Statistiche dentro la hero */
/* riga con i dati chiave, sotto i pulsanti dell'hero */
.hero-facts {
  display: flex;
  flex-wrap: wrap;
  /* distribuite su tutta la larghezza; il gap fa da distanza minima */
  justify-content: space-between;
  gap: 16px 40px;
  margin-top: clamp(22px, 4vh, 40px);
  padding-top: clamp(18px, 3vh, 30px);
  border-top: 1px solid rgba(255, 255, 255, .16);
}
.hero-facts li {
  display: flex;
  align-items: center;
  gap: 13px;
  font-size: 17px;
  line-height: 1.4;
  color: rgba(251, 240, 214, .74);
}
.hero-facts svg {
  width: 24px;
  height: 24px;
  flex: none;
  color: var(--gold);
}
.hero-facts b {
  font-weight: 600;
  color: #ffffff;
}

.stat b {
  display: block;
  font-size: clamp(32px, 3.6vw, 42px);
  font-weight: 500;
  color: var(--brown);
  line-height: 1.1;
  margin-bottom: 6px;
  letter-spacing: -0.02em;
}
.stat span {
  font-size: 12.5px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .06em;
}

/* ---------- Split (testo + foto) ---------- */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 72px;
  align-items: center;
}
.split.reverse .split-media { order: 2; }
.split-media {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--glass-border);
  outline: 1px solid var(--glass-edge);
  outline-offset: -1px;
  box-shadow: var(--glass-shadow);
}
.split-content h2 { font-size: clamp(25px, 3vw, 34px); margin-bottom: 18px; }
.split-content p { color: var(--muted); margin-bottom: 16px; }
.split-content .btn { margin-top: 16px; }

.check-list { margin: 24px 0 8px; display: grid; gap: 13px; }
.check-list li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 15.5px;
  color: var(--muted);
}
.check-list li svg {
  width: 18px; height: 18px;
  color: var(--brown);
  flex: none;
  margin-top: 4px;
}
.check-list li b { color: var(--ink); }

/* ---------- Cards servizi ---------- */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.card {
  border-radius: var(--radius);
  padding: 32px 28px;
  transition: transform .25s ease, box-shadow .25s ease;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 44px rgba(70, 53, 26, .14), inset 0 1px 0 rgba(255, 255, 255, .8);
}
.card .icon {
  width: 52px; height: 52px;
  border-radius: var(--radius-sm);
  background: rgba(246, 213, 134, .40);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .7);
  border: 1px solid rgba(255, 255, 255, .6);
  color: var(--brown);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}
.card .icon svg { width: 26px; height: 26px; }
.card h3 { font-size: 17.5px; margin-bottom: 10px; }
.card p { font-size: 15px; color: var(--muted); }

/* ---------- Fascia brand / loghi ---------- */
.brands-band { text-align: center; }
.brands-band img {
  margin: 0 auto;
  max-width: 940px;
  width: 100%;
}
.brands-band .note {
  margin: 32px auto 0;
  max-width: 640px;
  color: var(--muted);
  font-size: 14.5px;
}

/* ---------- Gustoverde ---------- */
.gustoverde {
  border-radius: var(--radius);
  padding: 56px;
  display: grid;
  grid-template-columns: 1.25fr .75fr;
  gap: 56px;
  align-items: center;
  position: relative;
  overflow: hidden;
}
.gustoverde::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(520px 380px at 88% 10%, rgba(140, 180, 110, .28), transparent 60%),
    radial-gradient(420px 320px at 8% 95%, rgba(214, 229, 197, .45), transparent 60%);
  pointer-events: none;
}
.gustoverde > * { position: relative; }
/* dentro la fascia verde serve più stacco dal fondo */
.gustoverde .eyebrow {
  border-color: rgba(46, 79, 32, .38);
  background: rgba(255, 255, 255, .55);
  color: #2e4f20;
}
.gustoverde h2 { font-size: clamp(24px, 2.8vw, 32px); }
.gv-tags { display: flex; flex-wrap: nowrap; gap: 8px; margin-top: 24px; }
.gv-tags span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  color: var(--green);
  background: rgba(255, 255, 255, .55);
  border: 1px solid rgba(255, 255, 255, .7);
  outline: 1px solid rgba(78, 122, 58, .18);
  outline-offset: -1px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .7);
  font-weight: 500;
  font-size: 12.5px;
  padding: 7px 12px;
  border-radius: 6px;
}
.gv-tags svg { width: 13px; height: 13px; flex: none; }

/* Foto nella sezione Gustoverde */
.gv-media {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .7);
  outline: 1px solid rgba(78, 122, 58, .14);
  outline-offset: -1px;
  box-shadow: var(--glass-shadow);
}

/* ---------- Galleria H24 ---------- */
/* due riquadri affiancati della stessa larghezza */
.h24-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.h24-grid .main {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
}
.h24-grid .main img, .h24-grid .side img { width: 100%; height: 100%; object-fit: cover; }
.h24-grid .side {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
}

/* ---------- Timeline orizzontale (pagina azienda) ---------- */
.timeline-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  margin-top: 72px;
}
.timeline-row li {
  position: relative;
  padding-top: 30px;
  border-top: 2px solid var(--line);
}
/* Pallino flat: cerchio pieno con anello nitido, senza sfumature né ombre */
.timeline-row li::before {
  content: "";
  position: absolute;
  left: 0; top: -6px;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--gold-deep);
  box-shadow: 0 0 0 4px rgba(246, 213, 134, .45);
  transition: box-shadow .2s ease;
}
.timeline-row li:hover::before {
  box-shadow: 0 0 0 6px rgba(246, 213, 134, .55);
}
.timeline-row b {
  display: block;
  font-size: 17px;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 6px;
}
.timeline-row p { color: var(--muted); font-size: 15px; }

/* Percorso a tappe numerate — stessa logica della timeline, con numero nel pallino */
.step-row {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  margin-top: 64px;
}
.step-row li {
  position: relative;
  padding-top: 40px;
  border-top: 2px solid rgba(255, 255, 255, .18);
}
.step-dot {
  position: absolute;
  left: 0; top: -21px;
  width: 42px; height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--gold-deep);
  color: #2b2110;
  box-shadow: 0 0 0 5px rgba(246, 213, 134, .18);
  transition: box-shadow .22s ease, transform .22s ease, background .22s ease;
}
.step-dot svg { width: 20px; height: 20px; }
.step-row li:hover .step-dot {
  background: var(--gold);
  box-shadow: 0 0 0 8px rgba(246, 213, 134, .28);
  transform: scale(1.06);
}
.step-row b {
  display: block;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 500;
  color: #ffffff;
  margin-bottom: 8px;
}
.step-row p { color: rgba(251, 240, 214, .78); font-size: 15px; }

/* ---------- Certificazioni ---------- */
.cert-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.cert {
  border-radius: var(--radius);
  padding: 36px 32px;
}
.cert-logo {
  height: 48px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  margin-bottom: 20px;
  /* i loghi hanno il fondo bianco: così si fonde con la card */
  mix-blend-mode: multiply;
}
.cert h3 { font-size: 17.5px; margin-bottom: 8px; }
.cert p { font-size: 15px; color: var(--muted); }

/* ---------- CTA band ---------- */

/* ---------- CTA raccolta contatti (home) ---------- */
/* Griglia 2x2 dei marchi di certificazione */
.split-media:has(.cert-grid) {
  border: 0;
  outline: 0;
  box-shadow: none;
  overflow: visible;
  border-radius: 0;
}
.cert-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.cert-grid li {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 24px 18px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  text-align: center;
}
.cert-grid img {
  height: 74px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
}
.cert-grid span {
  font-size: 13px;
  font-weight: 600;
  color: var(--brown);
  letter-spacing: .01em;
}

.lead-cta {
  display: grid;
  grid-template-columns: .8fr 1.2fr;
  align-items: stretch;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--glass-bg);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  outline: 1px solid var(--glass-edge);
  outline-offset: -1px;
  box-shadow: var(--glass-shadow), inset 0 1px 0 rgba(255, 255, 255, .8);
}
.lead-cta.no-media { grid-template-columns: 1fr; }
.lead-cta.no-media .lead-cta-content {
  max-width: 720px;
  margin: 0 auto;
  padding: 56px 40px;
  text-align: center;
}
.lead-cta.no-media .lead-cta-content h2 { margin-bottom: 14px; }
.lead-cta.no-media .lead-cta-content > p { max-width: 100%; }
.lead-cta.no-media .lead-points { justify-content: center; margin-top: 22px; }
.lead-cta.no-media .lead-actions { margin-top: 26px; }
.lead-cta-media .ph { height: 100%; aspect-ratio: auto; min-height: 100%; }
.lead-cta-content { padding: 52px 56px; }
.lead-cta-content h2 { font-size: clamp(24px, 2.9vw, 34px); margin-bottom: 12px; }
.lead-cta-content > p { color: var(--muted); max-width: 520px; }

.lead-points { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 18px; }
.lead-points li {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 14px;
  color: var(--muted);
}
.lead-points svg { width: 15px; height: 15px; color: var(--brown); flex: none; }

.lead-actions { margin-top: 28px; }

.lead-form { margin-top: 26px; }
.lead-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}
/* i campi usano lo stile condiviso .field, come nel modulo Contatti;
   qui va solo annullato il margine, perché la spaziatura la dà il gap della griglia */
.lead-fields .field { margin-bottom: 0; }
.lead-note { font-size: 13px; color: var(--muted); margin-top: 16px; }
.lead-note a { text-decoration: underline; }

/* ---------- Pagina contatti ---------- */
.contact-grid {
  /* la card è anche il container: senza questo il suo sfondo riempirebbe pure
     il padding, risultando 48px più larga della card dell'header */
  max-width: calc(var(--container) - 48px);
  padding-left: 0;
  padding-right: 0;
  display: grid;
  grid-template-columns: .9fr 1.1fr;
  gap: 0;
  align-items: stretch;
  border-radius: var(--radius);
  overflow: hidden;
}

/* Pannello recapiti unificato */
.contact-panel {
  padding: 44px 44px;
  border-right: 1px solid rgba(109, 84, 41, .10);
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.cp-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-bottom: 22px;
  margin-bottom: 24px;
  border-bottom: 1px solid rgba(109, 84, 41, .12);
}
.cp-logo { width: 54px; height: 54px; flex: none; }
.cp-company {
  display: block;
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.3;
}
.cp-claim {
  display: block;
  font-size: 12.5px;
  letter-spacing: .04em;
  color: var(--muted);
}
.contact-panel h2 { font-size: 21px; margin-bottom: 6px; }
.contact-panel .hint { font-size: 14.5px; color: var(--muted); margin-bottom: 22px; }
.contact-list { display: grid; }
.contact-list li {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 20px 0;
  border-top: 1px solid rgba(109, 84, 41, .12);
}
.contact-list li:first-child { border-top: none; padding-top: 4px; }
.contact-list li:last-child { padding-bottom: 4px; }
.ci-icon {
  width: 46px; height: 46px;
  flex: none;
  border-radius: var(--radius-sm);
  background: rgba(246, 213, 134, .40);
  border: 1px solid rgba(255, 255, 255, .6);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .7);
  color: var(--brown);
  display: flex;
  align-items: center;
  justify-content: center;
}
.ci-icon svg { width: 22px; height: 22px; }
.ci-label { display: block; font-size: 13px; font-weight: 500; color: var(--ink); margin-bottom: 3px; }
.contact-list p { font-size: 15px; color: var(--muted); line-height: 1.55; }
.contact-list a { color: var(--muted); }
.contact-list a:hover { color: var(--brown); }

.contact-form {
  padding: 44px 44px;
}
.contact-form h2 { font-size: 21px; margin-bottom: 6px; }
.contact-form .hint { font-size: 14.5px; color: var(--muted); margin-bottom: 26px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { margin-bottom: 16px; }
.field label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 7px;
}
.field input, .field select, .field textarea {
  width: 100%;
  font-family: var(--font);
  font-size: 15.5px;
  color: var(--ink);
  background: rgba(255, 255, 255, .65);
  border: 1px solid rgba(109, 84, 41, .16);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .7);
  transition: border-color .18s ease, box-shadow .18s ease;
}
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--gold-deep);
  box-shadow: 0 0 0 4px rgba(246, 213, 134, .35);
}
.field textarea { resize: vertical; min-height: 130px; }
.form-note { font-size: 13px; color: var(--muted); margin-top: 14px; }

/* Sotto i 16px iOS ingrandisce la pagina appena si tocca un campo:
   da mobile i campi vanno quindi portati a 16px esatti. */
@media (max-width: 860px) {
  .field input, .field select, .field textarea { font-size: 16px; }
}


/* ---------- Page hero (pagine interne) ---------- */
.page-hero {
  margin-top: -116px;   /* passa dietro l'header flottante: niente stacco */
  padding: 168px 0 84px;
  border-bottom: 1px solid var(--line);
  background: #ffffff;
}
.page-hero-inner {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 64px;
  align-items: center;
}
.page-hero h1 { font-size: clamp(30px, 4vw, 46px); margin-bottom: 16px; }
.page-hero p { color: var(--muted); font-size: 18px; max-width: 620px; }
.page-hero-media {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--glass-shadow);
}
.page-hero-photo {
  display: block;
  width: 100%;
  aspect-ratio: 5 / 4;
  max-height: 44vh;
  object-fit: cover;
}
.breadcrumb {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .01em;
  color: var(--muted);
  margin-bottom: 22px;
}
.breadcrumb a { color: var(--brown); transition: color .2s ease; }
.breadcrumb a:hover { color: var(--gold-deep); }
.breadcrumb .bc-sep { margin: 0 6px; color: var(--gold-deep); font-weight: 600; }

/* Variante hero scura (come la home) */
.page-hero.dark {
  border-bottom: none;
  background:
    radial-gradient(820px 420px at 90% -12%, rgba(255, 255, 255, .07), transparent 62%),
    linear-gradient(155deg, #33333a 0%, #1d1d21 52%, #0e0e11 100%);
}
/* Variante oro scuro: sovrascrive solo il fondo, i testi restano quelli di .dark */
.page-hero.gold {
  background:
    radial-gradient(820px 420px at 90% -12%, rgba(255, 255, 255, .12), transparent 62%),
    linear-gradient(155deg, #b08a35 0%, #86682a 52%, #5c471b 100%);
}
.page-hero.gold .breadcrumb a { color: #ffffff; }
.page-hero.gold .breadcrumb a:hover { color: var(--gold); }
.page-hero.dark h1 { color: var(--white); }
.page-hero.dark h1 em { font-style: normal; color: var(--gold); }
.page-hero.dark p { color: rgba(251, 240, 214, .82); }
.page-hero.dark .breadcrumb { color: rgba(251, 240, 214, .55); }
.page-hero.dark .breadcrumb a { color: var(--gold); }
.page-hero.dark .breadcrumb a:hover { color: #fff; }
.page-hero.dark .page-hero-media {
  border-color: rgba(255, 255, 255, .18);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .28);
}
.page-hero.dark .ph {
  color: rgba(255, 255, 255, .55);
  background-color: rgba(255, 255, 255, .08);
  background-image: repeating-linear-gradient(45deg, rgba(255, 255, 255, .05) 0 12px, transparent 12px 24px);
}
.page-hero.dark .ph span { color: rgba(255, 255, 255, .5); }

/* ---------- Footer (scuro) ---------- */
.site-footer {
  border-top: 1px solid rgba(0, 0, 0, .18);
  background: #18140f;
  color: rgba(245, 240, 230, .62);
  padding: 72px 0 0;
  font-size: 15px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1.3fr;
  gap: 40px 48px;
  align-items: stretch;
  padding-bottom: 56px;
}
/* linea verticale di separazione tra il blocco logo e il menu */
@media (min-width: 1025px) {
  .footer-grid > div:nth-child(2) {
    border-left: 1px solid rgba(245, 240, 230, .12);
    padding-left: 48px;
  }
}
.footer-brand { max-width: 400px; }
.footer-brand img { width: 76px; margin-bottom: 18px; }
.footer-brand p { line-height: 1.6; }
.footer-brand .claim {
  color: var(--gold);
  font-size: 17px;
  font-weight: 500;
  margin-bottom: 12px;
}
.footer-brand p { color: rgba(245, 240, 230, .55); }
/* social nel footer: stesso linguaggio delle icone del sito */
.footer-social {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}
.footer-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(245, 240, 230, .18);
  color: rgba(245, 240, 230, .62);
  transition: color .2s ease, border-color .2s ease, background .2s ease;
}
.footer-social a:hover {
  color: var(--gold);
  border-color: var(--gold);
  background: rgba(246, 213, 134, .10);
}
.footer-social svg { width: 16px; height: 16px; }

/* certificazioni: quattro voci distinte, separate da divisori verticali */
.footer-certs {
  padding-bottom: 30px;
}
/* tutte e quattro su un solo rigo, distribuite da bordo a bordo */
.footer-certs ul {
  display: flex;
  align-items: baseline;
  gap: 0;
}
/* flex:1 con base "auto": lo spazio in eccesso si divide in parti uguali fra le voci
   e il testo resta centrato in ciascuna, così i divisori cadono a metà fra un testo
   e l'altro invece di appoggiarsi a quello successivo */
.footer-certs li {
  flex: 1 1 auto;
  display: inline-flex;
  align-items: baseline;
  justify-content: center;
  gap: 5px;
  padding: 0 14px;
  line-height: 1.5;
  min-width: 0;
}
.footer-certs li + li { border-left: 1px solid rgba(245, 240, 230, .16); }
.footer-certs b {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .01em;
  white-space: nowrap;
  color: rgba(245, 240, 230, .60);
}
.footer-certs span {
  font-size: 10.5px;
  color: rgba(245, 240, 230, .34);
}
/* Sotto i 900px le quattro voci su un rigo si spezzerebbero: vanno in colonna,
   una per riga, senza divisori verticali (che resterebbero sospesi nel vuoto). */
@media (max-width: 900px) {
  .footer-certs ul {
    flex-direction: column;
    align-items: center;
    gap: 10px;
  }
  .footer-certs li {
    flex: none;
    padding: 0;
    justify-content: center;
    text-align: center;
  }
  .footer-certs li + li { border-left: none; }
}
.site-footer h3 {
  color: #f3ede1;
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  margin-bottom: 18px;
}
.site-footer ul li { margin-bottom: 10px; }
.site-footer a { color: rgba(245, 240, 230, .62); transition: color .18s ease; }
.site-footer a:hover { color: var(--gold); }
.footer-contact li { display: block; }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, .10);
  padding: 22px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
  flex-wrap: wrap;
  font-size: 13px;
  color: rgba(245, 240, 230, .45);
}
.footer-bottom > span:first-child { margin-right: auto; }
/* Credito studio: una luce attraversa il testo al passaggio del mouse */
.footer-credit a {
  position: relative;
  display: inline-block;
  color: var(--gold);
  /* il gradiente è largo il doppio: scorrendolo si ottiene il riflesso */
  background-image: linear-gradient(
    100deg,
    var(--gold) 0%, var(--gold) 38%,
    #fffdf4 48%, #ffffff 52%,
    var(--gold) 62%, var(--gold) 100%
  );
  background-size: 250% 100%;
  background-position: 100% 0;
  background-repeat: no-repeat;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  transition: background-position .85s cubic-bezier(.25, .6, .2, 1);
}
.footer-credit a:hover { background-position: 0 0; }
/* sottolineatura che si disegna da sinistra */
.footer-credit a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0;
  height: 1px;
  background: var(--gold);
  transition: width .45s cubic-bezier(.2, .7, .2, 1);
}
.footer-credit a:hover::after { width: 100%; }

/* se il ritaglio del testo non è supportato, testo pieno normale */
@supports not ((-webkit-background-clip: text) or (background-clip: text)) {
  .footer-credit a {
    -webkit-text-fill-color: var(--gold);
    background-image: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  .footer-credit a { transition: none; }
  .footer-credit a::after { transition: none; }
}

/* ---------- Segnaposto immagini ---------- */
.ph {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  aspect-ratio: 4 / 3;
  color: #b3a988;
  background-color: #f2efe8;
  background-image: repeating-linear-gradient(45deg, rgba(109, 84, 41, .045) 0 12px, transparent 12px 24px);
}
.ph svg { width: 42px; height: 42px; }
.ph span {
  font-size: 12.5px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #b0a684;
}
/* Segnaposto nella hero (su fondo scuro) */
/* Foto in sezione affiancata, al posto del segnaposto 4:3 */
.split-cover {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  box-shadow: var(--glass-shadow);
}

/* Foto accanto al modulo in home: riempie la colonna in altezza */
.cta-photo {
  width: 100%;
  height: 100%;
  min-height: 100%;
  object-fit: cover;
  display: block;
}

/* Foto nel blocco Gustoverde: riempie la colonna, il contenitore ha già bordo e angoli */
.gv-photo {
  width: 100%;
  height: 100%;
  min-height: 320px;
  object-fit: cover;
  display: block;
}

/* Immagine in una sezione affiancata: mantiene le proporzioni originali,
   così le grafiche con testo non vengono tagliate */
.split-photo {
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  box-shadow: var(--glass-shadow);
}

/* Foto dell'hero: stessi vincoli del segnaposto che sostituisce */
.hero-photo {
  width: 100%;
  aspect-ratio: 5 / 4;
  max-height: 44vh;
  margin-left: auto;
  margin-right: auto;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, .22);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .32);
}

.ph-hero {
  aspect-ratio: 5 / 4;
  /* si rimpicciolisce sugli schermi bassi, mantenendo le proporzioni */
  max-height: 44vh;
  margin-left: auto;
  margin-right: auto;
  border-radius: var(--radius);
  color: rgba(255, 255, 255, .55);
  background-color: rgba(255, 255, 255, .08);
  background-image: repeating-linear-gradient(45deg, rgba(255, 255, 255, .05) 0 12px, transparent 12px 24px);
  border: 1px solid rgba(255, 255, 255, .22);
}
.ph-hero span { color: rgba(255, 255, 255, .5); }
/* Fill nella galleria H24 */
/* i due riquadri H24 sono identici: stessa larghezza e stesse proporzioni */
.h24-grid .main .ph,
.h24-grid .side .ph,
.h24-photo { aspect-ratio: 16 / 10; height: auto; }
.h24-photo { width: 100%; object-fit: cover; display: block; }

/* ---------- Animazioni reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .55s ease, transform .55s ease;
}
.reveal.visible { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: .08s; }
.reveal.d2 { transition-delay: .16s; }
.reveal.d3 { transition-delay: .24s; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* Fallback senza backdrop-filter */
@supports not (backdrop-filter: blur(1px)) {
  .card, .cert, .gustoverde, .contact-grid, .hero-badges {
    background: rgba(255, 255, 255, .92);
  }
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .cards-grid, .cert-grid, .step-row { grid-template-columns: repeat(2, 1fr); }
  .hero-inner { grid-template-columns: 1fr; padding: 56px 0; }
  .hero-visual { max-width: 560px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 40px 48px; }
  .footer-brand { grid-column: 1 / -1; max-width: 480px; }
  /* Contatti: già da tablet pannello e form impilati, così i campi restano ampi */
  .contact-grid { grid-template-columns: 1fr; }
  .contact-panel {
    border-right: none;
    border-bottom: 1px solid rgba(109, 84, 41, .10);
  }
  .page-hero-inner { gap: 40px; }
}

@media (max-width: 860px) {
  .cert-grid { gap: 12px; }
  .cert-grid li { padding: 18px 12px; }
  .cert-grid img { height: 58px; }
  .section { padding: 64px 0; }
  .main-nav {
    position: fixed;
    inset: 0;
    z-index: 90;
    margin: 0;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 100px 24px 40px;
    background: #ffffff;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-12px);
    transition: opacity .3s ease, transform .3s ease, visibility .3s;
    overflow-y: auto;
  }
  body.nav-open .main-nav {
    opacity: 1;
    visibility: visible;
    transform: none;
  }
  body.nav-open { overflow: hidden; }
  .main-nav a {
    font-size: 18px;
    font-weight: 500;
    letter-spacing: .01em;
    padding: 14px 10px;
    border-radius: 0;
  }
  .main-nav a::after { bottom: 6px; }
  .main-nav a:hover::after,
  .main-nav a.active::after { width: 100%; }
  .main-nav a.active { color: var(--brown); font-weight: 600; }
  .nav-toggle { position: relative; z-index: 110; }
  /* logo sopra l'overlay, altrimenti resta coperto dal pannello del menu */
  body.nav-open .brand { position: relative; z-index: 110; }
  .nav-toggle { display: flex; }
  /* su mobile l'header resta essenziale: solo logo e menu */
  .header-cta { display: none; }

  /* niente immagine sopra i moduli su mobile: allunga la pagina prima del form
     senza aggiungere nulla. Colpisce solo i blocchi che contengono davvero un form. */
  .lead-cta:has(form) .lead-cta-media { display: none; }

  /* l'header non si compatta né si sposta allo scroll: resta identico */
  .site-header.scrolled { padding: 0; }
  .site-header.scrolled .header-inner { height: 84px; }
  .site-header.scrolled .brand img { width: 56px; height: 56px; }
  .site-header.scrolled .main-nav a { padding-top: 14px; padding-bottom: 14px; }

  /* social in fondo al menu a schermo intero */
  .nav-social {
    display: flex;
    justify-content: center;
    gap: 14px;
    margin-top: 36px;
  }
  .nav-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: 1px solid rgba(109, 84, 41, .18);
    color: var(--brown);
    transition: color .2s ease, border-color .2s ease, background .2s ease;
  }
  .nav-social a:hover {
    background: rgba(246, 213, 134, .35);
    border-color: var(--gold-deep);
    color: var(--gold-deep);
  }
  .nav-social svg { width: 18px; height: 18px; }
  .site-header { padding: 0; }
  .header-inner {
    height: 84px;
    border-top: none;
    border-left: none;
    border-right: none;
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  }
  .split, .contact-grid, .gustoverde { grid-template-columns: 1fr; }

  /* su mobile la card bianca sta su una sezione bianca: due bianchi sovrapposti.
     Tolgo il trattamento a card e lascio il contenuto sulla sezione. */
  .contact-grid {
    background: none;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    border: none;
    outline: none;
    box-shadow: none;
    border-radius: 0;
  }
  .split.reverse .split-media { order: 0; }
  .page-hero { padding: 148px 0 64px; }
  .page-hero-inner { grid-template-columns: 1fr; gap: 36px; }
  .page-hero-media .ph { aspect-ratio: 16 / 10; }
  .timeline-row { grid-template-columns: 1fr; gap: 28px; margin-top: 48px; }
  .step-row { grid-template-columns: 1fr; gap: 30px; margin-top: 44px; }
  .gustoverde { padding: 36px 28px; gap: 32px; }
  .gv-tags { flex-wrap: wrap; }
  .hero-facts { flex-direction: column; justify-content: flex-start; gap: 15px; margin-top: 30px; padding-top: 26px; }
  .hero-facts li { font-size: 16px; }
  .h24-grid { grid-template-columns: 1fr; }
  .h24-grid .main .ph { aspect-ratio: 16 / 10; height: auto; }
  .lead-cta { grid-template-columns: 1fr; }
  .lead-cta-media .ph { aspect-ratio: 16 / 10; height: auto; min-height: 0; }
  .lead-cta-content { padding: 36px 28px; }
  .lead-fields { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .contact-form { padding: 28px 24px; }
  .contact-panel { padding: 28px 24px; border-right: none; border-bottom: 1px solid rgba(109, 84, 41, .10); }
  body { background-attachment: scroll; }
}

@media (max-width: 560px) {
  .cards-grid, .cert-grid { grid-template-columns: 1fr; }
  /* Footer completamente centrato su mobile */
  .footer-grid { grid-template-columns: 1fr; gap: 36px; text-align: center; }
  .footer-brand { grid-column: auto; max-width: none; margin: 0 auto; }
  .footer-brand img { margin-left: auto; margin-right: auto; }
  .footer-social { justify-content: center; }
  .footer-bottom { justify-content: center; text-align: center; }
  .footer-bottom > span:first-child { margin-right: 0; }
}

/* ---------- Varianti griglia a 4 colonne ---------- */
.cards-grid.four { grid-template-columns: repeat(4, 1fr); }
.cert-grid.four { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1024px) {
  .cards-grid.four, .cert-grid.four { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .cards-grid.four, .cert-grid.four { grid-template-columns: 1fr; }
}

/* Campo trappola anti-bot: invisibile agli utenti, compilato dai bot */
.hp-field {
  position: absolute !important;
  left: -9999px !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

/* ---------- Consenso privacy nei form ---------- */
.form-consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 4px 0 18px;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--muted);
  cursor: pointer;
}
.form-consent input[type="checkbox"] {
  flex: none;
  width: 18px;
  height: 18px;
  margin-top: 1px;
  accent-color: var(--gold-deep);
  cursor: pointer;
}
.form-consent a { color: var(--brown); text-decoration: underline; }
.form-consent a:hover { color: var(--gold-deep); }

/* ---------- Torna su ---------- */
.to-top {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 190;
  width: 40px;
  height: 40px;
  padding: 0;
  border: none;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #1c1c20;
  color: #ffffff;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .20);
  opacity: 0;
  visibility: hidden;
  transform: translateY(14px);
  transition: opacity .3s ease, transform .3s ease, visibility .3s,
              background .2s ease, border-color .2s ease, color .2s ease;
}
.to-top.show { opacity: 1; visibility: visible; transform: none; }
/* col menu a schermo intero aperto i pulsanti flottanti non servono e darebbero fastidio */
body.nav-open .to-top,
body.nav-open .cookie-fab {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.to-top:hover { background: #000000; }
.to-top .arrow {
  position: relative;
  z-index: 1;
  width: 17px;
  height: 17px;
  transition: transform .25s ease;
}
.to-top:hover .arrow { transform: translateY(-3px); }
/* tracciato di avanzamento lettura, lungo il bordo del quadrato */
.to-top .ring {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.to-top .ring rect { fill: none; stroke-width: 2.5; }
.to-top .ring .track { stroke: rgba(255, 255, 255, .18); }
.to-top .ring .bar {
  stroke: var(--gold);
  stroke-linecap: round;
  transition: stroke-dashoffset .1s linear;
}
@media (max-width: 560px) {
  .to-top { width: 38px; height: 38px; right: 14px; bottom: 14px; }
  .to-top .arrow { width: 16px; height: 16px; }
}

/* ---------- Luce ambientale animata sulle sezioni scure ----------
   L'alone si muove in transform (GPU) invece di animare il gradiente:
   nessun ridisegno dello sfondo a ogni frame. */
.hero,
.section.dark,
.page-hero.dark {
  position: relative;
  overflow: hidden;
}
.hero > *,
.section.dark > *,
.page-hero.dark > * {
  position: relative;
  z-index: 1;
}
.hero::before,
.section.dark::before,
.page-hero.dark::before {
  content: "";
  position: absolute;
  inset: -25%;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(closest-side, rgba(246, 213, 134, .16), transparent 72%);
  animation: ambient-drift 28s ease-in-out infinite alternate;
}
/* sfasature diverse, così sezioni vicine non pulsano all'unisono */
.section.dark::before { animation-duration: 34s; animation-delay: -8s; }
.page-hero.dark::before { animation-duration: 24s; animation-delay: -14s; }

@keyframes ambient-drift {
  from { transform: translate3d(-9%, -6%, 0) scale(1); }
  to   { transform: translate3d(11%, 8%, 0) scale(1.18); }
}
@media (prefers-reduced-motion: reduce) {
  .hero::before,
  .section.dark::before,
  .page-hero.dark::before { animation: none; }
}

/* ---------- Banner cookie ---------- */
.cookie-banner {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 200;
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 20px 28px;
  flex-wrap: wrap;
  padding: 20px 24px;
  background: #ffffff;
  border: 1px solid rgba(109, 84, 41, .14);
  border-radius: var(--radius-sm);
  box-shadow: 0 18px 50px rgba(70, 53, 26, .22);
  transform: translateY(140%);
  opacity: 0;
  transition: transform .4s cubic-bezier(.2,.7,.2,1), opacity .4s ease;
}
.cookie-banner.show { transform: none; opacity: 1; }

/* Linguetta agganciata al bordo inferiore per riaprire il banner */
.cookie-fab {
  position: fixed;
  left: 20px;
  bottom: 0;
  z-index: 190;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  height: 46px;
  padding: 0 20px;
  border: none;
  border-radius: 10px 10px 0 0;
  background: var(--brown);
  color: #ffffff;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .01em;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: 0 -6px 20px rgba(70, 53, 26, .22);
  /* a riposo resta parzialmente sotto il bordo: all'hover si alza */
  transform: translateY(9px);
  transition: transform .3s cubic-bezier(.2, .7, .2, 1), background .2s ease, opacity .3s ease;
}
.cookie-fab:hover,
.cookie-fab:focus-visible { transform: translateY(0); background: #5a441f; }
.cookie-fab svg { width: 18px; height: 18px; flex: none; }
.cookie-fab.hidden { opacity: 0; visibility: hidden; pointer-events: none; }
@media (max-width: 560px) {
  .cookie-fab { left: 14px; height: 42px; padding: 0 16px; font-size: 12.5px; }
  .cookie-fab svg { width: 17px; height: 17px; }
}
@media (prefers-reduced-motion: reduce) {
  .cookie-fab { transform: translateY(0); }
}
.cookie-banner__text { flex: 1 1 340px; font-size: 14px; line-height: 1.6; color: var(--muted); }
.cookie-banner__text strong { display: block; color: var(--ink); font-size: 15px; margin-bottom: 4px; }
.cookie-banner__text a { color: var(--brown); text-decoration: underline; text-underline-offset: 2px; }
.cookie-banner__text a:hover { color: var(--gold-deep); }
.cookie-banner__actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.cookie-banner__actions .btn { padding: 11px 20px; font-size: 14px; cursor: pointer; }
@media (max-width: 560px) {
  .cookie-banner { padding: 18px 18px; gap: 14px; }
  .cookie-banner__actions { width: 100%; }
  .cookie-banner__actions .btn { flex: 1 1 auto; text-align: center; }
}

/* ---------- Cursore personalizzato (cerchio vuoto) ---------- */
.ha-cursore,
.ha-cursore a,
.ha-cursore button,
.ha-cursore label,
.ha-cursore input,
.ha-cursore textarea,
.ha-cursore select { cursor: none; }

.cursore {
  position: fixed;
  top: 0;
  left: 0;
  width: 32px;
  height: 32px;
  border: 1.5px solid var(--gold-deep);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  opacity: 0;
  transition: opacity .25s ease, width .18s ease, height .18s ease,
              border-color .18s ease, background-color .18s ease;
  will-change: transform;
}
.cursore.attivo { opacity: 1; }
.cursore.su-link {
  width: 46px;
  height: 46px;
  margin: -7px 0 0 -7px;
  border-color: var(--brown);
  background: rgba(193, 154, 63, .10);
}
.cursore.premuto { background: rgba(193, 154, 63, .22); }

/* Su touch il cursore non esiste: nessuna regola da annullare, ma per sicurezza */
@media (hover: none), (pointer: coarse) {
  .cursore { display: none; }
  .ha-cursore, .ha-cursore a, .ha-cursore button { cursor: auto; }
}

/* ---------- Preloader ---------- */
#preloader {
  position: fixed;
  inset: 0;
  z-index: 9998;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  perspective: 600px;
  transition: opacity .45s ease, visibility .45s;
}
#preloader img {
  width: 84px;
  height: 84px;
  transform-style: preserve-3d;
  animation: moneta 1.4s linear infinite;
}
/* stessa rotazione a moneta dell'hover sul logo dell'header */
@keyframes moneta {
  from { transform: rotateY(0deg); }
  to   { transform: rotateY(360deg); }
}
#preloader.chiuso { opacity: 0; visibility: hidden; }
/* niente scorrimento finché il preloader è a schermo */
body.caricamento { overflow: hidden; }

@media (prefers-reduced-motion: reduce) {
  #preloader img { animation: none; }
}
