/*
 * Passaggio «sublimazione.it è diventato GianItalia.it» — bozza Grafica 28/11/2026
 * Va con passaggio.js. Tutte le classi iniziano con gi-pass (nessun conflitto col tema).
 * Tempi (da .gi-pass--via): logo 0-220 ms · trasformazione 220-620 · riga 520-720 · dissolvenza 1300-1600.
 */

/* fondo scuro immediato, prima che il livello esista: niente lampo della pagina */
html.gi-pass-on::before {
  content: "";
  position: fixed;
  top: 0; right: 0; bottom: 0; left: 0;
  z-index: 2147483000;
  background: #222e34;
}

.gi-pass {
  position: fixed;
  top: 0; right: 0; bottom: 0; left: 0;
  z-index: 2147483001;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background-color: #222e34;
  background-image: radial-gradient(ellipse 70% 55% at 50% 46%, #2c3b42 0%, #222e34 72%);
  color: #fff;
  font-family: "Open Sans", Arial, Helvetica, sans-serif;
  text-align: center;
  cursor: pointer;
  opacity: 1;
  transition: opacity .3s ease;
}
.gi-pass--fine { opacity: 0; pointer-events: none; }

.gi-pass__sr {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.gi-pass__scena {
  width: 440px;
  width: min(440px, 84vw);
  opacity: 0;
}

/* logo e scritta nella stessa cella: uno sparisce mentre l'altra compare */
.gi-pass__marchio {
  position: relative;
  display: grid;
  align-items: center;
  justify-items: center;
}
.gi-pass__logo,
.gi-pass__nome { grid-area: 1 / 1; }

.gi-pass__logo { display: block; width: 100%; height: auto; }
.gi-pass__logo--no { visibility: hidden; }

.gi-pass__nome {
  width: 100%;
  margin: 0;
  font-size: 48px;
  font-size: var(--gi-fs, 48px);
  line-height: 1.15;
  font-weight: 400;
  letter-spacing: -.01em;
  white-space: nowrap;
  clip-path: inset(0 100% 0 0);
}
.gi-pass__parola { display: inline-block; }
.gi-pass__nome b { font-weight: 700; }
.gi-pass__it { font-weight: 700; color: #eea338; }

/* barra di luce arancio che passa sopra e "riscrive" il logo */
.gi-pass__scanner {
  position: absolute;
  top: -14%; bottom: -14%; left: 0;
  width: 2px;
  margin-left: -1px;
  background: linear-gradient(to bottom, rgba(238,163,56,0), #f3b45a 22%, #fff3dc 50%, #f3b45a 78%, rgba(238,163,56,0));
  box-shadow: 0 0 14px 3px rgba(238,163,56,.55);
  opacity: 0;
  pointer-events: none;
}
.gi-pass__scanner::after {
  content: "";
  position: absolute;
  top: 12%; bottom: 12%; right: 2px;
  width: 64px;
  background: linear-gradient(to right, rgba(238,163,56,0), rgba(238,163,56,.22));
}

.gi-pass__riga {
  margin: 22px 0 0;
  font-size: 18px;
  line-height: 1.4;
  font-weight: 400;
  color: #d3dbdf;
  opacity: 0;
}
@media (min-width: 768px) {
  .gi-pass__riga { margin-top: 28px; font-size: 20px; }
}

/* ---------- movimento ---------- */
.gi-pass--via .gi-pass__scena   { animation: gi-pass-entra .22s ease-out both; }
.gi-pass--via .gi-pass__logo    { animation: gi-pass-cancella .4s cubic-bezier(.65,0,.35,1) .22s both; }
.gi-pass--via .gi-pass__nome    { animation: gi-pass-scrivi .4s cubic-bezier(.65,0,.35,1) .22s both,
                                             gi-pass-assesta .6s cubic-bezier(.2,.7,.2,1) .22s both; }
.gi-pass--via .gi-pass__scanner { animation: gi-pass-passa .4s cubic-bezier(.65,0,.35,1) .22s both; }
.gi-pass--via .gi-pass__riga    { animation: gi-pass-riga .2s ease-out .52s both; }
.gi-pass--fine .gi-pass__scena  { transform: scale(1.03); transition: transform .3s ease-in; }

@keyframes gi-pass-entra    { from { opacity: 0; transform: scale(.97); } to { opacity: 1; transform: none; } }
@keyframes gi-pass-cancella { from { clip-path: inset(0 0 0 0); } to { clip-path: inset(0 0 0 100%); } }
@keyframes gi-pass-scrivi   { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes gi-pass-assesta  { from { transform: scale(1.04); } to { transform: none; } }
@keyframes gi-pass-passa {
  0%   { left: 0;    opacity: 0; }
  12%  {             opacity: 1; }
  88%  {             opacity: 1; }
  100% { left: 100%; opacity: 0; }
}
@keyframes gi-pass-riga { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- movimento ridotto: immagine ferma, nessuna animazione ---------- */
.gi-pass--fermo { transition: none; cursor: default; }
.gi-pass--fermo .gi-pass__scena { opacity: 1; animation: none; }
.gi-pass--fermo .gi-pass__marchio { display: block; }
.gi-pass--fermo .gi-pass__logo { width: 56%; margin: 0 auto 16px; opacity: .7; animation: none; }
.gi-pass--fermo .gi-pass__nome { clip-path: none; animation: none; }
.gi-pass--fermo .gi-pass__scanner { display: none; }
.gi-pass--fermo .gi-pass__riga { opacity: 1; animation: none; }
@media (prefers-reduced-motion: reduce) {
  .gi-pass, .gi-pass * { animation: none !important; transition: none !important; }
}
