/* Ritmica — studio boutique di servizi alle imprese
   Direzione "A tempo": perla, inchiostro, cobalto; reportage in bianco e
   nero; un grottesco variabile che pulsa. Tutto segue un battito, e il
   battito si può cambiare. */

@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
  src: url("/fonts/archivo-latin-wdth-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Hanken Grotesk";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/fonts/hanken-grotesk-latin-wght-normal.woff2") format("woff2");
}

:root {
  --perla: #F1F2F4;
  --bianco: #FFFFFF;
  --inchiostro: #0B0D12;
  --grigio: #596070;
  --cobalto: #1F35FF;
  --cobalto-scuro: #1425C4;
  --cobalto-chiaro: #97A4FF;
  --notte: #06070B;
  --errore: #B3261E;
  --filo: rgba(11, 13, 18, 0.14);
  --filo-chiaro: rgba(255, 255, 255, 0.2);

  --titolo: "Archivo", "Arial Narrow", system-ui, sans-serif;
  --testo: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --morbido: cubic-bezier(0.16, 1, 0.3, 1);

  /* Un battito: 84 al minuto (Andante). Lo cambia il comando in testata. */
  --battito: 0.714s;

  --margine: clamp(1.25rem, 4.2vw, 4.5rem);
  --larghezza: 100rem;
  --stacco: clamp(5.5rem, 11vw, 10rem);
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; background: var(--perla); }

body {
  margin: 0;
  background: var(--perla);
  color: var(--inchiostro);
  font-family: var(--testo);
  font-size: 1.0625rem;
  font-weight: 400;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

h1, h2, h3, p, ul, ol, dl, dd, figure, fieldset { margin: 0; padding: 0; }
ul, ol { list-style: none; }
fieldset { border: 0; min-width: 0; }
img, svg, video, canvas { display: block; max-width: 100%; }
[hidden] { display: none !important; }
a { color: inherit; }
strong { font-weight: 650; }

:focus-visible { outline: 3px solid var(--cobalto); outline-offset: 3px; border-radius: 4px; }
.motore :focus-visible, .chiusura :focus-visible, .testata.is-scura :focus-visible { outline-color: var(--bianco); }

.solo-lettori { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.salta { position: absolute; left: 1rem; top: -5rem; z-index: 50; padding: 0.75rem 1rem; background: var(--inchiostro); color: var(--bianco); }
.salta:focus { top: 1rem; }

.colonna { width: 100%; max-width: var(--larghezza); margin-inline: auto; padding-inline: var(--margine); }
.fascia { padding-block: var(--stacco); }

/* ---------- La voce ---------- */

h1, h2, h3 { font-family: var(--titolo); }

.gigante {
  font-size: clamp(3.75rem, 16.5vw, 18rem);
  font-weight: 800;
  font-stretch: 62%;
  line-height: 0.8;
  letter-spacing: -0.012em;
  text-transform: uppercase;
  text-wrap: balance;
}
.gigante--medio { font-size: clamp(3rem, 8.4vw, 9rem); line-height: 0.84; }
.sommario { max-width: 32em; font-size: clamp(1.1rem, 1.4vw, 1.3rem); line-height: 1.5; }

/* Le fotografie: sempre in bianco e nero */
.foto { overflow: hidden; background: #1A1C22; }
.foto img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.04); }
.foto--larga { aspect-ratio: 3 / 2; }

/* ---------- Bottoni ---------- */

.bottone {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.5rem;
  padding: 0.75rem 1.9rem;
  border: 0;
  border-radius: 999px;
  background: var(--cobalto);
  color: var(--bianco);
  font-family: var(--testo);
  font-size: 1.02rem;
  font-weight: 600;
  line-height: 1.15;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.4s var(--morbido), transform 0.4s var(--morbido);
}
.bottone:hover { background: var(--cobalto-scuro); transform: scale(1.03); }
.bottone--piccolo { min-height: 2.75rem; padding: 0.5rem 1.25rem; font-size: 0.95rem; }
.bottone--largo { width: 100%; }
.bottone[aria-disabled="true"] { background: #7C8292; cursor: progress; }

/* ---------- Testata ---------- */

.testata {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 40;
  color: var(--inchiostro);
  transition: background-color 0.5s var(--morbido), color 0.5s var(--morbido);
}
.testata.is-scesa { background: rgba(241, 242, 244, 0.88); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); }
.testata.is-scura { background: rgba(6, 7, 11, 0.62); color: var(--bianco); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); }
.testata__interno {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  max-width: var(--larghezza);
  margin-inline: auto;
  padding: 0.8rem var(--margine);
}
.marchio {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  margin-right: auto;
  font-family: var(--titolo);
  font-size: 1.55rem;
  font-weight: 800;
  font-stretch: 80%;
  letter-spacing: -0.02em;
  text-decoration: none;
}

/* Il tempo della pagina */
.tempo {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 2.75rem;
  padding: 0 0.9rem;
  border: 0;
  border-radius: 999px;
  background: none;
  color: inherit;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
}
.tempo:hover { background: rgba(127, 135, 160, 0.16); }
.tempo__bpm { font-weight: 400; opacity: 0.75; }
.tempo__battito {
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 50%;
  background: var(--cobalto);
  animation: batte var(--battito) ease-out infinite;
}
.testata.is-scura .tempo__battito { background: var(--cobalto-chiaro); }
@keyframes batte { 0% { transform: scale(1.7); opacity: 1; } 60%, 100% { transform: scale(0.75); opacity: 0.45; } }

.menu { position: relative; }
.menu summary {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding: 0 1.15rem;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}
.menu summary::-webkit-details-marker { display: none; }
.menu nav {
  position: absolute;
  right: 0;
  top: calc(100% + 0.75rem);
  display: grid;
  min-width: 18rem;
  padding: 0.75rem;
  border-radius: 18px;
  background: var(--bianco);
  color: var(--inchiostro);
  box-shadow: 0 1.5rem 4rem rgba(11, 13, 18, 0.22);
}
.menu nav a {
  display: flex;
  align-items: center;
  min-height: 3rem;
  padding: 0 1rem;
  border-radius: 10px;
  font-family: var(--titolo);
  font-size: 1.35rem;
  font-weight: 650;
  font-stretch: 85%;
  letter-spacing: -0.02em;
  text-decoration: none;
}
.menu nav a:hover { background: var(--perla); color: var(--cobalto); }
.da-stretto { display: none; }
@media (max-width: 40rem) {
  .da-largo { display: none; }
  .da-stretto { display: inline; }
  .tempo__bpm { display: none; }
  .tempo { padding: 0 0.5rem; }
  .testata__interno { gap: 0.4rem; }
}
@media (max-width: 25rem) {
  .tempo [data-tempo-nome] { display: none; }
}

/* ---------- Apertura ---------- */

.apertura { display: flex; flex-direction: column; min-height: 100svh; padding-top: 4.75rem; }

/* La finestra: il film del lavoro si vede solo dentro le lettere del nome. */
.finestra { position: relative; isolation: isolate; overflow: hidden; background: #000; margin-top: auto; }
.finestra__posa, .finestra__film {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* Mai più chiaro della perla: così il fondo resta uniforme. */
  filter: grayscale(1) contrast(1.15) brightness(0.92);
}
.finestra__film { opacity: 0; transition: opacity 1.2s ease; }
.finestra__film.is-vivo { opacity: 1; }
.finestra__parola {
  position: relative;
  background: var(--perla);
  color: #000;
  mix-blend-mode: lighten;
  font-family: var(--titolo);
  font-size: 30vw;
  font-weight: 900;
  line-height: 0.8;
  letter-spacing: -0.01em;
  text-align: center;
  white-space: nowrap;
  padding-block: 0.03em 0.05em;
  user-select: none;
}
.finestra__parola span { display: inline-block; font-variation-settings: "wdth" var(--w, 94); will-change: font-variation-settings; }

.apertura__testo {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 1.5rem clamp(2rem, 6vw, 7rem);
  align-items: end;
  margin-bottom: auto;
  padding-block: clamp(1.75rem, 3.5vw, 3rem) clamp(2rem, 4vw, 3.5rem);
}
.apertura h1 {
  max-width: 13ch;
  font-size: clamp(2.1rem, 4.7vw, 5rem);
  font-weight: 650;
  font-stretch: 88%;
  line-height: 0.98;
  letter-spacing: -0.035em;
}
.apertura__lato > p { max-width: 30em; font-size: clamp(1.02rem, 1.25vw, 1.2rem); color: #2B303B; }
@media (max-width: 56rem) {
  .apertura__testo { grid-template-columns: minmax(0, 1fr); }
  /* Su schermo stretto le lettere si allungano: la finestra sul lavoro resta grande. */
  .finestra__parola { line-height: 1.62; padding-block: 0; }
  .finestra__parola span { transform: scaleY(2); }
}

/* Il gesto d'avvio: un campo, un pulsante */
.avvio { margin-top: 1.5rem; }
.avvio label { display: block; margin-bottom: 0.45rem; font-size: 0.95rem; font-weight: 600; }
.avvio__riga { display: flex; gap: 0.4rem; padding: 0.4rem; border: 1px solid var(--inchiostro); border-radius: 999px; background: var(--bianco); }
.avvio__riga:focus-within { outline: 3px solid var(--cobalto); outline-offset: 3px; }
.avvio input {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 3rem;
  padding: 0 0.5rem 0 1.2rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--inchiostro);
  font: inherit;
  font-size: 1.0625rem;
}
.avvio input:focus-visible { outline: none; }
.avvio input::placeholder { color: #6B7181; }
.avvio .bottone { min-height: 3rem; }
.avvio__nota { margin-top: 0.7rem; font-size: 0.95rem; color: var(--grigio); }
@media (max-width: 30rem) {
  .avvio__riga { flex-direction: column; border-radius: 22px; }
  .avvio .bottone { width: 100%; }
}

/* ---------- Chi siamo ---------- */

.identita__alto {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 2.5rem clamp(2rem, 5vw, 5rem);
  align-items: end;
}
.identita h2 {
  max-width: 17ch;
  font-size: clamp(2.1rem, 5vw, 5.5rem);
  font-weight: 650;
  font-stretch: 86%;
  line-height: 0.98;
  letter-spacing: -0.04em;
}
[data-parola] { color: rgba(11, 13, 18, 0.14); transition: color 0.6s var(--morbido); }
[data-parola].is-accesa { color: var(--inchiostro); }
.principi {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0 clamp(1.5rem, 3.5vw, 3.5rem);
  margin-top: clamp(3rem, 6vw, 5.5rem);
}
.principi li { padding-top: 1.25rem; border-top: 2px solid var(--inchiostro); }
.principi h3 { font-size: clamp(1.5rem, 2.2vw, 2.1rem); font-weight: 700; font-stretch: 80%; line-height: 1.02; letter-spacing: -0.02em; }
.principi p { margin-top: 0.7rem; max-width: 28em; color: #2B303B; }
@media (max-width: 56rem) {
  .identita__alto { grid-template-columns: minmax(0, 1fr); }
  .principi { grid-template-columns: minmax(0, 1fr); gap: 2rem; }
}

/* ---------- Il nastro dei settori ---------- */

.nastro { padding-block: clamp(1rem, 2vw, 1.75rem); border-block: 1px solid var(--filo); overflow: hidden; }
.nastro__riga {
  display: flex;
  width: max-content;
  font-family: var(--titolo);
  font-size: clamp(2rem, 5vw, 4.75rem);
  font-weight: 800;
  font-stretch: 62%;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
  animation: nastro calc(var(--battito) * 64) linear infinite;
}
.nastro__riga span { display: inline-flex; align-items: center; }
.nastro__riga span::after { content: ""; width: 0.24em; height: 0.17em; margin-inline: 0.45em; border-radius: 50%; background: var(--cobalto); transform: rotate(-22deg); }
@keyframes nastro { to { transform: translateX(-50%); } }

/* ---------- Il motore ---------- */

.motore { background: var(--notte); color: var(--bianco); }
.motore__soglia {
  display: grid;
  grid-template-columns: minmax(0, 8fr) minmax(0, 4fr);
  gap: 2rem clamp(2rem, 5vw, 5rem);
  align-items: end;
  padding-block: var(--stacco) clamp(3rem, 6vw, 5rem);
}
.motore__soglia .sommario { color: #C9CDD8; }
@media (max-width: 56rem) { .motore__soglia { grid-template-columns: minmax(0, 1fr); } }

/* Senza script, o con il movimento ridotto: cinque tappe una sotto l'altra. */
.spartito__tela, .scala, .spartito__conto { display: none; }
.tappe { display: grid; gap: clamp(3rem, 7vw, 5rem); max-width: var(--larghezza); margin-inline: auto; padding: 0 var(--margine) var(--stacco); }
.tappa__disciplina { font-size: 1rem; font-weight: 600; color: var(--cobalto-chiaro); }
.tappa h3 {
  margin-top: 0.35rem;
  font-size: clamp(3.25rem, 11vw, 11.5rem);
  font-weight: 800;
  font-stretch: 62%;
  line-height: 0.82;
  letter-spacing: -0.012em;
  text-transform: uppercase;
}
.tappa dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem clamp(1.5rem, 3vw, 3rem); max-width: 56rem; margin-top: clamp(1.1rem, 2.2vw, 1.75rem); }
.tappa dl > div { padding-top: 0.85rem; border-top: 1px solid var(--filo-chiaro); }
.tappa dt { font-size: 0.92rem; font-weight: 600; color: var(--cobalto-chiaro); }
.tappa dd { margin-top: 0.3rem; font-size: clamp(1rem, 1.2vw, 1.12rem); color: #E4E6EC; }
@media (max-width: 40rem) { .tappa dl { grid-template-columns: minmax(0, 1fr); gap: 0.75rem; } }

/* Con lo script: lo schermo resta fermo e lo scorrimento compone la partitura. */
.spartito.is-attivo { height: 560vh; }
.spartito.is-attivo .spartito__schermo { position: sticky; top: 0; height: 100svh; overflow: hidden; }
.spartito.is-attivo .spartito__tela { display: block; position: absolute; inset: 0; width: 100%; height: 100%; }
.spartito.is-attivo .tappe { position: absolute; inset: auto 0 0 0; display: block; max-width: none; padding: 0; }
.spartito.is-attivo .tappa {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 0 var(--margine) clamp(1.75rem, 5vh, 3.5rem);
  opacity: 0;
  visibility: hidden;
  transform: translateY(2.5rem);
  transition: opacity 0.7s var(--morbido), transform 0.9s var(--morbido), visibility 0s linear 0.7s;
}
.spartito.is-attivo .tappa.is-attiva { opacity: 1; visibility: visible; transform: none; transition-delay: 0.12s, 0.12s, 0s; }
.spartito.is-attivo .tappa h3 { font-size: clamp(3.25rem, min(11vw, 17svh), 11.5rem); }

.spartito.is-attivo .scala {
  display: block;
  position: absolute;
  right: var(--margine);
  top: 5.75rem;
  width: clamp(12rem, 22vw, 22rem);
  height: 1px;
  background: var(--filo-chiaro);
}
.scala__tacca {
  position: absolute;
  top: 0.55rem;
  left: calc(var(--a) * 100%);
  transform: translateX(-50%);
  font-size: 0.74rem;
  font-weight: 500;
  white-space: nowrap;
  color: rgba(255, 255, 255, 0.55);
}
.scala__tacca::before { content: ""; position: absolute; left: 50%; top: -0.75rem; width: 1px; height: 0.4rem; background: currentColor; }
/* Cinque tacche, tre nomi: i due di mezzo affollerebbero la riga. Il cursore è il primo span. */
.scala__tacca:nth-of-type(odd) { font-size: 0; }
.scala__tacca:nth-of-type(2) { transform: none; }
.scala__tacca:nth-of-type(2)::before { left: 0; }
.scala__tacca:last-of-type { transform: translateX(-100%); }
.scala__tacca:last-of-type::before { left: 100%; }
.scala__cursore {
  position: absolute;
  top: -4px;
  left: calc(var(--p, 0) * 100%);
  width: 9px;
  height: 9px;
  margin-left: -4.5px;
  border-radius: 50%;
  background: var(--bianco);
  box-shadow: 0 0 0 6px rgba(151, 164, 255, 0.28);
}
.spartito.is-attivo .spartito__conto {
  display: block;
  position: absolute;
  left: var(--margine);
  top: 5.25rem;
  font-family: var(--titolo);
  font-size: 1.05rem;
  font-weight: 600;
  font-stretch: 80%;
  color: rgba(255, 255, 255, 0.7);
}
@media (max-width: 56rem) { .spartito.is-attivo .scala { display: none; } }

/* ---------- I servizi, a carosello ---------- */

.servizi { padding-bottom: clamp(4rem, 8vw, 7rem); }
.servizi__testa { display: grid; grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); gap: 1.25rem clamp(2rem, 5vw, 5rem); align-items: end; margin-bottom: clamp(1.75rem, 3.5vw, 3rem); }
.servizi__testa .sommario { color: #2B303B; }
@media (max-width: 56rem) { .servizi__testa { grid-template-columns: minmax(0, 1fr); } }

/* Senza script il nastro scorre da sé, come una riga qualsiasi. Con lo script (is-vivo) gira in cerchio. */
.carosello {
  position: relative;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: var(--margine);
  scrollbar-width: none;
}
.carosello::-webkit-scrollbar { display: none; }
.carosello__nastro {
  display: flex;
  gap: clamp(0.9rem, 1.4vw, 1.4rem);
  width: max-content;
  padding: 0.5rem var(--margine) 1rem;
  /* La prima scheda parte dove parte la colonna del testo, anche sugli schermi larghi. */
  padding-left: max(var(--margine), calc((100% - var(--larghezza)) / 2 + var(--margine)));
}
.carosello.is-vivo { overflow: hidden; scroll-snap-type: none; touch-action: pan-y; -webkit-user-select: none; user-select: none; cursor: grab; }
.carosello.is-trascinato { cursor: grabbing; }
.carosello.is-trascinato a { pointer-events: none; }

.scheda {
  position: relative;
  flex: 0 0 clamp(min(78vw, 20rem), 36vw, 34rem);
  min-width: 0;
  container-type: inline-size;
  scroll-snap-align: start;
  background: var(--inchiostro);
  color: var(--bianco);
  border-radius: 22px;
  overflow: hidden;
}
/* Sugli schermi larghissimi sei schede devono bastare a fare il giro. */
@media (min-width: 140rem) { .scheda { flex-basis: 26vw; } }
.carosello.is-vivo .scheda { scroll-snap-align: none; will-change: transform; }
.scheda__porta { display: block; height: 100%; color: inherit; text-decoration: none; -webkit-user-drag: none; }
.scheda__porta:focus-visible { outline-offset: -6px; outline-color: var(--bianco); border-radius: 22px; }
.scheda__media { position: relative; aspect-ratio: 8 / 9; background: #1A1C22; overflow: hidden; }
.scheda__media img, .scheda__media canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.05);
  transition: transform 1.4s var(--morbido), filter 0.9s var(--morbido);
  -webkit-user-drag: none;
}
.scheda__media canvas { opacity: 0; transition: opacity 0.9s ease, transform 1.4s var(--morbido); }
.scheda__media canvas.is-vivo { opacity: 1; }
.scheda:hover .scheda__media img, .scheda:hover .scheda__media canvas { transform: scale(1.04); }
.scheda__media::after { content: ""; position: absolute; inset: 40% 0 0 0; background: linear-gradient(to top, #0B0D12 2%, rgba(11, 13, 18, 0.78) 34%, rgba(11, 13, 18, 0)); pointer-events: none; }
.scheda__testo { position: relative; margin-top: -4.6rem; padding: 0 1.5rem 1.7rem; }
.scheda h3 {
  font-size: clamp(2.2rem, 3.6vw, 3.75rem);
  font-size: clamp(2rem, 11.5cqi, 4rem);
  font-weight: 800;
  font-stretch: 62%;
  line-height: 0.9;
  text-transform: uppercase;
  transition: font-stretch 0.7s var(--morbido);
}
.scheda p { margin-top: 0.8rem; max-width: 30em; min-height: 4.6em; color: #D5D8E0; transition: color 0.6s var(--morbido); }
.scheda__vai {
  position: absolute;
  top: 1rem;
  right: 1rem;
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background: var(--bianco);
  color: var(--inchiostro);
  transition: background-color 0.3s var(--morbido), color 0.3s var(--morbido), transform 0.4s var(--morbido);
}
.scheda:hover h3, .scheda.is-prima h3 { font-stretch: 78%; }
.scheda:hover .scheda__vai, .scheda__porta:focus-visible .scheda__vai { background: var(--cobalto); color: var(--bianco); transform: rotate(45deg); }

/* In primo piano una scheda sola: le altre aspettano in penombra. */
.carosello.is-vivo .scheda:not(.is-prima):not(:hover) .scheda__media img { filter: grayscale(1) contrast(1.05) brightness(0.5); }
.carosello.is-vivo .scheda:not(.is-prima):not(:hover) p { color: #8A90A0; }
.carosello.is-vivo .scheda__vai { transition: background-color 0.3s var(--morbido), color 0.3s var(--morbido), transform 0.5s var(--morbido), opacity 0.5s var(--morbido); }
.carosello.is-vivo .scheda:not(.is-prima):not(:hover) .scheda__porta:not(:focus-visible) .scheda__vai { opacity: 0; transform: scale(0.6); }

/* La pillola che segue il puntatore */
.carosello__pillola {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 3;
  padding: 0.5rem 1.1rem;
  border-radius: 999px;
  background: var(--cobalto);
  color: var(--bianco);
  font-size: 0.95rem;
  font-weight: 650;
  line-height: 1.2;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.25s ease;
  will-change: transform;
}
.carosello.is-puntato .carosello__pillola { opacity: 1; }
@media (hover: none) { .carosello__pillola { display: none; } }

/* Sotto: il conto, il rigo con le sei note, i tasti */
.carosello__piede { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem clamp(1.25rem, 3vw, 3rem); margin-top: clamp(1rem, 2vw, 1.75rem); }
.carosello__conta { font-family: var(--titolo); font-size: clamp(2rem, 3vw, 2.75rem); font-weight: 800; font-stretch: 62%; line-height: 1; font-variant-numeric: tabular-nums; }
.carosello__su { color: var(--grigio); }
.rigo {
  --passo-rigo: 0.6rem;
  position: relative;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  flex: 1 1 14rem;
  max-width: 30rem;
  height: calc(var(--passo-rigo) * 4 + 1px);
  margin-block: 0.9rem;
  background-image: linear-gradient(rgba(11, 13, 18, 0.34), rgba(11, 13, 18, 0.34)), linear-gradient(rgba(11, 13, 18, 0.34), rgba(11, 13, 18, 0.34)), linear-gradient(rgba(11, 13, 18, 0.34), rgba(11, 13, 18, 0.34)), linear-gradient(rgba(11, 13, 18, 0.34), rgba(11, 13, 18, 0.34)), linear-gradient(rgba(11, 13, 18, 0.34), rgba(11, 13, 18, 0.34));
  background-size: 100% 1px;
  background-repeat: no-repeat;
  background-position: 0 0, 0 25%, 0 50%, 0 75%, 0 100%;
}
.rigo__nota { position: relative; padding: 0; border: 0; background: none; cursor: pointer; }
.rigo__nota::after { content: ""; position: absolute; inset: -0.9rem 0; }
.rigo__nota::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: calc(var(--grado) * var(--passo-rigo) / 2);
  width: 0.92rem;
  height: 0.64rem;
  border-radius: 50%;
  background: var(--inchiostro);
  opacity: 0.28;
  transform: translate(-50%, 50%) rotate(-22deg);
  transition: opacity 0.4s var(--morbido), background-color 0.4s var(--morbido);
}
.rigo__nota:hover::before { opacity: 0.7; }
.rigo__nota[aria-current]::before { background: var(--cobalto); opacity: 1; animation: nota var(--battito) var(--morbido) infinite; }
.servizi.is-in-pausa .rigo__nota[aria-current]::before { animation: none; }
@keyframes nota { 0% { transform: translate(-50%, 50%) rotate(-22deg) scale(1.45); } 45%, 100% { transform: translate(-50%, 50%) rotate(-22deg) scale(1); } }

.carosello__tasti { display: flex; gap: 0.5rem; margin-left: auto; }
.freccia {
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  border: 1px solid var(--inchiostro);
  border-radius: 50%;
  background: none;
  color: var(--inchiostro);
  cursor: pointer;
  transition: background-color 0.3s var(--morbido), color 0.3s var(--morbido);
}
.freccia:hover { background: var(--inchiostro); color: var(--bianco); }
.freccia__riparti, .freccia[aria-pressed="true"] .freccia__ferma { display: none; }
.freccia[aria-pressed="true"] .freccia__riparti { display: block; }

/* ---------- Il metodo: una battuta in quattro tempi ---------- */

.metodo { background: var(--bianco); }
.metodo__testa { display: grid; grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); gap: 1.5rem clamp(2rem, 5vw, 5rem); align-items: end; }
.metodo__testa .sommario { color: #2B303B; }
.battuta {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: clamp(2.5rem, 5vw, 4.5rem);
  border-right: 7px double var(--inchiostro);
}
.battuta li { position: relative; padding: 1.5rem clamp(1rem, 2vw, 2rem) 0.5rem; border-left: 1px solid var(--inchiostro); }
/* L'accento passa da un tempo all'altro, due battiti ciascuno. */
.battuta li::before {
  content: "";
  position: absolute;
  left: -1px;
  right: 0;
  top: 0;
  height: 6px;
  background: var(--cobalto);
  opacity: 0;
  animation: accento calc(var(--battito) * 8) linear infinite;
}
.battuta li:nth-child(2)::before { animation-delay: calc(var(--battito) * 2); }
.battuta li:nth-child(3)::before { animation-delay: calc(var(--battito) * 4); }
.battuta li:nth-child(4)::before { animation-delay: calc(var(--battito) * 6); }
@keyframes accento { 0% { opacity: 1; } 22% { opacity: 1; } 25%, 100% { opacity: 0; } }
.battuta__numero {
  display: block;
  font-family: var(--titolo);
  font-size: clamp(4.5rem, 9vw, 9.5rem);
  font-weight: 800;
  font-stretch: 62%;
  line-height: 0.85;
  color: var(--inchiostro);
  animation: numero calc(var(--battito) * 8) linear infinite;
}
.battuta li:nth-child(2) .battuta__numero { animation-delay: calc(var(--battito) * 2); }
.battuta li:nth-child(3) .battuta__numero { animation-delay: calc(var(--battito) * 4); }
.battuta li:nth-child(4) .battuta__numero { animation-delay: calc(var(--battito) * 6); }
@keyframes numero { 0% { color: var(--cobalto); font-stretch: 100%; } 22% { color: var(--cobalto); font-stretch: 100%; } 25%, 100% { color: var(--inchiostro); font-stretch: 62%; } }
.battuta h3 { margin-top: 1rem; font-size: clamp(1.5rem, 2.1vw, 2.1rem); font-weight: 700; font-stretch: 80%; line-height: 1.02; letter-spacing: -0.02em; }
.battuta p { margin-top: 0.6rem; color: #2B303B; }
@media (max-width: 62rem) {
  .metodo__testa { grid-template-columns: minmax(0, 1fr); }
  .battuta { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 2rem; }
}
@media (max-width: 36rem) { .battuta { grid-template-columns: minmax(0, 1fr); border-right: 0; border-bottom: 7px double var(--inchiostro); padding-bottom: 1.5rem; } }

/* ---------- Chiusura ---------- */

.chiusura { position: relative; overflow: hidden; background: var(--notte); color: var(--bianco); isolation: isolate; }
.chiusura__foto { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.05) brightness(0.62); }
.chiusura::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(to bottom, rgba(6, 7, 11, 0.25), rgba(6, 7, 11, 0.78)); }
.chiusura__interno { padding-block: clamp(7rem, 15vw, 14rem) clamp(4rem, 8vw, 7rem); }
.chiusura__griglia { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); gap: 2.5rem clamp(2rem, 6vw, 6rem); align-items: end; margin-top: clamp(2.5rem, 5vw, 4.5rem); }
.chiusura__sotto { font-family: var(--testo); font-size: 1rem; font-weight: 650; color: var(--cobalto-chiaro); }
.chiusura .avvio { margin-top: 0; }
.chiusura .avvio__riga { border-color: var(--bianco); }
.chiusura .avvio__riga:focus-within { outline-color: var(--bianco); }
.chiusura .avvio__nota { color: #D5D8E0; }
@media (max-width: 56rem) { .chiusura__griglia { grid-template-columns: minmax(0, 1fr); } }

.elenco { margin-top: 0.75rem; border-top: 1px solid var(--filo); }
.elenco li { padding: 0.7rem 0; border-bottom: 1px solid var(--filo); }
.elenco--chiaro, .elenco--chiaro li { border-color: var(--filo-chiaro); }

/* ---------- Piede ---------- */

.piede { background: var(--notte); color: #C9CDD8; font-size: 0.95rem; border-top: 1px solid var(--filo-chiaro); }
.piede__interno { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 2rem; padding-block: 1.25rem; }
.piede strong { margin-right: 0.6rem; color: var(--bianco); font-family: var(--titolo); font-size: 1.15rem; font-weight: 800; font-stretch: 80%; }
.piede__nota { color: #9BA1B0; }
.piede nav { display: flex; gap: 1.5rem; margin-left: auto; }
.piede nav a { display: inline-flex; align-items: center; min-height: 2.75rem; }

/* ---------- Pagina Contatti ---------- */

.contatti { padding: clamp(7.5rem, 12vw, 10rem) 0 var(--stacco); }
.contatti__griglia { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: clamp(2.5rem, 6vw, 6.5rem); align-items: start; }
@media (max-width: 60rem) { .contatti__griglia { grid-template-columns: minmax(0, 1fr); } }
.contatti h1 { font-size: clamp(3.25rem, 10vw, 10.5rem); font-weight: 800; font-stretch: 62%; line-height: 0.82; text-transform: uppercase; text-wrap: balance; }
.contatti .sommario { margin-top: clamp(1.5rem, 3vw, 2.5rem); color: #2B303B; }
.contatti__sotto { margin-top: 2.75rem; font-family: var(--testo); font-size: 1rem; font-weight: 650; color: var(--cobalto); }
.pagella { margin-top: 0.75rem; max-width: 36em; color: #2B303B; }

.modulo { background: var(--bianco); padding: clamp(1.5rem, 4vw, 3rem); border-radius: 24px; box-shadow: 0 2rem 5rem rgba(11, 13, 18, 0.08); }
.modulo h2 { font-size: clamp(1.9rem, 3vw, 2.5rem); font-weight: 700; font-stretch: 86%; line-height: 1.02; letter-spacing: -0.035em; }
.modulo__intro { margin-top: 0.6rem; color: var(--grigio); }
.campo { margin-top: 1.5rem; }
.campo > label, .campo > legend { display: block; font-weight: 600; line-height: 1.35; margin-bottom: 0.45rem; }
.campo__obbligo, .campo__facoltativo { font-weight: 400; color: var(--grigio); }
.campo input[type="text"], .campo input[type="email"], .campo input[type="tel"], .campo textarea {
  display: block;
  width: 100%;
  min-height: 3rem;
  padding: 0.65rem 0.95rem;
  border: 1px solid var(--inchiostro);
  border-radius: 12px;
  background: var(--bianco);
  color: var(--inchiostro);
  font: inherit;
  font-size: 1.0625rem;
}
.campo textarea { resize: vertical; line-height: 1.5; }
.campo input::placeholder { color: #6B7181; }
.campo [aria-invalid="true"] { border-color: var(--errore); border-width: 2px; }
.campo__errore { margin-top: 0.4rem; color: var(--errore); font-weight: 600; font-size: 1rem; }
.campo__aiuto { margin-top: 0.4rem; color: var(--grigio); font-size: 1rem; }
.scelte { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.scelte--colonna { flex-direction: column; gap: 0; }
.scelta { display: inline-flex; align-items: center; gap: 0.6rem; min-height: 2.75rem; cursor: pointer; }
.scelte:not(.scelte--colonna) .scelta { padding: 0.35rem 1.1rem 0.35rem 0.85rem; border: 1px solid var(--inchiostro); border-radius: 999px; }
.scelte:not(.scelte--colonna) .scelta:has(input:checked) { background: var(--inchiostro); color: var(--bianco); }
.scelta input { width: 1.25rem; height: 1.25rem; margin: 0; accent-color: var(--cobalto); }
.campo--consenso { padding-top: 1.5rem; border-top: 1px solid var(--filo); }
/* Campo esca: fuori schermo e nascosto ai lettori di schermo; lo riempiono solo i programmi */
.modulo__esca { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.modulo__informativa { margin-top: 1.5rem; font-size: 1rem; color: var(--grigio); }
.modulo__informativa a { color: var(--cobalto); font-weight: 600; }
.modulo .bottone { margin-top: 1.25rem; }
.modulo__riepilogo { margin-top: 1.5rem; padding: 1rem 1.15rem; border: 2px solid var(--errore); border-radius: 12px; }
.modulo__riepilogo p { font-weight: 600; }
.modulo__riepilogo ul { margin-top: 0.4rem; padding-left: 1.2rem; list-style: disc; }
.modulo__riepilogo a { color: var(--errore); font-weight: 600; }
.modulo__esito:not(:empty) { margin-top: 1.1rem; padding: 0.9rem 1.1rem; border-left: 4px solid var(--cobalto); background: var(--perla); font-weight: 600; }

/* ---------- Pagine interne ---------- */

.testa { padding-top: clamp(7rem, 11vw, 9.5rem); }
.testa__righe { display: grid; grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); gap: 1.5rem clamp(2rem, 5vw, 5rem); align-items: end; padding-bottom: clamp(2rem, 4vw, 3.5rem); }
.testa .gigante { font-size: clamp(2.75rem, var(--corpo, 16.5vw), 18rem); }
.testa .sommario { color: #2B303B; }
.testa__foto { aspect-ratio: 21 / 9; }
.testa__foto img { object-position: 50% 40%; }
.briciole { margin-bottom: 1rem; font-size: 0.95rem; color: var(--grigio); }
.briciole a { text-underline-offset: 0.25em; }
@media (max-width: 56rem) {
  .testa__righe { grid-template-columns: minmax(0, 1fr); }
  .testa .gigante { font-size: clamp(2.5rem, var(--corpo-stretto, 16.5vw), 18rem); }
  .testa__foto { aspect-ratio: 3 / 2; }
}

.blocco { padding-block: clamp(3.5rem, 7vw, 6.5rem); border-top: 1px solid var(--filo); }
.blocco--primo { border-top: 0; }
.blocco__griglia { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 2rem clamp(2rem, 5vw, 5rem); align-items: start; }
.blocco h2 {
  position: sticky;
  top: 5.5rem;
  font-size: clamp(2.2rem, 4.2vw, 4.5rem);
  font-weight: 800;
  font-stretch: 62%;
  line-height: 0.88;
  text-transform: uppercase;
  text-wrap: balance;
}
.blocco__nota { margin-top: 1rem; max-width: 22em; color: var(--grigio); font-size: 0.98rem; }
.blocco--pieno .blocco__griglia { grid-template-columns: minmax(0, 1fr); }
.blocco--pieno h2 { position: static; }
.prosa > * + * { margin-top: 1rem; }
.prosa p, .prosa li { max-width: 40em; }
.prosa .grande { font-size: clamp(1.15rem, 1.5vw, 1.35rem); line-height: 1.5; }
.prosa ul { border-top: 1px solid var(--filo); }
.prosa ul li { padding: 0.7rem 0; border-bottom: 1px solid var(--filo); max-width: none; }
.prosa a, .rimando { color: var(--cobalto); font-weight: 600; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.28em; }
.prosa a.bottone { color: var(--bianco); text-decoration: none; }
.prosa a.porta { color: var(--bianco); font-weight: inherit; text-decoration: none; }
.prosa h3 { margin-top: 2rem; font-size: clamp(1.4rem, 2vw, 1.9rem); font-weight: 700; font-stretch: 80%; line-height: 1.05; letter-spacing: -0.02em; }
.prosa > .listino, .prosa > .domande, .prosa > .confronto-cornice, .prosa > .porte { margin-top: 1.5rem; }
@media (max-width: 56rem) {
  .blocco__griglia { grid-template-columns: minmax(0, 1fr); }
  .blocco h2 { position: static; }
}

/* Il listino: una riga per voce, il prezzo a destra */
.listino { border-top: 2px solid var(--inchiostro); }
.voce { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.5rem 2rem; align-items: baseline; padding: 1.2rem 0; border-bottom: 1px solid var(--filo); }
.voce h3 { grid-column: 1; margin-top: 0; font-size: clamp(1.35rem, 1.9vw, 1.8rem); font-weight: 700; font-stretch: 80%; line-height: 1.05; letter-spacing: -0.02em; }
.voce p { grid-column: 1; margin-top: 0.15rem; max-width: 38em; color: #2B303B; }
.voce .voce__nota { font-size: 0.95rem; color: var(--grigio); }
.voce .prezzo { grid-column: 2; grid-row: 1 / span 3; margin-top: 0; max-width: none; color: var(--inchiostro); text-align: right; font-family: var(--titolo); font-size: clamp(1.5rem, 2.3vw, 2.2rem); font-weight: 800; font-stretch: 70%; line-height: 1.05; white-space: nowrap; }
.prezzo small { display: block; font-family: var(--testo); font-size: 0.9rem; font-weight: 500; font-stretch: 100%; color: var(--grigio); white-space: normal; }
.prezzo__piu { display: block; margin-top: 0.3rem; font-size: 0.7em; }
.etichetta { display: inline-block; margin-left: 0.5rem; padding: 0.1rem 0.6rem; border: 1px solid currentColor; border-radius: 999px; font-family: var(--testo); font-size: 0.8rem; font-weight: 600; font-stretch: 100%; letter-spacing: 0; text-transform: none; color: var(--cobalto); vertical-align: middle; }
@media (max-width: 40rem) {
  .voce { grid-template-columns: minmax(0, 1fr); }
  .voce .prezzo { grid-column: 1; grid-row: auto; text-align: left; margin-top: 0.4rem; }
}

/* Il confronto fra i pacchetti */
.confronto-cornice { overflow-x: auto; }
.confronto { width: 100%; min-width: 38rem; border-collapse: collapse; text-align: left; }
.confronto th, .confronto td { padding: 0.9rem 1rem 0.9rem 0; border-bottom: 1px solid var(--filo); vertical-align: top; }
.confronto thead th { border-bottom: 2px solid var(--inchiostro); font-family: var(--titolo); font-size: clamp(1.5rem, 2.4vw, 2.3rem); font-weight: 800; font-stretch: 62%; text-transform: uppercase; line-height: 1; }
.confronto tbody th { width: 24%; font-weight: 600; }
.confronto .confronto__prezzo td { font-family: var(--titolo); font-size: clamp(1.4rem, 2vw, 1.9rem); font-weight: 800; font-stretch: 70%; }
.confronto .confronto__prezzo small { font-family: var(--testo); font-size: 0.85rem; font-weight: 500; font-stretch: 100%; color: var(--grigio); }

/* Domande e situazioni */
.domande { border-top: 2px solid var(--inchiostro); }
.domande details { border-bottom: 1px solid var(--filo); }
.domande summary { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; min-height: 4rem; padding: 1rem 0; font-family: var(--titolo); font-size: clamp(1.3rem, 1.9vw, 1.75rem); font-weight: 700; font-stretch: 80%; line-height: 1.1; letter-spacing: -0.02em; cursor: pointer; list-style: none; }
.domande summary::-webkit-details-marker { display: none; }
.domande summary::after { content: ""; flex: none; width: 0.95rem; height: 0.68rem; border: 2px solid var(--inchiostro); border-radius: 50%; transform: rotate(-22deg); transition: background-color 0.3s var(--morbido), border-color 0.3s var(--morbido); }
.domande details[open] summary { color: var(--cobalto); }
.domande details[open] summary::after { background: var(--cobalto); border-color: var(--cobalto); }
.domande details > div { padding: 0 0 1.5rem; max-width: 42em; }
.domande details > div > * + * { margin-top: 0.8rem; }

/* Le porte verso le pagine sorelle */
.porte { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(0.9rem, 1.4vw, 1.4rem); }
.porta { position: relative; display: block; border-radius: 18px; overflow: hidden; background: var(--inchiostro); color: var(--bianco); text-decoration: none; }
.porta .foto { display: block; aspect-ratio: 3 / 2; }
.porta .foto img { transition: transform 1.4s var(--morbido); }
.porta:hover .foto img { transform: scale(1.04); }
.porta__testo { display: block; padding: 1.25rem 1.4rem 1.6rem; }
.porta__testo strong { display: block; font-family: var(--titolo); font-size: clamp(2rem, 3.2vw, 3.25rem); font-weight: 800; font-stretch: 62%; line-height: 0.92; text-transform: uppercase; }
.porta__testo span { display: block; margin-top: 0.6rem; color: #D5D8E0; }
.porte--tre { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.porte--tre .foto { aspect-ratio: 4 / 5; }
.porte--tre .porta__testo strong { font-size: clamp(1.9rem, 2.9vw, 3rem); }
@media (max-width: 62rem) { .porte--tre { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 44rem) { .porte, .porte--tre { grid-template-columns: minmax(0, 1fr); } .porte--tre .foto { aspect-ratio: 3 / 2; } }

/* Il calcolatore del canone */
.calcolatore { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 2rem clamp(2rem, 4vw, 4rem); align-items: start; margin-top: 1.5rem; }
.calcolatore fieldset + fieldset { margin-top: 2rem; }
.calcolatore legend { margin-bottom: 0.75rem; font-family: var(--titolo); font-size: 1.5rem; font-weight: 700; font-stretch: 80%; letter-spacing: -0.02em; }
.opzioni { display: grid; gap: 0.5rem; }
.opzione { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 0.2rem 0.9rem; align-items: center; min-height: 3.25rem; padding: 0.6rem 1rem; border: 1px solid var(--filo); border-radius: 12px; background: var(--bianco); cursor: pointer; }
.opzione:has(input:checked) { border-color: var(--inchiostro); box-shadow: inset 0 0 0 1px var(--inchiostro); }
.opzione input { width: 1.25rem; height: 1.25rem; margin: 0; accent-color: var(--cobalto); }
.opzione__nome { font-weight: 600; }
.opzione__prezzo { font-family: var(--titolo); font-weight: 800; font-stretch: 75%; font-size: 1.15rem; white-space: nowrap; }
.opzione__riga { grid-column: 2 / -1; font-size: 0.95rem; color: var(--grigio); }
.conto { position: sticky; top: 5.5rem; padding: clamp(1.25rem, 2.5vw, 2rem); border-radius: 18px; background: var(--inchiostro); color: var(--bianco); }
.conto__voce { color: #C9CDD8; }
.conto__cifra { font-family: var(--titolo); font-size: clamp(3.5rem, 6vw, 5.5rem); font-weight: 800; font-stretch: 62%; line-height: 0.9; }
.conto__cifra small { font-family: var(--testo); font-size: 1rem; font-weight: 500; font-stretch: 100%; color: #C9CDD8; }
.conto dl { margin-top: 1.25rem; border-top: 1px solid var(--filo-chiaro); }
.conto dl div { display: flex; justify-content: space-between; gap: 1rem; padding: 0.6rem 0; border-bottom: 1px solid var(--filo-chiaro); }
.conto dt { color: #C9CDD8; }
.conto dd { font-weight: 600; text-align: right; }
.conto .bottone { width: 100%; margin-top: 1.25rem; }
.conto__nota { margin-top: 0.9rem; font-size: 0.92rem; color: #C9CDD8; }
.conto :focus-visible { outline-color: var(--bianco); }
@media (max-width: 60rem) { .calcolatore { grid-template-columns: minmax(0, 1fr); } .conto { position: static; } }

/* Avvisi e chiusura delle pagine interne */
.avviso { margin-bottom: 2rem; padding: 1rem 1.25rem; border-left: 4px solid var(--cobalto); background: var(--bianco); max-width: 44em; }
.invito { background: var(--inchiostro); color: var(--bianco); }
.invito__interno { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 2rem clamp(2rem, 5vw, 5rem); align-items: end; padding-block: clamp(4rem, 9vw, 8rem); }
.invito .avvio { margin-top: 0; }
.invito .avvio__riga { border-color: var(--bianco); }
.invito .avvio__nota { color: #C9CDD8; }
.invito :focus-visible { outline-color: var(--bianco); }
@media (max-width: 56rem) { .invito__interno { grid-template-columns: minmax(0, 1fr); } }
.menu nav a[aria-current="page"] { color: var(--cobalto); }

/* ---------- Consenso ai cookie ---------- */

.consenso {
  position: fixed;
  left: 1rem;
  bottom: 1rem;
  z-index: 60;
  width: min(30rem, calc(100vw - 2rem));
  padding: 1.4rem 1.5rem 1.5rem;
  border-radius: 18px;
  background: var(--bianco);
  color: var(--inchiostro);
  box-shadow: 0 1.5rem 4rem rgba(11, 13, 18, 0.28);
  font-size: 1rem;
}
.consenso__titolo { padding-right: 2.5rem; font-family: var(--titolo); font-size: 1.5rem; font-weight: 700; font-stretch: 80%; line-height: 1.05; letter-spacing: -0.02em; }
.consenso p { margin-top: 0.6rem; }
.consenso a, .consenso-scelte a { color: var(--cobalto); font-weight: 600; text-underline-offset: 0.25em; }
.consenso__chiudi {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border: 0;
  border-radius: 50%;
  background: none;
  color: var(--inchiostro);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}
.consenso__chiudi:hover { background: var(--perla); }
.consenso__azioni { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1.1rem; }
/* «Rifiutate» e «Accettate» sono identici: nessuno dei due spinge. */
.consenso__tasto {
  flex: 1 1 8rem;
  min-height: 3rem;
  padding: 0.5rem 1rem;
  border: 1px solid var(--inchiostro);
  border-radius: 999px;
  background: var(--inchiostro);
  color: var(--bianco);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.consenso__tasto:hover { background: #20242F; }
.consenso__tasto--leggero { flex-basis: 100%; background: none; color: var(--inchiostro); }
.consenso__tasto--leggero:hover { background: var(--perla); }
.consenso__tasto--pieno { flex-basis: 100%; border-color: var(--cobalto); background: var(--cobalto); }
.consenso__tasto--pieno:hover { background: var(--cobalto-scuro); }

.consenso-scelte {
  width: min(34rem, calc(100vw - 2rem));
  max-height: calc(100svh - 2rem);
  padding: clamp(1.5rem, 4vw, 2.25rem);
  border: 0;
  border-radius: 22px;
  background: var(--bianco);
  color: var(--inchiostro);
  box-shadow: 0 2rem 6rem rgba(11, 13, 18, 0.4);
}
.consenso-scelte::backdrop { background: rgba(6, 7, 11, 0.6); }
.consenso-scelte h2 { font-family: var(--titolo); font-size: 2rem; font-weight: 700; font-stretch: 80%; line-height: 1.05; letter-spacing: -0.02em; }
.consenso-scelte > p { margin-top: 0.6rem; }
.consenso__riga { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0.9rem; align-items: start; margin-top: 1rem; padding: 1rem; border: 1px solid var(--filo); border-radius: 12px; cursor: pointer; }
.consenso__riga input { width: 1.35rem; height: 1.35rem; margin: 0.15rem 0 0; accent-color: var(--cobalto); }
.consenso__riga strong { display: block; }
.consenso__riga span span { display: block; margin-top: 0.15rem; color: var(--grigio); font-size: 0.97rem; }
.consenso__piccolo { font-size: 0.95rem; }

.piede__preferenze { min-height: 2.75rem; padding: 0; border: 0; background: none; color: inherit; font: inherit; text-decoration: underline; text-underline-offset: 0.2em; cursor: pointer; }
.piede__legale { flex-basis: 100%; color: #9BA1B0; }
.prosa mark { padding: 0 0.3em; background: #FFE9A8; color: var(--inchiostro); }
.prosa code { font-size: 0.92em; }
.confronto--testo { min-width: 34rem; }
.confronto--testo thead th { font-family: var(--testo); font-size: 0.95rem; font-weight: 600; font-stretch: 100%; text-transform: none; }
.confronto--testo tbody th { width: 26%; font-weight: 500; }

/* ---------- Movimento ridotto ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation: none !important; }
  [data-parola] { color: var(--inchiostro); }
  .nastro__riga { flex-wrap: wrap; width: auto; white-space: normal; row-gap: 0.4rem; }
  .battuta li::before { opacity: 1; }
}
