/* ==========================================================================
   ECOB Consulting, layer di uniformazione grafica
   Caricato dopo il CSS generato: sfondo continuo, animazioni discrete,
   alternanza visiva della pagina Diagnosi, blocco finale form/footer.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. SFONDO CONTINUO
   Lo sfondo del body (#0b0d10) viene propagato al canvas, quindi questi due
   livelli fissi restano dietro ai contenuti in flusso e davanti al nero pieno.
   Nessuna sezione resta piu' su fondo completamente vuoto.
   -------------------------------------------------------------------------- */
html::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background-image:
    radial-gradient(1100px 720px at 78% 6%, rgba(135, 117, 214, 0.13), transparent 60%),
    radial-gradient(900px 620px at 6% 94%, rgba(58, 71, 80, 0.20), transparent 64%),
    linear-gradient(180deg, rgba(11, 13, 16, 0.905) 0%, rgba(11, 13, 16, 0.945) 48%, rgba(11, 13, 16, 0.975) 100%),
    url("/images/skyline-bg.jpg");
  background-repeat: no-repeat;
  background-size: cover, cover, cover, cover;
  background-position: center, center, center, center top;
}

/* Pulviscolo animato: due trame di pallini con passo 92px e 184px, cosi' lo
   spostamento di un tile intero chiude il ciclo senza scatti. */
html::after {
  content: "";
  position: fixed;
  top: -184px;
  left: -184px;
  width: calc(100% + 368px);
  height: calc(100% + 368px);
  z-index: -1;
  pointer-events: none;
  opacity: 0.45;
  background-image:
    radial-gradient(rgba(135, 117, 214, 0.34) 1.1px, transparent 1.2px),
    radial-gradient(rgba(242, 239, 233, 0.12) 1px, transparent 1.1px);
  background-size: 92px 92px, 184px 184px;
  background-position: 0 0, 46px 74px;
  animation: ecob-drift 58s linear infinite;
  will-change: transform;
}

@keyframes ecob-drift {
  from { transform: translate3d(0, 0, 0); }
  to   { transform: translate3d(184px, 184px, 0); }
}

/* Home: sfumatura in coda alla sequenza fotografica agganciata (pin a 360svh),
   per togliere il taglio netto verso le sezioni successive. */
div[style*="360svh"] > div[style*="100svh"]::after,
div[style*="360svh"] .pin-spacer > div.overflow-hidden::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 46vh;
  z-index: 5;
  pointer-events: none;
  background: linear-gradient(180deg,
    rgba(11, 13, 16, 0) 0%,
    rgba(11, 13, 16, 0.10) 46%,
    rgba(11, 13, 16, 0.52) 76%,
    rgba(11, 13, 16, 0.88) 92%,
    rgba(11, 13, 16, 0.985) 100%);
}

/* Prima sezione dopo la sequenza fotografica: raccordo verso l'alto. */
.ecob-page-home main section.section-block:first-of-type {
  border-top-color: transparent;
  background-image: linear-gradient(180deg, rgba(11, 13, 16, 0.92) 0%, rgba(11, 13, 16, 0) 55%);
}

/* --------------------------------------------------------------------------
   2. ANIMAZIONI DI INGRESSO (discrete)
   Le classi vengono applicate da ecob-enhance.js: senza JS nulla viene nascosto.
   -------------------------------------------------------------------------- */
.ecob-reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.75s cubic-bezier(0.22, 0.61, 0.36, 1),
              transform 0.75s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.ecob-reveal.ecob-in {
  opacity: 1;
  transform: none;
}

.ecob-reveal [class*="grid-cols"] > *,
.ecob-reveal ul > li {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.ecob-reveal.ecob-in [class*="grid-cols"] > *,
.ecob-reveal.ecob-in ul > li {
  opacity: 1;
  transform: none;
}

.ecob-reveal.ecob-in [class*="grid-cols"] > *:nth-child(1),
.ecob-reveal.ecob-in ul > li:nth-child(1) { transition-delay: 0.06s; }
.ecob-reveal.ecob-in [class*="grid-cols"] > *:nth-child(2),
.ecob-reveal.ecob-in ul > li:nth-child(2) { transition-delay: 0.12s; }
.ecob-reveal.ecob-in [class*="grid-cols"] > *:nth-child(3),
.ecob-reveal.ecob-in ul > li:nth-child(3) { transition-delay: 0.18s; }
.ecob-reveal.ecob-in [class*="grid-cols"] > *:nth-child(4),
.ecob-reveal.ecob-in ul > li:nth-child(4) { transition-delay: 0.24s; }
.ecob-reveal.ecob-in [class*="grid-cols"] > *:nth-child(5),
.ecob-reveal.ecob-in ul > li:nth-child(5) { transition-delay: 0.30s; }
.ecob-reveal.ecob-in [class*="grid-cols"] > *:nth-child(6),
.ecob-reveal.ecob-in ul > li:nth-child(6) { transition-delay: 0.36s; }
.ecob-reveal.ecob-in [class*="grid-cols"] > *:nth-child(n + 7),
.ecob-reveal.ecob-in ul > li:nth-child(n + 7) { transition-delay: 0.42s; }

/* Micro rilievo sulle card delle pagine interne. */
.ecob-page main [class*="grid-cols"] > a,
.ecob-page main ul > li[class*="border-blueprint"] {
  transition: transform 0.35s ease, border-color 0.35s ease, background-color 0.35s ease;
}

.ecob-page main [class*="grid-cols"] > a:hover,
.ecob-page main ul > li[class*="border-blueprint"]:hover {
  transform: translateY(-3px);
}

/* --------------------------------------------------------------------------
   3. DOPPIA CALL TO ACTION
   -------------------------------------------------------------------------- */
.ecob-cta-pair {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  gap: 0.75rem;
}

@media (min-width: 640px) {
  .ecob-cta-pair {
    flex-direction: row;
    align-items: center;
    gap: 1rem;
  }
}

@media (min-width: 640px) {
  .ecob-cta-pair.ecob-cta-start { justify-content: flex-start; }
}

/* Chiusura degli articoli Insights, che prima non portavano da nessuna parte. */
.ecob-article-cta {
  margin-top: 3.5rem;
  padding-top: 2.5rem;
  border-top: 1px solid rgba(58, 71, 80, 0.45);
}

.ecob-cta-alt {
  display: inline-block;
  margin-top: 1.5rem;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #9ca3af;
  transition: color 0.25s ease;
}

.ecob-cta-alt:hover { color: #f2efe9; }

/* --------------------------------------------------------------------------
   4. PAGINA DIAGNOSI, alternanza visiva fra i blocchi di testo
   -------------------------------------------------------------------------- */
.ecob-page-diagnosi main section.section-block:nth-of-type(2n) {
  position: relative;
  background-color: rgba(21, 24, 28, 0.72);
  border-top-color: rgba(135, 117, 214, 0.30);
  box-shadow: inset 0 1px 0 rgba(135, 117, 214, 0.10);
}

.ecob-page-diagnosi main section.section-block:nth-of-type(2n)::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  width: 96px;
  height: 2px;
  background: #8775d6;
  opacity: 0.75;
}

.ecob-page-diagnosi main section.section-block:nth-of-type(2n + 1) {
  background-color: rgba(11, 13, 16, 0.55);
}

/* --------------------------------------------------------------------------
   5. PAGINA DIAGNOSI, blocco finale: CTA + form + footer
   -------------------------------------------------------------------------- */
.ecob-page-diagnosi main section.section-block#richiesta {
  background-color: transparent;
  border-top: 0;
  padding-block-start: 0;
  padding-block-end: 5rem;
}

.ecob-page-diagnosi #richiesta::before { content: none; }

.ecob-page-diagnosi #richiesta > .grid-shell {
  border: 1px solid rgba(58, 71, 80, 0.55);
  border-radius: 3px;
  background: linear-gradient(180deg, rgba(21, 24, 28, 0.94) 0%, rgba(11, 13, 16, 0.94) 100%);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.42);
  padding: 2.25rem 1.5rem;
}

@media (max-width: 767px) {
  .ecob-page-diagnosi #richiesta > .grid-shell {
    width: calc(100% - 2rem);
    padding: 1.75rem 1.25rem;
  }
}

@media (min-width: 768px) {
  .ecob-page-diagnosi #richiesta > .grid-shell {
    padding: 3.25rem 3rem;
    align-items: center;
  }
}

.ecob-page-diagnosi #richiesta form { max-width: none; }

.ecob-page-diagnosi #richiesta form button[type="submit"] {
  width: 100%;
  justify-content: center;
  margin-top: 0.5rem;
}

@media (min-width: 640px) {
  .ecob-page-diagnosi #richiesta form button[type="submit"] { width: auto; }
}

/* La sezione CTA che precede il form chiude senza stacco verso il pannello. */
.ecob-page-diagnosi main section.ecob-pre-form {
  padding-block-end: 3.5rem;
}

/* Raccordo verso il footer, su tutte le pagine. */
.ecob-page footer {
  position: relative;
  border-top-color: rgba(135, 117, 214, 0.22);
  background-color: rgba(11, 13, 16, 0.96);
}

.ecob-page footer::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 50%;
  transform: translateX(-50%);
  width: min(80rem, 100%);
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(135, 117, 214, 0.45), transparent);
}

/* --------------------------------------------------------------------------
   6. Marchio: il logo e' un quadrato stondato, non un tondo. Si corregge il
   contenitore senza toccare il markup dell'intestazione.
   -------------------------------------------------------------------------- */
.ecob-page header span.rounded-full.bg-paper {
  border-radius: 9px;
  padding: 0.3rem;
}

/* --------------------------------------------------------------------------
   7. Menu con la voce "Fa per te" in piu': si evita che l'intestazione
   cresca in altezza sui formati ridotti.
   -------------------------------------------------------------------------- */
@media (max-width: 1000px) {
  .ecob-page header nav ul { column-gap: 1.1rem; }
}

@media (max-width: 767px) {
  .ecob-page header > div {
    flex-wrap: wrap;
    row-gap: 0.85rem;
  }

  .ecob-page header nav {
    width: 100%;
    min-width: 0;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    -webkit-mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 20px), transparent 100%);
    mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 20px), transparent 100%);
  }

  .ecob-page header nav::-webkit-scrollbar { display: none; }

  .ecob-page header nav ul {
    flex-wrap: nowrap;
    column-gap: 1.25rem;
    padding-inline-end: 1.25rem;
  }

  .ecob-page header nav ul li { white-space: nowrap; }
}
