/* Raccolta 3D — Modelling & animation.
   L'identità è quella della pagina Readymag: fondi quasi neri (#080D10 in apertura, nero per
   i progetti, grigio #121212 tra un progetto e l'altro, viola-nero #070007 in chiusura),
   testo bianco, Gotham e Roboto Mono, bottoni a pillola con il bordo bianco, le finestre di
   errore di Cinema 4D. In più, il linguaggio del viewport: griglia, assi X/Y/Z colorati,
   angoli di selezione arancio, blocchi del render. */

@font-face {
  font-family: 'R3D Gotham';
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  src: url('../assets/raccolta3d/fonts/gotham-book.woff2') format('woff2');
}
@font-face {
  font-family: 'R3D Gotham';
  font-weight: 500;
  font-style: normal;
  font-display: swap;
  src: url('../assets/raccolta3d/fonts/gotham-medium.woff2') format('woff2');
}
@font-face {
  font-family: 'R3D Gotham';
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  src: url('../assets/raccolta3d/fonts/gotham-bold.woff2') format('woff2');
}
@font-face {
  font-family: 'R3D Mono';
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  src: url('../assets/raccolta3d/fonts/roboto-mono.woff2') format('woff2');
}
@property --x {
  syntax: '<percentage>';
  inherits: true;
  initial-value: 0%;
}

:root.project-raccolta3d {
  --ink: #080d10;
  --black: #000;
  --gap: #121212;
  --plum: #070007;
  --white: #f8f8f8;
  --text: #e6e9eb;
  --soft: #c3c9cd;
  --muted: #8f989e;
  --line: rgb(255 255 255 / 13%);
  --sel: #ff8a1f;
  --axis-x: #e5584f;
  --axis-y: #74c95a;
  --axis-z: #5a86ff;
  --g: clamp(20px, 4.2vw, 64px);
  --max: 1440px;
  --sans: 'R3D Gotham', 'custom_146852', 'Helvetica Neue', Arial, sans-serif;
  --mono: 'R3D Mono', 'Roboto Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;
  --ease: cubic-bezier(0.2, 0.7, 0.1, 1);
  background: var(--gap);
}
.project-raccolta3d *,
.project-raccolta3d *::before,
.project-raccolta3d *::after {
  box-sizing: border-box;
}
.project-raccolta3d body {
  margin: 0;
  background: var(--gap);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
:where(.r3d) :where(h1, h2, h3, p, ul, ol, figure, figcaption) {
  margin: 0;
  padding: 0;
}
:where(.r3d) :where(ul, ol) {
  list-style: none;
}
:where(.r3d) img,
:where(.r3d) video {
  display: block;
  max-width: 100%;
}
:where(.project-raccolta3d) a {
  color: inherit;
  text-decoration: none;
}
:where(.r3d) button {
  font: inherit;
  color: inherit;
}
.skip-link {
  position: fixed;
  left: 16px;
  top: 12px;
  z-index: 100;
  padding: 12px 18px;
  background: var(--white);
  color: var(--black);
  font: 500 14px/1 var(--sans);
  transform: translateY(-160%);
  transition: transform 0.2s;
}
.skip-link:focus {
  transform: none;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.r3d :focus-visible,
.portfolio-footer :focus-visible {
  outline: 2px solid var(--white);
  outline-offset: 3px;
}
.r3d {
  display: block;
  overflow-x: clip;
}
.wrap {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding-inline: var(--g);
}
.eyebrow,
.num {
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Bottoni ------------------------------------------------------------------------------ */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 22px;
  border: 1px solid var(--white);
  border-radius: 999px;
  color: var(--white);
  font: 400 13px/1 var(--sans);
  white-space: nowrap;
  transition:
    background-color 0.25s,
    color 0.25s;
}
.pill::after {
  content: '↗';
  font-family: system-ui, sans-serif;
  transition: transform 0.25s var(--ease);
}
.pill:hover {
  background: var(--white);
  color: var(--black);
}
.pill:hover::after {
  transform: translate(2px, -2px);
}
.seg {
  display: inline-flex;
  padding: 3px;
  border: 1px solid rgb(255 255 255 / 28%);
  border-radius: 999px;
  background: rgb(8 13 16 / 55%);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.seg button {
  min-height: 36px;
  padding: 0 15px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--soft);
  font: 400 11.5px/1 var(--mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition:
    background-color 0.2s,
    color 0.2s;
}
.seg button:hover {
  color: var(--white);
}
.seg button[aria-pressed='true'] {
  background: var(--white);
  color: var(--black);
}

/* APERTURA: il viewport ------------------------------------------------------------------ */
.hero {
  padding-top: var(--project-header-height);
  background: var(--ink);
}
.vp {
  --vp-a: #18222a;
  --vp-b: #080d10;
  position: relative;
  isolation: isolate;
  height: clamp(480px, calc(100svh - var(--project-header-height) - 72px), 940px);
  overflow: hidden;
  background: radial-gradient(ellipse 75% 85% at 50% 42%, var(--vp-a), var(--vp-b));
  border-bottom: 1px solid var(--line);
}
.vp::before {
  /* Il fondo del Render, appena più caldo: entra in dissolvenza sopra quello del viewport. */
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(ellipse 75% 85% at 50% 42%, #1d2328, #07090b);
  opacity: 0;
  transition: opacity 0.6s;
}
.vp[data-mode='render']::before {
  opacity: 1;
}
.vp-poster,
.vp-stage,
.vp-spline,
.vp-crash {
  position: absolute;
  inset: 0;
}
.vp .vp-crash {
  /* le finestre restano tra la riga dell'HUD e il titolo, come nella tela originale */
  inset: 52px 0 clamp(130px, 17vh, 170px);
}
.vp-poster img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.5s;
}
.vp-poster-render,
.vp[data-mode='render'] .vp-poster-wire {
  opacity: 0;
}
.vp[data-mode='render'] .vp-poster-render {
  opacity: 1;
}
.vp.is-live .vp-poster {
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.6s,
    visibility 0s 0.6s;
}
.vp-stage {
  touch-action: pan-y;
}
.gl.motion-ok .vp-stage {
  cursor: grab;
}
.vp.is-dragging .vp-stage {
  cursor: grabbing;
}
.vp-stage canvas {
  display: block;
  width: 100%;
  height: 100%;
}
.vp-stage .bk-canvas {
  position: absolute;
  inset: 0;
}
.vp-spline {
  z-index: 1;
  background: radial-gradient(ellipse 75% 85% at 50% 42%, #18222a, #080d10);
}
.vp-spline[hidden] {
  display: none;
}
.vp-spline iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.vp-spline-note {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  margin: 0;
  color: var(--muted);
  font: 400 12px/1.5 var(--mono);
  letter-spacing: 0.06em;
  text-align: center;
}
.vp-spline.is-loaded .vp-spline-note {
  display: none;
}
.vp[data-view='spline'] :is(.vp-stage, .vp-poster, .vp-gizmo, .vp-hint),
.vp[data-view='spline'] .vp-controls .seg {
  visibility: hidden;
}

/* HUD */
.vp-hud {
  position: absolute;
  z-index: 6;
  left: var(--g);
  right: var(--g);
  top: 18px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  pointer-events: none;
  color: rgb(255 255 255 / 70%);
  font: 400 11px/1.5 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.vp-hud p {
  margin: 0;
}
.vp-view {
  display: flex;
  flex-direction: column;
}
.vp-view span:first-child {
  color: var(--white);
}
.vp-hint {
  color: rgb(255 255 255 / 45%);
  opacity: 0;
  transition: opacity 0.6s 0.4s;
}
.vp.is-live .vp-hint {
  opacity: 1;
}
.vp-file {
  text-align: right;
  text-transform: none;
  letter-spacing: 0.04em;
}
.vp-status {
  color: var(--sel);
}
.vp-gizmo {
  position: absolute;
  z-index: 6;
  right: var(--g);
  bottom: 86px;
  width: 60px;
  height: 60px;
  overflow: visible;
  pointer-events: none;
}
.vp-gizmo line {
  stroke-width: 1.6;
  stroke-linecap: round;
}
.vp-gizmo text {
  font: 400 9px/1 var(--mono);
  text-anchor: middle;
}
.vp-gizmo .gx {
  stroke: var(--axis-x);
  fill: var(--axis-x);
}
.vp-gizmo .gy {
  stroke: var(--axis-y);
  fill: var(--axis-y);
}
.vp-gizmo .gz {
  stroke: var(--axis-z);
  fill: var(--axis-z);
}
.vp-gizmo text {
  stroke: none;
}

.vp-title {
  position: absolute;
  z-index: 6;
  left: var(--g);
  bottom: clamp(22px, 3.4vw, 40px);
  max-width: min(560px, 60%);
  pointer-events: none;
}
.vp-title h1 {
  margin: 6px 0 4px;
  color: var(--white);
  font: 500 clamp(30px, 4vw, 60px) / 1 var(--sans);
  letter-spacing: -0.025em;
  text-shadow: 0 2px 24px rgb(0 0 0 / 55%);
}
.vp-sub {
  margin: 0;
  color: var(--soft);
  font: 400 14px/1.4 var(--sans);
}
.vp-title .eyebrow {
  margin: 0;
  color: rgb(255 255 255 / 62%);
}
.vp-controls {
  position: absolute;
  z-index: 7;
  right: var(--g);
  bottom: clamp(22px, 3.4vw, 40px);
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
}
.vp-btn {
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid rgb(255 255 255 / 28%);
  border-radius: 999px;
  background: rgb(8 13 16 / 55%);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--soft);
  font: 400 11.5px/1 var(--mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition:
    background-color 0.2s,
    color 0.2s,
    border-color 0.2s;
}
.vp-btn:hover {
  border-color: var(--white);
  color: var(--white);
}
.vp-btn[aria-pressed='true'] {
  background: var(--white);
  color: var(--black);
}
.vp-closeall {
  border-color: rgb(255 138 31 / 60%);
  color: #ffc28c;
}
.vp-closeall[hidden] {
  display: none;
}
.hero-joke {
  margin: 0;
  padding: 22px var(--g) 26px;
  color: var(--white);
  font: 400 15px/27px var(--mono);
  text-align: center;
}

/* Le finestre di errore di Cinema 4D -------------------------------------------------------- */
.vp-crash {
  z-index: 5;
  pointer-events: none;
}
.err {
  --dw: clamp(212px, 22%, 330px);
  position: absolute;
  width: var(--dw);
  aspect-ratio: 225 / 132;
  container-type: inline-size;
  display: grid;
  grid-template-rows: 17% 1fr 24%;
  background: #fff;
  color: #000;
  box-shadow: 0 0 0 0.5px #000;
  filter: drop-shadow(-2px -2px 1px rgb(0 0 0 / 42%));
  font-family: 'Segoe UI', 'Myriad Pro', Roboto, Arial, sans-serif;
  line-height: 1.3;
  pointer-events: auto;
  opacity: 0;
  visibility: hidden;
  user-select: none;
}
.err.is-in {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.1s;
}
.err.is-out {
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.12s,
    visibility 0s 0.12s;
}
.err-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2.4cqi 0 4.9cqi;
  background: #f4f4f4;
  font-size: max(9.5px, 5.4cqi);
  white-space: nowrap;
}
.err-x {
  display: grid;
  place-items: center;
  width: 9cqi;
  height: 9cqi;
  min-width: 18px;
  min-height: 18px;
  cursor: pointer;
}
.err-x svg {
  width: 62%;
  height: 62%;
  fill: none;
  stroke: #000;
  stroke-width: 1.4;
}
.err-x:hover {
  background: #e81123;
}
.err-x:hover svg {
  stroke: #fff;
}
.err-body {
  overflow: hidden;
  padding: 5.4cqi 4.9cqi 0;
  font-size: max(7px, 3.3cqi);
  overflow-wrap: anywhere;
}
.err-body p + p {
  margin-top: 3.4cqi;
}
.err-foot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 4cqi;
  background: #f4f4f4;
}
.err-ok {
  min-width: 24cqi;
  min-height: 24px;
  height: 62%;
  padding: 0 3cqi;
  border: 1px solid #0078d7;
  background: #e5f1fb;
  color: #000;
  font: 400 max(9px, 4.2cqi) / 1 'Segoe UI', 'Myriad Pro', Roboto, Arial, sans-serif;
  cursor: pointer;
}
.err-ok:hover {
  background: #cce4f7;
}
.err-ok:focus-visible {
  outline: 1px dotted #000;
  outline-offset: -4px;
}

/* INDICE ------------------------------------------------------------------------------------- */
.intro {
  padding: clamp(80px, 10vw, 150px) 0 clamp(70px, 8vw, 120px);
  background: var(--ink);
}
.intro-title {
  max-width: 14ch;
  color: var(--white);
  font: 500 clamp(36px, 5.4vw, 84px) / 1 var(--sans);
  letter-spacing: -0.03em;
}
.intro-lead {
  max-width: 46ch;
  margin-top: 22px;
  color: var(--soft);
  font-size: clamp(16px, 1.3vw, 18px);
}
.index {
  margin-top: clamp(48px, 6vw, 80px);
  border-top: 1px solid var(--line);
}
.index li {
  border-bottom: 1px solid var(--line);
}
.index a {
  display: grid;
  grid-template-columns: 56px 128px 1fr auto;
  align-items: center;
  gap: clamp(14px, 2.4vw, 36px);
  min-height: 92px;
  padding: 14px 0;
  transition: background-color 0.3s;
}
.index-num {
  font: 400 12px/1 var(--mono);
  color: var(--muted);
}
.index-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #111;
}
.index-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.85);
  transition:
    transform 0.6s var(--ease),
    filter 0.4s;
}
.index-thumb::after {
  /* gli angoli di selezione del viewport */
  content: '';
  position: absolute;
  inset: 4px;
  opacity: 0;
  background:
    linear-gradient(var(--sel), var(--sel)) 0 0 / 12px 1.5px,
    linear-gradient(var(--sel), var(--sel)) 0 0 / 1.5px 12px,
    linear-gradient(var(--sel), var(--sel)) 100% 0 / 12px 1.5px,
    linear-gradient(var(--sel), var(--sel)) 100% 0 / 1.5px 12px,
    linear-gradient(var(--sel), var(--sel)) 0 100% / 12px 1.5px,
    linear-gradient(var(--sel), var(--sel)) 0 100% / 1.5px 12px,
    linear-gradient(var(--sel), var(--sel)) 100% 100% / 12px 1.5px,
    linear-gradient(var(--sel), var(--sel)) 100% 100% / 1.5px 12px;
  background-repeat: no-repeat;
  transition: opacity 0.25s;
}
.index-name {
  color: var(--white);
  font: 500 clamp(20px, 2.3vw, 34px) / 1.1 var(--sans);
  letter-spacing: -0.015em;
}
.index-meta {
  font: 400 11.5px/1.4 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: right;
}
.index a:hover .index-thumb img {
  transform: scale(1.06);
  filter: none;
}
.index a:hover .index-thumb::after,
.index a:focus-visible .index-thumb::after {
  opacity: 1;
}

/* CAPITOLI ------------------------------------------------------------------------------------ */
.ch {
  position: relative;
  margin-top: clamp(10px, 1.1vw, 16px);
  padding: clamp(84px, 10vw, 150px) 0;
  background: var(--black);
}
.ch-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: end;
  gap: clamp(20px, 3vw, 48px);
  margin-bottom: clamp(40px, 5vw, 72px);
}
.ch-num {
  /* numeri "in wireframe": solo il contorno */
  color: transparent;
  font: 400 clamp(64px, 9.5vw, 148px) / 0.78 var(--sans);
  letter-spacing: -0.04em;
  -webkit-text-stroke: 1px rgb(255 255 255 / 42%);
}
.ch-copy h2 {
  margin: 10px 0 0;
  color: var(--white);
  font: 500 clamp(34px, 5vw, 76px) / 1 var(--sans);
  letter-spacing: -0.028em;
}
.ch-lead {
  max-width: 58ch;
  margin-top: 18px !important;
  color: var(--soft);
  font-size: clamp(16px, 1.25vw, 18px);
  line-height: 1.6;
}
.ch-head .pill {
  margin-bottom: 4px;
}
.shot figcaption,
.film figcaption,
.hp-tile figcaption,
.am-key figcaption {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-top: 12px;
  color: var(--soft);
  font: 400 14px/1.4 var(--sans);
}
.shot-media,
.am-key-art {
  position: relative;
  overflow: hidden;
  background: #0b0b0b;
}
.shot-media img {
  width: 100%;
  height: auto;
}
.shot-square {
  aspect-ratio: 1;
}
.shot-square img {
  height: 100%;
  object-fit: cover;
}

/* Blocchi del render (Picture Viewer) */
[data-bucket] {
  position: relative;
}
.bk-wait img {
  opacity: 0;
}
.bk-canvas {
  position: absolute;
  inset: 0;
  z-index: 3;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* 01 Harry Potter */
.hp-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 24px;
  margin-bottom: 22px;
}
.hp-tools .seg {
  background: transparent;
}
.hp-hint {
  color: var(--muted);
  font: 400 12px/1.5 var(--mono);
  letter-spacing: 0.04em;
}
.hint-touch {
  display: none;
}
@media (hover: none), (pointer: coarse) {
  .hint-fine {
    display: none;
  }
  .hint-touch {
    display: inline;
  }
}
.hp-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(18px, 2vw, 28px) clamp(6px, 0.6vw, 10px);
}
.hp-media {
  --x: 0%;
  aspect-ratio: 674 / 380;
  cursor: crosshair;
  transition: --x 0.55s var(--ease);
}
.hp-media.is-tracking {
  transition: none;
}
.hp-media.is-on {
  --x: 100%;
}
.hp-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hp-wire {
  clip-path: inset(0 calc(100% - var(--x)) 0 0);
}
.hp-scan {
  position: absolute;
  z-index: 2;
  top: 0;
  bottom: 0;
  left: var(--x);
  width: 1px;
  margin-left: -0.5px;
  background: var(--white);
  box-shadow: 0 0 14px rgb(255 255 255 / 80%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
}
.hp-media.is-tracking .hp-scan {
  opacity: 1;
}
.hp-toggle {
  position: absolute;
  z-index: 4;
  inset: 0;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: inherit;
}
.hp-toggle:focus-visible {
  outline-offset: -3px;
}
.hp-tile figcaption .num {
  min-width: 2ch;
}
.hp-tile figcaption::after {
  content: '';
  flex: 1;
  align-self: center;
  height: 1px;
  background: var(--line);
}

/* 02 Air Max */
.am-key {
  width: min(100%, 980px);
  margin: 0 auto clamp(48px, 6vw, 90px);
  perspective: 1400px;
}
.am-key-art {
  background: transparent;
  transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform 0.6s var(--ease);
  will-change: transform;
}
.am-key-art img {
  width: 100%;
  height: auto;
  filter: drop-shadow(0 30px 60px rgb(150 110 230 / 22%));
}
.am-key figcaption {
  justify-content: center;
  color: var(--muted);
  font: 400 11.5px/1.4 var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.am-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(28px, 3vw, 44px) clamp(14px, 1.6vw, 24px);
}

/* Intermezzo: time capsule */
.interlude {
  padding: clamp(56px, 7vw, 110px) 0;
  background: var(--gap);
}
.tc {
  width: min(100%, 1120px);
  margin: 0 auto;
}
.tc-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #050305;
  box-shadow: 0 40px 120px -40px rgb(180 40 200 / 35%);
}
.tc-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.tc figcaption {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-top: 14px;
}
.tc h2 {
  color: var(--white);
  font: 500 clamp(18px, 1.6vw, 22px) / 1.2 var(--sans);
  letter-spacing: -0.01em;
}
.loop-toggle {
  position: absolute;
  right: 14px;
  bottom: 14px;
  z-index: 2;
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid rgb(255 255 255 / 30%);
  border-radius: 999px;
  background: rgb(0 0 0 / 50%);
  color: var(--soft);
  font: 400 11px/1 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}
.loop-toggle:hover {
  color: var(--white);
  border-color: var(--white);
}

/* 03 IKEA */
.ikea-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: center;
  gap: clamp(30px, 3.4vw, 50px) clamp(14px, 1.6vw, 24px);
}
.ikea-cabinet {
  width: 84%;
  justify-self: end;
}

/* Film (Vimeo): una "lastra" al posto del fotogramma finché il player non è pronto */
.film-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #070707;
}
.film-frame iframe {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  border: 0;
  opacity: 0;
  transition: opacity 0.6s;
}
.film.is-ready .film-frame iframe {
  opacity: 1;
}
.slate {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 8px;
  color: var(--white);
}
.slate::before {
  /* angoli della regione di render */
  content: '';
  position: absolute;
  inset: 14px;
  background:
    linear-gradient(currentColor, currentColor) 0 0 / 14px 1px,
    linear-gradient(currentColor, currentColor) 0 0 / 1px 14px,
    linear-gradient(currentColor, currentColor) 100% 0 / 14px 1px,
    linear-gradient(currentColor, currentColor) 100% 0 / 1px 14px,
    linear-gradient(currentColor, currentColor) 0 100% / 14px 1px,
    linear-gradient(currentColor, currentColor) 0 100% / 1px 14px,
    linear-gradient(currentColor, currentColor) 100% 100% / 14px 1px,
    linear-gradient(currentColor, currentColor) 100% 100% / 1px 14px;
  background-repeat: no-repeat;
  opacity: 0.5;
}
.slate-label {
  position: relative;
  font: 500 clamp(18px, 2vw, 28px) / 1.1 var(--sans);
  letter-spacing: -0.01em;
}
.slate-time {
  position: relative;
  font: 400 11.5px/1 var(--mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.7;
}
.slate-ikea {
  background:
    radial-gradient(circle at 18% 28%, rgb(235 64 52 / 55%), transparent 42%),
    radial-gradient(circle at 82% 72%, rgb(43 196 226 / 50%), transparent 46%),
    radial-gradient(circle at 64% 18%, rgb(190 235 60 / 32%), transparent 38%),
    #0b0b0b;
}
.slate-door {
  align-content: start;
  padding-top: 15%;
  background:
    linear-gradient(90deg, transparent 74%, rgb(255 250 246 / 94%) 74% 80%, transparent 80%) 0 100% / 100% 42% no-repeat,
    radial-gradient(ellipse 22% 40% at 77% 92%, rgb(255 236 228 / 32%), transparent 70%),
    linear-gradient(#5d1418, #2a0709);
}
.slate-plum {
  background:
    radial-gradient(ellipse 50% 60% at 30% 70%, rgb(120 20 120 / 55%), transparent 70%),
    radial-gradient(circle at 72% 32%, rgb(255 120 60 / 30%), transparent 36%),
    #0c020c;
}
/* Copertine dei due film IKEA: fotogrammi già usati in ikea.html */
.slate-photo {
  background: #070707;
}
.slate-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.slate-photo::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgb(0 0 0 / 15%), rgb(0 0 0 / 55%));
}
.slate-photo::before,
.slate-photo .slate-label,
.slate-photo .slate-time {
  z-index: 1;
}
.film-play {
  position: absolute;
  z-index: 3;
  left: 50%;
  bottom: 18px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 20px 0 16px;
  border: 1px solid rgb(255 255 255 / 60%);
  border-radius: 999px;
  background: rgb(0 0 0 / 45%);
  color: var(--white);
  font: 400 13px/1 var(--sans);
  transform: translateX(-50%);
  cursor: pointer;
  transition:
    background-color 0.2s,
    color 0.2s;
}
.film-play::before {
  content: '';
  width: 0;
  height: 0;
  border-left: 9px solid currentColor;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
}
.film-play:hover {
  background: var(--white);
  color: var(--black);
}
.film.is-ready .film-play,
.film.is-playing .film-play {
  display: none;
}
.film .loop-toggle {
  z-index: 3;
}

/* 04 Altri render */
.ch-more {
  background: var(--plum);
  padding-bottom: 0;
}
.diorama {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(28px, 3vw, 44px) clamp(10px, 1.2vw, 18px);
}
.diorama-main {
  grid-column: 1 / -1;
  width: min(100%, 1180px);
  justify-self: center;
}
.more-pair {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  align-items: end;
  gap: clamp(28px, 3vw, 44px) clamp(14px, 1.6vw, 24px);
  margin-top: clamp(56px, 7vw, 110px);
}
.donuts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(10px, 1.2vw, 18px);
}
.film-wide {
  width: min(100% - 2 * var(--g), 1180px);
  margin: clamp(64px, 8vw, 120px) auto 0;
}
.film-wide figcaption {
  padding-bottom: clamp(48px, 6vw, 90px);
}

/* Entrate */
.reveal-ready [data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 0.8s var(--ease),
    transform 0.8s var(--ease);
}
.reveal-ready [data-reveal].is-in {
  opacity: 1;
  transform: none;
}

/* Footer --------------------------------------------------------------------------------------- */
.project-raccolta3d .portfolio-footer {
  padding: 80px var(--g) 28px;
  background: var(--ink);
  color: #d8d8d8;
  font-family: var(--sans);
  border-top: 1px solid var(--line);
}
.project-raccolta3d .portfolio-footer .signature img {
  width: 52px;
  height: auto;
  filter: brightness(0) invert(0.88);
}
.project-raccolta3d .portfolio-footer .label {
  margin: 0;
  color: var(--muted);
  font: 400 11px/1.4 var(--mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.project-raccolta3d .footer-top {
  display: grid;
  grid-template-columns: 1fr 2fr 1fr;
  align-items: start;
  gap: 45px;
  margin-bottom: 64px;
}
.project-raccolta3d .footer-top > div p:last-child {
  margin: 14px 0 0;
  color: rgb(216 216 216 / 76%);
  font-size: 14px;
  line-height: 1.7;
}
.project-raccolta3d .footer-top > a:last-child {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 13px;
}
.project-raccolta3d .project-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 35px;
  padding: 34px 0;
  border-top: 1px solid rgb(216 216 216 / 24%);
}
.project-raccolta3d .project-all {
  border-bottom: 1px solid rgb(216 216 216 / 24%);
}
.project-raccolta3d .project-link p {
  margin: 14px 0 0;
  color: var(--white);
  font: 500 clamp(38px, 5.6vw, 92px) / 1 var(--sans);
  letter-spacing: -0.03em;
}
.project-raccolta3d .project-all p {
  font-size: clamp(26px, 3.2vw, 48px);
  color: #d8d8d8;
}
.project-sub {
  display: block;
  margin-top: 10px;
  color: var(--muted);
  font: 400 12px/1.4 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.project-raccolta3d .project-link > span {
  font-size: clamp(36px, 4.6vw, 80px);
  font-weight: 400;
  font-family: system-ui, sans-serif;
  transition: transform 0.3s var(--ease);
}
.project-raccolta3d .project-link:hover > span {
  transform: translate(6px, -6px);
}
.project-raccolta3d .footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 25px;
  padding-top: 30px;
  color: rgb(216 216 216 / 70%);
  font-size: 11px;
  line-height: 1.6;
}
.project-raccolta3d .footer-bottom a {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
}

/* Schermi medi ---------------------------------------------------------------------------------- */
@media (max-width: 1100px) {
  .ch-head {
    grid-template-columns: auto minmax(0, 1fr);
  }
  .ch-head .pill {
    grid-column: 2;
    justify-self: start;
  }
  .index a {
    grid-template-columns: 40px 112px 1fr;
  }
  .index-meta {
    grid-column: 3;
    text-align: left;
    margin-top: -10px;
  }
  .index-name {
    align-self: end;
  }
  .index a {
    grid-template-rows: auto auto;
    row-gap: 4px;
  }
  .index-num,
  .index-thumb {
    grid-row: 1 / 3;
  }
}
@media (max-width: 900px) {
  .hp-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .hp-tile:first-child {
    grid-column: 1 / -1;
  }
  .more-pair {
    grid-template-columns: 1fr;
  }
  .project-raccolta3d .footer-top {
    grid-template-columns: 1fr;
    gap: 22px;
  }
  .project-raccolta3d .footer-top > a:last-child {
    justify-self: start;
  }
}

/* Telefoni ---------------------------------------------------------------------------------------- */
@media (max-width: 700px) {
  .vp {
    height: clamp(520px, calc(100svh - var(--project-header-height) - 64px), 760px);
  }
  .vp-hud {
    top: 14px;
    font-size: 10px;
  }
  .vp-gizmo {
    display: none;
  }
  .vp-title {
    bottom: 136px;
    max-width: calc(100% - 2 * var(--g));
  }
  .vp-controls {
    left: var(--g);
    right: var(--g);
    bottom: 22px;
    justify-content: flex-start;
  }
  .seg button {
    padding: 0 13px;
  }
  .vp-btn {
    padding: 0 14px;
  }
  .err {
    --dw: clamp(196px, 58%, 250px);
  }
  .vp .vp-crash {
    inset: 54px 0 246px;
  }
  .hero-joke {
    font-size: 13px;
  }
  .ch-head {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .ch-num {
    font-size: 64px;
  }
  .ch-head .pill {
    grid-column: 1;
  }
  .index a {
    grid-template-columns: 96px 1fr;
    column-gap: 16px;
    min-height: 80px;
  }
  .index-num {
    display: none;
  }
  .index-thumb {
    grid-column: 1;
  }
  .index-name,
  .index-meta {
    grid-column: 2;
  }
  .hp-grid,
  .am-grid,
  .ikea-grid {
    grid-template-columns: 1fr;
  }
  .hp-tile:first-child {
    grid-column: auto;
  }
  .ikea-cabinet {
    width: 100%;
  }
  .diorama {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .diorama > .shot:last-child {
    grid-column: 1 / -1;
  }
  .film-play {
    bottom: 12px;
  }
  .slate-label {
    font-size: 17px;
  }
  .project-raccolta3d .footer-bottom {
    flex-direction: column;
    gap: 6px;
  }
}
@media (max-width: 420px) {
  .vp-title h1 {
    font-size: 30px;
  }
  .ch-copy h2 {
    font-size: 32px;
  }
  .shot figcaption,
  .film figcaption,
  .hp-tile figcaption {
    font-size: 13px;
  }
}

/* IMMAGINI PIÙ GRANDI (30 ottobre 2026) -------------------------------------------------------
   I lavori escono dal margine della pagina: griglie a tutta larghezza con 4 px tra le immagini,
   film e intermezzi da bordo a bordo, il diorama in volo tra le nuvole. */
.bleed-grid {
  display: grid;
  gap: 4px;
  width: 100%;
}
.bleed-grid figcaption,
.bleed-one figcaption,
.tc figcaption,
.film-wide figcaption {
  padding-inline: var(--g);
}
.bleed-grid figcaption {
  padding-inline: clamp(12px, 1.4vw, 22px);
  margin-bottom: clamp(14px, 1.6vw, 24px);
}

/* 01 Harry Potter: due colonne da bordo a bordo; la prima cella ha i comandi */
.hp-board {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
}
.hp-board .hp-grid {
  display: contents;
}
.hp-board .hp-tools {
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 20px;
  margin: 0;
  padding: clamp(24px, 4vw, 64px);
  aspect-ratio: 674 / 380;
  background: var(--gap);
}
.hp-board .hp-hint {
  max-width: 34ch;
  font-size: 13px;
}
.hp-board .hp-tile figcaption {
  margin: 12px clamp(12px, 1.4vw, 22px) clamp(14px, 1.6vw, 24px);
}

/* 02 Air Max */
.am-key {
  width: min(100%, 1240px);
}
.am-grid.bleed-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
}

/* Intermezzo: la time capsule da bordo a bordo */
.interlude {
  padding: 4px 0 clamp(20px, 3vw, 40px);
}
.tc {
  width: 100%;
}
.tc-frame {
  box-shadow: none;
}

/* 03 IKEA: due per due, tutte alla stessa proporzione */
.ikea-grid.bleed-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 4px;
}
.ikea-grid .ikea-cabinet {
  width: 100%;
}
.ikea-grid .shot-media {
  aspect-ratio: 16 / 9;
}
.ikea-grid .shot-media img {
  height: 100%;
  object-fit: cover;
}

/* 04 Altri render */
.ch-more .ch-head {
  margin-bottom: clamp(30px, 4vw, 56px);
}
.cams.bleed-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 4px;
}
.bleed-one {
  margin-top: clamp(40px, 5vw, 80px);
}
.bleed-one .shot-media img {
  width: 100%;
}
.donuts.bleed-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  margin-top: 4px;
}
.film-wide {
  width: 100%;
  margin: clamp(40px, 5vw, 80px) 0 0;
}
.film-wide .slate-label {
  font-size: clamp(22px, 3vw, 44px);
}

/* Il diorama tra le nuvole --------------------------------------------------------------------- */
.sky {
  position: relative;
  background: #6e8ed3;
}
.sky-stage {
  position: relative;
  overflow: hidden;
}
.sky-world {
  position: relative;
}
.sky-diorama {
  display: block;
  width: 100%;
  height: auto;
}
.sky-cap {
  display: flex;
  gap: 12px;
  align-items: baseline;
  margin: 0;
  padding: 12px var(--g) 0;
  background: var(--plum);
  color: var(--soft);
  font: 400 14px/1.4 var(--sans);
}
/* in volo (JavaScript e movimento): lo schermo resta fermo e la camera avanza tra le nuvole */
.sky.is-live {
  height: 340vh;
}
.sky.is-live .sky-stage {
  position: sticky;
  top: var(--project-header-height);
  height: calc(100vh - var(--project-header-height));
  height: calc(100svh - var(--project-header-height));
  background:
    radial-gradient(ellipse 60% 70% at 4% 46%, rgb(214 222 240 / 70%), transparent 70%),
    linear-gradient(100deg, #a3b4da 0%, #8ea6d8 22%, #7393d4 48%, #5c83d2 78%, #5880d1 100%);
}
.sky.is-live .sky-world {
  position: absolute;
  inset: 0;
}
.sky.is-live .sky-world > * {
  position: absolute;
  left: 0;
  top: 0;
  max-width: none;
  transform-origin: 0 0;
  will-change: transform, opacity;
  pointer-events: none;
  user-select: none;
}
.sky.is-live .sky-diorama {
  /* i bordi del render sfumano nel cielo */
  -webkit-mask-image: radial-gradient(ellipse 50% 50% at 50% 50%, #000 66%, transparent 100%);
  mask-image: radial-gradient(ellipse 50% 50% at 50% 50%, #000 66%, transparent 100%);
}
.sky.is-live .sky-cap {
  position: absolute;
  left: var(--g);
  bottom: 22px;
  z-index: 2000;
  padding: 9px 14px;
  border-radius: 999px;
  background: rgb(7 0 7 / 45%);
  color: #fff;
  opacity: var(--cap, 0);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.sky.is-live .sky-cap .num {
  color: rgb(255 255 255 / 75%);
}

@media (max-width: 900px) {
  .cams.bleed-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .cams.bleed-grid > .shot:last-child {
    grid-column: 1 / -1;
  }
}
@media (max-width: 700px) {
  .hp-board,
  .am-grid.bleed-grid,
  .ikea-grid.bleed-grid,
  .cams.bleed-grid {
    grid-template-columns: 1fr;
  }
  .cams.bleed-grid > .shot:last-child {
    grid-column: auto;
  }
  .hp-board .hp-tools {
    aspect-ratio: auto;
    padding: 28px var(--g);
  }
  .sky.is-live {
    height: 300vh;
  }
}

/* Movimento ridotto e stampa ------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .project-raccolta3d *,
  .project-raccolta3d *::before,
  .project-raccolta3d *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
  .am-key-art {
    transform: none;
  }
}
@media print {
  .vp-crash,
  .vp-controls,
  .bk-canvas {
    display: none !important;
  }
  .bk-wait img,
  .reveal-ready [data-reveal] {
    opacity: 1 !important;
    transform: none !important;
  }
}
