/* ==========================================================================
   The Collector's District — HOME v2 (racconto a scene, riferimento kprverse.com)
   Le variabili qui sotto diventano i Global Colors / Global Fonts di Elementor.
   Regola: senza JS (o con ?nomotion) ogni scena è già nel suo stato finale;
   home.js aggiunge solo i movimenti.
   ========================================================================== */

:root {
  /* Global Colors */
  --paper: #f2efe8;        /* Bg cornice e scene chiare */
  --paper-2: #e8e4da;      /* Surface */
  --ink: #0d0d0f;          /* Primary / testo su chiaro */
  --ink-2: #57544d;        /* Text secondario */
  --line: rgba(13, 13, 15, .14);
  --night: #08080a;        /* scene scure, Trading Night, footer */
  --on-dark: #f2efe8;
  --on-dark-2: #b9b5ab;
  --line-dark: rgba(242, 239, 232, .22);
  --gold: #d4b26a;         /* Accent: oro del logo in evidenza */
  --gold-ink: #241b0c;

  /* Global Fonts */
  --f-display: "Archivo", "Helvetica Neue", Arial, sans-serif;  /* titoli, numeri */
  --f-text: "Archivo", "Helvetica Neue", Arial, sans-serif;     /* corpo */
  --f-mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;    /* HUD, etichette */

  /* Layout */
  --frame: 12px;           /* distanza della cornice dal bordo */
  --bar: 52px;             /* altezza barra in alto e larghezza barra laterale */
  --safe-l: calc(var(--frame) + var(--bar) + 32px);
  --safe-r: calc(var(--frame) + 32px);
  --safe-t: calc(var(--frame) + var(--bar) + 28px);
  --ease: cubic-bezier(.2, .7, .2, 1);
  --n: 22px;               /* profondità della linguetta delle carte sagomate */
}
@media (max-width: 767px) {
  :root { --frame: 8px; --bar: 48px; --safe-l: 20px; --safe-r: 20px; --safe-t: calc(var(--frame) + var(--bar) + 20px); --n: 14px; }
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body { background: var(--paper); color: var(--ink); font: 400 16px/1.55 var(--f-text); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
::selection { background: var(--gold); color: var(--ink); }

/* ---------- tipografia ---------- */
.hud { font: 500 11px/1.5 var(--f-mono); letter-spacing: .06em; text-transform: uppercase; }
.h-big { font: 900 clamp(34px, 4.6vw, 72px)/.92 var(--f-display); font-stretch: 100%; letter-spacing: -.035em; text-transform: uppercase; text-wrap: balance; }
.h-mid { font: 800 clamp(26px, 3vw, 46px)/.98 var(--f-display); letter-spacing: -.03em; text-transform: uppercase; text-wrap: balance; }
.lead { font-size: clamp(16px, 1.3vw, 19px); line-height: 1.55; color: var(--ink-2); max-width: 46ch; }
.sec-num { display: inline-flex; align-items: center; gap: 6px; font-size: 10px; }
.sec-num::before { content: ""; width: 5px; height: 5px; background: currentColor; }
.tbd { font-family: var(--f-mono); font-size: .92em; text-transform: none; letter-spacing: 0; background: rgba(212,178,106,.28); outline: 1px dashed rgba(212,178,106,.9); outline-offset: 1px; padding: 0 3px; border-radius: 2px; }
.tbd-note { grid-column: 1 / -1; margin-top: 6px; opacity: .8; }

.link-arrow { display: inline-flex; align-items: center; gap: 10px; font: 500 12px/1 var(--f-mono); letter-spacing: .06em; text-transform: uppercase; text-decoration: none; border-bottom: 1px solid currentColor; padding-bottom: 6px; }
.link-arrow::after { content: "→"; transition: transform .35s var(--ease); }
.link-arrow:hover::after { transform: translateX(4px); }
.btn { display: inline-flex; align-items: center; height: 50px; padding: 0 26px; border-radius: 999px; background: var(--ink); color: var(--paper); border: 1px solid var(--ink); text-decoration: none; font: 600 14px/1 var(--f-text); transition: background .3s, color .3s, border-color .3s; }
.btn:hover { background: var(--gold); border-color: var(--gold); color: var(--ink); }
.btn--ghost { background: transparent; color: var(--ink); }
.btn--light { background: var(--on-dark); color: var(--night); border-color: var(--on-dark); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

/* ---------- carta sagomata (linguetta in alto a destra, angolo smussato in basso) ---------- */
.notch { position: relative; overflow: hidden; background: #222;
  clip-path: polygon(0 0, 58% 0, calc(58% + var(--n)) var(--n), 100% var(--n), 100% calc(100% - var(--n)), calc(100% - var(--n)) 100%, 0 100%); }
.notch--sm { --n: 12px; }
.notch > img { width: 100%; height: 100%; object-fit: cover; }

/* ==========================================================================
   UI KIT (cartella "UI KIT" di Diego): bottoni, campo email, loader.
   Sagoma unica del kit (rettangolo con scalino in alto a sx e in basso a dx) in img/kit/forma.svg,
   ritagliata con -webkit-mask-box-image: gli angoli restano fissi, il centro si allunga col testo.
   ========================================================================== */
.kbtn { --kh: 56px; --kb: var(--ink); --kc: var(--paper); --kline: var(--ink); --kfill: var(--paper); display: inline-flex; align-items: stretch; gap: 6px; text-decoration: none; }
.scene--dark .kbtn, .scene--night .kbtn, .hero2 .kbtn, .console .kbtn { --kb: var(--on-dark); --kc: var(--night); --kline: var(--on-dark); --kfill: var(--night); }
.kbtn--sm { --kh: 46px; }
.kbtn__body { position: relative; display: inline-flex; align-items: center; gap: 22px; height: var(--kh); padding: 0 20px 0 24px; background: var(--kb); color: var(--kc);
  font: 900 15px/1 var(--f-display); font-stretch: 115%; letter-spacing: .03em; text-transform: uppercase; white-space: nowrap;
  -webkit-mask-box-image: url("img/kit/forma.svg") 28 fill / 20px stretch; transition: background .3s, color .3s; }
.kbtn--sm .kbtn__body { font-size: 13px; gap: 16px; padding: 0 16px 0 20px; -webkit-mask-box-image: url("img/kit/forma.svg") 28 fill / 16px stretch; }
.kbtn__body > span { position: relative; z-index: 1; }
.kbtn__body::after { content: ""; position: relative; z-index: 1; width: 1.35em; height: 1.35em; background: currentColor; -webkit-mask: url("img/kit/freccia-dx.svg") center / contain no-repeat; mask: url("img/kit/freccia-dx.svg") center / contain no-repeat; transition: transform .35s var(--ease); }
/* una freccia sola: se c'è il quadratino ↗, niente → dentro il bottone */
.kbtn:has(.kbtn__ico) .kbtn__body::after { display: none; }
.kbtn:has(.kbtn__ico) .kbtn__body { padding-right: 26px; }
.kbtn__ico { width: var(--kh); height: var(--kh); display: grid; place-items: center; background: var(--kb); -webkit-mask-box-image: url("img/kit/forma.svg") 28 fill / 20px stretch; transition: background .3s; }
.kbtn--sm .kbtn__ico { -webkit-mask-box-image: url("img/kit/forma.svg") 28 fill / 16px stretch; }
.kbtn__ico::before { content: ""; width: 46%; height: 46%; background: var(--kc); -webkit-mask: url("img/kit/freccia-ne.svg") center / contain no-repeat; mask: url("img/kit/freccia-ne.svg") center / contain no-repeat; transition: transform .35s var(--ease), background .3s; }
.kbtn:hover .kbtn__body, .kbtn:hover .kbtn__ico { background: var(--gold); color: var(--ink); }
.kbtn:hover .kbtn__ico::before { background: var(--ink); transform: translate(2px, -2px); }
.kbtn:hover .kbtn__body::after { transform: translateX(4px); }
.kbtn:focus-visible { outline: none; }
.kbtn:focus-visible .kbtn__body { background: var(--gold); color: var(--ink); }
/* secondario: contorno */
.kbtn--sec .kbtn__body { background: var(--kline); color: var(--kline); }
.kbtn--sec .kbtn__body::before { content: ""; position: absolute; inset: 3px; background: var(--kfill); -webkit-mask-box-image: url("img/kit/forma.svg") 28 fill / 18px stretch; transition: background .3s; }
.kbtn--sec.kbtn--sm .kbtn__body::before { -webkit-mask-box-image: url("img/kit/forma.svg") 28 fill / 14px stretch; }
.kbtn--sec:hover .kbtn__body { background: var(--kline); color: var(--ink); }
.kbtn--sec:hover .kbtn__body::before { background: var(--gold); }

/* campo email (INPUT del kit) */
.kinput { --kline: var(--ink); --kfill: var(--paper); --ktext: var(--ink); display: grid; gap: 8px; width: min(420px, 100%); }
.scene--dark .kinput, .scene--night .kinput { --kline: var(--on-dark); --kfill: var(--night); --ktext: var(--on-dark); }
.kinput__field { position: relative; display: flex; align-items: center; height: 60px; background: var(--kline); -webkit-mask-box-image: url("img/kit/forma.svg") 28 fill / 20px stretch; transition: background .3s; }
.kinput__field::before { content: ""; position: absolute; inset: 3px; background: var(--kfill); -webkit-mask-box-image: url("img/kit/forma.svg") 28 fill / 18px stretch; }
.kinput__field:focus-within { background: var(--gold); }
.kinput input { position: relative; z-index: 1; flex: 1; min-width: 0; height: 100%; padding: 0 14px 0 24px; background: transparent; border: 0; outline: 0; color: var(--ktext); font: 500 15px/1 var(--f-mono); }
.kinput input::placeholder { color: color-mix(in srgb, var(--ktext) 45%, transparent); }
.kinput__ok { position: relative; z-index: 1; flex: 0 0 auto; width: 44px; height: 44px; margin-right: 8px; display: grid; place-items: center; background: var(--kline); -webkit-mask-box-image: url("img/kit/forma.svg") 28 fill / 14px stretch; transition: background .3s; }
.kinput__ok::before { content: ""; width: 50%; height: 50%; background: var(--kfill); -webkit-mask: url("img/kit/spunta.svg") center / contain no-repeat; mask: url("img/kit/spunta.svg") center / contain no-repeat; }
.kinput__ok:hover, .kinput__ok:focus-visible { background: var(--gold); outline: none; }
.kinput.is-error .kinput__field { background: #c2452d; }

/* loader a segmenti (LOADER · SEGMENTI del kit) */
.kload { position: relative; display: flex; align-items: center; gap: 14px; width: min(440px, 82vw); height: 48px; padding: 0 16px 0 20px; background: var(--ink); -webkit-mask-box-image: url("img/kit/forma-loader.svg") 24 fill / 18px stretch; }
.kload::before { content: ""; position: absolute; inset: 3px; background: var(--paper); -webkit-mask-box-image: url("img/kit/forma-loader.svg") 24 fill / 16px stretch; }
.kload__seg { position: relative; z-index: 1; flex: 1; height: 26px; display: grid; grid-template-columns: repeat(14, 1fr); gap: 5px; }
.kload__seg i { background: #d6d6d6; border-radius: 3px; transition: background .15s; }
.kload__seg i.on { background: var(--ink); }
.kload__pct { position: relative; z-index: 1; font: 500 12px/1 var(--f-mono); font-variant-numeric: tabular-nums; }

/* Firefox non supporta mask-box-image: rettangoli arrotondati */
@supports not (-webkit-mask-box-image: url("img/kit/forma.svg") 28 fill / 20px stretch) {
  .kbtn__body, .kbtn__ico, .kbtn--sec .kbtn__body::before, .kinput__field, .kinput__field::before, .kinput__ok, .kload, .kload::before, .chrome__cta { border-radius: 10px; }
}

/* ==========================================================================
   CORNICE
   ========================================================================== */
.chrome { --c: var(--ink); --c-line: var(--line); --c-bg: rgba(242,239,232,.86); --c-solid: rgba(242,239,232,.94); position: fixed; inset: 0; z-index: 50; pointer-events: none; color: var(--c); transition: color .5s; }
body[data-chrome="dark"] .chrome { --c: var(--on-dark); --c-line: var(--line-dark); --c-bg: rgba(8,8,10,.35); --c-solid: rgba(8,8,10,.9); }
/* header sempre leggibile: fascia piena dal bordo dello schermo fino sotto la barra, i contenuti ci scorrono sotto */
.chrome::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: calc(var(--frame) + var(--bar)); background: var(--c-solid); -webkit-backdrop-filter: blur(14px) saturate(1.2); backdrop-filter: blur(14px) saturate(1.2); transition: background .5s; }
.chrome__frame { position: absolute; inset: var(--frame); border: 1px solid var(--c-line); border-radius: 14px; transition: border-color .5s; }
.chrome__top { position: absolute; top: var(--frame); left: var(--frame); right: var(--frame); height: var(--bar); display: flex; align-items: center; border-bottom: 1px solid var(--c-line); pointer-events: auto; transition: border-color .5s; }
.chrome__menu { width: var(--bar); height: 100%; display: grid; place-content: center; gap: 5px; border-right: 1px solid var(--c-line); }
.chrome__menu i { display: block; width: 18px; height: 1.5px; background: currentColor; transition: transform .4s var(--ease); }
.chrome__menu[aria-expanded="true"] i:first-child { transform: translateY(3.25px) rotate(45deg); }
.chrome__menu[aria-expanded="true"] i:last-child { transform: translateY(-3.25px) rotate(-45deg); }
.chrome__progress { width: 120px; height: 100%; border-right: 1px solid var(--c-line); position: relative; overflow: hidden; }
.chrome__progress b { position: absolute; inset: 0; background: var(--c-line); transform-origin: left; transform: scaleX(var(--p, 0)); }
.chrome__nav { flex: 1; display: flex; justify-content: center; gap: 28px; }
.chrome__nav a { font: 500 10.5px/1 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; text-decoration: none; opacity: .5; display: inline-flex; align-items: center; gap: 7px; transition: opacity .3s; }
.chrome__nav a::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; transform: scale(0); transition: transform .3s var(--ease); }
.chrome__nav a:hover, .chrome__nav a.is-active { opacity: 1; }
.chrome__nav a.is-active::before { transform: scale(1); }
.chrome__cta { margin-right: 8px; height: 36px; padding: 0 16px; display: inline-flex; align-items: center; background: var(--c); color: var(--paper); text-decoration: none; font: 900 11.5px/1 var(--f-display); font-stretch: 115%; letter-spacing: .04em; text-transform: uppercase; -webkit-mask-box-image: url("img/kit/forma.svg") 28 fill / 12px stretch; transition: background .3s, color .3s; }
.chrome__cta:hover { background: var(--gold); color: var(--ink); }
body[data-chrome="dark"] .chrome__cta { color: var(--night); }
.chrome__rail { position: absolute; left: var(--frame); top: calc(var(--frame) + var(--bar)); bottom: var(--frame); width: var(--bar); border-right: 1px solid var(--c-line); display: grid; place-items: center; transition: border-color .5s; }
.chrome__rail .star { width: 22px; height: 34px; fill: currentColor; }
.chrome__dots { position: absolute; bottom: 14px; font: 10px/1 var(--f-mono); letter-spacing: .1em; }
@media (max-width: 900px) { .chrome__nav { display: none; } .chrome__progress { flex: 1; width: auto; border-right: 0; align-self: stretch; } .chrome__progress b { top: auto; height: 2px; background: var(--gold); } }
@media (max-width: 767px) { .chrome__rail { display: none; } .chrome__frame { border-radius: 10px; } }

/* menu a tutto schermo */
.menu { position: fixed; inset: 0; z-index: 45; background: var(--night); color: var(--on-dark); display: grid; padding: calc(var(--safe-t) + 20px) var(--safe-r) 40px var(--safe-l); }
.menu[hidden] { display: none; }
.menu__in { display: grid; align-content: space-between; gap: 40px; }
.menu__nav { display: grid; gap: 4px; }
.menu__nav a { font: 900 clamp(34px, 6vw, 88px)/1 var(--f-display); letter-spacing: -.04em; text-transform: uppercase; text-decoration: none; display: flex; align-items: baseline; gap: 16px; transition: color .3s, transform .4s var(--ease); }
.menu__nav a small { font: 500 11px/1 var(--f-mono); letter-spacing: .06em; color: var(--on-dark-2); }
.menu__nav a:hover { color: var(--gold); transform: translateX(10px); }

/* intro */
.intro { position: fixed; inset: 0; z-index: 60; background: var(--paper); display: grid; place-content: center; justify-items: center; gap: 22px; }
.intro .hud { color: var(--ink-2); }
.intro[hidden] { display: none; }
.no-intro .intro { display: none; }

/* ==========================================================================
   SCENE
   ========================================================================== */
.scene { position: relative; }
.pin { position: relative; height: 100svh; min-height: 620px; overflow: hidden; }
.scene--dark { background: var(--night); color: var(--on-dark); }
.scene--night { background: #000; color: var(--on-dark); }
.scene--gold { background: var(--gold); color: var(--gold-ink); }

/* S01 HERO */
.hero__bg, .hero__shade { position: absolute; inset: 0; }
.hero__bg img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; transform: scale(1.06); }
.hero__shade { background: linear-gradient(180deg, rgba(8,8,10,.55) 0%, rgba(8,8,10,.05) 35%, rgba(8,8,10,.15) 60%, rgba(8,8,10,.85) 100%); }
.hero__intro { position: absolute; top: var(--safe-t); left: var(--safe-l); max-width: 30ch; font-size: 14px; color: var(--on-dark); }
.hero__logo { position: absolute; left: 50%; top: 31%; width: min(60vw, 860px); transform: translate(-50%, -50%); filter: drop-shadow(0 10px 40px rgba(0,0,0,.55)); }
.hero__logo img { width: 100%; height: auto; }
.hero__manifesto { position: absolute; left: var(--safe-l); right: var(--safe-r); bottom: 9%; display: grid; font: 900 clamp(48px, 9.4vw, 150px)/.82 var(--f-display); letter-spacing: -.055em; text-transform: uppercase; }
.hero__manifesto span { display: block; }
.hero__manifesto .m1 { margin-left: 22%; }
.hero__manifesto .m2 { margin-left: 34%; }
.hero__manifesto .m3 { margin-left: 0; }
.hero__hud { position: absolute; right: var(--safe-r); top: var(--safe-t); display: grid; gap: 10px; text-align: right; }
.hero__hud dt { opacity: .6; }
.hero__hud a { text-decoration: none; border-bottom: 1px solid currentColor; }
.hero__scroll { position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%); opacity: .7; }
.hero .sec-num { position: absolute; left: var(--safe-l); bottom: 22px; }
@media (max-width: 900px) { .hero__logo { top: 44%; width: 86vw; } }
@media (max-width: 767px) {
  .hero__logo { top: 44%; width: 92vw; }
  .hero__manifesto { bottom: 9%; font-size: 13.2vw; }
  .hero__manifesto .m1 { margin-left: 0; } .hero__manifesto .m2 { margin-left: 14%; }
  .hero__hud { top: calc(var(--safe-t) + 74px); right: auto; left: var(--safe-l); grid-auto-flow: column; gap: 18px; text-align: left; }
  .hero__intro { right: var(--safe-r); }
}

/* S01 HERO v2 — mockup di Diego: illustrazione vista da tre finestre sagomate (finestre.svg) */
.hero2 { background: #000; color: var(--on-dark); }
.hero2 .pin { background: #000; }
.hero2__ghost { position: absolute; left: 50%; top: 50%; width: 135vw; max-width: none; transform: translate(-50%, -50%); opacity: .38; pointer-events: none; } /* variante B scelta il 7/10 */
.hero2__art { position: absolute; left: 50%; top: calc(50% + (var(--frame) + var(--bar)) / 2); width: min(100vw, calc((100svh - var(--frame) - var(--bar)) * 16 / 9)); aspect-ratio: 16 / 9; transform: translate(-50%, -50%); container-type: inline-size; }
.hero2__win { --k: 1; position: absolute; inset: 0; overflow: hidden;
  -webkit-mask: url("img/hero/finestre.svg") no-repeat; mask: url("img/hero/finestre.svg") no-repeat;
  -webkit-mask-size: calc(100% * var(--k)) calc(100% * var(--k)); mask-size: calc(100% * var(--k)) calc(100% * var(--k));
  -webkit-mask-position: 55.5% 41.7%; mask-position: 55.5% 41.7%; }
.hero2__win img { width: 100%; height: 100%; object-fit: cover; }
.hero2__shade { position: absolute; inset: 0; opacity: 0; pointer-events: none; background: linear-gradient(180deg, rgba(8,8,10,.25), rgba(8,8,10,.1) 35%, rgba(8,8,10,.75)); }
.hero2__logo { position: absolute; left: 41.9%; top: 2.7%; width: 43.7%; }
.hero2__logo img { width: 100%; height: auto; }
.hero2__logo .is-chiaro { position: absolute; inset: 0; opacity: 0; }
.hero2__tl { position: absolute; left: 8.6%; top: 2.7%; list-style: none; display: grid; gap: .35cqw; font-size: max(10px, .95cqw); }
.hero2__tl li::before { content: "↗ "; }
.hero2__txt { position: absolute; left: 57.3%; top: 78%; width: 30%; display: grid; gap: .55cqw; justify-items: start; }
.hero2__txt h2 { font: 800 max(20px, 2.1cqw)/.98 var(--f-display); letter-spacing: -.03em; text-transform: uppercase; }
.hero2__txt p { font: 400 max(13px, .95cqw)/1.5 var(--f-text); color: var(--on-dark-2); }
.hero2__txt a:not(.kbtn) { text-decoration: none; border-bottom: 1px solid currentColor; }
/* alternativa C da confronto: lettere piene in trasparenza (?ghost=c) */
html[data-ghost="c"] .hero2__ghost { width: 250vw; top: 52%; transform: translate(-46%, -50%); opacity: .09 !important; }
/* "Scorri": angolo in basso a destra, in verticale, lontano dai testi della composizione */
.hero2 .hero__scroll { left: auto; right: calc(var(--safe-r) - 8px); bottom: 26px; transform: none; writing-mode: vertical-rl; display: flex; align-items: center; gap: 12px; opacity: .75; z-index: 2; }
.hero2 .hero__scroll::after { content: ""; width: 1px; height: 44px; background: currentColor; transform-origin: top; animation: scrollcue 1.8s var(--ease) infinite; }
@media (max-width: 767px) { .hero2 .hero__scroll { display: none; } }
@keyframes scrollcue { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); transform-origin: top; } 51% { transform-origin: bottom; } 100% { transform: scaleY(0); transform-origin: bottom; } }
.hero2 .hero__manifesto { opacity: 0; color: var(--on-dark); }
.has-motion .hero2 .hero__manifesto { opacity: 1; }
.has-motion:not(.fonts-ok) .hero2__logo, .has-motion:not(.fonts-ok) .hero2__tl, .has-motion:not(.fonts-ok) .hero2__txt { visibility: hidden; }
.hero2 .hero__manifesto span { visibility: hidden; }
.has-motion .hero2 .hero__manifesto span { visibility: visible; }
@media (max-width: 767px) {
  .hero2__art { left: 0; top: calc(var(--frame) + var(--bar)); width: 100%; height: calc(100% - var(--frame) - var(--bar)); aspect-ratio: auto; transform: none; }
  /* mobile: date in alto, logo chiaro sul nero, finestre al centro, testo in basso */
  .hero2__win { -webkit-mask-size: calc(40svh * 16 / 9 * var(--k)) calc(40svh * var(--k)); mask-size: calc(40svh * 16 / 9 * var(--k)) calc(40svh * var(--k)); -webkit-mask-position: 55.5% 50%; mask-position: 55.5% 50%; }
  .hero2__logo { left: 10%; top: 50px; width: 80%; }
  .hero2__logo .is-nero { visibility: hidden; }
  .hero2__logo .is-chiaro { opacity: 1; }
  .hero2__tl { left: var(--safe-l); right: var(--safe-r); top: 14px; bottom: auto; display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 10px; }
  .hero2__txt { left: var(--safe-l); right: var(--safe-r); top: auto; bottom: 22px; width: auto; gap: 8px; }
  .hero2__txt h2 { font-size: 26px; }
  .hero2__txt p { font-size: 12px; }
  .hero2__ghost { width: 420vw; top: 50%; opacity: .2; }
  .hero2 .pin { min-height: 0; } /* l'apertura sta sempre in uno schermo, anche sui telefoni bassi */
}
@media (max-width: 767px) and (max-height: 620px) {
  /* telefoni bassi (iPhone SE): finestre e logo più piccoli, così il testo non viene tagliato */
  .hero2__win { -webkit-mask-size: calc(32svh * 16 / 9 * var(--k)) calc(32svh * var(--k)); mask-size: calc(32svh * 16 / 9 * var(--k)) calc(32svh * var(--k)); -webkit-mask-position: 55.5% 44%; mask-position: 55.5% 44%; }
  .hero2__logo { left: 16%; top: 56px; width: 68%; }
  .hero2__txt { gap: 6px; bottom: 16px; }
  .hero2__txt h2 { font-size: 22px; }
  .hero2__txt p { font-size: 11px; }
}

/* S02 IL DISTRETTO */
.district .pin { background: var(--paper); }
.district__grid { position: absolute; inset: calc(var(--frame) + var(--bar)) var(--frame) var(--frame) calc(var(--frame) + var(--bar)); display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); }
.district__copy { display: grid; align-content: start; gap: 26px; padding: 40px 48px; border-right: 1px solid var(--line); }
.district__thumbs { display: flex; gap: 14px; }
.district__thumbs .notch { width: 170px; aspect-ratio: 4 / 3; }
.district__card { margin: 28px; }
.district__card figcaption { position: absolute; left: 18px; bottom: 16px; color: var(--on-dark); }
@media (max-width: 900px) {
  .district .pin { height: auto; min-height: 0; }
  .district__grid { position: relative; inset: auto; grid-template-columns: 1fr; padding: calc(var(--safe-t) - 10px) 0 40px; }
  .district__copy { border-right: 0; padding: 0 var(--safe-r) 0 var(--safe-l); }
  .district__card { margin: 28px var(--safe-r) 0 var(--safe-l); aspect-ratio: 4 / 5; }
}

/* S03 SCENA HUD */
.hudscene__bg, .hudscene__shade { position: absolute; inset: 0; }
.hudscene__bg img { width: 100%; height: 100%; object-fit: cover; }
.hudscene__shade { background: linear-gradient(90deg, rgba(8,8,10,.55), rgba(8,8,10,.1) 60%), linear-gradient(0deg, rgba(8,8,10,.6), transparent 40%); }
.hudscene__load { position: absolute; top: var(--safe-t); right: var(--safe-r); }
.hudscene__q { position: absolute; max-width: 18ch; }
.hudscene__q .sec-num { display: flex; margin-bottom: 14px; }
.hudscene__q.q1 { left: var(--safe-l); top: 30%; }
.hudscene__q.q2 { right: var(--safe-r); top: 46%; max-width: 20ch; text-align: right; }
.hudscene__data { position: absolute; left: var(--safe-l); right: var(--safe-r); bottom: 34px; display: grid; grid-template-columns: repeat(4, auto); justify-content: start; gap: 6px 48px; padding-top: 16px; border-top: 1px solid var(--line-dark); }
.hudscene__data div { display: grid; grid-template-columns: auto auto; align-items: baseline; justify-content: start; }
.hudscene__data dt { grid-column: 1 / -1; opacity: .6; }
.hudscene__data dd { font: 800 clamp(28px, 3vw, 44px)/1 var(--f-display); letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.hudscene__data span { font: 800 24px/1 var(--f-display); color: var(--gold); }
@media (max-width: 767px) {
  .hudscene__q.q1 { top: 22%; right: var(--safe-r); }
  .hudscene__q.q2 { top: 48%; left: var(--safe-l); text-align: left; }
  .hudscene__data { grid-template-columns: repeat(2, auto); gap: 12px 32px; }
}

/* carta del FLIP (S02) */
.flip-layer { will-change: transform, width, height; }

/* H04 blocchi di chiusura della scena HUD (solo con motion) */
/* transizione a forme: le quattro forme piccole di Diego (f8) crescono fino a coprire lo schermo */
.sc-grid { position: absolute; inset: 0; z-index: 5; display: grid; pointer-events: none; overflow: hidden; }
.sc-grid i { background: var(--paper); transform: scale(0); will-change: transform; -webkit-mask: center / 100% 100% no-repeat; mask: center / 100% 100% no-repeat; }
.sc-grid i.m1 { -webkit-mask-image: url("img/forme/f8-1.svg"); mask-image: url("img/forme/f8-1.svg"); }
.sc-grid i.m2 { -webkit-mask-image: url("img/forme/f8-2.svg"); mask-image: url("img/forme/f8-2.svg"); }
.sc-grid i.m3 { -webkit-mask-image: url("img/forme/f8-3.svg"); mask-image: url("img/forme/f8-3.svg"); }
.sc-grid i.m4 { -webkit-mask-image: url("img/forme/f8-4.svg"); mask-image: url("img/forme/f8-4.svg"); }
.hudscene__blocks { z-index: 3; }
.hudscene__star { position: absolute; left: 50%; top: 50%; z-index: 4; width: 90px; height: 135px; fill: var(--ink); opacity: 0; transform: translate(-50%, -50%); pointer-events: none; }

/* S05 500+ LOTTI */
.lots { background: var(--paper); }
.lots__grid { min-height: 100svh; display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.3fr) minmax(0, .9fr); margin-left: calc(var(--frame) + var(--bar)); margin-right: var(--frame); padding-top: calc(var(--frame) + var(--bar)); }
.lots__num { writing-mode: vertical-rl; transform: rotate(180deg); justify-self: center; align-self: center; font: 900 clamp(120px, 15vw, 250px)/.8 var(--f-display); font-stretch: 125%; letter-spacing: -.04em; }
.lots__num span { color: var(--gold); }
.lots__main { margin: 32px 24px; align-self: center; aspect-ratio: 3 / 4; max-height: 76svh; }
.lots__main figcaption { position: absolute; left: 18px; bottom: 16px; color: var(--on-dark); }
.lots__side { border-left: 1px solid var(--line); display: grid; grid-template-rows: 1fr auto; }
.lots__slab { position: relative; display: grid; grid-template-columns: 1fr 34px; gap: 14px; align-items: center; padding: 24px; border-bottom: 1px solid var(--line); }
.lots__slab .hud { grid-column: 1 / -1; }
.lots__slab img { max-height: 40svh; width: auto; justify-self: center; border-radius: 6px; }
.ruler { list-style: none; display: grid; gap: 2px; font: 10px/1 var(--f-mono); color: var(--ink-2); }
.ruler li { display: flex; align-items: center; justify-content: flex-end; gap: 4px; height: 14px; }
.ruler li::after { content: ""; width: 10px; height: 1px; background: currentColor; }
.ruler li:nth-child(odd)::after { width: 18px; }
.lots__eye { margin: 24px; aspect-ratio: 4 / 3; }
.lots__eye figcaption { position: absolute; left: 12px; bottom: 10px; color: var(--on-dark); }
@media (max-width: 900px) {
  .lots__grid { grid-template-columns: 1fr; margin: 0; padding: 60px var(--safe-r) 40px var(--safe-l); gap: 20px; }
  .lots__num { writing-mode: horizontal-tb; transform: none; justify-self: start; font-size: 28vw; }
  .lots__main { margin: 0; }
  .lots__side { border-left: 0; }
}

/* S06 AREE */
.areas .pin { display: grid; grid-template-rows: auto 1fr auto; }
.areas__head { display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(0, 30ch); align-items: start; gap: 18px 48px; padding: var(--safe-t) var(--safe-r) 0 var(--safe-l); border-bottom: 1px solid rgba(36,27,12,.18); padding-bottom: 26px; }
.areas__head p { font-size: 14px; }
.carousel { position: relative; min-width: 0; perspective: 2000px; display: grid; place-items: center; overflow: hidden; cursor: grab; touch-action: pan-y; }
.carousel:active { cursor: grabbing; }
.carousel__ring { position: relative; width: 330px; height: 447px; transform-style: preserve-3d; } /* proporzioni della CARD MODULARE 546.5 × 740.8 */
@media (max-height: 860px) { .carousel__ring { width: 290px; height: 393px; } }
@media (max-height: 760px) { .carousel__ring { width: 250px; height: 339px; } }
.acard { position: absolute; inset: 0; overflow: hidden; background: var(--night); color: var(--on-dark); backface-visibility: hidden;
  -webkit-mask: url("img/forme/card.svg") center / 100% 100% no-repeat; mask: url("img/forme/card.svg") center / 100% 100% no-repeat; }
.acard img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; }
.acard::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(8,8,10,.35), transparent 22%, transparent 40%, rgba(8,8,10,.88) 78%); }
.acard__txt { position: absolute; left: 13%; right: 11%; bottom: 19%; z-index: 1; display: grid; gap: 4px; } /* sopra il taglio in basso a sinistra della sagoma */
.acard__txt b { font: 800 clamp(17px, 1.5vw, 22px)/1 var(--f-display); letter-spacing: -.02em; text-transform: uppercase; }
.acard__txt span { font-size: 13px; line-height: 1.35; color: var(--on-dark-2); }
.acard__n { position: absolute; top: 9%; left: 15%; z-index: 1; }
.areas__hint { padding: 0 var(--safe-r) 26px var(--safe-l); }
/* senza motion: fila orizzontale scorrevole */
.carousel.is-flat { display: block; place-items: initial; overflow-x: auto; padding: 30px var(--safe-r) 30px var(--safe-l); scroll-snap-type: x mandatory; touch-action: auto; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; cursor: auto; } /* su mobile si scorre col dito: niente pan-y */
.carousel.is-flat .carousel__ring { width: max-content; height: auto; display: flex; gap: 14px; transform: none !important; }
.carousel.is-flat .acard { scroll-snap-align: start; scroll-margin-left: var(--safe-l); }
.carousel.is-flat .acard { position: relative; inset: auto; flex: 0 0 224px; height: 304px; transform: none !important; }
@media (max-width: 767px) { .areas__head { grid-template-columns: 1fr; } }
@media (max-width: 900px) { .areas .pin { height: auto; min-height: 0; display: block; } .areas__hint { padding-top: 6px; } }

/* S07–S09 CARTA CHE CRESCE */
.grow .grow__card { position: absolute; inset: 0; --l: 0%; --r: 0%; --t: 0%; --b: 0%; --n: 0px;
  clip-path: polygon(var(--l) var(--t), calc(var(--l) + (100% - var(--l) - var(--r)) * .58) var(--t), calc(var(--l) + (100% - var(--l) - var(--r)) * .58 + var(--n)) calc(var(--t) + var(--n)), calc(100% - var(--r)) calc(var(--t) + var(--n)), calc(100% - var(--r)) calc(100% - var(--b) - var(--n)), calc(100% - var(--r) - var(--n)) calc(100% - var(--b)), var(--l) calc(100% - var(--b))); }
.grow .grow__card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(8,8,10,.35), transparent 30%, transparent 45%, rgba(8,8,10,.88)); }
.grow__cap { position: absolute; left: var(--safe-l); right: var(--safe-r); bottom: 40px; display: grid; gap: 14px; max-width: 640px; }
.grow--left .grow__cap { left: auto; text-align: right; justify-items: end; }
.grow__cap p { color: var(--on-dark-2); max-width: 52ch; }
.grow__hud { position: absolute; top: var(--safe-t); right: var(--safe-r); }
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; }
.grow--left .chips { justify-content: flex-end; }
.chips li { font: 500 10.5px/1 var(--f-mono); letter-spacing: .06em; text-transform: uppercase; padding: 7px 10px; border: 1px solid var(--line-dark); border-radius: 999px; }
@media (max-width: 767px) { .grow--left .grow__cap { left: var(--safe-l); text-align: left; justify-items: start; } .grow--left .chips { justify-content: flex-start; } }

/* S07–S09 COMPOSIZIONI A FORME (forme di Diego in img/forme/, al posto delle foto a tutto schermo) */
.scene--light { background: var(--paper); color: var(--ink); }
.shapes__in { max-width: 1440px; margin: 0 auto; padding: calc(var(--safe-t) + 40px) var(--safe-r) 120px var(--safe-l); display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: 40px 6vw; align-items: center; min-height: 100svh; }
.shapes--tornei .shapes__in { grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); }
.shapes__copy { display: grid; gap: 22px; justify-items: start; max-width: 520px; }
.shapes__copy > p { color: var(--ink-2); max-width: 46ch; }
.scene--dark .shapes__copy > p { color: var(--on-dark-2); }
.ticks { list-style: none; display: grid; gap: 8px; }
.ticks li::before { content: "✦  "; color: var(--gold); }
.games { list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 28px; font: 800 20px/1 var(--f-display); letter-spacing: -.02em; text-transform: uppercase; }
.games li { display: flex; align-items: center; gap: 12px; }
.ico { flex: 0 0 auto; width: 20px; height: 20px; background: var(--gold); -webkit-mask: center / 100% 100% no-repeat; mask: center / 100% 100% no-repeat; }
.ico--1 { -webkit-mask-image: url("img/forme/f8-1.svg"); mask-image: url("img/forme/f8-1.svg"); }
.ico--2 { -webkit-mask-image: url("img/forme/f8-2.svg"); mask-image: url("img/forme/f8-2.svg"); }
.ico--3 { -webkit-mask-image: url("img/forme/f8-3.svg"); mask-image: url("img/forme/f8-3.svg"); }
.ico--4 { -webkit-mask-image: url("img/forme/f8-4.svg"); mask-image: url("img/forme/f8-4.svg"); }

.collage { position: relative; width: 100%; }
.collage--aste { aspect-ratio: 1 / .95; }
.collage--tornei, .collage--vault { aspect-ratio: 1 / 1; }
.shape { --m: 1; position: absolute; margin: 0; overflow: hidden;
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; -webkit-mask-position: center; mask-position: center;
  -webkit-mask-size: calc(100% * var(--m)) calc(100% * var(--m)); mask-size: calc(100% * var(--m)) calc(100% * var(--m)); }
.shape img { width: 100%; height: 116%; margin-top: -8%; object-fit: cover; }
.shape--f1 { aspect-ratio: 443.29 / 722.82; -webkit-mask-image: url("img/forme/f1.svg"); mask-image: url("img/forme/f1.svg"); }
.shape--f2 { aspect-ratio: 503.42 / 432.57; -webkit-mask-image: url("img/forme/f2.svg"); mask-image: url("img/forme/f2.svg"); }
.shape--f3 { aspect-ratio: 443.49 / 168.63; -webkit-mask-image: url("img/forme/f3.svg"); mask-image: url("img/forme/f3.svg"); }
.shape--f4 { aspect-ratio: 514.94 / 720.67; -webkit-mask-image: url("img/forme/f4.svg"); mask-image: url("img/forme/f4.svg"); }
.shape--f5 { aspect-ratio: 234.35 / 194.82; -webkit-mask-image: url("img/forme/f5.svg"); mask-image: url("img/forme/f5.svg"); }
.shape--f6 { aspect-ratio: 941.75 / 467.87; -webkit-mask-image: url("img/forme/f6.svg"); mask-image: url("img/forme/f6.svg"); }
.shape--f7 { aspect-ratio: 516.81 / 720.72; -webkit-mask-image: url("img/forme/f7.svg"); mask-image: url("img/forme/f7.svg"); }
.shape--f8-1 { aspect-ratio: 1; -webkit-mask-image: url("img/forme/f8-1.svg"); mask-image: url("img/forme/f8-1.svg"); }
.shape--f8-4 { aspect-ratio: 1; -webkit-mask-image: url("img/forme/f8-4.svg"); mask-image: url("img/forme/f8-4.svg"); }
.collage__cap { position: absolute; }

.collage--aste .c-a { left: 18%; top: 4%; width: 82%; }
.collage--aste .c-b { left: 0; top: 34%; width: 38%; }
.collage--aste .c-c { left: 50%; top: 62%; width: 22%; }
.collage--aste .collage__cap { right: 0; bottom: 8%; }
.collage--tornei .c-a { left: 14%; top: 0; width: 70%; }
.collage--tornei .c-b { left: 0; top: 40%; width: 34%; }
.collage--tornei .c-c { left: 40%; top: 72%; width: 58%; }
.collage--vault .c-a { left: 22%; top: 0; width: 78%; }
.collage--vault .c-b { left: 0; top: 34%; width: 32%; }
.collage--vault .c-c { left: 60%; top: 70%; width: 22%; }
.collage--vault .collage__cap { left: 36%; bottom: 2%; }

@media (max-width: 900px) {
  .shapes__in, .shapes--tornei .shapes__in { grid-template-columns: 1fr; min-height: 0; padding-top: 96px; padding-bottom: 80px; }
  .shapes--tornei .collage { order: 2; }
  .collage--aste .collage__cap { bottom: -7%; }
  .collage--vault .collage__cap { left: 0; bottom: -9%; }
}

/* S10 TRADING NIGHT */
.tn__img, .tn__dark { position: absolute; inset: 0; }
.tn__img img { width: 100%; height: 100%; object-fit: cover; }
.tn__dark { --x: 62%; --y: 55%; --r: 34vmax; background: radial-gradient(circle var(--r) at var(--x) var(--y), rgba(0,0,0,0) 0%, rgba(0,0,0,.55) 45%, #000 80%); }
.tn__cap { position: absolute; left: var(--safe-l); top: 50%; transform: translateY(-50%); max-width: 560px; display: grid; gap: 18px; justify-items: start; }
.tn__cap > p:not(.hud) { color: var(--on-dark-2); max-width: 46ch; }
@media (max-width: 767px) { .tn__cap { top: auto; bottom: 40px; transform: none; right: var(--safe-r); } }

/* S11 OUTRO */
.outro { padding: calc(var(--safe-t) + 20px) var(--safe-r) 72px var(--safe-l); display: grid; gap: 40px; }
.outro__logo img { width: 100%; height: auto; }
.outro__collage { position: relative; height: clamp(240px, 32vw, 460px); margin-top: -12%; }
.outro__collage .notch { position: absolute; box-shadow: 0 30px 60px -30px rgba(0,0,0,.6); }
.outro__collage .c1 { left: 18%; top: 0; width: 34%; aspect-ratio: 16 / 10; }
.outro__collage .c2 { left: 54%; top: 6%; width: 20%; aspect-ratio: 3 / 4; }
.outro__collage .c3 { left: 30%; top: 58%; width: 18%; aspect-ratio: 4 / 3; }
.outro__foot { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 28px 48px; align-items: end; border-top: 1px solid var(--line); padding-top: 28px; }
.outro__cta { display: flex; flex-wrap: wrap; gap: 10px; }
.outro__info { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px 32px; }
.outro__info dt { color: var(--ink-2); }
.outro__info dd { text-transform: none; letter-spacing: 0; font: 500 14px/1.4 var(--f-text); margin-top: 4px; }
@media (max-width: 767px) {
  .outro__foot { grid-template-columns: 1fr; } .outro__info { grid-template-columns: 1fr; }
  .outro__collage { margin-top: 0; height: 92vw; }
  .outro__collage .c1 { left: 0; top: 0; width: 70%; }
  .outro__collage .c2 { left: 58%; top: 18%; width: 42%; }
  .outro__collage .c3 { left: 14%; top: 56%; width: 40%; }
}

/* FOOTER CONSOLE */
.console { position: relative; background: var(--night); color: var(--on-dark); padding: 64px var(--safe-r) 28px var(--safe-l); display: grid; gap: 48px; }
.console__top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 40px; }
.console__term { display: grid; gap: 10px; color: var(--on-dark-2); }
.console__term ul { list-style: none; display: grid; gap: 4px; color: var(--on-dark); }
.console__term li::before { content: "▸ "; color: var(--gold); }
.blink::after { content: "_"; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.console__nav { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.console__nav div { display: grid; gap: 8px; align-content: start; }
.console__nav .hud { color: var(--on-dark-2); margin-bottom: 4px; }
.console__nav a { font: 700 18px/1.2 var(--f-display); letter-spacing: -.01em; text-transform: uppercase; text-decoration: none; }
.console__nav a:hover { color: var(--gold); }
.console__mark { width: 100%; height: auto; opacity: .95; }
.console__legal { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; color: var(--on-dark-2); border-top: 1px solid var(--line-dark); padding-top: 18px; }
@media (max-width: 767px) { .console__top, .console__nav { grid-template-columns: 1fr; } }

/* ==========================================================================
   ANNOTAZIONI ELEMENTOR (tasto A)
   ========================================================================== */
.show-notes [data-el] { outline: 1px dashed #3b82f6; outline-offset: -1px; }
.show-notes [data-el]::before { content: "▣ " attr(data-el) "\A✦ " attr(data-fx); white-space: pre-wrap; position: absolute; z-index: 40; top: calc(var(--frame) + var(--bar) + 8px); left: calc(var(--frame) + var(--bar) + 8px); max-width: 560px; padding: 8px 10px; background: rgba(255,255,255,.95); color: #1e3a8a; border-left: 3px solid #7c3aed; font: 11px/1.45 var(--f-mono); pointer-events: none; }
.show-notes .chrome[data-el]::before { top: auto; bottom: 20px; left: auto; right: 20px; }

/* nessun movimento */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
