/* Sportello unico: splash e menu nella stessa schermata a tutta finestra. Prima solo logo e timbro; con .open
   il logo sale a sinistra, il timbro si posa nell'angolo e entrano Gioca/Allenamento, servizi in alto e il fascicolo-bancone in fondo. */
.sportello { inset: 0; transform: none; width: 100vw; height: 100vh; max-height: none; padding: 0; overflow: hidden;
  background: radial-gradient(#8c201f66, #071833ee 70%), url("../../assets/stages/ufficio/background.png") center / cover; }
.splash-logo { position: absolute; left: 50%; top: 42%; translate: -50% -50%; width: min(92vw, 110vh); max-height: 50vh; object-fit: contain; image-rendering: pixelated;
  filter: drop-shadow(0 0 28px #ff3b1f99); animation: slam .5s cubic-bezier(.2, 1.6, .4, 1) both; transition: all .6s cubic-bezier(.5, 1.4, .5, 1); z-index: 1; }
.splash-tagline { position: absolute; top: 70%; left: 0; width: 100%; font-family: "Press Start", monospace; font-size: clamp(14px, 2.6vw, 30px); text-transform: uppercase;
  text-shadow: 3px 3px 0 #8c201f, 6px 6px 0 #000; animation: slam .4s .35s ease-out both; transition: opacity .3s; }
.stamp { position: absolute; top: 78%; left: 50%; translate: -50% 0; rotate: -8deg; z-index: 2; font-family: "Press Start", monospace; font-size: clamp(26px, 6vw, 64px); text-transform: uppercase;
  color: #c8102e; background: #fff3d6e6; border: 7px double #c8102e; border-image: none; padding: .25em .6em; box-shadow: 6px 6px 0 #000;
  animation: stamp .3s .7s cubic-bezier(.3, 1.8, .5, 1) both, blink 1s 1.4s steps(2) infinite; transition: all .45s cubic-bezier(.5, 1.6, .5, 1); }
.stamp small { display: block; font-size: .32em; margin-top: .5em; color: #071833; }
@keyframes slam { from { scale: 2.5; rotate: -4deg; opacity: 0; } }
@keyframes stamp { from { scale: 4; rotate: -20deg; opacity: 0; } }
@keyframes blink { 50% { filter: brightness(1.35) saturate(1.4); } }
.sportello.open .splash-logo { top: 9%; left: 22%; width: min(36vw, 50vh); max-height: 14vh; }
.sportello.open .splash-tagline { opacity: 0; }
.sportello.open .stamp { opacity: 0; visibility: hidden; scale: .3; animation: none; }
.sportello.open .stamp small { display: none; }
.sportello .closed-sign { position: absolute; top: 19%; left: 22%; translate: -50% 0; z-index: 3; white-space: nowrap; } /* sotto il logo, non sopra */
.sportello-menu { position: absolute; inset: 4% 4% 3%; max-width: none; margin: 0; gap: 20px 40px; text-align: left;
  grid-template: ". services" auto "play play" 1fr "dossier dossier" auto / 1fr 1fr;
  opacity: 0; visibility: hidden; translate: 0 40px; transition: all .5s .25s ease-out; }
/* visibility senza ritardo: il menu deve essere focalizzabile subito (focus su Gioca dopo il timbro). */
.sportello.open .sportello-menu { opacity: 1; visibility: visible; translate: 0; transition: all .5s .25s ease-out, visibility 0s; }
.sportello-services { grid-area: services; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: flex-end; }
.sportello-services button { font-size: 13px; }
.sportello-play { grid-area: play; display: flex; flex-direction: column; gap: 14px; width: min(560px, 90%); justify-self: center; align-self: center; }
.play-main { font: clamp(22px, 3.4vw, 44px) "Press Start", monospace; padding: 1.6rem .6rem; animation: pulse 1.6s ease-in-out infinite; }
.play-sub { font: clamp(12px, 1.4vw, 17px) "Press Start", monospace; padding: .9rem .4rem; }
.sportello-menu button small { display: block; margin-top: .7em; font: 13px "Courier New", monospace; color: #c3cad4; }
@keyframes pulse { 50% { filter: brightness(1.25) drop-shadow(0 0 10px #ffdf68); } }
/* Fascicolo: cartellina color carta, i personaggi escono dal bordo superiore. */
.sportello-dossier { grid-area: dossier; display: flex; flex-direction: column; }
.cast { position: relative; z-index: 1; display: flex; justify-content: space-evenly; align-items: flex-end; margin-bottom: -40px; pointer-events: none; }
.cast img { flex: 1 1 0; min-width: 0; object-fit: contain; object-position: bottom; height: min(22vh, 170px); image-rendering: pixelated; filter: drop-shadow(0 0 5px #d4af37); animation: breathe 3.6s ease-in-out infinite alternate; }
.cast img:nth-child(even) { animation-delay: -1.8s; }
@keyframes breathe { to { transform: translateY(-5px); } }
.sportello-dossier button { color: #1d1a14; background: #e2c27a; border: 0; border-image: none; padding: 54px 20px 18px; text-align: left; font: clamp(13px, 1.5vw, 18px) "Press Start", monospace;
  clip-path: polygon(0 0, 22% 0, 25% 18px, 100% 18px, 100% 100%, 0 100%); }
.sportello-dossier button small { color: #5b4a24; }
.sportello-dossier button:hover, .sportello-dossier button:focus-visible { filter: none; outline: none; background: #ffdf68; } /* clip-path taglia outline e ombre */
@media (max-width: 760px), (max-height: 520px) {
  .sportello.open .splash-logo { top: 6%; left: 30%; width: 50vw; max-height: 10vh; }
  .sportello-menu { inset: 13% 4% 3%; grid-template: "play" auto "dossier" auto "services" auto / 1fr; overflow: auto; }
  .sportello-services { justify-content: center; padding-right: 0; }
  .cast img { height: 90px; }
}
@media (prefers-reduced-motion: reduce) { .splash-logo, .splash-tagline, .stamp, .play-main, .cast img { animation: none; } .sportello * { transition: none !important; } }

/* Sportello allineato al brand, con tre varianti cromatiche. */
.sportello { background: linear-gradient(var(--menu-overlay), var(--menu-overlay)), url('../../assets/branding/app/pattern.svg') center / 512px; color: var(--text); }
.splash-logo { top: 38%; width: min(82vw, 104vh); filter: none; animation: slam .35s ease-out both; }
.splash-tagline { top: 64%; left: 10%; width: 80%; font-size: clamp(12px, 1.6vw, 22px); line-height: 1.8; text-shadow: none; text-wrap: balance; }
.stamp { top: 77%; font-size: clamp(24px, 4vw, 44px); animation: stamp .25s .25s ease-out both; }
.play-main, .cast img { animation: none; }
.sportello-menu button small { color: var(--muted); }
.sportello.open .splash-logo { top: 10%; max-height: 16vh; }
.sportello-dossier button small { color: #5b4a24; }
.sportello-services button { padding: 10px; }
.sportello-dossier button:focus-visible { background: #ffdf68; text-decoration: underline; }
@media (max-width: 760px), (max-height: 520px) {
  .sportello.open .splash-logo { top: 7%; left: 50%; width: 60vw; max-height: 12vh; }
  .sportello-menu { gap: 24px; inset: 16% max(16px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)); }
  .sportello-play { width: 100%; gap: 12px; }
  .sportello-services { gap: 8px; }
  .splash-tagline { top: 62%; }
  .stamp { top: 76%; }
  .sportello .closed-sign { top: 14%; left: 50%; }
}
@media (prefers-reduced-motion: reduce) { .sportello * { animation: none !important; transition: none !important; } }
@media (max-width: 760px), (max-height: 520px) {
  .sportello-menu { top: 19%; grid-template-columns: minmax(0, 1fr); }
  .sportello-play { min-width: 0; }
  .sportello .closed-sign { max-width: 90%; font-size: 8px; white-space: normal; }
}
