/* ==========================================================
   RENIX — HOME FINALE
   Correzione:
   - allineamento a sinistra come pagina Servizi
   - dimensioni più coerenti col resto del sito
   - più respiro verticale
   - blocco "I nostri valori" riallineato alla Figma
   - mappa e lavori più grandi
   - header compatto lasciato invariato
   - Montserrat su tutta la pagina
========================================================== */


/* ==========================================================
   1. VARIABILI
========================================================== */

:root {
  --dark: #344041;
  --dark-soft: #4c5b5c;
  --green: #91c3a2;
  --green-light: #cde4c5;
  --green-pale: #edf6e8;
  --white: #ffffff;
  --text: #344041;

  --page-pad: clamp(38px, 5.3vw, 72px);
  --shadow: 0 5px 14px rgba(31, 44, 45, 0.18);

  --font: "Montserrat", Arial, Helvetica, sans-serif;
}


/* ==========================================================
   2. RESET / BASE
========================================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  overflow-x: hidden;

  background: var(--white);
  color: var(--text);

  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
}

main {
  width: 100%;
  overflow: hidden;
}

section[id] {
  scroll-margin-top: 105px;
}

/*
  NON centriamo più tutta la Home dentro un contenitore stretto.
  La pagina Servizi parte molto più a sinistra: facciamo la stessa cosa.
*/
.home-container {
  width: 100%;
  max-width: none;

  margin: 0;

  padding-left: var(--page-pad);
  padding-right: var(--page-pad);
}


/* ==========================================================
   3. TITOLI SEZIONE
========================================================== */

.section-title {
  position: relative;
  display: inline-block;

  margin: 0;
  padding-bottom: 9px;

  color: var(--dark);

  font-family: var(--font);
  font-size: clamp(30px, 2.45vw, 38px);
  line-height: 1.08;
  font-weight: 700;
  letter-spacing: -0.035em;
}

.section-title::after {
  content: "";

  position: absolute;
  left: 0;
  bottom: 0;

  width: 100%;
  height: 3px;

  background: var(--green);
}

.section-title--light {
  color: var(--white);
}


/* ==========================================================
   4. HEADER
   LASCIATO COMPATTO: NON MODIFICARE.
========================================================== */

.site-header,
.site-header.header-compact {
  position: fixed;
  z-index: 9999;

  top: 14px;
  left: 20px;
  right: 20px;

  width: calc(100% - 40px);
  height: 82px;

  overflow: visible;

  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 11px;

  background: rgba(255, 255, 255, 0.98);

  -webkit-backdrop-filter: blur(16px) saturate(100%);
  backdrop-filter: blur(16px) saturate(100%);

  box-shadow: 0 8px 28px rgba(29, 43, 44, 0.11);

  transition: transform 0.28s ease;
}

.site-header.header-hidden {
  transform: translateY(calc(-100% - 20px));
}

.header-inner,
.site-header.header-compact .header-inner {
  width: 100%;
  height: 82px;
  min-height: 82px;

  padding: 0 38px 0 28px;

  display: flex;
  align-items: center;
  justify-content: space-between;

  background: transparent;
}

.brand,
.site-header.header-compact .brand {
  width: 190px;
  height: 54px;

  flex: 0 0 190px;

  display: flex;
  align-items: center;
}

.brand-logo {
  width: 100%;
  height: 100%;

  object-fit: contain;
  object-position: left center;
}

.menu-toggle {
  display: none;
}

.main-nav,
.site-header.header-compact .main-nav {
  position: static;

  width: auto;
  height: 44px;

  display: flex;
  align-items: center;
  justify-content: flex-end;

  gap: 26px;

  margin: 0;
  padding: 0;

  background: transparent;
}

.main-nav a,
.site-header.header-compact .main-nav a {
  width: auto;
  min-width: 0;
  height: 44px;

  padding: 0 11px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  border: 0;
  border-radius: 7px;

  background: transparent;
  color: #4c5b5c;

  font-family: var(--font);
  font-size: 16px;
  font-weight: 500;
  line-height: 1;
}

.main-nav a:hover {
  color: var(--green);
}

.main-nav a.is-active,
.site-header.header-compact .main-nav a.is-active {
  width: 94px;
  min-width: 94px;
  max-width: 94px;

  padding: 0;

  background: rgba(145, 195, 162, 0.88);
  color: var(--white);
}


/* ==========================================================
   5. HERO
   Stessa logica e allineamento della Hero Servizi.
========================================================== */

.home-hero {
  position: relative;

  width: 100%;
  height: clamp(540px, 57vw, 650px);

  overflow: hidden;

  color: var(--white);

  background:
    linear-gradient(
      90deg,
      rgba(10, 17, 16, 0.56) 0%,
      rgba(10, 17, 16, 0.30) 46%,
      rgba(10, 17, 16, 0.06) 100%
    ),
    url("./assets/Hero-Image.png")
    center center / cover no-repeat;
}

.home-hero__inner {
  height: 100%;

  display: flex;
  align-items: center;

  /*
    La pagina Servizi usa circa 66px.
    Qui sovrascriviamo il padding generale per avere lo stesso asse.
  */
  padding-left: 66px;
  padding-right: 40px;
}

.home-hero__content {
  width: min(100%, 760px);

  transform: translateY(34px);
}

.home-hero h1 {
  max-width: 720px;

  margin: 0 0 24px;

  color: var(--white);

  font-family: var(--font);
  font-size: clamp(46px, 5vw, 64px);
  line-height: 1.02;
  font-weight: 700;
  letter-spacing: -0.04em;
}

.home-hero p {
  max-width: 760px;

  margin: 0 0 34px;

  color: var(--white);

  font-family: var(--font);
  font-size: clamp(20px, 2vw, 25px);
  line-height: 1.35;
  font-weight: 400;
  letter-spacing: -0.02em;
}

.home-hero__button {
  width: fit-content;
  min-width: 220px;
  min-height: 52px;

  padding: 0 20px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  gap: 10px;

  border-radius: 6px;

  background: var(--green-light);
  color: var(--dark-soft);

  font-family: var(--font);
  font-size: 16px;
  font-weight: 600;
  line-height: 1;

  transition:
    background-color 0.2s ease,
    transform 0.2s ease;
}

.home-hero__button:hover {
  background: #dff0d9;
  transform: translateY(-2px);
}

.hero-cta.is-clicking {
  animation: heroPress 0.78s ease;
}

@keyframes heroPress {
  0%,
  100% {
    transform: scale(1);
  }

  35% {
    transform: scale(0.975);
  }
}


/* ==========================================================
   6. CHI SIAMO
========================================================== */

.home-about {
  padding: 82px 0 86px;

  background: var(--white);
}

.home-about__grid {
  display: grid;

  grid-template-columns:
    minmax(500px, 0.9fr)
    minmax(0, 1.35fr);

  gap: clamp(54px, 5.5vw, 90px);
  align-items: center;
}

.home-about__copy {
  min-width: 0;

  align-self: start;
}

.home-about__headline {
  margin: 36px 0 24px;

  color: var(--dark);

  font-family: var(--font);
  font-size: clamp(27px, 2.25vw, 34px);
  line-height: 1.12;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.home-about__headline span {
  color: var(--green);
}

.home-about__text {
  max-width: 525px;
}

.home-about__text p {
  margin: 0 0 19px;

  color: var(--dark-soft);

  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  font-weight: 400;
}

.home-about__text p:last-child {
  margin-bottom: 0;
}

.home-about__visual {
  width: min(100%, 930px);
  height: 470px;

  justify-self: end;

  display: grid;

  grid-template-columns:
    minmax(0, 1.06fr)
    minmax(260px, 0.94fr);

  grid-template-rows:
    1fr
    1.16fr;

  gap: 15px;
}

.home-about__main-photo,
.home-about__detail-photo {
  margin: 0;

  overflow: hidden;

  border-radius: 16px;

  background: #e8ece9;
  box-shadow: var(--shadow);
}

.home-about__main-photo {
  grid-column: 1;
  grid-row: 1 / 3;
}

.home-about__detail-photo {
  grid-column: 2;
  grid-row: 1;
}

.home-about__main-photo img,
.home-about__detail-photo img {
  width: 100%;
  height: 100%;

  object-fit: cover;
  object-position: center;
}

.home-about__stats {
  grid-column: 2;
  grid-row: 2;

  min-width: 0;

  padding: 28px 27px 23px;

  display: flex;
  flex-direction: column;
  justify-content: center;

  border: 1px solid rgba(76, 91, 92, 0.20);
  border-radius: 16px;

  background: var(--green-pale);

  box-shadow: var(--shadow);
}

.home-about__stats-title {
  margin: 0;

  color: var(--dark);

  font-family: var(--font);
  font-size: clamp(20px, 1.65vw, 25px);
  line-height: 1.08;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.home-about__stats-title span {
  color: var(--green);
}

.home-about__stats-rule {
  width: 52px;
  height: 3px;

  margin: 16px 0 20px;

  background: var(--green);
}

.home-about__stats-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));

  gap: 10px;
}

.home-about__stats-grid div {
  min-width: 0;
  text-align: center;
}

.home-about__stats-grid strong {
  display: block;

  color: var(--dark);

  font-family: var(--font);
  font-size: 32px;
  line-height: 1;
  font-weight: 800;
}

.home-about__stats-grid span {
  display: block;

  margin-top: 6px;

  color: var(--dark-soft);

  font-family: var(--font);
  font-size: 9px;
  line-height: 1.2;
  font-weight: 500;
}


/* ==========================================================
   7. I NOSTRI VALORI
========================================================== */

.home-values {
  padding: 68px 0 72px;

  background: var(--dark);
  color: var(--white);
}

.home-values__grid {
  display: grid;

  grid-template-columns:
    minmax(0, 1fr)
    minmax(0, 1fr)
    minmax(0, 1fr)
    minmax(390px, 1.12fr);

  gap: clamp(34px, 4vw, 64px);
  align-items: start;
}

.value-card {
  min-width: 0;

  padding-top: 2px;

  text-align: center;
}

.value-card__number {
  width: auto;
  height: 105px;

  margin: 0 auto 22px;

  object-fit: contain;
}

.value-card h3 {
  margin: 0 0 12px;

  color: var(--green-light);

  font-family: var(--font);
  font-size: 18px;
  line-height: 1.18;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.value-card p {
  max-width: 250px;

  margin: 0 auto;

  color: rgba(255, 255, 255, 0.95);

  font-family: var(--font);
  font-size: 13.5px;
  line-height: 1.45;
  font-weight: 400;
}

/*
  Questo è il blocco che prima non seguiva la Figma.
  Titolo a sinistra, claim spostato a destra,
  paragrafo di nuovo allineato a sinistra sotto.
*/
.home-values__copy {
  min-width: 0;

  display: flex;
  flex-direction: column;
  align-self: stretch;
}

.home-values__copy .section-title {
  align-self: flex-end;
  text-align: right;
}

.home-values__headline {
  width: 100%;
  max-width: 430px;

  margin:
    42px
    0
    31px
    auto;

  color: var(--white);

  font-family: var(--font);
  font-size: clamp(29px, 2.35vw, 35px);
  line-height: 1.08;
  font-weight: 700;
  letter-spacing: -0.035em;

  text-align: right;
}

.home-values__headline span {
  color: var(--green);
}

.home-values__text {
  max-width: 430px;

  margin: 0 0 0 auto;

  color: rgba(255, 255, 255, 0.95);

  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  font-weight: 400;
  text-align: right;
}


/* ==========================================================
   8. AMBITI DI INTERVENTO
========================================================== */

.home-areas {
  padding: 76px 0 84px;

  background: var(--dark-soft);
  color: var(--white);
}

.home-areas__headline {
  margin: 41px 0 24px;

  color: var(--white);

  font-family: var(--font);
  font-size: clamp(28px, 2.35vw, 34px);
  line-height: 1.12;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.home-areas__headline span {
  color: var(--green);
}

.home-areas__intro {
  max-width: 1300px;

  margin: 0;

  color: rgba(255, 255, 255, 0.95);

  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  font-weight: 400;
}

.home-areas__cards {
  margin-top: 58px;

  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));

  gap: clamp(55px, 6vw, 96px);
}

.area-card {
  min-height: 305px;

  padding: 37px 35px 32px;

  border: 1px solid rgba(52, 64, 65, 0.24);
  border-radius: 14px;

  background: var(--white);
  color: var(--dark);

  box-shadow: 0 4px 7px rgba(21, 31, 29, 0.24);
}

.area-card__icon {
  width: 55px;
  height: 55px;

  margin-bottom: 20px;

  object-fit: contain;
  object-position: left center;
}

.area-card h3 {
  margin: 0 0 21px;

  color: #435357;

  font-family: var(--font);
  font-size: clamp(24px, 2vw, 30px);
  line-height: 1.08;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.area-card p {
  max-width: 590px;

  margin: 0;

  color: #354144;

  font-family: var(--font);
  font-size: 15px;
  line-height: 1.52;
  font-weight: 400;
}


/* ==========================================================
   9. DOVE OPERIAMO
========================================================== */

.home-territory {
  padding: 78px 0 68px;

  background: var(--white);
}

.home-territory__top {
  display: grid;

  grid-template-columns:
    minmax(480px, 0.76fr)
    minmax(0, 1.24fr);

  gap: clamp(55px, 6.5vw, 105px);
  align-items: center;
}

.home-territory__copy {
  max-width: 570px;
}

.home-territory__headline {
  margin: 40px 0 24px;

  color: var(--dark);

  font-family: var(--font);
  font-size: clamp(28px, 2.35vw, 34px);
  line-height: 1.12;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.home-territory__headline span {
  color: var(--green);
}

.home-territory__copy > p:not(.home-territory__headline) {
  margin: 0 0 19px;

  color: var(--dark-soft);

  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  font-weight: 400;
}

.home-territory__copy > p:last-child {
  margin-bottom: 0;
}

.home-territory__map {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.home-territory__map img {
  width: min(100%, 900px);
  max-height: 400px;

  object-fit: contain;
  transform: scale(1.12);
  transform-origin: center center;
}


/* ==========================================================
   10. LAVORI
========================================================== */

.home-projects {
  width: 100%;

  margin-top: 68px;

  padding:
    0
    var(--page-pad)
    22px;

  display: grid;

  grid-auto-flow: column;
  grid-auto-columns: clamp(470px, 34vw, 620px);

  gap: 38px;

  overflow-x: auto;
  overflow-y: hidden;

  scroll-snap-type: x proximity;

  scrollbar-width: thin;
  scrollbar-color: rgba(76, 91, 92, 0.25) transparent;
}

.home-projects::-webkit-scrollbar {
  height: 6px;
}

.home-projects::-webkit-scrollbar-track {
  background: transparent;
}

.home-projects::-webkit-scrollbar-thumb {
  border-radius: 999px;

  background: rgba(76, 91, 92, 0.24);
}

.project-card {
  position: relative;

  height: 285px;

  overflow: hidden;

  border-radius: 13px;

  background: #e5e9e6;

  box-shadow: 0 4px 10px rgba(40, 52, 53, 0.14);

  scroll-snap-align: center;
}

.project-card::after {
  content: "";

  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;

  height: 38%;

  pointer-events: none;

  background:
    linear-gradient(
      to top,
      rgba(20, 29, 30, 0.55),
      rgba(20, 29, 30, 0)
    );
}

.project-card img {
  width: 100%;
  height: 100%;

  object-fit: cover;
}

.project-card__label {
  position: absolute;
  z-index: 2;

  left: 21px;
  bottom: 16px;

  padding-bottom: 4px;

  display: inline-flex;
  align-items: center;

  gap: 7px;

  border-bottom: 1px solid var(--green);

  color: var(--white);

  font-family: var(--font);
  font-size: 13px;
  line-height: 1;
  font-weight: 600;
}

.project-card__pin {
  position: relative;

  width: 11px;
  height: 11px;

  border: 2px solid var(--green);
  border-radius: 50%;
}

.project-card__pin::after {
  content: "";

  position: absolute;

  left: 50%;
  bottom: -5px;

  width: 4px;
  height: 4px;

  border-right: 2px solid var(--green);
  border-bottom: 2px solid var(--green);

  transform: translateX(-50%) rotate(45deg);
}

.footer-divider {
  width: 100%;
  height: 32px;

  background: var(--dark);
}


/* ==========================================================
   11. FOOTER
   Lasciato coerente con le altre pagine.
========================================================== */

.site-footer {
  background: var(--white);
  color: var(--dark-soft);
}

.footer-main {
  width: 100%;
  min-height: 250px;

  padding: 28px 60px;

  display: grid;

  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-template-areas: "logo contatti social link";

  column-gap: 30px;
  align-items: center;

  background: var(--white);
}

.footer-brand {
  grid-area: logo;

  width: 100%;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.footer-address {
  grid-area: contatti;
}

.footer-social {
  grid-area: social;
}

.footer-links {
  grid-area: link;
}

.footer-symbol {
  width: 130px;
  height: auto;

  margin: 0 0 20px;
}

.footer-logo-text {
  color: var(--green);

  font-family: var(--font);
  font-size: 22px;
  line-height: 1;
  font-weight: 600;
  letter-spacing: 6px;

  white-space: nowrap;
}

.footer-address,
.footer-links,
.footer-social {
  width: max-content;
  max-width: 100%;

  justify-self: center;
  align-self: center;

  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
}

.footer-address {
  margin: 0;

  color: var(--dark-soft);

  font-family: var(--font);
  font-size: 18px;
  line-height: 1.4;
  font-style: normal;
  font-weight: 500;
}

.footer-address p {
  margin: 0 0 14px;
}

.footer-address p:last-child {
  margin-bottom: 0;
}

.footer-links h2,
.footer-social h2 {
  margin: 0 0 22px;

  color: var(--dark);

  font-family: var(--font);
  font-size: 20px;
  line-height: 1.2;
  font-weight: 800;
}

.footer-links a,
.footer-social a {
  margin: 0 0 16px;

  display: flex;
  align-items: center;

  gap: 9px;

  color: #454545;

  font-family: var(--font);
  font-size: 18px;
  line-height: 1.25;
  font-weight: 500;
}

.footer-links a:last-child,
.footer-social a:last-child {
  margin-bottom: 0;
}

.footer-links a:hover,
.footer-social a:hover {
  color: var(--green);
}

.social-svg {
  width: 19px;
  height: 19px;

  flex: 0 0 19px;
}

.social-svg svg {
  width: 100%;
  height: 100%;

  fill: var(--green);
}

.footer-bottom {
  height: 58px;
  min-height: 58px;

  padding: 0 60px;

  display: flex;
  align-items: center;
  justify-content: flex-end;

  background: var(--dark-soft);
  color: var(--white);
}

.footer-bottom a {
  color: var(--white);

  font-family: var(--font);
  font-size: 18px;
  line-height: 1;
  font-weight: 700;
}


/* ==========================================================
   12. LOADER
========================================================== */

#page-loader {
  position: fixed;
  inset: 0;

  z-index: 99999;

  display: flex;
  align-items: center;
  justify-content: center;

  background: var(--dark-soft);

  opacity: 1;
  visibility: visible;
  pointer-events: all;

  transition:
    opacity 0.8s ease,
    visibility 0.8s ease;
}

body.is-loaded #page-loader {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader-renix-house {
  position: relative;

  width: 118px;
  height: 116px;

  animation: loaderHouseBreath 3.4s ease-in-out infinite;
}

.loader-energy-ring {
  position: absolute;

  left: 50%;
  top: 57%;

  width: 145px;
  height: 145px;

  border-radius: 50%;

  background:
    radial-gradient(
      circle,
      rgba(216, 239, 208, 0.28) 0%,
      rgba(216, 239, 208, 0.10) 42%,
      rgba(216, 239, 208, 0) 72%
    );

  transform: translate(-50%, -50%);
}

.loader-house-roof {
  position: absolute;
  z-index: 2;

  left: 22px;
  top: 17px;

  width: 75px;
  height: 75px;

  border-top: 7px solid var(--white);
  border-left: 7px solid var(--white);
  border-radius: 6px 0 0;

  transform: rotate(45deg);
}

.loader-panel {
  position: absolute;

  width: 18px;
  height: 13px;

  border: 2px solid var(--green-light);
  border-radius: 2px;

  background: var(--dark);
}

.panel-1 {
  left: 17px;
  top: 12px;

  transform: rotate(-45deg);
}

.panel-2 {
  left: 37px;
  top: 12px;

  transform: rotate(-45deg);
}

.panel-3 {
  left: 57px;
  top: 12px;

  transform: rotate(-45deg);
}

.loader-house-base {
  position: absolute;
  z-index: 3;

  left: 26px;
  top: 59px;

  width: 66px;
  height: 46px;

  border: 6px solid var(--white);
  border-top: 0;
  border-radius: 0 0 8px 8px;
}

.loader-window {
  position: absolute;

  width: 10px;
  height: 10px;

  border-radius: 2px;

  background: var(--green-light);
}

.window-1 {
  left: 10px;
  top: 11px;
}

.window-2 {
  left: 27px;
  top: 11px;
}

.window-3 {
  left: 10px;
  top: 27px;
}

.window-4 {
  left: 27px;
  top: 27px;
}

.loader-door {
  position: absolute;

  right: 8px;
  bottom: 0;

  width: 12px;
  height: 24px;

  border-radius: 5px 5px 0 0;

  background: var(--green);
}

@keyframes loaderHouseBreath {
  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.04);
  }
}


/* ==========================================================
   13. TABLET
========================================================== */

@media (max-width: 1100px) {

  .home-about__grid {
    grid-template-columns:
      minmax(400px, 0.95fr)
      minmax(0, 1.05fr);

    gap: 38px;
  }

  .home-about__visual {
    height: 410px;
  }

  .home-values__grid {
    grid-template-columns:
      repeat(3, minmax(0, 1fr));

    gap: 28px;
  }

  .home-values__copy {
    grid-column: 1 / -1;
    grid-row: 1;

    max-width: 620px;

    margin-bottom: 12px;
  }

  .home-values__headline {
    width: 100%;
    max-width: 430px;
    margin-left: auto;
    margin-right: 0;
    text-align: right;
  }

  .home-values__copy .section-title {
    align-self: flex-end;
  }

  .home-values__text {
    margin-left: auto;
    text-align: right;
  }

  .home-areas__cards {
    gap: 34px;
  }

  .home-territory__top {
    grid-template-columns:
      minmax(400px, 0.9fr)
      minmax(0, 1.1fr);

    gap: 40px;
  }

  .home-territory__map img {
    width: min(100%, 760px);
    transform: scale(1.08);
  }
}


/* ==========================================================
   14. MOBILE / TABLET STRETTO
========================================================== */

@media (max-width: 780px) {

  :root {
    --page-pad: 22px;
  }

  .site-header,
  .site-header.header-compact {
    top: 10px;
    left: 10px;
    right: 10px;

    width: calc(100% - 20px);
    height: 64px;

    border-radius: 10px;
  }

  .header-inner,
  .site-header.header-compact .header-inner {
    height: 64px;
    min-height: 64px;

    padding: 0 14px;

    gap: 8px;
  }

  .brand,
  .site-header.header-compact .brand {
    width: 110px;
    min-width: 110px;
    height: auto;

    flex: 0 0 110px;
  }

  .brand-logo {
    width: 110px;
    height: auto;
  }

  .menu-toggle {
    display: none;
  }

  .main-nav,
  .site-header.header-compact .main-nav {
    flex: 1 1 auto;

    height: auto;

    gap: 4px;
  }

  .main-nav a,
  .site-header.header-compact .main-nav a {
    height: 34px;

    padding: 0 6px;

    border-radius: 0;

    font-size: 11px;

    white-space: nowrap;
  }

  .main-nav a.is-active,
  .site-header.header-compact .main-nav a.is-active {
    width: 64px;
    min-width: 64px;
    max-width: 64px;

    height: 34px;

    padding: 0;

    border-radius: 8px;
  }

  .home-hero {
    height: 590px;

    background-position: 62% center;
  }

  .home-hero__inner {
    padding-left: 22px;
    padding-right: 22px;

    align-items: flex-end;

    padding-bottom: 48px;
  }

  .home-hero__content {
    transform: none;
  }

  .home-hero h1 {
    font-size: clamp(34px, 10vw, 44px);
  }

  .home-hero p {
    font-size: 16px;
  }

  .home-hero__button {
    width: 100%;
    min-width: 0;
    min-height: 48px;
  }

  .home-about {
    padding: 58px 0 62px;
  }

  .home-about__grid {
    grid-template-columns: 1fr;

    gap: 36px;
  }

  .home-about__text {
    max-width: none;
  }

  .home-about__visual {
    width: 100%;
    height: auto;

    grid-template-columns: 1fr;
    grid-template-rows: auto;

    gap: 12px;
  }

  .home-about__main-photo,
  .home-about__detail-photo,
  .home-about__stats {
    grid-column: auto;
    grid-row: auto;
  }

  .home-about__main-photo {
    aspect-ratio: 4 / 5;
  }

  .home-about__detail-photo {
    aspect-ratio: 16 / 9;
  }

  .home-about__stats {
    min-height: 220px;
  }

  .home-values {
    padding: 58px 0 62px;
  }

  .home-values__grid {
    grid-template-columns: 1fr;

    gap: 42px;
  }

  .home-values__copy {
    grid-column: auto;
    grid-row: 1;

    width: 100%;
    max-width: none;

    margin-bottom: 6px;
  }

  .home-values__headline {
    width: 78%;
    max-width: 330px;

    margin:
      38px
      0
      30px
      auto;

    text-align: right;
  }

  .home-values__text {
    max-width: 420px;

    font-size: 15px;
  }

  .value-card__number {
    height: 112px;
  }

  .value-card h3 {
    font-size: 18px;
  }

  .value-card p {
    max-width: 270px;

    font-size: 13px;
  }

  .home-areas {
    padding: 58px 0 64px;
  }

  .home-areas__cards {
    margin-top: 42px;

    grid-template-columns: 1fr;

    gap: 26px;
  }

  .area-card {
    min-height: 245px;

    padding: 32px 27px 27px;
  }

  .home-territory {
    padding: 58px 0 50px;
  }

  .home-territory__top {
    grid-template-columns: 1fr;

    gap: 38px;
  }

  .home-territory__copy {
    max-width: none;
  }

  .home-territory__map {
    justify-content: center;
  }

  .home-territory__map img {
    width: min(100%, 620px);
    transform: none;
  }

  .home-projects {
    margin-top: 48px;

    padding-left: 22px;
    padding-right: 22px;

    grid-auto-columns: 82vw;

    gap: 18px;
  }

  .project-card {
    height: auto;

    aspect-ratio: 1.65 / 1;
  }

  /* Footer mobile come già impostato sul resto del sito */
  .footer-main {
    min-height: 170px;

    padding: 24px 14px;

    grid-template-columns:
      1.05fr
      1.35fr
      0.9fr
      0.8fr;

    grid-template-areas:
      "logo contatti social link";

    column-gap: 14px;
  }

  .footer-symbol {
    width: 70px;

    margin-bottom: 10px;
  }

  .footer-logo-text {
    font-size: 10px;
    letter-spacing: 2px;
  }

  .footer-address {
    font-size: 9px;
  }

  .footer-address p {
    margin-bottom: 7px;
  }

  .footer-links h2,
  .footer-social h2 {
    margin-bottom: 10px;

    font-size: 10px;
  }

  .footer-links a,
  .footer-social a {
    margin-bottom: 7px;

    gap: 5px;

    font-size: 9px;

    white-space: nowrap;
  }

  .social-svg {
    width: 13px;
    height: 13px;

    flex-basis: 13px;
  }

  .footer-bottom {
    height: 46px;
    min-height: 46px;

    padding: 0 16px;
  }

  .footer-bottom a {
    font-size: 11px;
  }
}


/* ==========================================================
   15. TELEFONI PICCOLI
========================================================== */

@media (max-width: 390px) {

  .header-inner {
    padding-inline: 10px;

    gap: 5px;
  }

  .brand,
  .site-header.header-compact .brand {
    width: 85px;
    min-width: 85px;

    flex-basis: 85px;
  }

  .brand-logo {
    width: 85px;
  }

  .main-nav a,
  .site-header.header-compact .main-nav a {
    padding-inline: 3px;

    font-size: 8.4px;
  }

  .home-values__headline {
    width: 84%;
  }

  .home-about__stats {
    padding-inline: 18px;
  }

  .home-about__stats-grid {
    gap: 4px;
  }
}


/* ==========================================================
   16. ACCESSIBILITÀ
========================================================== */

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--green);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {

  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}


/* ==========================================================
   MOBILE — rifiniture Home
========================================================== */

.home-hero__subtitle span {
  display: block;
}

@media (max-width: 780px) {

  /* Due righe reali, non tre: manteniamo ogni riga indivisibile. */
  .home-hero__subtitle {
    max-width: 100%;
    margin-right: 0;
    font-size: clamp(12.5px, 3.55vw, 14.5px) !important;
    line-height: 1.45 !important;
    letter-spacing: -0.018em;
  }

  .home-hero__subtitle span {
    display: block;
    white-space: nowrap;
  }

  /* Il riquadro/grigio attorno alla foto dettaglio non serve su mobile. */
  .home-about__detail-photo {
    background: transparent !important;
    box-shadow: none !important;
  }
}

@media (max-width: 340px) {
  .home-hero__subtitle {
    font-size: 12px !important;
  }
}


/* ==========================================================
   CHI SIAMO — FOTO DESTRA
========================================================== */

.home-about__detail-photo,
.home-about__second-photo {
  margin: 0 !important;

  overflow: hidden !important;

  border-radius: 16px !important;
  background: transparent !important;

  box-shadow: var(--shadow) !important;
}

.home-about__detail-photo {
  grid-column: 2 !important;
  grid-row: 1 !important;
}

.home-about__second-photo {
  grid-column: 2 !important;
  grid-row: 2 !important;
}

.home-about__detail-photo img,
.home-about__second-photo img {
  display: block !important;

  width: 100% !important;
  height: 100% !important;

  object-fit: cover !important;
  object-position: center !important;

  border-radius: 0 !important;
  box-shadow: none !important;
}


/* MOBILE */
@media (max-width: 780px) {

  .home-about__detail-photo,
  .home-about__second-photo {
    grid-column: auto !important;
    grid-row: auto !important;

    width: 100% !important;
  }

  /* prima foto più panoramica */
  .home-about__detail-photo {
    aspect-ratio: 16 / 9 !important;
  }

  /* seconda foto mantiene meglio lo scatto originale */
  .home-about__second-photo {
    aspect-ratio: 3 / 2 !important;
  }

}