/* DiagramCarta – foglio di stile
   Stile: blu notte #0C1C33 per intestazione, apertura e piè di pagina, bianco, blu #1565A8, un solo carattere (Instrument Sans). */

/* ---------- Carattere ---------- */
@font-face {
  font-family: "Instrument Sans";
  src: url("../fonts/instrument-sans.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

/* ---------- Variabili ---------- */
:root {
  --blu: #1565A8;
  --blu-scuro: #0F4C80;
  --blu-chiaro: #DCEAF6;
  --blu-ic: #EEF4FA;
  --testo: #111418;
  --grigio: #5B6470;
  --grigio-corpo: #3D4550;
  --linea: #E6E8EB;
  --bordo: #D5D9DE;
  --soft: #F7F8FA;
  --ph: #EEF0F2;
  --font: "Instrument Sans", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  color: var(--testo);
  background: #FFFFFF;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; }
a { color: var(--blu); }
a:hover { color: var(--blu-scuro); }
h1, h2, h3 { margin: 0; }
:focus-visible { outline: 2px solid var(--blu); outline-offset: 3px; border-radius: 2px; }
[hidden] { display: none !important; }
[id] { scroll-margin-top: 24px; }

.skip {
  position: absolute; left: 16px; top: -60px; z-index: 50;
  background: var(--blu); color: #FFF; padding: 10px 16px; border-radius: 6px; text-decoration: none;
}
.skip:focus { top: 12px; color: #FFF; }

.wrap { max-width: 1200px; margin: 0 auto; padding: 0 40px; }

/* ---------- Animazioni ---------- */
@keyframes up { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes drop { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
.up { animation: up .8s ease-out both; }
.d1 { animation-delay: .12s; } .d2 { animation-delay: .24s; } .d3 { animation-delay: .36s; }

/* ---------- Utilità ---------- */
.grid-bg {
  background-image: linear-gradient(#F0F2F5 1px, transparent 1px), linear-gradient(90deg, #F0F2F5 1px, transparent 1px);
  background-size: 32px 32px;
  background-position: -1px -1px;
}
.bg-soft { background: var(--soft); }
.m-0 { margin: 0; }
.mt-4 { margin-top: 4px; }
.mt-8 { margin-top: -8px; }
.pt-0 { padding-top: 0 !important; }
.pt-96 { padding-top: 96px; }
.pb-72 { padding-bottom: 72px; }
.pb-96 { padding-bottom: 96px; }
.pb-112 { padding-bottom: 112px; }
.sec-88 { padding-top: 88px; padding-bottom: 88px; }
.sec-96 { padding-top: 96px; padding-bottom: 96px; }
.sec-112 { padding-top: 112px; padding-bottom: 112px; }
.self-start { align-self: flex-start; }
.align-start { align-items: start !important; }
.maxw-560 { max-width: 560px; }
.maxw-680 { max-width: 680px; }
.fs-14 { font-size: 14px; }
.fs-15 { font-size: 15px; }
.strong { font-weight: 600; }
.muted { color: var(--grigio); }
.muted-sm { color: var(--grigio); font-size: 15px; }
.blue { color: var(--blu) !important; font-weight: 500; font-size: 15px; }
.num { color: var(--blu); font-size: 13px; font-weight: 600; letter-spacing: 1px; }
.label { color: var(--blu); font-size: 14px; font-weight: 600; letter-spacing: 1px; }
.eyebrow { color: var(--blu); font-size: 15px; font-weight: 500; }

.stack-12, .stack-14, .stack-18, .stack-20, .stack-22, .stack-24, .stack-28, .stack-36, .stack-48, .stack-56 { display: flex; flex-direction: column; }
.stack-12 { gap: 12px; } .stack-14 { gap: 14px; } .stack-18 { gap: 18px; } .stack-20 { gap: 20px; }
.stack-22 { gap: 22px; } .stack-24 { gap: 24px; } .stack-28 { gap: 28px; } .stack-36 { gap: 36px; }
.stack-48 { gap: 48px; } .stack-56 { gap: 56px; }

/* ---------- Griglie ---------- */
.g2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 64px; align-items: center; }
.g2b { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g5 { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; }
.gap-16 { gap: 16px; } .gap-20 { gap: 20px; } .gap-32 { gap: 32px; }
.cards { gap: 48px 32px; }

/* ---------- Titoli e testi ---------- */
.h-xl  { font-size: 72px; font-weight: 500; line-height: 1.05; letter-spacing: -2.5px; max-width: 900px; }
.h-xl2 { font-size: 64px; font-weight: 500; line-height: 1.05; letter-spacing: -2px; max-width: 860px; }
.h-lg  { font-size: 60px; font-weight: 500; line-height: 1.05; letter-spacing: -2px; }
.h-lg2 { font-size: 56px; font-weight: 500; line-height: 1.05; letter-spacing: -2px; }
.h-l   { font-size: 44px; font-weight: 500; line-height: 1.1; letter-spacing: -1.5px; }
.h-l2  { font-size: 40px; font-weight: 500; line-height: 1.1; letter-spacing: -1.3px; }
.h-m   { font-size: 38px; font-weight: 500; line-height: 1.15; letter-spacing: -1.2px; }
.h-m2  { font-size: 40px; font-weight: 500; line-height: 1.15; letter-spacing: -1.2px; }
.h-s   { font-size: 24px; font-weight: 600; }
.lead  { margin: 0; font-size: 20px; color: var(--grigio); max-width: 640px; }
.lead-s { margin: 0; font-size: 19px; color: var(--grigio); }
.item-t { font-size: 20px; font-weight: 600; line-height: 1.3; }
.item-tl { font-size: 24px; font-weight: 600; line-height: 1.25; }
.card-t { font-size: 22px; font-weight: 600; line-height: 1.2; letter-spacing: -0.3px; margin-top: -8px; }

.sec-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; }

/* ---------- Pulsanti ---------- */
.btns { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 8px; }
.btn, .btn-o, .btn-w {
  display: inline-block; text-decoration: none; font-weight: 500; border-radius: 6px;
  font-family: inherit; font-size: 17px; line-height: 1.6; cursor: pointer; text-align: center;
}
.btn { background: var(--blu); color: #FFF; padding: 14px 26px; border: 0; transition: background .2s ease; }
.btn:hover { background: var(--blu-scuro); color: #FFF; }
.btn-o { background: #FFF; color: var(--testo); padding: 13px 26px; border: 1px solid var(--bordo); transition: border-color .2s ease; }
.btn-o:hover { color: var(--testo); border-color: var(--blu); }
.btn-w { background: #FFF; color: var(--blu); font-weight: 600; padding: 15px 28px; transition: background .2s ease; }
.btn-w:hover { background: var(--blu-chiaro); color: var(--blu-scuro); }
.btn-s { font-size: 15px; padding: 10px 16px; }
.btn-full { width: 100%; padding: 15px; }
.show-m { display: none; }

/* Link con sottolineatura animata */
.nl {
  color: var(--testo); text-decoration: none;
  background-image: linear-gradient(var(--blu), var(--blu));
  background-size: 0 1px; background-repeat: no-repeat; background-position: 0 100%;
  transition: background-size .3s ease; padding-bottom: 2px;
}
.nl:hover { color: var(--testo); background-size: 100% 1px; }
.nl.on { background-size: 100% 1px; }
.nl.muted, .nl.muted:hover { color: var(--grigio); }
.link-b { font-weight: 500; color: var(--blu); text-decoration: none; }
.link-b:hover { text-decoration: underline; }

/* ---------- Intestazione ---------- */
.site-header { border-bottom: 1px solid var(--linea); position: relative; background: #FFF; z-index: 20; }
.header-in { display: flex; justify-content: space-between; align-items: center; gap: 24px; padding-top: 8px; padding-bottom: 8px; }
.logo { display: block; line-height: 0; }
.logo img { height: 100px; width: auto; display: block; }
.nav { display: flex; gap: 32px; align-items: center; flex-wrap: wrap; font-size: 15px; font-weight: 500; }
.burger {
  display: none; width: 44px; height: 44px; border: 1px solid var(--bordo); border-radius: 6px;
  background: #FFF; color: var(--testo); align-items: center; justify-content: center; cursor: pointer; padding: 0;
}
.burger .i-close { display: none; }
.burger[aria-expanded="true"] .i-open { display: none; }
.burger[aria-expanded="true"] .i-close { display: block; }
.menu-mobile {
  position: absolute; left: 0; right: 0; top: 100%; z-index: 30;
  background: #FFF; border-bottom: 1px solid var(--linea);
  padding: 8px 16px 20px; display: flex; flex-direction: column;
  animation: drop .25s ease-out both; box-shadow: 0 12px 24px rgba(17, 20, 24, .06);
}
.menu-mobile a { color: var(--testo); text-decoration: none; font-size: 20px; font-weight: 500; padding: 14px 0; border-bottom: 1px solid var(--ph); }
.menu-mobile a.muted { color: var(--grigio); font-size: 16px; border-bottom: 0; }

/* ---------- Immagini ---------- */
picture { display: block; }
.foto, .foto img { display: block; width: 100%; object-fit: cover; border-radius: 10px; }
.foto img { height: 100%; }
.foto-hero { height: 520px; }
.foto-400 { height: 400px; }
.foto-420 { height: 420px; }
.foto-460 { height: 460px; }
.foto-240 { height: 240px; }
.r8, .r8 img { border-radius: 8px; }
.ph-empty {
  background-color: var(--ph);
  background-image: linear-gradient(#E4E7EB 1px, transparent 1px), linear-gradient(90deg, #E4E7EB 1px, transparent 1px);
  background-size: 24px 24px;
  background-position: -1px -1px;
}
.fig { margin: 0; display: flex; flex-direction: column; gap: 12px; }
.fig figcaption { color: var(--grigio); font-size: 14px; }

/* ---------- Home ---------- */
.hero { padding-top: 96px; padding-bottom: 64px; display: flex; flex-direction: column; gap: 24px; }

/* Schede prodotto */
.card { position: relative; display: flex; flex-direction: column; gap: 14px; text-decoration: none; color: var(--testo); }
.card:hover { color: var(--testo); }
.card .ph { position: relative; height: 220px; border-radius: 8px; overflow: hidden; background: var(--ph); }
.ph-img, .ph-img img { display: block; width: 100%; height: 100%; object-fit: cover; }
.card .ph-img, .card .ph-img img, .prod .ph-img, .prod .ph-img img { transition: transform .6s ease; }
.card:hover .ph-img, .card:hover .ph-img img { transform: scale(1.05); }
.card .bar { position: absolute; left: 0; top: 0; height: 2px; width: 0; background: var(--blu); transition: width .4s ease; z-index: 1; }
.card:hover .bar { width: 100%; }
.card .lk { color: var(--blu); font-weight: 500; font-size: 15px; transition: transform .3s ease; display: inline-block; align-self: flex-start; }
.card:hover .lk { transform: translateX(4px); }

/* ---------- Pagine prodotto ---------- */
.p-hero { padding-top: 56px; padding-bottom: 88px; display: flex; flex-direction: column; gap: 40px; }
.crumbs { font-size: 14px; color: var(--grigio); }

.item {
  background: #FFF; border: 1px solid var(--linea); border-radius: 8px; padding: 26px;
  display: flex; flex-direction: column; gap: 8px; position: relative; overflow: hidden; transition: border-color .3s ease;
}
.item::before { content: ""; position: absolute; left: 0; top: 0; height: 2px; width: 0; background: var(--blu); transition: width .4s ease; }
.item:hover { border-color: #C9D6E3; }
.item:hover::before { width: 100%; }
.item.soft { background: var(--soft); }
.item.big { padding: 32px; }

.prod { display: flex; flex-direction: column; gap: 14px; }
.prod .ph { height: 280px; border-radius: 10px; overflow: hidden; background: var(--ph); }
.prod.sm .ph { height: 240px; }
.prod:hover .ph-img, .prod:hover .ph-img img { transform: scale(1.04); }

.fmt { display: flex; flex-direction: column; gap: 12px; }
.fmt-img, .fmt-img img { display: block; width: 100%; height: 130px; object-fit: cover; border-radius: 8px; }
.fmt .ph-empty { background-color: #E6E9EC; }

.chips { display: flex; flex-wrap: wrap; gap: 12px; }
.chip { background: #FFF; border: 1px solid var(--linea); border-radius: 6px; padding: 12px 20px; font-weight: 500; }

.cta {
  background: var(--blu); color: #FFF; border-radius: 12px; padding: 56px;
  display: flex; justify-content: space-between; align-items: center; gap: 32px; flex-wrap: wrap;
}
.cta-t { display: flex; flex-direction: column; gap: 8px; max-width: 620px; }
.cta h2 { font-size: 32px; font-weight: 500; line-height: 1.2; letter-spacing: -0.8px; }
.cta p { margin: 0; color: var(--blu-chiaro); }

.mini {
  display: flex; flex-direction: column; gap: 6px; padding: 20px;
  border: 1px solid var(--linea); border-radius: 8px; text-decoration: none; color: var(--testo); transition: border-color .3s ease;
}
.mini:hover { border-color: var(--blu); color: var(--testo); }

/* ---------- Azienda ---------- */
.pg-hero { padding-top: 80px; padding-bottom: 80px; }
.timeline { list-style: none; margin: 0; padding: 0 0 0 28px; border-left: 1px solid var(--bordo); display: flex; flex-direction: column; gap: 36px; }
.timeline li { position: relative; display: flex; flex-direction: column; gap: 4px; }
.timeline li::before {
  content: ""; position: absolute; left: -36px; top: 6px; width: 15px; height: 15px; border-radius: 50%;
  background: #FFF; border: 2px solid var(--blu);
}
.timeline li.last::before { background: var(--blu); }
.tl-when { color: var(--blu); font-weight: 600; }
.ic { width: 40px; height: 40px; border-radius: 8px; background: var(--blu-ic); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }

/* ---------- Contatti ---------- */
.pg-hero-s { padding-top: 72px; padding-bottom: 72px; }
.g-contact { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: 56px; align-items: start; padding-top: 72px; padding-bottom: 112px; }
.c-row { display: flex; gap: 16px; align-items: flex-start; }
.c-txt { display: flex; flex-direction: column; gap: 2px; }
.map { position: relative; height: 320px; border-radius: 10px; overflow: hidden; background: #EDF1F5; margin-top: 8px; border: 1px solid #E1E6EC; }
.map-bg { position: absolute; inset: 0; }
.map-pin { position: absolute; left: 50%; top: 46%; transform: translate(-50%, -100%); }
.map-card {
  position: absolute; left: 16px; right: 16px; bottom: 16px; background: #FFF; border-radius: 8px; padding: 14px 16px;
  display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap;
  box-shadow: 0 6px 20px rgba(17, 20, 24, .08);
}
.form-box { border: 1px solid var(--linea); border-radius: 12px; padding: 36px; scroll-margin-top: 24px; }
.form-t { font-size: 28px; font-weight: 600; letter-spacing: -0.5px; }
.f2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.fl { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 500; }
.fld {
  font: inherit; font-size: 16px; font-weight: 400; color: var(--testo);
  padding: 12px 14px; border: 1px solid var(--bordo); border-radius: 6px; background: #FFF; width: 100%;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.fld:focus { outline: none; border-color: var(--blu); box-shadow: 0 0 0 3px var(--blu-chiaro); }
.fld[aria-invalid="true"] { border-color: #B42318; }
textarea.fld { resize: vertical; min-height: 130px; }
select.fld {
  appearance: none; -webkit-appearance: none; padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%235B6470' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
}
.f-err { color: #B42318; font-size: 13px; font-weight: 500; display: block; margin-top: 2px; }
.chk { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--grigio); }
.chk input { margin-top: 5px; width: 16px; height: 16px; accent-color: var(--blu); flex-shrink: 0; }
.alert { background: #FEF3F2; border: 1px solid #FECDCA; color: #7A271A; border-radius: 8px; padding: 14px 16px; font-size: 15px; }
.alert ul { margin: 6px 0 0; padding-left: 20px; }
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.ok { display: flex; flex-direction: column; gap: 14px; padding: 48px 0; align-items: flex-start; }
.ic-ok { width: 52px; height: 52px; border-radius: 50%; }
.ok-t { font-size: 26px; font-weight: 600; }

/* ---------- Pagine legali ---------- */
.pg-hero-l { padding-top: 64px; padding-bottom: 56px; }
.legal { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 64px; align-items: start; padding-top: 48px; padding-bottom: 96px; line-height: 1.65; }
.toc { position: sticky; top: 24px; display: flex; flex-direction: column; gap: 10px; font-size: 15px; }
.toc .strong { margin-bottom: 4px; }
.toc a { align-self: flex-start; }
.legal-intro { margin: 0 0 8px; }
.legal h2 { margin: 0 0 10px; font-size: 24px; font-weight: 600; letter-spacing: -0.4px; }
.legal p { margin: 0 0 12px; color: var(--grigio-corpo); }
.legal ul { margin: 0 0 12px; padding-left: 20px; color: var(--grigio-corpo); }
.legal li { margin-bottom: 6px; }
.legal section { padding: 28px 0; border-top: 1px solid var(--linea); }

/* ---------- 404 ---------- */
.pg-404 { padding-top: 96px; padding-bottom: 120px; align-items: flex-start; }
.big404 { font-size: 180px; font-weight: 500; line-height: .9; letter-spacing: -8px; color: var(--blu); }

/* ---------- Piè di pagina ---------- */
.site-footer { border-top: 1px solid var(--linea); padding: 48px 0; }
.footer-in { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; font-size: 14px; color: var(--grigio); }
.f-col { display: flex; flex-direction: column; gap: 4px; }
.f-col strong { color: var(--testo); font-weight: 600; }
.f-logo { height: 64px; width: auto; max-width: none; align-self: flex-start; object-fit: contain; display: block; margin-bottom: 12px; }
.f-links { display: flex; gap: 20px; align-items: flex-start; }
.f-col a { align-self: flex-start; }

/* ---------- Tablet e telefono ---------- */
@media (max-width: 960px) {
  .wrap { padding: 0 16px; }
  .g2, .g2b, .g3, .g4, .g-contact, .legal { grid-template-columns: 1fr; }
  .g2 { gap: 40px; }
  .g-contact { gap: 40px; padding-top: 48px; padding-bottom: 72px; }
  .g5 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cards { gap: 40px; }

  .header-in { padding: 6px 16px; }
  .logo img { height: 64px; }
  .nav { display: none; }
  .burger { display: flex; }

  .h-xl, .h-xl2 { font-size: 44px; letter-spacing: -1.4px; line-height: 1.08; }
  .h-lg, .h-lg2 { font-size: 42px; letter-spacing: -1.4px; line-height: 1.08; }
  .h-l, .h-l2 { font-size: 34px; letter-spacing: -1px; }
  .h-m, .h-m2 { font-size: 30px; letter-spacing: -.8px; }
  .lead, .lead-s { font-size: 18px; }
  .big404 { font-size: 120px; letter-spacing: -5px; }

  .hero { padding-top: 48px; padding-bottom: 40px; gap: 18px; }
  .pg-hero, .pg-hero-s { padding-top: 48px; padding-bottom: 48px; }
  .pg-hero-l { padding-top: 40px; padding-bottom: 36px; }
  .p-hero { padding-top: 32px; padding-bottom: 56px; gap: 28px; }
  .pg-404 { padding-top: 56px; padding-bottom: 80px; }

  .sec-88, .sec-96, .sec-112 { padding-top: 64px; padding-bottom: 64px; }
  .pt-96 { padding-top: 64px; }
  .pb-96, .pb-112 { padding-bottom: 64px; }
  .pb-72 { padding-bottom: 56px; }
  .stack-56 { gap: 36px; }
  .stack-48 { gap: 32px; }

  .foto-hero { height: 300px; }
  .foto-400, .foto-420, .foto-460 { height: 280px; }
  .prod .ph, .prod.sm .ph { height: 240px; }

  .cta { padding: 32px 24px; }
  .cta h2 { font-size: 26px; }
  .form-box { padding: 24px 20px; }
  .f2 { grid-template-columns: 1fr; }
  .toc { position: static; }
  .legal { gap: 24px; padding-top: 32px; padding-bottom: 64px; }

  .site-footer { padding: 36px 0; }
  .footer-in { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 600px) {
  .btns .btn, .btns .btn-o { flex: 1 1 100%; }
  .hide-m { display: none; }
  .show-m { display: inline-block; }
  .cta .btn-w { width: 100%; }
}

/* ---------- Movimento ridotto ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .up, .menu-mobile { animation: none; }
  *, *::before, *::after { transition: none !important; }
}

/* ---------- Stampa ---------- */
@media print {
  .site-header nav, .burger, .menu-mobile, .cta, .mini, form { display: none !important; }
  .up { animation: none; }
}

/* ==========================================================
   Versione scura: intestazione, apertura della home, fascia
   azienda e piè di pagina in blu notte.
   ========================================================== */
:root { --notte: #0C1C33; --notte-2: #13284A; --azzurro: #8FC1EC; }

/* Intestazione */
.site-header { background: var(--notte); border-bottom-color: rgba(255,255,255,.10); }
.site-header .nl { color: #FFF; background-image: linear-gradient(#FFF, #FFF); }
.site-header .nl:hover { color: #FFF; }
.site-header .nl.muted, .site-header .nl.muted:hover { color: rgba(255,255,255,.65); }
.burger { background: transparent; color: #FFF; border-color: rgba(255,255,255,.35); }
.menu-mobile { background: var(--notte); border-bottom-color: rgba(255,255,255,.10); box-shadow: 0 12px 24px rgba(0,0,0,.25); }
.menu-mobile a { color: #FFF; border-bottom-color: rgba(255,255,255,.12); }
.menu-mobile a.muted { color: rgba(255,255,255,.65); }
.site-header :focus-visible, .notte :focus-visible, .site-footer :focus-visible, .hero-d :focus-visible { outline-color: #FFF; }
.pg-home .site-header { position: absolute; left: 0; right: 0; top: 0; background: transparent; border-bottom-color: rgba(255,255,255,.14); }
.pg-home .site-header .menu-mobile { background: var(--notte); }

/* Apertura della home */
.hero-d { position: relative; background: var(--notte); color: #FFF; overflow: hidden; isolation: isolate; }
.hero-bg, .hero-bg img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-bg { z-index: -2; }
.hero-d::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(90deg, rgba(12,28,51,.96) 0%, rgba(12,28,51,.86) 42%, rgba(12,28,51,.45) 100%),
              linear-gradient(180deg, rgba(12,28,51,.55) 0%, rgba(12,28,51,0) 30%, rgba(12,28,51,.75) 100%);
}
.hero-d-in { padding-top: 232px; padding-bottom: 56px; display: flex; flex-direction: column; gap: 24px; }
.hero-d .lead { color: rgba(255,255,255,.84); max-width: 600px; }
.eyebrow-l { display: flex; align-items: center; gap: 14px; color: var(--azzurro); font-size: 13px; font-weight: 600; letter-spacing: 1.6px; text-transform: uppercase; }
.eyebrow-l::before { content: ""; width: 40px; height: 1px; background: currentColor; }
.numeri { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; margin: 56px 0 0; padding-top: 28px; border-top: 1px solid rgba(255,255,255,.18); }
.numeri div { display: flex; align-items: baseline; gap: 14px; }
.numeri dt { font-size: 40px; font-weight: 500; letter-spacing: -1px; line-height: 1; }
.numeri dd { margin: 0; font-size: 15px; color: rgba(255,255,255,.72); }

/* Schede prodotto in riquadro */
.cards-box { gap: 28px; }
.cards-box .card { background: #FFF; border: 1px solid var(--linea); border-radius: 10px; overflow: hidden; padding-bottom: 26px; transition: box-shadow .3s ease, border-color .3s ease; }
.cards-box .card:hover { border-color: var(--bordo); box-shadow: 0 14px 32px rgba(12,28,51,.10); }
.cards-box .card .ph { border-radius: 0; height: 210px; }
.cards-box .card > span { margin-left: 24px; margin-right: 24px; }
.cards-box .card .num { margin-top: 10px; }
.cards-box .card .lk { margin-top: auto; padding-top: 6px; }

/* Fascia scura */
.notte { background: var(--notte); color: #FFF; }
.notte .lead { color: rgba(255,255,255,.78); font-size: 18px; }
.notte .btn-w { color: var(--notte); }
.notte .btn-w:hover { background: var(--blu-chiaro); color: var(--notte); }

/* Riquadro di invito al contatto */
.cta { background: var(--notte); }

/* Piè di pagina */
.site-footer { background: var(--notte); color: rgba(255,255,255,.72); border-top: 1px solid rgba(255,255,255,.12); }
.site-footer .footer-in { color: rgba(255,255,255,.72); }
.site-footer strong { color: #FFF; }
.site-footer .nl.muted, .site-footer .nl.muted:hover { color: rgba(255,255,255,.72); background-image: linear-gradient(#FFF, #FFF); }

@media (max-width: 960px) {
  .hero-d-in { padding-top: 136px; padding-bottom: 40px; gap: 18px; }
  .hero-d::after { background: linear-gradient(180deg, rgba(12,28,51,.90) 0%, rgba(12,28,51,.82) 100%); }
  .numeri { grid-template-columns: 1fr; gap: 16px; margin-top: 32px; padding-top: 22px; }
  .numeri dt { font-size: 32px; min-width: 96px; }
  .notte .g2 { gap: 36px; }
}
/* Pagine interne allineate alla home: apertura in blu notte */
.grid-bg {
  background-color: var(--notte); color: #FFF;
  background-image: linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px);
}
.grid-bg .eyebrow, .grid-bg .label {
  display: flex; align-items: center; gap: 14px; color: var(--azzurro);
  font-size: 13px; font-weight: 600; letter-spacing: 1.6px; text-transform: uppercase;
}
.grid-bg .eyebrow::before, .grid-bg .label::before { content: ""; width: 40px; height: 1px; background: currentColor; }
.grid-bg .lead, .grid-bg .lead-s, .grid-bg .muted { color: rgba(255,255,255,.80); }
.grid-bg .crumbs { color: rgba(255,255,255,.60); }
.grid-bg .crumbs [aria-current] { color: #FFF; }
.grid-bg .nl.muted, .grid-bg .nl.muted:hover { color: rgba(255,255,255,.72); background-image: linear-gradient(#FFF, #FFF); }
.grid-bg .btn { background: #FFF; color: var(--notte); font-weight: 600; }
.grid-bg .btn:hover { background: var(--blu-chiaro); color: var(--notte); }
.grid-bg .btn-o { background: transparent; color: #FFF; border-color: rgba(255,255,255,.40); }
.grid-bg .btn-o:hover { color: #FFF; border-color: #FFF; }
.grid-bg .big404 { color: var(--azzurro); }
.grid-bg :focus-visible { outline-color: #FFF; }
.pg-azienda .grid-bg + section { padding-top: 64px; }

/* Schede delle pagine interne in riquadro, come nella home */
.prod { background: #FFF; border: 1px solid var(--linea); border-radius: 10px; overflow: hidden; padding-bottom: 26px; transition: box-shadow .3s ease, border-color .3s ease; }
.prod:hover { border-color: var(--bordo); box-shadow: 0 14px 32px rgba(12,28,51,.10); }
.prod .ph, .prod.sm .ph { border-radius: 0; }
.prod > span { margin-left: 24px; margin-right: 24px; }
.prod .num { margin-top: 10px; }
/* Foto di prodotto su fondo bianco: si vedono intere, senza ritaglio */
img[src*="/tabacco-"] { object-fit: contain !important; background: #FFF; padding: 14px; }
.card:hover img[src*="/tabacco-"], .prod:hover img[src*="/tabacco-"] { transform: none; }
/* Foto storica: mostrata alla sua misura naturale, senza ingrandirla */
.foto-storica, .foto-storica img { height: auto !important; }
.fig-storica { max-width: 660px; margin: 0 auto; }
.notte .foto-storica { align-self: center; }
@media (max-width: 960px) { .foto-storica, .foto-storica img { height: auto !important; } }
/* Formati senza foto: riquadri di solo testo */
.fmt-solo-testo .fmt { background: #FFF; border: 1px solid var(--linea); border-radius: 8px; padding: 18px 20px; }
.prod:not(:has(.ph)) .num { margin-top: 24px; }
.prod:not(:has(.ph)) { align-self: start; }
@media print { .grid-bg { background: #FFF !important; color: #000 !important; } }
@media print {
  .hero-d, .notte, .site-header, .site-footer { background: #FFF !important; color: #000 !important; }
  .hero-bg, .hero-d::after { display: none; }
}
