/* ============================================================
   WIZARD ITALIA – style.css
   Restyling ispirato a Mattiussi Ecologia
   Design: minimal, flat, premium, ecological
   ============================================================ */

/* Fonts (Fraunces + DM Sans) are loaded via <link> tags in each page <head>
   for better performance (no render-blocking CSS font import). */

/* ── RESET & BASE ───────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* Palette Mattiussi-inspired — muted sage greens */
  --white:        #FFFFFF;
  --off-white:    #f1f3f1;
  --grey-l:       #e8ebe8;
  --grey:         #dce0dc;

  --green-deep:   #3d5a3f;
  --green-d:      #748474;
  --green:        #909d90;
  --green-l:      #afb7af;
  --green-xl:     #c8cfc8;

  --black:        #000000;
  --black-l:      #1a1a1a;
  --black-soft:   #262626;

  --text-1:  #1a1a1a;
  --text-2:  #4a4f4a;
  --text-3:  #748474;
  --border:  #dce0dc;

  /* Tipografia */
  --font-serif: 'Fraunces', Georgia, serif;
  --font-sans:  'DM Sans', system-ui, sans-serif;

  /* Spaziature — generose come Mattiussi */
  --section-v: clamp(5rem, 8vw, 10rem);
  --container: 1280px;
  --gutter:    clamp(1.25rem, 3vw, 3rem);

  /* Navbar */
  --navbar-h: 76px;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  font-size: clamp(0.9375rem, 0.85rem + 0.25vw, 1.125rem);
  line-height: 1.6;
  color: var(--text-1);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a   { color: inherit; text-decoration: none; }
ul  { list-style: none; }

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

/* ── UTILITY ────────────────────────────────────────────── */
.label {
  font-family: var(--font-sans);
  font-size: clamp(0.625rem, 0.6rem + 0.15vw, 0.75rem);
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--green-d);
  margin-bottom: clamp(1rem, 2vw, 1.5rem);
  display: inline-block;
  position: relative;
  padding-left: 1.2ch;
}
.label::before {
  content: '/';
  position: absolute;
  left: 0;
  color: var(--green-d);
  font-weight: 700;
}

.section-title {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: clamp(1.75rem, 1.2rem + 2.5vw, 3.25rem);
  line-height: 1.12;
  color: var(--black-l);
  margin-bottom: clamp(1rem, 2vw, 1.5rem);
  letter-spacing: -0.01em;
}
.section-title em {
  font-style: italic;
  color: var(--green-d);
}
.section-sub {
  font-size: clamp(0.9375rem, 0.85rem + 0.25vw, 1.125rem);
  color: var(--text-2);
  font-weight: 300;
  max-width: 540px;
  line-height: 1.75;
  margin-bottom: clamp(2.5rem, 4vw, 4rem);
}

/* ── BUTTONS — Mattiussi style: outlined, fill on hover ── */
.btn-primary {
  display: inline-block;
  background: transparent;
  color: var(--black-l);
  padding: clamp(0.875rem, 1vw, 1.125rem) clamp(1.5rem, 2vw, 2.5rem);
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: clamp(0.8125rem, 0.75rem + 0.15vw, 0.9375rem);
  border: 1px solid var(--black-l);
  cursor: pointer;
  transition: background-color .3s ease-out .05s, color .3s ease-out .05s, border-color .3s ease-out .05s;
  text-transform: uppercase;
  letter-spacing: .06em;
  text-align: center;
  line-height: 1.4;
}
.btn-primary:hover {
  background: var(--green-d);
  color: var(--white);
  border-color: var(--green-d);
}

.btn-outline {
  display: inline-block;
  background: transparent;
  color: var(--green-d);
  padding: clamp(0.875rem, 1vw, 1.125rem) clamp(1.5rem, 2vw, 2.5rem);
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: clamp(0.8125rem, 0.75rem + 0.15vw, 0.9375rem);
  border: 1px solid var(--green-d);
  cursor: pointer;
  transition: background-color .3s ease-out .05s, color .3s ease-out .05s;
  text-transform: uppercase;
  letter-spacing: .06em;
  text-align: center;
  line-height: 1.4;
}
.btn-outline:hover {
  background: var(--green-d);
  color: var(--white);
}

/* ── NAVBAR ─────────────────────────────────────────────── */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(0,0,0,.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  height: var(--navbar-h);
  display: flex;
  align-items: center;
  transition: background .3s ease-out;
}
.navbar.scrolled {
  background: rgba(0,0,0,.85);
}
.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}
.nav-logo {
  flex-shrink: 0;
  display: flex;
  align-items: center;
}
.nav-logo img {
  height: clamp(28px, 3vw, 40px);
  width: auto;
  filter: brightness(0) invert(1);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(1.5rem, 2.5vw, 2.5rem);
}
.nav-links a {
  font-size: clamp(0.75rem, 0.7rem + 0.15vw, 0.875rem);
  font-weight: 500;
  color: rgba(255,255,255,.6);
  transition: color .3s ease-out .05s;
  letter-spacing: .02em;
  text-transform: uppercase;
  position: relative;
}
.nav-links a::before {
  content: '/';
  position: absolute;
  left: -1.2ch;
  opacity: 0;
  color: var(--green-l);
  font-weight: 700;
  transition: opacity .3s ease-out .05s;
}
.nav-links a:hover::before,
.nav-links a.active::before { opacity: 1; }
.nav-links a:hover,
.nav-links a.active { color: var(--white); }

.nav-right {
  display: flex;
  align-items: center;
  gap: clamp(0.75rem, 1.5vw, 1.25rem);
}
.lang-toggle {
  font-size: 0.75rem;
  font-weight: 600;
  color: rgba(255,255,255,.5);
  background: transparent;
  border: 1px solid rgba(255,255,255,.25);
  padding: 0.375rem 0.75rem;
  cursor: pointer;
  letter-spacing: .06em;
  text-transform: uppercase;
  transition: color .3s ease-out .05s, border-color .3s ease-out .05s;
}
.lang-toggle:hover {
  color: var(--white);
  border-color: rgba(255,255,255,.6);
}

.nav-right .btn-primary {
  color: var(--white);
  border-color: rgba(255,255,255,.4);
  padding: 0.625rem 1.25rem;
  font-size: 0.6875rem;
}
.nav-right .btn-primary:hover {
  background: var(--green-d);
  border-color: var(--green-d);
}

.nav-burger {
  display: none;
  cursor: pointer;
  background: none;
  border: none;
  padding: 8px;
  flex-direction: column;
  gap: 6px;
  z-index: 110;
}
.nav-burger span {
  display: block;
  width: clamp(22px, 3vw, 28px);
  height: 1px;
  background: var(--white);
  transition: transform .3s ease-out, opacity .3s ease-out;
  transform-origin: center;
}
.nav-burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-burger.open span:nth-child(2) { opacity: 0; }
.nav-burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── HERO — Full viewport split ─────────────────────────── */
.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100vh;
  margin-top: 0;
}
.hero-content {
  padding: calc(var(--navbar-h) + clamp(3rem, 6vw, 6rem)) var(--gutter) clamp(3rem, 6vw, 6rem);
  padding-left: clamp(2rem, 5vw, 6rem);
  padding-right: clamp(2rem, 4vw, 4rem);
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: var(--white);
}
.hero-content > * {
  opacity: 0;
  transform: translateY(2rem);
  animation: fadeInUp .6s ease-out forwards;
}
.hero-content > :nth-child(1) { animation-delay: .2s; }
.hero-content > :nth-child(2) { animation-delay: .4s; }
.hero-content > :nth-child(3) { animation-delay: .6s; }
.hero-content > :nth-child(4) { animation-delay: .8s; }
.hero-content > :nth-child(5) { animation-delay: 1s; }

@keyframes fadeInUp {
  to { opacity: 1; transform: translateY(0); }
}

.hero-title {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: clamp(2.25rem, 2rem + 3vw, 4rem);
  line-height: 1.08;
  color: var(--black-l);
  margin-bottom: clamp(1.25rem, 2vw, 2rem);
  letter-spacing: -0.02em;
}
.hero-title em {
  font-style: italic;
  color: var(--green-d);
}
.hero-sub {
  font-size: clamp(0.9375rem, 0.85rem + 0.25vw, 1.125rem);
  color: var(--text-2);
  font-weight: 300;
  line-height: 1.8;
  max-width: 440px;
  margin-bottom: clamp(2rem, 3vw, 3rem);
}
.hero-btns {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(0.75rem, 1.5vw, 1rem);
  margin-bottom: clamp(2.5rem, 4vw, 4rem);
}
.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(0.5rem, 1vw, 0.75rem);
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  background: var(--off-white);
  border: 1px solid var(--grey);
  padding: 0.5rem 1rem;
  font-size: clamp(0.6875rem, 0.65rem + 0.1vw, 0.75rem);
  font-weight: 600;
  color: var(--green-deep);
  text-transform: uppercase;
  letter-spacing: .04em;
}

/* Hero visual — sage green panel like Mattiussi */
.hero-visual {
  background: var(--green-d);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(2rem, 4vw, 4rem);
}
.hero-img-wrapper {
  width: 100%;
  max-width: 420px;
  overflow: hidden;
  background: var(--white);
  position: relative;
  z-index: 2;
  opacity: 0;
  transform: translateY(2rem);
  animation: fadeInUp .7s .5s ease-out forwards;
}
.hero-img-wrapper img {
  width: 100%;
  height: 280px;
  object-fit: cover;
  transition: transform .6s ease-out;
}
.hero-img-wrapper:hover img { transform: scale(1.04); }

.hero-img-caption {
  padding: clamp(1rem, 2vw, 1.5rem);
  background: var(--white);
}
.hero-img-caption .prod-name {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: clamp(0.9375rem, 0.85rem + 0.2vw, 1.125rem);
  color: var(--black-l);
  margin-bottom: 0.25rem;
}
.hero-img-caption .prod-kpis {
  display: flex;
  border-top: 1px solid var(--grey);
  margin-top: 0.875rem;
}
.hero-img-caption .kpi {
  flex: 1;
  padding: 0.75rem 0;
  text-align: center;
  border-right: 1px solid var(--grey);
}
.hero-img-caption .kpi:last-child { border-right: none; }
.hero-img-caption .kpi-n {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: clamp(1.125rem, 1rem + 0.3vw, 1.375rem);
  color: var(--green-d);
}
.hero-img-caption .kpi-l {
  font-size: 0.625rem;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: .08em;
}

/* Decorative leaf — like Mattiussi's leaf SVG overlay */
.hero-deco-leaf {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 140%;
  height: 100%;
  opacity: .06;
  z-index: 1;
}

/* ── STATS BAR ──────────────────────────────────────────── */
.stats-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: var(--black-l);
}
.stat-item {
  padding: clamp(1.75rem, 3vw, 2.75rem) clamp(1.25rem, 2vw, 2.5rem);
  border-right: 1px solid rgba(255,255,255,.06);
  transition: background .3s ease-out;
}
.stat-item:last-child { border-right: none; }
.stat-item:hover { background: rgba(255,255,255,.03); }
.stat-n {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: clamp(1.75rem, 1.5rem + 1.5vw, 3rem);
  color: var(--white);
  line-height: 1;
  margin-bottom: 0.375rem;
}
.stat-l {
  font-size: clamp(0.625rem, 0.6rem + 0.1vw, 0.6875rem);
  color: rgba(255,255,255,.35);
  text-transform: uppercase;
  letter-spacing: .12em;
}

/* ── PRODUCTS SECTION ───────────────────────────────────── */
.products-section {
  padding: var(--section-v) 0;
  background: var(--white);
}
.products-section .container {
  padding: 0 var(--gutter);
}
.products-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}
.product-card {
  border: 1px solid var(--grey);
  overflow: hidden;
  background: var(--white);
  transition: border-color .3s ease-out .05s;
}
.product-card:hover {
  border-color: var(--green-l);
}
.product-card:first-child {
  border-right: none;
}
.product-card-img {
  width: 100%;
  height: clamp(200px, 20vw, 300px);
  object-fit: cover;
  background: var(--off-white);
  transition: transform .6s ease-out;
}
.product-card:hover .product-card-img { transform: scale(1.03); }
.product-card-body {
  padding: clamp(1.5rem, 3vw, 2.5rem);
}
.product-badge {
  display: inline-block;
  background: transparent;
  color: var(--green-d);
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  padding: 0.375rem 0.875rem;
  border: 1px solid var(--green-l);
  margin-bottom: clamp(0.875rem, 1.5vw, 1.25rem);
}
.product-title {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: clamp(1.25rem, 1rem + 0.5vw, 1.625rem);
  color: var(--black-l);
  margin-bottom: 0.625rem;
}
.product-desc {
  font-size: clamp(0.8125rem, 0.75rem + 0.15vw, 0.9375rem);
  color: var(--text-2);
  line-height: 1.75;
  margin-bottom: 1.25rem;
}
.product-features {
  margin-bottom: 1.5rem;
}
.product-features li {
  font-size: clamp(0.8125rem, 0.75rem + 0.1vw, 0.875rem);
  color: var(--text-2);
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--grey-l);
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
}
.product-features li:last-child { border-bottom: none; }
.feat-dot {
  width: 5px; height: 5px;
  flex-shrink: 0;
  background: var(--green-d);
  margin-top: 0.5rem;
}
.product-link {
  font-size: clamp(0.8125rem, 0.75rem + 0.1vw, 0.875rem);
  font-weight: 700;
  color: var(--green-d);
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  transition: gap .3s ease-out, color .3s ease-out;
  position: relative;
}
.product-link::before {
  content: '/';
  font-weight: 700;
  color: var(--green-d);
}
.product-link:hover { gap: 0.75rem; color: var(--black-l); }

/* ── HOW IT WORKS ───────────────────────────────────────── */
.how-section {
  padding: var(--section-v) 0;
  background: var(--off-white);
}
.how-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--grey);
}
.how-step {
  padding: clamp(2rem, 3vw, 3rem) clamp(1.5rem, 2vw, 2rem);
  border-right: 1px solid var(--grey);
  position: relative;
  transition: background .3s ease-out;
}
.how-step:hover { background: rgba(255,255,255,.6); }
.how-step:last-child { border-right: none; }
.step-number {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: clamp(2.5rem, 2rem + 2vw, 4rem);
  color: var(--green-xl);
  line-height: 1;
  margin-bottom: clamp(0.875rem, 1.5vw, 1.25rem);
  transition: color .3s ease-out;
}
.how-step:hover .step-number { color: var(--green-d); }
.step-title {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: clamp(0.9375rem, 0.85rem + 0.2vw, 1.125rem);
  color: var(--black-l);
  margin-bottom: 0.5rem;
}
.step-desc {
  font-size: clamp(0.8125rem, 0.75rem + 0.1vw, 0.875rem);
  color: var(--text-3);
  line-height: 1.75;
}

/* ── CASE HISTORY ───────────────────────────────────────── */
.case-section {
  padding: var(--section-v) 0;
  background: var(--white);
}
.case-section .container { padding: 0 var(--gutter); }
.case-card-img {
  width: 100%;
  height: auto;
  border-radius: 12px;
  object-fit: cover;
  max-height: 400px;
  grid-column: 1 / -1;
}
.case-card {
  background: var(--black-soft);
  padding: clamp(2rem, 4vw, 3.5rem);
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: clamp(1.5rem, 3vw, 3rem);
  align-items: center;
  position: relative;
  overflow: hidden;
}
.case-logo-box {
  background: var(--off-white);
  border: 1px solid var(--grey);
  padding: clamp(0.4rem, 0.8vw, 0.5rem);
  width: clamp(40px, 4.5vw, 52px);
  height: clamp(40px, 4.5vw, 52px);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.case-logo-box img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.case-title {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: clamp(1.125rem, 1rem + 0.5vw, 1.5rem);
  color: var(--white);
  margin-bottom: 0.75rem;
}
.case-text {
  font-size: clamp(0.8125rem, 0.75rem + 0.1vw, 0.875rem);
  color: rgba(255,255,255,.5);
  line-height: 1.8;
  max-width: 560px;
}
.case-quote {
  border-left: 2px solid rgba(255,255,255,.15);
  padding-left: 1.25rem;
  margin-top: 1rem;
}
.case-quote-text {
  font-size: clamp(0.75rem, 0.7rem + 0.1vw, 0.8125rem);
  color: rgba(255,255,255,.4);
  font-style: italic;
  line-height: 1.7;
}
.case-quote-author {
  font-size: 0.6875rem;
  color: rgba(255,255,255,.25);
  margin-top: 0.5rem;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.case-kpis {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-width: 120px;
}
.case-kpi { text-align: right; }
.case-kpi-n {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: clamp(1.5rem, 1.25rem + 1vw, 2.25rem);
  color: var(--white);
  line-height: 1;
}
.case-kpi-l {
  font-size: 0.625rem;
  color: rgba(255,255,255,.3);
  text-transform: uppercase;
  letter-spacing: .1em;
  margin-top: 0.25rem;
}
.case-more-link {
  text-align: center;
  margin-top: clamp(1.5rem, 3vw, 2.5rem);
}

/* ── SUSTAINABILITY ─────────────────────────────────────── */
.sost-section {
  padding: var(--section-v) 0;
  background: var(--off-white);
}
.sost-section .container { padding: 0 var(--gutter); }
.sost-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 4vw, 4rem);
  align-items: start;
}
.sost-items {
  display: flex;
  flex-direction: column;
  gap: clamp(1rem, 2vw, 1.75rem);
}
.sost-item {
  display: flex;
  gap: 1.125rem;
  align-items: flex-start;
  padding: clamp(0.75rem, 1.5vw, 1.25rem);
  transition: background .3s ease-out;
}
.sost-item:hover { background: rgba(255,255,255,.6); }
.sost-icon {
  width: clamp(2.5rem, 3vw, 3rem);
  height: clamp(2.5rem, 3vw, 3rem);
  background: var(--white);
  border: 1px solid var(--grey);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(1.125rem, 1rem + 0.3vw, 1.375rem);
  flex-shrink: 0;
  transition: border-color .3s ease-out;
}
.sost-item:hover .sost-icon { border-color: var(--green-d); }
.sost-item-title {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: clamp(0.875rem, 0.8rem + 0.15vw, 1rem);
  color: var(--black-l);
  margin-bottom: 0.25rem;
}
.sost-item-desc {
  font-size: clamp(0.8125rem, 0.75rem + 0.1vw, 0.875rem);
  color: var(--text-3);
  line-height: 1.7;
}
.sost-visual {
  background: var(--white);
  border: 1px solid var(--grey);
  padding: clamp(1.5rem, 3vw, 2.5rem);
  position: sticky;
  top: calc(var(--navbar-h) + 1.5rem);
}
.sost-vis-title {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: clamp(0.875rem, 0.8rem + 0.2vw, 1.0625rem);
  color: var(--black-l);
  margin-bottom: 1.5rem;
}
.impact-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--off-white);
  border: 1px solid var(--grey-l);
  padding: clamp(0.875rem, 1.5vw, 1.25rem) clamp(1rem, 1.5vw, 1.5rem);
  margin-bottom: 0.625rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.impact-label {
  font-size: clamp(0.6875rem, 0.65rem + 0.1vw, 0.75rem);
  color: var(--text-2);
  font-weight: 500;
}
.impact-before {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: clamp(1.125rem, 1rem + 0.3vw, 1.375rem);
  color: #8b4040;
}
.impact-arrow { font-size: 1.125rem; color: var(--text-3); }
.impact-after {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: clamp(1.125rem, 1rem + 0.3vw, 1.375rem);
  color: var(--green-d);
}
.impact-note {
  font-size: 0.6875rem;
  color: var(--text-3);
  text-align: center;
  margin-top: 0.5rem;
  line-height: 1.6;
}
.mat-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--grey-l);
}
.mat-tag {
  background: var(--off-white);
  border: 1px solid var(--grey);
  padding: 0.375rem 0.875rem;
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--green-deep);
  text-transform: uppercase;
  letter-spacing: .04em;
  transition: background .3s ease-out, border-color .3s ease-out;
}
.mat-tag:hover {
  background: var(--green-d);
  border-color: var(--green-d);
  color: var(--white);
}

/* ── SECTORS ────────────────────────────────────────────── */
.sectors-section {
  padding: var(--section-v) 0;
  background: var(--white);
}
.sectors-section .container { padding: 0 var(--gutter); }
.sectors-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
}
.sector-card {
  border: 1px solid var(--grey);
  border-right: none;
  padding: clamp(1.75rem, 3vw, 2.5rem) clamp(1.25rem, 2vw, 1.75rem);
  text-align: center;
  transition: background .3s ease-out;
  cursor: pointer;
}
.sector-card:last-child { border-right: 1px solid var(--grey); }
.sector-card:hover {
  background: var(--off-white);
}
.sector-icon {
  font-size: clamp(1.75rem, 2vw, 2.25rem);
  margin-bottom: clamp(0.875rem, 1.5vw, 1.25rem);
  transition: transform .3s ease-out .05s;
}
.sector-card:hover .sector-icon { transform: scale(1.15); }
.sector-title {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: clamp(0.875rem, 0.8rem + 0.15vw, 1rem);
  color: var(--black-l);
  margin-bottom: 0.5rem;
  transition: color .3s ease-out;
}
.sector-card:hover .sector-title { color: var(--green-d); }
.sector-desc {
  font-size: clamp(0.75rem, 0.7rem + 0.1vw, 0.8125rem);
  color: var(--text-3);
  line-height: 1.65;
}

/* ── FINAL CTA BANNER ───────────────────────────────────── */
.cta-banner {
  background: var(--green-d);
  padding: clamp(3.5rem, 6vw, 6rem) var(--gutter);
  text-align: center;
  position: relative;
}
.cta-banner h2 {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: clamp(1.5rem, 1.25rem + 1.5vw, 2.75rem);
  color: var(--white);
  margin-bottom: 0.875rem;
}
.cta-banner p {
  font-size: clamp(0.875rem, 0.8rem + 0.15vw, 1rem);
  color: rgba(255,255,255,.6);
  font-weight: 300;
  margin-bottom: clamp(1.5rem, 3vw, 2.5rem);
  line-height: 1.7;
}
.btn-white {
  display: inline-block;
  background: transparent;
  color: var(--white);
  padding: clamp(0.875rem, 1vw, 1.125rem) clamp(1.5rem, 2vw, 2.5rem);
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: clamp(0.8125rem, 0.75rem + 0.15vw, 0.9375rem);
  border: 1px solid rgba(255,255,255,.4);
  text-transform: uppercase;
  letter-spacing: .06em;
  transition: background .3s ease-out .05s, color .3s ease-out .05s, border-color .3s ease-out .05s;
}
.btn-white:hover {
  background: var(--white);
  color: var(--green-d);
  border-color: var(--white);
}

/* ── FOOTER — Dark, spacious like Mattiussi ──────────────── */
.footer {
  background: var(--black-soft);
  padding: clamp(3.5rem, 7vw, 8rem) var(--gutter) clamp(1.5rem, 3vw, 2.5rem);
}
.footer-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: clamp(2rem, 4vw, 4rem);
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
  padding-bottom: clamp(2rem, 4vw, 3.5rem);
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.footer-logo {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: clamp(1.25rem, 1rem + 0.5vw, 1.5rem);
  color: var(--white);
  margin-bottom: clamp(0.75rem, 1.5vw, 1.25rem);
  display: flex;
  align-items: center;
  gap: 0.625rem;
}
.footer-logo img {
  height: clamp(24px, 2.5vw, 32px);
  width: auto;
  filter: brightness(0) invert(1);
}
.footer-tagline {
  font-size: clamp(0.8125rem, 0.75rem + 0.1vw, 0.875rem);
  color: rgba(255,255,255,.3);
  line-height: 1.8;
  max-width: 280px;
  margin-bottom: 1.5rem;
}
.footer-contact {
  font-size: clamp(0.75rem, 0.7rem + 0.1vw, 0.8125rem);
  color: rgba(255,255,255,.35);
  line-height: 2;
}
.footer-contact a {
  color: rgba(255,255,255,.45);
  transition: color .3s ease-out;
}
.footer-contact a:hover { color: var(--white); }
.footer-col-title {
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: rgba(255,255,255,.2);
  margin-bottom: clamp(0.875rem, 1.5vw, 1.25rem);
}
.footer-links-list {
  display: flex;
  flex-direction: column;
  gap: clamp(0.5rem, 1vw, 0.75rem);
}
.footer-links-list a {
  font-size: clamp(0.8125rem, 0.75rem + 0.1vw, 0.875rem);
  color: rgba(255,255,255,.35);
  transition: color .3s ease-out, font-weight .15s linear .05s;
  position: relative;
  display: inline-block;
}
.footer-links-list a::before {
  content: '/';
  position: absolute;
  left: -1.2ch;
  opacity: 0;
  color: var(--green-l);
  font-weight: 700;
  transition: opacity .3s ease-out;
}
.footer-links-list a:hover {
  color: var(--white);
  font-weight: 700;
}
.footer-links-list a:hover::before { opacity: 1; }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.footer-copy {
  font-size: 0.6875rem;
  color: rgba(255,255,255,.15);
}
.footer-legal {
  display: flex;
  gap: 1.5rem;
}
.footer-legal a {
  font-size: 0.6875rem;
  color: rgba(255,255,255,.15);
  transition: color .3s ease-out;
}
.footer-legal a:hover { color: rgba(255,255,255,.5); }

/* ── CONTATTI SECTION ───────────────────────────────────── */
.contatti-section {
  padding: var(--section-v) 0;
  background: var(--off-white);
}
.contatti-section .container { padding: 0 var(--gutter); }
.contatti-grid {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: clamp(2rem, 5vw, 5rem);
  align-items: start;
}
.ci-cards {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}
.ci-card {
  background: var(--white);
  border: 1px solid var(--grey);
  padding: clamp(0.75rem, 1.5vw, 1.125rem) clamp(1rem, 1.5vw, 1.25rem);
  transition: border-color .3s ease-out;
}
.ci-card:hover {
  border-color: var(--green-d);
}
.ci-label {
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 0.25rem;
}
.ci-value {
  font-size: clamp(0.8125rem, 0.75rem + 0.15vw, 0.9375rem);
  color: var(--text-1);
  font-weight: 500;
}
.ci-value a {
  color: var(--green-d);
  transition: color .3s ease-out;
}
.ci-value a:hover { color: var(--black-l); }

/* Form */
.contatti-form-wrapper {
  background: var(--white);
  border: 1px solid var(--grey);
  padding: clamp(1.5rem, 3vw, 2.5rem);
}
.form-group {
  margin-bottom: clamp(0.875rem, 1.5vw, 1.125rem);
}
.form-group label {
  display: block;
  font-size: 0.6875rem;
  font-weight: 700;
  color: var(--text-2);
  margin-bottom: 0.375rem;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  background: var(--white);
  border: 1px solid var(--grey);
  padding: clamp(0.625rem, 1vw, 0.875rem) clamp(0.75rem, 1vw, 1rem);
  font-family: var(--font-sans);
  font-size: clamp(0.8125rem, 0.75rem + 0.1vw, 0.9375rem);
  color: var(--text-1);
  transition: border-color .3s ease-out;
  appearance: none;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--green-d);
}
.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--green-l);
}
.form-group textarea { resize: vertical; min-height: 90px; }
.form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0.875rem; }
.form-check { display: flex; align-items: flex-start; gap: 0.625rem; }
.check-label {
  display: flex !important;
  align-items: flex-start;
  gap: 0.625rem;
  font-size: 0.75rem !important;
  font-weight: 400 !important;
  color: var(--text-3) !important;
  cursor: pointer;
  line-height: 1.5;
  text-transform: none !important;
}
.check-label input[type="checkbox"] {
  width: 1rem; height: 1rem;
  flex-shrink: 0; margin-top: 0.125rem;
  cursor: pointer;
  accent-color: var(--green-d);
}
.check-label a { color: var(--green-d); text-decoration: underline; }
.form-feedback {
  margin-top: 0.875rem;
  font-size: 0.8125rem;
  padding: 0.75rem 1rem;
  display: none;
}
.form-feedback.success {
  display: block;
  background: var(--off-white);
  color: var(--green-deep);
  border: 1px solid var(--green-l);
}
.form-feedback.error {
  display: block;
  background: #fef2f2;
  color: #8b4040;
  border: 1px solid #e8b4b4;
}

/* ── MOBILE MENU — Full screen overlay like Mattiussi ───── */
.mobile-menu {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 99;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: var(--green-d);
  padding: clamp(5rem, 12vw, 8rem) var(--gutter);
  transform: translateY(-100%);
  transition: transform .5s cubic-bezier(.4,0,.2,1);
  pointer-events: none;
}
.mobile-menu.open {
  transform: translateY(0);
  pointer-events: auto;
}
.mobile-menu a {
  font-family: var(--font-sans);
  font-size: clamp(1.25rem, 1rem + 1vw, 1.75rem);
  font-weight: 400;
  color: rgba(255,255,255,.7);
  padding: clamp(0.75rem, 1.5vw, 1rem) 0;
  border-bottom: 1px solid rgba(255,255,255,.08);
  transition: color .3s ease-out, font-weight .15s linear;
  text-transform: uppercase;
  letter-spacing: .04em;
  display: block;
  position: relative;
}
.mobile-menu a:last-child { border-bottom: none; }
.mobile-menu a::before {
  content: '/';
  position: absolute;
  left: -1.5ch;
  opacity: 0;
  color: var(--white);
  font-weight: 700;
  transition: opacity .3s ease-out;
}
.mobile-menu a:hover {
  color: var(--white);
  font-weight: 700;
}
.mobile-menu a:hover::before { opacity: 1; }

/* Mobile overlay — not needed with fullscreen menu */
.mobile-overlay {
  display: none;
}

/* ── FADE-IN ANIMATIONS ─────────────────────────────────── */
.fade-in {
  opacity: 0;
  transform: translateY(2rem);
  transition: opacity .6s ease-out, transform .6s ease-out;
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered children */
.fade-in.visible .product-card,
.fade-in.visible .how-step,
.fade-in.visible .sector-card,
.fade-in.visible .sost-item {
  opacity: 0;
  transform: translateY(1.5rem);
  animation: fadeInUp .5s ease-out forwards;
}
.fade-in.visible :nth-child(1) { animation-delay: 0s; }
.fade-in.visible :nth-child(2) { animation-delay: .15s; }
.fade-in.visible :nth-child(3) { animation-delay: .3s; }
.fade-in.visible :nth-child(4) { animation-delay: .45s; }

/* ── RESPONSIVE ─────────────────────────────────────────── */
@media (max-width: 1024px) {
  .nav-links { gap: 1.25rem; }
}

@media (max-width: 860px) {
  /* Nav */
  .nav-links, .nav-right .lang-toggle, .nav-right .btn-primary { display: none; }
  .nav-burger { display: flex; }

  /* Hero */
  .hero { grid-template-columns: 1fr; min-height: auto; }
  .hero-content {
    padding: calc(var(--navbar-h) + 3rem) var(--gutter) 3rem;
    min-height: 60vh;
  }
  .hero-visual { min-height: 50vh; }

  /* Stats */
  .stats-bar { grid-template-columns: repeat(2, 1fr); }
  .stat-item:nth-child(2) { border-right: none; }

  /* Products */
  .products-grid { grid-template-columns: 1fr; }
  .product-card:first-child { border-right: 1px solid var(--grey); }

  /* How */
  .how-grid { grid-template-columns: repeat(2, 1fr); }
  .how-step:nth-child(2) { border-right: none; }

  /* Case */
  .case-card {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  .case-logo-box { justify-self: start; }
  .case-kpis {
    flex-direction: row;
    gap: 1.5rem;
    flex-wrap: wrap;
  }
  .case-kpi {
    text-align: center;
    flex: 1;
    min-width: 70px;
  }

  /* Sustainability */
  .sost-grid { grid-template-columns: 1fr; }
  .sost-visual { position: static; }

  /* Sectors */
  .sectors-grid { grid-template-columns: repeat(2, 1fr); }
  .sector-card:nth-child(2) { border-right: 1px solid var(--grey); }
  .sector-card:nth-child(3) { border-top: none; }
  .sector-card:nth-child(4) { border-top: none; }

  /* Footer */
  .footer-top { grid-template-columns: 1fr 1fr; }

  /* Contatti */
  .contatti-grid { grid-template-columns: 1fr; }
  .form-row-2 { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  :root { --navbar-h: 64px; }

  /* Hero */
  .hero-content { min-height: 50vh; padding-left: var(--gutter); }
  .hero-visual { min-height: 40vh; padding: 1.5rem; }
  .hero-img-wrapper { max-width: 100%; }
  .hero-btns { flex-direction: column; }
  .hero-btns .btn-primary,
  .hero-btns .btn-outline { width: 100%; text-align: center; }

  /* Stats */
  .stats-bar { grid-template-columns: 1fr 1fr; }

  /* How */
  .how-grid { grid-template-columns: 1fr; }
  .how-step {
    border-right: none;
    border-bottom: 1px solid var(--grey);
  }
  .how-step:last-child { border-bottom: none; }

  /* Sectors */
  .sectors-grid { grid-template-columns: 1fr; }
  .sector-card { border-right: 1px solid var(--grey) !important; border-bottom: none; }
  .sector-card:first-child { border-bottom: none; }
  .sector-card:last-child { border-bottom: 1px solid var(--grey); }

  /* Case */
  .case-kpi { flex: 0 0 calc(33.33% - 1rem); }

  /* Footer */
  .footer-top { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 380px) {
  .hero-title { font-size: 1.75rem; }
  .case-kpi { flex: 0 0 calc(50% - 0.75rem); }
  .case-card { padding: 1.25rem; }
}

/* ── LEGAL PAGES (Cookie Policy, Privacy Policy) ───────── */
.legal-section {
  padding: clamp(2.5rem, 4vw, 4rem) var(--gutter) clamp(3rem, 5vw, 5rem);
}
.legal-content {
  max-width: 760px;
}
.legal-content h2 {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: clamp(1.0625rem, 1rem + 0.2vw, 1.25rem);
  color: var(--black-l);
  margin-top: 2.25rem;
  margin-bottom: 0.625rem;
}
.legal-content h3 {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: clamp(0.875rem, 0.8rem + 0.12vw, 0.9375rem);
  color: var(--text-1);
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}
.legal-content p,
.legal-content li {
  font-size: clamp(0.8125rem, 0.75rem + 0.12vw, 0.875rem);
  color: var(--text-2);
  line-height: 1.75;
}
.legal-content ul {
  padding-left: 1.25rem;
  margin-bottom: 0.75rem;
}
.legal-content ul ul {
  margin-top: 0.375rem;
}
.legal-content li {
  margin-bottom: 0.25rem;
}
.legal-content a {
  color: var(--green-d);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.legal-content a:hover {
  color: var(--green-deep);
}
.legal-content code {
  font-size: 0.8125em;
  background: var(--off-white);
  padding: 0.125em 0.375em;
  border: 1px solid var(--grey);
}
.legal-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0 1.5rem;
  font-size: clamp(0.75rem, 0.7rem + 0.1vw, 0.8125rem);
}
.legal-table th {
  background: var(--off-white);
  font-weight: 600;
  color: var(--text-1);
  text-align: left;
  padding: 0.625rem 0.75rem;
  border: 1px solid var(--grey);
}
.legal-table td {
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--grey);
  color: var(--text-2);
  vertical-align: top;
}
@media (max-width: 600px) {
  .legal-table {
    font-size: 0.6875rem;
  }
  .legal-table th,
  .legal-table td {
    padding: 0.4375rem 0.5rem;
  }
}

/* ── PREFERS REDUCED MOTION ─────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .fade-in { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}
