/* Proposta "monitor": al posto del cerchio c'è il monitor della camera, come sul set.
   Dentro gira il video in penombra; attorno i dati camera, le linee del 2.39, gli angoli del [7] e il focus peaking lime.
   Si appoggia a coming-soon/cs.css e cs.js (countdown, REC, timecode, terminale, pulsante del movimento). */

.readout { display: none !important; }            /* i dati camera adesso sono nel monitor */
.status { align-self: center; }

.monitor {
  position: relative; width: 100%; aspect-ratio: 16 / 9; overflow: hidden; container-type: inline-size;
  background: #000; border: 1px solid var(--rule);
  box-shadow: 0 0 0 1px #000, 0 30px 90px rgba(0, 0, 0, .65);
  --lb: 12.8%;                                    /* fasce del 2.39:1 dentro il 16:9: (1 - 1.7778 / 2.39) / 2 */
  --mfont: max(8px, 1.45cqw);
}
.monitor__video, .monitor__peak { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; max-width: none; }
.monitor__video { opacity: 0; transition: opacity 1.2s ease; }
.monitor.is-live .monitor__video.is-on { opacity: 1; }
.monitor.is-cut .monitor__video { transition: none; }
.monitor__peak { pointer-events: none; opacity: 0; transition: opacity .6s ease; }
.monitor.is-live .monitor__peak { opacity: 1; }

/* formato 2.39: fuori dalle linee il monitor è ombreggiato, come le guide della camera */
.monitor__mask { position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to bottom, rgba(0, 0, 0, .62) 0 var(--lb), transparent var(--lb) calc(100% - var(--lb)), rgba(0, 0, 0, .62) calc(100% - var(--lb))); }
.monitor__mask::before, .monitor__mask::after { content: ""; position: absolute; left: 0; right: 0; height: 1px; background: rgba(236, 237, 238, .28); }
.monitor__mask::before { top: var(--lb); }
.monitor__mask::after { bottom: var(--lb); }

/* gli angoli del [7] come guide dell'inquadratura */
.monitor__frame { position: absolute; left: 3.5%; right: 3.5%; top: calc(var(--lb) + 4%); bottom: calc(var(--lb) + 4%); width: 93%; height: auto; overflow: visible; pointer-events: none; opacity: 0; transition: opacity .6s ease .3s; }
.monitor__frame path { fill: none; stroke: var(--lime); stroke-width: 3; vector-effect: non-scaling-stroke; }
.monitor.is-live .monitor__frame { opacity: 1; }
.monitor__cross { position: absolute; left: 50%; top: 50%; width: 18px; height: 18px; translate: -50% -50%; pointer-events: none; opacity: 0; transition: opacity .6s ease .3s; }
.monitor__cross::before, .monitor__cross::after { content: ""; position: absolute; background: rgba(236, 237, 238, .55); }
.monitor__cross::before { left: 50%; top: 0; bottom: 0; width: 1px; }
.monitor__cross::after { top: 50%; left: 0; right: 0; height: 1px; }
.monitor.is-live .monitor__cross { opacity: 1; }

/* dati camera nelle due fasce */
.monitor__top, .monitor__bottom {
  position: absolute; left: 0; right: 0; height: var(--lb); padding: 0 2.4%;
  display: flex; align-items: center; justify-content: space-between; gap: 1.6%;
  font: 500 var(--mfont)/1 var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--ink);
  font-variant-numeric: tabular-nums; white-space: nowrap; pointer-events: none;
}
.monitor__top { top: 0; }
.monitor__bottom { bottom: 0; }
.monitor__top .tc { margin-left: auto; min-width: 0; text-align: right; }
.monitor__top .clip { color: var(--mute); }
.monitor .rec { display: inline-flex; align-items: center; gap: .6em; }
.monitor .rec-dot { width: .75em; height: .75em; }
.monitor .rec-label { color: var(--lime); }
.monitor__bottom .focus b { font-weight: 500; color: var(--lime); }
.monitor__bottom .bat::before { content: ""; display: inline-block; width: 1.5em; height: .75em; margin-right: .45em; vertical-align: -.05em; border: 1px solid currentColor; background: linear-gradient(to right, var(--ink) 0 70%, transparent 70%) 1px 1px / calc(100% - 2px) calc(100% - 2px) no-repeat; }
/* senza movimento il timecode resta visibile ma fermo */
:root:not(.motion) .monitor .tc { display: inline; }

/* misuratori audio a destra */
.monitor__meters { position: absolute; right: 1.6%; top: calc(var(--lb) + 9%); bottom: calc(var(--lb) + 9%); display: flex; gap: 3px; pointer-events: none; opacity: 0; transition: opacity .6s ease .3s; }
.monitor.is-live .monitor__meters { opacity: 1; }
.monitor__meters i { width: max(3px, .45cqw); height: 100%; background: rgba(236, 237, 238, .12); position: relative; overflow: hidden; }
.monitor__meters i::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 100%; transform-origin: 50% 100%; transform: scaleY(var(--lvl, .08));
  background: linear-gradient(to top, var(--lime) 0 70%, #FFD400 70% 88%, #FF5A3C 88%); }

/* countdown e [7] all'inizio, al centro del monitor */
.monitor .leader { position: absolute; left: 50%; top: 50%; translate: -50% -50%; --leader: 40cqw; transition: opacity .7s ease; }
.monitor.is-live .leader { opacity: 0; pointer-events: none; }

/* fuori dal container queries: su monitor stretti meno dati */
@container (max-width: 520px) { .monitor__bottom .opt { display: none; } }
@container (max-width: 380px) { .monitor__top .clip, .monitor__meters { display: none; } }

.stage__screen { width: 100%; max-width: 760px; }

/* il terminale dentro il monitor, come un sottotitolo */
.monitor .terminal {
  position: absolute; z-index: 3; left: 6%; right: 6%; bottom: calc(var(--lb) + 6%); margin: 0; min-height: 0;
  font-size: max(10px, 1.85cqw); line-height: 1.35; text-align: center; pointer-events: none;
  text-shadow: 0 0 10px rgba(198, 255, 0, .45), 0 1px 2px rgba(0, 0, 0, .9);
}

/* colonna sonora: pulsante nel piede, accanto a Motion; il player compare in basso a destra */
.soundtrack__btn {
  display: inline-flex; align-items: center; gap: .7em; padding: 6px 0; margin: 0; background: none; border: 0; color: var(--mute);
  font: 500 var(--t-label)/1.4 var(--f-mono); letter-spacing: .14em; text-transform: uppercase; white-space: nowrap;
}
.soundtrack__btn::before { content: "[\00a0"; }
.soundtrack__btn::after { content: "\00a0]"; }
.soundtrack__btn:hover, .soundtrack__btn:focus-visible, .soundtrack__btn[aria-expanded="true"] { color: var(--lime); }
.soundtrack__icon { display: inline-block; width: 13px; height: 11px;
  background: linear-gradient(var(--lime), var(--lime)) 0 100% / 3px 40% no-repeat, linear-gradient(var(--lime), var(--lime)) 5px 100% / 3px 80% no-repeat, linear-gradient(var(--lime), var(--lime)) 10px 100% / 3px 55% no-repeat; }
.motion .is-playing .soundtrack__icon { animation: eq .9s steps(4) infinite; }
@keyframes eq {
  0% { background-size: 3px 40%, 3px 80%, 3px 55%; } 25% { background-size: 3px 90%, 3px 35%, 3px 70%; }
  50% { background-size: 3px 55%, 3px 100%, 3px 30%; } 75% { background-size: 3px 75%, 3px 50%, 3px 95%; }
}
.soundtrack__player { position: fixed; z-index: 45; right: max(var(--pad-x), 16px); bottom: calc(var(--pad-y) + 58px); width: min(380px, calc(100vw - 32px)); }
.soundtrack__player:empty { display: none; }
.soundtrack__player iframe { display: block; width: 100%; height: 80px; border: 0; border-radius: 12px; box-shadow: 0 18px 50px rgba(0, 0, 0, .6); }
.soundtrack__note, .soundtrack__todo { margin-top: 6px; font: 400 .625rem/1.4 var(--f-mono); letter-spacing: .08em; color: var(--mute); text-align: right; }

/* telefoni: tutto in uno schermo, il messaggio si legge senza scorrere */
@media (max-width: 759px) {
  .stage { gap: clamp(16px, 3svh, 28px); padding-block: clamp(12px, 2svh, 22px); }
  .stage__copy { gap: clamp(18px, 3svh, 30px); }
  .copy { gap: 10px; }
  .lede { display: none; }
  .title { font-size: clamp(1.45rem, .3rem + 5.8vw, 2.5rem); }
  .bottom { gap: 8px; padding-top: 12px; }
  .legal { font-size: .625rem; }
}
@media (max-width: 759px) and (min-height: 820px) { .lede { display: block; } }
@media (max-width: 419px) { .claim { display: none; } .bottom__end { gap: 14px; } }

/* tablet in orizzontale: testo e monitor affiancati già da 760 px */
@media (min-width: 760px) and (max-width: 959px) and (orientation: landscape) {
  .stage { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); align-items: center; justify-items: stretch; column-gap: 28px; }
  .stage__screen { order: 2; }
  .stage__copy { order: 1; justify-items: start; text-align: left; align-content: center; gap: 28px; }
  .copy, .cta { justify-items: start; }
  .cta__links { justify-content: flex-start; }
  .title { font-size: clamp(1.5rem, 3.9vw, 2.4rem); line-height: 1.12; }
  .lede { display: none; }
  .cta__mail { font-size: clamp(1rem, 2.2vw, 1.25rem); }
}

/* desktop: il monitor prende un po' più spazio del testo */
@media (min-width: 960px) {
  .stage { grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr); }
  .stage__screen { width: 100%; max-width: calc((100svh - 260px) * 16 / 9); justify-self: center; }
  .title { font-size: clamp(1.75rem, min(3.4vw, 8.2svh), 5rem); }
}
