/* =========================================================
   MAVI S.p.A. — foglio di stile del sito
   Nessuna risorsa esterna: font e immagini serviti dal server.
   ========================================================= */

@font-face { font-family: "Montserrat"; font-weight: 700; font-display: swap; src: url("../fonts/montserrat-700.woff") format("woff"); }
@font-face { font-family: "Montserrat"; font-weight: 800; font-display: swap; src: url("../fonts/montserrat-800.woff") format("woff"); }
@font-face { font-family: "DM Sans"; font-weight: 400; font-display: swap; src: url("../fonts/dmsans-400.woff") format("woff"); }
@font-face { font-family: "DM Sans"; font-weight: 600; font-display: swap; src: url("../fonts/dmsans-600.woff") format("woff"); }

:root {
  --ink: #14181d;          /* antracite (header, footer) */
  --ink-2: #1d232a;
  --steel: #5b6672;
  --line: #e3e7eb;
  --paper: #ffffff;
  --mist: #f3f5f7;
  --blue: #178fd6;         /* blu del marchio MAVI */
  --blue-dark: #0f6fa8;
  --red: #d20a1e;          /* rosso Renault Trucks, usato con parsimonia */
  --text: #1e252c;
  --muted: #5b6672;

  --radius: 14px;
  --wrap: 1180px;
  --head-h: 76px;

  --f-head: "Montserrat", "Segoe UI", system-ui, sans-serif;
  --f-body: "DM Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--f-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--paper);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue-dark); text-underline-offset: 3px; }
a:hover { color: var(--blue); }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3 { font-family: var(--f-head); font-weight: 800; line-height: 1.15; letter-spacing: -0.01em; margin: 0 0 .6em; color: var(--ink); }
h1 { font-size: clamp(2rem, 4.6vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); }
h3 { font-size: 1.15rem; font-weight: 700; }
p { margin: 0 0 1em; }

.wrap { width: min(var(--wrap), 100% - 2.5rem); margin-inline: auto; }
.skip { position: absolute; left: -9999px; top: 0; background: var(--blue); color: #fff; padding: .6rem 1rem; z-index: 100; }
.skip:focus { left: 1rem; top: 1rem; }

.eyebrow {
  display: inline-flex; align-items: center; gap: .6rem;
  font-family: var(--f-head); font-weight: 700; font-size: .78rem;
  letter-spacing: .14em; text-transform: uppercase; color: var(--blue);
  margin-bottom: 1rem;
}
.eyebrow::before { content: ""; width: 28px; height: 3px; border-radius: 3px; background: currentColor; }

/* ---------- Pulsanti ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .55rem;
  font-family: var(--f-head); font-weight: 700; font-size: .95rem;
  padding: .9rem 1.45rem; border-radius: 999px; text-decoration: none;
  border: 2px solid transparent; transition: background .2s, color .2s, border-color .2s, transform .2s;
}
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-dark); color: #fff; transform: translateY(-1px); }
.btn-ghost { border-color: rgba(255,255,255,.55); color: #fff; }
.btn-ghost:hover { background: #fff; color: var(--ink); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: var(--ink-2); color: #fff; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(20, 24, 29, .96);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.head-row { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; height: var(--head-h); }
.brand img { width: 210px; }
.nav ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: .25rem; }
.nav a {
  display: inline-flex; align-items: center; gap: .3rem;
  color: #d9dee3; text-decoration: none; font-weight: 600; font-size: .97rem;
  padding: .55rem .85rem; border-radius: 8px;
}
.nav a:hover { color: #fff; background: rgba(255,255,255,.07); }
.nav a[aria-current="page"] { color: #fff; box-shadow: inset 0 -3px 0 var(--blue); border-radius: 0; }
.nav .ext svg { width: 12px; height: 12px; opacity: .6; }
.nav .nav-phone { margin-left: .6rem; background: var(--blue); color: #fff; border-radius: 999px; padding: .55rem 1.1rem; }
.nav .nav-phone:hover { background: var(--blue-dark); }
.nav .nav-phone svg { width: 16px; height: 16px; }

.menu-toggle {
  display: none; background: none; border: 1px solid rgba(255,255,255,.25); color: #fff;
  border-radius: 10px; width: 46px; height: 42px; cursor: pointer; padding: 0;
}
.menu-toggle span, .menu-toggle span::before, .menu-toggle span::after {
  display: block; width: 20px; height: 2px; background: currentColor; margin: 0 auto; position: relative; transition: transform .2s, background .2s;
}
.menu-toggle span::before, .menu-toggle span::after { content: ""; position: absolute; left: 0; }
.menu-toggle span::before { top: -6px; }
.menu-toggle span::after { top: 6px; }
.menu-toggle[aria-expanded="true"] span { background: transparent; }
.menu-toggle[aria-expanded="true"] span::before { transform: translateY(6px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span::after { transform: translateY(-6px) rotate(-45deg); }

/* ---------- Hero home ---------- */
.hero {
  position: relative; color: #fff; overflow: hidden;
  background: var(--ink);
  min-height: min(78vh, 680px);
  display: flex; align-items: center;
}
.hero picture, .hero picture img { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero picture img { object-fit: cover; object-position: 60% 40%; }
.hero::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(14,17,21,.92) 0%, rgba(14,17,21,.72) 38%, rgba(14,17,21,.15) 75%),
    linear-gradient(0deg, rgba(14,17,21,.55), transparent 40%);
}
.hero .wrap { position: relative; z-index: 1; padding-block: 5rem; }
.hero-text { max-width: 620px; }
.hero h1 { color: #fff; }
.hero p { color: #d5dbe1; font-size: 1.15rem; max-width: 560px; }
.hero .eyebrow { color: #6cc0f2; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.8rem; }

/* ---------- Banda numeri ---------- */
.facts { background: var(--ink-2); color: #fff; }
.facts ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); }
.facts li { padding: 1.8rem 1.5rem; border-left: 1px solid rgba(255,255,255,.08); }
.facts li:first-child { border-left: 0; padding-left: 0; }
.facts strong { display: block; font-family: var(--f-head); font-weight: 800; font-size: 1.7rem; line-height: 1.1; }
.facts span { color: #a9b3bd; font-size: .95rem; }

/* ---------- Sezioni ---------- */
.section { padding-block: clamp(3.5rem, 8vw, 6rem); }
.section-alt { background: var(--mist); }
.section-head { max-width: 680px; margin-bottom: 2.6rem; }
.section-head p { color: var(--muted); font-size: 1.1rem; }

.cards { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.7rem; display: flex; flex-direction: column; gap: .4rem;
  transition: border-color .2s, box-shadow .2s, transform .2s;
}
.card:hover { border-color: #cbd5de; box-shadow: 0 14px 34px -18px rgba(20,24,29,.35); transform: translateY(-2px); }
.card .icon {
  width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center;
  background: rgba(23,143,214,.1); color: var(--blue); margin-bottom: .6rem;
}
.card .icon svg { width: 24px; height: 24px; }
.card h3 { margin: 0; }
.card p { color: var(--muted); margin: 0; font-size: .98rem; }
.card .card-link { margin-top: auto; padding-top: .8rem; font-weight: 600; text-decoration: none; word-break: break-word; }
.card .card-link:hover { text-decoration: underline; }

/* Settori con foto */
.sectors { display: grid; gap: 1.25rem; grid-template-columns: repeat(4, 1fr); }
.sector { position: relative; border-radius: var(--radius); overflow: hidden; aspect-ratio: 4 / 4.6; background: var(--ink); margin: 0; }
.sector img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.sector:hover img { transform: scale(1.04); }
.sector figcaption {
  position: absolute; inset: auto 0 0 0; padding: 2.4rem 1.1rem 1rem;
  background: linear-gradient(0deg, rgba(14,17,21,.9), transparent);
  color: #fff; font-family: var(--f-head); font-weight: 700; font-size: 1.02rem;
}

/* Split testo/immagine */
.split { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.split-media { border-radius: var(--radius); overflow: hidden; box-shadow: 0 30px 60px -35px rgba(20,24,29,.6); }
.split-media img { width: 100%; }
.checks { list-style: none; padding: 0; margin: 1.4rem 0 1.8rem; display: grid; gap: .7rem; }
.checks li { display: flex; gap: .7rem; align-items: flex-start; }
.checks svg { width: 22px; height: 22px; flex: none; color: var(--blue); margin-top: .15rem; }

/* Banda CTA */
.cta { background: var(--ink); color: #fff; position: relative; overflow: hidden; }
.cta::before {
  content: ""; position: absolute; left: -10%; right: -10%; bottom: -120px; height: 200px;
  background: radial-gradient(ellipse at center, rgba(23,143,214,.55), transparent 65%);
}
.cta .wrap { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 2rem; flex-wrap: wrap; padding-block: 3.6rem; }
.cta h2 { color: #fff; margin: 0 0 .3rem; }
.cta p { color: #b8c2cc; margin: 0; }
.cta-actions { display: flex; gap: .8rem; flex-wrap: wrap; }

/* ---------- Testata pagine interne ---------- */
.page-head { background: var(--ink); color: #fff; position: relative; overflow: hidden; }
.page-head::after {
  content: ""; position: absolute; left: 50%; bottom: -70px; width: 140%; height: 120px; transform: translateX(-50%);
  background: radial-gradient(ellipse at center, rgba(23,143,214,.6), transparent 62%);
}
.page-head .wrap { position: relative; z-index: 1; padding-block: clamp(3rem, 7vw, 4.8rem); }
.page-head h1 { color: #fff; margin-bottom: .3em; }
.page-head p { color: #b8c2cc; max-width: 640px; font-size: 1.12rem; margin: 0; }
.page-head .eyebrow { color: #6cc0f2; }

/* Testo lungo */
.prose { max-width: 720px; }
.prose p { font-size: 1.08rem; }
.prose strong { color: var(--ink); }
.lead { font-size: 1.25rem !important; color: var(--ink); }

/* Timeline storia */
.timeline { list-style: none; margin: 0; padding: 0; position: relative; display: grid; gap: 1.8rem; }
.timeline::before { content: ""; position: absolute; left: 11px; top: 6px; bottom: 6px; width: 2px; background: var(--line); }
.timeline li { position: relative; padding-left: 3rem; }
.timeline li::before {
  content: ""; position: absolute; left: 3px; top: 6px; width: 18px; height: 18px; border-radius: 50%;
  background: var(--paper); border: 4px solid var(--blue);
}
.timeline .year { font-family: var(--f-head); font-weight: 800; font-size: 1.3rem; color: var(--ink); display: block; line-height: 1.2; }
.timeline p { margin: .25rem 0 0; color: var(--muted); }

.quote {
  margin: 0; padding: 2rem 2.2rem; border-radius: var(--radius); background: var(--ink); color: #fff;
  font-family: var(--f-head); font-weight: 700; font-size: clamp(1.25rem, 2.4vw, 1.6rem); line-height: 1.35;
  border-left: 6px solid var(--blue);
}
.quote footer { font-family: var(--f-body); font-weight: 400; font-size: 1rem; color: #a9b3bd; margin-top: .8rem; }

/* Contatti */
.contact-grid { display: grid; grid-template-columns: 1fr 1.6fr; gap: 2rem; align-items: start; }
.contact-main { background: var(--ink); color: #fff; border-radius: var(--radius); padding: 2rem; display: grid; gap: 1.4rem; }
.contact-main h2 { color: #fff; font-size: 1.5rem; margin: 0; }
.contact-item { display: flex; gap: .9rem; align-items: flex-start; }
.contact-item .icon { width: 42px; height: 42px; border-radius: 10px; background: rgba(23,143,214,.18); color: #6cc0f2; display: grid; place-items: center; flex: none; }
.contact-item .icon svg { width: 20px; height: 20px; }
.contact-item small { display: block; color: #93a0ad; font-size: .82rem; text-transform: uppercase; letter-spacing: .08em; font-weight: 600; }
.contact-item a, .contact-item span { color: #fff; text-decoration: none; font-weight: 600; word-break: break-word; }
.contact-item a:hover { color: #6cc0f2; text-decoration: underline; }
.contact-main .btn { justify-self: start; }

/* Segnaposto */
.notice {
  border: 1px dashed #b9c4ce; background: var(--mist); border-radius: var(--radius);
  padding: 1.6rem 1.8rem; color: var(--muted); max-width: 720px;
}
.todo { background: #fff3c4; color: #6b5200; padding: 0 .3em; border-radius: 4px; }

/* ---------- Footer ---------- */
.site-footer { background: #0f1216; color: #a9b3bd; font-size: .95rem; }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 2.5rem; padding-block: 3.5rem 2.5rem; }
.site-footer h3 { color: #fff; font-size: .82rem; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 1rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; }
.site-footer a { color: #d5dbe1; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.foot-brand img { width: 190px; margin-bottom: 1rem; }
.foot-brand address { font-style: normal; line-height: 1.7; }
.social { display: flex; gap: .6rem; margin-top: 1.2rem; }
.social a { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: rgba(255,255,255,.07); }
.social a:hover { background: var(--blue); }
.social svg { width: 18px; height: 18px; color: #fff; }
.foot-legal { border-top: 1px solid rgba(255,255,255,.08); padding-block: 1.4rem; font-size: .85rem; color: #7d8894; display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .sectors { grid-template-columns: repeat(2, 1fr); }
  .foot-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 960px) {
  .menu-toggle { display: block; }
  .nav {
    position: absolute; left: 0; right: 0; top: var(--head-h);
    background: var(--ink); border-bottom: 1px solid rgba(255,255,255,.08);
    display: none; padding: .8rem 1.25rem 1.4rem;
  }
  .nav.open { display: block; }
  .nav ul { flex-direction: column; align-items: stretch; gap: .1rem; }
  .nav a { padding: .85rem .6rem; font-size: 1.05rem; }
  .nav a[aria-current="page"] { box-shadow: inset 3px 0 0 var(--blue); }
  .nav .nav-phone { margin: .8rem 0 0; justify-content: center; }
  .split, .contact-grid { grid-template-columns: 1fr; }
  .split-media { order: -1; }
}
@media (max-width: 640px) {
  :root { --head-h: 66px; }
  .brand img { width: 170px; }
  .hero { min-height: 560px; }
  .hero::after { background: linear-gradient(0deg, rgba(14,17,21,.95) 25%, rgba(14,17,21,.5) 65%, rgba(14,17,21,.2)); }
  .hero .wrap { padding-block: 3rem; align-self: flex-end; }
  .facts ul { grid-template-columns: 1fr; }
  .facts li { border-left: 0; border-top: 1px solid rgba(255,255,255,.08); padding: 1.2rem 0; }
  .facts li:first-child { border-top: 0; }
  .sectors { gap: .8rem; }
  .foot-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}
@media print {
  .site-header, .site-footer, .cta, .menu-toggle { display: none; }
  .page-head { background: none; color: #000; }
  .page-head h1 { color: #000; }
}
.quote + .prose { margin-top: 1.6rem; }
