/* ==========================================================================
   acaso_live — impaginazione e pezzi. I numeri vengono tutti da valori.css.
   ========================================================================== */

* { box-sizing: border-box; }

/* Il formato leggero vive dentro <picture>: cosi' non sposta niente nell'impaginazione. */
picture { display: contents; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--fondo);
  color: var(--testo);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: var(--txt-m);
  line-height: var(--riga-corpo);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { margin: 0; line-height: var(--riga-titolo); letter-spacing: -0.015em; }
p { margin: 0 0 var(--sp-4); max-width: var(--misura); }
img { max-width: 100%; }
a { color: var(--accento); }

:focus-visible {
  outline: 3px solid var(--accento);
  outline-offset: 3px;
  border-radius: var(--raggio-1);
}

.contenitore { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 var(--sp-4); }

.salta { position: absolute; left: -9999px; }
.salta:focus { left: var(--sp-4); top: var(--sp-4); z-index: 10; background: var(--accento); color: var(--fondo); padding: var(--sp-3) var(--sp-4); border-radius: var(--raggio-1); }

/* ---------- Bottoni ---------- */
.bottone {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-2);
  min-height: 44px; padding: var(--sp-3) var(--sp-6);
  background: var(--accento); color: var(--fondo);
  font: inherit; font-weight: 800; text-decoration: none;
  border: 0; border-radius: var(--raggio-tondo); cursor: pointer;
  box-shadow: var(--alone-bottone);
  transition: transform var(--mov-stato) ease, box-shadow var(--mov-stato) ease, background var(--mov-stato) ease;
}
.bottone:hover, .bottone:focus-visible { transform: translateY(-2px); box-shadow: var(--alone-bottone-forte); }
.bottone--grande { padding: var(--sp-4) var(--sp-8); font-size: var(--txt-l); }
@media (max-width: 767px) {
  /* Sul telefono l'azione principale prende tutta la larghezza: si preme meglio col pollice
     e il testo resta su una riga sola. */
  .bottone--grande { width: 100%; padding: var(--sp-4) var(--sp-5); font-size: var(--txt-m); }
}
.bottone--piccolo { min-height: 44px; padding: var(--sp-2) var(--sp-5); font-size: var(--txt-s); }
.bottone--vuoto { background: transparent; color: var(--testo); border: 1px solid var(--bordo-forte); box-shadow: none; }
.bottone--vuoto:hover, .bottone--vuoto:focus-visible { border-color: var(--accento); color: var(--accento); box-shadow: 0 0 24px rgba(70, 224, 90, .22); }
.bottone[aria-disabled="true"] { pointer-events: none; }

/* ---------- Testata ---------- */
.testata {
  position: sticky; top: 0; z-index: 5;
  background: rgba(7, 9, 15, .82);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--bordo-tenue);
}
/* un filo di neon sotto la testata: e' il segno del canale */
.testata::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--accento), transparent);
  opacity: .6; pointer-events: none;
}
.testata__dentro { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--sp-3); min-height: 64px; padding-top: var(--sp-2); padding-bottom: var(--sp-2); }
@media (max-width: 419px) {
  .testata .bottone { padding: var(--sp-2) var(--sp-4); font-size: var(--txt-xs); }
  .marchio { font-size: var(--txt-xs); }
}
.marchio { display: flex; align-items: center; gap: var(--sp-3); margin: 0; font-size: var(--txt-s); font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.marchio img { width: var(--sp-6); height: var(--sp-6); border-radius: var(--raggio-tondo); }

/* ---------- Apertura ---------- */
.apertura { position: relative; overflow: hidden; border-bottom: 1px solid var(--bordo-tenue); }
.apertura::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, var(--superficie-1), var(--fondo));
}
.apertura::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(circle at 78% 12%, var(--alone-accento), transparent 58%);
  pointer-events: none;
}
.apertura__dentro { position: relative; display: grid; gap: var(--sp-7); padding: var(--sp-7) var(--sp-4) var(--sp-8); }
.apertura__logo {
  width: 232px; height: 232px; border-radius: var(--raggio-tondo);
  box-shadow: var(--alone);
  justify-self: center;
}
.occhiello { display: flex; align-items: center; gap: var(--sp-2); margin: 0 0 var(--sp-3);
  font-size: var(--txt-xs); font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--accento); }
.occhiello::before { content: ""; width: var(--sp-5); height: 2px; background: var(--accento);
  box-shadow: 0 0 12px rgba(70, 224, 90, .8); }
.apertura h1 { font-size: var(--txt-display); line-height: var(--riga-aperta); font-weight: 800; margin-bottom: var(--sp-5); }
.apertura h1 em { font-style: normal; color: var(--accento); }
.sommario { font-size: var(--txt-l); color: var(--testo-tenue); margin-bottom: var(--sp-6); }
.nota { margin: var(--sp-4) 0 0; font-size: var(--txt-xs); color: var(--testo-tenue); }

/* ---------- Sezioni ---------- */
.sezione { padding: var(--sp-8) 0; border-bottom: 1px solid var(--bordo-tenue); }
.sezione h2 { font-size: var(--txt-xl); font-weight: 800; margin-bottom: var(--sp-4); }
.sezione__intro { font-size: var(--txt-l); color: var(--testo-tenue); }

/* ---------- Cartelle dei giochi ---------- */
.griglia { display: grid; gap: var(--sp-5); margin-top: var(--sp-6); }
.cartella {
  background: var(--superficie-1); border: 1px solid var(--bordo-forte);
  border-radius: var(--raggio-2); overflow: hidden;
  transition: transform var(--mov-stato) ease, border-color var(--mov-stato) ease, box-shadow var(--mov-stato) ease;
}
.cartella:hover { transform: translateY(-4px); border-color: var(--accento); box-shadow: var(--ombra-2); }
.cartella__figura { position: relative; overflow: hidden; }
.cartella__figura::after {
  content: ""; position: absolute; inset: auto 0 0 0; height: 45%;
  background: linear-gradient(rgba(7, 9, 15, 0), rgba(15, 19, 30, .95));
  pointer-events: none;
}
.cartella img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover;
  transition: transform var(--mov-entrata) ease; }
.cartella:hover img { transform: scale(1.04); }
.cartella__testo { padding: var(--sp-5); }
.cartella h3 { font-size: var(--txt-l); font-weight: 600; margin-bottom: var(--sp-2); }
.cartella p { margin: 0; font-size: var(--txt-s); color: var(--testo-tenue); }

/* ---------- Quando ---------- */
.quando { display: grid; gap: var(--sp-1); margin-top: var(--sp-5); max-width: var(--misura); }
.quando__riga {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--sp-4);
  padding: var(--sp-4) var(--sp-5); background: var(--superficie-1);
  border: 1px solid var(--bordo-tenue); border-left: 2px solid var(--accento);
  border-radius: var(--raggio-1);
  transition: border-color var(--mov-stato) ease, box-shadow var(--mov-stato) ease;
}
.quando__riga:hover { box-shadow: 0 0 24px rgba(70, 224, 90, .18); }
.quando__giorno { font-weight: 600; }
.quando__ora { color: var(--testo-tenue); font-size: var(--txt-s); }

/* ---------- Offerta ---------- */
.offerta {
  margin-top: var(--sp-6); max-width: var(--misura); overflow: hidden;
  background: var(--superficie-1); border: 1px solid var(--bordo-forte); border-radius: var(--raggio-2);
}
.offerta__immagine { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; }
.offerta__dentro { padding: var(--sp-6); }
.offerta__riga { margin: 0 0 var(--sp-4); }
.offerta__etichetta { display: block; font-size: var(--txt-xs); font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--testo-tenue); }
.offerta__valore { font-size: var(--txt-l); letter-spacing: .06em; overflow-wrap: break-word; }
.offerta__esito { margin: var(--sp-3) 0 0; min-height: var(--sp-5); font-size: var(--txt-s); color: var(--testo-tenue); }

/* ---------- Chiusura ---------- */
.chiusura { padding: var(--sp-9) 0; background: var(--superficie-1); text-align: center; }
.chiusura h2 { font-size: var(--txt-xxl); font-weight: 800; margin-bottom: var(--sp-4); }
.chiusura p { margin: 0 auto var(--sp-6); color: var(--testo-tenue); }

/* ---------- Piede ---------- */
.piede { padding: var(--sp-7) 0 var(--sp-8); }
.piede__dentro { display: flex; flex-wrap: wrap; gap: var(--sp-4); align-items: center; justify-content: space-between; font-size: var(--txt-s); color: var(--testo-tenue); }
.piede p { margin: 0; }

/* ---------- Tablet ---------- */
@media (min-width: 768px) {
  .contenitore { padding: 0 var(--sp-6); }
  .apertura__dentro { grid-template-columns: 1.5fr 1fr; align-items: center; gap: var(--sp-7); padding: var(--sp-9) var(--sp-6); }
  .apertura__logo { width: 100%; height: auto; justify-self: end; max-width: 320px; }
  .apertura__testo { order: -1; }
  .griglia { grid-template-columns: repeat(2, 1fr); }
  .sezione { padding: var(--sp-9) 0; }
}

/* ---------- Schermo largo ---------- */
@media (min-width: 1280px) {
  .griglia { grid-template-columns: repeat(3, 1fr); }
  .sezione { padding: var(--sp-10) 0; }
  .chiusura { padding: var(--sp-10) 0; }
}

/* ---------- Chi ha chiesto meno animazioni ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .bottone:hover, .cartella:hover { transform: none; }
}
