/* ============================================================
   Luca Olovrap — v2
   Layer estetico sopra ../css/styles.css:
   sfondo continuo, superfici in vetro, componenti ridisegnati.
   ============================================================ */

/* ---------- 1. SFONDO CONTINUO ---------- */

body.v2 {
  background-color: var(--bg);
  background-image:
    linear-gradient(180deg,
      #04101f 0%,
      #061a30 18%,
      #081f38 38%,
      #07182c 58%,
      #051224 78%,
      #040d1a 100%);
}

/* auree luminose fisse: danno profondità senza interrompere lo sfondo */
body.v2::before,
body.v2::after {
  content: "";
  position: fixed;
  inset: auto;
  z-index: 0;
  pointer-events: none;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.5;
}
body.v2::before {
  width: 720px;
  height: 720px;
  left: -220px;
  top: 8vh;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.28), transparent 65%);
}
body.v2::after {
  width: 820px;
  height: 820px;
  right: -280px;
  top: 46vh;
  background: radial-gradient(circle, rgba(124, 58, 237, 0.16), transparent 65%);
}

body.v2 main { position: relative; z-index: 1; }

/* nessuna sezione cambia colore: la pagina è un unico flusso */
body.v2 .section,
body.v2 .section--soft,
body.v2 .section--dark,
body.v2 .hero,
body.v2 .site-footer {
  background: transparent !important;
}

/* la CTA finale aveva un gradiente inline: qui si dissolve nello sfondo */
body.v2 .section[style] {
  background: transparent !important;
  position: relative;
}
body.v2 .section[style]::before {
  content: "";
  position: absolute;
  inset: 10% 0;
  background: radial-gradient(60% 80% at 50% 50%, rgba(37, 99, 235, 0.14), transparent 70%);
  pointer-events: none;
}

/* footer: solo una linea di separazione soffusa */
body.v2 .site-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

/* ritmo verticale uniforme */
body.v2 .section { padding: 92px 0; }

/* ---------- 2. HEADER IN VETRO (potenziato) ---------- */

body.v2 .site-header {
  background: rgba(4, 12, 24, 0.55);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
body.v2 .site-header.is-scrolled {
  background: rgba(3, 10, 20, 0.72);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

/* ---------- 3. SUPERFICI IN VETRO ---------- */

body.v2 .card,
body.v2 .widget,
body.v2 .pipe-detail,
body.v2 .principle,
body.v2 .about-photo,
body.v2 .metric-ph,
body.v2 .case-block {
  background: linear-gradient(155deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.02));
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 20px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.07),
    0 18px 40px rgba(2, 8, 18, 0.35);
}

body.v2 .card:hover,
body.v2 .principle:hover {
  border-color: rgba(127, 176, 255, 0.35);
  transform: translateY(-3px);
  transition: transform 0.25s ease, border-color 0.25s ease;
}

/* hero-portrait e form */
body.v2 .hero-portrait {
  background: linear-gradient(155deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.09);
}
body.v2 .form-card {
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: linear-gradient(155deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
  border: 1px solid rgba(255, 255, 255, 0.09);
  box-shadow: 0 24px 60px rgba(2, 8, 18, 0.45);
}

/* i mock delle SERP restano "app reali": leggermente più trasparenti ma solidi */
body.v2 .surface-frame {
  box-shadow: 0 30px 70px rgba(2, 8, 18, 0.5);
}

/* ---------- 4. CLIENTI: LOGHI SENZA RIQUADRI + KPI ---------- */

.client-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 18px;
}

.client-cell {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 24px 24px 20px;
  background: linear-gradient(155deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.02));
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 22px;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.client-cell:hover {
  transform: translateY(-4px);
  border-color: rgba(127, 176, 255, 0.4);
  box-shadow: 0 22px 50px rgba(2, 8, 18, 0.45);
}

.lw {
  height: 42px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  object-position: left;
  margin-bottom: 6px;
}
.lw--mono {
  /* normalizza i loghi scuri a bianco, senza riquadri */
  filter: brightness(0) invert(1);
  opacity: 0.92;
}
.lw--color { opacity: 0.98; }

.cc-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.cc-meta h3 {
  margin: 0;
  font-size: 1rem;
  letter-spacing: 0.01em;
}
.cc-meta .chip { flex: none; }

.client-cell > p {
  margin: 0;
  font-size: 16px;
  color: var(--ink-2);
}

.client-kpi {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px dashed rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.ck-val {
  font-size: 1.7rem;
  font-weight: 800;
  color: var(--blue-300);
  letter-spacing: -0.02em;
}
.ck-val::before {
  content: "▲";
  font-size: 16px;
  margin-right: 6px;
  color: #4ade80;
}
.ck-label {
  font-size: 16px;
  line-height: 1.35;
  color: var(--ink-3);
}

.grid-note {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 20px 0 0;
  font-size: 16px;
  color: var(--ink-3);
}
.grid-note .chip { flex: none; }

/* ---------- 5. COMPETENZE: BENTO GRID ---------- */

.bento {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.bento-cell {
  padding: 26px 24px;
  background: linear-gradient(155deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.02));
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 22px;
  transition: transform 0.25s ease, border-color 0.25s ease;
}
.bento-cell:hover { transform: translateY(-4px); border-color: rgba(127, 176, 255, 0.4); }

.bento--wide { grid-column: span 2; }

.bento--glow {
  background:
    radial-gradient(120% 140% at 100% 0%, rgba(37, 99, 235, 0.22), transparent 55%),
    linear-gradient(155deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.02));
  border-color: rgba(127, 176, 255, 0.35);
}

.bento-cell .card-icon { margin-bottom: 14px; color: var(--blue-300); }
.bento-cell h3 { font-size: 1.02rem; margin-bottom: 8px; }
.bento-cell p { margin: 0; font-size: 16px; color: var(--ink-2); }

.bento-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}
.bento-tags span {
  font-size: 16px;
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--ink-2);
  background: rgba(255, 255, 255, 0.03);
}

/* ---------- 6. PRESENZA: PALCO LARGO ---------- */

/* da griglia stretta a palco centrale full-width */
.search-lab { display: block; }

.search-lab-copy {
  max-width: 780px;
  margin: 0 auto 26px;
  text-align: center;
}
.search-lab-copy .badge { margin-bottom: 14px; }
.search-lab-copy h3 { font-size: 1.25rem; margin-bottom: 10px; }
.search-lab-copy > p { margin: 0 auto; }
.search-lab-note { margin-top: 14px; }

.surface-switch {
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 22px;
}

.surface-stage { margin-top: 8px; }

.surface-panel[aria-hidden="true"] { display: none; }

.surface-frame {
  width: 100%;
  max-width: none;
  margin: 0 auto;
  padding: clamp(20px, 3vw, 36px) clamp(18px, 3vw, 44px);
}

/* SERP Google più larga e realistica */
.g-results,
.gpt-chat,
.gem-chat {
  max-width: 860px;
  margin-left: auto;
  margin-right: auto;
}
.g-searchbar {
  max-width: 860px;
  margin-left: auto;
  margin-right: auto;
}
.aio-head,
.as-head { max-width: 860px; margin-left: auto; margin-right: auto; }
.aio-body { max-width: 860px; margin-left: auto; margin-right: auto; }

/* ---------- 7. CASI STUDIO: FEATURE ROWS CON KPI ---------- */

.case-features {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.case-feature {
  display: grid;
  grid-template-columns: 230px 1fr 250px;
  gap: 30px;
  align-items: center;
  padding: 30px 32px;
  background: linear-gradient(155deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.02));
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 24px;
  text-decoration: none;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.case-feature:hover {
  transform: translateY(-4px);
  border-color: rgba(127, 176, 255, 0.4);
  box-shadow: 0 26px 60px rgba(2, 8, 18, 0.5);
}

.cf-logo {
  display: flex;
  align-items: center;
  justify-content: flex-start;
}
.cf-logo .lw { height: 52px; margin: 0; }

.cf-main { display: flex; flex-direction: column; gap: 10px; }
.cf-sector { align-self: flex-start; }
.cf-main h3 { margin: 0; font-size: 1.3rem; }
.cf-main p { margin: 0; font-size: 16px; color: var(--ink-2); }
.cf-main .case-link {
  margin-top: 6px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--blue-300);
  font-weight: 600;
  font-size: 16px;
}
.case-feature:hover .case-link svg { transform: translateX(4px); transition: transform 0.25s ease; }

.cf-kpis {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-left: 26px;
  border-left: 1px solid rgba(255, 255, 255, 0.09);
}
.cf-kpi strong {
  display: block;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #fff;
}
.cf-kpi span { font-size: 16px; color: var(--ink-3); line-height: 1.35; display: block; margin-top: 2px; }

/* ---------- 8. AUTOREVOLEZZA: CRED-RAIL ---------- */

.cred-rail {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
  padding-left: 36px;
}
.cred-rail::before {
  content: "";
  position: absolute;
  left: 12px;
  top: 10px;
  bottom: 10px;
  width: 2px;
  background: linear-gradient(180deg, var(--blue-500), rgba(37, 99, 235, 0.05));
}

.cred {
  position: relative;
  display: grid;
  grid-template-columns: 130px 1fr auto;
  gap: 18px;
  align-items: center;
  margin-bottom: 16px;
  padding: 18px 22px;
  background: linear-gradient(155deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.02));
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 18px;
}
.cred::before {
  content: "";
  position: absolute;
  left: -31px;
  top: 50%;
  width: 12px;
  height: 12px;
  margin-top: -6px;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--blue-500);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15);
}
.cred:last-child { margin-bottom: 0; }

.cred .lw { height: 40px; margin: 0; }

.cred h3 { margin: 0 0 4px; font-size: 1rem; }
.cred p { margin: 0; font-size: 16px; color: var(--ink-2); }

.cred-year {
  flex: none;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--blue-300);
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(127, 176, 255, 0.35);
  background: rgba(37, 99, 235, 0.12);
  white-space: nowrap;
}

/* ---------- 9. RESPONSIVE ---------- */

@media (max-width: 1080px) {
  .bento { grid-template-columns: repeat(2, 1fr); }
  .case-feature { grid-template-columns: 180px 1fr; }
  .cf-kpis {
    grid-column: 1 / -1;
    flex-direction: row;
    gap: 24px;
    padding-left: 0;
    padding-top: 18px;
    border-left: none;
    border-top: 1px solid rgba(255, 255, 255, 0.09);
  }
}

@media (max-width: 820px) {
  body.v2 .section { padding: 68px 0; }

  .client-grid { grid-template-columns: 1fr; }
  .bento { grid-template-columns: 1fr; }
  .bento--wide { grid-column: auto; }

  .case-feature { grid-template-columns: 1fr; gap: 18px; padding: 24px; }
  .cf-logo { justify-content: flex-start; }

  .cred { grid-template-columns: 1fr; gap: 10px; }
  .cred-year { order: -1; align-self: flex-start; }
  .cred-rail { padding-left: 0; }
  .cred-rail::before { display: none; }
  .cred::before { display: none; }
}
