/* =========================================================
   PAGINA D'ATTESA – "Manca davvero poco!"
   Si appoggia a css/style.css della Home (palco, neve, splash,
   pulsante audio) e aggiunge solo la scritta e le icone che scorrono.
   ========================================================= */

/* ---------- Scritta centrale ---------- */
#att-testo { z-index: 1; }

.att-annuncio {
  position: absolute;
  left: 30px;
  width: 1020px;
  white-space: nowrap;
  top: 710px;
  text-align: center;
  font-family: 'Times New Roman', Times, serif;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: 0.015em;
  /* alone dorato + ombra scura: la scritta stacca bene dal cielo e dalla neve */
  filter:
    drop-shadow(0 0 3px rgba(8, 16, 40, 0.9))
    drop-shadow(0 0 26px rgba(240, 200, 120, 0.55))
    drop-shadow(0 6px 8px rgba(0, 0, 0, 0.65));
}

.att-riga {
  display: block;
  /* oro con un riflesso di luce che attraversa le lettere ogni tanto */
  background:
    linear-gradient(105deg, rgba(255, 255, 255, 0) 40%, rgba(255, 255, 245, 1) 50%, rgba(255, 255, 255, 0) 60%) 0 0 / 300% 100% no-repeat,
    linear-gradient(180deg, #fffaf0 0%, #f8e2a8 30%, #e8bf6e 65%, #c99640 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  opacity: 0;
  transform: translateY(30px);
  filter: blur(8px);
  transition:
    opacity 1.1s ease,
    transform 1.3s cubic-bezier(0.2, 0.8, 0.2, 1),
    filter 1.1s ease;
  animation: att-luccica 6s ease-in-out infinite;
}

.att-riga-1 { font-size: 74px; margin-bottom: 26px; }
.att-riga-2 { font-size: 66px; animation-delay: 0.25s; }
.att-riga-3 { font-size: 66px; animation-delay: 0.5s; }

#app.is-pronta .att-riga { opacity: 1; transform: none; filter: blur(0); }
#app.is-pronta .att-riga-2 { transition-delay: 0.45s; }
#app.is-pronta .att-riga-3 { transition-delay: 0.9s; }

/* ---------- Firma di Andrea ---------- */
.att-firma {
  position: absolute;
  left: 180px;
  top: 975px;
  width: 720px;
  height: 191px; /* 1073×284 */
  background: linear-gradient(180deg, #fff4d2 0%, #f1d595 40%, #d9ac5c 100%);
  -webkit-mask: url("firma.png") center / contain no-repeat;
  mask: url("firma.png") center / contain no-repeat;
  filter: drop-shadow(0 0 14px rgba(229, 193, 123, 0.45));
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 1.4s ease 1.5s, transform 1.6s cubic-bezier(0.2, 0.8, 0.2, 1) 1.5s;
}
#app.is-pronta .att-firma { opacity: 1; transform: none; }

/* ---------- Clessidra ---------- */
.att-clessidra {
  position: absolute;
  left: 498px;
  top: 532px;
  width: 84px;
  height: 140px;
  filter: drop-shadow(0 0 12px rgba(229, 193, 123, 0.5));
  opacity: 0;
  transition: opacity 1.2s ease 0.3s;
}
#app.is-pronta .att-clessidra { opacity: 1; }
.att-clessidra svg {
  width: 100%;
  height: 100%;
  display: block;
  overflow: visible;
  animation: att-capovolgi 6s cubic-bezier(0.6, 0, 0.3, 1) infinite;
}
.att-vetro, .att-cornice { fill: none; stroke: #e5c17b; stroke-linecap: round; }
.att-vetro { stroke-width: 1.6; }
.att-cornice { stroke-width: 3.2; }
.att-sabbia-su  { animation: att-svuota 6s linear infinite; }
.att-sabbia-giu { animation: att-riempi 6s linear infinite; }
.att-filo       { animation: att-filo 6s linear infinite, att-scorre 0.35s linear infinite; }

/* 0–80%: la sabbia scende; 80–100%: la clessidra si capovolge.
   A fine giro (sabbia tutta sotto, ruotata di 180°) è identica all'inizio. */
@keyframes att-capovolgi {
  0%, 80% { transform: rotate(0deg); }
  100%    { transform: rotate(180deg); }
}
@keyframes att-svuota {
  0%        { transform: translateY(0); }
  78%, 100% { transform: translateY(24px); }
}
/* durante il capovolgimento la sabbia di sotto scivola verso il collo:
   ruotata di 180° coincide con la sabbia di sopra all'inizio del giro */
@keyframes att-riempi {
  0%       { transform: translateY(24px); }
  78%, 82% { transform: translateY(0); }
  100%     { transform: translateY(-16px); }
}
@keyframes att-filo {
  0%, 76%  { opacity: 0.9; }
  80%, 100% { opacity: 0; }
}
@keyframes att-scorre {
  from { stroke-dashoffset: 0; }
  to   { stroke-dashoffset: -5; }
}

@keyframes att-luccica {
  0%, 55%  { background-position: 150% 0, 0 0; }
  85%, 100% { background-position: -50% 0, 0 0; }
}

/* ---------- Icone che scorrono ---------- */
.att-icona {
  position: absolute;
  left: 0;
  top: 0;
  pointer-events: auto;
  cursor: pointer;
  will-change: transform;
  opacity: 0;
  transition: opacity 0.9s ease;
}
#app.is-pronta .att-icona { opacity: 1; }

.att-icona img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 8px 10px rgba(2, 6, 20, 0.55));
  -webkit-user-drag: none;
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  .att-riga, .att-clessidra svg, .att-sabbia-su, .att-sabbia-giu, .att-filo { animation: none; }
}
