/* ==========================================================================
   The Night Shift — landing
   Autore: Sebastian Ierardi
   Linguaggio visivo: rosso Opem, nero turno, Stack Sans,
   il tetto a shed del marchio e la segnaletica a terra del set.
   ========================================================================== */

@font-face { font-family: "Stack Sans Headline"; src: url("../fonts/StackSansHeadline-300.woff2") format("woff2"); font-weight: 300; font-display: swap; }
@font-face { font-family: "Stack Sans Headline"; src: url("../fonts/StackSansHeadline-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Stack Sans Headline"; src: url("../fonts/StackSansHeadline-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Stack Sans Text"; src: url("../fonts/StackSansText-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Stack Sans Text"; src: url("../fonts/StackSansText-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Stack Sans Text"; src: url("../fonts/StackSansText-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  /* colore: solo quelli del marchio */
  --nero: #131313;
  --rosso: #E4002B;
  --rosso-testo: #FF4A5C; /* solo testo piccolo su nero: 5.6:1 */
  --bianco: #FFFFFF;
  --grigio: #A3A19C;      /* 7:1 su nero */
  --spento: #5C5A56;
  --filo: rgba(255, 255, 255, .16);

  --titoli: "Stack Sans Headline", "Helvetica Neue", Arial, sans-serif;
  --testo: "Stack Sans Text", "Helvetica Neue", Arial, sans-serif;

  --margine: clamp(20px, 4.4vw, 72px);
  --sezione: clamp(96px, 14vw, 200px);

  --esce: cubic-bezier(.23, 1, .32, 1);
  --muove: cubic-bezier(.77, 0, .175, 1);

  --testata: 76px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { background: var(--nero); color-scheme: dark; -webkit-text-size-adjust: 100%; overflow-x: clip; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
body {
  background: var(--nero);
  color: var(--bianco);
  font-family: var(--testo);
  font-size: clamp(1rem, .94rem + .3vw, 1.1875rem);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
ol, ul { list-style: none; }
::selection { background: var(--rosso); color: var(--bianco); }
:focus-visible { outline: 2px solid var(--bianco); outline-offset: 4px; }

.vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.defs { position: absolute; width: 0; height: 0; }
.skip { position: fixed; left: 12px; top: -60px; z-index: 100; background: var(--bianco); color: var(--nero); padding: 10px 14px; text-decoration: none; }
.skip:focus { top: 12px; }

/* grana video, molto fine.
   Il contenitore resta fermo e ritaglia; si muove solo lo strato interno (solo compositing, niente repaint) */
.grana { position: fixed; inset: 0; z-index: 90; pointer-events: none; overflow: hidden; opacity: .07; }
.grana::before {
  content: ""; position: absolute; inset: -60px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  will-change: transform;
  animation: grana 1s steps(4) infinite;
}
@keyframes grana { 0% { transform: translate(0, 0); } 25% { transform: translate(-40px, 30px); } 50% { transform: translate(30px, -50px); } 75% { transform: translate(-20px, -10px); } }

/* la linea a terra: avanzamento della pagina sul bordo sinistro */
.avanzamento { position: fixed; left: 0; top: 0; bottom: 0; width: 3px; z-index: 60; pointer-events: none; }
.avanzamento i { display: block; width: 100%; height: 100%; background: var(--rosso); transform-origin: top; transform: scaleY(var(--p, 0)); }

/* ---------- elementi ricorrenti ---------- */

/* etichetta: come i sottotitoli sottolineati della presentazione */
.etichetta {
  display: inline-block;
  font-family: var(--testo); font-weight: 500;
  font-size: .9375rem; line-height: 1.3; letter-spacing: 0;
  text-decoration: underline; text-decoration-color: var(--rosso);
  text-decoration-thickness: 2px; text-underline-offset: 6px;
}

.titolone {
  font-family: var(--titoli); font-weight: 400;
  font-size: clamp(2.5rem, 1.2rem + 5.6vw, 6.25rem);
  line-height: .98; letter-spacing: -.045em;
  text-wrap: balance;
}

/* cornice: gli angoli della segnaletica a terra che delimita il set */
.cornice { position: relative; }
.cornice__angoli { position: absolute; inset: 0 var(--margine); pointer-events: none; }
.cornice__angoli i { position: absolute; width: clamp(28px, 4vw, 56px); height: clamp(28px, 4vw, 56px); border: 0 solid var(--rosso); }
.cornice__angoli i:nth-child(1) { left: 0; top: 0; border-left-width: 5px; border-top-width: 5px; }
.cornice__angoli i:nth-child(2) { right: 0; top: 0; border-right-width: 5px; border-top-width: 5px; }
.cornice__angoli i:nth-child(3) { left: 0; bottom: 0; border-left-width: 5px; border-bottom-width: 5px; }
.cornice__angoli i:nth-child(4) { right: 0; bottom: 0; border-right-width: 5px; border-bottom-width: 5px; }

.tasto {
  width: 52px; height: 52px; display: grid; place-items: center;
  border: 1px solid var(--filo); color: var(--bianco);
  transition: background-color .2s ease, border-color .2s ease, transform .16s var(--esce);
}
.tasto svg { width: 20px; height: 20px; }
.tasto svg.giu { transform: rotate(180deg); }
.tasto:hover { background: var(--bianco); color: var(--nero); border-color: var(--bianco); }
.tasto:active { transform: scale(.96); }
.tasto:disabled { opacity: .3; pointer-events: none; }

.bottone {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 22px;
  background: var(--rosso); color: var(--bianco);
  font-family: var(--testo); font-weight: 500; font-size: .9375rem;
  text-decoration: none;
  transition: background-color .2s ease, transform .16s var(--esce);
}
.bottone:hover { background: #C40025; }
.bottone:active { transform: scale(.97); }
.bottone--spento { background: transparent; border: 1px solid var(--filo); color: var(--grigio); }

.link {
  display: inline-block; font-weight: 500; text-decoration: none;
  background: linear-gradient(var(--rosso), var(--rosso)) 0 100% / 100% 2px no-repeat;
  padding-bottom: 4px;
  transition: background-size .35s var(--esce);
}
.link:hover { background-size: 0 2px; background-position: 100% 100%; }

/* ==========================================================================
   HEADER
   ========================================================================== */
.testata {
  position: fixed; inset: 0 0 auto 0; z-index: 70;
  height: var(--testata);
  display: flex; align-items: center; gap: 24px;
  padding: 0 var(--margine);
  transition: background-color .3s ease;
}
.testata.is-solida { background: var(--nero); box-shadow: 0 1px 0 var(--filo); }
.testata__logo { width: 52px; color: var(--bianco); flex: none; }
.testata__logo svg { width: 100%; height: auto; }
.testata__nav { margin-left: auto; display: flex; align-items: center; gap: clamp(16px, 2.2vw, 32px); }
.testata__nav a { text-decoration: none; font-weight: 500; font-size: .9375rem; }
.testata__nav a:not(.testata__cta) { background: linear-gradient(var(--rosso), var(--rosso)) 0 100% / 0 2px no-repeat; padding: 6px 0; transition: background-size .3s var(--esce); }
.testata__nav a:not(.testata__cta):hover { background-size: 100% 2px; }
.testata__cta { background: var(--rosso); padding: 12px 18px; transition: background-color .2s ease; }
.testata__cta:hover { background: #C40025; }
.testata__menu { display: none; }

@media (max-width: 860px) {
  .testata__menu { display: grid; gap: 7px; margin-left: auto; width: 44px; height: 44px; place-content: center; position: relative; z-index: 2; }
  .testata__menu i { width: 26px; height: 2px; background: var(--bianco); transition: transform .3s var(--esce); }
  .testata__menu[aria-expanded="true"] i:first-of-type { transform: translateY(4.5px) rotate(45deg); }
  .testata__menu[aria-expanded="true"] i:last-of-type { transform: translateY(-4.5px) rotate(-45deg); }
  .testata__nav {
    position: fixed; inset: 0; margin: 0; z-index: 1;
    flex-direction: column; align-items: flex-start; justify-content: flex-end; gap: 4px;
    padding: var(--testata) var(--margine) 40px;
    background: var(--rosso);
    clip-path: inset(0 0 100% 0);
    visibility: hidden;
    /* chiusura: la tendina risale, poi diventa invisibile (prima spariva di colpo) */
    transition: clip-path .45s cubic-bezier(.65, 0, .35, 1), visibility 0s linear .45s;
  }
  .testata__nav.is-aperto { clip-path: inset(0 0 0 0); visibility: visible; transition: clip-path .55s var(--muove), visibility 0s; }
  /* le voci: entrano salendo dopo la tendina, escono subito sfumando */
  .testata__nav > * { opacity: 0; transform: translateY(16px); transition: opacity .15s ease, transform .2s ease-in; }
  .testata__nav.is-aperto > * { opacity: 1; transform: none; transition: opacity .4s ease, transform .55s var(--esce); }
  .testata__nav.is-aperto > :nth-child(1) { transition-delay: .18s; }
  .testata__nav.is-aperto > :nth-child(2) { transition-delay: .23s; }
  .testata__nav.is-aperto > :nth-child(3) { transition-delay: .28s; }
  .testata__nav.is-aperto > :nth-child(4) { transition-delay: .33s; }
  .testata__nav.is-aperto > :nth-child(5) { transition-delay: .38s; }
  .testata__nav a { font-family: var(--titoli); font-weight: 400; font-size: clamp(2.25rem, 10vw, 3.5rem); letter-spacing: -.04em; line-height: 1.1; }
  .testata__nav a:not(.testata__cta) { background: none; }
  .testata__cta { background: var(--nero); font-family: var(--testo) !important; font-size: 1rem !important; letter-spacing: 0 !important; margin-top: 24px; padding: 16px 20px; }
}

/* ==========================================================================
   HERO — il render in "notte rossa"; scorrendo, il bordo inferiore
   diventa il profilo del tetto a shed
   ========================================================================== */
.hero {
  position: relative; height: 100svh; min-height: 560px;
  display: grid; place-items: center;
  overflow: hidden;
}
/* il tetto a shed: tre triangoli neri come la sezione dopo, che crescono dal fondo.
   Si anima solo transform, quindi niente ridisegno dell'immagine filtrata sotto: fluido anche su telefono */
.hero__denti {
  position: absolute; left: 0; right: 0; bottom: -1px; z-index: 2;
  height: calc(min(12vw, 180px) + 1px);
  background: var(--nero); pointer-events: none;
  clip-path: polygon(0 100%, 33.333% 0, 33.333% 100%, 66.667% 0, 66.667% 100%, 100% 0, 100% 100%);
  transform-origin: 50% 100%; transform: scaleY(0);
  will-change: transform;
}
@supports (animation-timeline: scroll()) {
  .js-motion .hero__denti { animation: denti-su linear both; animation-timeline: scroll(root block); animation-range: 0 80svh; }
  .js-motion .hero__media { animation: media-giu linear both; animation-timeline: scroll(root block); animation-range: 0 100svh; }
  .js-motion .hero__testo { animation: testo-via linear both; animation-timeline: scroll(root block); animation-range: 0 80svh; }
}
@keyframes denti-su { to { transform: scaleY(1); } }
@keyframes media-giu { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(0, 25svh, 0); } }
@keyframes testo-via { 83% { opacity: 0; } to { opacity: 0; transform: translateY(-60px); } }
.hero__media { position: absolute; inset: -4% 0 -8%; transform: translate3d(0, var(--py, 0px), 0); }
.hero__strato { position: absolute; inset: 0; }
.hero__strato img {
  width: 100%; height: 100%; object-fit: cover;
  transform: scale(1.06);
  animation: respiro 22s ease-in-out infinite alternate;
}
.hero__strato--notte img { filter: url(#duo-rosso); }
.hero.is-ferma .hero__strato img { animation-play-state: paused; }
@keyframes respiro { from { transform: scale(1.06) translate(0, 0); } to { transform: scale(1.14) translate(-1.5%, -1%); } }

/* luce di servizio: il cursore riporta la luce vera del set sotto il rosso */
.hero__strato--luce {
  -webkit-mask-image: radial-gradient(circle var(--raggio, 0px) at var(--lx, 50%) var(--ly, 50%), #000 0%, #000 22%, rgba(0, 0, 0, .55) 55%, transparent 100%);
  mask-image: radial-gradient(circle var(--raggio, 0px) at var(--lx, 50%) var(--ly, 50%), #000 0%, #000 22%, rgba(0, 0, 0, .55) 55%, transparent 100%);
}

.hero__media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(19,19,19,.55) 0%, rgba(19,19,19,0) 28%, rgba(19,19,19,0) 58%, rgba(19,19,19,.65) 100%); }

.hero__testo { position: relative; z-index: 1; text-align: center; padding: 0 var(--margine); max-width: 1280px; }
@media (max-width: 700px) {
  .hero__testo { padding: 0 max(var(--margine), 32px); }
  .hero .hero__titolo { font-size: clamp(1.875rem, 8.6vw, 2.5rem); }
}
.hero__titolo {
  font-family: var(--titoli); font-weight: 400;
  font-size: clamp(2.125rem, .8rem + 6.2vw, 7rem);
  line-height: .94; letter-spacing: -.05em;
}
.hero__titolo .riga { display: block; overflow: hidden; padding-bottom: .06em; }
.hero__titolo .riga > span { display: block; }
.hero__sotto { margin: clamp(18px, 2vw, 28px) auto 0; max-width: 36ch; font-size: clamp(1rem, .9rem + .4vw, 1.25rem); line-height: 1.32; letter-spacing: -.015em; text-wrap: balance; }

.js-motion .hero__pausa { opacity: 0; transition: opacity .8s ease; }
.js-motion .hero.is-pronta .hero__pausa { opacity: 1; }
.js-motion .hero:not(.is-pronta) .hero__titolo,
.js-motion .hero:not(.is-pronta) .hero__sotto { visibility: hidden; }
.hero__pausa {
  position: absolute; right: var(--margine); bottom: 24px; z-index: 1;
  width: var(--lato, 64px); height: var(--lato, 64px); display: grid; place-items: center;
  background: var(--nero); color: var(--bianco); border: 1px solid var(--filo);
  transition: transform .16s var(--esce), background-color .2s ease;
}
/* le due icone stanno nella stessa cella; si scambia la visibile */
.hero__pausa svg { grid-area: 1 / 1; width: 22px; height: 22px; transition: opacity .2s ease, transform .25s var(--esce); }
.hero__pausa-via { opacity: 0; transform: scale(.6); }
.hero__pausa[aria-pressed="true"] .hero__pausa-ferma { opacity: 0; transform: scale(.6); }
.hero__pausa[aria-pressed="true"] .hero__pausa-via { opacity: 1; transform: none; }
.hero__pausa:hover { background: var(--bianco); color: var(--nero); }
.hero__pausa:active { transform: scale(.95); }
@media (max-width: 700px) { .hero__pausa { --lato: 52px; bottom: 16px; } }

/* ==========================================================================
   MANIFESTO — frase centrata con tasselli d'immagine nel testo
   ========================================================================== */
.manifesto {
  padding: var(--sezione) var(--margine);
  display: grid; justify-items: center; text-align: center; gap: clamp(40px, 5vw, 72px);
}
.manifesto .cornice__angoli { inset: calc(var(--sezione) * .45) var(--margine); }
/* marchio come nella chiusura della presentazione: logo | filetto | stagione */
.manifesto__marchio { display: flex; align-items: center; gap: clamp(16px, 2vw, 28px); text-align: left; }
.manifesto__logo { width: clamp(64px, 6vw, 92px); height: auto; color: var(--bianco); flex: none; }
.manifesto__filetto { align-self: stretch; width: 1px; background: var(--bianco); }
.manifesto__stagione { display: grid; gap: 4px; }
.manifesto__stagione span { font-weight: 500; font-size: .9375rem; color: var(--rosso-testo); }
.manifesto__stagione h2 { font-family: var(--titoli); font-weight: 600; font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.5rem); letter-spacing: -.035em; line-height: 1; }
.manifesto__testo {
  max-width: 21em;
  font-family: var(--titoli); font-weight: 400;
  font-size: clamp(1.75rem, .9rem + 3.6vw, 4.25rem);
  line-height: 1.12; letter-spacing: -.04em;
  text-wrap: pretty;
}
.manifesto__testo mark {
  background: none; color: inherit;
  text-decoration: underline; text-decoration-color: var(--rosso);
  text-decoration-thickness: .08em; text-underline-offset: .14em;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}
/* tassello: piccola finestra sul set, con il profilo del tetto; si accende come una lampada */
.tassello {
  position: relative; display: inline-block; vertical-align: -.08em;
  width: 1.5em; height: .86em; margin: 0 .06em;
  background: center / cover no-repeat;
  filter: url(#duo-notte);
  clip-path: polygon(0 18%, 33.333% 0, 33.333% 18%, 66.667% 0, 66.667% 18%, 100% 0, 100% 100%, 0 100%);
  transition: transform .3s var(--esce);
  transform-origin: 50% 100%;
}
.tassello::after { content: ""; position: absolute; inset: 0; background: var(--nero); opacity: 0; transition: opacity .25s steps(2); }
@media (hover: hover) and (pointer: fine) {
  .tassello:hover { transform: scale(2.4); z-index: 3; }
}
/* parole: spente, poi il filamento si scalda e si accendono */
.js-motion .manifesto__testo .parola { color: var(--spento); transition: color .4s ease; }
.js-motion .manifesto__testo .parola.is-accesa { color: var(--bianco); animation: filamento .7s ease-out; }
.js-motion .manifesto__testo .tassello::after { opacity: .82; }
.js-motion .manifesto__testo .tassello.is-accesa::after { opacity: 0; }
@keyframes filamento {
  0% { color: #FFC98A; text-shadow: 0 0 .35em rgba(255, 184, 102, .55); }
  100% { color: var(--bianco); text-shadow: 0 0 0 rgba(255, 184, 102, 0); }
}

/* ==========================================================================
   SLIDER (turni)
   ========================================================================== */
.scorri { position: relative; }
.scorri__binario {
  display: flex; gap: clamp(16px, 2vw, 28px);
  overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
  padding: 0 var(--margine);
  scroll-padding: 0 var(--margine);
  scrollbar-width: none;
  cursor: grab;
}
.scorri__binario::-webkit-scrollbar { display: none; }
.scorri__binario.is-trascina { cursor: grabbing; scroll-snap-type: none; }
.scorri__binario.is-trascina * { pointer-events: none; }
.scorri__comandi {
  display: flex; align-items: center; justify-content: flex-end; gap: 10px;
  margin: 28px var(--margine) 0; padding-top: 24px; border-top: 1px solid var(--filo);
}
.scorri__conta { margin-right: 12px; font-size: .9375rem; color: var(--grigio); font-variant-numeric: tabular-nums; }

/* turni: colonna editoriale a sinistra, binario che esce dal bordo a destra */
.turni {
  padding: 0 0 calc(var(--sezione) * .55);
  display: grid; align-items: start;
  grid-template-columns: minmax(260px, 25vw) minmax(0, 1fr);
  column-gap: clamp(28px, 3.4vw, 64px);
}
/* il binario parte dal bordo della colonna: i turni già visti escono di scena lì */
.turni .scorri__binario { padding-left: 0; scroll-padding-left: 0; }
.turni__lato { position: sticky; top: calc(var(--testata) + 24px); padding: 0 0 0 var(--margine); display: grid; gap: 18px; justify-items: start; }
.turni__titolo { font-family: var(--titoli); font-weight: 400; font-size: clamp(1.75rem, 1.1rem + 1.8vw, 2.75rem); line-height: 1.02; letter-spacing: -.04em; text-wrap: balance; }
.turni__nota { color: var(--grigio); font-size: .9375rem; max-width: 30ch; }
.turni .scorri__comandi { width: 100%; margin: 14px 0 0; padding-top: 0; border-top: 0; justify-content: flex-start; flex-wrap: wrap; }
.turni .scorri__conta { margin-right: auto; }
/* traccia: la scaletta dei turni, si riempie scorrendo */
.scorri__traccia { flex: 1 0 100%; height: 2px; background: var(--filo); margin-bottom: 14px; overflow: hidden; }
.scorri__traccia i { display: block; height: 100%; background: var(--rosso); transform-origin: left; transform: scaleX(var(--avanza, .33)); transition: transform .3s var(--esce); }

.turno { flex: 0 0 min(64vw, 760px); scroll-snap-align: start; display: grid; gap: 14px; align-content: start; }
.turno__play { position: relative; display: block; width: 100%; text-align: left; }
.turno__img { position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; background: #1c1c1c; }
.turno__img img { width: 100%; height: 100%; object-fit: cover; filter: url(#duo-notte); transition: transform 1.2s var(--esce); }
/* acceso: al passaggio il turno torna ai suoi colori veri */
.turno__play:is(:hover, :focus-visible) .turno__img img { filter: none; transform: scale(1.05); }
/* targa: il blocco bianco del marchio; i denti si alzano quando il turno si accende */
.turno__targa {
  --dt: 14px;
  position: absolute; left: clamp(14px, 2vw, 28px); bottom: clamp(14px, 2vw, 28px);
  display: grid; gap: 2px; padding: 28px 22px 16px; min-width: min(58%, 320px);
  background: var(--bianco); color: var(--nero);
  clip-path: polygon(0 var(--dt), 33.333% 0, 33.333% var(--dt), 66.667% 0, 66.667% var(--dt), 100% 0, 100% 100%, 0 100%);
  transition: clip-path .45s var(--esce);
}
.turno__play:is(:hover, :focus-visible) .turno__targa { --dt: 22px; }
.turno__num { font-weight: 500; font-size: .875rem; color: var(--rosso); }
.turno__nome { font-family: var(--titoli); font-weight: 600; font-size: clamp(1.25rem, .9rem + 1.3vw, 2.125rem); line-height: 1; letter-spacing: -.035em; }
.turno__icona {
  position: absolute; right: clamp(14px, 2vw, 28px); bottom: clamp(14px, 2vw, 28px);
  width: 64px; height: 64px; display: grid; place-items: center; background: var(--rosso);
  transition: transform .3s var(--esce), background-color .3s ease, color .3s ease;
}
.turno__icona svg { width: 22px; height: 22px; }
.turno__play:is(:hover, :focus-visible) .turno__icona { background: var(--bianco); color: var(--rosso); }
.turno__play:active .turno__icona { transform: scale(.94); }
.turno__play:focus-visible { outline-offset: 6px; }
.turno__meta { display: flex; flex-wrap: wrap; gap: 4px 20px; font-size: .9375rem; color: var(--grigio); }
.turno--spento .turno__img img { opacity: .3; }
.turno--spento .turno__targa { background: transparent; color: var(--grigio); border: 1px solid var(--filo); clip-path: none; padding-top: 16px; }
.turno--spento .turno__num { color: var(--grigio); }

@media (max-width: 860px) {
  .turni { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .turni__lato { position: static; padding-right: var(--margine); }
  .turni .scorri__binario { padding-left: var(--margine); scroll-padding-left: var(--margine); }
  .turno { flex-basis: 84vw; }
}

/* ==========================================================================
   CHE COS'È
   ========================================================================== */
.format {
  padding: var(--sezione) calc(var(--margine) + clamp(28px, 6vw, 110px));
  display: grid; gap: clamp(28px, 3vw, 44px);
  grid-template-columns: repeat(12, minmax(0, 1fr));
}
.format .cornice__angoli { inset: calc(var(--sezione) * .45) var(--margine); }
.format > .etichetta { grid-column: 1 / -1; justify-self: start; }
.format__tesi {
  grid-column: 1 / span 8;
  font-family: var(--titoli); font-weight: 400;
  font-size: clamp(1.75rem, 1.05rem + 2.6vw, 3.5rem);
  line-height: 1.04; letter-spacing: -.04em; text-wrap: balance;
}
.format__corpo { grid-column: 7 / span 5; display: grid; gap: 1em; justify-items: start; color: #E6E4E0; max-width: 46ch; }
.format__corpo .link { margin-top: 1em; color: var(--bianco); }
/* scaletta: le fasi della puntata, larghe quanto durano */
.scaletta { grid-column: 1 / -1; margin-top: clamp(56px, 7vw, 112px); display: grid; gap: 22px; }
.scaletta__titolo { font-family: var(--titoli); font-weight: 600; font-size: clamp(1.25rem, 1rem + .9vw, 1.75rem); letter-spacing: -.03em; line-height: 1.1; text-wrap: balance; }
.scaletta__barra { position: relative; padding: 12px 0; }
.scaletta__fasi { display: flex; gap: 3px; height: clamp(68px, 7vw, 96px); }
.fase {
  /* le fasi brevi tengono almeno il loro nome: le proporzioni restano, nessuna etichetta tagliata */
  flex: var(--min) 1 0; min-width: max-content;
  display: flex; align-items: flex-end; padding: 10px 12px;
  background: #242424; text-align: left;
  transition: background-color .25s ease;
}
.fase__nome { min-width: 0; font-size: .875rem; font-weight: 500; color: var(--grigio); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: color .25s ease; }
.fase:hover { background: #303030; }
.fase.is-attiva { background: var(--rosso); }
.fase.is-attiva .fase__nome { color: var(--bianco); }
.fase:focus-visible { outline-offset: 2px; }
/* testina: la posizione di lettura, come in una timeline di montaggio */
.scaletta__testina { position: absolute; top: 0; bottom: 0; left: calc(var(--testa, 0) * 100%); width: 2px; margin-left: -1px; background: var(--bianco); pointer-events: none; }
.scaletta__testina::before { content: ""; position: absolute; top: 0; left: 50%; width: 12px; height: 12px; margin-left: -6px; background: var(--bianco); clip-path: polygon(0 0, 100% 0, 50% 100%); }
.scaletta.is-manuale .scaletta__testina { transition: left .35s var(--esce); }
.scaletta__dettaglio { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 6px 32px; max-width: 920px; min-height: 6.5em; align-content: start; }
.scaletta__quando { color: var(--rosso-testo); font-weight: 500; font-size: .9375rem; padding-top: .55em; }
.scaletta__nome { font-family: var(--titoli); font-size: clamp(1.5rem, 1.1rem + 1.4vw, 2.25rem); letter-spacing: -.035em; line-height: 1.05; }
.scaletta__testo { grid-column: 2; color: #E6E4E0; max-width: 56ch; }
@media (max-width: 700px) {
  .fase { min-width: 0; }
  .fase__nome { display: none; }
  .scaletta__dettaglio { grid-template-columns: 1fr; }
  .scaletta__testo { grid-column: 1; }
  .scaletta__quando { padding-top: 0; }
}

@media (max-width: 860px) {
  .format { grid-template-columns: 1fr; padding-inline: calc(var(--margine) + 24px); }
  .format__tesi, .format__corpo { grid-column: 1 / -1; }
}

/* ==========================================================================
   BANDA — i cinque filoni su un nastro inclinato
   ========================================================================== */
.banda {
  position: relative; z-index: 2;
  margin: 0 -4vw;
  background: var(--rosso);
  transform: rotate(-3.2deg);
  overflow: hidden;
  padding: clamp(14px, 1.6vw, 22px) 0;
}
.banda__nastro {
  display: flex; align-items: center; gap: clamp(20px, 2.4vw, 40px);
  width: max-content;
  font-family: var(--titoli); font-weight: 600;
  font-size: clamp(1.75rem, 1rem + 3vw, 4rem);
  letter-spacing: -.04em; line-height: 1; white-space: nowrap;
  animation: nastro 38s linear infinite;
}
.banda__nastro svg { width: .9em; height: .34em; color: var(--nero); flex: none; }
@keyframes nastro { to { transform: translateX(-50%); } }

/* ==========================================================================
   GRIGLIA STAGIONE — ogni scheda ha il profilo del tetto
   ========================================================================== */
.stagione { padding: var(--sezione) var(--margine); display: grid; gap: clamp(56px, 7vw, 104px); justify-items: center; }
.stagione .titolone { text-align: center; max-width: 15em; font-size: clamp(2.25rem, 1rem + 4.4vw, 5rem); }
/* contatore: un dente del tetto per ogni turno della stagione */
.contatore { display: grid; justify-items: center; gap: 14px; margin-top: calc(clamp(56px, 7vw, 104px) * -.5); }
.contatore__denti { display: flex; gap: 4px; }
.contatore__denti i { width: clamp(30px, 4vw, 52px); height: clamp(12px, 1.5vw, 19px); background: #2C2C2C; clip-path: polygon(0 100%, 100% 0, 100% 100%); }
.contatore__denti i.is-fatto { background: var(--rosso); }
.contatore p { font-size: .9375rem; color: var(--grigio); }
.contatore b { color: var(--bianco); font-weight: 500; }
.stagione__griglia { width: 100%; max-width: 1180px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(20px, 3vw, 40px); }
.scheda {
  position: relative; display: grid; grid-template-rows: auto 1fr;
  background: #1C1C1C;
  clip-path: polygon(0 var(--d), 33.333% 0, 33.333% var(--d), 66.667% 0, 66.667% var(--d), 100% 0, 100% 100%, 0 100%);
  --d: clamp(18px, 2.6vw, 34px);
}
.scheda__img { position: relative; aspect-ratio: 4 / 3; overflow: hidden; }
.scheda__img img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--esce); }
/* nel rosso della notte; al passaggio torna la luce vera del set */
.scheda__img::before, .scheda__img::after { content: ""; position: absolute; inset: 0; z-index: 1; transition: opacity .6s var(--esce); }
.scheda__img::before { background: #808080; mix-blend-mode: saturation; }
.scheda__img::after { background: var(--rosso); mix-blend-mode: multiply; }
.scheda:not(.scheda--spenta):is(:hover, :focus-within) .scheda__img::before,
.scheda:not(.scheda--spenta):is(:hover, :focus-within) .scheda__img::after { opacity: 0; }
.scheda:not(.scheda--spenta):is(:hover, :focus-within) .scheda__img img { transform: scale(1.04); }
.scheda__meta { font-size: .875rem; color: var(--grigio); margin-top: 4px; }
.scheda__testo { display: grid; justify-items: center; text-align: center; gap: 10px; padding: 28px 24px 32px; }
.scheda__num { font-weight: 500; font-size: .875rem; color: var(--grigio); }
.scheda h3 { font-family: var(--titoli); font-weight: 600; font-size: clamp(1.5rem, 1.1rem + 1.4vw, 2.5rem); line-height: 1; letter-spacing: -.035em; margin-bottom: 10px; }
.scheda--spenta .scheda__img::after { background: var(--nero); mix-blend-mode: normal; opacity: .7; }
.scheda--spenta h3 { color: var(--grigio); font-weight: 400; }
/* telefono: i turni usciti a tutta larghezza, quelli in arrivo in coppia e compatti */
@media (max-width: 700px) {
  .stagione__griglia { gap: 16px; }
  .scheda:not(.scheda--spenta) { grid-column: 1 / -1; }
  .scheda:not(.scheda--spenta) .scheda__img { aspect-ratio: 16 / 10; }
  .scheda__testo { padding: 22px 20px 26px; }
  .scheda--spenta { --d: 14px; }
  .scheda--spenta .scheda__img { aspect-ratio: 1; }
  .scheda--spenta .scheda__testo { gap: 4px; padding: 14px 10px 18px; }
  .scheda--spenta h3 { font-size: 1.125rem; margin: 0; }
  .scheda--spenta .bottone--spento { display: none; }
}

/* ==========================================================================
   COSA ASCOLTARE — filtro a frase + carosello ad arco
   ========================================================================== */
.ascolta { padding: var(--sezione) 0 calc(var(--sezione) * .7); display: grid; justify-items: center; text-align: center; overflow: hidden; }
.ascolta .cornice__angoli { inset: calc(var(--sezione) * .45) var(--margine) auto; height: 36%; }
.ascolta .titolone { padding: 0 var(--margine); }
.frase { margin-top: 18px; display: flex; flex-wrap: wrap; justify-content: center; align-items: baseline; gap: 8px 14px; padding: 0 var(--margine); font-family: var(--titoli); font-size: clamp(1.25rem, 1rem + 1vw, 2rem); letter-spacing: -.03em; }
/* scelta del filone: la parola scelta è sottolineata in rosso; il menu compare sotto,
   con i denti del tetto in cima, e la voce attiva ha il dente rosso */
.scelta { position: relative; z-index: 5; }
.scelta__bottone {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: .3em;
  font: inherit; letter-spacing: inherit; color: var(--bianco); white-space: nowrap;
  padding: 0 2px 8px; overflow: hidden;
}
/* sottolineatura: filo rosso che al passaggio si ispessisce verso l'alto */
.scelta__bottone::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--rosso);
  transition: height .3s var(--esce);
}
.scelta__bottone:hover::after, .scelta.is-aperta .scelta__bottone::after { height: 5px; }
.scelta__bottone:focus-visible { outline-offset: 6px; }
.scelta__freccia { flex: none; width: .66em; height: .66em; stroke-width: 2; transform: rotate(90deg); transition: transform .4s var(--esce); }
.scelta__bottone:hover .scelta__freccia { transform: rotate(90deg) translateX(.1em); }
.scelta.is-aperta .scelta__freccia { transform: rotate(-90deg); }
.scelta__lista {
  --d: 12px;
  position: absolute; top: calc(100% + 10px); left: 50%; translate: -50% 0;
  width: max-content; min-width: max(100%, 15em); max-width: calc(100vw - 2 * var(--margine));
  padding: calc(var(--d) + 8px) 8px 8px;
  background: var(--bianco); color: var(--nero);
  font-family: var(--titoli); font-size: clamp(1.125rem, 1rem + .4vw, 1.375rem); letter-spacing: -.03em; text-align: left;
  clip-path: polygon(0 var(--d), 33.333% 0, 33.333% var(--d), 66.667% 0, 66.667% var(--d), 100% 0, 100% 100%, 0 100%);
  filter: drop-shadow(0 18px 32px rgba(0, 0, 0, .4));
  /* chiuso: appena sopra e un filo più piccolo, cresce dal bottone */
  transform-origin: 50% 0;
  opacity: 0; transform: translateY(-6px) scale(.97);
  visibility: hidden;
  /* uscita breve e lineare nel finale: sparisce senza farsi notare */
  transition: opacity .14s ease-in, transform .16s ease-in, visibility 0s linear .16s;
}
.scelta.is-aperta .scelta__lista {
  opacity: 1; transform: none; visibility: visible;
  transition: opacity .18s ease-out, transform .28s var(--esce), visibility 0s;
}
.scelta__lista:focus { outline: none; }
.scelta__lista li {
  position: relative; display: flex; align-items: baseline; justify-content: space-between; gap: 40px;
  padding: 13px 16px 13px 44px; cursor: pointer;
  transition: background-color .15s ease, color .15s ease;
}
.scelta__lista li + li { box-shadow: inset 0 1px #E6E4E0; }
.scelta__lista small { font-family: var(--testo); font-size: .8125rem; letter-spacing: 0; font-weight: 500; color: #6B6964; font-variant-numeric: tabular-nums; transition: color .15s ease; }
/* il dente del tetto segna la voce scelta */
.scelta__lista li::before {
  content: ""; position: absolute; left: 16px; top: 50%; width: 16px; height: 7px; translate: 0 -50%;
  background: var(--rosso); clip-path: polygon(0 100%, 100% 0, 100% 100%);
  opacity: 0; transform: scaleX(.4); transform-origin: left; transition: opacity .2s ease, transform .3s var(--esce);
}
.scelta__lista li[aria-selected="true"]::before { opacity: 1; transform: none; }
.scelta__lista li[aria-selected="true"] { color: var(--rosso); }
/* voce sotto il puntatore o sotto le frecce: fondo nero, il dente accennato anticipa la scelta */
.scelta__lista li.is-evidente { background: var(--nero); color: var(--bianco); box-shadow: none; }
.scelta__lista li.is-evidente + li { box-shadow: none; }
.scelta__lista li.is-evidente small { color: var(--grigio); }
.scelta__lista li.is-evidente:not([aria-selected="true"])::before { opacity: .45; transform: none; background: var(--bianco); }

.ascolta__nota { margin-top: 14px; padding: 0 var(--margine); color: var(--grigio); }

.arco {
  --r: clamp(1000px, 110vw, 1500px);
  --w: clamp(140px, 15vw, 220px);
  --passo: 9deg;
  position: relative; width: 100%;
  height: calc(var(--w) * 1.5 + 330px);
  margin-top: clamp(48px, 6vw, 88px);
}
.arco__carte { position: absolute; left: 50%; top: 0; width: 0; height: 100%; }
.carta {
  position: absolute; left: 0; top: 20px;
  width: var(--w); aspect-ratio: 2 / 3;
  margin-left: calc(var(--w) / -2);
  transform-origin: 50% var(--r);
  transform: rotate(calc(var(--i) * var(--passo)));
  transition: transform .7s var(--muove), opacity .5s ease;
  opacity: var(--o, 1);
}
.carta img {
  width: 100%; height: 100%; object-fit: cover; filter: url(#duo-notte);
  transform: scale(.9); transition: transform .7s var(--muove);
  clip-path: polygon(0 7%, 33.333% 0, 33.333% 7%, 66.667% 0, 66.667% 7%, 100% 0, 100% 100%, 0 100%);
}
.arco__carte { cursor: grab; touch-action: pan-y; }
.arco { -webkit-user-select: none; user-select: none; }
.arco__carte.is-trascina { cursor: grabbing; }
.carta.is-attiva { z-index: 2; }
.carta.is-attiva img { transform: scale(1.06); }
.carta.is-attiva img { filter: url(#duo-rosso); }
/* anteprima muta: stesso taglio a tetto della copertina, compare quando parte davvero */
.carta video {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  transform: scale(1.06); opacity: 0; transition: opacity .5s ease;
  clip-path: polygon(0 7%, 33.333% 0, 33.333% 7%, 66.667% 0, 66.667% 7%, 100% 0, 100% 100%, 0 100%);
}
.carta.is-video video { opacity: 1; }
.carta button { position: absolute; inset: 0; display: grid; place-items: center; }
.carta button span { width: 64px; height: 64px; display: grid; place-items: center; background: var(--rosso); transform: scale(0); transition: transform .4s var(--esce); }
.carta.is-attiva button span { transform: scale(1); }
.carta button svg { width: 22px; height: 22px; }
.arco__info { position: absolute; left: 50%; transform: translateX(-50%); top: calc(20px + var(--w) * 1.5 * 1.04 + 40px); width: min(620px, 100% - 2 * var(--margine)); }
@media (max-width: 700px) {
  .arco { --passo: 14deg; height: calc(var(--w) * 1.5 + 320px); }
  .arco__info { min-height: 0; }
  .arco__info { width: calc(100% - 2 * var(--margine)); }
  .turno__targa { padding: 22px 16px 12px; min-width: 0; max-width: calc(100% - 100px); }
  .turno__icona { width: 52px; height: 52px; }
}
.arco__filone { font-weight: 500; font-size: .9375rem; color: var(--rosso-testo); margin-bottom: 10px; }
.arco__info { min-height: 11em; }
.arco__titolo { font-family: var(--titoli); font-weight: 400; font-size: clamp(1.75rem, 1.1rem + 2.4vw, 3.25rem); letter-spacing: -.04em; line-height: 1.02; text-wrap: balance; }
.arco__temi { margin-top: 14px; color: var(--grigio); }
.arco__temi b { color: var(--bianco); font-weight: 500; }
.arco__prec, .arco__succ { position: absolute; bottom: 0; }
.arco__prec { left: var(--margine); }
.arco__succ { right: var(--margine); }
.tasto--grande { width: 64px; height: 64px; }
.arco__info.is-cambia { animation: cambia .45s var(--esce); }
@keyframes cambia { from { opacity: 0; transform: translate(-50%, 8px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* ==========================================================================
   FOOTER — rosso come la chiusura della presentazione, con il tetto in alto
   ========================================================================== */
.piede {
  --dente: clamp(40px, 9vw, 140px);
  position: relative;
  margin-top: calc(var(--dente) * -1 + 8px);
  padding: calc(var(--dente) + clamp(48px, 6vw, 88px)) var(--margine) 28px;
  background: var(--rosso); color: var(--bianco);
  clip-path: polygon(0 var(--dente), 33.333% 0, 33.333% var(--dente), 66.667% 0, 66.667% var(--dente), 100% 0, 100% 100%, 0 100%);
  display: grid; gap: clamp(48px, 6vw, 88px);
  font-size: .9375rem;
}
.piede a { color: inherit; }
.piede__testa { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 28px 40px; }
.piede__saluto { max-width: 11em; font-family: var(--titoli); font-weight: 400; font-size: clamp(2.25rem, 1rem + 4.2vw, 5rem); line-height: .96; letter-spacing: -.05em; text-wrap: balance; }
.piede__iscriviti {
  display: inline-flex; align-items: center; min-height: 52px; padding: 0 24px;
  background: var(--bianco); color: var(--rosso) !important; text-decoration: none; font-weight: 500; font-size: 1rem;
  transition: background-color .2s ease, color .2s ease, transform .16s var(--esce);
}
.piede__iscriviti:hover { background: var(--nero); color: var(--bianco) !important; }
.piede__iscriviti:active { transform: scale(.97); }

/* tre livelli: etichetta piccola, voce grande, link medi; ogni fascia separata da un filo */
.piede__etichetta { font-size: .875rem; font-weight: 500; margin-bottom: 14px; }
.piede__griglia, .piede__crediti, .piede__fondo { border-top: 1px solid rgba(255, 255, 255, .45); padding-top: 24px; }
.piede__griglia { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr); gap: 36px 40px; }
.piede__voce { font-family: var(--titoli); font-size: clamp(1.375rem, 1rem + 1.1vw, 2rem); letter-spacing: -.035em; line-height: 1.12; max-width: 22em; overflow-wrap: anywhere; }
.piede__voce a { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 5px; }
.piede__voce a:hover { text-decoration-thickness: 2px; }
.piede__menu ul { display: grid; gap: 8px; }
.piede__menu a, .piede__legali a, .piede__legali button { text-decoration: none; font-weight: 500; font-size: 1.0625rem; }
.piede__menu a:hover, .piede__legali a:hover, .piede__legali button:hover { text-decoration: underline; text-underline-offset: 4px; }

.piede__crediti { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 36px 40px; align-items: start; }
.piede__opem { width: 128px; height: auto; }
.piede__ente--largo { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 20px 40px; align-items: center; }
.piede__progetto { font-size: 1rem; line-height: 1.45; max-width: 40ch; }
.piede__loghi { display: flex; align-items: center; gap: 28px; }
.piede__unipr { height: 52px; width: auto; }
.piede__fni { height: 52px; width: auto; }

.piede__fondo { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; font-size: .875rem; }
.piede__logo { --logo-testo: var(--rosso); width: 52px; height: auto; color: var(--bianco); }
.piede__fondo > p:not(.piede__dev) { margin-right: auto; }
/* firma dello sviluppatore: piccola, grigia finché non ci passi sopra */
.piede__dev { font-size: .8125rem; color: rgba(255, 255, 255, .75); }
.piede__dev a { color: var(--bianco); font-weight: 500; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.piede__dev a:hover { text-decoration-thickness: 2px; }
.piede__legali { display: flex; flex-wrap: wrap; gap: 0 24px; }
.piede__legali li { white-space: nowrap; }
.piede__legali a, .piede__legali button { font-size: .875rem; }
/* torna su: stesso bordo dei tasti del sito, la freccia punta al tetto */
.piede__su {
  display: inline-flex; align-items: center; gap: 12px; min-height: 48px; padding: 0 18px;
  border: 1px solid rgba(255, 255, 255, .7); text-decoration: none; font-weight: 500;
  transition: background-color .2s ease, color .2s ease, transform .16s var(--esce);
}
.piede__su-icona { display: block; width: 18px; height: 18px; overflow: hidden; }
.piede__su svg { width: 18px; height: 18px; transform: rotate(-90deg); }
.piede__su:hover { background: var(--bianco); color: var(--rosso); border-color: var(--bianco); }
/* al passaggio la freccia esce dal tetto e rientra dal basso */
@media (hover: hover) {
  .piede__su:hover svg { animation: sale .5s var(--muove); }
}
@keyframes sale {
  45% { transform: rotate(-90deg) translateX(110%); }
  46% { transform: rotate(-90deg) translateX(-110%); }
  100% { transform: rotate(-90deg) translateX(0); }
}
.piede__su:active { transform: scale(.97); }
@media (max-width: 1000px) {
  .piede__crediti { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .piede__griglia { grid-template-columns: 1fr 1fr; }
  .piede__storia { grid-column: 1 / -1; }
  .piede__ente--largo { grid-template-columns: 1fr; }
}
@media (max-width: 420px) {
  .piede__unipr, .piede__fni { height: 44px; }
}
/* telefono: stesso ordine, meno aria. I link vanno in riga, i crediti si stringono */
@media (max-width: 700px) {
  .piede { gap: 32px; padding-top: calc(var(--dente) + 36px); padding-bottom: 20px; }
  .piede__testa { gap: 20px; }
  .piede__saluto { font-size: 2.125rem; }
  .piede__iscriviti { min-height: 48px; }
  .piede__griglia, .piede__crediti, .piede__fondo { padding-top: 18px; }
  .piede__griglia { grid-template-columns: minmax(0, 1fr); gap: 22px; }
  .piede__etichetta { margin-bottom: 8px; }
  .piede__voce { font-size: 1.25rem; }
  .piede__menu ul { display: flex; flex-wrap: wrap; gap: 0 20px; }
  .piede__crediti { gap: 20px; }
  .piede__opem { width: 104px; }
  .piede__progetto { font-size: .875rem; padding-right: 12%; }
  .piede__ente--largo { gap: 14px; }
  .piede__unipr, .piede__fni { height: 40px; }
  .piede__fondo { gap: 12px 20px; }
  .piede__logo { width: 40px; }
  .piede__legali { column-gap: 16px; }
  .piede__su { min-height: 44px; padding: 0 14px; }
  /* ultima riga: firma a sinistra, Torna su a destra */
  .piede__dev { margin-right: auto; }
}
/* dita, non puntatori: righe dei menu alte almeno 40px */
@media (pointer: coarse) {
  .piede__menu ul { row-gap: 0; }
  .piede__menu a, .piede__legali a, .piede__legali button { display: inline-block; padding: 10px 0; }
  .piede__legali { column-gap: 20px; }
}

/* ==========================================================================
   PLAYER — schermo con i denti del tetto; YouTube senza cookie oppure attesa
   ========================================================================== */
/* Il dialog occupa tutta la finestra ed è una griglia: in alto la barra (Chiudi, e per le clip
   le frecce), al centro lo schermo, sotto o di lato i testi. Lo schermo si dimensiona sullo
   spazio che resta, quindi tutto resta visibile a qualunque misura. */
.player {
  --pad-y: clamp(16px, 3.2vh, 32px);
  --barra: 48px;
  --spazio: clamp(16px, 2.6vh, 28px);          /* tra barra, schermo e testi */
  position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; margin: 0;
  padding: var(--pad-y) var(--margine);
  background: transparent; color: var(--bianco); border: 0; overflow: auto; overscroll-behavior: contain;
}
.player::backdrop { background: rgba(10, 10, 10, .97); }
.player[open] { display: grid; row-gap: 0; column-gap: clamp(24px, 4vw, 64px); }

/* entrata: il velo sfuma, lo schermo si apre dal basso come una serranda, poi barra e testi.
   uscita (.is-chiude): tutto più rapido, i pezzi scendono e il velo se ne va per ultimo */
.player[open]::backdrop { animation: velo .4s ease both; }
.player[open] .player__schermo { animation: alza .75s var(--muove) .05s both; }
.player[open] .player__schermo img { animation: posa 1.1s var(--esce) .05s both; }
.player[open] :is(.player__chiudi, .player__nav) { animation: entra .5s var(--esce) .3s both; }
.player[open] .player__info { animation: entra .6s var(--esce) .4s both; }
.player.is-chiude::backdrop { animation: via .32s ease .04s both; }
.player.is-chiude :is(.player__schermo, .player__info, .player__chiudi, .player__nav) { animation: esce .26s cubic-bezier(.55, 0, 1, .45) both; }
@keyframes velo { from { opacity: 0; } }
@keyframes via { to { opacity: 0; } }
@keyframes alza { from { clip-path: polygon(0 100%, 33.333% 100%, 33.333% 100%, 66.667% 100%, 66.667% 100%, 100% 100%, 100% 100%, 0 100%); } }
@keyframes posa { from { transform: scale(1.08); } }
@keyframes entra { from { opacity: 0; transform: translateY(14px); } }
@keyframes esce { to { opacity: 0; transform: translateY(18px); } }

/* barra: Chiudi sempre in alto a destra, alla stessa altezza dei tasti */
.player__chiudi {
  grid-area: barra; justify-self: end; align-self: start;
  display: inline-flex; align-items: center; gap: 10px; height: var(--barra); padding: 0 18px;
  background: var(--bianco); color: var(--nero); font-weight: 500;
  transition: transform .16s var(--esce), background-color .2s ease;
}
.player__chiudi::after { content: ""; width: 12px; height: 12px; background: currentColor; clip-path: polygon(15% 0, 50% 35%, 85% 0, 100% 15%, 65% 50%, 100% 85%, 85% 100%, 50% 65%, 15% 100%, 0 85%, 35% 50%, 0 15%); }
.player__chiudi:hover { background: #E6E4E0; }
.player__chiudi:active { transform: scale(.96); }

.player__schermo {
  grid-area: schermo; justify-self: center; align-self: center;
  position: relative; width: var(--sw); aspect-ratio: 16 / 9; overflow: hidden; background: #0c0c0c;
  container-type: inline-size;   /* il testo d'attesa scala con lo schermo */
  margin-top: var(--spazio);
  --d: clamp(14px, 2.6vw, 32px);
  clip-path: polygon(0 var(--d), 33.333% 0, 33.333% var(--d), 66.667% 0, 66.667% var(--d), 100% 0, 100% 100%, 0 100%);
}
.player__schermo img { width: 100%; height: 100%; object-fit: cover; filter: url(#duo-rosso); opacity: .55; }
.player__schermo iframe, .player__schermo video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #0c0c0c; }
.player__attesa { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: clamp(20px, 4vw, 48px); }
.player__attesa[hidden] { display: none; }
.player__conto { font-family: var(--titoli); font-size: clamp(1rem, 4.4cqw, 2.5rem); letter-spacing: -.04em; line-height: 1.08; max-width: 16em; text-wrap: balance; }

/* testi: etichetta rossa, titolo, temi; poi l'azione */
.player__info { grid-area: info; display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 18px 32px; padding-top: var(--spazio); min-width: 0; }
.player__testi { display: grid; gap: 8px; min-width: 0; }
.player__num { font-weight: 500; font-size: .9375rem; color: var(--rosso-testo); }
.player__info h2 { font-family: var(--titoli); font-weight: 400; font-size: clamp(1.5rem, 1rem + 1.9vw, 2.75rem); letter-spacing: -.04em; line-height: 1.02; max-width: 18em; text-wrap: balance; }
.player__temi { margin-top: 4px; color: var(--grigio); max-width: 34ch; }
.player__temi b { color: var(--bianco); font-weight: 500; }

/* frecce delle clip, con il contatore in mezzo */
.player__nav { grid-area: nav; display: none; align-items: center; gap: 6px; }
.player__nav .tasto { width: var(--barra); height: var(--barra); }
.player__nav span { min-width: 6ch; text-align: center; font-size: .9375rem; font-weight: 500; color: var(--grigio); font-variant-numeric: tabular-nums; }

/* ---------- episodi 16:9: colonna centrata, larga quanto lo schermo */
.player:not(.is-verticale) {
  /* altezza riservata: padding, barra, due spazi e circa due righe di testo */
  --sw: min(100vw - 2 * var(--margine), 1200px, (100dvh - 2 * var(--pad-y) - var(--barra) - 2 * var(--spazio) - 110px) * 16 / 9);
  grid-template-columns: minmax(0, 1fr) var(--sw) minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr) auto auto minmax(0, 1fr);
  grid-template-areas: "barra barra barra" ". . ." ". schermo ." ". info ." ". . .";
  column-gap: 0;   /* le colonne laterali sono solo margine: nessuno spazio in più */
}

/* ---------- clip 9:16, finestre larghe: testi a sinistra dello schermo, frecce a destra,
   entrambi allineati al fondo dello schermo */
.player.is-verticale {
  --sw: min(460px, (100dvh - 2 * var(--pad-y) - var(--barra) - var(--spazio)) * 9 / 16);
  grid-template-columns: minmax(0, 1fr) var(--sw) minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr) auto minmax(0, 1fr);
  grid-template-areas: "barra barra barra" ". . ." "info schermo nav" ". . .";
}
.player.is-verticale .player__schermo { aspect-ratio: 9 / 16; }
.player.is-verticale .player__conto { font-size: clamp(1rem, 7.5cqw, 2rem); }
.player.is-verticale .player__nav { display: flex; align-self: end; justify-self: start; }
.player.is-verticale .player__info { align-self: end; justify-self: end; flex-direction: column; align-items: flex-end; text-align: right; padding-top: 0; }
.player.is-verticale .player__testi { justify-items: end; }
.player.is-verticale .player__info h2 { font-size: clamp(1.5rem, 1rem + 1.4vw, 2.5rem); max-width: 10em; }
.player.is-verticale .player__info .bottone { margin-top: 10px; }

/* ---------- clip 9:16, finestre strette in verticale: frecce nella barra accanto a Chiudi,
   sotto lo schermo solo etichetta e titolo (in orizzontale resta il layout con i lati) */
@media (max-width: 959px) and (orientation: portrait) {
  .player.is-verticale {
    --sw: min(100vw - 2 * var(--margine), 440px, (100dvh - 2 * var(--pad-y) - var(--barra) - 2 * var(--spazio) - 84px) * 9 / 16);
    grid-template-rows: auto minmax(0, 1fr) auto auto minmax(0, 1fr);
    grid-template-areas: "barra barra barra" ". . ." ". schermo ." ". info ." ". . .";
    column-gap: 0;
  }
  .player.is-verticale .player__nav { grid-area: barra; align-self: start; }
  .player.is-verticale .player__info { justify-self: stretch; align-items: flex-start; text-align: left; padding-top: var(--spazio); }
  .player.is-verticale .player__testi { justify-items: start; gap: 6px; }
  .player.is-verticale .player__info h2 { font-size: clamp(1.25rem, 1rem + 1.2vw, 1.75rem); max-width: none; }
  .player.is-verticale .player__temi, .player.is-verticale .player__info .bottone { display: none; }
}
/* ---------- finestre basse (telefono in orizzontale): l'episodio prende l'altezza, i testi vanno a destra */
@media (orientation: landscape) and (max-height: 520px) {
  .player:not(.is-verticale) {
    --sw: min(100vw - 2 * var(--margine) - 240px, (100dvh - 2 * var(--pad-y) - var(--barra) - var(--spazio)) * 16 / 9);
    grid-template-columns: var(--sw) minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr) auto minmax(0, 1fr);
    grid-template-areas: "barra barra" ". ." "schermo info" ". .";
    column-gap: 24px;
  }
  .player:not(.is-verticale) .player__info { flex-direction: column; align-items: flex-start; align-self: end; padding-top: 0; }
  .player:not(.is-verticale) .player__info h2 { font-size: clamp(1.25rem, 1rem + 1vw, 1.75rem); }
  .player.is-verticale .player__info h2 { font-size: clamp(1.25rem, 1rem + 1vw, 1.75rem); }
  .player.is-verticale .player__temi { display: none; }
}
/* telefoni: il bottone YouTube degli episodi va a tutta larghezza sotto il titolo */
@media (max-width: 600px) and (orientation: portrait) {
  .player { --barra: 44px; }
  .player:not(.is-verticale) .player__info .bottone { width: 100%; }
}

/* ==========================================================================
   CONSENSO — pannello nero col tetto a shed, in basso a sinistra; sale dal fondo.
   Il bordo rosso segue anche i denti: il pannello è rosso e sopra c'è un fondo nero
   con la stessa sagoma, rientrato di --bordo.
   Rifiuta e Accetta hanno lo stesso peso: stessa misura, stesso posto
   ========================================================================== */
.consenso {
  --d: 11px;
  --bordo: 2px;
  position: fixed; z-index: 80;
  left: var(--margine); bottom: max(24px, env(safe-area-inset-bottom));
  width: min(440px, 100vw - 2 * var(--margine));
  background: var(--rosso);
  color: var(--bianco);
  isolation: isolate;
  padding: calc(var(--d) + 18px) 20px 20px;
  display: grid; gap: 16px;
  clip-path: polygon(0 var(--d), 33.333% 0, 33.333% var(--d), 66.667% 0, 66.667% var(--d), 100% 0, 100% 100%, 0 100%);
  opacity: 0; transform: translateY(24px);
  transition: opacity .2s ease-in, transform .3s cubic-bezier(.55, 0, 1, .45);
}
/* i gradini verticali dei denti rientrano verso sinistra di --bordo, altrimenti lì il rosso sparisce.
   Le percentuali sono sulla larghezza interna (W - 2·bordo), da qui le correzioni 4/3 e 2/3 */
.consenso::before {
  content: ""; position: absolute; inset: var(--bordo); z-index: -1;
  background: var(--nero);
  --s1: calc(33.333% - var(--bordo) * 4 / 3);
  --s2: calc(66.667% - var(--bordo) * 2 / 3);
  clip-path: polygon(0 var(--d), var(--s1) 0, var(--s1) var(--d), var(--s2) 0, var(--s2) var(--d), 100% 0, 100% 100%, 0 100%);
}
.consenso[hidden] { display: none; }
.consenso.is-visibile { opacity: 1; transform: none; transition: opacity .3s ease-out, transform .6s var(--esce); }
/* il contenuto entra un attimo dopo il pannello */
.consenso > * { transition: opacity .2s ease; }
.consenso:not(.is-visibile) > * { opacity: 0; }
.consenso.is-visibile > * { transition: opacity .4s ease .12s; }

.consenso__testo { display: grid; gap: 6px; padding-right: 28px; }
.consenso__titolo { font-family: var(--titoli); font-weight: 400; font-size: 1.3125rem; letter-spacing: -.035em; line-height: 1.1; }
.consenso p { font-size: .8125rem; line-height: 1.45; color: #CFCDC9; }
.consenso p a { color: var(--bianco); font-weight: 500; text-decoration-color: var(--rosso); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.consenso p a:hover { text-decoration-thickness: 4px; }
.consenso :focus-visible { outline-color: var(--bianco); }

.consenso__azioni { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.consenso__bottone {
  min-height: 44px; padding: 0 16px;
  font-weight: 500; font-size: .9375rem;
  border: 1px solid rgba(255, 255, 255, .55); color: var(--bianco);
  transition: background-color .2s ease, color .2s ease, border-color .2s ease, transform .16s var(--esce);
}
.consenso__bottone:hover { background: var(--bianco); border-color: var(--bianco); color: var(--nero); }
.consenso__bottone--si { background: var(--rosso); border-color: var(--rosso); color: var(--bianco); }
.consenso__bottone--si:hover { background: #C40025; border-color: #C40025; }
.consenso__bottone:active { transform: scale(.97); }

.consenso__chiudi {
  position: absolute; top: calc(var(--d) + 6px); right: 6px;
  width: 44px; height: 44px; display: grid; place-items: center; color: var(--bianco);
}
.consenso__chiudi::before {
  content: ""; width: 12px; height: 12px; background: currentColor;
  clip-path: polygon(15% 0, 50% 35%, 85% 0, 100% 15%, 65% 50%, 100% 85%, 85% 100%, 50% 65%, 15% 100%, 0 85%, 35% 50%, 0 15%);
  transition: transform .3s var(--esce);
}
.consenso__chiudi:hover::before { transform: rotate(90deg); }

/* telefoni: a tutta larghezza, a filo dei bordi */
@media (max-width: 600px) {
  .consenso { --d: 10px; left: 10px; right: 10px; width: auto; bottom: max(10px, env(safe-area-inset-bottom)); padding: calc(var(--d) + 14px) 16px 16px; gap: 14px; }
  .consenso__testo { padding-right: 0; }
  .consenso__titolo { font-size: 1.1875rem; padding-right: 36px; }
}


/* ==========================================================================
   PAGINA LEGALE — privacy e cookie: stessa testata, indice fisso a sinistra, testo a destra
   ========================================================================== */
.legale-testata .testata__torna {
  margin-left: auto; display: inline-flex; align-items: center; gap: 10px;
  text-decoration: none; font-weight: 500; font-size: .9375rem; padding: 12px 0;
}
.legale-testata .testata__torna svg { width: 18px; height: 18px; transform: rotate(180deg); transition: transform .3s var(--esce); }
.legale-testata .testata__torna:hover svg { transform: rotate(180deg) translateX(4px); }

.legale { padding: calc(var(--testata) + clamp(56px, 9vw, 140px)) var(--margine) var(--sezione); }
.legale__testa { display: grid; gap: 22px; justify-items: start; max-width: 62rem; padding-bottom: clamp(48px, 7vw, 96px); }
.legale__testa .titolone { font-size: clamp(2.75rem, 1.2rem + 6vw, 6.5rem); }
.legale__data { color: var(--grigio); font-size: .9375rem; }

/* in breve: tre fatti su fondo rosso, col tetto a shed in cima */
.breve {
  --d: clamp(14px, 2.2vw, 28px);
  background: var(--rosso);
  padding: calc(var(--d) + clamp(24px, 3.4vw, 48px)) clamp(20px, 3.4vw, 48px) clamp(24px, 3.4vw, 48px);
  clip-path: polygon(0 var(--d), 33.333% 0, 33.333% var(--d), 66.667% 0, 66.667% var(--d), 100% 0, 100% 100%, 0 100%);
  margin-bottom: clamp(64px, 9vw, 128px);
}
.breve h2 { font-size: .9375rem; font-weight: 500; margin-bottom: 22px; }
.breve ul { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px clamp(24px, 3vw, 48px); }
.breve li { border-top: 1px solid rgba(255, 255, 255, .55); padding-top: 16px; }
.breve b { display: block; font-family: var(--titoli); font-weight: 400; font-size: clamp(1.5rem, 1rem + 1.4vw, 2.25rem); letter-spacing: -.04em; line-height: 1.04; margin-bottom: 10px; }
.breve span { font-size: .9375rem; line-height: 1.45; display: block; max-width: 34ch; }

.legale__corpo { display: grid; grid-template-columns: minmax(180px, 1fr) minmax(0, 2.4fr); gap: clamp(32px, 6vw, 112px); align-items: start; }
.legale__indice { position: sticky; top: calc(var(--testata) + 32px); }
.legale__indice p { font-size: .875rem; font-weight: 500; color: var(--grigio); margin-bottom: 14px; }
.legale__indice ol { display: grid; border-top: 1px solid var(--filo); }
.legale__indice a {
  display: block; padding: 11px 0; border-bottom: 1px solid var(--filo);
  text-decoration: none; font-weight: 500; font-size: .9375rem;
  background: linear-gradient(var(--rosso), var(--rosso)) 0 100% / 0 2px no-repeat;
  transition: background-size .35s var(--esce), color .2s ease;
}
.legale__indice a:hover, .legale__indice a[aria-current="true"] { background-size: 100% 2px; }

.legale__testo { max-width: 68ch; }
.legale__testo section { padding-bottom: clamp(48px, 6vw, 80px); scroll-margin-top: calc(var(--testata) + 24px); }
.legale__testo h2 { font-family: var(--titoli); font-weight: 400; font-size: clamp(1.75rem, 1.1rem + 1.8vw, 2.75rem); line-height: 1.04; letter-spacing: -.04em; margin-bottom: 22px; text-wrap: balance; }
.legale__testo h3 { font-size: 1.0625rem; font-weight: 700; margin: 28px 0 8px; }
.legale__testo p, .legale__testo li { color: #D6D4D0; }
.legale__testo p + p { margin-top: 1em; }
.legale__testo ul { display: grid; gap: 10px; margin: 1em 0; }
.legale__testo ul li { position: relative; padding-left: 26px; }
.legale__testo ul li::before { content: ""; position: absolute; left: 0; top: .5em; width: 12px; height: 9px; background: var(--rosso); clip-path: polygon(0 100%, 100% 0, 100% 100%); }
.legale__testo strong { color: var(--bianco); font-weight: 500; }
.legale__testo a { color: var(--bianco); text-underline-offset: 4px; text-decoration-color: var(--rosso); text-decoration-thickness: 2px; overflow-wrap: anywhere; }
.legale__testo a:hover { text-decoration-thickness: 4px; }
.legale__testo code { font-family: inherit; font-weight: 500; color: var(--bianco); background: rgba(255, 255, 255, .08); padding: 1px 6px; }


/* tabella dei dati: su telefono ogni riga diventa una scheda */
.legale__tabella { width: 100%; border-collapse: collapse; margin: 1.4em 0; font-size: .9375rem; }
.legale__tabella th, .legale__tabella td { text-align: left; vertical-align: top; padding: 14px 16px 14px 0; border-bottom: 1px solid var(--filo); }
.legale__tabella thead th { font-size: .8125rem; font-weight: 500; color: var(--grigio); border-bottom-color: rgba(255, 255, 255, .45); }
.legale__tabella tbody th { font-weight: 500; color: var(--bianco); }
.legale__tabella td { color: #D6D4D0; }

/* le tue scelte: riquadro con il bordo dei tasti */
.scelte { border: 1px solid var(--filo); padding: clamp(20px, 3vw, 32px); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px 32px; margin-top: 1.4em; }
.scelte__stato { display: grid; gap: 6px; }
.scelte__stato b { font-weight: 500; color: var(--bianco); }
.scelte__stato span { color: var(--grigio); font-size: .9375rem; }
.scelte__stato span::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 8px; background: var(--spento); vertical-align: 1px; }
.scelte.is-attivo .scelte__stato span::before { background: var(--rosso); }
.scelte.is-negato .scelte__stato span::before { background: var(--bianco); }
.scelte__azioni { display: flex; flex-wrap: wrap; gap: 10px; }
.scelte .bottone--spento { color: var(--bianco); border-color: rgba(255, 255, 255, .45); }
.scelte .bottone--spento:hover { background: var(--bianco); color: var(--nero); }
.scelte .bottone[aria-pressed="true"] { pointer-events: none; opacity: .4; }

.legale-piede { padding: 0 var(--margine) 32px; }
.legale-piede .piede__fondo { border-top: 1px solid rgba(255, 255, 255, .45); }
.legale-piede .piede__logo { --logo-testo: var(--nero); }

@media (max-width: 860px) {
  .legale__corpo { grid-template-columns: minmax(0, 1fr); }
  .legale__indice { position: static; }
  .legale__indice ol { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 20px; }
  .breve ul { grid-template-columns: minmax(0, 1fr); gap: 20px; }
}
@media (max-width: 600px) {
  .legale__tabella thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .legale__tabella, .legale__tabella tbody, .legale__tabella tr, .legale__tabella th, .legale__tabella td { display: block; }
  .legale__tabella tr { border-bottom: 1px solid var(--filo); padding: 14px 0; }
  .legale__tabella th, .legale__tabella td { border: 0; padding: 2px 0; }
  .legale__tabella td::before { content: attr(data-voce) ": "; color: var(--grigio); font-size: .8125rem; }
  .legale__indice ol { grid-template-columns: minmax(0, 1fr); }
  .scelte__azioni { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
}

/* ==========================================================================
   LOADER — marchio, barra, percentuale; esce salendo come una serranda
   ========================================================================== */
.carica { display: none; }
.in-carica { overflow: hidden; }
.in-carica .carica {
  position: fixed; inset: 0; z-index: 100;
  display: grid; place-content: center; justify-items: center; gap: 28px;
  background: var(--nero);
  clip-path: inset(0 0 0 0);
  transition: clip-path .9s var(--muove);
}
.carica.is-fatto { clip-path: inset(0 0 100% 0); pointer-events: none; }
.carica__logo { width: clamp(72px, 7vw, 96px); height: auto; color: var(--bianco); }
.carica__barra { width: clamp(140px, 14vw, 200px); height: 2px; background: #2C2C2C; overflow: hidden; }
.carica__barra i { display: block; height: 100%; background: var(--rosso); transform: scaleX(0); transform-origin: left; }
.carica__num { font-size: .875rem; font-weight: 500; color: var(--grigio); font-variant-numeric: tabular-nums; min-width: 4ch; text-align: center; }

/* ==========================================================================
   MOVIMENTO RIDOTTO
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  .grana::before, .hero__media img, .banda__nastro { animation: none !important; }
  .banda__nastro { width: auto; flex-wrap: wrap; justify-content: center; }
  .hero__denti { display: none; }
  *, *::before, *::after { transition-duration: .01ms !important; }
  .player[open] *, .player[open]::backdrop, .piede__su svg { animation: none !important; }
}
