/* Apertura 3D della home (apertura.js). La tela WebGL sta sopra la foto e si accende solo quando
   il suo primo fotogramma e' pronto, identico alla foto: senza JS, senza WebGL o con meno
   movimento resta la foto. Sostituisce le regole .tela della demo in stile.css. */
html .apertura-muro .tela {
  display: block;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: none;
  animation: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity .35s ease-out, visibility 0s linear .35s;
}
html .apertura-muro .tela.accesa {
  opacity: 1;
  visibility: visible;
  transition: opacity .25s ease-out;
}

/* quote e richiami, come su una tavola: tratti azzurri, cartellini bianchi */
.apertura-quote {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity .2s ease-out;
}
.apertura-quote svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.apertura-quote path { fill: none; stroke: #0083c3; stroke-width: 1.25; vector-effect: non-scaling-stroke; }
.apertura-quote .q-tratteggio { stroke-width: 1; stroke-dasharray: 5 4; }
.q-nota {
  position: absolute;
  left: 0;
  top: 0;
  padding: .3rem .55rem .35rem;
  background: rgba(255, 255, 255, .94);
  border: 1px solid #0083c3;
  border-radius: 2px;
  color: #14212b;
  font-size: .875rem;
  font-weight: 600;
  line-height: 1.25;
  white-space: nowrap;
  opacity: 0;
  will-change: transform, opacity;
}

/* pausa / riprendi / rivedi: sopra i 5 s l'animazione si deve poter fermare */
.apertura-play {
  position: absolute;
  right: .75rem;
  bottom: .75rem;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  min-width: 44px;
  min-height: 44px;
  padding: 0 .9rem 0 .8rem;
  border: 1px solid rgba(20, 33, 43, .16);
  border-radius: 2px;
  background: rgba(255, 255, 255, .9);
  color: #14212b;
  font-family: inherit;
  font-size: .9375rem;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  transition: background-color .2s ease-out, transform .16s cubic-bezier(.23, 1, .32, 1);
}
.apertura-play[hidden] { display: none; }
.apertura-play svg { flex: none; width: 14px; height: 14px; fill: currentColor; }
.apertura-play:active { transform: scale(.97); }
@media (hover: hover) and (pointer: fine) {
  .apertura-play:hover { background: #fff; }
}
@media (max-width: 899px) {
  .q-nota { font-size: .8125rem; padding: .25rem .45rem .3rem; }
  .apertura-play { right: .5rem; bottom: .5rem; }
}
