/* ============================================================
   M3 COLOR TOKENS — Light Theme
   Riferimento: design-system-m3.md §9
   ============================================================ */
:root {
  --md-sys-color-primary:                  #1a9dd0;
  --md-sys-color-primary-text:             #11637c; /* Variante scura per testo piccolo su bianco (≥4.5:1) */
  --md-sys-color-on-primary:               #FFFFFF;
  --md-sys-color-primary-container:        #d9eaed;
  --md-sys-color-on-primary-container:     #0a3a49;
  --md-sys-color-primary-accent:           #b3cd3b; /* Lime decorativo, NON per testo su sfondo chiaro */

  --md-sys-color-secondary:                #747f73;
  --md-sys-color-on-secondary:             #f0f9ef;
  --md-sys-color-secondary-container:      #f6fff5;
  --md-sys-color-on-secondary-container:   #253f23;

  --md-sys-color-tertiary:                 #b3cd3b;
  --md-sys-color-on-tertiary:              #fdffee;
  --md-sys-color-tertiary-container:       #f8ffcc;
  --md-sys-color-on-tertiary-container:    #282d0e;

  --md-sys-color-error:                    #BA1A1A;
  --md-sys-color-on-error:                 #FFFFFF;
  --md-sys-color-error-container:          #FFDAD6;
  --md-sys-color-on-error-container:       #410002;

  --md-sys-color-background:               #ffffff;
  --md-sys-color-on-background:            #00303f;
  --md-sys-color-surface:                  #F8F9FF;
  --md-sys-color-on-surface:               #063f47;
  --md-sys-color-surface-variant:          #DFE2EB;
  --md-sys-color-on-surface-variant:       #43474E;
  --md-sys-color-surface-container-lowest: #FFFFFF;
  --md-sys-color-surface-container-low:    #e7f9f9;
  --md-sys-color-surface-container:        #ECEFF5;
  --md-sys-color-surface-container-high:   #ffffff;
  --md-sys-color-surface-container-highest:#ffffff;
  --md-sys-color-inverse-surface:          #2E3135;
  --md-sys-color-inverse-on-surface:       #EFF0F7;
  --md-sys-color-inverse-primary:          #A8C8FF;
  --md-sys-color-outline:                  #73777F;
  --md-sys-color-outline-variant:          #C3C7CF;
  --md-sys-color-scrim:                    #000000;

  /* Shape */
  --shape-xs:   4px;
  --shape-sm:   8px;
  --shape-md:   12px;
  --shape-lg:   16px;
  --shape-xl:   28px;
  --shape-full: 100px;

  /* Spacing (multipli di 4) */
  --sp-1:  4px;
  --sp-2:  8px;
  --sp-3:  12px;
  --sp-4:  16px;
  --sp-5:  20px;
  --sp-6:  24px;
  --sp-8:  32px;
  --sp-10: 40px;
  --sp-12: 48px;
  --sp-16: 64px;
  --sp-20: 80px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Ubuntu', sans-serif;
  background-color: var(--md-sys-color-background);
  color: var(--md-sys-color-on-background);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
ul, ol { list-style: none; }
a { text-decoration: none; }

/* ============================================================
   ACCESSIBILITY — Focus visibile keyboard
   ============================================================ */
:focus-visible {
  outline: 3px solid var(--md-sys-color-primary);
  outline-offset: 3px;
  border-radius: 4px;
}
.btn:focus-visible {
  outline-offset: 4px;
}
/* Skip link (a11y best practice) */
.skip-link {
  position: absolute;
  top: -100px;
  left: var(--sp-4);
  background: var(--md-sys-color-primary);
  color: var(--md-sys-color-on-primary);
  padding: 12px 20px;
  border-radius: var(--shape-sm);
  font-weight: 600;
  z-index: 1000;
  transition: top .2s;
}
.skip-link:focus { top: var(--sp-4); }

/* Rispetta preferenze utente per ridurre animazioni */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ============================================================
   LAYOUT
   ============================================================ */
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--sp-4);
}
@media (min-width: 768px)  { .container { padding: 0 var(--sp-8); } }
@media (min-width: 1024px) { .container { padding: 0 var(--sp-16); } }

.section { padding: var(--sp-16) 0; }
@media (min-width: 768px) { .section { padding: var(--sp-20) 0; } }

/* ============================================================
   TYPOGRAPHY HELPERS
   ============================================================ */
.section-eyebrow {
  display: inline-block;
  font-size: 0.8125rem; /* 13px — leggibilità migliore */
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--md-sys-color-primary-text); /* #0a6e96 → 5.6:1 su bianco ✓ AA */
  margin-bottom: var(--sp-2);
}

.section-title {
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--md-sys-color-on-surface);
  margin-bottom: var(--sp-4);
}

.section-body {
  font-size: 1rem;
  color: var(--md-sys-color-on-surface-variant);
  line-height: 1.7;
  max-width: 600px;
}

.text-center { text-align: center; }
.text-center .section-body { margin-left: auto; margin-right: auto; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  padding: 12px 24px;
  border-radius: var(--shape-full);
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  border: none;
  cursor: pointer;
  transition: box-shadow .2s, opacity .15s, transform .1s;
  white-space: nowrap;
}
.btn:active { transform: scale(0.97); }

.btn-filled {
  background-color: var(--md-sys-color-primary);
  color: var(--md-sys-color-on-primary);
}
.btn-filled:hover { box-shadow: 0 2px 8px rgba(26,107,191,.35); }

.btn-outlined {
  background: transparent;
  color: var(--md-sys-color-primary);
  border: 1.5px solid var(--md-sys-color-outline);
}
.btn-outlined:hover { background: color-mix(in srgb, var(--md-sys-color-primary) 8%, transparent); }

.btn-ghost-white {
  background: transparent;
  color: #fff;
  border: 1.5px solid rgba(255,255,255,.6);
}
.btn-ghost-white:hover { background: rgba(255,255,255,.1); }

.btn-lg { padding: 14px 32px; font-size: 1rem; }

.btn .material-symbols-outlined { font-size: 20px; }

/* ============================================================
   NAVBAR
   ============================================================ */
.navbar {
  position: fixed;
  inset-block-start: 0;
  inset-inline: 0;
  z-index: 200;
  background: rgb(255, 255, 255);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--md-sys-color-outline-variant);
}

.navbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-6);
  padding-block: var(--sp-3);
}

.navbar__logo {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  color: var(--md-sys-color-on-surface);
}
.navbar__logo-mark {
  display: flex; align-items: center;
  flex-shrink: 0;
}
.navbar__logo-mark img {
  height: 36px;
  width: auto;
  display: block;
}
.navbar__logo-text {
  font-size: 1.125rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.navbar__logo-text em {
  font-style: normal;
  color: var(--md-sys-color-primary);
}

.navbar__nav {
  display: none;
  gap: var(--sp-8);
}
@media (min-width: 900px) { .navbar__nav { display: flex; } }

.navbar__nav a {
  font-size: .9375rem; /* 15px */
  font-weight: 500;
  color: var(--md-sys-color-on-surface);
  transition: color .2s;
  padding: 8px 4px; /* tap target ≥ 44px */
}
.navbar__nav a:hover,
.navbar__nav a:focus-visible { text-decoration:underline; var(--md-sys-color-primary-text); }

.navbar__cta { display: none; }
@media (min-width: 600px) { .navbar__cta { display: inline-flex; } }

/* ============================================================
   1. HERO
   ============================================================ */
.hero {
  position: relative;
  min-height: 68svh;
  display: flex;
  align-items: center;
  background-color: #0a1812; /* fallback dark forest */
  background-image:
    /* alone lime brand (primary-accent) in alto-dx, presenza dominante */
    radial-gradient(ellipse 100% 75% at 95% -5%, rgba(179, 205, 59, 0.42) 0%, transparent 58%),
    /* tocco di cyan brand in basso-sx, presenza ridotta */
    radial-gradient(ellipse 80% 60% at 0% 110%, rgba(25, 157, 209, 0.18) 0%, transparent 55%),
    /* velo principale: deep forest → olive scuro → lime tenue */
    linear-gradient(135deg, rgba(10,24,18,0.90) 0%, rgba(18,40,28,0.82) 30%, rgba(45,68,28,0.70) 65%, rgba(110,135,40,0.55) 100%),
    /* immagine di sfondo */
    url("img/Bg_hero.jpg");
  background-size: cover, cover, cover, cover;
  background-position: center, center, center, center;
  background-repeat: no-repeat;
  background-attachment: fixed, fixed, fixed, fixed; /* effetto parallasse */
  overflow: hidden;
  padding-top: 70px;
}

/* Disattiva il parallasse su mobile (performance + bug iOS Safari)
   e quando l'utente preferisce ridurre il movimento */
@media (max-width: 1024px), (prefers-reduced-motion: reduce) {
  .hero {
    background-attachment: scroll, scroll, scroll, scroll;
  }
}

.hero__deco {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle 600px at 15% 90%, rgba(25, 157, 209, 0.45) 0%, transparent 65%),
    radial-gradient(circle 500px at 92% 10%, rgba(179, 205, 59, 0.28) 0%, transparent 60%),
    radial-gradient(ellipse 70% 100% at 50% 100%, rgba(3, 20, 29, 0.55) 0%, transparent 70%);
  pointer-events: none;
  mix-blend-mode: screen;
}

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at center, transparent 0%, transparent 55%, rgba(3, 20, 29, 0.4) 100%);
  pointer-events: none;
  z-index: 0;
}
.hero__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.03) 1px, transparent 1px);
  background-size: 56px 56px;
  pointer-events: none;
}

.hero__inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-12);
  align-items: center;
  padding-block: var(--sp-16);
}
@media (min-width: 1024px) {
  .hero__inner { grid-template-columns: 1.1fr 1fr; }
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  background: rgba(178, 205, 59, 0.233);
  border: 1px solid rgba(178, 205, 59, 0.779);
  color: #fff;
  padding: 6px 14px;
  border-radius: var(--shape-full);
  font-size: 0.8125rem; /* 13px */
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: var(--sp-5);
}
.hero__badge .material-symbols-outlined { font-size: 14px; }

.hero__title {
  font-size: clamp(2.1rem, 5.5vw, 3.5rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.03em;
  color: #FFFFFF;
  margin-bottom: var(--sp-5);
}
.hero__title mark {
  background: none;
  color: var(--md-sys-color-primary-accent); /* lime brand */
}

.hero__subtitle {
  font-size: 1.0625rem;
  color: rgba(255,255,255,.88); /* alzato per garantire ≥7:1 su sfondo dark */
  line-height: 1.65;
  max-width: 500px;
  margin-bottom: var(--sp-8);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
  align-items: center;
}

/* Hero visual cards */
.hero__visual { display: none; }
@media (min-width: 1024px) { .hero__visual { display: flex; flex-direction: column; gap: var(--sp-4); } }

.hero__card {
  background: rgba(255,255,255,.07);
  backdrop-filter: blur(18px);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: var(--shape-lg);
  padding: var(--sp-5);
}
.hero__card-hd {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  margin-bottom: var(--sp-3);
}
.hero__card-ico {
  width: 46px; height: 46px;
  border-radius: var(--shape-md);
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  flex-shrink: 0;
}
.hero__card-ico--blue   { background: var(--md-sys-color-primary); }
.hero__card-ico--orange { background: var(--md-sys-color-tertiary); }

.hero__card-title { font-size: 1rem; font-weight: 700; color: #fff; }
.hero__card-sub   { font-size: .875rem; color: rgba(255,255,255,.85); }

.hero__chips { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.hero__chip {
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.22);
  color: rgba(255,255,255,.95);
  padding: 4px 10px;
  border-radius: var(--shape-full);
  font-size: .8125rem; /* 13px */
  font-weight: 500;
}

/* ============================================================
   2. CHI SIAMO
   ============================================================ */
.chi-siamo {
  background-color: var(--md-sys-color-surface-container-low);
}
.chi-siamo__inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-12);
  align-items: center;
}
@media (min-width: 768px) {
  .chi-siamo__inner { grid-template-columns: 1fr 1fr; }
}

.chi-siamo__body { font-size: 1rem; color: var(--md-sys-color-on-surface-variant); line-height: 1.7; max-width: 480px; }
.chi-siamo__body + .chi-siamo__body { margin-top: var(--sp-4); }

.chi-siamo__numbers {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-5);
  list-style: none;
  padding: 0;
  margin: 0;
}
@media (min-width: 480px) { .chi-siamo__numbers { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 479px) { .chi-siamo__numbers { grid-template-columns: repeat(2, 1fr); } }

.chi-siamo__num-ico {
  width: 48px; height: 48px;
  border-radius: var(--shape-md);
  background: var(--md-sys-color-primary-container);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: var(--sp-3);
}
.chi-siamo__num-ico .material-symbols-outlined {
  font-size: 24px;
  color: var(--md-sys-color-on-primary-container);
}
.chi-siamo__num-val {
  font-size: 1.875rem;
  font-weight: 800;
  color: var(--md-sys-color-primary-text);
  line-height: 1;
}
.chi-siamo__num-lbl {
  font-size: .9375rem; /* 15px */
  color: var(--md-sys-color-on-surface-variant);
  line-height: 1.45;
  margin-top: var(--sp-1);
}

/* ============================================================
   3. SERVIZI
   ============================================================ */
.servizi { background: var(--md-sys-color-background); }

.servizi__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-3);
  margin-top: var(--sp-10);
}
@media (min-width: 600px)  { .servizi__grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .servizi__grid { grid-template-columns: repeat(4, 1fr); } }

/* I <li> wrapper si estendono in altezza per uniformare le card */
.servizi__grid > li { display: flex; }

.service-card {
  background: var(--md-sys-color-surface-container);
  border: 1px solid transparent;
  border-radius: var(--shape-lg);
  padding: var(--sp-5);
  transition: box-shadow .2s, transform .2s, border-color .2s;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
}
.service-card:hover {
  box-shadow: 0 4px 20px rgba(0,0,0,.09);
  transform: translateY(-3px);
  border-color: var(--md-sys-color-outline-variant);
}

.service-card__ico {
  width: 52px; height: 52px;
  border-radius: var(--shape-md);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: var(--sp-4);
}
.service-card__ico--primary {
  background: var(--md-sys-color-primary-container);
  color: var(--md-sys-color-on-primary-container);
}
.service-card__ico--tertiary {
  background: var(--md-sys-color-tertiary-container);
  color: var(--md-sys-color-on-tertiary-container);
}
.service-card__ico .material-symbols-outlined { font-size: 28px; }

.service-card__title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--md-sys-color-on-surface);
  margin-bottom: var(--sp-1);
}
.service-card__desc {
  font-size: .9375rem; /* 15px */
  color: var(--md-sys-color-on-surface-variant);
  line-height: 1.55;
}

/* ============================================================
   3.5 PORTFOLIO LAVORI — Galleria asimmetrica scrollabile
   ============================================================ */
.lavori {
  background:
    linear-gradient(135deg, #fff5f9 0%, #f5f9ff 35%, #f3fff5 70%, #fffceb 100%);
  overflow: hidden;
}

/* Header con frecce a destra */
.lavori__header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--sp-6);
  flex-wrap: wrap;
}

/* Frecce navigazione */
.lavori__nav {
  display: flex;
  gap: var(--sp-2);
  flex-shrink: 0;
}
.lavori__arrow {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--md-sys-color-surface-container-lowest);
  border: 1px solid var(--md-sys-color-outline-variant);
  color: var(--md-sys-color-on-surface);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color .2s, border-color .2s, color .2s, transform .15s, opacity .2s;
  font-family: inherit;
}
.lavori__arrow .material-symbols-outlined { font-size: 22px; }
.lavori__arrow:hover:not(:disabled),
.lavori__arrow:focus-visible:not(:disabled) {
  background: var(--md-sys-color-primary);
  border-color: var(--md-sys-color-primary);
  color: var(--md-sys-color-on-primary);
}
.lavori__arrow:active:not(:disabled) { transform: scale(0.95); }
.lavori__arrow:disabled {
  opacity: .35;
  cursor: not-allowed;
}

/* Scroller orizzontale */
.lavori__scroller {
  position: relative;
  margin-top: var(--sp-10);
}
.lavori__track {
  display: flex;
  gap: var(--sp-4);
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding: var(--sp-2) var(--sp-1) var(--sp-4);
  /* Nasconde la scrollbar */
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.lavori__track::-webkit-scrollbar { display: none; }

/* Card galleria — varianti dimensionali per layout asimmetrico */
.lavoro {
  flex: 0 0 auto;
  scroll-snap-align: start;
  list-style: none;
  border-radius: var(--shape-lg);
  overflow: hidden;
  background: var(--md-sys-color-surface-container);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
  transition: box-shadow .25s, transform .25s;
}
.lavoro:hover {
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.14);
  transform: translateY(-4px);
}

/* Dimensioni miste — base mobile poi cresce su desktop */
.lavoro--tall   { width: 240px; height: 320px; }
.lavoro--wide   { width: 320px; height: 240px; }
.lavoro--square { width: 260px; height: 260px; }

@media (min-width: 768px) {
  .lavoro--tall   { width: 320px; height: 440px; }
  .lavoro--wide   { width: 480px; height: 340px; }
  .lavoro--square { width: 360px; height: 360px; }
}

/* Bottone-zoom che riempie tutta la card */
.lavoro__btn {
  width: 100%;
  height: 100%;
  padding: 0;
  border: none;
  background: transparent;
  cursor: zoom-in;
  display: block;
  overflow: hidden;
  position: relative;
}
.lavoro__btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .5s cubic-bezier(0.2, 0, 0, 1);
}
.lavoro__btn:hover img,
.lavoro__btn:focus-visible img { transform: scale(1.06); }

.lavoro__btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(0, 0, 0, 0.25) 100%);
  opacity: 0;
  transition: opacity .25s;
  pointer-events: none;
}
.lavoro__btn:hover::after,
.lavoro__btn:focus-visible::after { opacity: 1; }


/* ============================================================
   LIGHTBOX — Zoom immagine al click
   ============================================================ */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(3, 20, 29, 0.92);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--sp-4);
  animation: lightboxFadeIn .25s ease;
}
.lightbox[hidden] { display: none; }

@keyframes lightboxFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.lightbox__figure {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-3);
  max-width: 92vw;
  max-height: 88vh;
}
.lightbox__img {
  max-width: 92vw;
  max-height: 78vh;
  border-radius: var(--shape-lg);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
  display: block;
}
.lightbox__caption {
  max-width: 720px;
  padding: var(--sp-3) var(--sp-5);
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(8px);
  border-radius: var(--shape-md);
  color: #fff;
  font-size: .9375rem; /* 15px */
  line-height: 1.45;
  text-align: center;
}
.lightbox__caption:empty { display: none; }

/* Pulsante chiudi */
.lightbox__close {
  position: absolute;
  top: var(--sp-4);
  right: var(--sp-4);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background-color .2s, transform .15s;
  font-family: inherit;
  z-index: 1;
}
.lightbox__close:hover,
.lightbox__close:focus-visible { background: rgba(255, 255, 255, 0.25); }
.lightbox__close:active { transform: scale(0.95); }
.lightbox__close .material-symbols-outlined { font-size: 24px; }

/* Frecce nav lightbox */
.lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background-color .2s;
  font-family: inherit;
  z-index: 1;
}
.lightbox__nav:hover,
.lightbox__nav:focus-visible { background: rgba(255, 255, 255, 0.25); }
.lightbox__nav .material-symbols-outlined { font-size: 26px; }
.lightbox__nav--prev { left: var(--sp-4); }
.lightbox__nav--next { right: var(--sp-4); }

@media (max-width: 600px) {
  .lightbox__nav { width: 44px; height: 44px; }
}

/* Blocca scroll del body quando lightbox aperta */
body.has-lightbox { overflow: hidden; }



/* ============================================================
   4. VANTAGGI + TESTIMONIANZE
   ============================================================ */
.vantaggi { background: var(--md-sys-color-tertiary-container); }

.vantaggi .section-eyebrow { color: var(--md-sys-color-on-tertiary-container); } /* #3A1500 = 12:1 ✓ AAA */
.vantaggi .section-title   { color: var(--md-sys-color-on-tertiary-container); }
.vantaggi .section-body    { color: var(--md-sys-color-on-tertiary-container); } /* opacity rimossa */

.vantaggi__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-6);
  margin-top: var(--sp-10);
}
@media (min-width: 600px)  { .vantaggi__grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .vantaggi__grid { grid-template-columns: repeat(4, 1fr); } }

.vantaggio__ico {
  width: 48px; height: 48px;
  border-radius: var(--shape-md);
  background: rgba(58,21,0,.1);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: var(--sp-3);
}
.vantaggio__ico .material-symbols-outlined {
  font-size: 24px;
  color: var(--md-sys-color-on-tertiary-container);
}
.vantaggio__title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--md-sys-color-on-tertiary-container);
  margin-bottom: var(--sp-1);
}
.vantaggio__desc {
  font-size: .9375rem; /* 15px */
  color: var(--md-sys-color-on-tertiary-container); /* opacity rimossa per garantire contrasto pieno */
  line-height: 1.55;
}

.testimonials { margin-top: var(--sp-16); }
.testimonials__title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--md-sys-color-on-tertiary-container);
  text-align: center;
  margin-bottom: var(--sp-6);
}
.testimonials__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-4);
}
@media (min-width: 768px) { .testimonials__grid { grid-template-columns: repeat(3, 1fr); } }

.testimonial {
  background: var(--md-sys-color-surface-container-lowest);
  border: 1px solid var(--md-sys-color-outline-variant);
  border-radius: var(--shape-lg);
  padding: var(--sp-5);
}
.testimonial__stars { color: #F9A825; font-size: 1rem; letter-spacing: 2px; margin-bottom: var(--sp-3); }
.testimonial__quote {
  font-size: .9375rem; /* 15px */
  font-style: italic;
  color: var(--md-sys-color-on-surface);
  line-height: 1.65;
  margin-bottom: var(--sp-4);
}
.testimonial__author { display: flex; align-items: center; gap: var(--sp-3); }
.testimonial__avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--md-sys-color-secondary-container);
  display: flex; align-items: center; justify-content: center;
  font-size: .875rem;
  font-weight: 700;
  color: var(--md-sys-color-on-secondary-container);
  flex-shrink: 0;
}
.testimonial__name { font-size: .9375rem; font-weight: 700; color: var(--md-sys-color-on-surface); }
.testimonial__role { font-size: .8125rem; color: var(--md-sys-color-on-surface-variant); margin-top: 2px; }

/* ============================================================
   5. COME LAVORIAMO — Sfondo dark + card glassmorphic
   ============================================================ */
.come-lavoriamo {
  position: relative;
  background-color: #0a1812; /* fallback */
  background-image:
    radial-gradient(ellipse 70% 60% at 90% 0%, rgba(179, 205, 59, 0.22) 0%, transparent 55%),
    radial-gradient(ellipse 60% 50% at 0% 100%, rgba(25, 157, 209, 0.15) 0%, transparent 55%),
    linear-gradient(135deg, #0a1812 0%, #112820 30%, #163a2c 65%, #1d4f44 100%);
  overflow: hidden;
}

/* Override colore eyebrow / titoli su sfondo dark */
.come-lavoriamo .section-eyebrow { color: var(--md-sys-color-primary-accent); }
.come-lavoriamo .section-title   { color: #FFFFFF; }
.come-lavoriamo .section-body    { color: rgba(255, 255, 255, 0.85); }

.steps {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-4);
  margin-top: var(--sp-10);
  position: relative;
  z-index: 1;
}
@media (min-width: 600px)  { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .steps { grid-template-columns: repeat(4, 1fr); } }

.step {
  background: rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--shape-lg);
  padding: var(--sp-6) var(--sp-5);
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  transition: transform .25s ease, border-color .25s ease, background-color .25s ease;
}
.step:hover {
  transform: translateY(-4px);
  border-color: rgba(179, 205, 59, 0.5);
  background: rgba(255, 255, 255, 0.1);
}

@media (max-width: 478px) { .step__num { font-size: 2.25rem; /* riduzione su mobile — evidenza forte */} }

.step__num {
  font-size: 3.25rem; /* 52px — evidenza forte */
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--md-sys-color-primary-accent); /* lime brand */
  text-shadow: 0 0 24px rgba(179, 205, 59, 0.35); /* glow sottile */
  margin-bottom: var(--sp-2);
}
.step__title {
  font-size: 1.125rem;
  font-weight: 700;
  color: #FFFFFF;
  margin: 0;
}
.step__desc {
  font-size: .9375rem;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.6;
  margin: 0;
}

/* ============================================================
   6. CONTATTO + FORM — Sfondo immagine + velo brand
   ============================================================ */
.contatto {
  position: relative;
  background-color: var(--md-sys-color-primary-container); /* fallback */
  background-image:
    /* glow lime in alto-sx per coerenza brand */
    radial-gradient(ellipse 70% 60% at 0% 0%, rgba(179, 205, 59, 0.20) 0%, transparent 55%),
    /* velo chiaro semitrasparente sopra l'immagine: garantisce contrasto del titolo dark */
    linear-gradient(135deg, rgba(217, 234, 237, 0.92) 0%, rgba(231, 249, 249, 0.85) 50%, rgba(248, 255, 204, 0.78) 100%),
    url("img/BG_contact.jpg");
  background-size: cover, cover, cover;
  background-position: center, center, center;
  background-repeat: no-repeat;
  background-attachment: fixed, fixed, fixed;
  overflow: hidden;
}

/* Disattiva parallasse su mobile (bug iOS) e per reduced-motion */
@media (max-width: 1024px), (prefers-reduced-motion: reduce) {
  .contatto {
    background-attachment: scroll, scroll, scroll;
  }
}

.contatto__inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-12);
  align-items: start;
}
@media (min-width: 1024px) {
  .contatto__inner { grid-template-columns: 1fr 1fr; align-items: center; }
}

.contatto .section-title { color: var(--md-sys-color-on-primary-container); }
.contatto .section-body  { color: var(--md-sys-color-on-primary-container); } /* opacity rimossa */

.contatto__checks { margin-top: var(--sp-6); display: flex; flex-direction: column; gap: var(--sp-3); }
.contatto__check {
  display: flex; align-items: center; gap: var(--sp-3);
  font-size: 1rem; font-weight: 500; /* 16px per leggibilità ottimale */
  color: var(--md-sys-color-on-primary-container);
}
.contatto__check .material-symbols-outlined {
  font-size: 22px;
  color: var(--md-sys-color-on-primary-container); /* contrasto pieno su primary-container */
  flex-shrink: 0;
}

/* Form card */
.form-card {
  background: var(--md-sys-color-surface-container-lowest);
  border: 1px solid var(--md-sys-color-outline-variant);
  border-radius: var(--shape-lg);
  padding: var(--sp-8);
}
.form-card__title {
  font-size: 1.25rem; font-weight: 700;
  color: var(--md-sys-color-on-surface);
  margin-bottom: var(--sp-6);
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-4);
}
@media (min-width: 480px) { .form-grid { grid-template-columns: 1fr 1fr; } }

.form-group { display: flex; flex-direction: column; gap: 5px; }
.form-group--full { grid-column: 1 / -1; }

.form-label {
  font-size: .9375rem; /* 15px */
  font-weight: 600;
  color: var(--md-sys-color-on-surface-variant);
}
.form-label .req { color: var(--md-sys-color-error); margin-left: 2px; font-weight: 700; }

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 12px var(--sp-4);
  border: 1.5px solid var(--md-sys-color-outline);
  border-radius: var(--shape-sm);
  font-family: inherit;
  font-size: 1rem; /* 16px — evita auto-zoom su iOS Safari */
  color: var(--md-sys-color-on-surface);
  background: var(--md-sys-color-surface);
  transition: border-color .2s, box-shadow .2s;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
}
.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--md-sys-color-primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--md-sys-color-primary) 30%, transparent); /* anello focus più visibile */
}
.form-input::placeholder,
.form-textarea::placeholder {
  color: #6B7280; /* solido, ratio 4.6:1 su superficie chiara — ✓ AA */
  opacity: 1;
}

.form-select {
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2373777F' stroke-width='2.2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 40px;
}
.form-textarea { min-height: 96px; resize: vertical; }

.form-privacy {
  grid-column: 1 / -1;
  display: flex; align-items: flex-start; gap: var(--sp-3);
  font-size: .875rem; /* 14px — minimo per consenso GDPR */
  color: var(--md-sys-color-on-surface-variant);
  line-height: 1.55;
}
.form-privacy input[type="checkbox"] {
  width: 18px; height: 18px;
  margin-top: 2px;
  accent-color: var(--md-sys-color-primary);
  flex-shrink: 0;
  cursor: pointer;
}
.form-privacy a {
  color: var(--md-sys-color-primary-text); /* link scuro per ≥4.5:1 */
  text-decoration: underline;
  font-weight: 500;
}

.form-submit { grid-column: 1 / -1; }
.btn-submit { width: 100%; justify-content: center; padding: 14px; font-size: 1rem; margin-top: var(--sp-1); }

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  background: var(--md-sys-color-surface-container-highest);
  padding: var(--sp-16) 0 var(--sp-8);
}
.footer__top {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-10);
  margin-bottom: var(--sp-12);
}
@media (min-width: 768px) { .footer__top { grid-template-columns: 2fr 1fr 1fr 1.5fr; } }

.footer__tagline {
  font-size: .875rem;
  color: var(--md-sys-color-on-surface-variant);
  line-height: 1.65;
  margin-top: var(--sp-3);
  max-width: 280px;
}

/* Social icons */
.footer__social {
  display: flex;
  gap: var(--sp-3);
  margin-top: var(--sp-5);
}
.footer__social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px; /* tap target a11y */
  height: 44px;
  border-radius: 50%;
  background: var(--md-sys-color-surface-container-low);
  border: 1px solid var(--md-sys-color-outline-variant);
  color: var(--md-sys-color-on-surface-variant);
  transition: background-color .2s, color .2s, border-color .2s, transform .15s;
}
.footer__social a:hover,
.footer__social a:focus-visible {
  background: var(--md-sys-color-primary);
  border-color: var(--md-sys-color-primary);
  color: var(--md-sys-color-on-primary);
  transform: translateY(-2px);
}
.footer__col-title {
  font-size: .8125rem; /* 13px */
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--md-sys-color-on-surface);
  margin-bottom: var(--sp-4);
}
.footer__links { display: flex; flex-direction: column; gap: var(--sp-3); }
.footer__links a {
  font-size: .9375rem; /* 15px */
  color: var(--md-sys-color-on-surface-variant);
  transition: color .2s;
  display: inline-block;
  padding: 2px 0; /* aumenta tap target */
}
.footer__links a:hover,
.footer__links a:focus-visible { text-decoration:underline; color: var(--md-sys-color-primary-text); }

/* Sedi */
.footer__sedi {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}
.footer__sedi-label {
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--md-sys-color-on-surface);
  margin-top: var(--sp-4);
}
.footer__sedi-label:first-child { margin-top: 0; }
.footer__address {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-2);
  font-size: .875rem;
  color: var(--md-sys-color-on-surface-variant);
  line-height: 1.5;
  transition: color .2s;
}
.footer__address .material-symbols-outlined {
  font-size: 1rem;
  flex-shrink: 0;
  margin-top: 2px;
  color: var(--md-sys-color-primary);
}
.footer__address:hover,
.footer__address:focus-visible {
  color: var(--md-sys-color-primary-text);
  text-decoration: underline;
}

.footer__bottom {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  align-items: center;
  text-align: center;
  padding-top: var(--sp-6);
  border-top: 1px solid var(--md-sys-color-outline-variant);
}
@media (min-width: 768px) {
  .footer__bottom { flex-direction: row; justify-content: space-between; text-align: left; }
}
.footer__bottom p,
.footer__bottom a {
  font-size: .875rem; /* 14px */
  color: var(--md-sys-color-on-surface-variant);
}
.footer__bottom a {
  text-decoration: underline;
  text-underline-offset: 2px;
}
.footer__bottom a:hover,
.footer__bottom a:focus-visible { text-decoration:underline; color: var(--md-sys-color-primary-text); }


/* ============================================================
   CONTATTO — Telefoni diretti (stile coerente con .contatto__check)
   ============================================================ */
.contatto__phones {
  margin-top: var(--sp-6);
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}
.contatto__phones-label {
  font-size: .8125rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--md-sys-color-on-primary-container);
  margin-bottom: var(--sp-1);
}
.contatto__phone {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  font-size: 1rem;
  font-weight: 500;
  color: var(--md-sys-color-on-primary-container);
  width: fit-content;
  transition: color .2s;
}
.contatto__phone:hover,
.contatto__phone:focus-visible {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.contatto__phone .material-symbols-outlined {
  font-size: 22px;
  color: var(--md-sys-color-on-primary-container);
  flex-shrink: 0;
}


/* Telefoni nel footer (colonna Sedi) — stile coerente con .footer__address */
.footer__sedi-tel {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: .9375rem;
  color: var(--md-sys-color-on-surface-variant);
  padding: 2px 0;
  transition: color .2s;
}
.footer__sedi-tel:hover,
.footer__sedi-tel:focus-visible {
  text-decoration: underline;
  color: var(--md-sys-color-primary-text);
}
.footer__sedi-tel .material-symbols-outlined {
  font-size: 18px;
  color: var(--md-sys-color-primary);
  flex-shrink: 0;
}


/* ============================================================
   FAQ — Sezione domande frequenti
   ============================================================ */
.faq {
  background: var(--md-sys-color-surface-container-low);
}
.faq__list {
  max-width: 820px;
  margin: var(--sp-10) auto 0;
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}
.faq__item {
  background: var(--md-sys-color-surface-container-lowest);
  border: 1px solid var(--md-sys-color-outline-variant);
  border-radius: var(--shape-md);
  overflow: hidden;
  transition: border-color .2s, box-shadow .2s;
}
.faq__item[open] {
  border-color: var(--md-sys-color-primary);
  box-shadow: 0 2px 12px rgba(26, 157, 208, 0.08);
}
.faq__question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  padding: var(--sp-5) var(--sp-6);
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--md-sys-color-on-surface);
  cursor: pointer;
  list-style: none;
  transition: background-color .2s;
}
.faq__question::-webkit-details-marker { display: none; }
.faq__question:hover { background: var(--md-sys-color-surface-container); }
.faq__icon {
  flex-shrink: 0;
  color: var(--md-sys-color-primary-text);
  transition: transform .25s;
}
.faq__item[open] .faq__icon { transform: rotate(45deg); }
.faq__answer {
  padding: 0 var(--sp-6) var(--sp-5);
  color: var(--md-sys-color-on-surface-variant);
  line-height: 1.65;
}
.faq__answer p { margin: 0; }


/* ============================================================
   PAGINE LEGALI (Privacy, Cookie, Termini)
   ============================================================ */
.legal-page {
  background: var(--md-sys-color-surface);
  padding: var(--sp-12) 0 var(--sp-16);
  min-height: 60vh;
}
.legal-page__header {
  max-width: 760px;
  margin: 0 auto var(--sp-10);
  text-align: center;
}
.legal-page__header .section-eyebrow {
  display: inline-block;
  margin-bottom: var(--sp-3);
}
.legal-page__title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  color: var(--md-sys-color-on-surface);
  line-height: 1.15;
  margin-bottom: var(--sp-4);
}
.legal-page__updated {
  font-size: .875rem;
  color: var(--md-sys-color-on-surface-variant);
}

.legal-page__content {
  max-width: 760px;
  margin: 0 auto;
  background: var(--md-sys-color-surface-container-lowest);
  border: 1px solid var(--md-sys-color-outline-variant);
  border-radius: var(--shape-lg);
  padding: var(--sp-8) var(--sp-6);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--md-sys-color-on-surface);
}
@media (min-width: 768px) {
  .legal-page__content { padding: var(--sp-8) var(--sp-8); }
}

.legal-page__content h2 {
  font-size: 1.375rem; /* 22px */
  font-weight: 700;
  color: var(--md-sys-color-on-surface);
  margin-top: var(--sp-10);
  margin-bottom: var(--sp-3);
  padding-bottom: var(--sp-2);
  border-bottom: 2px solid var(--md-sys-color-primary-container);
}
.legal-page__content h2:first-child { margin-top: 0; }

.legal-page__content h3 {
  font-size: 1.0625rem; /* 17px */
  font-weight: 700;
  color: var(--md-sys-color-on-surface);
  margin-top: var(--sp-6);
  margin-bottom: var(--sp-2);
}

.legal-page__content p { margin-bottom: var(--sp-4); }

.legal-page__content ul,
.legal-page__content ol {
  margin: 0 0 var(--sp-4) var(--sp-6);
  padding: 0;
}
.legal-page__content li { margin-bottom: var(--sp-2); }

.legal-page__content a {
  color: var(--md-sys-color-primary-text);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.legal-page__content a:hover,
.legal-page__content a:focus-visible {
  color: var(--md-sys-color-primary);
}

.legal-page__content strong { font-weight: 700; }

.legal-page__content table {
  width: 100%;
  border-collapse: collapse;
  margin: var(--sp-4) 0 var(--sp-6);
  font-size: .9375rem;
}
.legal-page__content th,
.legal-page__content td {
  padding: var(--sp-3) var(--sp-4);
  border: 1px solid var(--md-sys-color-outline-variant);
  text-align: left;
  vertical-align: top;
}
.legal-page__content th {
  background: var(--md-sys-color-surface-container-low);
  font-weight: 700;
}

.legal-page__content blockquote {
  margin: var(--sp-4) 0;
  padding: var(--sp-4) var(--sp-5);
  background: var(--md-sys-color-primary-container);
  border-left: 4px solid var(--md-sys-color-primary);
  border-radius: var(--shape-sm);
  color: var(--md-sys-color-on-primary-container);
}
.legal-page__content blockquote p:last-child { margin-bottom: 0; }

.legal-page__back {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  margin-top: var(--sp-8);
  padding: var(--sp-2) var(--sp-4);
  border-radius: var(--shape-full);
  font-size: .9375rem;
  font-weight: 500;
  color: var(--md-sys-color-primary-text);
  text-decoration: none;
  transition: background-color .2s;
}
.legal-page__back:hover,
.legal-page__back:focus-visible {
  background: var(--md-sys-color-primary-container);
}
