/* ==========================================================================
   Sense Inclusion Platform — restyling ispirato al design system Runway
   (awesome-design-md / runwayml / DESIGN.md)

   Estetica editoriale da festival del cinema: nero pieno, interfaccia quasi
   invisibile, nessuna ombra e nessuna sfumatura. Il colore arriva solo dalle
   locandine. Un unico carattere per tutto, titoli a peso 400 con interlinea
   1.0 e tracking negativo, come titoli di testa. Grigi freddi per il testo
   secondario, etichette maiuscole spaziate come segnaletica.

   Adattamenti per l'accessibilità (pubblico ipovedente / sordo):
   - testo base a 17px, misure in rem (zoom 200% senza perdite);
   - grigi freddi schiariti per restare ≥ 7:1 su nero (AAA);
   - comandi alti almeno 44px, anello di fuoco bianco da 3px;
   - Inter come sostituto libero di abcNormal (indicato dal DESIGN.md).
   ========================================================================== */

:root {
  /* Superfici */
  --black:   #000000;   /* fondo pagina */
  --deep:    #030303;
  --surface: #0D0D0D;   /* campi, contenitori */
  --raised:  #1A1A1A;   /* card scure, hover */
  --line:    #27272A;   /* l'unico bordo scuro */
  --line-2:  #3F3F46;   /* bordo di campi e pulsanti secondari */

  /* Testo */
  --white:   #FFFFFF;
  --slate:   #A1A8B3;   /* grigio freddo: 8.4:1 su nero */
  --muted:   #A7A7A7;   /* grigio neutro: 8.9:1 su nero */

  /* Fascia chiara di lettura */
  --cloud:   #E9ECF2;
  --charcoal:#404040;

  /* Semantici, usati solo come segnale */
  --negative: #FF8A8A;
  --positive: #7EE2A8;
  --warning:  #F5C46B;

  /* Alias dei vecchi token */
  --ink: var(--black); --ink-2: var(--surface); --ink-3: var(--raised); --ink-4: var(--raised);
  --paper: var(--white); --dim: var(--slate);
  --amber: var(--white); --amber-2: #E5E5E5; --amber-3: #C9CCD1; --amber-ink: #000; --amber-soft: rgba(255,255,255,0.12);
  --danger: var(--negative); --ok: var(--positive);

  --sans: "Inter", "Helvetica Neue", Helvetica, Arial, system-ui, sans-serif;
  --display: var(--sans);
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;

  --step-0: 1.0625rem;
  --step-1: 1.25rem;
  --step-2: 2rem;
  --step-3: 2.75rem;
  --step-4: clamp(3rem, 1.6rem + 5vw, 6rem);

  --pad: clamp(1.25rem, 4vw, 3rem);
  --r-sm: 0.25rem;     /* 4px: pulsanti */
  --r: 0.5rem;         /* 8px: immagini, contenitori */
  --r-lg: 1rem;        /* 16px: avvisi */
  --tap: 2.75rem;
  --wrap: 100rem;      /* larghezza "cinema" */
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--black);
  color: var(--white);
  font-family: var(--sans);
  font-size: var(--step-0);
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: -0.01em;
  text-underline-offset: 0.22em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "ss01", "cv11";
}

img { max-width: 100%; height: auto; display: block; }

h1, h2, h3 { font-weight: 400; line-height: 1.02; margin: 0 0 0.5em; text-wrap: balance; overflow-wrap: anywhere; }
h1 { font-size: var(--step-3); letter-spacing: -0.035em; }
h2 { font-size: var(--step-2); letter-spacing: -0.03em; margin-top: 3.5rem; }
h3 { font-size: var(--step-1); letter-spacing: -0.015em; }
p  { margin: 0 0 1rem; }
p:last-child { margin-bottom: 0; }
strong, b { font-weight: 600; }

a { color: var(--white); text-decoration-thickness: 1px; overflow-wrap: anywhere; }
a:hover { text-decoration-thickness: 2px; }

.mono { font-family: var(--mono); font-size: 0.9em; }
.break { overflow-wrap: anywhere; }
.block { display: block; }
.muted { color: var(--slate); }
.warn { color: var(--negative); font-weight: 600; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px;
  padding: 0; border: 0; overflow: hidden; white-space: nowrap;
  clip: rect(0 0 0 0); clip-path: inset(50%);
}
[hidden] { display: none !important; }

/* --- fuoco --------------------------------------------------------------- */

:focus { outline: none; }
:focus-visible { outline: 3px solid var(--white); outline-offset: 3px; border-radius: var(--r-sm); }
.card__link:focus-visible { outline-offset: 6px; border-radius: var(--r); }
/* il contenitore principale riceve il fuoco dal codice: niente cornice */
main[tabindex="-1"]:focus, main[tabindex="-1"]:focus-visible { outline: none; }

.skip {
  position: absolute; left: 1rem; top: -4rem; z-index: 100;
  background: var(--white); color: #000;
  padding: 0.75rem 1.25rem; border-radius: var(--r-sm);
  font-weight: 600; text-decoration: none;
  transition: top 0.15s ease;
}
.skip:focus { top: 0.75rem; color: #000; }

/* --- impianto ------------------------------------------------------------ */

.wrap { width: min(100% - 2 * var(--pad), var(--wrap)); margin-inline: auto; }
.page {
  width: min(100% - 2 * var(--pad), var(--wrap));
  margin: 0 auto;
  padding: 2.5rem 0 5rem;
  min-width: 0;
}
.page--narrow { max-width: 46rem; }

/* etichetta di sezione: maiuscolo, spaziato, grigio freddo */
.eyebrow, .demo-studio, .results, .table thead th, .slot__code, .demo-slots .mono, .credits__intro {
  font-family: var(--sans); text-transform: uppercase; letter-spacing: 0.06em;
}
.eyebrow { font-size: 0.875rem; font-weight: 500; color: var(--slate); margin-bottom: 1rem; }

.lede { font-size: var(--step-1); max-width: 60ch; }
.hint { color: var(--slate); font-size: 0.9375rem; max-width: 68ch; }
.results { color: var(--slate); font-size: 0.8125rem; font-weight: 500; }

/* --- targa AD · ST ------------------------------------------------------- */

.plate {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-weight: 500; font-size: 0.8125rem; letter-spacing: 0.12em;
  color: var(--white); border: 1px solid var(--white);
  border-radius: var(--r-sm); padding: 0.2rem 0.55rem; margin: 0;
}
.plate--big { font-size: 1rem; padding: 0.35rem 0.8rem; }
.plate--legend { background: var(--white); color: #000; }

/* --- barra superiore: invisibile, orizzontale ---------------------------- */

.topbar { background: var(--black); border-bottom: 1px solid var(--line); }
.topbar__inner {
  width: min(100% - 2 * var(--pad), var(--wrap)); margin-inline: auto;
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 2rem;
  padding: 1rem 0;
}
.brand { display: flex; align-items: center; gap: 0.7rem; text-decoration: none; color: var(--white); }
.brand .marchio { color: var(--white); width: 2rem; height: 2rem; }
.brand__text { display: flex; flex-direction: column; }
.brand__name { font-weight: 500; letter-spacing: -0.02em; font-size: 1.125rem; line-height: 1.1; }
.brand__claim { color: var(--slate); font-size: 0.8125rem; line-height: 1.3; }

.nav { margin-inline-start: auto; }
.nav__list { display: flex; flex-wrap: wrap; gap: 0.25rem 1.75rem; list-style: none; margin: 0; padding: 0; }
.nav__list a {
  display: inline-flex; align-items: center; min-height: var(--tap);
  color: var(--muted); text-decoration: none; font-weight: 500; font-size: 1rem;
  border-bottom: 1px solid transparent;
  transition: color .15s ease, border-color .15s ease;
}
.nav__list a:hover { color: var(--white); border-bottom-color: var(--white); }
.nav__list a[aria-current="page"] { color: var(--white); border-bottom-color: var(--white); }

.topbar__exit, .demo-exit { display: flex; align-items: center; gap: 1rem; margin: 0; padding-left: 1.75rem; border-left: 1px solid var(--line); }
.topbar__who, .demo-exit > span { color: var(--slate); font-size: 0.9375rem; }
.demo-exit .btn, .topbar__exit .btn { min-height: 2.5rem; padding-inline: 1rem; font-size: 0.9375rem; }

/* --- pulsanti: rettangoli sobri, raggio 4px ------------------------------ */

.btn, button {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: var(--tap); padding: 0.55rem 1.25rem;
  border: 1px solid transparent; border-radius: var(--r-sm);
  font: inherit; font-size: 1rem; font-weight: 600; letter-spacing: -0.01em;
  line-height: 1.2; text-align: center; text-decoration: none; white-space: normal;
  cursor: pointer;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.btn--primary { background: var(--white); color: #000; }
.btn--primary:hover { background: #D9D9D9; color: #000; }
.btn--ghost, .btn--quiet { background: transparent; color: var(--white); border-color: var(--line-2); }
.btn--ghost:hover, .btn--quiet:hover { border-color: var(--white); color: var(--white); background: var(--raised); }
.btn--danger { background: var(--negative); color: #000; }
.btn--danger:hover { background: #FFA8A8; color: #000; }
.btn--disabled { background: var(--surface); color: var(--slate); border-color: var(--line); cursor: not-allowed; }
.btn--big { min-height: 3.25rem; padding-inline: 1.75rem; }

/* --- messaggi: contenitori "alert" bordati, raggio 16px ------------------ */

.flash, .notice {
  background: var(--deep); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 1.1rem 1.35rem; margin: 1.5rem 0;
  max-width: 72ch; color: var(--white);
}
.flash--ok { border-color: var(--positive); }
.flash--error { border-color: var(--negative); }
.flash--info, .notice--access { border-color: var(--white); }
.notice strong { font-weight: 600; }

.empty { border: 1px dashed var(--line-2); border-radius: var(--r-lg); padding: 2.5rem; text-align: center; color: var(--slate); }
.empty p:last-child { margin-top: 1rem; }

/* --- accesso ------------------------------------------------------------- */

.gate { min-height: calc(100vh - 3.5rem); display: grid; place-items: center; padding: 3rem 1.25rem; background: var(--black); }
.gate__panel {
  width: min(100%, 34rem);
  border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: clamp(1.5rem, 5vw, 3rem);
  background: var(--black);
}
.gate__logo { margin-bottom: 2rem; color: var(--white); }
.gate__logo .marchio { color: var(--white); width: 2.75rem; height: 2.75rem; }
.gate__title { font-size: clamp(2.25rem, 1.6rem + 2.5vw, 3rem); letter-spacing: -0.04em; line-height: 1; }
.gate__intro { color: var(--slate); margin-bottom: 1.5rem; }
.gate__links { margin-top: 1.25rem; }
.gate__note { color: var(--slate); font-size: 0.9375rem; margin-top: 0.75rem; }
.gate .formactions .btn { flex: 1 1 12rem; }
.gate form .btn--primary, .gate form > [data-action="show-password"] { width: 100%; }
.gate form .btn--primary { margin-bottom: 0.6rem; }

/* --- moduli -------------------------------------------------------------- */

.form { margin-top: 1.75rem; }
.form--panel { border: 1px solid var(--line); border-radius: var(--r-lg); padding: clamp(1.25rem, 3vw, 2.25rem); }

fieldset { border: 0; border-top: 1px solid var(--line); margin: 0 0 2rem; padding: 1.75rem 0 0; min-width: 0; }
fieldset:first-of-type { border-top: 0; padding-top: 0; }
legend { font-weight: 400; font-size: 1.5rem; letter-spacing: -0.025em; line-height: 1.1; padding: 0; margin-bottom: 1rem; }

.field { margin-bottom: 1.25rem; min-width: 0; }
.field label { display: block; font-weight: 500; font-size: 0.9375rem; margin-bottom: 0.45rem; }
.field .hint { margin-top: 0.4rem; margin-bottom: 0; }

input[type="text"], input[type="email"], input[type="password"], input[type="search"],
input[type="number"], select, textarea {
  width: 100%; max-width: 100%; min-width: 0; min-height: 3rem;
  padding: 0.65rem 0.85rem;
  background: var(--surface); color: var(--white);
  border: 1px solid var(--line-2); border-radius: var(--r-sm);
  font: inherit; font-size: 1rem;
  transition: border-color .15s ease;
}
input[type="search"] {
  padding-left: 2.75rem;
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23A1A8B3' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='10.5' cy='10.5' r='7'/%3E%3Cpath d='m16 16 5.5 5.5'/%3E%3C/svg%3E") 0.9rem center / 1.15rem no-repeat;
}
select {
  appearance: none; -webkit-appearance: none; padding-right: 2.75rem;
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FFFFFF' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") right 0.85rem center / 1.1rem no-repeat;
}
textarea { min-height: 7rem; resize: vertical; }
input:hover, select:hover, textarea:hover { border-color: var(--slate); }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid var(--white); outline-offset: 2px; border-color: var(--white); }
input[aria-invalid="true"] { border-color: var(--negative); }
::placeholder { color: var(--slate); opacity: 1; }

input[type="file"] {
  width: 100%; padding: 0.6rem;
  background: var(--surface); color: var(--slate);
  border: 1px dashed var(--line-2); border-radius: var(--r);
  font: inherit; font-size: 0.9375rem;
}
input[type="file"]::file-selector-button {
  font: inherit; font-weight: 600; margin-right: 0.9rem;
  min-height: 2.5rem; padding: 0 1rem; cursor: pointer;
  background: var(--white); color: #000; border: 0; border-radius: var(--r-sm);
}

.field__toggle {
  margin-top: 0.5rem; min-height: 2.5rem; padding: 0 0.9rem;
  background: transparent; color: var(--white);
  border: 1px solid var(--line-2); border-radius: var(--r-sm);
  font: inherit; font-size: 0.9375rem; font-weight: 500; cursor: pointer;
}

.check { display: flex; align-items: flex-start; gap: 0.75rem; margin-bottom: 0.9rem; }
.check input { width: 1.5rem; height: 1.5rem; margin-top: 0.05rem; accent-color: var(--white); flex: none; }
.check label { font-weight: 500; }

.grid2, .demo-fields { display: grid; gap: 0 1.25rem; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); }
.formactions { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; }
.page > .formactions:first-child { margin-bottom: 2rem; }

/* --- film in evidenza: titolo di testa ----------------------------------- */

.demo-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
  padding: clamp(2rem, 5vw, 4.5rem) 0 clamp(3rem, 6vw, 5.5rem);
  border-bottom: 1px solid var(--line);
}
.demo-hero h1 { font-size: var(--step-4); line-height: 0.95; letter-spacing: -0.055em; margin-bottom: 1.5rem; }
.demo-hero p { max-width: 48ch; font-size: var(--step-1); line-height: 1.45; color: var(--white); }
.demo-hero .formactions { margin-top: 2rem; }
.demo-hero p.hint {
  display: inline-flex; align-items: center; gap: 0.6rem; margin-top: 1.5rem;
  font-size: 0.875rem; color: var(--slate);
}
.demo-hero p.hint::before {
  content: "AD · ST"; font-size: 0.75rem; font-weight: 500; letter-spacing: 0.12em;
  color: var(--white); border: 1px solid var(--white); border-radius: var(--r-sm); padding: 0.1rem 0.45rem;
}
.demo-hero-poster, .demo-hero > img {
  width: 100%; max-width: 26rem; max-height: none; height: auto;
  justify-self: end; object-fit: cover;
  border-radius: var(--r); box-shadow: none;
}
.demo-hero > .demo-art { max-width: 26rem; justify-self: end; }

.hero { position: relative; border-bottom: 1px solid var(--line); }
.hero__cover { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.5; }
.hero__body { position: relative; padding: clamp(3rem, 6vw, 6rem) 0; background: rgba(0,0,0,0.6); }
.hero__title { font-size: var(--step-4); font-weight: 400; line-height: 0.95; letter-spacing: -0.05em; max-width: 16ch; }
.hero__meta { color: var(--slate); font-size: 0.875rem; text-transform: uppercase; letter-spacing: 0.06em; }
.hero__synopsis { max-width: 50ch; font-size: var(--step-1); }
.hero__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 2rem 0 1rem; }

/* --- ricerca ------------------------------------------------------------- */

.finder { margin: 3.5rem 0 0; }
.finder h2 { margin-top: 0; }
.pagetitle { margin-top: 2.5rem; margin-bottom: 0; }
.finder form, .finder__form { border-top: 1px solid var(--line); padding-top: 1.5rem; }
.demo-search-fields, .finder__filters { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 0 1.25rem; }
.finder__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }

/* --- catalogo: locandine come card --------------------------------------- */

.strip { margin-top: 4.5rem; }
.strip h2 { margin: 0 0 0.75rem; }
.grid {
  list-style: none; margin: 2rem 0 0; padding: 0;
  display: grid; gap: 3rem 1.5rem;
  grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr));
}
.grid > li { display: flex; }

.card { display: flex; flex-direction: column; width: 100%; height: 100%; }
.card__link { display: flex; flex-direction: column; gap: 1rem; text-decoration: none; color: var(--white); flex: 1; }
.card__poster {
  display: block; position: relative; aspect-ratio: 2 / 3; overflow: hidden;
  background: var(--deep); border: 0; border-radius: var(--r); box-shadow: none;
}
.card__poster img { width: 100%; height: 100%; object-fit: cover; transition: opacity .25s ease, transform .5s ease; }
.card__link:hover .card__poster img { opacity: 0.82; transform: scale(1.03); }
.card__placeholder { position: absolute; inset: 0; display: grid; place-items: center; font-size: 1.5rem; color: var(--line-2); }
.card__body { display: flex; flex-direction: column; gap: 0.3rem; min-width: 0; }
.card__title { font-weight: 400; font-size: 1.25rem; line-height: 1.1; letter-spacing: -0.02em; }
.card__link:hover .card__title { text-decoration: underline; text-decoration-thickness: 1px; }
.card__meta { color: var(--slate); font-size: 0.9375rem; line-height: 1.35; }
.demo-studio { display: block; color: var(--slate); font-size: 0.75rem; font-weight: 500; line-height: 1.3; margin: 0; }
.demo-availability {
  margin: 0.9rem 0 0; padding: 0.7rem 0 0; border-top: 1px solid var(--line);
  color: var(--slate); font-size: 0.8125rem; line-height: 1.4;
}

.card__progress { display: flex; flex-direction: column; gap: 0.3rem; margin: 0; }
.bar { display: block; height: 2px; background: var(--line-2); overflow: hidden; }
.bar__fill { display: block; height: 100%; width: 0; background: var(--white); }
.card__remaining { color: var(--white); font-size: 0.8125rem; margin: 0.5rem 0 0; }

.demo-art {
  width: 100%; height: 100%; aspect-ratio: 2 / 3; min-height: 0;
  display: flex; flex-direction: column; justify-content: space-between; gap: 0.5rem;
  padding: 1.25rem;
  background: var(--raised); color: var(--white); border: 0; border-radius: var(--r);
  font-weight: 400; font-size: 1.5rem; line-height: 1.05; letter-spacing: -0.03em;
  overflow-wrap: anywhere;
}
.demo-art .demo-slot { color: var(--slate); font-size: 0.75rem; font-weight: 500; letter-spacing: 0.1em; }
.demo-art small { font-size: 0.8125rem; letter-spacing: 0; color: var(--slate); }
.demo-cover { aspect-ratio: 4 / 3; min-height: 18rem; font-size: 2.25rem; }

/* --- scheda del film ----------------------------------------------------- */

.banner { height: 28rem; overflow: hidden; border-radius: var(--r); background: var(--surface); }
.banner img { width: 100%; height: 100%; object-fit: cover; }
.demo-detail-cover { width: 100%; max-height: 30rem; object-fit: cover; margin-bottom: 2.5rem; border-radius: var(--r); }

.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; margin: 0 0 2.5rem; color: var(--slate); font-size: 0.9375rem; }
.crumbs .btn { min-height: 2.5rem; padding-inline: 1rem; font-size: 0.9375rem; }

.detail { display: grid; gap: clamp(2rem, 5vw, 4.5rem); grid-template-columns: minmax(0, 24rem) minmax(0, 1fr); align-items: start; }
.detail__poster img { border-radius: var(--r); width: 100%; }
.detail__noposter { aspect-ratio: 2 / 3; display: grid; place-items: center; background: var(--raised); border-radius: var(--r); color: var(--line-2); font-size: 2rem; }
.detail__main { min-width: 0; }
.detail__main h1 { font-size: var(--step-4); line-height: 0.95; letter-spacing: -0.055em; margin-bottom: 1.5rem; }
.detail__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 1.75rem 0 0.5rem; }
.detail__subtitle { margin-top: 3rem; }
.demo-synopsis { white-space: pre-wrap; font-size: var(--step-1); line-height: 1.45; max-width: 52ch; }

.facts { margin: 1.25rem 0 0; display: grid; gap: 0; max-width: 48rem; border-bottom: 1px solid var(--line); }
.facts > div { display: grid; grid-template-columns: minmax(9rem, 16rem) 1fr; gap: 1rem; padding: 0.9rem 0; border-top: 1px solid var(--line); }
.facts dt { color: var(--slate); }
.facts dd { margin: 0; font-weight: 500; }

/* --- area personale ------------------------------------------------------ */

.history { list-style: none; margin: 1.25rem 0 0; padding: 0; max-width: 48rem; border-bottom: 1px solid var(--line); }
.history__item, .history > li { padding: 0.9rem 0; border-top: 1px solid var(--line); }
.history__meta { display: block; color: var(--slate); font-size: 0.9375rem; }

/* --- amministrazione ----------------------------------------------------- */

.subnav { margin: 0 0 3rem; border-bottom: 1px solid var(--line); }
.subnav ul { display: flex; flex-wrap: wrap; gap: 0 2rem; list-style: none; margin: 0; padding: 0; }
.subnav a, .subnav .btn {
  display: inline-flex; align-items: center; min-height: 3rem; padding: 0;
  background: transparent; border: 0; border-bottom: 1px solid transparent; border-radius: 0;
  color: var(--muted); font-weight: 500; font-size: 1rem; text-decoration: none; margin-bottom: -1px;
}
.subnav a:hover { color: var(--white); border-bottom-color: var(--white); background: transparent; }
.subnav a[aria-current="page"] { color: var(--white); border-bottom-color: var(--white); }

.tiles, .demo-metrics {
  list-style: none; margin: 2.5rem 0; padding: 0;
  display: grid; gap: 0; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.tile, .demo-metrics > div {
  padding: 1.75rem 1.5rem 1.75rem 0; color: var(--slate); font-size: 0.9375rem;
  background: transparent; border: 0;
}
.demo-metrics > div + div, .tile + .tile { padding-left: 1.5rem; border-left: 1px solid var(--line); }
.tile__n, .demo-metrics strong {
  display: block; font-size: clamp(2.75rem, 2rem + 2.5vw, 4rem); font-weight: 400;
  letter-spacing: -0.05em; color: var(--white); line-height: 1; margin-bottom: 0.6rem;
}
.tile__l { display: block; color: var(--slate); font-size: 0.9375rem; }

.slotmap, .demo-slots {
  list-style: none; margin: 1.5rem 0 0; padding: 0;
  display: grid; gap: 1px; grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr));
  background: var(--line); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden;
}
.slot, .demo-slots li {
  display: flex; flex-direction: column; align-items: flex-start; gap: 0.6rem;
  background: var(--black); border: 0; border-radius: 0; padding: 1.1rem 1.15rem;
  transition: background .15s ease;
}
.slot:hover, .demo-slots li:hover { background: var(--surface); }
.demo-slots .mono { font-family: var(--sans); font-size: 0.75rem; font-weight: 500; color: var(--slate); }
.demo-slots a { justify-content: flex-start; text-align: left; white-space: normal; }
.demo-slots .muted { font-size: 0.875rem; }
.slot--published .slot__state { color: var(--positive); }
.slot--draft .slot__state { color: var(--warning); }
.slot--unavailable .slot__state { color: var(--negative); }
.slot__code { display: block; color: var(--slate); font-size: 0.75rem; }
.slot__title { display: block; font-weight: 500; }
.slot__title--free { color: var(--slate); font-weight: 400; }
.slot__state { display: block; color: var(--slate); font-size: 0.875rem; }

.demo-table { position: relative; overflow: auto; max-width: 100%; margin: 2rem 0; } /* contiene anche le etichette nascoste */
.demo-table .table { min-width: 42rem; }
.table { width: 100%; border-collapse: collapse; margin-top: 1rem; }
.table th, .table td { text-align: left; padding: 0.9rem 0.9rem 0.9rem 0; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table thead th { color: var(--slate); font-size: 0.75rem; font-weight: 500; }
.table tbody th { font-weight: 500; }
.table tbody tr:hover > * { background: var(--surface); }
.table--wide { display: block; overflow-x: auto; }
.table .btn { min-height: 2.5rem; padding-inline: 0.9rem; font-size: 0.9375rem; }

.state { font-weight: 500; }
.state--published, .state--active { color: var(--positive); }
.state--draft { color: var(--warning); }
.state--unavailable, .state--suspended, .state--revoked { color: var(--negative); }

.tag {
  display: inline-flex; align-items: center; min-height: 2.25rem;
  font-size: 0.75rem; font-weight: 500; text-transform: uppercase; letter-spacing: 0.08em;
  padding: 0.2rem 0.75rem; border: 1px solid var(--line-2); border-radius: var(--r-sm);
  color: var(--slate);
}
.tag--live { color: var(--positive); border-color: var(--positive); }

.rowactions { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.rowactions form { margin: 0; }
.userscell { font-weight: 400; }

.filelist { list-style: none; margin: 0.5rem 0 0; padding: 0; }
.filelist li { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; justify-content: space-between; padding: 0.7rem 0; border-top: 1px solid var(--line); }
.filelist form { margin: 0; }

.handover { border: 1px solid var(--white); border-radius: var(--r-lg); padding: 1.5rem; margin: 1.5rem 0; }
.handover__list { margin: 1rem 0; }
.handover__list > div { display: grid; grid-template-columns: minmax(9rem, 12rem) 1fr; gap: 1rem; padding: 0.5rem 0; }
.handover__list dt { color: var(--slate); }
.handover__list dd { margin: 0; }
.handover__list .big { font-size: var(--step-1); font-weight: 500; }

.danger { margin-top: 4rem; border: 1px solid var(--negative); border-radius: var(--r-lg); padding: 1.75rem; }
.danger h2 { margin-top: 0; color: var(--negative); }
.danger__form, .danger form { max-width: 28rem; }

.demo-protections { padding: 0; list-style: none; max-width: 60ch; border-bottom: 1px solid var(--line); }
.demo-protections li { margin: 0; padding: 0.85rem 0; border-top: 1px solid var(--line); }

.pager { display: flex; gap: 0.75rem; margin-top: 1.5rem; }

/* --- sala di proiezione e player ---------------------------------------- */

.theatre { min-height: 100vh; display: flex; flex-direction: column; background: #000; }
.theatre__bar { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; padding: 0.85rem var(--pad); border-bottom: 1px solid var(--line); }
.theatre__title { font-size: var(--step-1); margin: 0; flex: 1 1 auto; }
.theatre__kind { color: var(--slate); font-size: 0.75rem; font-weight: 500; text-transform: uppercase; letter-spacing: 0.1em; }
.theatre__stage { flex: 1; padding: var(--pad); }
.theatre__note { width: min(100%, 64rem); margin: 1.5rem auto 3rem; }

.player { width: 100%; max-width: var(--wrap); margin: 2rem 0 1.25rem; background: #000; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.player__video, .player video { width: 100%; aspect-ratio: 16 / 9; max-height: 75vh; background: #000; display: block; }

.controls { display: block; border-top: 1px solid var(--line); padding: 1.1rem clamp(1rem, 2.5vw, 1.5rem) 1.25rem; }
.controls > label[for="seek"] { display: block; font-size: 0.75rem; font-weight: 500; text-transform: uppercase; letter-spacing: 0.08em; color: var(--slate); }
#timing { margin: 0 0 0.9rem; font-variant-numeric: tabular-nums; font-size: 0.9375rem; color: var(--slate); }
#player-status { min-height: 1.5em; margin: 0.75rem 0 0; color: var(--slate); }
.controls__seek { margin-bottom: 0.5rem; }
.controls__row, .demo-player-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem; }
.controls__time { margin: 0 0.5rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.controls__volume { display: flex; align-items: center; gap: 0.6rem; }
.controls__volume label, .demo-player-actions > div label { color: var(--slate); font-size: 0.75rem; font-weight: 500; text-transform: uppercase; letter-spacing: 0.08em; display: block; }
.demo-player-actions .btn { min-height: 3rem; }
.demo-player-actions [data-action="play"]::before {
  content: ""; width: 0.85rem; height: 0.85rem; flex: none; background: currentColor;
  clip-path: polygon(10% 4%, 10% 96%, 94% 50%);
}
.demo-player-actions [data-action="play"][aria-pressed="true"]::before {
  clip-path: polygon(10% 4%, 38% 4%, 38% 96%, 10% 96%, 10% 4%, 62% 4%, 90% 4%, 90% 96%, 62% 96%, 62% 4%);
}
.demo-player-actions > div { flex: 1 1 10rem; max-width: 14rem; }

.ctl {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: 3rem; min-width: 3rem; padding: 0 1rem;
  background: transparent; color: var(--white);
  border: 1px solid var(--line-2); border-radius: var(--r-sm);
  font: inherit; font-weight: 600; cursor: pointer;
}
.ctl:hover { border-color: var(--white); }
.ctl--main { background: var(--white); color: #000; border-color: var(--white); }
.ctl--main:hover { background: #D9D9D9; }
.ctl__icon { width: 1.1rem; height: 1.1rem; flex: none; background: currentColor; }
.ctl__icon[data-icon="play"]  { clip-path: polygon(12% 4%, 12% 96%, 94% 50%); }
.ctl__icon[data-icon="pause"] { clip-path: polygon(12% 6%, 40% 6%, 40% 94%, 12% 94%, 12% 6%, 60% 6%, 88% 6%, 88% 94%, 60% 94%, 60% 6%); }
.ctl__icon[data-icon="back"]  { clip-path: polygon(50% 4%, 50% 96%, 4% 50%, 50% 50%, 96% 96%, 96% 4%, 50% 50%); }
.ctl__icon[data-icon="fwd"]   { clip-path: polygon(50% 4%, 50% 96%, 96% 50%, 50% 50%, 4% 96%, 4% 4%, 50% 50%); }
.ctl__icon[data-icon="sound"] { clip-path: polygon(4% 34%, 28% 34%, 56% 6%, 56% 94%, 28% 66%, 4% 66%); }
.ctl__icon[data-icon="muted"] { clip-path: polygon(4% 34%, 28% 34%, 56% 6%, 56% 94%, 28% 66%, 4% 66%); opacity: 0.45; }

.range, input[type="range"] {
  -webkit-appearance: none; appearance: none;
  width: 100%; min-height: 44px; height: 2.75rem;
  background: transparent; cursor: pointer; margin: 0;
}
.range--volume { width: 8rem; }
.range::-webkit-slider-runnable-track { height: 2px; background: var(--line-2); }
.range::-moz-range-track { height: 2px; background: var(--line-2); }
.range::-moz-range-progress { height: 2px; background: var(--white); }
.range::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 1.125rem; height: 1.125rem; margin-top: calc(-0.5625rem + 1px);
  background: var(--white); border: 0; border-radius: 50%;
}
.range::-moz-range-thumb { width: 1.125rem; height: 1.125rem; background: var(--white); border: 0; border-radius: 50%; }
.range:focus-visible { outline: 3px solid var(--white); outline-offset: 2px; }

.shortcuts { margin-top: 1.25rem; border: 1px solid var(--line); border-radius: var(--r); padding: 0.5rem 1.15rem; }
.shortcuts summary { cursor: pointer; font-weight: 500; min-height: var(--tap); display: flex; align-items: center; }
.shortcuts__list { margin: 0.5rem 0 1rem; }
.shortcuts__list > div { display: grid; grid-template-columns: minmax(11rem, 16rem) 1fr; gap: 1rem; padding: 0.5rem 0; border-top: 1px solid var(--line); }
.shortcuts__list dt { color: var(--white); font-family: var(--mono); font-size: 0.9375rem; }
.shortcuts__list dd { margin: 0; color: var(--slate); }

.player:fullscreen { display: flex; flex-direction: column; justify-content: center; background: #000; border: 0; border-radius: 0; }
.player:fullscreen .player__video, .player:fullscreen video { height: auto; max-height: calc(100vh - 12rem); aspect-ratio: auto; }
.player--embed { aspect-ratio: 16 / 9; }
.player__frame { width: 100%; height: 100%; border: 0; display: block; background: #000; }
.player--embed:fullscreen .player__frame { height: 100vh; }

/* --- marchio e piè di pagina: fascia chiara di lettura ------------------ */

.marchio { flex: none; color: currentColor; }

.footer { margin-top: 0; padding: 1.75rem 0 1.25rem; background: var(--cloud); color: var(--charcoal); }
/* piè di pagina compatto: nota a sinistra, contributo a destra */
.footer .wrap {
  width: min(100% - 2 * var(--pad), var(--wrap));
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.6rem 2.5rem; align-items: start;
}
.footer .plate { grid-column: 1; color: #000; border-color: #000; font-size: 0.6875rem; padding: 0.1rem 0.4rem; justify-self: start; }
.footer .plate--legend { background: #000; color: var(--cloud); }
.footer__note { grid-column: 1; color: var(--charcoal); max-width: 70ch; margin: 0; font-size: 0.9375rem; line-height: 1.45; }
.footer__meta { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 0.5rem; color: var(--charcoal); font-size: 0.8125rem; margin: 0.6rem 0 0; padding-top: 0.9rem; border-top: 1px solid #C9CCD1; }
.footer__brand { display: inline-flex; align-items: center; gap: 0.4rem; color: #000; font-weight: 600; }
.footer__brand .marchio { color: #000; }

.credits { margin-top: 2rem; padding-top: 1.75rem; border-top: 1px solid #C9CCD1; }
.footer .credits { grid-column: 2; grid-row: 1 / span 2; margin: 0; padding: 0; border: 0; text-align: right; }
.footer .credits__intro { color: var(--charcoal); font-size: 0.6875rem; margin-bottom: 0.4rem; }
.credits--gate { margin-top: 1.5rem; text-align: center; }
.credits__intro { color: var(--slate); font-size: 0.75rem; font-weight: 500; margin-bottom: 0.75rem; }
/* Il logo istituzionale non si ritocca: resta su fondo bianco. */
.credits__logo { margin: 0; }
.credits__logo img { background: #fff; border-radius: var(--r-sm); padding: 0.5rem 0.75rem; width: auto; max-width: min(100%, 20rem); height: auto; }
.footer .credits__logo img { max-width: 10rem; margin-left: auto; padding: 0.35rem 0.5rem; }
.credits--gate .credits__logo img { margin-inline: auto; max-width: min(100%, 15rem); }

/* --- elementi del file di prova ------------------------------------------ */

.avviso {
  position: static; margin: 0;
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem 1rem;
  background: var(--black); color: var(--slate);
  border-bottom: 1px solid var(--line);
  padding: 0.55rem var(--pad);
  font-size: 0.875rem;
}
.avviso span { flex: 1 1 34rem; }
.avviso strong {
  display: inline-block; margin-right: 0.4rem;
  font-weight: 500; font-size: 0.6875rem; letter-spacing: 0.12em;
  color: #000; background: var(--white); border-radius: 0.2rem; padding: 0.15rem 0.45rem;
}
.avviso button {
  margin: 0; min-height: 2.5rem; padding: 0 1rem;
  background: transparent; color: var(--white);
  border: 1px solid var(--line-2); border-radius: var(--r-sm);
  font-size: 0.875rem; font-weight: 500;
}
.avviso button:hover { border-color: var(--white); }

.demo-feedback { width: min(100% - 2 * var(--pad), var(--wrap)); margin-inline: auto; }
.demo-feedback:has(.demo-message:not([hidden])) { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; padding-top: 1rem; }
.demo-message {
  flex: 1 1 20rem; margin: 0; padding: 0.9rem 1.25rem;
  background: var(--white); color: #000;
  border: 0; border-radius: var(--r);
  font-weight: 500;
}
.demo-error { background: var(--negative); color: #000; }
.demo-feedback #demo-dismiss { display: none; margin: 0; }
.demo-feedback:has(.demo-message:not([hidden])) #demo-dismiss { display: inline-flex; }

.vista[hidden] { display: none; }
.assente {
  position: fixed; left: 50%; bottom: 1.5rem; transform: translateX(-50%);
  z-index: 95; max-width: min(30rem, calc(100% - 2rem));
  background: var(--white); color: #000; font-weight: 500;
  border: 0; border-radius: var(--r); padding: 0.8rem 1.1rem; font-size: 0.9375rem;
}
.assente[hidden] { display: none; }

/* --- adattamenti --------------------------------------------------------- */

@media (max-width: 64rem) {
  .nav { order: 3; width: 100%; margin: 0; border-top: 1px solid var(--line); padding-top: 0.25rem; }
  .topbar__exit, .demo-exit { margin-left: auto; }
}

@media (max-width: 60rem) {
  .detail { grid-template-columns: 1fr; }
  .detail__poster { max-width: 18rem; }
  .facts > div, .handover__list > div, .shortcuts__list > div { grid-template-columns: 1fr; gap: 0.15rem; }
}

@media (max-width: 45rem) {
  .footer .wrap { grid-template-columns: 1fr; }
  .footer .credits { grid-column: 1; grid-row: auto; text-align: left; margin-top: 0.75rem; }
  .footer .credits__logo img { margin-left: 0; }
  .demo-hero { grid-template-columns: 1fr; gap: 2rem; padding-top: 1.5rem; }
  .demo-hero-poster, .demo-hero > img, .demo-hero > .demo-art { justify-self: start; max-width: 15rem; order: -1; }
  .demo-hero h1 { font-size: 3rem; }
  .demo-search-fields, .finder__filters, .demo-fields, .demo-metrics { grid-template-columns: 1fr; }
  .demo-metrics > div + div, .tile + .tile { padding-left: 0; border-left: 0; border-top: 1px solid var(--line); }
  .grid { grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr)); gap: 2rem 1rem; }
  .card__title { font-size: 1.0625rem; }
  .brand__claim { display: none; }
  .topbar__exit, .demo-exit { padding-left: 0; border-left: 0; }
  .demo-exit > span { display: none; }
  .demo-player-actions .btn { flex: 1 1 9rem; }
  .demo-player-actions > div { max-width: none; }
  .ctl__text { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); }
  .range--volume { width: 5.5rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .card__link:hover .card__poster img { transform: none; }
}

@media (prefers-contrast: more) {
  :root { --slate: #D8DCE2; --muted: #E0E0E0; --line: #70707A; --line-2: #A0A0AA; }
}

@media print {
  .topbar, .controls, .subnav, .avviso, .demo-feedback { display: none; }
  body { background: #fff; color: #000; }
}

/* --- registrazione e "I miei film" -------------------------------------- */
.gate__signup { margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem; }
.gate__signup p { margin: 0; color: var(--slate); }
.gate .check label a { color: var(--white); }
.card__actions { margin: 0.75rem 0 0; }
.card__actions .btn { min-height: 2.5rem; padding-inline: 1rem; font-size: 0.9375rem; }
.check input[type="radio"] { width: 1.5rem; height: 1.5rem; accent-color: var(--white); }
.check .hint { margin-top: 0.2rem; font-weight: 400; }
.footer__meta a { color: inherit; }
