/* Home: sezione "L'essenza" sotto l'apertura, con i contenuti del sito bispace.it. */

.home-about {
  --ha-text: #262626;
  --ha-muted: #6b6b6b;
  --ha-line: rgba(38, 38, 38, 0.12);
  --ha-card: #ffffff;
  --ha-accent: #8c0c0c;
  --ha-accent-soft: rgba(128, 8, 8, 0.08);
  --ha-shell: min(1320px, calc(100vw - 32px));

  padding: clamp(72px, 10vw, 140px) 0 clamp(64px, 9vw, 120px);
  color: var(--ha-text);
  font-family: Inter, sans-serif;
}

body[data-theme="dark"] .home-about {
  --ha-text: #f2f2f2;
  --ha-muted: #a3a3a3;
  --ha-line: rgba(255, 255, 255, 0.12);
  --ha-card: #2b2b2b;
  --ha-accent: #e05252;
  --ha-accent-soft: rgba(224, 82, 82, 0.12);
}

.home-about__shell {
  width: var(--ha-shell);
  margin: 0 auto;
}

.home-about h2,
.home-about h3 {
  margin: 0;
  font-family: Poppins, sans-serif;
  font-weight: 700;
  color: var(--ha-text);
}

.home-about__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 20px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ha-muted);
}

.home-about__eyebrow::before {
  content: "";
  width: 10px;
  height: 10px;
  background: var(--ha-accent);
}

/* ------------------------------------------------------------ essenza */

.home-essence {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(32px, 6vw, 96px);
  align-items: start;
}

/* il testo di destra parte all'altezza del titolo, non dell'etichetta sopra */
.home-essence > div:last-child {
  padding-top: 52px;
}

.home-essence__title {
  font-size: clamp(38px, 5.4vw, 76px);
  line-height: 1.02;
  letter-spacing: -0.03em;
}

.home-essence__title span {
  color: var(--ha-accent);
}

.home-essence__lead {
  margin: 0 0 32px;
  font-size: clamp(18px, 1.5vw, 21px);
  line-height: 1.6;
  color: var(--ha-muted);
}

.home-essence__lead strong {
  color: var(--ha-text);
  font-weight: 600;
}

.home-pillars {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.home-pillar {
  padding: 18px 22px;
  border: 1px solid var(--ha-line);
  border-radius: 20px;
  background: var(--ha-card);
  transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.4s ease, border-color 0.4s ease;
}

.home-pillar:hover {
  transform: translateY(-4px);
  border-color: transparent;
  box-shadow: 0 24px 50px -28px rgba(20, 20, 20, 0.35);
}

.home-pillar__num {
  display: block;
  margin-bottom: 10px;
  font-family: Poppins, sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: var(--ha-accent);
}

.home-pillar h3 {
  font-size: 20px;
  margin-bottom: 2px;
}

.home-pillar p {
  margin: 0;
  font-size: 15px;
  color: var(--ha-muted);
}

.home-essence__note {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 28px 0 0;
  font-size: 15px;
  font-weight: 500;
}

.home-essence__note::before {
  content: "";
  flex: none;
  width: 8px;
  height: 8px;
  background: var(--ha-accent);
}

/* ------------------------------------------------------------ servizi */

.home-block {
  margin-top: clamp(72px, 9vw, 120px);
}

.home-block__head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 20px;
  margin-bottom: 24px;
}

.home-block__head h2 {
  font-size: clamp(28px, 3.2vw, 44px);
  letter-spacing: -0.02em;
}

.home-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ha-text);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.home-link svg {
  width: 18px;
  height: 18px;
  transition: transform 0.3s ease;
}

.home-link:hover {
  color: var(--ha-accent);
}

.home-link:hover svg {
  transform: translateX(4px);
}

.home-services {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--ha-line);
}

.home-services a {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) 20px;
  gap: 12px;
  align-items: start;
  height: 100%;
  padding: 26px 20px 26px 0;
  border-bottom: 1px solid var(--ha-line);
  color: var(--ha-text);
  text-decoration: none;
  transition: background 0.3s ease;
}

.home-services li:nth-child(3n + 2) a,
.home-services li:nth-child(3n + 3) a {
  padding-left: 20px;
  border-left: 1px solid var(--ha-line);
}

.home-services__num {
  padding-top: 4px;
  font-family: Poppins, sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: var(--ha-muted);
}

.home-services__name {
  display: block;
  font-family: Poppins, sans-serif;
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.home-services__desc {
  display: block;
  margin-top: 4px;
  font-size: 15px;
  line-height: 1.5;
  color: var(--ha-muted);
}

.home-services svg {
  width: 18px;
  height: 18px;
  margin-top: 5px;
  color: var(--ha-muted);
  transition: transform 0.3s ease, color 0.3s ease;
}

.home-services a:hover .home-services__name,
.home-services a:hover svg {
  color: var(--ha-accent);
}

.home-services a:hover svg {
  transform: rotate(-45deg);
}

/* ------------------------------------------------------------ clienti */

.home-clients {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.home-clients a {
  display: block;
  aspect-ratio: 1 / 1;
  border-radius: 18px;
  overflow: hidden;
  background: var(--ha-card);
  transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.4s ease;
}

.home-clients img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.home-clients a:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 50px -28px rgba(20, 20, 20, 0.4);
}

.home-clients a:hover img {
  transform: scale(1.05);
}

/* ------------------------------------------------------------ responsive */

@media (max-width: 1000px) {
  .home-essence {
    grid-template-columns: 1fr;
  }
  .home-essence > div:last-child {
    padding-top: 0;
  }
  .home-services {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .home-services li:nth-child(3n + 2) a,
  .home-services li:nth-child(3n + 3) a {
    padding-left: 0;
    border-left: 0;
  }
  .home-services li:nth-child(2n) a {
    padding-left: 20px;
    border-left: 1px solid var(--ha-line);
  }
  .home-clients {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .home-pillars,
  .home-services {
    grid-template-columns: 1fr;
  }
  .home-services li:nth-child(n) a {
    padding-left: 0;
    border-left: 0;
  }
  .home-block__head {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Titolo in apertura: parole chiave e punto finale nello stesso rosso
   dei punti dei titoli nel resto del sito. */
.bs-red {
  color: #8c0c0c;
}

body[data-theme="dark"] .bs-red {
  color: #e05252;
}
