/* SogliaXC — «La salita»: pagina 3D. Senza la classe .xp (niente WebGL, «riduci movimento», ?statico) resta una pagina normale. */

/* ---------- pagina normale ---------- */
#salita, .s-boot, .s-hud { display: none; }
.s-stop { position: relative; padding: 72px 0; }
.s-panel { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.s-in { max-width: 680px; }
.s-in h1, .s-in h2 { font-size: clamp(34px, 5.4vw, 60px); margin-top: 16px; }
.s-in h1 .lime { display: block; }
.s-in > p { color: var(--ink-2); font-size: clamp(16px, 1.6vw, 19px); margin: 18px 0 0; }
.s-in .s-note { font-size: 15px; }
.s-in .disclaimer { font-size: 13px; color: var(--ink-3); }
.s-in .btn { margin-top: 26px; }
.s-cta { display: flex; align-items: center; gap: 22px; margin-top: 28px; flex-wrap: wrap; }
.s-cta .status { margin: 0; color: var(--ink-2); font-size: 14px; display: flex; align-items: center; gap: 8px; }
.s-go { display: grid; place-items: center; width: 104px; height: 104px; border-radius: 50%; border: 1px solid rgba(255, 95, 31, .75); color: #fff; text-decoration: none; font: 600 15px/1 var(--display); letter-spacing: .14em; text-transform: uppercase; background: rgba(255, 95, 31, .1); transition: background .25s, transform .25s; }
.s-go:hover { background: var(--lime); color: #0a0d05; transform: scale(1.05); }
.s-go span { pointer-events: none; }
.s-hint { display: none; }
.s-fb { margin: 36px auto 0; padding: 0 var(--gutter); max-width: var(--max); }
.s-fb .phone { max-width: 260px; }
.s-cap { display: none; }
.s-fine { position: relative; }

/* ---------- esperienza 3D ---------- */
.xp body { background: var(--bg); }
.xp .bg-deco { display: none; }
.xp #salita { display: block; position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; }
.xp .s-fb { display: none; }
.xp .site-h { position: fixed; left: 0; right: 0; top: 0; background: linear-gradient(180deg, rgba(8, 11, 15, .72), transparent); border-bottom: 0; backdrop-filter: none; -webkit-backdrop-filter: none; }
.xp .nav { gap: 20px; }
.xp .nav a { text-shadow: 0 1px 8px rgba(0, 0, 0, .6); }
.xp .nav a.on { color: #fff; box-shadow: 0 2px 0 var(--lime); padding-bottom: 3px; }
.xp main { position: relative; z-index: 1; }

.xp .s-stop { height: 300vh; padding: 0; pointer-events: none; }
.xp .s-hero { height: 170vh; }
.xp .s-app { height: 460vh; }
.xp .s-top { height: 240vh; }
.xp .s-ank { position: absolute; left: 0; top: 34%; width: 1px; height: 1px; }
.xp .s-hero .s-ank { top: 0; }
.xp .s-panel { position: sticky; top: 0; height: 100vh; height: 100svh; max-width: none; padding: 0 clamp(24px, 6vw, 96px); display: flex; align-items: center; }
.xp [data-side="right"] .s-panel { justify-content: flex-end; }
.xp [data-side="center"] .s-panel { justify-content: center; text-align: center; }
.xp .s-in { max-width: min(600px, 44vw); opacity: 0; transform: translateY(18px); visibility: hidden; transition: opacity .45s ease, transform .6s cubic-bezier(.2, .7, .2, 1), visibility 0s .45s; text-shadow: 0 1px 18px rgba(8, 11, 15, .85); }
.xp .s-stop.on .s-in { opacity: 1; transform: none; visibility: visible; pointer-events: auto; transition-delay: 0s; }
.xp [data-side="center"] .s-in { max-width: 760px; }
.xp .s-in h1, .xp .s-in h2 { font-size: clamp(36px, 3.9vw, 66px); line-height: 1.04; }
.xp .s-in > p { color: #c6cdd4; font-size: clamp(15px, 1.25vw, 18px); line-height: 1.55; }
.xp .s-in .s-note { color: var(--ink-2); font-size: 14px; }
.xp .s-in .disclaimer { color: var(--ink-2); font-size: 12px; line-height: 1.45; }
.xp .s-hint { display: block; margin-top: 26px; font: 600 11px/1 var(--mono); letter-spacing: .18em; text-transform: uppercase; color: var(--ink-2); }
.xp .s-in .w { display: inline-block; opacity: 0; transform: translateY(.34em); transition: opacity .5s ease, transform .6s cubic-bezier(.2, .7, .2, 1); transition-delay: calc(var(--i) * 28ms); }
.xp .s-stop.on .s-in .w { opacity: 1; transform: none; }
.xp .s-cap { display: block; margin-top: 22px; min-height: 66px; padding-left: 14px; border-left: 2px solid var(--lime); }
.xp .s-cap b { display: block; font: 700 19px/1.2 var(--display); color: #fff; }
.xp .s-cap span { font-size: 14px; color: var(--ink-2); }

/* cortina scura dietro al testo: il paesaggio resta vivo, le parole si leggono */
.xp .s-panel::before { content: ''; position: absolute; inset: 0; opacity: 0; transition: opacity .5s; pointer-events: none; background: linear-gradient(90deg, rgba(8, 11, 15, .78), rgba(8, 11, 15, .34) 38%, transparent 58%); }
.xp [data-side="right"] .s-panel::before { background: linear-gradient(270deg, rgba(8, 11, 15, .78), rgba(8, 11, 15, .34) 38%, transparent 58%); }
.xp [data-side="center"] .s-panel::before { background: radial-gradient(ellipse at center, rgba(8, 11, 15, .5), transparent 62%); }
.xp .s-stop.on .s-panel::before { opacity: 1; }
.xp .s-in { position: relative; }

/* avvio */
.xp .s-boot { position: fixed; inset: 0; z-index: 90; display: grid; place-content: center; justify-items: center; gap: 2px; background: var(--bg); transition: opacity .7s ease, visibility 0s .7s; }
.xp .s-boot svg { position: absolute; top: 50%; left: 50%; width: min(70vmin, 420px); height: min(70vmin, 420px); transform: translate(-50%, -50%); }
.xp .s-boot b { font: 700 clamp(64px, 12vw, 120px)/1 var(--display); letter-spacing: -.03em; color: #fff; font-variant-numeric: tabular-nums; }
.xp .s-boot span { font: 600 12px/1 var(--mono); letter-spacing: .3em; color: var(--lime); }
.xp .s-boot.off { opacity: 0; visibility: hidden; pointer-events: none; }

/* strumenti di bordo */
.xp .s-hud { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; align-items: flex-end; gap: clamp(14px, 2.4vw, 34px); padding: 0 clamp(24px, 6vw, 96px) 14px; pointer-events: none; transition: opacity .4s; }
.xp .s-hud.off { opacity: 0; }
.s-meter { flex: none; }
.s-meter small { display: block; font: 600 10px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2); margin-bottom: 5px; }
.s-meter b { font: 600 15px/1 var(--mono); color: #fff; font-variant-numeric: tabular-nums; text-shadow: 0 1px 8px rgba(0, 0, 0, .7); white-space: nowrap; }
.s-stage b { color: var(--lime); }
.s-prof { flex: 1; min-width: 0; height: 40px; overflow: visible; }
.s-prof .bg { fill: rgba(255, 255, 255, .07); }
.s-prof .fg { fill: rgba(255, 95, 31, .4); }
.s-prof .ln { fill: none; stroke: var(--lime); stroke-width: 1.6; vector-effect: non-scaling-stroke; }
.s-prof .tk { stroke: rgba(255, 255, 255, .35); stroke-width: 1; vector-effect: non-scaling-stroke; }

/* finale: pagina normale che sale sopra la scena */
.xp .s-fine { z-index: 3; pointer-events: auto; background: var(--bg); }
.xp .s-fine::before { content: ''; position: absolute; left: 0; right: 0; bottom: 100%; height: 34vh; background: linear-gradient(180deg, transparent, var(--bg)); pointer-events: none; }
.xp .site-f { margin-top: 0; }

/* telefono: la scena in alto, il testo in basso */
@media (max-width: 860px), (max-aspect-ratio: 1/1) {
  .xp .s-stop { height: 260vh; }
  .xp .s-hero { height: 150vh; }
  .xp .s-app { height: 420vh; }
  .xp .s-top { height: 220vh; }
  .xp .s-panel, .xp [data-side="right"] .s-panel, .xp [data-side="center"] .s-panel { padding: 0 18px 76px; align-items: flex-end; justify-content: flex-start; text-align: left; }
  .xp .s-in, .xp [data-side="center"] .s-in { max-width: none; width: 100%; }
  .xp .s-in h1, .xp .s-in h2 { font-size: clamp(30px, 8.6vw, 44px); margin-top: 10px; }
  .xp .s-in > p { font-size: 14.5px; line-height: 1.45; margin-top: 10px; }
  .xp .s-in .s-note { display: none; }
  .xp .s-in .disclaimer { font-size: 11px; margin-top: 10px; }
  .xp .s-panel::before, .xp [data-side="right"] .s-panel::before, .xp [data-side="center"] .s-panel::before { background: linear-gradient(0deg, rgba(8, 11, 15, .92) 8%, rgba(8, 11, 15, .6) 38%, transparent 62%); }
  .xp .s-cta { margin-top: 14px; gap: 14px; }
  .xp .s-go { width: 76px; height: 76px; font-size: 13px; }
  .xp .s-hint { margin-top: 12px; font-size: 10px; }
  .xp .s-hud { padding: 0 18px 10px; gap: 14px; }
  .xp .s-stage { display: none; }
  .xp .s-prof { height: 26px; }
  .s-meter b { font-size: 13px; }
  .s-meter small { font-size: 9px; }
  .xp .s-cap { min-height: 52px; margin-top: 10px; }
  .xp .s-cap b { font-size: 16px; }
  .xp .s-cap span { font-size: 13px; }
}
