/* Attract-mode showcase (sito/vetrina.py): a sober cabinet bezel around a 16:9 screen,
   INSERT COIN and CREDIT 00 underneath. Flat
   colours only from the NEAGON tokens: no blur, no gradients, no pixel lettering. The screen is
   640x360 like the clips: shown 1:1 (pixel-crisp) when there is room, scaled down smoothly
   on phones, where nearest-neighbour shrinking would drop pixel columns. */

.vetrina {
  /* The bezel (.vt-cornice) carries data-theme="night": a cabinet stays night-coloured
     even on the day theme, so the --vt-* names below resolve to the night tokens inside it. */
  --vt-bordo: var(--line-strong);
  max-width: 662px;   /* 640 px screen + bezel */
  margin: 1.5rem 0;
  font-family: var(--font-sans);
  color: var(--vt-testo);
}
.vt-cornice { background: var(--crt-black); padding: 8px; box-shadow: inset 0 0 0 1px var(--vt-bordo);
  clip-path: polygon(var(--cut-lg) 0, 100% 0, 100% calc(100% - var(--cut-lg)), calc(100% - var(--cut-lg)) 100%, 0 100%, 0 var(--cut-lg)); }
.vt-schermo {
  --vt-fondo: var(--bg); --vt-testo: var(--ink); --vt-brand: var(--brand); --vt-accent: var(--accent);
  --vt-hot: var(--hot); --vt-muted: var(--ink-muted); color: var(--ink);
  position: relative; overflow: hidden; aspect-ratio: 16 / 9; background: var(--crt-black);
  container: vt / inline-size;
}
.vt-schermo img, .vt-schermo video { display: block; width: 100%; height: 100%; object-fit: contain; max-width: none; }
@container vt (min-width: 640px) {
  img, video { image-rendering: pixelated; }
}

/* Screens. Without JavaScript only the first title screen shows. */
.vt-gioco, .vt-schermata, .vt-poster, .vt-video, .vt-testa-classifica { position: absolute; inset: 0; }
.vt-gioco, .vt-classifica, .vt-testa-classifica { display: none; }
.vt-gioco:first-child { display: block; }
.vetrina[data-js] .vt-gioco { display: none; }
.vetrina[data-js] .vt-gioco.attivo { display: block; }
.vetrina[data-js] .vt-schermata { display: none; }
.vetrina[data-js] [data-schermata="titolo"] .attivo .vt-titolo,
.vetrina[data-js] [data-schermata="classifica"] .attivo .vt-classifica,
.vetrina[data-js] [data-schermata="classifica"] .vt-testa-classifica { display: block; }
.vt-video, .vt-poster { z-index: 2; background: #000; }
.vt-video[hidden], .vt-poster[hidden] { display: none; }

/* Title screen: the game's own title screen, name, genre and goal on a flat band. */
.vt-cartiglio {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 1.6cqw 2.5cqw 1.8cqw;
  background: var(--vt-fondo); border-top: 2px solid var(--vt-brand);
}
.vt-cartiglio p { margin: 0; line-height: 1.25; }
.vt-nome { font-family: var(--font-display); font-weight: 900; font-style: italic; font-stretch: 118%; text-transform: uppercase;
           letter-spacing: .02em; color: var(--vt-accent); font-size: clamp(12px, 3.6cqw, 24px); }
.vt-genere { color: var(--vt-muted); text-transform: uppercase; letter-spacing: .08em; font-weight: 600; font-size: clamp(9px, 2.1cqw, 13px); }
.vt-obiettivo { font-size: clamp(10px, 2.3cqw, 15px); margin-top: .3em !important; }

/* HIGH SCORES: attract-mode table (design system AttractScreen): rank 1 in hot, the rest in ink. */
.vt-classifica { background: var(--vt-fondo); padding: 15cqw 10cqw 0; text-align: center; }
.vt-testa-classifica { bottom: auto; padding-top: 4.5cqw; z-index: 1; }
.vt-titolo-classifica { margin: 0; text-align: center; font-family: var(--font-display); font-weight: 900; font-style: italic;
  font-stretch: 118%; text-transform: uppercase; font-size: clamp(16px, 5.4cqw, 36px); line-height: 1; color: var(--vt-accent); }
.vt-classifica .vt-nome { font-size: clamp(10px, 2.6cqw, 17px); margin: 0 0 2.2cqw; color: var(--vt-muted); font-style: normal; }
.vt-classifica ol { list-style: none; margin: 0 auto; padding: 0; max-width: 60cqw; font-family: var(--font-mono);
  font-size: clamp(11px, 3.4cqw, 22px); font-weight: 700; line-height: 1.5; color: var(--vt-testo); }
.vt-classifica li { display: grid; grid-template-columns: 3ch 5ch 1fr; text-align: left; border-bottom: 1px solid rgba(244, 241, 255, .14); }
.vt-classifica li:first-child { color: var(--vt-hot); }
.vt-pos { color: var(--vt-muted); }
.vt-classifica li:first-child .vt-pos { color: var(--vt-hot); }
.vt-ini { letter-spacing: .12em; }
.vt-punti { text-align: right; font-variant-numeric: tabular-nums; }

/* Under the screen: INSERT COIN (blinking at 1 Hz), SOUND and PAUSE, CREDIT 00. */
.vt-piede { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 2px 0; }
.vt-moneta { font-family: var(--font-display); font-weight: 900; font-style: italic; font-stretch: 118%; font-size: 15px;
             letter-spacing: .04em; color: var(--accent); white-space: nowrap; }
.vt-credito { font-family: var(--font-mono); font-weight: 600; font-size: 14px; letter-spacing: .06em; color: var(--ink);
              white-space: nowrap; font-variant-numeric: tabular-nums; }
@media (prefers-reduced-motion: no-preference) {
  .vt-lampeggia { animation: vt-lampeggia 1s steps(1) infinite; }
  @keyframes vt-lampeggia { 50% { opacity: 0; } }
}
.vt-suono {
  font: 700 13px/1 var(--font-display); font-stretch: 112%; letter-spacing: .06em; text-transform: uppercase;
  min-height: 44px; padding: 0 .8rem; cursor: pointer; white-space: nowrap;
  color: var(--ink); background: transparent; border: 0; border-radius: var(--radius-sm); box-shadow: inset 0 0 0 2px var(--line-strong);
}
.vt-suono:hover { box-shadow: inset 0 0 0 2px var(--brand); }
.vt-suono.spento { color: var(--ink-muted); }
.vt-suono:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.vt-suono[hidden] { display: none; }
.vt-comandi { display: flex; gap: 8px; }
@media (max-width: 420px) {
  .vt-suono { padding: 0 .45rem; font-size: 11px; letter-spacing: .03em; } .vt-comandi { gap: 5px; }
  .vt-moneta { font-size: 12px; } .vt-credito { font-size: 12px; } .vt-piede { gap: 5px; }
}
@media (min-width: 700px) {
  .vt-moneta { font-size: 18px; }
  .vt-credito { font-size: 16px; }
}

/* Public pages: the showcase comes first, right under the page header, so everyone sees it
   (Fabrizio, 2026-11-12). On wide screens it takes the place of the header picture, wider
   than the 40rem column so the screen is exactly 640 px. On phones it is full width, 16:9,
   and never taller than about 40% of the screen; the form follows right below and its main
   button sits in a bar fixed to the bottom of the screen, reachable without scrolling. */
.con-vetrina > .hero { display: none; }
@media (min-width: 700px) {
  .con-vetrina > .vetrina { margin: 0 calc(50% - 331px) 1.5rem; }
}
@media (max-width: 699px) {
  .vetrina { margin: .5rem auto 1rem; max-width: min(100%, calc(40svh * 16 / 9)); }
  .con-vetrina > .vetrina { margin: 0 -16px 1rem; max-width: none; width: calc(100% + 32px); }
  @supports (height: 1svh) {
    .con-vetrina > .vetrina .vt-cornice { max-width: calc(40svh * 16 / 9); margin: 0 auto; }
  }
  .vt-cornice { box-shadow: none; }
  .con-vetrina form .invio .pulsante { width: 100%; }
}
/* The main button of the form stays in a bar at the bottom of the window while the form is
   on screen, on every width: with the showcase on top it would otherwise be below the fold. */
.con-vetrina form .invio { position: sticky; bottom: 0; z-index: 3; margin: 1rem -1rem -1rem; padding: .75rem 1rem;
  background: var(--surface); border-top: 1px solid var(--line); }
