:root {
  color-scheme: dark;
  --text-color: #f6f1e6;
  --shadow-color: rgba(0, 0, 0, 0.25);
  --stack-gap: 40px;
  --stack-gap-mobile: 20px;
  /* Breakpoints moderni */
  --bp-sm: 360px;  /* small phones */
  --bp-md: 480px;  /* large phones */
  --bp-lg: 820px;  /* tablets */
  --bp-xl: 1280px; /* desktop */
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: 'Montserrat', sans-serif;
  color: var(--text-color);
  background: radial-gradient(circle at top, rgba(255,255,255,0.13), transparent 30%), linear-gradient(180deg, rgba(0,0,0,0.08), rgba(0,0,0,0.55));
  background-blend-mode: overlay;
}

.page-wrapper {
  min-height: 100vh;
  padding: 60px 35px;
  display: grid;
  place-items: center;
  background-image: url("img/background-home.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.main-nav {
  display: flex;
  gap: 42px;
  justify-content: center;
  font-family: 'Damion', cursive;
  font-size: 1.15rem;
  margin: 0;
  position: absolute;
  right: 12px;
  bottom: 100%;
  margin-bottom: 0.8rem;
  transform: translateY(100px);
  white-space: nowrap;
  z-index: 5;
}

.main-nav a {
  color: #F8F5E8;
  text-decoration: none;
  letter-spacing: 0.02em;
}

.hero {
  text-align: center;
  max-width: 1000px;
  width: min(100%, 920px);
  position: relative;
  transform: translateY(-50px); /* Trasla tutto il blocco più in alto per centrarlo perfettamente */
}

.hero-head {
  display: inline-block;
  position: relative;
}

.hero h1 {
  margin: 0;
  color: #F8F5E8;
  font-size: clamp(4.8rem, 9vw, 9.5rem);
  letter-spacing: 0.1em;
  line-height: 0.9;
  text-transform: uppercase;
  text-shadow: 0 18px 32px var(--shadow-color);
  transform: translateY(90px);
}

.subtitle {
  margin: calc(var(--stack-gap) + 40px) auto 0;
  color: #F8F5E8;
  font-family: 'Montserrat', sans-serif;
  font-weight: 400;
  font-size: clamp(1rem, 1.375vw, 1.5rem);
  letter-spacing: 0.04em;
  transform: translateY(30px);
}

.subtitle a,
.subtitle a:visited {
  color: #F8F5E8;
  text-decoration: none;
}

.social-links {
  margin: calc(var(--stack-gap) + 40px) auto 0;
  display: flex;
  justify-content: center;
  gap: 50px;
  transform: translateY(10px);
}

.social-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: none;
  padding: 0;
  margin: 0;
}

.social-links img {
  display: block;
  width: 30px; 
  height: auto;
  object-fit: contain;
  cursor: pointer;
}

/* Mobile & Tablet (易 819px) */
@media (max-width: 819px) {
  .page-wrapper {
    padding: 40px 20px;
  }

  .main-nav {
    gap: 18px;
    font-size: 0.95rem;
    position: absolute;
    right: 8px;
    bottom: 100%;
    margin-bottom: 0.6rem;
  }

  .hero h1 {
    font-size: clamp(3rem, 12vw, 5.5rem);
  }

  .subtitle {
    margin-top: calc(var(--stack-gap-mobile) + 50px);
    font-size: clamp(0.75rem, 1.5vw, 1.2rem);
  }

  .social-links {
    margin-top: calc(var(--stack-gap-mobile) + 60px);
    transform: translateY(-10px);
  }
}

/* Tablets / Small Laptops (820px - 1279px) */
@media (min-width: 820px) and (max-width: 1279px) {
  .page-wrapper {
    padding: 60px 30px;
  }

  .main-nav {
    gap: 32px;
    font-size: 1.05rem;
    position: absolute;
    right: 12px;
    bottom: 100%;
    margin-bottom: 0.8rem;
  }

  .hero h1 {
    font-size: clamp(4.5rem, 8vw, 8rem);
  }

  .subtitle {
    margin-top: calc(var(--stack-gap) + 50px);
    font-size: clamp(0.9rem, 1.25vw, 1.4rem);
  }

  .social-links {
    margin-top: calc(var(--stack-gap) + 50px);
    transform: translateY(0px);
  }
}

/* Desktop (1280px+) */
@media (min-width: 1280px) {
  .page-wrapper {
    padding: 60px 50px;
  }

  .main-nav {
    gap: 42px;
    font-size: 1.15rem;
    position: absolute;
    right: 12px;
    bottom: 100%;
    margin-bottom: 0.8rem;
  }

  .hero h1 {
    font-size: clamp(5.5rem, 9vw, 9.5rem);
  }

  .subtitle {
    font-size: clamp(1rem, 1.375vw, 1.5rem);
  }

  .social-links {
    transform: translateY(10px);
  }
}

/* Pagina Clienti */
.clienti-wrapper {
  width: 100vw;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgb(12, 18, 24);
  overflow: hidden;
}

.clienti-frame {
  position: relative;
  width: 100%;
  height: 100%;
  background-image: url("img/background-clients.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  container-type: inline-size;
}

.clienti-back {
  position: absolute;
  top: 5%;
  left: 5%;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #F8F5E8;
  text-decoration: none;
  font-family: 'Damion', cursive;
  font-size: 1.15rem;
}

.clienti-back-arrow {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.1em;
  line-height: 1;
}

.logos-grid {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90%;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  column-gap: 2cqw;
  row-gap: 2.4cqw;
  align-items: center;
  justify-items: center;
}

.logo-item {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-width: 0;
  height: 7.2cqw;
}

.logo-item img {
  max-width: 100%;
  width: auto;
  height: auto;
  max-height: 6cqw;
  object-fit: contain;
  filter: url(#recolor-cream);
}

@media (max-width: 819px) {
  .logos-grid {
    grid-template-columns: repeat(3, 1fr);
    column-gap: 3.5cqw;
    row-gap: 4cqw;
  }

  .logo-item {
    height: 12cqw;
  }

  .logo-item img {
    max-height: 9.5cqw;
  }
}