/* Stile Profondita': base riusabile. Cambiare solo le variabili per adattarlo al cliente. */
:root {
  --p-fondo: #0d1a1c;
  --p-fondo-2: #13272a;
  --p-testo: #e9f1ef;
  --p-tenue: #9fb6b2;
  --p-accento: #ff8a3d;
  --p-raggio: 18px;
  --f-titoli: "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --f-testo: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font: 17px/1.6 var(--f-testo); color: var(--p-testo); background: var(--p-fondo); overflow-x: hidden; }
img { max-width: 100%; height: auto; display: block; }

/* Contenitore a strati: ogni figlio [data-prof] e' assoluto e un po' piu' alto del contenitore per non mostrare bordi */
.prof-scena { position: relative; overflow: hidden; }
.prof-strato { position: absolute; left: 0; right: 0; top: -15%; height: 130%; will-change: transform; pointer-events: none; }
.prof-strato img { width: 100%; height: 100%; object-fit: cover; }

/* Zoom legato allo scroll: la foto parte piccola e arrotondata e si apre a tutto schermo */
.prof-zoom { position: relative; height: 220vh; }
.prof-zoom-palco { position: sticky; top: 0; height: 100vh; height: 100svh; display: grid; place-items: center; overflow: hidden; }
.prof-zoom-img { width: 100%; height: 100%; object-fit: cover;
  transform: scale(calc(.55 + var(--zp, 0) * .45));
  border-radius: calc((1 - var(--zp, 0)) * 40px);
  filter: brightness(calc(.75 + var(--zp, 0) * .25)); will-change: transform; }
.prof-zoom-testo { position: absolute; inset: auto 6vw 10vh; opacity: calc(var(--zp, 0) * 3 - 1.4); }

/* Schede inclinabili con riflesso di luce */
.prof-tilt { position: relative; border-radius: var(--p-raggio); background: var(--p-fondo-2); transition: transform .25s ease; transform-style: preserve-3d; overflow: hidden; }
.prof-tilt::after { content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
  background: radial-gradient(500px circle at var(--lx, 50%) var(--ly, 0%), rgba(255,255,255,.12), transparent 45%); }

.entra { opacity: 0; transform: translateY(40px) scale(.98); transition: opacity .9s ease, transform 1s cubic-bezier(.2,.7,.2,1); }
.entra.dentro { opacity: 1; transform: none; }
.entra.r2 { transition-delay: .1s; } .entra.r3 { transition-delay: .2s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .entra { opacity: 1; transform: none; transition: none; }
  .prof-zoom { height: auto; }
  .prof-zoom-palco { position: relative; height: 80vh; }
  .prof-zoom-img { transform: none; border-radius: 0; filter: none; }
  .prof-zoom-testo { opacity: 1; }
}

/* Barra piena appena si scorre. I titoli delle sezioni restano sotto la barra (scroll-padding). */
html { scroll-padding-top: 104px; }
body > header, .nav { transition: background .25s; }
html.testata-piena > body > header,
html.testata-piena .nav {
  background: #0d1a1c !important; mix-blend-mode: normal !important;
  box-shadow: 0 10px 28px rgba(0, 0, 0, .45);
}
[id], section, h2, h3 { scroll-margin-top: 104px; }
