/* =====================================================================
   ATRP — linguaggio visivo 3D del sito principale
   Caricato SOLO dalle pagine del sito (dopo styles.css e motion.css): il CAD non lo usa.
   Materiali con spessore e luce, inclinazione prospettica, livelli a profondità diverse,
   composizioni 3D (veicolo, CAD, rete del bot, smartphone, galleria, mappa di Los Angeles).
   Palette invariata: blu #1b97e3, bianco, blu notte; nessun colore nuovo.
   Movimento: solo transform/opacity; tutto si spegne con prefers-reduced-motion (motion.css).
   ===================================================================== */

:root {
  --d-top: rgba(32, 56, 92, .62);
  --d-bottom: rgba(12, 22, 39, .93);
  --d-border: rgba(150, 200, 245, .11);
  --d-edge: #071020;
  --d-bevel: inset 0 1px 0 rgba(255, 255, 255, .09), inset 0 -1px 0 rgba(0, 0, 0, .35);
  --d-lift: 0 22px 46px -22px rgba(0, 0, 0, .8), 0 46px 90px -52px rgba(2, 16, 34, .95);
  --d-persp: 1000px;
  --d-glow: rgba(27, 151, 227, .35);
}

body.site { background: transparent; overflow-x: clip; }

/* ---------------------------------------------------------------- ambiente di profondità */
.site-depth { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; background: radial-gradient(120% 80% at 50% -10%, #0d2240 0%, var(--navy) 55%, #050c18 100%); }
.sd-glow { position: absolute; border-radius: 50%; background: radial-gradient(closest-side, rgba(27, 151, 227, .22), rgba(27, 151, 227, 0)); }
.sd-g1 { width: 70vw; height: 70vw; right: -24vw; top: -30vw; animation: sd-drift 34s ease-in-out infinite alternate; }
.sd-g2 { width: 60vw; height: 60vw; left: -26vw; bottom: -32vw; opacity: .7; animation: sd-drift 42s ease-in-out infinite alternate-reverse; }
@keyframes sd-drift { to { transform: translate3d(-6vw, 4vh, 0) scale(1.08); } }
.sd-grid {
  position: absolute; left: -60%; right: -60%; bottom: -8%; height: 56%;
  background-image: linear-gradient(rgba(92, 200, 255, .16) 1px, transparent 1px), linear-gradient(90deg, rgba(92, 200, 255, .16) 1px, transparent 1px);
  background-size: 72px 72px; transform: perspective(520px) rotateX(74deg); transform-origin: 50% 100%;
  -webkit-mask-image: linear-gradient(0deg, #000 0%, transparent 78%); mask-image: linear-gradient(0deg, #000 0%, transparent 78%); opacity: .5;
}

/* ---------------------------------------------------------------- tipografia con profondità */
.site h1, .site .section-head h2, .site .sys-copy h3, .site .prose h2, .site .dept-feature-body h2 {
  text-shadow: 0 1px 0 rgba(92, 200, 255, .16), 0 2px 0 #0b1c33, 0 3px 0 #0a182c, 0 4px 0 #081425, 0 16px 30px rgba(0, 0, 0, .5);
}
.site .eyebrow {
  padding: 6px 13px 6px 11px; border-radius: 999px; background: linear-gradient(180deg, rgba(27, 151, 227, .2), rgba(27, 151, 227, .08));
  border: 1px solid rgba(92, 200, 255, .28); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12), 0 3px 0 rgba(3, 12, 26, .9), 0 10px 22px -10px var(--d-glow);
}
.site .hero-cine .eyebrow, .site .page-hero .eyebrow { backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.section-head { position: relative; }
.section-head.is-center .eyebrow { margin-inline: auto; }

/* ---------------------------------------------------------------- pulsanti con spessore */
.site .btn { transform: translateY(0); }
.site .btn-primary {
  background: linear-gradient(180deg, #34aef5 0%, #1b97e3 52%, #1785cb 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .38), inset 0 -2px 0 rgba(0, 0, 0, .16), 0 4px 0 #0c5d92, 0 16px 30px -10px rgba(27, 151, 227, .6);
}
.site .btn-primary:hover { background: linear-gradient(180deg, #45b6f7, #22a1ec 52%, #1a8bd2); transform: translateY(-2px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .42), inset 0 -2px 0 rgba(0, 0, 0, .16), 0 6px 0 #0c5d92, 0 22px 38px -12px rgba(27, 151, 227, .7); }
.site .btn-ghost {
  background: linear-gradient(180deg, rgba(255, 255, 255, .08), rgba(255, 255, 255, .02)); border-color: rgba(150, 200, 245, .22);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1), 0 4px 0 rgba(3, 10, 22, .95), 0 14px 26px -14px rgba(0, 0, 0, .8);
}
.site .btn-ghost:hover { transform: translateY(-2px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14), 0 6px 0 rgba(3, 10, 22, .95), 0 20px 34px -16px rgba(27, 151, 227, .45); }
.site .btn-primary:active, .site .btn-ghost:active { transform: translateY(3px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2), 0 1px 0 rgba(3, 10, 22, .95); transition-duration: 70ms; }
.site .btn.is-disabled { box-shadow: none; }

/* ---------------------------------------------------------------- materiale delle superfici */
:is(.stat-card, .dept-card, .product-card, .hub-card, .step-card a, .profile, .side-card, .rule-card, .join-step, .found-chip, .facts > div,
  .check-list li, .competency-list li, .rule-list li, .notice, .pager-link, .empty-state, .ssu-slot, .bot-modules li, .stats-bar) {
  background:
    radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%), rgba(140, 205, 255, calc(.13 * var(--sheen, 0))), transparent 62%),
    linear-gradient(160deg, var(--d-top), var(--d-bottom) 62%);
  border: 1px solid var(--d-border);
  box-shadow: var(--d-bevel), 0 5px 0 -1px var(--d-edge), 0 5px 0 0 rgba(92, 200, 255, .1), var(--d-lift);
}
.found-chip.tier-founder { background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%), rgba(140, 205, 255, calc(.13 * var(--sheen, 0))), transparent 62%), linear-gradient(120deg, rgba(27, 151, 227, .32), var(--d-bottom)); border-color: rgba(92, 200, 255, .45); }
.profile.is-big { background: radial-gradient(500px 220px at 50% 0%, rgba(27, 151, 227, .3), transparent 70%), linear-gradient(180deg, var(--panel-2), var(--d-bottom)); }
.ssu-card, .callout, .code-box {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1), 0 5px 0 -1px #061226, 0 5px 0 0 rgba(92, 200, 255, .22), 0 24px 50px -26px rgba(27, 151, 227, .45);
}

/* inclinazione prospettica (variabili impostate da /js/depth.js) */
:is(.dept-card, .product-card, .hub-card, .step-card a, .stat-card, .profile, .found-chip, .rule-card, .join-step, .side-card, .pager-link, .ssu-card, .notice, .facts > div, .bot-modules li) {
  transform: perspective(var(--d-persp)) rotateX(var(--rx, 0deg)) rotateY(calc(var(--wall, 0deg) + var(--ry, 0deg))) translate3d(0, var(--lift, 0px), 0);
  transition: transform .6s var(--ease-out), border-color var(--dur-m), box-shadow var(--dur-m), background-color var(--dur-m);
}
.is-tilting { --sheen: 1; transition-duration: .14s, var(--dur-m), var(--dur-m), var(--dur-m) !important; }
@media (hover: hover) {
  :is(.dept-card, .product-card, .hub-card, .step-card a, .profile, .found-chip):hover {
    --lift: -6px; border-color: rgba(92, 200, 255, .45);
    transform: perspective(var(--d-persp)) rotateX(var(--rx, 0deg)) rotateY(calc(var(--wall, 0deg) + var(--ry, 0deg))) translate3d(0, var(--lift), 0);
    box-shadow: var(--d-bevel), 0 9px 0 -1px var(--d-edge), 0 9px 0 0 rgba(92, 200, 255, .2), 0 34px 60px -26px rgba(0, 0, 0, .85), 0 0 0 1px rgba(27, 151, 227, .12);
  }
  :is(.stat-card, .rule-card, .join-step, .side-card, .pager-link, .notice, .facts > div, .bot-modules li, .ssu-card):hover { border-color: rgba(92, 200, 255, .35); }
  :is(.check-list li, .competency-list li, .rule-list li):hover { transform: translateX(4px); border-color: rgba(92, 200, 255, .35); }
}
:is(.hub-card, .dept-card, .product-card, .found-chip, .step-card a):active { transform: perspective(var(--d-persp)) translate3d(0, -1px, 0) scale(.99); transition-duration: 90ms; }

/* griglie come pareti curve (solo desktop: colonne laterali rivolte verso il centro) */
@media (min-width: 1240px) {
  :is(.dept-grid, .product-grid, .hub, .stats-grid) > :nth-child(3n+1) { --wall: 6deg; }
  :is(.dept-grid, .product-grid, .hub, .stats-grid) > :nth-child(3n) { --wall: -6deg; }
  :is(.steps, .found-strip) > :nth-child(4n+1) { --wall: 8deg; }
  :is(.steps, .found-strip) > :nth-child(4n+2) { --wall: 3deg; }
  :is(.steps, .found-strip) > :nth-child(4n+3) { --wall: -3deg; }
  :is(.steps, .found-strip) > :nth-child(4n) { --wall: -8deg; }
}

/* icone come piastrelle con spessore */
:is(.stat-icon, .hub-icon, .step-icon, .notice-icon, .callout-icon, .empty-icon) {
  background: linear-gradient(160deg, rgba(27, 151, 227, .34), rgba(27, 151, 227, .1));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2), 0 4px 0 #0a2c48, 0 12px 20px -10px rgba(27, 151, 227, .6);
  transition: transform .5s var(--ease-out);
}
@media (hover: hover) {
  :is(.hub-card, .step-card a, .rule-card, .stat-card):hover :is(.stat-icon, .hub-icon, .step-icon, .notice-icon) { transform: translateY(-3px) rotate(-5deg); }
}

/* ---------------------------------------------------------------- header */
.site .site-header { box-shadow: inset 0 -1px 0 rgba(92, 200, 255, .08); }
.site .site-header.is-scrolled { background: linear-gradient(180deg, rgba(10, 20, 36, .92), rgba(6, 13, 26, .9)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05), 0 1px 0 rgba(92, 200, 255, .12), 0 18px 40px -12px rgba(0, 0, 0, .7); }
.site .brand-logo { transition: transform .8s var(--ease-out), filter .8s; }
.site .brand:hover .brand-logo { transform: perspective(300px) rotateY(24deg) scale(1.06); filter: drop-shadow(0 8px 18px rgba(27, 151, 227, .6)); }
.site .menu {
  transform: translate(-50%, 10px) perspective(800px) rotateX(-18deg); transform-origin: 50% 0;
  background: linear-gradient(180deg, rgba(24, 40, 66, .97), rgba(12, 22, 38, .98));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), 0 5px 0 -1px var(--d-edge), 0 30px 60px -20px rgba(0, 0, 0, .8);
  transition: opacity .25s, transform .45s var(--ease-out), visibility .25s;
}
.site .has-menu:hover > .menu, .site .has-menu:focus-within > .menu, .site .has-menu.open > .menu { transform: translate(-50%, 0) perspective(800px) rotateX(0deg); }
.site .nav-mobile { background: linear-gradient(180deg, #0f1d33, #091321); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05), 0 24px 40px -20px rgba(0, 0, 0, .8); }

/* ---------------------------------------------------------------- sezioni come lastre sovrapposte */
.site .section-alt {
  background: linear-gradient(180deg, rgba(14, 25, 44, .86), rgba(17, 29, 49, .9));
  box-shadow: inset 0 40px 60px -50px rgba(0, 0, 0, .9), inset 0 -40px 60px -50px rgba(0, 0, 0, .9);
}
.site .section-alt::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(92, 200, 255, .05) 50%, transparent), radial-gradient(60% 40% at 50% 0%, rgba(27, 151, 227, .1), transparent 70%);
}
.site .section-alt > .container { position: relative; z-index: 1; }

/* comparse con profondità (le classi sono gestite da /js/motion.js) */
.section-head.reveal { opacity: 0; translate: none; transform: perspective(900px) translate3d(0, 26px, -110px) rotateX(12deg); transition: opacity .9s var(--ease-out), transform 1s var(--ease-out); }
:is(.dept-card, .product-card, .hub-card, .step-card, .stat-card, .profile, .found-chip, .join-step, .rule-card, .ssu-card, .side-card, .notice, .facts > div).reveal {
  opacity: 0; translate: none; transform: perspective(1100px) translate3d(0, 46px, -70px) rotateX(18deg); transform-origin: 50% 100%;
  transition: opacity .8s var(--ease-out), transform 1s var(--ease-out); transition-delay: calc(var(--i, 0) * 80ms);
}
:is(.check-list li, .principles li, .competency-list li, .rule-list li).reveal { opacity: 0; translate: none; transform: perspective(900px) translate3d(-26px, 0, -40px) rotateY(14deg); transition: opacity .7s var(--ease-out), transform .9s var(--ease-out); transition-delay: calc(var(--i, 0) * 60ms); }
[data-reveal="side-l"].reveal { opacity: 0; translate: none; transform: perspective(1400px) translate3d(-60px, 0, -120px) rotateY(22deg); transition: opacity 1s var(--ease-out), transform 1.3s var(--ease-out); }
[data-reveal="side-r"].reveal { opacity: 0; translate: none; transform: perspective(1400px) translate3d(60px, 0, -120px) rotateY(-22deg); transition: opacity 1s var(--ease-out), transform 1.3s var(--ease-out); }
[data-reveal="rise"].reveal { opacity: 0; translate: none; transform: translate3d(0, 34px, 0); transition: opacity .9s var(--ease-out), transform 1s var(--ease-out); transition-delay: .12s; }
[data-reveal="depth"].reveal { opacity: 0; translate: none; transform: perspective(1400px) translate3d(0, 40px, -220px) rotateX(16deg); transition: opacity 1.1s var(--ease-out), transform 1.4s var(--ease-out); }
.reveal.is-in { opacity: 1 !important; transform: perspective(1100px) translate3d(0, 0, 0) !important; }

/* ---------------------------------------------------------------- hero 3D (home) */
.hero-3d .scene-shade {
  background:
    linear-gradient(90deg, rgba(3, 9, 21, .95) 0%, rgba(3, 9, 21, .8) 32%, rgba(3, 9, 21, .3) 60%, rgba(3, 9, 21, .12) 100%),
    linear-gradient(0deg, var(--navy) 0%, rgba(10, 18, 32, 0) 16%),
    linear-gradient(180deg, rgba(3, 9, 21, .6) 0%, rgba(3, 9, 21, 0) 24%);
}
.hero-haze { position: absolute; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.hero-haze span { position: absolute; border-radius: 50%; }
.hh-1 { width: 60vw; height: 40vw; right: -10vw; bottom: -6vw; background: radial-gradient(closest-side, rgba(27, 151, 227, .3), transparent); }
.hh-2 { width: 30vw; height: 30vw; right: 18vw; top: 6vw; background: radial-gradient(closest-side, rgba(207, 234, 255, .1), transparent); }
.hh-beam {
  left: 52%; top: -30%; width: 18vw; height: 140%; border-radius: 0 !important; transform-origin: 50% 0;
  background: linear-gradient(180deg, rgba(92, 200, 255, .16), rgba(92, 200, 255, 0) 70%); filter: blur(10px);
  clip-path: polygon(46% 0, 54% 0, 100% 100%, 0 100%); animation: hh-sweep 16s ease-in-out infinite alternate; opacity: .7;
}
@keyframes hh-sweep { from { transform: rotate(18deg); } to { transform: rotate(-14deg); } }
.hero-layout { display: grid; grid-template-columns: minmax(0, 560px) minmax(0, 1fr); align-items: end; gap: 20px; }
.hero-3d .hero-copy { position: relative; z-index: 2; }
.hero-title { display: grid; gap: 0; margin-bottom: .18em; }
.ht-line { display: block; }
.ht-accent {
  background: linear-gradient(100deg, #ffffff 0%, #cfeaff 35%, #5cc8ff 70%, #1b97e3 100%); -webkit-background-clip: text; background-clip: text; color: transparent;
  text-shadow: none; filter: drop-shadow(0 4px 0 #0b1c33) drop-shadow(0 16px 30px rgba(27, 151, 227, .35));
}
.hero-stage { position: relative; align-self: end; margin-right: calc(-1 * max(20px, (100vw - 1200px) / 2)); margin-bottom: -10px; perspective: 1200px; }
.v3d { position: relative; aspect-ratio: 16 / 9; width: 100%; }
.v3d-static, .v3d-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.v3d-canvas { opacity: 0; transition: opacity .8s var(--ease-out); }
.v3d.is-live .v3d-canvas { opacity: 1; }
.v3d.is-live .v3d-static { opacity: 0; transition: opacity .8s; }
/* l'asfalto è disegnato dal motore 3D con la stessa prospettiva del veicolo; qui solo la penombra */
.v3d-floor { position: absolute; left: 10%; right: 0; bottom: 0; height: 46%; background: radial-gradient(50% 60% at 55% 70%, rgba(3, 8, 16, .6), transparent 72%); }
.hero-chip3d {
  position: absolute; display: grid; gap: 2px; padding: 10px 16px; border-radius: 14px;
  background: linear-gradient(160deg, rgba(30, 54, 88, .72), rgba(8, 16, 30, .82)); border: 1px solid rgba(92, 200, 255, .3);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12), 0 4px 0 -1px #050d1a, 0 24px 40px -16px rgba(0, 0, 0, .8), 0 0 30px -10px var(--d-glow);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); transition: transform .9s var(--ease-out);
}
.hero-chip3d span { font-size: .64rem; letter-spacing: .18em; text-transform: uppercase; color: var(--blue-300); font-weight: 800; }
.hero-chip3d strong { font-family: var(--font-display); font-size: 1.15rem; color: var(--white); letter-spacing: .02em; }
.hc-a { left: 4%; top: -22%; transform: translate3d(calc(var(--px, 0) * -18px), calc(var(--py, 0) * -10px), 60px) rotateY(16deg) rotateX(4deg); animation: chip-float 7s ease-in-out infinite; }
.hc-b { right: 10%; top: -4%; transform: translate3d(calc(var(--px, 0) * -28px), calc(var(--py, 0) * -14px), 110px) rotateY(-18deg); animation: chip-float 8s ease-in-out -3s infinite; }
@keyframes chip-float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -8px; } }
.v3d-toggle {
  position: absolute; right: max(20px, (100vw - 1200px) / 2); bottom: 6px; display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 12px; border-radius: 999px; border: 1px solid rgba(150, 200, 245, .25); background: rgba(6, 14, 28, .72); color: #cfdceb;
  font: 700 .74rem var(--font); cursor: pointer; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.v3d-toggle span { display: inline-flex; align-items: center; gap: 7px; }
.v3d-toggle [hidden], .v3d-toggle[hidden] { display: none; }
.v3d-toggle .icon { width: 14px; height: 14px; }
.v3d-toggle:hover { color: var(--white); border-color: var(--blue-300); }

/* ---------------------------------------------------------------- statistiche e SSU */
.stats-section .stat-card::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
  background: linear-gradient(115deg, rgba(255, 255, 255, .06), transparent 38%), repeating-linear-gradient(0deg, rgba(92, 200, 255, .03) 0 1px, transparent 1px 4px);
}
.site .stat-value { text-shadow: 0 2px 0 #0b1c33, 0 4px 0 #081425, 0 18px 34px rgba(27, 151, 227, .3); }
.stats-after { display: grid; gap: 4px; margin-top: 28px; }
.stats-after .center-cta { margin-top: 18px; }
.site .ssu-slot { transform-style: preserve-3d; }
.site .ssu-time { text-shadow: 0 2px 0 #0b1c33, 0 4px 0 #081425, 0 14px 26px rgba(0, 0, 0, .45); }

/* ---------------------------------------------------------------- sistemi ATRP */
.section-systems { position: relative; overflow: hidden; }
.section-systems::before {
  content: ""; position: absolute; left: 50%; top: 0; width: 1px; height: 100%; transform: translateX(-50%);
  background: linear-gradient(180deg, transparent, rgba(92, 200, 255, .22) 12%, rgba(92, 200, 255, .22) 88%, transparent);
}
.sys-list { display: grid; gap: clamp(72px, 10vw, 140px); }
.sys { position: relative; display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, .88fr); gap: clamp(28px, 5vw, 72px); align-items: center; }
.sys.is-flip .sys-media { order: 2; }
.sys-media { position: relative; min-width: 0; }
.sys-copy { position: relative; z-index: 1; }
.sys-copy h3 { font-size: clamp(2rem, 3.6vw, 2.9rem); margin-bottom: .35em; }
.sys-lead { font-size: 1.08rem; color: #c4d3e3; max-width: 56ch; }
.sys-n { display: inline-grid; place-items: center; min-width: 26px; height: 20px; margin-right: 2px; padding: 0 6px; border-radius: 6px; background: var(--blue); color: var(--white); font-size: .68rem; letter-spacing: .06em; box-shadow: 0 2px 0 #0c5d92; }
.sys-points { list-style: none; display: grid; gap: 12px; margin: 22px 0 26px; }
.sys-points li { display: flex; gap: 14px; align-items: flex-start; color: #c4d3e3; }
.sys-points .icon {
  width: 34px; height: 34px; padding: 8px; flex: none; border-radius: 10px; color: var(--blue-300);
  background: linear-gradient(160deg, rgba(27, 151, 227, .3), rgba(27, 151, 227, .08)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16), 0 3px 0 #0a2c48;
}
.sys-visual { position: relative; margin: 0; }
.sys-visual figcaption { margin-top: 10px; text-align: center; font-size: .74rem; letter-spacing: .06em; color: var(--muted); }

/* --- CAD: monitor in prospettiva */
.dev-stage { position: relative; perspective: 1700px; padding: 4% 6% 12%; }
.cad-device {
  position: relative; transform-style: preserve-3d;
  transform: rotateY(calc(-17deg + var(--px, 0) * 7deg)) rotateX(calc(7deg - var(--py, 0) * 4deg + (var(--sp, .5) - .5) * -8deg));
  transition: transform .9s var(--ease-out);
}
.cad-bezel {
  position: relative; transform-style: preserve-3d; padding: 12px; border-radius: 20px;
  background: linear-gradient(160deg, #18263c, #070e1a 60%); border: 1px solid rgba(150, 200, 245, .14);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1), 0 50px 90px -30px rgba(0, 0, 0, .95), 0 0 80px -30px rgba(27, 151, 227, .5);
}
.cad-bezel::before { content: ""; position: absolute; inset: 0; border-radius: inherit; background: #050b16; transform: translateZ(-22px); box-shadow: 0 40px 70px -20px rgba(0, 0, 0, .9); }
.cad-bezel::after { content: ""; position: absolute; top: 14px; bottom: 14px; right: 0; width: 22px; transform-origin: 100% 50%; transform: rotateY(90deg); background: linear-gradient(90deg, #0d1a2d, #050b16); border-radius: 4px; }
.cad-screen {
  position: relative; aspect-ratio: 16 / 10; overflow: hidden; border-radius: 10px; display: grid; grid-template-rows: auto 1fr;
  background: radial-gradient(80% 60% at 70% 0%, rgba(27, 151, 227, .18), transparent 70%), linear-gradient(180deg, #0c1628, #08101e);
  font-size: clamp(.5rem, .9vw, .72rem); color: #cfdceb;
}
.cad-screen::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(118deg, rgba(255, 255, 255, .09), transparent 36%, transparent 70%, rgba(92, 200, 255, .05)); }
.cs-top { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-bottom: 1px solid rgba(255, 255, 255, .06); background: rgba(6, 12, 24, .7); }
.cs-brand { font-family: var(--font-display); font-weight: 800; font-size: 1.15em; color: var(--white); white-space: nowrap; }
.cs-brand b { display: inline-block; margin-left: 4px; padding: 0 5px; border-radius: 4px; background: var(--blue); font-size: .75em; }
.cs-search { flex: 1; display: flex; align-items: center; gap: 6px; height: 2.1em; padding: 0 8px; border-radius: 6px; background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .08); }
.cs-search .icon { width: 1.1em; height: 1.1em; color: var(--muted); }
.cs-search i { display: block; width: 40%; height: .5em; border-radius: 4px; background: rgba(255, 255, 255, .1); }
.cs-sync { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; border-radius: 999px; background: rgba(61, 220, 151, .12); color: var(--ok); font-weight: 700; white-space: nowrap; }
.cs-sync i { width: .55em; height: .55em; border-radius: 50%; background: currentColor; box-shadow: 0 0 6px currentColor; }
.cs-body { display: grid; grid-template-columns: 24% 1fr; min-height: 0; }
.cs-nav { list-style: none; padding: 8px 6px; display: grid; gap: 3px; align-content: start; border-right: 1px solid rgba(255, 255, 255, .06); }
.cs-nav li { display: flex; align-items: center; gap: 6px; padding: 4px 6px; border-radius: 5px; color: var(--muted); white-space: nowrap; overflow: hidden; }
.cs-nav li i { width: .8em; height: .8em; border-radius: 3px; background: rgba(92, 200, 255, .35); flex: none; }
.cs-nav li.is-on { background: rgba(27, 151, 227, .2); color: var(--white); }
.cs-main { display: grid; gap: 8px; padding: 10px; align-content: start; min-width: 0; }
.cs-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.cs-kpi { display: grid; gap: 5px; padding: 7px; border-radius: 6px; background: rgba(255, 255, 255, .04); border: 1px solid rgba(255, 255, 255, .06); }
.cs-kpi span { font-size: .78em; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cs-kpi b { display: block; height: 1.1em; width: 55%; border-radius: 3px; background: linear-gradient(90deg, rgba(92, 200, 255, .5), rgba(92, 200, 255, .15)); }
.cs-file { display: grid; grid-template-columns: auto 1fr auto; gap: 8px; align-items: center; padding: 8px; border-radius: 6px; background: rgba(27, 151, 227, .08); border: 1px solid rgba(92, 200, 255, .2); }
.cs-avatar { width: 2.6em; height: 2.6em; border-radius: 50%; background: linear-gradient(145deg, var(--blue), #0b5f98); }
.cs-lines { display: grid; gap: 4px; }
.cs-lines b, .cs-lines i { display: block; height: .6em; border-radius: 3px; background: rgba(255, 255, 255, .22); width: 60%; }
.cs-lines i { background: rgba(255, 255, 255, .1); width: 85%; }
.cs-lines i.s { width: 45%; }
.cs-tags { display: grid; gap: 4px; justify-items: end; }
.cs-pill { display: inline-flex; padding: 1px 7px; border-radius: 999px; font-weight: 700; font-size: .85em; white-space: nowrap; }
.cs-pill.is-available { background: rgba(61, 220, 151, .14); color: var(--ok); }
.cs-pill.is-patrol { background: rgba(27, 151, 227, .2); color: var(--blue-300); }
.cs-pill.is-busy { background: rgba(255, 122, 122, .16); color: var(--bad); }
.cs-table { display: grid; gap: 4px; }
.cs-row { display: grid; grid-template-columns: auto 1fr auto; gap: 8px; align-items: center; padding: 5px 7px; border-radius: 5px; background: rgba(255, 255, 255, .03); }
.cs-row i { display: block; height: .5em; border-radius: 3px; background: rgba(255, 255, 255, .1); }
.cs-dept { font-weight: 800; color: var(--white); padding: 0 5px; border-radius: 4px; border: 1px solid rgba(255, 255, 255, .18); font-size: .85em; }
.cad-stand { position: absolute; left: 50%; bottom: -15%; width: 22%; height: 16%; transform: translateX(-50%) translateZ(-30px); background: linear-gradient(180deg, #0b1526, #050b16); clip-path: polygon(38% 0, 62% 0, 70% 78%, 100% 84%, 100% 100%, 0 100%, 0 84%, 30% 78%); }
.cad-pop {
  position: absolute; display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 14px;
  background: linear-gradient(160deg, rgba(32, 58, 96, .86), rgba(9, 18, 34, .92)); border: 1px solid rgba(92, 200, 255, .32);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14), 0 4px 0 -1px #050d1a, 0 30px 50px -18px rgba(0, 0, 0, .9), 0 0 36px -12px var(--d-glow);
  transition: transform .9s var(--ease-out); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.cad-pop b { display: block; color: var(--white); font-size: .92rem; }
.cad-pop small { display: block; color: var(--muted); font-size: .74rem; }
.cad-pop-icon { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; background: rgba(27, 151, 227, .25); color: var(--blue-300); }
.cad-pop-icon .icon { width: 18px; height: 18px; }
.cad-pop-a { right: -2%; top: 2%; transform: translate3d(calc(var(--px, 0) * -22px), calc(var(--py, 0) * -12px), 120px) rotateY(-14deg); animation: chip-float 7s ease-in-out infinite; }
.cad-pop-b { left: 0; bottom: 6%; transform: translate3d(calc(var(--px, 0) * -30px), calc(var(--py, 0) * -14px), 160px) rotateY(-10deg); animation: chip-float 8s ease-in-out -2s infinite; }

/* --- bot: tavolo olografico con i sistemi collegati */
.net-stage { position: relative; height: clamp(360px, 36vw, 460px); perspective: 1300px; }
.net-plane {
  position: absolute; inset: 22% 6% 4%; border-radius: 26px; transform-style: preserve-3d;
  --rx: calc(50deg + var(--py, 0) * -5deg + (var(--sp, .5) - .5) * -10deg); --rz: calc(-18deg + var(--px, 0) * 7deg);
  transform: rotateX(var(--rx)) rotateZ(var(--rz)); transition: transform .9s var(--ease-out);
  background:
    radial-gradient(40% 40% at 50% 50%, rgba(27, 151, 227, .3), transparent 70%),
    linear-gradient(rgba(92, 200, 255, .12) 1px, transparent 1px) 0 0 / 10% 10%,
    linear-gradient(90deg, rgba(92, 200, 255, .12) 1px, transparent 1px) 0 0 / 10% 10%,
    linear-gradient(160deg, rgba(14, 30, 54, .9), rgba(5, 12, 24, .95));
  border: 1px solid rgba(92, 200, 255, .3);
  box-shadow: inset 0 0 60px rgba(27, 151, 227, .2), 0 0 0 1px rgba(255, 255, 255, .04), 0 40px 60px -20px rgba(0, 0, 0, .9);
}
.net-plane::after { content: ""; position: absolute; inset: -1px; border-radius: inherit; transform: translateZ(-14px); background: #040a15; box-shadow: 0 30px 50px rgba(0, 0, 0, .7); }
.net-lines { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.net-l { stroke: rgba(92, 200, 255, .38); stroke-width: 1.6; vector-effect: non-scaling-stroke; }
.net-f { stroke: #cfeaff; stroke-width: 3; stroke-linecap: round; vector-effect: non-scaling-stroke; stroke-dasharray: 2 26; animation: net-flow 2.8s linear infinite; filter: drop-shadow(0 0 3px #5cc8ff); }
@keyframes net-flow { to { stroke-dashoffset: -56; } }
.net-ring { position: absolute; left: 50%; top: 50%; width: 34%; aspect-ratio: 1; border-radius: 50%; transform: translate(-50%, -50%); border: 1px dashed rgba(92, 200, 255, .5); box-shadow: 0 0 40px rgba(27, 151, 227, .25), inset 0 0 30px rgba(27, 151, 227, .2); animation: net-spin 30s linear infinite; }
@keyframes net-spin { to { transform: translate(-50%, -50%) rotate(360deg); } }
.net-node { position: absolute; left: var(--x); top: var(--y); width: 0; height: 0; transform-style: preserve-3d; }
.net-node::before { content: ""; position: absolute; left: -16px; top: -16px; width: 32px; height: 32px; border-radius: 50%; background: radial-gradient(closest-side, rgba(92, 200, 255, .8), rgba(27, 151, 227, .2) 60%, transparent); }
.net-pillar {
  position: absolute; left: 0; top: 0; width: max-content; max-width: 160px; display: grid; justify-items: center; gap: 2px; padding: 10px 14px; border-radius: 14px; text-align: center;
  transform: translate(-50%, -100%) rotateZ(calc(-1 * var(--rz))) rotateX(calc(-1 * var(--rx))) translateY(-10px); transform-origin: 50% 100%;
  background: linear-gradient(160deg, rgba(30, 56, 92, .92), rgba(8, 16, 30, .95)); border: 1px solid rgba(92, 200, 255, .28);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12), 0 4px 0 -1px #040b16, 0 20px 30px -14px rgba(0, 0, 0, .9);
  transition: transform .9s var(--ease-out);
}
.net-pillar strong { color: var(--white); font-size: .9rem; line-height: 1.2; }
.net-pillar small { color: var(--muted); font-size: .66rem; line-height: 1.25; }
.net-icon { width: 32px; height: 32px; display: grid; place-items: center; margin-bottom: 4px; border-radius: 10px; background: rgba(27, 151, 227, .22); color: var(--blue-300); }
.net-icon .icon { width: 18px; height: 18px; }
.net-node.is-main .net-pillar { padding: 14px 18px; border-color: rgba(92, 200, 255, .6); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16), 0 5px 0 -1px #040b16, 0 26px 40px -16px rgba(0, 0, 0, .9), 0 0 40px -6px rgba(27, 151, 227, .6); }
.net-node.is-main .net-icon { width: 42px; height: 42px; background: var(--blue); color: var(--white); box-shadow: 0 3px 0 #0c5d92; }
.bot-modules { list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
.bot-modules li { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; }
.bot-modules .icon { width: 30px; height: 30px; padding: 7px; flex: none; border-radius: 9px; color: var(--blue-300); background: rgba(27, 151, 227, .2); box-shadow: 0 3px 0 #0a2c48; }
.bot-modules strong { display: block; color: var(--white); font-size: .92rem; line-height: 1.25; }
.bot-modules small { display: block; color: var(--muted); font-size: .78rem; line-height: 1.35; margin-top: 2px; }

/* --- telefono: smartphone con spessore reale (lastre sovrapposte) */
.phone-stage { position: relative; display: grid; place-items: center; padding: 28px 0 70px; perspective: 1500px; animation: phone-float 8s ease-in-out infinite; }
@keyframes phone-float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -12px; } }
.phone3d {
  position: relative; width: clamp(200px, 22vw, 258px); aspect-ratio: 9 / 18.6; transform-style: preserve-3d;
  transform: rotateY(calc(-24deg + var(--px, 0) * 16deg + (var(--sp, .5) - .5) * 30deg)) rotateX(calc(7deg - var(--py, 0) * 8deg)) rotateZ(2deg);
  transition: transform 1s var(--ease-out);
}
.ph-face, .ph-slice { position: absolute; inset: 0; border-radius: 15% / 7.3%; }
.ph-slice { transform: translateZ(var(--z)); background: linear-gradient(90deg, #233651, #0d1828 40%, #1d2e47); box-shadow: 0 0 0 1px rgba(92, 200, 255, .12); }
.ph-front { transform: translateZ(7px); padding: 4.5%; background: linear-gradient(160deg, #1d2d45, #050a14 40%); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12); }
.ph-back { transform: rotateY(180deg) translateZ(7px); display: grid; place-items: center; background: linear-gradient(160deg, #1a2b44, #0a1424 60%); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1); }
.ph-back img { width: 34%; opacity: .55; }
.ph-cam { position: absolute; left: 9%; top: 5%; width: 30%; aspect-ratio: 1; border-radius: 28%; background: #08101c; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .06); }
.ph-screen {
  position: relative; width: 100%; height: 100%; overflow: hidden; border-radius: 12% / 6%; display: flex; flex-direction: column; align-items: center; color: var(--white);
  background: radial-gradient(90% 45% at 50% 100%, rgba(27, 151, 227, .55), transparent 70%), radial-gradient(60% 40% at 80% 20%, rgba(92, 200, 255, .22), transparent 70%), linear-gradient(180deg, #071427, #0b2340 60%, #0e3a63);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .6);
}
.ph-screen::after { content: ""; position: absolute; inset: 0; background: linear-gradient(120deg, rgba(255, 255, 255, .14), transparent 32%); pointer-events: none; }
.ph-status { width: 100%; display: flex; align-items: center; justify-content: space-between; padding: 7% 9% 0; font-size: .68rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.ph-island { width: 32%; height: 18px; border-radius: 99px; background: #02050b; }
.ph-sig { display: inline-flex; align-items: flex-end; gap: 1.5px; height: 9px; }
.ph-sig i { width: 2.5px; border-radius: 1px; background: var(--white); }
.ph-sig i:nth-child(1) { height: 3px; } .ph-sig i:nth-child(2) { height: 5px; } .ph-sig i:nth-child(3) { height: 7px; } .ph-sig i:nth-child(4) { height: 9px; }
.ph-place { display: inline-flex; align-items: center; gap: 4px; margin: 13% 0 0; font-size: .68rem; color: #cfeaff; letter-spacing: .04em; }
.ph-place .icon { width: 11px; height: 11px; }
.ph-time { margin: 2% 0 0; font-family: var(--font-display); font-size: clamp(2.8rem, 4.6vw, 3.6rem); font-weight: 800; line-height: 1; letter-spacing: .02em; text-shadow: 0 6px 24px rgba(27, 151, 227, .6); }
.ph-logo { width: 26%; margin-top: 10%; filter: drop-shadow(0 6px 18px rgba(27, 151, 227, .7)); }
.ph-note { width: 86%; margin-top: auto; margin-bottom: 18%; display: grid; gap: 1px; padding: 10px 12px; border-radius: 16px; background: rgba(10, 22, 40, .66); border: 1px solid rgba(255, 255, 255, .12); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); font-size: .7rem; }
.ph-note-app { display: inline-flex; align-items: center; gap: 6px; font-size: .62rem; letter-spacing: .1em; text-transform: uppercase; color: var(--blue-300); font-weight: 800; }
.ph-note-app img { width: 16px; height: 16px; }
.ph-note strong { font-size: .82rem; }
.ph-note span:last-child { color: var(--muted); }
.ph-home { position: absolute; bottom: 3%; left: 50%; width: 34%; height: 4px; border-radius: 99px; transform: translateX(-50%); background: rgba(255, 255, 255, .6); }
.phone-shadow { position: absolute; bottom: 26px; left: 50%; width: 46%; height: 26px; transform: translateX(-50%); border-radius: 50%; background: radial-gradient(closest-side, rgba(0, 0, 0, .7), transparent); filter: blur(4px); }

/* --- Full RolePlay: immagini di gioco in profondità */
.rp-stage { position: relative; aspect-ratio: 5 / 4; perspective: 1500px; transform-style: preserve-3d; }
.rp-card {
  position: absolute; width: 80%; margin: 0; overflow: hidden; border-radius: 18px; border: 1px solid rgba(150, 200, 245, .22);
  background: #050b16; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1), 0 6px 0 -1px #040a14, 0 40px 70px -24px rgba(0, 0, 0, .95);
  transition: transform 1s var(--ease-out);
}
.rp-card img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
.rp-card::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(120deg, rgba(255, 255, 255, .12), transparent 30%), linear-gradient(0deg, rgba(3, 9, 21, .55), transparent 40%); }
.rp-card-1 { left: 0; top: 2%; transform: translate3d(calc(var(--px, 0) * 14px + (var(--sp, .5) - .5) * 50px), 0, -140px) rotateY(18deg) rotateZ(-2deg); opacity: .9; }
.rp-card-2 { right: 0; bottom: 4%; transform: translate3d(calc(var(--px, 0) * -18px + (var(--sp, .5) - .5) * -40px), 0, 30px) rotateY(-12deg) rotateZ(1.5deg); }
.rp-tag { position: absolute; left: 14px; bottom: 12px; z-index: 1; padding: 5px 11px; border-radius: 999px; background: rgba(6, 14, 28, .78); border: 1px solid rgba(92, 200, 255, .3); font-size: .74rem; font-weight: 700; color: var(--white); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.rp-hud {
  position: absolute; right: 4%; top: 2%; display: inline-flex; align-items: center; gap: 8px; padding: 7px 13px; border-radius: 999px;
  background: rgba(6, 14, 28, .84); border: 1px solid rgba(92, 200, 255, .35); font: 700 .72rem ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .08em; color: #cfeaff;
  transform: translate3d(calc(var(--px, 0) * -30px), 0, 140px); box-shadow: 0 20px 40px -14px rgba(0, 0, 0, .9);
}
.rp-rec { width: 8px; height: 8px; border-radius: 50%; background: var(--blue-300); box-shadow: 0 0 10px var(--blue-300); animation: beacon 1.8s ease-in-out infinite; }

/* ---------------------------------------------------------------- Los Angeles: mappa isometrica */
.section-city { position: relative; }
.city-grid { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: clamp(28px, 5vw, 64px); align-items: center; }
.city-copy .facts { margin: 22px 0 24px; }
.city-map { position: relative; min-width: 0; }
.map-note { margin: 0; text-align: center; font-size: .74rem; color: var(--muted); letter-spacing: .04em; }
.la-stage { position: relative; height: clamp(340px, 38vw, 480px); display: grid; place-items: center; perspective: 1700px; }
.la-plane {
  position: relative; width: min(540px, 92%); aspect-ratio: var(--cols) / var(--rows); transform-style: preserve-3d;
  --mx3: calc(57deg + var(--py, 0) * -5deg); --mz3: calc(-38deg + var(--px, 0) * 8deg + (var(--sp, .5) - .5) * 24deg);
  transform: rotateX(var(--mx3)) rotateZ(var(--mz3)); transition: transform 1s var(--ease-out);
  border-radius: 16px; background: linear-gradient(160deg, #10203a, #081322);
  box-shadow: 0 0 0 1px rgba(92, 200, 255, .25), 0 0 80px -10px rgba(27, 151, 227, .35);
}
.la-plane::before { content: ""; position: absolute; inset: 0; border-radius: inherit; transform: translateZ(-20px); background: #040a15; box-shadow: 0 40px 60px rgba(0, 0, 0, .8); }
.la-plane::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; background: linear-gradient(rgba(92, 200, 255, .07) 1px, transparent 1px) 0 0 / calc(100% / var(--cols)) calc(100% / var(--rows)), linear-gradient(90deg, rgba(92, 200, 255, .07) 1px, transparent 1px) 0 0 / calc(100% / var(--cols)) calc(100% / var(--rows)); }
.la-ocean { position: absolute; left: 0; top: 0; bottom: 0; width: calc(200% / var(--cols)); border-radius: 16px 0 0 16px; background: linear-gradient(90deg, #0b3a63, #0f4f86 70%, #1a6aa8); box-shadow: inset -2px 0 0 rgba(207, 234, 255, .5); overflow: hidden; }
.la-ocean::after { content: ""; position: absolute; inset: -20% 0; background: repeating-linear-gradient(170deg, transparent 0 14px, rgba(207, 234, 255, .1) 14px 16px); animation: la-waves 9s linear infinite; }
@keyframes la-waves { to { transform: translateY(16%); } }
.la-coast { position: absolute; top: 0; bottom: 0; left: calc(200% / var(--cols) - 1px); width: 3px; background: #cfeaff; opacity: .5; box-shadow: 0 0 12px #5cc8ff; }
.la-hills { position: absolute; right: 4%; top: 2%; width: 44%; height: 26%; border-radius: 50%; background: radial-gradient(closest-side, rgba(27, 151, 227, .26), transparent); }
.la-road { position: absolute; background: #050b16; overflow: hidden; box-shadow: 0 0 0 1px rgba(92, 200, 255, .12); }
.la-road::after { content: ""; position: absolute; background: linear-gradient(90deg, transparent, #cfeaff, transparent); }
.la-road-h { left: calc(200% / var(--cols)); right: 0; top: calc(var(--y) / var(--rows) * 100% - 2px); height: 4px; }
.la-road-h::after { top: 0; bottom: 0; width: 18%; animation: la-car-x 6s linear infinite; }
.la-road-v { top: 0; bottom: 0; left: calc(var(--x) / var(--cols) * 100% - 2px); width: 4px; }
.la-road-v::after { left: 0; right: 0; height: 18%; background: linear-gradient(180deg, transparent, #5cc8ff, transparent); animation: la-car-y 7s linear infinite; }
.la-road-pch { top: 0; bottom: 0; left: calc(200% / var(--cols) + 5px); width: 4px; }
.la-road-pch::after { left: 0; right: 0; height: 22%; background: linear-gradient(180deg, transparent, #ffffff, transparent); animation: la-car-y 9s linear infinite reverse; }
@keyframes la-car-x { from { transform: translateX(-100%); } to { transform: translateX(560%); } }
@keyframes la-car-y { from { transform: translateY(-100%); } to { transform: translateY(560%); } }
.blk {
  position: absolute; transform-style: preserve-3d;
  left: calc(var(--x) / var(--cols) * 100% + 5px); top: calc(var(--y) / var(--rows) * 100% + 5px);
  width: calc(100% / var(--cols) - 10px); height: calc(100% / var(--rows) - 10px);
}
.blk i { position: absolute; display: block; }
.blk-t { inset: 0; transform: translateZ(var(--h)); background: linear-gradient(135deg, #1e3656, #12233b); box-shadow: inset 0 0 0 1px rgba(92, 200, 255, .2); }
.blk-s { left: 0; right: 0; bottom: 0; height: var(--h); transform-origin: 50% 100%; transform: rotateX(-90deg); background: linear-gradient(0deg, #0a1628, #13253f); }
.blk-e { top: 0; bottom: 0; right: 0; width: var(--h); transform-origin: 100% 50%; transform: rotateY(90deg); background: linear-gradient(90deg, #0d1c33, #081324); }
.blk.is-tall .blk-s, .blk.is-tall .blk-e { background-image: radial-gradient(circle, rgba(207, 234, 255, .55) 0 1px, transparent 1.5px), linear-gradient(0deg, #0a1628, #14294a); background-size: 7px 9px, 100% 100%; }
.blk.is-tall .blk-t { background: linear-gradient(135deg, #2a4c78, #16304f); box-shadow: inset 0 0 0 1px rgba(92, 200, 255, .45), 0 0 18px rgba(27, 151, 227, .4); }
.la-pin { position: absolute; left: calc(var(--x) / var(--cols) * 100%); top: calc(var(--y) / var(--rows) * 100%); width: 0; height: 0; transform-style: preserve-3d; }
.la-pin::before { content: ""; position: absolute; left: -9px; top: -9px; width: 18px; height: 18px; border-radius: 50%; background: radial-gradient(closest-side, #cfeaff, #1b97e3 55%, transparent); animation: la-ping 2.6s ease-out infinite; }
@keyframes la-ping { 0% { transform: scale(.6); opacity: 1; } 100% { transform: scale(2.4); opacity: 0; } }
.la-pin-label {
  position: absolute; left: 0; top: 0; padding: 4px 10px; border-radius: 8px; white-space: nowrap;
  transform: translateZ(var(--lz, 0px)) translate(-50%, -100%) rotateZ(calc(-1 * var(--mz3))) rotateX(calc(-1 * var(--mx3))) translateY(-14px); transform-origin: 50% 100%;
  background: rgba(6, 14, 28, .88); border: 1px solid rgba(92, 200, 255, .35); color: var(--white); font: 700 .72rem var(--font); letter-spacing: .02em;
  box-shadow: 0 3px 0 -1px #040b16, 0 14px 24px -10px rgba(0, 0, 0, .9); transition: transform 1s var(--ease-out);
}
.la-pin.is-main .la-pin-label { background: var(--blue); border-color: #5cc8ff; box-shadow: 0 3px 0 #0c5d92, 0 16px 30px -10px rgba(27, 151, 227, .8); }
/* Downtown sta in mezzo ai grattacieli: l'etichetta sale sopra i tetti, unita al suolo da una colonna di luce */
.la-pin.is-main { --lz: 132px; }
.la-pin.is-main::after {
  content: ""; position: absolute; left: -1px; top: calc(-1 * var(--lz)); width: 2px; height: var(--lz); transform-origin: 50% 100%; transform: rotateX(-90deg);
  background: linear-gradient(0deg, rgba(92, 200, 255, .9), rgba(207, 234, 255, .2)); box-shadow: 0 0 10px #5cc8ff;
}

/* ---------------------------------------------------------------- card dei contenuti */
.site .dept-card-art { isolation: isolate; }
.dept-card.is-tilting .dept-card-art .art-inner { transform: translate3d(calc((var(--mx, 50%) - 50%) * -.08), calc((var(--my, 50%) - 50%) * -.06), 0) scale(1.1); transition-duration: .2s; }
.site .dept-card-art::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(0deg, rgba(6, 14, 28, .7), transparent 45%), linear-gradient(115deg, rgba(255, 255, 255, .08), transparent 35%); }
.site .dept-badge { z-index: 1; box-shadow: 0 3px 0 #030a16, 0 10px 18px -6px rgba(0, 0, 0, .8); }
.site .step-card a { overflow: visible; }
.site .step-n { top: -10px; right: 14px; font-size: 4.4rem; color: rgba(92, 200, 255, .12); text-shadow: 0 2px 0 rgba(3, 10, 22, .9), 0 4px 0 rgba(3, 10, 22, .6); }
.site .profile-avatar { box-shadow: 0 0 0 6px rgba(27, 151, 227, .1), 0 6px 0 -1px #061226, 0 22px 40px -14px rgba(27, 151, 227, .55); }
.site .avatar-sm { box-shadow: 0 3px 0 #0a2c48, 0 10px 18px -8px rgba(27, 151, 227, .6); }
.site .product-media { perspective: 600px; }
.site .product-logo { animation: logo-float 6s ease-in-out infinite; }
@keyframes logo-float { 0%, 100% { translate: 0 0; rotate: y 0deg; } 50% { translate: 0 -6px; rotate: y 14deg; } }
.site .join-n { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), 0 5px 0 #0a3f66, 0 18px 30px -12px rgba(27, 151, 227, .7); text-shadow: 0 2px 0 rgba(3, 20, 40, .5); }
.site .code-value { text-shadow: 0 2px 0 #0b1c33, 0 4px 0 #081425, 0 14px 28px rgba(27, 151, 227, .35); }
.site .chip-list li { box-shadow: 0 3px 0 -1px #061226; }

/* pagina Dipartimenti: illustrazioni come pannelli in prospettiva */
.site .dept-feature-art { transform: perspective(1400px) rotateY(calc(-9deg + var(--ry, 0deg))) rotateX(var(--rx, 0deg)); transition: transform 1s var(--ease-out), box-shadow var(--dur-m), border-color var(--dur-m); box-shadow: 0 6px 0 -1px var(--d-edge), 0 40px 80px -30px rgba(0, 0, 0, .9); }
.site .dept-feature.is-flip .dept-feature-art { transform: perspective(1400px) rotateY(calc(9deg + var(--ry, 0deg))) rotateX(var(--rx, 0deg)); }
.site .dept-feature-art.reveal-mask { transform: perspective(1400px) rotateY(0deg); }
.site .dept-detail-art { transform: perspective(1200px) rotateY(-12deg) rotateX(4deg); box-shadow: 0 6px 0 -1px var(--d-edge), 0 40px 80px -30px rgba(0, 0, 0, .9), 0 0 60px -20px rgba(27, 151, 227, .5); }
.site .dept-index a.is-current { box-shadow: inset 2px 0 0 var(--blue), 0 10px 20px -14px rgba(27, 151, 227, .8); }

/* ---------------------------------------------------------------- intestazioni delle pagine interne */
.page-hero.has-scene { perspective: 1200px; }
.ph-depth { position: absolute; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; perspective: 1100px; }
.ph-floor {
  position: absolute; left: -40%; right: -40%; bottom: -2%; height: 48%; transform: rotateX(76deg); transform-origin: 50% 100%;
  background-image: linear-gradient(rgba(92, 200, 255, .2) 1px, transparent 1px), linear-gradient(90deg, rgba(92, 200, 255, .2) 1px, transparent 1px); background-size: 64px 64px;
  -webkit-mask-image: linear-gradient(0deg, #000, transparent 85%); mask-image: linear-gradient(0deg, #000, transparent 85%); opacity: .55;
}
.ph-plate {
  position: absolute; border-radius: 22px; border: 1px solid rgba(150, 210, 255, .24); transform-style: preserve-3d;
  background: linear-gradient(150deg, rgba(92, 200, 255, .16), rgba(27, 151, 227, .03) 60%), linear-gradient(0deg, rgba(5, 13, 26, .2), rgba(5, 13, 26, .2));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2), 0 30px 60px -30px rgba(0, 0, 0, .8); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
  transition: transform 1.1s var(--ease-out);
}
.ph-plate::after { content: ""; position: absolute; inset: 14px; border-radius: 14px; border: 1px dashed rgba(150, 210, 255, .18); }
.ph-plate-1 { right: 8%; top: 22%; width: 22vw; max-width: 300px; aspect-ratio: 4 / 3; transform: translate3d(calc(var(--px, 0) * -20px), calc(var(--py, 0) * -12px), 0) rotateY(-30deg) rotateX(10deg); animation: plate-float 11s ease-in-out infinite; }
.ph-plate-2 { right: 22%; top: 46%; width: 13vw; max-width: 180px; aspect-ratio: 1; transform: translate3d(calc(var(--px, 0) * -36px), calc(var(--py, 0) * -18px), 80px) rotateY(-34deg) rotateX(14deg) rotateZ(6deg); animation: plate-float 9s ease-in-out -3s infinite; }
.ph-plate-3 { right: 2%; top: 58%; width: 9vw; max-width: 130px; aspect-ratio: 3 / 4; transform: translate3d(calc(var(--px, 0) * -48px), calc(var(--py, 0) * -24px), 140px) rotateY(-24deg) rotateX(-8deg); animation: plate-float 12s ease-in-out -6s infinite; }
@keyframes plate-float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -14px; } }
.ph-depth-b .ph-plate-1 { top: 16%; right: 14%; transform: translate3d(calc(var(--px, 0) * -20px), calc(var(--py, 0) * -12px), 0) rotateY(-22deg) rotateX(-8deg) rotateZ(-4deg); }
.ph-depth-b .ph-plate-2 { top: 52%; right: 4%; }
.ph-depth-c .ph-plate-1 { top: 30%; right: 4%; aspect-ratio: 16 / 9; width: 26vw; max-width: 360px; }
.ph-depth-c .ph-plate-3 { right: 30%; top: 20%; }
.ph-orb { position: absolute; right: 12%; top: 30%; width: 26vw; height: 26vw; border-radius: 50%; background: radial-gradient(closest-side, rgba(27, 151, 227, .3), transparent); transform: translate3d(calc(var(--px, 0) * 20px), 0, -100px); }
.site .page-hero .breadcrumb ol { display: inline-flex; padding: 6px 12px; border-radius: 999px; background: rgba(6, 14, 28, .55); border: 1px solid rgba(150, 200, 245, .14); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.site .page-hero h1 { animation: rise-depth 1s var(--ease-out) .12s both; }
@keyframes rise-depth { from { opacity: 0; transform: perspective(800px) translate3d(0, 30px, -120px) rotateX(16deg); } }

/* ---------------------------------------------------------------- footer: orizzonte in prospettiva */
.site .site-footer { position: relative; overflow: hidden; isolation: isolate; background: linear-gradient(180deg, #050d1a, #03070f); padding-top: 120px; }
.footer-horizon { position: absolute; left: 0; right: 0; top: 0; height: 200px; z-index: -1; perspective: 400px; pointer-events: none; }
.fh-floor {
  position: absolute; left: -60%; right: -60%; top: 40px; height: 260px; transform: rotateX(68deg); transform-origin: 50% 0;
  background-image: linear-gradient(rgba(92, 200, 255, .22) 1px, transparent 1px), linear-gradient(90deg, rgba(92, 200, 255, .22) 1px, transparent 1px); background-size: 60px 60px;
  -webkit-mask-image: linear-gradient(180deg, #000, transparent 80%); mask-image: linear-gradient(180deg, #000, transparent 80%);
  animation: fh-move 6s linear infinite;
}
@keyframes fh-move { to { background-position: 0 60px; } }
.fh-sun { position: absolute; left: 50%; top: -60px; width: 70%; height: 140px; transform: translateX(-50%); border-radius: 50%; background: radial-gradient(closest-side, rgba(27, 151, 227, .35), transparent); }
.fh-line { position: absolute; left: 0; right: 0; top: 40px; height: 1px; background: linear-gradient(90deg, transparent, rgba(92, 200, 255, .9), transparent); box-shadow: 0 0 18px rgba(27, 151, 227, .8); }
.site .footer-code { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1), 0 4px 0 -1px #061226, 0 18px 30px -14px rgba(27, 151, 227, .5); }
.site .site-footer li a { display: inline-block; transition: color var(--dur-s), transform var(--dur-m) var(--ease-out); }
.site .site-footer li a:hover { transform: translateX(4px); }

/* ---------------------------------------------------------------- vota ATRP su Melonly
   Medaglia decorativa con UNA stella a strati: niente file di stelle che sembrino un punteggio. */
.section-vote { position: relative; overflow: hidden; }
.section-vote::before { content: ""; position: absolute; inset: 6% -10% auto; height: 80%; pointer-events: none; background: radial-gradient(38% 55% at 72% 50%, rgba(27, 151, 227, .22), transparent 70%); }
.vote-grid { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .9fr); gap: clamp(28px, 5vw, 72px); align-items: center; }
.vote-steps { list-style: none; display: grid; gap: 10px; margin: 22px 0 26px; padding: 0; }
.vote-steps li { display: flex; align-items: center; gap: 12px; color: #dce7f2; }
.vote-n {
  flex: none; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; font: 800 1rem var(--font-display); color: var(--white);
  background: linear-gradient(160deg, #2aa8f0, #1b97e3); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 3px 0 #0c5d92, 0 10px 18px -8px rgba(27, 151, 227, .7);
}
.vote-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.vote-note { display: flex; gap: 8px; max-width: 58ch; margin: 18px 0 0; font-size: .82rem; color: var(--muted); }
.vote-note .icon { flex: none; width: 16px; height: 16px; margin-top: 2px; color: var(--blue-300); }

.vote-stage { position: relative; display: grid; place-items: center; min-height: 420px; perspective: 1200px; }
.vote-orbit {
  position: absolute; width: min(430px, 94%); aspect-ratio: 1; border-radius: 50%; border: 1px dashed rgba(92, 200, 255, .35);
  transform: rotateX(70deg) rotateZ(calc(var(--sp, .5) * 140deg)); transition: transform 1s var(--ease-out);
  box-shadow: 0 0 60px rgba(27, 151, 227, .22), inset 0 0 40px rgba(27, 151, 227, .14);
}
.vote-card {
  position: relative; width: min(330px, 86%); padding: 32px 26px 30px; border-radius: 26px; text-align: center; transform-style: preserve-3d;
  transform: rotateY(calc(-14deg + var(--px, 0) * 14deg)) rotateX(calc(8deg - var(--py, 0) * 10deg)); transition: transform .9s var(--ease-out);
  background: linear-gradient(160deg, rgba(36, 62, 100, .94), rgba(9, 18, 34, .97) 70%); border: 1px solid rgba(92, 200, 255, .35);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18), 0 6px 0 -1px #040b16, 0 40px 70px -24px rgba(0, 0, 0, .95), 0 0 70px -20px rgba(27, 151, 227, .7);
}
.vote-card-bg { position: absolute; inset: 0; border-radius: inherit; overflow: hidden; pointer-events: none; }
.vote-glare { position: absolute; inset: 0; background: radial-gradient(45% 35% at calc(40% + var(--px, 0) * 40%) calc(20% + var(--py, 0) * 30%), rgba(255, 255, 255, .16), transparent 70%); }
.vote-skyline {
  position: absolute; left: 0; right: 0; bottom: 0; height: 36%; opacity: .6;
  background:
    linear-gradient(0deg, rgba(27, 151, 227, .35), transparent 2px) bottom 30% left 0 / 100% 2px no-repeat,
    linear-gradient(90deg, transparent 0 5%, #0e2440 5% 12%, transparent 12% 15%, #102a4b 15% 22%, transparent 22% 29%, #0e2440 29% 33%, transparent 33% 39%, #12315a 39% 48%, transparent 48% 54%, #0e2440 54% 60%, transparent 60% 65%, #102a4b 65% 73%, transparent 73% 79%, #0e2440 79% 86%, transparent 86% 90%, #102a4b 90% 96%, transparent 96%) bottom / 100% 62% no-repeat,
    linear-gradient(90deg, transparent 0 17%, #0d2240 17% 20%, transparent 20% 42%, #0d2240 42% 45%, transparent 45% 68%, #0d2240 68% 70%, transparent 70%) bottom / 100% 100% no-repeat,
    linear-gradient(0deg, #07111f, transparent 30%);
}
.vote-medal { position: relative; width: 150px; height: 150px; margin: 0 auto 18px; transform-style: preserve-3d; transform: translateZ(46px) rotateY(calc(var(--px, 0) * 24deg)); animation: vote-sway 9s ease-in-out infinite; }
@keyframes vote-sway { 0%, 100% { rotate: y -12deg; } 50% { rotate: y 16deg; } }
.vote-halo { position: absolute; inset: -20px; border-radius: 50%; background: radial-gradient(closest-side, rgba(92, 200, 255, .45), rgba(27, 151, 227, .12) 60%, transparent); transform: translateZ(-24px); }
.vote-star { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.vote-star.is-depth { transform: translateZ(var(--z)); fill: #0d4a78; }
.vote-star.is-face { transform: translateZ(3px); filter: drop-shadow(0 0 16px rgba(92, 200, 255, .65)); }
.vote-card > p { position: relative; transform: translateZ(22px); }
.vote-card-kicker { margin: 0; font: 800 .68rem var(--font); letter-spacing: .22em; text-transform: uppercase; color: var(--blue-300); }
.vote-card-title { margin: 6px 0 4px; font: 800 1.35rem/1.15 var(--font-display); color: var(--white); }
.vote-card-sub { margin: 0; font-size: .86rem; color: #b8c8d9; }
.vote-spark { position: absolute; width: 14px; height: 14px; background: radial-gradient(closest-side, #ffffff, rgba(159, 220, 255, .8) 45%, transparent); clip-path: polygon(50% 0, 60% 40%, 100% 50%, 60% 60%, 50% 100%, 40% 60%, 0 50%, 40% 40%); animation: vote-twinkle 3.4s ease-in-out infinite; }
.vote-spark.s1 { top: 12%; left: 12%; }
.vote-spark.s2 { top: 20%; right: 10%; width: 10px; height: 10px; animation-delay: -1.1s; }
.vote-spark.s3 { bottom: 22%; left: 8%; animation-delay: -2.2s; }
.vote-spark.s4 { bottom: 10%; right: 16%; width: 18px; height: 18px; animation-delay: -.6s; }
@keyframes vote-twinkle { 0%, 100% { opacity: .2; transform: scale(.6); } 50% { opacity: 1; transform: scale(1); } }

/* ---------------------------------------------------------------- schermi medi e piccoli */
@media (max-width: 1100px) {
  .hero-layout { grid-template-columns: minmax(0, 1fr) minmax(0, .9fr); }
  .bot-modules { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  .hero.hero-3d { padding-top: calc(var(--header-h) + 6px); }
  .hero-3d .scene { height: calc(var(--header-h) + 66vw); bottom: auto; }
  .hero-layout { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .hero-stage { order: -1; margin: 0 -16px; }
  .hc-a { left: 5%; top: 9%; } .hc-b { right: 10%; top: 15%; }
  .hero-chip3d { padding: 7px 11px; } .hero-chip3d strong { font-size: .95rem; }
  .v3d-toggle { right: 16px; bottom: 0; }
  .sys, .city-grid { grid-template-columns: minmax(0, 1fr); }
  .sys.is-flip .sys-media { order: 0; }
  .section-systems::before { display: none; }
  .ph-plate-1 { width: 34vw; } .ph-plate-2 { width: 20vw; right: 30%; } .ph-plate-3 { display: none; }
  /* colonna unica: tavolo e mappa non si allargano oltre le proporzioni del layout a due colonne */
  .net-stage { height: 430px; }
  .net-plane { left: max(6%, calc(50% - 290px)); right: max(6%, calc(50% - 290px)); }
  .la-stage { height: clamp(340px, 62vw, 480px); }
  .la-plane { width: min(460px, 82%); }
}
@media (max-width: 640px) {
  .hero-chip3d.hc-a { display: none; }
  .hc-b { right: 6%; top: 3%; transform: translate3d(0, 0, 30px) rotateY(-14deg); }
  .bot-modules { grid-template-columns: minmax(0, 1fr); }
  .net-stage { height: 330px; }
  .net-plane { inset: 25% 1% 6%; }
  .net-pillar { max-width: 118px; padding: 7px 9px; }
  .net-pillar strong { font-size: .8rem; }
  .net-pillar small { display: none; }
  .net-icon { width: 26px; height: 26px; }
  .net-node.is-main .net-pillar { padding: 8px 10px; }
  .net-node.is-main .net-icon { width: 32px; height: 32px; }
  .cad-pop { padding: 7px 10px; } .cad-pop small { display: none; }
  .cad-pop-a { right: 4%; }
  .dev-stage { padding: 6% 2% 14%; }
  .rp-card-1 .rp-tag { top: 10px; bottom: auto; }
  .rp-hud { top: -5%; right: 0; font-size: .64rem; }
  .la-stage { height: 320px; }
  .la-plane { width: 80%; translate: 5% 0; }
  .la-pin-label { font-size: .62rem; padding: 3px 7px; }
  .ph-depth .ph-plate { opacity: .55; }
  .site .step-n { font-size: 3.4rem; }
}

/* ---------------------------------------------------------------- movimento ridotto
   motion.css spegne animazioni e transizioni; qui si fissano le pose statiche (resta il 3D). */
@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal-mask, [data-reveal].reveal { opacity: 1 !important; transform: none !important; }
  .hh-beam { display: none; }
  .vote-medal, .vote-spark { animation: none; }
  .vote-spark { opacity: .55; }
}
@media (max-width: 900px) {
  .vote-grid { grid-template-columns: minmax(0, 1fr); }
  .vote-stage { min-height: 360px; }
}
@media (max-width: 640px) {
  .vote-stage { min-height: 310px; }
  .vote-medal { width: 118px; height: 118px; }
  .vote-actions .btn { width: 100%; justify-content: center; }
}
