/* ==========================================================================
   PIP — "Dipartimento della Non-Conformità"
   Un documento di regime che schedula le persone; lo Studio è la resistenza.
   Carta d'archivio + inchiostro, arancio #ff1e1e = timbro / allarme.
   ========================================================================== */
@font-face {
  font-family: 'Coluna Rounded';
  src: url('../assets/fonts/coluna-rounded.otf') format('opentype');
  font-display: swap;
}

:root {
  --carta: #e8e6df;
  --carta-2: #dedbd2;
  --inchiostro: #0b0b0b;
  --rosso: #ff1e1e;
  --grigio: #6b6860;
  --display: 'Coluna Rounded', 'Arial Narrow', Impact, sans-serif;
  --mono: 'Martian Mono', ui-monospace, monospace;
  --serif: 'Instrument Serif', Georgia, serif;
  --bordo: 1.5px solid var(--inchiostro);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; touch-action: manipulation; }
body {
  background: var(--carta);
  color: var(--inchiostro);
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.6;
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
::selection { background: var(--rosso); color: var(--inchiostro); }

/* ---------- atmosfera: grana, scanline, mirino ---------- */
.grana {
  position: fixed; inset: -50%;
  z-index: 900; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E");
  opacity: .22;
  mix-blend-mode: multiply;
  animation: grana 1s steps(6) infinite;
}
@keyframes grana {
  0% { transform: translate(0, 0); } 20% { transform: translate(-3%, 2%); } 40% { transform: translate(2%, -4%); }
  60% { transform: translate(-4%, -1%); } 80% { transform: translate(3%, 3%); } 100% { transform: translate(0, 0); }
}
.scanline {
  position: fixed; inset: 0; z-index: 899; pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(11,11,11,.05) 0 1px, transparent 1px 3px);
}
.scanline::after {
  content: ''; position: absolute; left: 0; right: 0; height: 18vh;
  background: linear-gradient(180deg, transparent, rgba(255,30,30,.06), transparent);
  animation: passa 7s linear infinite;
}
@keyframes passa { from { top: -20vh; } to { top: 110vh; } }

.mirino { display: none; }
@media (hover: hover) and (pointer: fine) {
  body, a, button { cursor: none; }
  .mirino {
    display: block; position: fixed; z-index: 950; pointer-events: none;
    width: 34px; height: 34px; margin: -17px 0 0 -17px;
    border: 1.5px solid var(--rosso); border-radius: 50%;
    left: 0; top: 0; transform: translate3d(-100px, -100px, 0);
    transition: width .2s, height .2s, margin .2s, background .2s;
  }
  .mirino::before, .mirino::after { content: ''; position: absolute; background: var(--rosso); }
  .mirino::before { left: 50%; top: -9px; bottom: -9px; width: 1px; }
  .mirino::after { top: 50%; left: -9px; right: -9px; height: 1px; }
  .mirino span {
    position: absolute; left: 26px; top: 26px; white-space: nowrap;
    font-size: 9px; letter-spacing: .1em; color: var(--rosso);
  }
  .mirino.su-link { width: 58px; height: 58px; margin: -29px 0 0 -29px; background: rgba(255,30,30,.12); }
}

/* ---------- avvio di sistema ---------- */
.boot {
  position: fixed; inset: 0; z-index: 1000;
  background: var(--inchiostro); color: #d8d6cf;
  display: flex; flex-direction: column; justify-content: center;
  padding: 0 8vw;
  transition: transform .9s cubic-bezier(.77, 0, .18, 1);
}
.boot.via { transform: translateY(-100%); }
html:not(.js) .boot { display: none; }
.boot pre { font-family: var(--mono); font-size: clamp(11px, 1.6vw, 15px); line-height: 1.9; white-space: pre-wrap; }
.boot pre .ok { color: #7cff6b; }
.boot pre .ko { color: var(--rosso); }
.boot-salta { position: absolute; bottom: 28px; left: 8vw; font-size: 10px; letter-spacing: .3em; text-transform: uppercase; opacity: .4; }
.timbro {
  display: inline-block;
  font-family: var(--display);
  text-transform: uppercase;
  color: var(--rosso);
  border: 3px solid var(--rosso);
  padding: 4px 14px 2px;
  transform: rotate(-8deg);
  letter-spacing: .04em;
}
.timbro-boot {
  align-self: flex-start;
  margin-top: 26px;
  font-size: clamp(40px, 9vw, 110px);
  opacity: 0;
  transform: rotate(-8deg) scale(2.4);
}
.timbro-boot.giu { animation: timbra .35s cubic-bezier(.2, 1.6, .4, 1) forwards; }
@keyframes timbra { to { opacity: 1; transform: rotate(-8deg) scale(1); } }

/* ---------- testata (si inverte da sola sullo sfondo) ---------- */
.testata {
  position: fixed; top: 0; left: 0; right: 0; z-index: 800;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 16px 4vw;
  mix-blend-mode: difference; color: #fff;
  font-size: 11px; letter-spacing: .18em; text-transform: uppercase;
}
.testata-logo img { height: 42px; width: auto; }
.testata-nav { display: flex; gap: 28px; }
.testata-nav a { text-decoration: none; position: relative; }
.testata-nav a::before { content: '['; opacity: 0; margin-right: 4px; transition: opacity .2s; }
.testata-nav a::after { content: ']'; opacity: 0; margin-left: 4px; transition: opacity .2s; }
.testata-nav a:hover::before, .testata-nav a:hover::after { opacity: 1; }
.testata-orologio { font-variant-numeric: tabular-nums; }

/* ---------- glitch del testo (RGB split a fette) ---------- */
.glitch { position: relative; }
.glitch::before, .glitch::after {
  content: attr(data-testo);
  position: absolute; inset: 0;
  pointer-events: none;
}
.glitch::before { color: var(--rosso); transform: translate(-.04em, 0); clip-path: inset(0 0 100% 0); mix-blend-mode: multiply; }
.glitch::after { color: #2bd4ff; transform: translate(.04em, 0); clip-path: inset(100% 0 0 0); mix-blend-mode: multiply; }
.glitch.scatto::before { animation: fetta 0.42s steps(2) 1; }
.glitch.scatto::after { animation: fetta 0.42s steps(2) 1 reverse; }
@keyframes fetta {
  0% { clip-path: inset(12% 0 70% 0); transform: translate(-.06em, 0); }
  25% { clip-path: inset(58% 0 22% 0); transform: translate(.05em, 0); }
  50% { clip-path: inset(30% 0 52% 0); transform: translate(-.03em, 0); }
  75% { clip-path: inset(80% 0 4% 0); transform: translate(.07em, 0); }
  100% { clip-path: inset(0 0 100% 0); transform: translate(0, 0); }
}

/* ---------- immagini con glitch (due copie sfasate in multiply) ---------- */
.img-glitch { position: relative; }
.img-glitch img { filter: grayscale(1) contrast(1.35); mix-blend-mode: multiply; }
.img-glitch::before, .img-glitch::after {
  content: ''; position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background: var(--img) center / contain no-repeat;
  mix-blend-mode: multiply; opacity: 0;
}
.img-glitch::before { filter: grayscale(1) contrast(1.4) sepia(1) saturate(9) hue-rotate(-28deg); transform: translateX(-6px); }
.img-glitch::after { filter: grayscale(1) contrast(1.4) sepia(1) saturate(6) hue-rotate(150deg); transform: translateX(6px); }
.img-glitch.scatto::before, .img-glitch.scatto::after { animation: img-fetta .5s steps(3) 1; }
@keyframes img-fetta {
  0% { opacity: .9; clip-path: inset(10% 0 75% 0); }
  33% { opacity: .9; clip-path: inset(45% 0 35% 0); transform: translateX(10px); }
  66% { opacity: .9; clip-path: inset(72% 0 8% 0); transform: translateX(-12px); }
  100% { opacity: 0; clip-path: inset(0 0 100% 0); }
}

/* ---------- comuni ---------- */
.kicker { font-size: 10.5px; letter-spacing: .3em; text-transform: uppercase; color: var(--grigio); margin-bottom: 14px; }
.titolo-sez {
  font-family: var(--display); font-weight: 400; text-transform: uppercase;
  font-size: clamp(48px, 8vw, 120px); line-height: .86; letter-spacing: -.005em;
}
.titolo-sez span { color: var(--rosso); }
.sussurro { font-family: var(--serif); font-style: italic; font-size: clamp(20px, 2.4vw, 30px); line-height: 1.15; margin-top: 18px; }
.testo { font-size: 13.5px; line-height: 1.75; max-width: 46ch; margin-top: 22px; }

/* ---------- 01 · hero ---------- */
.hero {
  position: relative; min-height: 100svh;
  padding: 110px 4vw 60px;
  display: grid;
  grid-template-rows: auto auto auto auto auto;
  overflow: hidden;
}
.hero-meta { display: flex; flex-wrap: wrap; gap: 6px 26px; font-size: 10.5px; letter-spacing: .22em; text-transform: uppercase; color: var(--grigio); border-top: var(--bordo); border-bottom: var(--bordo); padding: 9px 0; }
.hero-meta b { color: var(--rosso); font-weight: 600; }
.hero-titolo {
  font-family: var(--display); font-weight: 400; text-transform: uppercase;
  font-size: clamp(76px, 19vw, 330px); line-height: .8; letter-spacing: -.01em;
  margin-top: 3vh; position: relative; z-index: 3;
}
.hero-titolo-2 { text-align: right; margin-top: -2vh; }
.hero-gabbia {
  position: relative; z-index: 2;
  width: min(78vw, 640px); margin: -9vw auto -11vw;
  aspect-ratio: 1;
}
.hero-gabbia .img-glitch, .hero-gabbia img { width: 100%; height: 100%; object-fit: contain; }
.scanner {
  position: absolute; left: -4%; right: -4%; height: 2px; z-index: 4;
  background: var(--rosso); box-shadow: 0 0 18px 4px rgba(255,30,30,.55);
  animation: scansiona 3.6s cubic-bezier(.6, 0, .4, 1) infinite alternate;
}
@keyframes scansiona { from { top: 4%; } to { top: 96%; } }
.etichetta {
  position: absolute; z-index: 5; font-size: 10px; letter-spacing: .12em; text-transform: uppercase;
  background: var(--inchiostro); color: var(--carta); padding: 5px 8px; line-height: 1.5;
}
.etichetta-1 { left: -6%; top: 22%; }
.etichetta-2 { right: -4%; bottom: 24%; background: var(--rosso); color: var(--inchiostro); }
.hero-sussurro { font-family: var(--serif); font-style: italic; font-size: clamp(22px, 3vw, 40px); line-height: 1.1; margin: 4vh 0 0; max-width: 18em; position: relative; z-index: 3; }
.hero-codice { display: flex; align-items: center; gap: 16px; margin-top: 30px; font-size: 10px; letter-spacing: .2em; color: var(--grigio); }
.hero-codice svg { width: 160px; height: 34px; color: var(--inchiostro); flex: none; }

/* ---------- nastro di avvertimento ---------- */
.nastro {
  background: var(--rosso); color: var(--inchiostro);
  overflow: hidden; padding: 12px 0;
  border-top: var(--bordo); border-bottom: var(--bordo);
  position: relative; z-index: 4;
}
.nastro-traccia {
  display: flex; gap: 34px; width: max-content;
  font-family: var(--display); font-size: clamp(20px, 3vw, 34px); text-transform: uppercase; letter-spacing: .03em;
  animation: nastro 22s linear infinite;
}
.nastro-traccia i { font-style: normal; }
.nastro-inverso { animation-direction: reverse; animation-duration: 16s; }
@keyframes nastro { from { transform: translateX(0); } to { transform: translateX(-33.333%); } }

/* ---------- 02 · la folla (sticky, righe legate allo scroll) ---------- */
.folla { position: relative; height: 320vh; view-timeline-name: --folla; }
.folla-fissa { position: sticky; top: 0; height: 100svh; overflow: hidden; background: var(--carta); }
.folla-img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  filter: grayscale(1) contrast(1.15); mix-blend-mode: multiply; transform-origin: 50% 40%;
}
.folla-righe {
  position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center;
  padding: 0 6vw; gap: 1vh; z-index: 2;
}
.riga {
  font-family: var(--display); text-transform: uppercase;
  font-size: clamp(54px, 11vw, 190px); line-height: .86;
  color: var(--inchiostro);
}
.riga:nth-child(2) { padding-left: 12vw; }
.riga:nth-child(3) { padding-left: 24vw; }
.riga-tu { color: var(--rosso); padding-left: 0; font-size: clamp(64px, 14vw, 240px); }
.folla-nota { position: absolute; left: 4vw; bottom: 22px; font-size: 10px; letter-spacing: .18em; text-transform: uppercase; color: var(--grigio); z-index: 2; }

@supports (animation-timeline: view()) {
  .folla-img { animation: folla-zoom linear both; animation-timeline: --folla; animation-range: contain 0% contain 100%; }
  @keyframes folla-zoom { from { transform: scale(1); } to { transform: scale(1.35); } }
  .riga { opacity: 0; animation: riga-entra linear both; animation-timeline: --folla; }
  .riga:nth-child(1) { animation-range: contain 0% contain 18%; }
  .riga:nth-child(2) { animation-range: contain 18% contain 36%; }
  .riga:nth-child(3) { animation-range: contain 36% contain 54%; }
  .riga-tu { animation-name: riga-tu; animation-range: contain 60% contain 80%; }
  @keyframes riga-entra { from { opacity: 0; transform: translateX(-6vw); filter: blur(6px); } to { opacity: 1; transform: none; filter: none; } }
  @keyframes riga-tu { from { opacity: 0; transform: scale(1.6); } to { opacity: 1; transform: none; } }
}

/* ---------- 03 · protocolli ---------- */
.protocolli { padding: 16vh 4vw 12vh; position: relative; z-index: 3; background: var(--carta); }
.sezione-testa { margin-bottom: 7vh; }
.registro { list-style: none; border-top: var(--bordo); }
.voce {
  position: relative;
  display: grid; grid-template-columns: 60px 1.2fr 2fr 90px 90px 110px; align-items: center; gap: 18px;
  padding: 26px 0; border-bottom: var(--bordo);
  transition: background .25s, color .25s, padding .25s;
}
.voce::before {
  content: attr(data-tag); position: absolute; top: 6px; left: 0;
  font-size: 9px; letter-spacing: .2em; color: var(--grigio);
}
.voce-n { font-family: var(--display); font-size: 38px; color: var(--rosso); }
.voce-nome { font-family: var(--display); font-size: clamp(28px, 3.4vw, 50px); text-transform: uppercase; line-height: .9; }
.voce-desc { font-size: 12.5px; color: var(--grigio); }
.voce-durata { font-size: 11px; letter-spacing: .14em; }
.voce-prezzo { font-family: var(--display); font-size: 40px; }
.voce-vai {
  justify-self: end; text-decoration: none; font-weight: 600; font-size: 11px; letter-spacing: .2em;
  border: var(--bordo); padding: 10px 14px; transition: background .2s, color .2s;
}
.voce:hover { background: var(--inchiostro); color: var(--carta); padding-left: 18px; padding-right: 18px; }
.voce:hover .voce-desc, .voce:hover::before { color: #a9a69e; }
.voce:hover .voce-vai { border-color: var(--rosso); background: var(--rosso); color: var(--inchiostro); }
.timbro-mini { position: absolute; right: 18%; top: -14px; font-size: 15px; background: var(--carta); padding: 2px 10px 0; border-width: 2px; }

/* ---------- 04 · soggetto ---------- */
.soggetto {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 6vw; align-items: center;
  padding: 14vh 4vw; background: var(--carta-2); border-top: var(--bordo); border-bottom: var(--bordo);
  position: relative; z-index: 3;
}
.soggetto-scheda { border: var(--bordo); background: var(--carta); padding: 14px; box-shadow: 10px 10px 0 var(--inchiostro); transform: rotate(-1.5deg); }
.soggetto-foto { position: relative; aspect-ratio: 1 / 1; overflow: hidden; background: #fff; touch-action: pan-y; }
.soggetto-foto img { width: 100%; height: 100%; object-fit: cover; filter: contrast(1.1); }
.lente {
  position: absolute; width: 130px; height: 130px; margin: -65px 0 0 -65px; left: 50%; top: 45%;
  border-radius: 50%; border: 2px solid var(--rosso);
  backdrop-filter: invert(1) contrast(1.4); -webkit-backdrop-filter: invert(1) contrast(1.4);
  box-shadow: 0 0 0 9999px rgba(11,11,11,.12);
  pointer-events: none;
  animation: perlustra 9s ease-in-out infinite;
}
.soggetto-foto.segue .lente { animation: none; }
@keyframes perlustra {
  0% { left: 30%; top: 35%; } 25% { left: 66%; top: 42%; } 50% { left: 55%; top: 70%; } 75% { left: 36%; top: 62%; } 100% { left: 30%; top: 35%; }
}
.angolo { position: absolute; width: 22px; height: 22px; border: 2px solid var(--rosso); }
.a1 { top: 10px; left: 10px; border-right: 0; border-bottom: 0; }
.a2 { top: 10px; right: 10px; border-left: 0; border-bottom: 0; }
.a3 { bottom: 10px; left: 10px; border-right: 0; border-top: 0; }
.a4 { bottom: 10px; right: 10px; border-left: 0; border-top: 0; }
.soggetto-dati { margin-top: 14px; display: grid; gap: 0; }
.soggetto-dati div { display: grid; grid-template-columns: 110px 1fr; border-top: 1px dashed var(--grigio); padding: 8px 0; }
.soggetto-dati dt { font-size: 10px; letter-spacing: .2em; text-transform: uppercase; color: var(--grigio); }
.soggetto-dati dd { font-size: 12.5px; }
.soggetto-dati b { font-weight: 600; }
.dato-rosso { color: var(--rosso); font-family: var(--display); font-size: 28px !important; line-height: 1; }

/* ---------- 05 · liberazione (inversa: nero) ---------- */
.liberazione {
  position: relative; z-index: 3; overflow: hidden;
  background: var(--inchiostro); color: var(--carta);
  padding: 12vh 0 16vh;
}
.lib-img { width: min(92vw, 1100px); margin: 0 auto; }
.lib-img img { width: 100%; filter: grayscale(1) contrast(1.4) invert(1); mix-blend-mode: screen; }
.lib-img::before, .lib-img::after { mix-blend-mode: screen; filter: invert(1) sepia(1) saturate(9) hue-rotate(-28deg) !important; }
.nastro-storto { transform: rotate(-4deg) scale(1.08); margin-top: -10vh; }
.lib-frase {
  display: flex; flex-wrap: wrap; gap: 0 3vw; justify-content: center;
  font-family: var(--display); text-transform: uppercase;
  font-size: clamp(56px, 12vw, 200px); line-height: .9; margin-top: 10vh; padding: 0 4vw;
}
.lib-frase span:nth-child(2) { color: var(--rosso); }
@supports (animation-timeline: view()) {
  .lib-frase span { animation: sciogli linear both; animation-timeline: view(); animation-range: entry 0% cover 45%; }
  .lib-frase span:nth-child(2) { animation-range: entry 10% cover 50%; }
  .lib-frase span:nth-child(3) { animation-range: entry 20% cover 55%; }
  @keyframes sciogli { from { opacity: 0; letter-spacing: .5em; filter: blur(12px); } to { opacity: 1; letter-spacing: 0; filter: none; } }
}

/* ---------- 06 · evasione ---------- */
.evasione {
  position: relative; z-index: 3; min-height: 120svh;
  display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 4vw;
  padding: 14vh 4vw; background: var(--carta); overflow: hidden;
}
.evasione-img { width: 100%; max-width: 560px; justify-self: center; filter: grayscale(1) contrast(1.4); mix-blend-mode: multiply; }
@supports (animation-timeline: view()) {
  .evasione-img { animation: cade linear both; animation-timeline: view(); animation-range: entry 0% exit 100%; }
  @keyframes cade { from { transform: translateY(calc(var(--cade, 28vh) * -1)) rotate(-6deg); } to { transform: translateY(var(--cade, 26vh)) rotate(8deg); } }
}
.titolo-enorme { font-size: clamp(64px, 10vw, 170px); }
.bottone {
  display: inline-flex; align-items: center; gap: 22px; margin-top: 34px;
  background: var(--inchiostro); color: var(--carta); text-decoration: none;
  font-family: var(--display); font-size: clamp(24px, 2.6vw, 34px); text-transform: uppercase;
  padding: 20px 30px 16px; border: var(--bordo);
  box-shadow: 8px 8px 0 var(--rosso);
  transition: transform .15s, box-shadow .15s, background .15s, color .15s;
}
.bottone:hover { transform: translate(4px, 4px); box-shadow: 4px 4px 0 var(--rosso); background: var(--rosso); color: var(--inchiostro); }
.bottone:active { transform: translate(8px, 8px); box-shadow: 0 0 0 var(--rosso); }
.evasione-pwa { margin-top: 26px; font-size: 11px; line-height: 1.9; color: var(--grigio); }
.evasione-pwa b { color: var(--inchiostro); font-weight: 600; }

/* ---------- 07 · coordinate ---------- */
.coordinate { position: relative; z-index: 3; background: var(--carta-2); border-top: var(--bordo); padding: 12vh 4vw 10vh; overflow: hidden; }
.coord-griglia { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4vw; position: relative; z-index: 2; }
.coord-griglia h3 { font-family: var(--display); font-weight: 400; font-size: 34px; text-transform: uppercase; margin-bottom: 10px; }
.coord-griglia p { font-size: 13px; line-height: 1.8; }
.coord-griglia a { text-decoration-color: var(--rosso); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.coord-gigante {
  font-family: var(--display); font-size: clamp(90px, 20vw, 360px); line-height: .82; text-transform: uppercase;
  color: transparent; -webkit-text-stroke: 1.5px var(--inchiostro); opacity: .18;
  margin-top: 8vh; white-space: nowrap;
}

.piede { position: relative; z-index: 3; background: var(--inchiostro); color: #a9a69e; padding: 34px 4vw; display: flex; align-items: center; gap: 22px; flex-wrap: wrap; font-size: 10.5px; letter-spacing: .1em; }
.piede img { height: 40px; width: auto; }
.piede a { color: var(--carta); }

/* ---------- comparsa (fallback senza scroll-timeline) ---------- */
html.js .appare { opacity: 0; transform: translateY(30px); transition: opacity .8s ease, transform .8s ease; }
html.js .appare.vista { opacity: 1; transform: none; }

/* ---------- telefono ---------- */
@media (max-width: 760px) {
  body { font-size: 12.5px; }
  .testata { padding: 12px 18px; }
  .testata-logo img { height: 34px; }
  .testata-nav { display: none; }
  .hero { padding: 84px 18px 50px; }
  .hero-gabbia { width: 92vw; margin: -6vw auto -10vw; }
  .etichetta { font-size: 8.5px; }
  .etichetta-1 { left: 0; top: 10%; }
  .etichetta-2 { right: 0; bottom: 14%; }
  .folla { height: 260vh; }
  .riga:nth-child(2) { padding-left: 8vw; }
  .riga:nth-child(3) { padding-left: 16vw; }
  .protocolli { padding: 12vh 18px 10vh; }
  .voce { grid-template-columns: 44px 1fr auto; grid-template-areas: 'n nome prezzo' 'n desc desc' 'n durata vai'; gap: 6px 12px; padding: 24px 0 18px; }
  .voce-n { grid-area: n; font-size: 30px; align-self: start; }
  .voce-nome { grid-area: nome; }
  .voce-desc { grid-area: desc; }
  .voce-durata { grid-area: durata; align-self: center; }
  .voce-prezzo { grid-area: prezzo; font-size: 32px; }
  .voce-vai { grid-area: vai; }
  .timbro-mini { right: 4px; font-size: 12px; }
  .voce:hover { padding-left: 10px; padding-right: 10px; }
  .soggetto, .evasione { grid-template-columns: 1fr; padding: 10vh 18px; }
  .soggetto-scheda { transform: rotate(-1deg); box-shadow: 6px 6px 0 var(--inchiostro); }
  .evasione { min-height: auto; }
  .evasione-img { max-width: 62vw; --cade: 6vh; }
  .evasione-box { position: relative; z-index: 2; }
  .coordinate { padding: 10vh 18px 8vh; }
  .coord-griglia { grid-template-columns: 1fr; gap: 28px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .riga, .lib-frase span { opacity: 1 !important; }
  .boot { display: none; }
}

/* ===== testi del barbiere (v3) ===== */
.rosso { color: var(--rosso); }
.hero-sub { font-size: 13.5px; line-height: 1.75; max-width: 46ch; margin-top: 14px; position: relative; z-index: 3; }
.hero-azioni { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 8px; position: relative; z-index: 3; }
.bottone-vuoto { background: transparent; color: var(--inchiostro); box-shadow: 8px 8px 0 var(--inchiostro); }
.bottone-vuoto:hover { background: var(--inchiostro); color: var(--carta); box-shadow: 4px 4px 0 var(--rosso); }
.riga-tu { font-size: clamp(46px, 9vw, 160px) !important; margin-top: 2vh; }
.prodotti { padding: 10vh 4vw 0; position: relative; z-index: 2; }
.prodotti .kicker { color: #a9a69e; }
.registro-scuro { border-top-color: var(--carta); margin-top: 6vh; }
.registro-scuro .voce { border-bottom-color: rgba(232,230,223,.5); }
.voce-prodotto { grid-template-columns: 60px 1.2fr 2fr 90px; }
.voce-prodotto .voce-desc { color: #a9a69e; }
.liberazione .voce:hover { background: var(--carta); color: var(--inchiostro); }
.liberazione .voce:hover .voce-desc { color: var(--grigio); }
.testo-chiaro { color: #cfccc4; max-width: 60ch; }
.evasione .testo b { font-weight: 600; color: var(--rosso); }
.coordinate .titolo-sez { margin-bottom: 6vh; }
.coord-griglia h3 { font-size: 28px; }
@media (max-width: 760px) {
  .hero-azioni .bottone { font-size: 21px; padding: 16px 20px 12px; }
  .prodotti { padding: 8vh 18px 0; }
  .voce-prodotto { grid-template-columns: 44px 1fr auto; grid-template-areas: 'n nome prezzo' 'n desc desc'; }
}
/* il contenitore ha z-index (= livello isolato): la fusione col foglio va fatta su di lui,
   altrimenti il fondo bianco dell'immagine resta un riquadro */
.hero-gabbia { mix-blend-mode: multiply; }
/* la gabbia si adatta all'altezza: su computer "PERSONALITY / IS PRIORITY" stanno nella prima schermata */
.hero-gabbia { width: min(78vw, 640px, 56vh); }
@media (max-width: 760px) {
  .hero-gabbia { width: 92vw; }
  .etichetta-2 { bottom: auto; top: 58%; }
}


/* ===== v7: niente emoticon — separatori e frecce disegnati in CSS ===== */
.sep { display: inline-block; width: .5em; height: .5em; align-self: center; background: currentColor; transform: rotate(45deg); }
.freccia { display: inline-block; position: relative; width: 1.1em; height: 2px; background: currentColor; vertical-align: middle; margin-left: .45em; }
.freccia::after { content: ''; position: absolute; right: 0; top: 50%; width: .42em; height: .42em; border-top: 2px solid currentColor; border-right: 2px solid currentColor; transform: translateY(-50%) rotate(45deg); }
.voce-vai .freccia { width: 1.4em; }

/* ===== 1) aperto / chiuso in tempo reale ===== */
.testata-stato { display: flex; align-items: center; gap: 10px; font-variant-numeric: tabular-nums; }
.stato-punto { width: 8px; height: 8px; border-radius: 50%; background: #fff; }
.stato-punto.aperto { animation: lampeggia 1.2s steps(2) infinite; }
@keyframes lampeggia { 50% { opacity: .15; } }


/* ===== 5) il biglietto dell'attesa ===== */
.distributore { position: relative; width: 230px; margin: 30px 0 10px; }
.fessura { height: 14px; background: var(--inchiostro); border-radius: 3px; position: relative; z-index: 2; box-shadow: inset 0 -5px 0 #2a2a2a; }
.biglietto {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  width: 200px; margin: -4px auto 0; padding: 16px 14px 12px;
  background: #f6f4ee; color: var(--inchiostro); text-decoration: none;
  border: 1px solid #cfccc4; box-shadow: 0 10px 20px rgba(0,0,0,.12);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 6px), 95% 100%, 90% calc(100% - 6px), 85% 100%, 80% calc(100% - 6px), 75% 100%, 70% calc(100% - 6px), 65% 100%, 60% calc(100% - 6px), 55% 100%, 50% calc(100% - 6px), 45% 100%, 40% calc(100% - 6px), 35% 100%, 30% calc(100% - 6px), 25% 100%, 20% calc(100% - 6px), 15% 100%, 10% calc(100% - 6px), 5% 100%, 0 calc(100% - 6px));
  transition: transform .2s;
}
.biglietto:hover { transform: rotate(-2deg) translateY(4px); }
.b-titolo { font-size: 8.5px; letter-spacing: .14em; text-transform: uppercase; text-align: center; }
.b-etichetta { font-size: 9px; letter-spacing: .3em; text-transform: uppercase; color: var(--grigio); margin-top: 8px; }
.b-numero { font-family: var(--display); font-size: 78px; line-height: .9; color: var(--rosso); }
.b-riga { font-size: 9.5px; letter-spacing: .08em; }
.b-codice { width: 120px; height: 22px; margin-top: 8px; }
@supports (animation-timeline: view()) {
  .biglietto { animation: stampa linear both; animation-timeline: view(); animation-range: entry 30% cover 55%; }
  @keyframes stampa { from { clip-path: inset(0 0 100% 0); transform: translateY(-40px); } to { transform: none; } }
}

/* ===== logo: a sinistra in cima, al centro mentre scorri (classe .centro da sito.js) ===== */
.testata { --margine: 4vw; justify-content: flex-end; min-height: 74px; }
.testata-logo {
  position: absolute; top: 50%; left: var(--margine);
  transform: translate(0, -50%);
  transition: left .7s cubic-bezier(.7, 0, .2, 1), transform .7s cubic-bezier(.7, 0, .2, 1);
}
.testata.centro .testata-logo { left: 50%; transform: translate(-50%, -50%); }
.testata-nav {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  transition: opacity .35s ease;
}
.testata.centro .testata-nav { opacity: 0; pointer-events: none; }
@media (max-width: 760px) {
  .testata { --margine: 18px; min-height: 58px; }
}

/* telefono: quando il logo va al centro, l'orario si sposta a sinistra (al posto del logo) */
.testata-orologio { transition: transform .7s cubic-bezier(.7, 0, .2, 1); }
@media (max-width: 760px) {
  .testata.centro .testata-orologio { transform: translateX(calc(-100vw + 2 * var(--margine) + 100%)); }
}
@media (max-width: 760px) { .oro-citta { display: none; } }

/* ===== la poltrona (sezione "Poltrona libera?") =====
   stessa immagine in due livelli: sopra l'uomo (fino al 48.8%), sotto la poltrona.
   Scorrendo l'uomo scende e appoggia il piede sulla poltrona. */
.poltrona { position: relative; width: 100%; max-width: 430px; justify-self: center; mix-blend-mode: multiply; }
.poltrona img { display: block; width: 100%; height: auto; }
.poltrona-sedia { clip-path: inset(48.8% 0 0 0); }
.poltrona-uomo { position: absolute; inset: 0; clip-path: inset(0 0 51.2% 0); }
@supports (animation-timeline: view()) {
  .poltrona-uomo { animation: si-siede linear both; animation-timeline: view(); animation-range: entry 15% cover 50%; }
  @keyframes si-siede {
    0%   { transform: translateY(-34%) rotate(-4deg); opacity: .35; }
    80%  { transform: translateY(1.2%) rotate(.5deg); opacity: 1; }
    100% { transform: none; opacity: 1; }
  }
}

/* la figura che cade, grande e sbiadita dietro i contatti */
.coordinate { isolation: auto; }
.coord-cade {
  position: absolute; right: 2vw; top: 6vh; width: min(46vw, 520px); z-index: 1;
  opacity: .16; filter: grayscale(1) contrast(1.3); mix-blend-mode: multiply; pointer-events: none;
  animation: fluttua 9s ease-in-out infinite alternate;
}
@keyframes fluttua { from { transform: translateY(-14px) rotate(-3deg); } to { transform: translateY(18px) rotate(2deg); } }
@media (max-width: 760px) {
  .poltrona { max-width: 66vw; }
  .coord-cade { width: 70vw; right: -8vw; top: 2vh; opacity: .12; }
}

/* ===== PRODOTTI v2: su carta, "stampa sfasata" a due colori ===== */
.prodotti-sez { position: relative; z-index: 3; background: var(--carta); border-top: var(--bordo); padding: 14vh 0 12vh; overflow: hidden; }
.prodotti-testa { padding: 0 4vw; position: relative; z-index: 3; }
.riso { position: relative; width: min(92vw, 980px); aspect-ratio: 942 / 535; margin: 5vh auto 0; }
.riso-nero, .riso-rosso { position: absolute; inset: 0; width: 100%; height: 100%; }
.riso-nero { object-fit: contain; mix-blend-mode: multiply; }
.riso-rosso {
  background: var(--rosso);
  -webkit-mask: url('/assets/sfondo/sfondo-2-sagome.png') center / contain no-repeat;
          mask: url('/assets/sfondo/sfondo-2-sagome.png') center / contain no-repeat;
  mix-blend-mode: multiply;
  transform: translate(14px, 10px);
}
/* crocini di registro agli angoli, come su un foglio di prova di stampa */
.crocino { position: absolute; width: 26px; height: 26px; }
.crocino::before, .crocino::after { content: ''; position: absolute; background: var(--inchiostro); }
.crocino::before { left: 50%; top: 0; bottom: 0; width: 1.5px; }
.crocino::after { top: 50%; left: 0; right: 0; height: 1.5px; }
.c1 { left: -13px; top: -13px; } .c2 { right: -13px; top: -13px; } .c3 { left: -13px; bottom: -13px; } .c4 { right: -13px; bottom: -13px; }
@supports (animation-timeline: view()) {
  .riso-nero { animation: riso-nero linear both; animation-timeline: view(); animation-range: cover 0% cover 100%; }
  .riso-rosso { animation: riso-rosso linear both; animation-timeline: view(); animation-range: cover 0% cover 100%; }
  @keyframes riso-nero { 0% { transform: translateX(-9vw) rotate(-3deg); } 50% { transform: none; } 100% { transform: translateX(9vw) rotate(3deg); } }
  @keyframes riso-rosso { 0% { transform: translate(11vw, 3vh) rotate(4deg); } 50% { transform: translate(10px, 7px); } 100% { transform: translate(-11vw, -3vh) rotate(-4deg); } }
}
.prodotti-sez .nastro-storto { margin-top: -6vh; position: relative; z-index: 4; }
.prodotti-sez .prodotti { padding: 9vh 4vw 0; }
.prodotti-sez .registro { margin-top: 0; }
.prodotti-sez .voce-prezzo { color: var(--rosso); }
@media (max-width: 760px) {
  .prodotti-sez .prodotti { padding: 8vh 18px 0; }
  .prodotti-testa { padding: 0 18px; }
  .riso { width: 94vw; }
  .crocino { width: 18px; height: 18px; }
  .c1, .c3 { left: -6px; } .c2, .c4 { right: -6px; } .c1, .c2 { top: -9px; } .c3, .c4 { bottom: -9px; }
}

/* ===== prodotti dal database (inseriti da Stefano nell'app) ===== */
.prodotti-sez .voce-prodotto { grid-template-columns: 50px 64px 1.1fr 2fr 80px 170px; }
.voce-foto { width: 64px; height: 64px; border: var(--bordo); background: #f6f4ee; overflow: hidden; display: block; }
.voce-foto img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(.2) contrast(1.05); }
.voce-foto i { display: block; width: 100%; height: 100%; background: repeating-linear-gradient(-45deg, transparent 0 6px, rgba(11,11,11,.12) 6px 7px); }
.voce-desc b { font-weight: 600; text-transform: uppercase; letter-spacing: .12em; font-size: 10px; }
.voce-prodotto .voce-vai { font-size: 10px; }
.voce-esaurito { justify-self: end; font-size: 10px; letter-spacing: .2em; text-transform: uppercase; color: var(--rosso); border: 1.5px solid var(--rosso); padding: 8px 10px; transform: rotate(-4deg); }
.voce-prodotto.esaurito .voce-nome, .voce-prodotto.esaurito .voce-prezzo { text-decoration: line-through; opacity: .5; }
.voce-vuota { display: block !important; font-family: var(--serif); font-style: italic; font-size: 22px; padding: 28px 0 !important; }
@media (max-width: 760px) {
  .prodotti-sez .voce-prodotto {
    grid-template-columns: 30px 56px 1fr auto;
    grid-template-areas: 'n foto nome prezzo' 'n foto desc desc' 'n foto vai vai';
  }
  .voce-foto { grid-area: foto; width: 56px; height: 56px; align-self: start; }
  .prodotti-sez .voce-prodotto .voce-vai, .voce-esaurito { grid-area: vai; justify-self: start; margin-top: 6px; }
}


/* ===== vetrina prodotti: 3 schede, poi si scorre verso destra ===== */
.vetrina-testa { display: flex; align-items: center; justify-content: space-between; border-top: var(--bordo); padding-top: 14px; margin-bottom: 18px; }
.vetrina-conta { font-size: 11px; letter-spacing: .24em; text-transform: uppercase; font-variant-numeric: tabular-nums; }
.vetrina-frecce { display: flex; gap: 8px; }
.vetrina-freccia { width: 46px; height: 46px; border: var(--bordo); background: transparent; position: relative; transition: background .2s, color .2s; color: var(--inchiostro); }
.vetrina-freccia::before { content: ''; position: absolute; left: 50%; top: 50%; width: 11px; height: 11px; border-top: 2px solid currentColor; border-right: 2px solid currentColor; transform: translate(-65%, -50%) rotate(45deg); }
.vetrina-freccia.indietro::before { transform: translate(-35%, -50%) rotate(-135deg); }
.vetrina-freccia:hover:not(:disabled) { background: var(--inchiostro); color: var(--carta); }
.vetrina-freccia:disabled { opacity: .25; }
.vetrina {
  list-style: none; display: grid; grid-auto-flow: column;
  grid-auto-columns: calc((100% - 2 * 20px) / 3); column-gap: 20px;
  overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
  -webkit-overflow-scrolling: touch; padding: 6px 6px 10px 0;
}
.vetrina::-webkit-scrollbar { display: none; }
.scheda {
  scroll-snap-align: start; position: relative;
  display: flex; flex-direction: column; gap: 10px;
  border: var(--bordo); background: #f2f0ea; padding: 14px 14px 16px;
  transition: transform .25s, box-shadow .25s;
}
.scheda:hover { transform: translate(-3px, -3px); box-shadow: 6px 6px 0 var(--inchiostro); }
.scheda-n { position: absolute; top: 10px; left: 12px; z-index: 2; font-family: var(--display); font-size: 26px; color: var(--rosso); }
.scheda-foto { display: block; aspect-ratio: 4 / 3; border: var(--bordo); background: #f6f4ee; overflow: hidden; }
.scheda-foto img { width: 100%; height: 100%; object-fit: cover; }
.scheda-foto i { display: block; width: 100%; height: 100%; background: repeating-linear-gradient(-45deg, transparent 0 9px, rgba(11,11,11,.1) 9px 10px); }
.scheda-nome { font-family: var(--display); font-size: clamp(24px, 2.4vw, 34px); text-transform: uppercase; line-height: .95; }
.scheda-desc { font-size: 12px; color: var(--grigio); flex: 1; }
.scheda-desc b { font-weight: 600; text-transform: uppercase; letter-spacing: .12em; font-size: 10px; color: var(--inchiostro); }
.scheda-piede { display: flex; align-items: center; justify-content: space-between; gap: 10px; border-top: 1px dashed rgba(11,11,11,.35); padding-top: 12px; }
.scheda-prezzo { font-family: var(--display); font-size: 34px; color: var(--rosso); line-height: 1; }
.scheda .voce-vai { font-size: 10px; padding: 9px 10px; }
.scheda.esaurito .scheda-nome, .scheda.esaurito .scheda-prezzo { text-decoration: line-through; opacity: .5; }
.scheda-vuota { font-family: var(--serif); font-style: italic; font-size: 22px; padding: 20px 0; }
@media (max-width: 960px) { .vetrina { grid-auto-columns: calc((100% - 20px) / 2); } }
@media (max-width: 760px) {
  .vetrina { grid-auto-columns: 78%; column-gap: 14px; margin-right: -18px; padding-right: 18px; }
  .vetrina-freccia { width: 40px; height: 40px; }
}

/* logo in testata: solo il simbolo, un po' piu' grande */
.testata-logo img { height: 50px; }
@media (max-width: 760px) { .testata-logo img { height: 42px; } }
/* "art." un po' piu' a destra: non deve stare sopra la figura scura della folla */
.riga:nth-child(3) { padding-left: 30vw; }
@media (max-width: 760px) { .riga:nth-child(3) { padding-left: 24vw; } }


/* ===== scarica l'app ===== */
.app-sez {
  position: relative; z-index: 3; background: var(--carta-2); border-top: var(--bordo);
  display: grid; grid-template-columns: 1.1fr 1fr; gap: 4vw 5vw; align-items: center;
  padding: 14vh 4vw 12vh; overflow: hidden;
}
.app-link { margin-top: 18px; font-size: 11px; letter-spacing: .14em; }
.app-link a { color: var(--inchiostro); text-decoration-color: var(--rosso); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.evasione-pwa a { color: var(--inchiostro); font-weight: 600; text-decoration-color: var(--rosso); text-decoration-thickness: 2px; }
.app-qr { display: flex; align-items: center; gap: 18px; margin-top: 34px; padding: 14px; border: var(--bordo); background: var(--carta); max-width: 400px; box-shadow: 6px 6px 0 var(--inchiostro); }
.app-qr svg { width: 108px; height: 108px; flex: none; shape-rendering: crispEdges; }
.app-qr p { font-size: 11.5px; line-height: 1.7; }
.app-qr b { font-weight: 600; }
.app-qr p::before { content: '// scansione'; display: block; font-size: 9.5px; letter-spacing: .3em; text-transform: uppercase; color: var(--rosso); margin-bottom: 6px; }

/* due telefoni d'archivio con le schermate vere dell'app */
.app-telefoni { position: relative; height: min(78vh, 680px); }
.app-tel {
  position: absolute; margin: 0; width: min(46%, 270px); aspect-ratio: 390 / 844;
  border: 2px solid var(--inchiostro); border-radius: 30px; padding: 7px; background: var(--inchiostro);
  box-shadow: 10px 10px 0 var(--rosso);
}
.app-tel img { width: 100%; height: 100%; object-fit: cover; border-radius: 23px; display: block; }
.app-tel-davanti { left: 18%; top: 4%; z-index: 2; }
.app-tel-dietro { left: 50%; top: 13%; z-index: 1; box-shadow: 10px 10px 0 var(--inchiostro); }
.app-tel-dietro img { filter: grayscale(1) contrast(1.05); }
.app-timbro { position: absolute; z-index: 3; left: 8%; bottom: 10%; font-size: clamp(26px, 3vw, 40px); background: var(--carta-2); }
@supports (animation-timeline: view()) {
  .app-tel-davanti { animation: telSale linear both; animation-timeline: view(); animation-range: entry 0% cover 55%; }
  .app-tel-dietro { animation: telSale2 linear both; animation-timeline: view(); animation-range: entry 0% cover 60%; }
  @keyframes telSale { from { transform: translateY(18vh); } to { transform: none; } }
  @keyframes telSale2 { from { transform: translateY(30vh); } to { transform: none; } }
}

/* guide di installazione come moduli */
.app-guide { grid-column: 1 / -1; position: relative; z-index: 4; display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin-top: 4vh; }
.app-guida { border: var(--bordo); background: var(--carta); padding: 22px 22px 18px; }
.app-guida h3 { font-family: var(--display); font-weight: 400; font-size: clamp(26px, 2.6vw, 36px); text-transform: uppercase; line-height: 1; border-bottom: 1.5px dashed rgba(11,11,11,.4); padding-bottom: 12px; margin-bottom: 8px; }
.app-guida h3 span { color: var(--rosso); font-size: .6em; margin-left: 8px; letter-spacing: .04em; }
.app-guida ol { list-style: none; }
.app-guida li { display: flex; gap: 14px; align-items: baseline; padding: 9px 0; border-bottom: 1px solid rgba(11,11,11,.12); font-size: 12.5px; line-height: 1.6; }
.app-guida li:last-child { border-bottom: 0; }
.app-guida li b { font-family: var(--display); font-weight: 400; font-size: 20px; color: var(--rosso); flex: none; width: 28px; }
.app-guida strong { font-weight: 600; }

@media (max-width: 960px) {
  .app-sez { grid-template-columns: 1fr; padding: 10vh 18px 9vh; }
  .app-telefoni { height: 560px; max-width: 460px; width: 100%; justify-self: center; }
  .app-tel { width: 58%; }
  .app-tel-davanti { left: 4%; }
  .app-tel-dietro { left: 40%; }
  .app-guide { grid-template-columns: 1fr; }
}
/* dal telefono il QR non serve: sei gia' sul telefono */
@media (max-width: 760px) { .app-qr { display: none; } .app-telefoni { height: 540px; margin-top: 4vh; } }
