/* Da noi per voi — vista foto a tutto schermo (js/galleria.js). Prefisso vf-: «.galleria» è già la galleria della home.
   Sta sotto il cursore del sito (.cur, 300) e sopra preloader (200) e velo (150). */

.carta[data-cursore="Guarda"] { cursor: zoom-in; }
.carta[data-cursore="Guarda"]:focus-visible { outline: 3px solid var(--blu); outline-offset: 3px; }

/* a vista aperta la pagina sotto non scorre; lo spazio della barra resta (così niente salta di lato) e si colora come il fondo */
html.vf-aperta { overflow: hidden; scrollbar-gutter: stable; background: #141311; }

.vf { position: fixed; inset: 0; z-index: 250; color: var(--carta); touch-action: pinch-zoom; }
.vf[hidden] { display: none; }
.vf-fondo { position: absolute; inset: 0; background: #141311; }

/* foto e didascalia, centrate; i vuoti intorno lasciano passare il clic al fondo (= chiudi) */
.vf-scena { position: absolute; top: 88px; bottom: 36px; left: 116px; right: 116px; margin: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; pointer-events: none; }
.vf-img { display: block; max-width: none; border-radius: 6px; pointer-events: auto; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.vf-dida { flex: none; max-width: min(62ch, 100%); text-align: center; pointer-events: auto; }
.vf-dida strong { display: block; font: 500 clamp(19px, 1.5vw, 24px)/1.2 var(--serif); letter-spacing: -.01em; text-wrap: balance; }
.vf-dida span { display: block; margin-top: 6px; font-size: 15px; line-height: 1.45; color: rgba(243, 238, 228, .7); }
.vf-dida span:empty { display: none; }

.vf-conta { position: absolute; top: 30px; left: var(--gutter); margin: 0; font: 400 22px/1 var(--serif); font-variant-numeric: tabular-nums; color: rgba(243, 238, 228, .55); pointer-events: none; }
.vf-conta b { font-weight: 500; color: var(--carta); }

/* comandi: stesso linguaggio dei bottoni del sito (pillola e cerchio col bordo), giallo al passaggio */
.vf-chiudi, .vf-freccia { position: absolute; display: inline-flex; align-items: center; justify-content: center; margin: 0; padding: 0; background: rgba(27, 26, 23, .6); color: var(--carta); border: 1.5px solid rgba(243, 238, 228, .5); font: 700 15px/1 var(--sans); letter-spacing: .02em; transition: background .25s, color .25s, border-color .25s, transform .35s cubic-bezier(.2, .8, .2, 1); -webkit-tap-highlight-color: transparent; }
@media (hover: hover) {
  .vf-chiudi:hover, .vf-freccia:hover { background: var(--giallo); color: var(--inchiostro); border-color: var(--giallo); }
  .vf-freccia:hover { transform: scale(1.06); }
}
.vf-chiudi:focus-visible, .vf-freccia:focus-visible { outline: 3px solid var(--giallo); outline-offset: 3px; }
.vf-chiudi { top: 20px; right: var(--gutter); height: 46px; padding: 0 20px 0 16px; gap: 10px; border-radius: 999px; }
.vf-chiudi span { font: 400 26px/1 var(--sans); margin-top: -3px; }
.vf-freccia { top: 50%; width: 58px; height: 58px; margin-top: -29px; border-radius: 50%; font-size: 22px; }
.vf-prima { left: 30px; }
.vf-dopo { right: 30px; }
.vf-uno .vf-freccia, .vf-uno .vf-conta { display: none; }

/* il cerchio del cursore sul fondo scuro: giallo, se no non si vede */
html.vf-aperta .cur-anello.su-foto { background: var(--giallo); border-color: var(--giallo); color: var(--inchiostro); }

@media (max-width: 820px) {
  .vf-scena { top: 78px; bottom: calc(96px + env(safe-area-inset-bottom)); left: 14px; right: 14px; gap: 14px; }
  .vf-uno .vf-scena { bottom: calc(28px + env(safe-area-inset-bottom)); }
  .vf-dida strong { font-size: 19px; }
  .vf-dida span { font-size: 14px; }
  .vf-chiudi { top: 16px; right: 14px; height: 44px; }
  .vf-freccia { top: auto; bottom: calc(22px + env(safe-area-inset-bottom)); width: 54px; height: 54px; margin: 0; }
  .vf-prima { left: 16px; }
  .vf-dopo { right: 16px; }
  .vf-conta { top: auto; left: 50%; bottom: calc(40px + env(safe-area-inset-bottom)); transform: translateX(-50%); font-size: 20px; }
}
