:root {
  --k: 1; /* quanto sono "sparsi" i fogli */

  --cork: #4f4e4b;
  --paper: #ece3c9; /* carta ingiallita */
  --paper-white: #f1ece0;
  --polaroid: #e7dcbc;
  --postit: #ede3bd;
  --thermal: #eeebe3;
  --dark: #1c1b19;
  --ink: #1a1917;
  --ink-soft: #4a463e;
  --chalk: #efece4;

  --f-display: "Anton", Impact, sans-serif;
  --f-dymo: "Archivo Black", "Arial Black", sans-serif;
  --f-type: "Special Elite", "Courier New", monospace;
  --f-hand: "Caveat", cursive;

  --noise: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/><feColorMatrix type='saturate' values='0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  --shadow: 1px 2px 2px rgba(0, 0, 0, 0.35), 4px 14px 22px rgba(0, 0, 0, 0.5);
  --shadow-up: 2px 5px 5px rgba(0, 0, 0, 0.3), 12px 30px 38px rgba(0, 0, 0, 0.55);
  --dymo-bg: linear-gradient(180deg, #2e2e2d 0%, #151515 42%, #0b0b0b 58%, #1f1f1e 100%);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 30px; overflow-x: clip; }
/* barra di scorrimento nascosta: la pagina scorre come prima (rotella, trackpad, tastiera, dito) */
html, body { scrollbar-width: none; -ms-overflow-style: none; }
html::-webkit-scrollbar, body::-webkit-scrollbar { display: none; width: 0; height: 0; }

/* ---------- materiali ---------- */
:root {
  /* sughero vero, marrone ma scurito e un po' spento per l'atmosfera */
  --cork-tex: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='260' height='260'><filter id='a'><feTurbulence type='fractalNoise' baseFrequency='.62' numOctaves='3' seed='4' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .78  0 0 0 0 .6  0 0 0 0 .42  2.6 0 0 0 -1.35'/></filter><filter id='b'><feTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='2' seed='11' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .12  0 0 0 0 .07  0 0 0 0 .03  -3.2 0 0 0 1.62'/></filter><filter id='c'><feTurbulence type='fractalNoise' baseFrequency='.03' numOctaves='2' seed='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  -1.6 0 0 0 .9'/></filter><rect width='100%' height='100%' fill='%235b4331'/><rect width='100%' height='100%' filter='url(%23c)' opacity='.35'/><rect width='100%' height='100%' filter='url(%23a)' opacity='.5'/><rect width='100%' height='100%' filter='url(%23b)' opacity='.6'/></svg>");
}

body {
  position: relative;
  min-height: 100vh;
  background-color: #0b0a09;
  color: var(--chalk);
  font-family: var(--f-type);
  line-height: 1.55;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}
/* vignettatura cupa su tutta la pagina */
body::after {
  content: "";
  position: fixed; inset: 0; z-index: 4; pointer-events: none;
  background: radial-gradient(ellipse 85% 75% at 50% 45%, transparent 40%, rgba(0, 0, 0, 0.62) 100%);
}

img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; }
a { color: inherit; }
:focus-visible { outline: 2px dashed var(--chalk); outline-offset: 5px; }

.noscript { padding: 140px 24px; text-align: center; }

/* ---------- fogli di carta ---------- */
.paper {
  position: relative;
  display: block;
  color: var(--ink);
  background-color: var(--paper);
  background-image:
    radial-gradient(ellipse at 12% 8%, rgba(140, 105, 40, 0.16), transparent 45%),
    radial-gradient(ellipse at 92% 96%, rgba(120, 85, 30, 0.22), transparent 50%),
    radial-gradient(circle at 60% 40%, rgba(255, 250, 235, 0.35), transparent 42%);
  box-shadow: inset 0 0 34px rgba(120, 90, 35, 0.28), var(--shadow);
  rotate: var(--r, 0deg);
  translate: calc(var(--dx, 0) * var(--k) * 1px) calc(var(--dy, 0) * var(--k) * 1px);
  transform-origin: 50% 11px; /* ruota attorno alla puntina */
  border: 0;
  text-align: left;
  transition: box-shadow 0.4s ease;
}
.paper::after {
  content: "";
  position: absolute; inset: 0; pointer-events: none;
  background-image: var(--noise);
  opacity: 0.2; mix-blend-mode: multiply;
}

/* sulla bacheca il foglio dondola appeso alla puntina (vedi main.js); sul tavolo si solleva appena */
.board .paper:hover, .table .paper:hover { box-shadow: inset 0 0 34px rgba(120, 90, 35, 0.28), var(--shadow-up); }
.board .paper.dark:hover, .table .paper.dark:hover { box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.6), var(--shadow-up); }
.table .paper { transition: box-shadow 0.4s ease, scale 0.4s ease; }
.table .paper:hover { scale: 1.015; }
.clickable { cursor: pointer; }

/* le puntine vere sono disegnate da main.js: queste sono solo i punti di aggancio */
.pin { position: absolute; top: 11px; left: 50%; width: 0; height: 0; }

.sign { font-family: var(--f-hand); font-weight: 700; font-size: 34px; text-align: right; line-height: 1; margin-top: 18px; }

/* polaroid */
.polaroid { background-color: var(--polaroid); padding: 14px 14px 18px; }
.photo {
  position: relative; display: block;
  aspect-ratio: 16 / 10; overflow: hidden;
  background: #2a2927;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.35), inset 0 0 26px rgba(0, 0, 0, 0.6);
}
.photo.tall { aspect-ratio: 4 / 5; }
.photo img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.06) brightness(0.95); }
/* miniature dei lavori: colori originali con un leggero viraggio giallo da foto vecchia */
.work .photo img { filter: sepia(0.28) saturate(0.9) contrast(1.03) brightness(0.98); }
.ph {
  position: absolute; inset: 0; display: grid; place-items: center;
  background: radial-gradient(ellipse at 50% 40%, #3a3936, #1f1e1c 75%);
  color: #9a968c; font-family: var(--f-hand); font-size: 26px;
}
.cap-hand:empty { height: 34px; padding: 0; } /* polaroid senza scritta: resta il bordo bianco in basso */
.cap-hand { display: block; font-family: var(--f-hand); font-weight: 700; font-size: 27px; line-height: 1; padding-top: 12px; text-align: center; }

/* post-it */
.postit {
  background-color: var(--postit);
  padding: 30px 22px 24px;
  font-family: var(--f-hand); font-size: 25px; line-height: 1.2; font-weight: 500;
}
.postit h3 { font-family: var(--f-type); font-weight: 400; font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase; margin-bottom: 8px; }
.postit ul { list-style: none; }
.postit li::before { content: "– "; }
.postit li small { display: block; padding-left: 0.9em; margin: -2px 0 6px; font-family: var(--f-type); font-size: 13px; letter-spacing: 0.04em; color: var(--ink-soft); }

/* foglio nero, scritto col gessetto */
.paper.dark {
  background-color: var(--dark);
  background-image: radial-gradient(ellipse at 20% 10%, rgba(255, 255, 255, 0.05), transparent 50%);
  color: var(--chalk);
  box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.6), var(--shadow);
}
.paper.dark::after { mix-blend-mode: screen; opacity: 0.06; }

/* schedina a righe */
.index-card {
  padding: 30px 22px 20px;
  background-color: var(--paper-white);
  background-image:
    linear-gradient(to bottom, transparent 62px, rgba(30, 30, 30, 0.35) 62px, rgba(30, 30, 30, 0.35) 63.5px, transparent 63.5px),
    repeating-linear-gradient(to bottom, transparent 0 29px, rgba(40, 40, 40, 0.12) 29px 30px),
    radial-gradient(ellipse at 90% 95%, rgba(120, 85, 30, 0.2), transparent 50%);
  background-position: 0 0, 0 34px, 0 0;
}
.index-card h3 { font-family: var(--f-type); font-weight: 400; font-size: 13px; letter-spacing: 0.16em; text-transform: uppercase; height: 34px; }
.checks { list-style: none; font-family: var(--f-hand); font-size: 24px; line-height: 30px; }
.checks li::before { content: "✓ "; }

/* ---------- indice in basso ---------- */
/* cartellini di carta appesi a un filo teso */
.dock {
  position: fixed; left: 50%; bottom: 16px; translate: -50% 0; z-index: 140;
  display: flex; gap: 14px; padding: 6px 30px 0;
  max-width: calc(100% - 12px);
}
.dock::before {
  content: ""; position: absolute; left: 0; right: 0; top: 13px; height: 2px; border-radius: 2px;
  background: #e9e5da; box-shadow: 0 3px 3px rgba(0, 0, 0, 0.45);
}
.dock a {
  position: relative; display: block; margin-top: 8px; padding: 15px 15px 8px;
  background-color: var(--paper-white);
  background-image: radial-gradient(ellipse at 85% 90%, rgba(120, 85, 30, 0.2), transparent 60%);
  color: var(--ink); text-decoration: none; white-space: nowrap;
  font-family: var(--f-hand); font-size: 23px; font-weight: 700; line-height: 1;
  rotate: var(--t, 0deg); transform-origin: 50% 0;
  box-shadow: 1px 3px 3px rgba(0, 0, 0, 0.35), 3px 10px 16px rgba(0, 0, 0, 0.45);
  transition: background-color 0.25s, color 0.25s;
}
/* puntina che tiene il cartellino sul filo */
.dock a::before {
  content: ""; position: absolute; top: -5px; left: 50%; width: 11px; height: 11px; margin-left: -5.5px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff, #d8d4ca 45%, #7d7a72);
  box-shadow: 1px 2px 2px rgba(0, 0, 0, 0.5);
}
.dock a:nth-child(even)::before { background: radial-gradient(circle at 35% 30%, #8a8a88, #2a2a29 40%, #050505); }
.dock a[aria-current="true"] { background-color: var(--dark); color: var(--chalk); }
.dock a[aria-current="true"]::before { background: radial-gradient(circle at 35% 30%, #ff9a8c, #c4231a 45%, #6e0c07); }

/* ---------- fili e puntine ---------- */
.intro .strings { opacity: 0; } /* puntine e filo compaiono alla fine dell'entrata */

/* luci dell'entrata: buio con torcia, lampeggianti, flash */
.lights { position: fixed; inset: 0; z-index: 190; pointer-events: none; }
.lights > * { position: absolute; inset: 0; }
.lights .dark {
  background: radial-gradient(circle at var(--fx, 50%) var(--fy, 20%),
    rgba(255, 240, 210, 0.07) 0, transparent var(--fr, 0px), rgba(4, 4, 4, 0.96) calc(var(--fr, 0px) + 150px));
}
.lights .siren { opacity: 0; mix-blend-mode: screen; }
.lights .siren.red {
  background:
    radial-gradient(ellipse 70% 80% at 0% 0%, rgba(235, 30, 30, 0.75), transparent 70%),
    radial-gradient(ellipse 60% 60% at 0% 100%, rgba(235, 30, 30, 0.45), transparent 70%);
}
.lights .siren.blue {
  background:
    radial-gradient(ellipse 70% 80% at 100% 0%, rgba(40, 90, 255, 0.75), transparent 70%),
    radial-gradient(ellipse 60% 60% at 100% 100%, rgba(40, 90, 255, 0.45), transparent 70%);
}
.lights .flash { background: #fff; opacity: 0; }
.strings { position: absolute; top: 0; left: 0; z-index: 5; pointer-events: none; overflow: visible; }
.strings .s-shadow { fill: none; stroke: rgba(0, 0, 0, 0.45); stroke-width: 2.2; }
.strings .s-line { fill: none; stroke: #b3261c; stroke-width: 1.8; stroke-linecap: round; } /* filo rosso da indagine */
.strings.tail { z-index: 7; }

/* ---------- sezioni ---------- */
/* ---------- stanza 3D (disegnata da js/scene3d.js) ---------- */
/* .gl è il canvas WebGL con muro, finestra, quadro, tavolo e luci; .css3d contiene la bacheca HTML
   messa nella stessa scena 3D. Entrambi restano fermi sullo schermo: si muove la telecamera. */
.gl { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; display: block; }
.css3d { position: fixed; inset: 0; z-index: 1; pointer-events: none; overflow: hidden; }
.css3d .board { pointer-events: auto; }
.scene { position: relative; } /* l'altezza (quanto si scorre per arrivare al tavolo) la imposta scene3d.js */
.board-home { display: flex; justify-content: center; padding: 60px 0; }

/* cornice in legno chiaro, scurita dalla penombra */
.board {
  position: relative; width: calc(1240px + 2 * 24px); padding: 24px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.08), transparent 40%, rgba(0, 0, 0, 0.25)),
    repeating-linear-gradient(90deg, rgba(60, 35, 15, 0.18) 0 2px, transparent 2px 9px, rgba(60, 35, 15, 0.1) 9px 10px, transparent 10px 23px),
    #8a6844;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.4), inset 2px 2px 0 rgba(255, 230, 190, 0.18), 0 30px 60px rgba(0, 0, 0, 0.7), 0 6px 14px rgba(0, 0, 0, 0.5);
}
/* penombra sulla bacheca: la luce della lampada arriva dall'alto */
.board::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 6;
  background: radial-gradient(ellipse 85% 75% at 50% 25%, transparent 45%, rgba(0, 0, 0, 0.38) 100%);
}
.cork {
  container-type: inline-size; /* le misure della home seguono la larghezza della bacheca, non dello schermo */
  position: relative; overflow: hidden;
  background-color: #5b4331; background-image: var(--cork-tex);
  box-shadow: inset 0 0 0 2px rgba(0, 0, 0, 0.45), inset 0 8px 18px rgba(0, 0, 0, 0.55), inset 0 0 120px rgba(0, 0, 0, 0.45);
}
.cork::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 0;
  background: radial-gradient(ellipse 70% 60% at 50% 0%, rgba(255, 215, 160, 0.12), transparent 70%);
}
.cork .hero { margin: 0; max-width: none; }

/* ---------- il tavolo: i fogli sono appoggiati sul legno 3D ---------- */
.table { position: relative; z-index: 2; display: block; }

/* scotch, graffette e macchie: posizione e inclinazione casuali (vedi decorateTable in main.js) */
.table .paper.taped::before {
  content: ""; position: absolute; z-index: 3; top: -12px; left: var(--tx, 50%); width: 92px; height: 25px;
  translate: -50% 0; rotate: var(--trot, -4deg);
  background: rgba(232, 226, 205, 0.55); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}
.table .paper.clipped::before {
  content: ""; position: absolute; z-index: 3; top: -18px; left: var(--cx, 70%); width: 15px; height: 48px;
  rotate: var(--crot, 0deg);
  border: 2.5px solid #b9b4aa; border-radius: 8px; border-bottom-color: transparent;
  background: linear-gradient(90deg, transparent 3.5px, #a8a398 3.5px 6px, transparent 6px) 50% 100% / 100% 72% no-repeat;
  box-shadow: 1px 2px 2px rgba(0, 0, 0, 0.35);
}
.ring {
  position: absolute; z-index: 1; width: 110px; height: 110px; pointer-events: none;
  translate: -50% -50%; scale: var(--rs, 1); rotate: var(--rr, 0deg); border-radius: 50%; mix-blend-mode: multiply;
  background:
    radial-gradient(circle, transparent 46%, rgba(105, 62, 25, 0.32) 48.5%, rgba(105, 62, 25, 0.12) 53%, transparent 58%),
    radial-gradient(circle at 56% 52%, transparent 43%, rgba(105, 62, 25, 0.16) 45.5%, transparent 49%),
    radial-gradient(circle at 42% 45%, rgba(120, 80, 40, 0.07), transparent 55%);
}

/* senza WebGL (o se la libreria 3D non si carica) la bacheca resta nella pagina, su sfondo legno */
.no3d .gl, .no3d .css3d { display: none; }
.no3d body { background: #241910; }

section { position: relative; max-width: 1240px; margin: 0 auto; padding: clamp(70px, 9vw, 120px) clamp(28px, 5vw, 64px); }

/* titoli: etichette Dymo */
.dymo-wrap { width: fit-content; max-width: 100%; margin-bottom: clamp(56px, 7vw, 90px); }
.dymo-wrap.right { margin-left: auto; text-align: right; }
.dymo-wrap.center { margin-left: auto; margin-right: auto; text-align: center; }
.dymo {
  position: relative; display: inline-block;
  padding: 14px 52px 12px; border-radius: 4px;
  background: var(--dymo-bg);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), inset 0 -2px 3px rgba(0, 0, 0, 0.6), 2px 7px 12px rgba(0, 0, 0, 0.55);
  rotate: var(--r, 0deg);
}
.dymo .pin { top: 50%; }
.dymo .pin.l { left: 22px; }
.dymo .pin.r { left: auto; right: 22px; }
.dymo [data-dymo] {
  font-family: var(--f-dymo); font-size: clamp(28px, 5.2vw, 62px); line-height: 1.15;
  letter-spacing: 0.14em; text-transform: uppercase; color: #ecebe6;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.35), 0 -1px 0 rgba(0, 0, 0, 0.75);
}
.dymo .ch { display: inline-block; translate: 0 var(--y, 0); }
.chalk { font-family: var(--f-hand); font-size: 27px; color: rgba(239, 236, 228, 0.85); margin-top: 12px; padding: 0 10px; }

/* ---------- home ---------- */
.hero { padding-top: clamp(70px, 10vh, 120px); padding-bottom: 40px; }
.hero-top { text-align: center; margin-bottom: clamp(60px, 8vw, 100px); }
.hero-board { position: relative; height: 600px; }
.hero-board > * { position: absolute; }

/* nome a lettere ritagliate */
.ransom {
  position: relative; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 0.06em;
  font-size: clamp(40px, 13cqw, 170px); font-weight: 400; line-height: 1;
}
.headline {
  font-family: var(--f-type); font-size: clamp(18px, 2.8cqw, 36px); line-height: 1.2;
  margin-top: clamp(26px, 3.5vw, 44px); color: var(--chalk);
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.7);
}
.lead {
  font-size: 16px; max-width: 52ch; margin: 14px auto 0; color: rgba(239, 236, 228, 0.78);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.7);
}
.rl {
  display: inline-block; padding: 0.06em 0.13em 0.02em;
  font-size: calc(1em * var(--s, 1)); line-height: 1;
  rotate: var(--lr, 0deg); translate: 0 var(--ly, 0);
  box-shadow: 2px 4px 6px rgba(0, 0, 0, 0.5);
  text-transform: uppercase;
  animation: wiggle var(--wd, 4s) ease-in-out var(--wdel, 0s) infinite;
}
/* leggero tremolio continuo delle lettere */
@keyframes wiggle {
  0%, 100% { translate: 0 var(--ly, 0); rotate: var(--lr, 0deg); }
  25% { translate: 0.012em calc(var(--ly, 0) - 0.02em); rotate: calc(var(--lr, 0deg) + 0.9deg); }
  50% { translate: -0.01em calc(var(--ly, 0) + 0.014em); rotate: calc(var(--lr, 0deg) - 0.6deg); }
  75% { translate: -0.014em calc(var(--ly, 0) - 0.008em); rotate: calc(var(--lr, 0deg) + 0.4deg); }
}
.rl.v0 { background: var(--paper-white); color: var(--ink); font-family: var(--f-display); }
.rl.v1 { background: var(--dark); color: var(--chalk); font-family: var(--f-type); text-transform: lowercase; }
.rl.v2 { background: var(--paper); color: var(--ink); font-family: Georgia, "Times New Roman", serif; font-weight: 700; font-style: italic; }
.rl.v3 { background: #d6d2c6; color: var(--ink); font-family: var(--f-dymo); }
.rl.v4 { background: var(--polaroid); color: var(--ink); font-family: var(--f-type); }

/* polaroid censurata */
.suspect { left: 28%; top: 0; width: 41%; }
.suspect .photo { aspect-ratio: 16 / 9; overflow: visible; }
.suspect canvas { display: block; width: 100%; height: 100%; }
.marker { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.marker polyline {
  fill: none; stroke: #c4231a; stroke-linecap: round; stroke-linejoin: round; opacity: 0.88;
  transition: stroke-dashoffset 1.1s cubic-bezier(0.5, 0, 0.3, 1) 0.5s;
}

/* etichette scritte a mano, attaccate con lo scotch */
.scrap-label {
  position: relative; width: fit-content; margin: 0 0 56px;
  padding: 14px 20px 10px; background: var(--paper-white); color: var(--ink);
  font-family: var(--f-hand); font-size: 27px; font-weight: 700; line-height: 1.1;
  rotate: var(--r, 0deg); box-shadow: 1px 3px 6px rgba(0, 0, 0, 0.45);
}
.creators + .scrap-label { margin-top: clamp(80px, 9vw, 120px); }

/* creator con cui ho lavorato */
.creators { grid-template-columns: repeat(auto-fill, minmax(min(100%, 195px), 1fr)); gap: 60px 36px; }
.creator { padding: 32px 18px 18px; background-color: var(--paper-white); }
.creator-main { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; text-decoration: none; }
.avatar {
  flex: none; width: 68px; height: 68px; border-radius: 50%; overflow: hidden;
  background: #2a2927; box-shadow: 0 0 0 4px var(--paper-white), 0 0 0 5px rgba(26, 25, 23, 0.35), 2px 4px 8px rgba(0, 0, 0, 0.35);
}
.avatar img { width: 100%; height: 100%; object-fit: cover; filter: sepia(0.28) saturate(0.9) contrast(1.03); }
.avatar-initial { display: grid; place-items: center; width: 100%; height: 100%; font-family: var(--f-display); font-size: 34px; color: var(--chalk); background: radial-gradient(circle at 35% 30%, #4a4642, #1d1b19); }
.creator-text { display: flex; flex-direction: column; min-width: 0; }
.creator-name { font-family: var(--f-hand); font-size: 30px; font-weight: 700; line-height: 1; overflow-wrap: break-word; }
.creator-main:hover .creator-name { text-decoration: underline; text-underline-offset: 4px; }
.creator-subs { font-size: 13px; color: var(--ink-soft); margin-top: 4px; }
.creator-period { font-size: 13.5px; margin-top: 16px; }
.creator-role { font-size: 13px; margin-top: 12px; color: var(--ink-soft); line-height: 1.4; }
.creator .ink-stamp { margin-top: 8px; }
.creator-more { font-size: 12.5px; color: var(--ink-soft); margin-top: 10px; }

.play-big, .play {
  position: absolute; left: 50%; top: 50%; translate: -50% -50%;
  width: 58px; height: 58px; border-radius: 50%;
  background: rgba(20, 20, 18, 0.85); color: var(--chalk); border: 2px solid var(--chalk);
  display: grid; place-items: center; font-size: 18px; padding-left: 3px;
}
.hero-card { left: 73%; top: 60px; width: 26%; min-width: 250px; }
.hero-card div { display: flex; justify-content: space-between; gap: 12px; line-height: 30px; }
.hero-card dt { font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-soft); }
.hero-card dd { font-family: var(--f-hand); font-size: 24px; font-weight: 700; text-align: right; }
.hero-card dl { padding-top: 4px; }

/* scontrino */
.receipt {
  left: 2%; top: 30px; width: 260px;
  padding: 30px 20px 22px;
  background-color: var(--thermal);
  background-image: radial-gradient(ellipse at 80% 90%, rgba(120, 100, 60, 0.12), transparent 55%);
  font-size: 13px; color: #262523;
}
.receipt::before {
  content: ""; position: absolute; left: 0; right: 0; bottom: -7px; height: 7px;
  background:
    linear-gradient(135deg, var(--thermal) 5px, transparent 0) 0 0 / 10px 10px repeat-x,
    linear-gradient(-135deg, var(--thermal) 5px, transparent 0) 0 0 / 10px 10px repeat-x;
}
.rc-head { text-align: center; line-height: 1.4; }
.rc-head b { font-weight: 400; font-size: 16px; letter-spacing: 0.1em; }
.rc-sep { border-top: 1px dashed #66645e; margin: 12px 0; }
.rc-row { display: flex; align-items: baseline; gap: 6px; line-height: 1.9; }
.rc-row .dots { flex: 1; border-bottom: 1px dotted #77756e; translate: 0 -4px; }
.rc-row b { font-weight: 400; }
.rc-foot { text-align: center; font-size: 11.5px; letter-spacing: 0.08em; line-height: 1.5; }
.barcode {
  height: 34px; margin: 14px 8px 4px;
  background: repeating-linear-gradient(90deg, #222 0 2px, transparent 2px 4px, #222 4px 5px, transparent 5px 8px, #222 8px 11px, transparent 11px 12px, #222 12px 13px, transparent 13px 17px);
}

.scrap {
  padding: 26px 24px 14px; background-color: var(--paper-white);
  font-family: var(--f-hand); font-size: 31px; font-weight: 700; line-height: 1; text-decoration: none;
}
.hero-arrow { left: 40%; top: 470px; }

/* ---------- disposizione sparsa ---------- */
.scatter { display: grid; align-items: start; }
.scatter > .paper { width: calc(100% - var(--sw, 0) * 1px); }

/* lavori */
.works { grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 90px 54px; }
.work .play { opacity: 0; transition: opacity 0.25s; }
.work:hover .play, .work:focus-visible .play { opacity: 1; }
.work .cap { padding-top: 12px; }
.work h3 { font-family: var(--f-hand); font-size: 28px; font-weight: 700; line-height: 1; }
.work .meta { font-size: 13px; color: var(--ink-soft); margin-top: 6px; }
.work .role { font-size: 13px; margin-top: 2px; }
.ink-stamp {
  display: inline-block; margin-top: 12px; padding: 3px 8px 1px;
  border: 1.5px solid currentColor; font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;
  opacity: 0.7; rotate: -3deg;
}

/* chi sono */
.about { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.35fr) minmax(0, 0.75fr); gap: clamp(36px, 4vw, 60px); align-items: start; }
.portrait { margin-top: 50px; }
.letter {
  padding: clamp(44px, 5vw, 64px) clamp(28px, 4vw, 54px) 40px;
  background-color: var(--paper-white);
  background-image:
    radial-gradient(circle at 88% 9%, transparent 46px, rgba(105, 80, 45, 0.2) 48px, rgba(105, 80, 45, 0.08) 54px, transparent 58px),
    radial-gradient(ellipse at 12% 8%, rgba(140, 105, 40, 0.14), transparent 45%),
    radial-gradient(ellipse at 92% 96%, rgba(120, 85, 30, 0.2), transparent 50%);
  font-size: 15.5px; line-height: 1.85;
}
.letter .hello { font-family: var(--f-hand); font-size: 30px; font-weight: 700; margin-bottom: 14px; }
.letter p + p { margin-top: 16px; }
.about-side { display: grid; gap: 64px; margin-top: 10px; }

/* screenshot della timeline, stampato e infilato dietro al post-it degli strumenti */
.tools-stack { position: relative; isolation: isolate; }
.tools-stack .postit { z-index: 1; }
.print {
  position: absolute; z-index: 0; top: -54px; left: -70px; width: 128%;
  padding: 8px; background: var(--paper-white);
  box-shadow: inset 0 0 20px rgba(120, 90, 35, 0.3), var(--shadow);
  rotate: -7deg;
}
.print img { width: 100%; filter: grayscale(1) sepia(0.2) contrast(1.1) brightness(0.92); }
.tape {
  position: absolute; z-index: 1; top: -12px; left: 18px; width: 86px; height: 26px; rotate: -12deg;
  background: rgba(232, 226, 205, 0.6); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}

/* passioni */
.passions { grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: 70px 44px; }
.passion h3 { font-family: var(--f-hand); font-size: 36px; font-weight: 700; line-height: 1; margin-bottom: 10px; letter-spacing: 0; text-transform: none; }
.passion p { font-family: var(--f-type); font-size: 14.5px; line-height: 1.5; }
.passion .photo { margin: -12px -8px 16px; }

/* percorso */
.timeline { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 100px 60px; }
.tl-card { padding: 34px 26px 26px; }
/* foglio dell'anno con dietro lo screenshot di una timeline di Premiere */
.scatter > .tl-item { position: relative; isolation: isolate; width: calc(100% - var(--sw, 0) * 1px); }
.tl-item .tl-card { z-index: 1; }
.tl-print {
  top: -46px; left: auto; right: -34px; width: 92%; z-index: 0;
  rotate: var(--pr, 6deg);
  translate: calc(var(--dx, 0) * var(--k) * 1px) calc(var(--dy, 0) * var(--k) * 1px);
}
.tl-print img { filter: sepia(0.25) saturate(0.95) contrast(1.05); }
.tl-print .tape { left: auto; right: 22px; rotate: 10deg; }
.tl-year {
  display: inline-block; margin: 0 0 14px -6px; padding: 0 16px;
  font-family: var(--f-hand); font-size: 50px; font-weight: 700; line-height: 1.15;
  border: 2px solid currentColor; border-radius: 52% 46% 55% 44% / 62% 50% 54% 42%; rotate: -4deg;
}
.tl-card h3 { font-family: var(--f-type); font-weight: 400; font-size: 17px; text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 8px; }
.tl-card p { font-size: 14.5px; color: var(--ink-soft); }
.tl-card.dark p { color: #bdb9ae; }

/* contatti: cartolina */
.postcard {
  max-width: 900px; margin: 0 auto;
  display: grid; grid-template-columns: 1.05fr 1fr;
  padding: clamp(36px, 5vw, 56px) clamp(24px, 4vw, 48px);
  background-color: var(--paper-white);
}
.pc-left { padding-right: clamp(20px, 3vw, 40px); border-right: 1.5px solid rgba(26, 25, 23, 0.4); display: flex; flex-direction: column; justify-content: center; }
.pc-msg { font-family: var(--f-hand); font-size: clamp(30px, 3.6vw, 42px); font-weight: 700; line-height: 1.1; }
.pc-right { position: relative; padding-left: clamp(20px, 3vw, 40px); padding-top: 130px; }
.stamp {
  position: absolute; top: 0; right: 0; width: 96px; height: 116px;
  background: var(--dark); color: var(--chalk);
  border: 6px solid var(--paper-white); outline: 2px dashed rgba(26, 25, 23, 0.45);
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  font-family: var(--f-display); font-size: 20px; text-transform: uppercase; line-height: 1; rotate: 3deg;
}
.stamp small { font-family: var(--f-type); font-size: 9px; letter-spacing: 0.1em; text-transform: lowercase; margin-top: 6px; }
.postmark {
  position: absolute; top: 34px; right: 64px; width: 104px; height: 104px; border-radius: 50%;
  border: 2px solid rgba(26, 25, 23, 0.55); display: grid; place-items: center;
  font-size: 13px; letter-spacing: 0.1em; color: rgba(26, 25, 23, 0.65); rotate: -14deg;
}
.postmark::after { content: ""; position: absolute; inset: 9px; border-radius: 50%; border: 1px solid rgba(26, 25, 23, 0.4); }
.pc-label { font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-soft); margin-top: 18px; }
.mail {
  display: block; font-family: var(--f-hand); font-size: clamp(24px, 2.8vw, 32px); font-weight: 700;
  text-decoration: none; border-bottom: 1.5px solid rgba(26, 25, 23, 0.45); overflow-wrap: anywhere; line-height: 1.4;
}
.mail:hover { text-decoration: underline; }
.discord {
  position: relative; display: block; width: 100%; text-align: left; cursor: copy;
  background: none; border: 0; border-bottom: 1.5px solid rgba(26, 25, 23, 0.45);
  font-family: var(--f-hand); font-size: clamp(22px, 2.4vw, 28px); font-weight: 700; line-height: 1.4; color: var(--ink);
  user-select: text;
}
.discord:hover { text-decoration: underline; }
.discord[data-copied]::after { content: attr(data-copied); position: absolute; right: 0; bottom: 6px; font-family: var(--f-type); font-size: 12px; color: var(--ink-soft); }
.pc-socials { list-style: none; }
.pc-socials a { display: block; text-decoration: none; border-bottom: 1.5px solid rgba(26, 25, 23, 0.45); line-height: 2.1; font-size: 15px; }
.pc-socials a:hover { text-decoration: underline; }
.pc-socials a::after { content: " ↗"; }

.footer {
  max-width: 1240px; margin: 0 auto; padding: 10px clamp(28px, 5vw, 64px) 110px;
  text-align: center; font-size: 13px; color: rgba(239, 236, 228, 0.7);
}

/* ---------- video ---------- */
.modal { position: fixed; inset: 0; z-index: 200; display: none; place-items: center; padding: 20px; background: rgba(10, 10, 9, 0.92); }
.modal.open { display: grid; }
.modal-inner { width: min(1100px, 100%); }
.modal-close { display: block; margin-left: auto; margin-bottom: 12px; background: var(--paper-white); color: var(--ink); border: 0; padding: 8px 14px 6px; font-family: var(--f-type); font-size: 14px; cursor: pointer; rotate: 2deg; }
.modal-frame { position: relative; aspect-ratio: 16 / 9; width: 100%; background: #000; box-shadow: 0 0 0 12px var(--polaroid), 0 30px 80px rgba(0, 0, 0, 0.8); }
.modal-frame.vert { aspect-ratio: 9 / 16; width: auto; height: min(74vh, 840px); max-width: 100%; margin: 0 auto; }
.modal-frame iframe, .modal-frame video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.modal-frame .empty { position: absolute; inset: 0; display: grid; place-content: center; gap: 6px; text-align: center; background: radial-gradient(ellipse at 50% 40%, #33322f, #151413 75%); }
.modal-frame .empty span { font-family: var(--f-hand); font-size: 40px; font-weight: 700; }
.modal-frame .empty small { color: #a9a59a; font-size: 13px; }
.modal-info { display: flex; justify-content: space-between; gap: 16px; margin-top: 26px; font-size: 14px; color: #bdb9ae; }
.modal-info b { font-family: var(--f-hand); font-size: 28px; color: var(--chalk); line-height: 1; }

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .about { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.3fr); }
  .about-side { grid-column: 1 / -1; grid-template-columns: 1fr 1fr; margin-top: 10px; }
  .timeline { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .board { width: min(100vw, 560px); padding: 12px; }
  :root { --k: 0.35; }
  .hero { padding-top: 60px; }
  .hero-board { height: auto; display: flex; flex-direction: column; gap: 50px; }
  .hero-board > * { position: relative; left: auto; right: auto; top: auto; }
  .ransom { font-size: clamp(36px, 12.5cqw, 120px); flex-wrap: nowrap; }
  .suspect { width: 92%; align-self: center; }
  .hero-card { width: 86%; min-width: 0; align-self: flex-end; }
  .receipt { align-self: flex-start; }
  .hero-arrow { align-self: center; margin-top: -10px; }
}

@media (max-width: 680px) {
  section { padding-left: 24px; padding-right: 24px; }
  .dymo { padding: 12px 40px 10px; }
  .dymo .pin.l { left: 17px; }
  .dymo .pin.r { right: 17px; }
  .about { grid-template-columns: 1fr; }
  .portrait { width: 80%; margin: 0 auto; }
  .about-side { grid-template-columns: 1fr; }
  .tools-stack { padding-top: 70px; }
  .tools-stack .postit { width: 70%; margin-left: auto; }
  .tools-stack .print { top: 0; left: -4px; width: 82%; }
  .tl-print { right: -10px; top: -36px; }
  .timeline { grid-template-columns: 1fr; gap: 70px; }
  .postcard { grid-template-columns: 1fr; }
  .pc-left { border-right: 0; padding-right: 0; padding-bottom: 26px; border-bottom: 1.5px solid rgba(26, 25, 23, 0.4); }
  .pc-right { padding-left: 0; padding-top: 140px; }
  .postmark { right: 70px; top: 26px; }
}

@media (max-width: 520px) {
  .dock { gap: 5px; padding: 6px 12px 0; bottom: 10px; }
  .dock a { font-size: 16px; padding: 13px 7px 6px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .rl { animation: none; }
  .marker polyline { transition: none; }
}
