/* =========================================================================
   MARCHESELLI STUDIO — "Camera Oscura"
   Concept: la camera oscura di un fotografo notturno. Buio d'inchiostro,
   luce di sicurezza rossa, ambra delle insegne e della brace, grana di
   pellicola. Il tema chiaro è la "carta fotografica" sviluppata.
   -------------------------------------------------------------------------
   Indice
   01. Token e temi          09. Scrollytelling       17. Footer
   02. Base e reset          10. Chi sono             18. Lightbox
   03. Grana e progress      11. Tavolo luminoso      19. Palette e terminale
   04. Loader                12. Scatti (ring 3D)     20. Mini-gioco
   05. Navigazione e menu    13. Banda citazione      21. Cursore, ripple, cinema
   06. Hero                  14. Servizi              22. Konami / retro
   07. Marquee               15. Clienti              23. Fallback e reduced motion
   08. Lavori (orizzontale)  16. Contatti             24. Responsive
   ========================================================================= */

/* ---------- 01. Token e temi ---------- */
:root {
  /* Palette "camera oscura" (tema scuro, default) */
  --bg: #0c0a0b;
  --bg-2: #141113;
  --bg-3: #1d181a;
  --fg: #efe8dc;
  --fg-dim: #a59a91;
  --line: rgba(239, 232, 220, .14);
  --safe: #ff3d2e;          /* luce di sicurezza: accento forte */
  --safe-deep: #9e1b12;
  --amber: #ffb547;         /* ambra di insegne e brace */
  --paper: #efe8dc;
  --shadow: 0 30px 80px -30px rgba(0, 0, 0, .8);
  --grad-safe: linear-gradient(120deg, var(--safe) 0%, #ff6a3d 45%, var(--amber) 100%);
  --grad-ink: radial-gradient(120% 80% at 80% 0%, #2a1412 0%, transparent 55%), radial-gradient(90% 70% at 0% 100%, #1d1310 0%, transparent 60%);

  /* Tipografia */
  --f-display: "Bricolage Grotesque", "Arial Narrow", system-ui, sans-serif;
  --f-body: "Inter Tight", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-serif: "Instrument Serif", Georgia, serif;
  --f-mono: "JetBrains Mono", ui-monospace, Consolas, monospace;

  /* Scala fluida */
  --fs-giant: clamp(4.2rem, 15.5vw, 17rem);
  --fs-h1: clamp(3rem, 10vw, 10.5rem);
  --fs-h2: clamp(3rem, 9vw, 8.5rem);
  --fs-h3: clamp(1.6rem, 3.2vw, 2.9rem);
  --fs-lead: clamp(1.25rem, 2.6vw, 2.35rem);
  --fs-body: clamp(1rem, .95rem + .25vw, 1.125rem);
  --fs-small: clamp(.72rem, .7rem + .1vw, .8rem);

  --gut: clamp(16px, 4.5vw, 72px);
  --nav-h: 72px;
  --radius: 18px;
  --ease: cubic-bezier(.22, .61, .36, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-in-out: cubic-bezier(.76, 0, .24, 1);
}

/* Tema chiaro: "carta fotografica" */
:root[data-theme="light"] {
  --bg: #ece5d8;
  --bg-2: #e3dbcc;
  --bg-3: #d8cfbe;
  --fg: #16110f;
  --fg-dim: #5f5650;
  --line: rgba(22, 17, 15, .16);
  --safe: #d42a1b;
  --safe-deep: #8d160c;
  --amber: #b36a0d;
  --shadow: 0 30px 70px -35px rgba(60, 30, 10, .45);
  --grad-ink: radial-gradient(120% 80% at 80% 0%, #f5d9c6 0%, transparent 55%), radial-gradient(90% 70% at 0% 100%, #e9d5bd 0%, transparent 60%);
}

/* ---------- 02. Base e reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { overflow-x: clip; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--f-body);
  font-size: var(--fs-body);
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background-color .5s var(--ease), color .5s var(--ease);
}
img, video, canvas, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
ul, ol { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, h4, p, figure, blockquote { margin: 0; }
::selection { background: var(--safe); color: #fff; }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 4px; border-radius: 4px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Lenis: classi raccomandate */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: hidden; }

.skip-link {
  position: fixed; left: 16px; top: -60px; z-index: 1000;
  background: var(--safe); color: #fff; padding: .7rem 1.1rem; border-radius: 999px;
  font-size: var(--fs-small); letter-spacing: .1em; text-transform: uppercase;
  transition: top .3s var(--ease);
}
.skip-link:focus { top: 14px; }

/* Etichette ricorrenti */
.eyebrow {
  display: flex; align-items: center; gap: .9rem;
  font-family: var(--f-mono); font-size: var(--fs-small);
  letter-spacing: .18em; text-transform: uppercase; color: var(--fg-dim);
}
.eyebrow__line { display: inline-block; width: clamp(40px, 7vw, 110px); height: 1px; background: var(--safe); transform-origin: 0 50%; }
.section-title {
  font-family: var(--f-display);
  font-size: var(--fs-h2);
  font-weight: 700;
  font-variation-settings: "wdth" 78, "opsz" 96;
  line-height: .86;
  letter-spacing: -.035em;
  text-transform: uppercase;
}
.section-title--sm { font-size: clamp(2.4rem, 6vw, 5.4rem); }
.section-sub { max-width: 46ch; color: var(--fg-dim); font-size: clamp(1.05rem, 1.4vw, 1.3rem); }
.section-head { display: grid; gap: 1.4rem; padding: 0 var(--gut); }

/* Split text: parole e lettere */
.word { display: inline-block; white-space: nowrap; }
.char { display: inline-block; will-change: transform; }
.mask-line { display: block; overflow: hidden; padding-bottom: .08em; margin-bottom: -.08em; }
.mask-line > span { display: block; }

/* Pulsanti */
.btn {
  --bx: 0px; --by: 0px;
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 0 1.6rem; border-radius: 999px;
  font-size: .82rem; font-weight: 500; letter-spacing: .14em; text-transform: uppercase;
  overflow: hidden; isolation: isolate;
  transition: transform .5s var(--ease-out), color .35s var(--ease), border-color .35s;
}
.btn > span { position: relative; z-index: 1; display: inline-block; transition: transform .5s var(--ease-out); }
.btn::before {
  content: ""; position: absolute; inset: 0; z-index: 0; border-radius: inherit;
  background: var(--fg); transform: translateY(101%); transition: transform .55s var(--ease-out);
}
.btn:hover::before, .btn:focus-visible::before { transform: translateY(0); }
.btn--primary { background: var(--safe); color: #fff; }
.btn--primary:hover { color: var(--bg); }
.btn--ghost { border: 1px solid var(--line); color: var(--fg); }
.btn--ghost:hover { color: var(--bg); border-color: var(--fg); }
.btn--small { min-height: 40px; padding: 0 1.1rem; font-size: .72rem; border: 1px solid var(--line); }
.btn--small:hover { color: var(--bg); }
.btn--big { min-height: 64px; padding: 0 2.2rem; }

/* Link con testo che rotola */
.roll { position: relative; display: inline-block; overflow: hidden; vertical-align: bottom; }
.roll > span { display: inline-block; transition: transform .5s var(--ease-out); }
.roll > span::after { content: attr(data-text); position: absolute; left: 0; top: 100%; color: var(--safe); }
.roll:hover > span, .roll:focus-visible > span { transform: translateY(-100%); }

.chip {
  display: inline-flex; align-items: center; gap: .4rem; min-height: 36px; padding: 0 1rem;
  border: 1px solid var(--line); border-radius: 999px;
  font-family: var(--f-mono); font-size: .72rem; letter-spacing: .1em; text-transform: uppercase;
  transition: background .3s, color .3s, border-color .3s;
}
.chip:hover { border-color: var(--fg); }
.chip.is-active { background: var(--fg); color: var(--bg); border-color: var(--fg); }

/* Contenitore immagini: segnaposto + gestione errori */
.media { position: relative; overflow: hidden; background: var(--bg-3); }
.media img, .media video { width: 100%; height: 100%; object-fit: cover; }
.media.is-missing::after, .ph {
  content: attr(data-ph);
  position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 1rem;
  font-family: var(--f-mono); font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; color: var(--fg-dim);
  background:
    repeating-linear-gradient(135deg, transparent 0 14px, rgba(255, 61, 46, .07) 14px 15px),
    var(--bg-3);
}
.media.is-missing img, .media.is-missing video { opacity: 0; }

/* ---------- 03. Grana e progress ---------- */
.grain {
  position: fixed; inset: -50%; z-index: 990; pointer-events: none;
  opacity: .07; mix-blend-mode: overlay;
  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='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 1s steps(6) infinite;
}
:root[data-theme="light"] .grain { opacity: .12; mix-blend-mode: multiply; }
@keyframes grain {
  0% { transform: translate(0, 0); } 20% { transform: translate(-6%, 4%); } 40% { transform: translate(5%, -7%); }
  60% { transform: translate(-3%, 8%); } 80% { transform: translate(7%, 2%); } 100% { transform: translate(0, 0); }
}
.progress { position: fixed; inset: 0 0 auto 0; height: 2px; z-index: 960; pointer-events: none; }
.progress__bar { height: 100%; background: var(--grad-safe); transform: scaleX(0); transform-origin: 0 50%; }

/* ---------- 04. Loader ---------- */
.loader {
  position: fixed; inset: 0; z-index: 1100; display: grid; place-items: center;
  color: var(--paper); pointer-events: auto;
}
.loader__curtain {
  position: absolute; left: 0; right: 0; height: 50.5%; background: #0c0a0b;
  transition: transform 1s var(--ease-in-out);
}
.loader__curtain--top { top: 0; }
.loader__curtain--bottom { bottom: 0; }
.loader__curtain::after { /* bordo rosso delle tendine dell'otturatore */
  content: ""; position: absolute; left: 0; right: 0; height: 1px; background: var(--safe);
  box-shadow: 0 0 24px 2px rgba(255, 61, 46, .6);
}
.loader__curtain--top::after { bottom: 0; }
.loader__curtain--bottom::after { top: 0; }
.loader__inner { position: relative; display: grid; justify-items: center; gap: 1.1rem; transition: opacity .4s, transform .6s var(--ease-in-out); }
.loader__iris { width: clamp(92px, 14vw, 140px); overflow: visible; animation: iris-spin 2.4s var(--ease-in-out) forwards; }
.loader__iris * { fill: none; stroke: var(--safe); stroke-width: 2; stroke-linecap: round; }
.iris-ring { stroke-dasharray: 340; stroke-dashoffset: 340; animation: draw 1.4s var(--ease-out) .1s forwards; }
.iris-blades path { stroke: var(--paper); stroke-dasharray: 60; stroke-dashoffset: 60; animation: draw .9s var(--ease-out) forwards; }
.iris-blades path:nth-child(2) { animation-delay: .15s; } .iris-blades path:nth-child(3) { animation-delay: .3s; }
.iris-blades path:nth-child(4) { animation-delay: .45s; } .iris-blades path:nth-child(5) { animation-delay: .6s; }
.iris-blades path:nth-child(6) { animation-delay: .75s; }
.iris-core { fill: var(--amber) !important; stroke: none !important; transform-origin: 60px 60px; transform: scale(0); animation: core 1.6s var(--ease-out) .6s forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes core { 0% { transform: scale(0); } 60% { transform: scale(1.6); } 100% { transform: scale(1); } }
@keyframes iris-spin { to { transform: rotate(120deg); } }
.loader__count { font-family: var(--f-display); font-weight: 800; font-variation-settings: "wdth" 75; font-size: clamp(3rem, 9vw, 6.5rem); line-height: .9; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.loader__count small { font-family: var(--f-mono); font-size: .9rem; font-weight: 400; letter-spacing: .1em; color: var(--safe); margin-left: .3rem; vertical-align: top; }
.loader__label { font-family: var(--f-mono); font-size: .72rem; letter-spacing: .32em; text-transform: uppercase; color: #a59a91; min-height: 1.2em; }
.loader__skip {
  position: absolute; right: var(--gut); bottom: calc(var(--gut) + env(safe-area-inset-bottom)); z-index: 2;
  font-family: var(--f-mono); font-size: .72rem; letter-spacing: .2em; text-transform: uppercase; color: #a59a91;
  padding: .6rem 1rem; border: 1px solid rgba(239, 232, 220, .2); border-radius: 999px; transition: color .3s, border-color .3s, opacity .3s;
}
.loader__skip:hover { color: #fff; border-color: var(--safe); }
.loader.is-open .loader__curtain--top { transform: translateY(-101%); }
.loader.is-open .loader__curtain--bottom { transform: translateY(101%); }
.loader.is-open .loader__inner { opacity: 0; transform: scale(.85); }
.loader.is-open .loader__skip { opacity: 0; }
.loader.is-open { pointer-events: none; }
.loader.is-gone { display: none; }

/* ---------- 05. Navigazione e menu ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 950; height: var(--nav-h);
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 1rem;
  padding: 0 var(--gut); padding-top: env(safe-area-inset-top);
  mix-blend-mode: difference; color: #f4efe6;
  pointer-events: none;
}
.nav > * { pointer-events: auto; }
.nav__logo { display: inline-flex; align-items: center; gap: .7rem; justify-self: start; }
.nav__mark {
  display: grid; place-items: center; width: 40px; height: 40px; border: 1px solid currentColor; border-radius: 50%;
  font-family: var(--f-display); font-weight: 700; font-size: .85rem; letter-spacing: .04em;
  transition: transform .6s var(--ease-out);
}
.nav__logo:hover .nav__mark { transform: rotate(-180deg); }
.nav__name { font-family: var(--f-display); font-weight: 600; font-size: 1rem; letter-spacing: -.01em; }
.nav__name em { font-family: var(--f-serif); font-weight: 400; margin-left: .3em; font-size: 1.08em; }
.nav__current { display: flex; gap: .6rem; align-items: baseline; font-family: var(--f-mono); font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; }
.nav__current-num { opacity: .6; }
.nav__current-label { display: inline-block; overflow: hidden; height: 1.3em; }
.nav__current-label span { display: inline-block; }
.nav__current-label span.is-rolling { animation: roll-in .6s var(--ease-out); }
@keyframes roll-in { from { transform: translateY(110%); } to { transform: translateY(0); } }
.nav__tools { display: flex; align-items: center; justify-content: flex-end; gap: .45rem; }
.nav__clock { font-family: var(--f-mono); font-size: .72rem; letter-spacing: .1em; margin-right: .4rem; font-variant-numeric: tabular-nums; }
.nav__btn {
  display: grid; place-items: center; min-width: 40px; height: 40px; padding: 0 .6rem; border-radius: 999px;
  border: 1px solid rgba(244, 239, 230, .35); font-family: var(--f-mono); font-size: .7rem;
  transition: background .3s, color .3s, border-color .3s;
}
.nav__btn:hover { background: #f4efe6; color: #000; }
.nav__btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.nav__btn svg path:first-child { fill: currentColor; stroke: none; }
#themeBtn svg path:first-child { fill: none; stroke: currentColor; }
#themeBtn circle { fill: currentColor; stroke: none; }
.sound-wave { display: none; }
#soundBtn[aria-pressed="true"] .sound-wave { display: block; }
#soundBtn[aria-pressed="true"] .sound-off { display: none; }
.nav__menu {
  display: inline-flex; align-items: center; gap: .7rem; height: 40px; padding: 0 .4rem 0 1rem; margin-left: .3rem;
  border-radius: 999px; background: #f4efe6; color: #000;
  font-size: .72rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase;
}
.nav__menu-icon { display: grid; gap: 5px; place-content: center; width: 32px; height: 32px; border-radius: 50%; background: #000; }
.nav__menu-icon i { display: block; width: 14px; height: 1.5px; background: #f4efe6; transition: transform .45s var(--ease-out); }
.nav__menu[aria-expanded="true"] .nav__menu-icon i:first-child { transform: translateY(3.25px) rotate(45deg); }
.nav__menu[aria-expanded="true"] .nav__menu-icon i:last-child { transform: translateY(-3.25px) rotate(-45deg); }

.menu {
  position: fixed; inset: 0; z-index: 940; display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); grid-template-rows: 1fr auto;
  gap: 2rem; padding: calc(var(--nav-h) + 4vh) var(--gut) var(--gut);
  visibility: hidden; color: var(--paper);
}
.menu__bg { position: absolute; inset: 0; background: #0c0a0b; clip-path: circle(0% at calc(100% - 60px) 36px); transition: clip-path .9s var(--ease-in-out); }
.menu__bg::after { content: ""; position: absolute; inset: 0; background: var(--grad-ink); opacity: .9; }
.menu.is-open { visibility: visible; }
.menu.is-open .menu__bg { clip-path: circle(150% at calc(100% - 60px) 36px); }
.menu.is-closing { visibility: visible; }
.menu__list { position: relative; display: flex; flex-direction: column; justify-content: center; gap: .1rem; align-self: center; }
.menu__item {
  display: flex; align-items: baseline; gap: 1rem; overflow: hidden;
  font-family: var(--f-display); font-weight: 700; font-variation-settings: "wdth" 78;
  font-size: clamp(2.3rem, 6.4vw, 6rem); line-height: .98; letter-spacing: -.03em; text-transform: uppercase;
}
.menu__item small { font-family: var(--f-mono); font-size: .75rem; font-weight: 400; letter-spacing: .1em; color: var(--safe); }
.menu__item > span { display: inline-block; transform: translateY(105%); transition: transform .8s var(--ease-out), color .3s, letter-spacing .4s var(--ease-out); }
.menu.is-open .menu__item > span { transform: translateY(0); transition-delay: calc(.25s + var(--i) * .06s); }
.menu__item:hover > span, .menu__item:focus-visible > span { color: var(--safe); letter-spacing: -.01em; }
.menu__item.is-current small::after { content: " ●"; }
.menu__preview { position: relative; align-self: center; aspect-ratio: 4 / 5; max-height: 64vh; width: 100%; border-radius: var(--radius); overflow: hidden; opacity: 0; transform: scale(.92) rotate(2deg); transition: opacity .6s .3s, transform .9s var(--ease-out) .3s; }
.menu.is-open .menu__preview { opacity: 1; transform: none; }
.menu__preview img { width: 100%; height: 100%; object-fit: cover; transition: clip-path .7s var(--ease-out), transform 1.2s var(--ease-out); clip-path: inset(0); }
.menu__preview img.is-swapping { clip-path: inset(0 0 100% 0); transform: scale(1.15); transition: none; }
.menu__foot { position: relative; grid-column: 1 / -1; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; font-family: var(--f-mono); font-size: .78rem; letter-spacing: .08em; opacity: 0; transition: opacity .5s .6s; }
.menu.is-open .menu__foot { opacity: 1; }
.menu__social { display: flex; gap: 1.4rem; }

/* Transizione tra sezioni: pannello rosso che scorre */
.wipe {
  position: fixed; inset: 0; z-index: 945; pointer-events: none; display: grid; place-items: center;
  background: var(--safe); color: #fff; transform: scaleY(0); transform-origin: 50% 100%;
}
.wipe__label { font-family: var(--f-display); font-weight: 800; font-variation-settings: "wdth" 75; font-size: clamp(2.6rem, 9vw, 8rem); text-transform: uppercase; letter-spacing: -.03em; opacity: 0; }

/* ---------- 06. Hero ---------- */
.hero {
  position: relative; min-height: 100vh; min-height: 100svh; overflow: hidden;
  display: grid; align-items: end; padding: calc(var(--nav-h) + 4vh) var(--gut) clamp(32px, 7vh, 80px);
  isolation: isolate; color: var(--fg);
}
.hero__gl, .hero__fallback { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -2; }
.hero__fallback { z-index: -3; background: var(--grad-ink), var(--bg); }
.hero.no-gl .hero__gl { display: none; }
.hero__layers { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.hero__layers > * { position: absolute; pointer-events: auto; will-change: transform; }
.hero__frame {
  right: clamp(16px, 7vw, 120px); top: calc(var(--nav-h) + 3vh);
  width: clamp(200px, 30vw, 460px); padding: 10px 10px 0; background: var(--paper); color: #16110f;
  box-shadow: var(--shadow); rotate: 3deg; cursor: pointer;
}
.hero__frame-img { aspect-ratio: 4 / 5; }
.hero__frame-img img { object-position: 60% 50%; }
.hero__frame figcaption { display: flex; justify-content: space-between; gap: .5rem; padding: .6rem .1rem .7rem; font-family: var(--f-mono); font-size: .62rem; letter-spacing: .06em; text-transform: uppercase; }
.hero__strip {
  left: 46%; top: 54%; display: flex; gap: 6px; padding: 12px 8px; background: #050404;
  rotate: -12deg; border-radius: 4px;
  box-shadow: 0 20px 60px -20px rgba(0, 0, 0, .9);
  /* perforazioni della pellicola */
  background-image: radial-gradient(circle at 50% 50%, #2a2526 2.4px, transparent 2.6px), radial-gradient(circle at 50% 50%, #2a2526 2.4px, transparent 2.6px);
  background-size: 14px 12px, 14px 12px; background-repeat: repeat-x; background-position: 0 0, 0 100%;
}
.hero__strip .media { width: clamp(70px, 9vw, 130px); aspect-ratio: 3 / 2; border-radius: 2px; }
.hero__sticker {
  left: 52%; top: 22%; padding: .5rem .9rem; border-radius: 999px; background: var(--safe); color: #fff;
  font-family: var(--f-mono); font-size: .78rem; letter-spacing: .08em; rotate: -8deg;
  box-shadow: 0 10px 30px -10px rgba(255, 61, 46, .8);
}
.hero__sticker--b { left: auto; right: 6%; top: auto; bottom: 18%; background: var(--amber); color: #16110f; rotate: 6deg; }
.hero__content { position: relative; display: grid; gap: clamp(1rem, 2.4vh, 1.6rem); max-width: 100%; }
.hero__eyebrow { font-family: var(--f-mono); font-size: var(--fs-small); letter-spacing: .2em; text-transform: uppercase; color: var(--fg-dim); }
.hero__title {
  font-family: var(--f-display); font-weight: 800; font-size: var(--fs-h1);
  line-height: .82; letter-spacing: -.045em; text-transform: uppercase;
  font-variation-settings: "wdth" 75, "opsz" 96;
  cursor: default; user-select: none;
}
.hero__line { position: relative; display: block; width: max-content; max-width: 100%; }
.hero__line--accent { font-family: var(--f-serif); font-style: italic; font-weight: 400; text-transform: none; letter-spacing: -.03em; line-height: .9; font-size: 1.06em; color: var(--safe); padding-right: .1em; }
.hero__title .char { transform: translateY(110%) rotate(8deg); opacity: 0; transition: transform 1.1s var(--ease-out), opacity .6s, font-variation-settings .35s var(--ease-out); transition-delay: calc(var(--ci) * 35ms + .1s); }
.hero__line { overflow: hidden; padding-bottom: .04em; }
html.is-loaded .hero__title .char { transform: none; opacity: 1; }
.hero__title.is-live .char { transition-delay: 0s; }
/* glitch controllato al passaggio */
.hero__line::before, .hero__line::after {
  content: attr(data-line); position: absolute; inset: 0; pointer-events: none; opacity: 0;
}
.hero__title.is-glitch .hero__line::before { opacity: .85; color: var(--amber); animation: glitch-a .5s steps(2) both; mix-blend-mode: screen; }
.hero__title.is-glitch .hero__line::after { opacity: .85; color: #3cf2ff; animation: glitch-b .5s steps(2) both; mix-blend-mode: screen; }
:root[data-theme="light"] .hero__title.is-glitch .hero__line::before, :root[data-theme="light"] .hero__title.is-glitch .hero__line::after { mix-blend-mode: multiply; }
@keyframes glitch-a {
  0% { clip-path: inset(10% 0 70% 0); transform: translate(-6px, 0); } 25% { clip-path: inset(55% 0 20% 0); transform: translate(5px, 0); }
  50% { clip-path: inset(30% 0 50% 0); transform: translate(-3px, 0); } 75% { clip-path: inset(80% 0 5% 0); transform: translate(4px, 0); }
  100% { clip-path: inset(0 0 100% 0); transform: none; }
}
@keyframes glitch-b {
  0% { clip-path: inset(65% 0 15% 0); transform: translate(6px, 0); } 25% { clip-path: inset(15% 0 60% 0); transform: translate(-5px, 0); }
  50% { clip-path: inset(45% 0 35% 0); transform: translate(3px, 0); } 75% { clip-path: inset(5% 0 85% 0); transform: translate(-4px, 0); }
  100% { clip-path: inset(100% 0 0 0); transform: none; }
}
.hero__subtitle { max-width: 44ch; font-size: clamp(1.02rem, 1.3vw, 1.2rem); color: var(--fg-dim); }
.hero__actions { display: flex; flex-wrap: wrap; gap: .8rem; }
.hero__live { display: inline-flex; align-items: center; gap: .6rem; font-family: var(--f-mono); font-size: .72rem; letter-spacing: .08em; color: var(--fg-dim); }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--safe); box-shadow: 0 0 0 0 rgba(255, 61, 46, .7); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(255, 61, 46, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 61, 46, 0); } }
.hero__eyebrow, .hero__subtitle, .hero__actions, .hero__live { opacity: 0; transform: translateY(24px); transition: opacity .9s var(--ease-out), transform 1s var(--ease-out); }
html.is-loaded .hero__eyebrow { opacity: 1; transform: none; transition-delay: .05s; }
html.is-loaded .hero__subtitle { opacity: 1; transform: none; transition-delay: .7s; }
html.is-loaded .hero__actions { opacity: 1; transform: none; transition-delay: .85s; }
html.is-loaded .hero__live { opacity: 1; transform: none; transition-delay: 1s; }
.hero__layers > * { opacity: 0; transition: opacity 1.2s var(--ease) .6s; }
html.is-loaded .hero__layers > * { opacity: 1; }
.hero__scroll { position: absolute; right: var(--gut); bottom: clamp(32px, 7vh, 80px); display: grid; justify-items: center; gap: .6rem; font-family: var(--f-mono); font-size: .66rem; letter-spacing: .24em; text-transform: uppercase; color: var(--fg-dim); writing-mode: vertical-rl; }
.hero__scroll-track { position: relative; width: 1px; height: 70px; background: var(--line); overflow: hidden; }
.hero__scroll-track i { position: absolute; left: -1px; top: 0; width: 3px; height: 22px; background: var(--safe); animation: scroll-dot 1.8s var(--ease-in-out) infinite; }
@keyframes scroll-dot { 0% { transform: translateY(-24px); } 100% { transform: translateY(74px); } }

/* ---------- 07. Marquee ---------- */
.marquee { position: relative; z-index: 2; padding: clamp(18px, 3vw, 34px) 0; border-block: 1px solid var(--line); overflow: hidden; background: var(--bg); }
.marquee__row { display: flex; width: max-content; white-space: nowrap; will-change: transform; }
.marquee__row span {
  display: inline-flex; align-items: center; gap: clamp(1rem, 2.4vw, 2.4rem); padding-right: clamp(1rem, 2.4vw, 2.4rem);
  font-family: var(--f-display); font-weight: 700; font-variation-settings: "wdth" 76;
  font-size: clamp(2.6rem, 7vw, 6.4rem); line-height: 1.02; letter-spacing: -.03em; text-transform: uppercase;
}
.marquee__row span::after { content: "✺"; font-size: .45em; color: var(--safe); }
.marquee__row--outline span { color: transparent; -webkit-text-stroke: 1px var(--fg-dim); font-family: var(--f-serif); font-style: italic; font-weight: 400; text-transform: none; letter-spacing: -.01em; }
.marquee__row--outline span::after { -webkit-text-stroke: 0; color: var(--amber); }

/* ---------- 08. Lavori (scroll orizzontale) ---------- */
.works { position: relative; background: var(--bg); }
.works__pin { height: 100vh; height: 100svh; display: flex; align-items: center; overflow: hidden; }
.works__track { display: flex; align-items: center; gap: clamp(28px, 5vw, 90px); padding: calc(var(--nav-h) + 2vh) var(--gut) 4vh; will-change: transform; }
.panel { flex: 0 0 auto; }
.works__intro { width: min(560px, 82vw); display: grid; gap: 1.3rem; }
.works__intro .section-title { font-size: clamp(4rem, 13vw, 11rem); }
.works__sub { font-size: clamp(1.05rem, 1.5vw, 1.3rem); color: var(--fg-dim); max-width: 36ch; }
.works__lead { font-family: var(--f-serif); font-style: italic; font-size: clamp(1.4rem, 2.4vw, 2rem); line-height: 1.15; max-width: 22ch; }
.works__hint { font-family: var(--f-mono); font-size: .72rem; letter-spacing: .2em; text-transform: uppercase; color: var(--safe); }
.works__hint span { display: inline-block; animation: nudge 1.4s var(--ease-in-out) infinite; }
@keyframes nudge { 50% { transform: translateX(8px); } }

.project {
  position: relative; display: grid; grid-template-rows: auto auto; gap: 1.1rem;
  width: clamp(280px, 46vw, 760px); color: var(--fg); text-align: left; cursor: pointer;
}
.project--video { width: clamp(240px, 24vw, 380px); }
.project__frame { position: relative; }
.project__media { position: relative; aspect-ratio: 16 / 10; border-radius: var(--radius); overflow: hidden; clip-path: inset(0 0 0 0 round var(--radius)); }
.project--video .project__media { aspect-ratio: 9 / 16; }
.project__media img, .project__media video { transform: scale(1.12); transition: transform 1.2s var(--ease-out); }
.project:hover .project__media img, .project:hover .project__media video { transform: scale(1.04); }
.project__num { position: absolute; left: 1rem; top: .8rem; z-index: 2; font-family: var(--f-display); font-weight: 800; font-size: clamp(3rem, 6vw, 6rem); line-height: 1; color: #fff; mix-blend-mode: difference; font-variation-settings: "wdth" 75; }
.project__tag { position: absolute; right: 1rem; top: 1rem; z-index: 2; padding: .35rem .7rem; border-radius: 999px; background: rgba(12, 10, 11, .55); backdrop-filter: blur(6px); color: #fff; font-family: var(--f-mono); font-size: .64rem; letter-spacing: .12em; text-transform: uppercase; }
.project__body { display: grid; gap: .4rem; }
.project__meta { font-family: var(--f-mono); font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; color: var(--safe); }
.project__title { font-family: var(--f-display); font-weight: 700; font-variation-settings: "wdth" 80; font-size: var(--fs-h3); line-height: .95; letter-spacing: -.03em; }
.project__desc { color: var(--fg-dim); max-width: 48ch; font-size: .98rem; }
.project__cta { font-family: var(--f-mono); font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; }
.project__cta i { display: inline-block; transition: transform .4s var(--ease-out); font-style: normal; }
.project:hover .project__cta i { transform: translateX(6px); }

.soon { display: grid; gap: 1rem; width: clamp(280px, 36vw, 560px); }
.soon__title { font-family: var(--f-serif); font-style: italic; font-size: clamp(1.8rem, 3vw, 2.6rem); line-height: 1; }
.soon__stack { display: grid; grid-template-columns: repeat(3, 1fr); gap: .8rem; }
.soon__card { position: relative; aspect-ratio: 4 / 5; border-radius: 12px; overflow: hidden; border: 1px dashed var(--line); }
.soon__card .media { position: absolute; inset: 0; }
.soon__card .ph { /* segnaposto "in sviluppo": il vassoio rosso */
  background: linear-gradient(180deg, rgba(255, 61, 46, .18), rgba(255, 61, 46, .02)), repeating-linear-gradient(0deg, transparent 0 6px, rgba(255, 61, 46, .06) 6px 7px), var(--bg-2);
}
.soon__label { position: absolute; left: .7rem; bottom: .7rem; right: .7rem; z-index: 2; display: grid; gap: .1rem; }
.soon__label b { font-family: var(--f-display); font-weight: 700; font-size: clamp(1.1rem, 1.6vw, 1.5rem); letter-spacing: -.02em; }
.soon__label span { font-family: var(--f-mono); font-size: .6rem; letter-spacing: .1em; text-transform: uppercase; color: var(--fg-dim); }
.soon__stamp {
  position: absolute; top: 12%; left: 50%; z-index: 3; translate: -50% 0; rotate: -14deg;
  padding: .25rem .5rem; border: 2px solid var(--safe); color: var(--safe); border-radius: 4px;
  font-family: var(--f-mono); font-size: .6rem; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; white-space: nowrap;
}
.works__end { width: clamp(220px, 26vw, 380px); font-family: var(--f-serif); font-style: italic; font-size: clamp(1.6rem, 2.6vw, 2.4rem); line-height: 1.1; color: var(--fg-dim); }
.works__end a { color: var(--safe); text-decoration: underline; text-underline-offset: .2em; }

/* ---------- 09. Scrollytelling "Mani in pasta" ---------- */
.story { position: relative; background: var(--bg-2); }
.story__pin {
  position: relative; height: 100vh; height: 100svh; overflow: hidden;
  display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(20px, 4vw, 64px);
  align-items: center; padding: calc(var(--nav-h) + 2vh) var(--gut) 4vh;
}
.story__text { position: relative; display: grid; gap: 1.2rem; align-content: center; }
.story__count { font-family: var(--f-display); font-weight: 800; font-variation-settings: "wdth" 75; font-size: clamp(3.2rem, 7vw, 6.5rem); line-height: .85; letter-spacing: -.04em; color: var(--safe); font-variant-numeric: tabular-nums; }
.story__count-sep, #storyTotal { color: var(--fg-dim); font-size: .45em; letter-spacing: 0; }
.story__phases { display: grid; }
.phase { grid-area: 1 / 1; display: grid; gap: 1rem; align-content: start; }
.phase__title { font-family: var(--f-display); font-weight: 700; font-variation-settings: "wdth" 80; font-size: clamp(2.1rem, 4.6vw, 4.4rem); line-height: .95; letter-spacing: -.035em; }
.phase__title .mask-line:last-child span { font-family: var(--f-serif); font-style: italic; font-weight: 400; letter-spacing: -.01em; color: var(--amber); }
.phase__text { max-width: 42ch; color: var(--fg-dim); font-size: clamp(1rem, 1.25vw, 1.15rem); }
.phase__text .mask-line > span { display: inline-block; }
.phase__exif { font-family: var(--f-mono); font-size: .7rem; letter-spacing: .1em; color: var(--safe); }
.phase .mask-line > span { transform: translateY(110%); }
.phase.is-first .mask-line > span { transform: none; }
.story__film { display: flex; gap: 6px; margin-top: .6rem; }
.story__film li { width: clamp(28px, 3.6vw, 52px); aspect-ratio: 3 / 2; border-radius: 3px; overflow: hidden; opacity: .35; outline: 1px solid transparent; transition: opacity .4s, outline-color .4s, transform .4s var(--ease-out); }
.story__film li img { width: 100%; height: 100%; object-fit: cover; }
.story__film li.is-active { opacity: 1; outline-color: var(--safe); transform: translateY(-4px); }
.story__stage { position: relative; height: min(78vh, 760px); border-radius: var(--radius); overflow: hidden; background: #000; cursor: pointer; }
.story__img { position: absolute; inset: 0; will-change: clip-path, transform; }
.story__img img { width: 100%; height: 100%; object-fit: cover; will-change: transform; }
.story__img .media { position: absolute; inset: 0; }
.story__img--mask { -webkit-mask-image: linear-gradient(to top, #000 calc(var(--m, 0) * 1%), transparent calc(var(--m, 0) * 1% + 18%)); mask-image: linear-gradient(to top, #000 calc(var(--m, 0) * 1%), transparent calc(var(--m, 0) * 1% + 18%)); }
.story__readout { position: absolute; right: var(--gut); bottom: 2vh; font-family: var(--f-mono); font-size: .66rem; letter-spacing: .14em; text-transform: uppercase; color: var(--fg-dim); }
.story__readout b { color: var(--safe); font-weight: 500; }
.story__stage::after { /* angoli del mirino */
  content: ""; position: absolute; inset: 14px; pointer-events: none; z-index: 5;
  background:
    linear-gradient(#fff, #fff) 0 0 / 22px 1px no-repeat, linear-gradient(#fff, #fff) 0 0 / 1px 22px no-repeat,
    linear-gradient(#fff, #fff) 100% 0 / 22px 1px no-repeat, linear-gradient(#fff, #fff) 100% 0 / 1px 22px no-repeat,
    linear-gradient(#fff, #fff) 0 100% / 22px 1px no-repeat, linear-gradient(#fff, #fff) 0 100% / 1px 22px no-repeat,
    linear-gradient(#fff, #fff) 100% 100% / 22px 1px no-repeat, linear-gradient(#fff, #fff) 100% 100% / 1px 22px no-repeat;
  opacity: .7; mix-blend-mode: difference;
}
/* Fallback senza pin (reduced motion / niente GSAP): fasi una sotto l'altra */
.story.is-static .story__pin { height: auto; display: block; }
.story.is-static .story__stage, .story.is-static .story__film, .story.is-static .story__count, .story.is-static .story__readout { display: none; }
.story.is-static .story__phases { gap: 3rem; }
.story.is-static .phase { grid-area: auto; }
.story.is-static .phase .mask-line > span { transform: none; }
.story.is-static .phase__img { display: block; }
.phase__img { display: none; aspect-ratio: 3 / 2; border-radius: var(--radius); overflow: hidden; }

/* ---------- 10. Chi sono ---------- */
.about { position: relative; z-index: 1; padding: clamp(90px, 14vw, 200px) 0 clamp(60px, 8vw, 120px); background: var(--bg); }
.about__head { padding: 0 var(--gut); display: grid; gap: 2rem; }
.about__statement { font-family: var(--f-display); font-weight: 500; font-variation-settings: "wdth" 90, "opsz" 48; font-size: var(--fs-lead); line-height: 1.12; letter-spacing: -.02em; max-width: 26ch; }
.about__statement .word { opacity: .16; transition: none; }
html.no-gsap .about__statement .word, html.is-reduced .about__statement .word { opacity: 1; }
.about__grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: clamp(24px, 6vw, 100px); align-items: end; padding: clamp(60px, 9vw, 140px) var(--gut) 0; }
.about__portrait { position: relative; margin-left: calc(var(--gut) * -1); }
.about__portrait-img { aspect-ratio: 16 / 11; border-radius: 0 var(--radius) var(--radius) 0; }
.about__portrait-img img { height: 120%; margin-top: -10%; object-position: 30% 50%; }
.about__portrait figcaption { margin: .8rem 0 0 var(--gut); font-family: var(--f-mono); font-size: .66rem; letter-spacing: .12em; text-transform: uppercase; color: var(--fg-dim); }
.about__body { display: grid; gap: 1.1rem; padding-bottom: 1rem; }
.about__name { font-family: var(--f-serif); font-style: italic; font-size: clamp(1.6rem, 2.6vw, 2.3rem); color: var(--amber); line-height: 1; }
.about__role { font-family: var(--f-mono); font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; color: var(--fg-dim); }
.about__text { display: grid; gap: 1rem; color: var(--fg-dim); max-width: 52ch; }
.about__text p:first-child::first-letter { font-family: var(--f-display); font-weight: 800; float: left; font-size: 3.4em; line-height: .8; padding: .08em .1em 0 0; color: var(--safe); }
.about__lower { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: clamp(30px, 6vw, 100px); padding: clamp(70px, 10vw, 150px) var(--gut) 0; align-items: start; }
.timeline { position: relative; padding-left: 2rem; }
.timeline__line { position: absolute; left: 6px; top: .4rem; bottom: .4rem; width: 1px; background: linear-gradient(var(--safe), var(--amber)); transform-origin: 50% 0; }
.timeline__title { font-family: var(--f-mono); font-size: .72rem; font-weight: 400; letter-spacing: .18em; text-transform: uppercase; color: var(--fg-dim); margin-bottom: 1.4rem; }
.timeline li { position: relative; display: grid; grid-template-columns: 4.6rem 1fr; gap: .2rem 1rem; padding: .9rem 0; border-bottom: 1px solid var(--line); }
.timeline li::before { content: ""; position: absolute; left: calc(-2rem + 2px); top: 1.35rem; width: 9px; height: 9px; border-radius: 50%; background: var(--bg); border: 1.5px solid var(--safe); }
.timeline li:first-child::before { background: var(--safe); box-shadow: 0 0 0 4px rgba(255, 61, 46, .2); }
.tl__year { font-family: var(--f-mono); font-size: .8rem; color: var(--safe); padding-top: .2rem; }
.tl__place { font-family: var(--f-display); font-weight: 600; font-size: clamp(1.1rem, 1.6vw, 1.4rem); letter-spacing: -.01em; }
.tl__what { grid-column: 2; color: var(--fg-dim); font-size: .95rem; }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.stat { display: grid; gap: .5rem; align-content: end; min-height: clamp(150px, 16vw, 220px); padding: 1.4rem; background: var(--bg); }
.stat__value { font-family: var(--f-display); font-weight: 800; font-variation-settings: "wdth" 75; font-size: clamp(3.4rem, 7vw, 6.6rem); line-height: .8; letter-spacing: -.05em; font-variant-numeric: tabular-nums; }
.stat__value.is-inf { display: inline-block; color: var(--safe); }
.stat__label { font-family: var(--f-mono); font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; color: var(--fg-dim); }
.about__quote { margin: clamp(70px, 10vw, 140px) var(--gut) 0; font-family: var(--f-serif); font-style: italic; font-size: clamp(1.9rem, 4.4vw, 4.2rem); line-height: 1.05; letter-spacing: -.01em; max-width: 24ch; margin-left: auto; padding-right: var(--gut); }

/* ---------- 11. Tavolo luminoso ---------- */
.lighttable-wrap { padding: clamp(80px, 11vw, 160px) var(--gut) 0; }
.lighttable__head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 1rem 2rem; margin-bottom: 1.4rem; }
.lighttable__title { font-family: var(--f-display); font-weight: 700; font-variation-settings: "wdth" 80; font-size: clamp(2rem, 4.4vw, 4rem); line-height: .9; letter-spacing: -.03em; }
.lighttable__hint { color: var(--fg-dim); max-width: 40ch; flex: 1 1 260px; }
.lighttable {
  position: relative; height: clamp(520px, 78vh, 820px); border-radius: var(--radius); overflow: hidden;
  background:
    radial-gradient(70% 60% at 50% 45%, rgba(255, 246, 228, .16), transparent 70%),
    linear-gradient(rgba(239, 232, 220, .05) 1px, transparent 1px) 0 0 / 40px 40px,
    linear-gradient(90deg, rgba(239, 232, 220, .05) 1px, transparent 1px) 0 0 / 40px 40px,
    var(--bg-3);
  box-shadow: inset 0 0 120px rgba(0, 0, 0, .6);
  touch-action: pan-y;
}
:root[data-theme="light"] .lighttable { box-shadow: inset 0 0 120px rgba(80, 50, 20, .2); }
.polaroid {
  position: absolute; left: 0; top: 0; width: clamp(150px, 17vw, 240px); padding: 10px 10px 38px;
  background: #f6f1e7; color: #16110f; border-radius: 3px;
  box-shadow: 0 14px 30px -12px rgba(0, 0, 0, .7);
  touch-action: none; user-select: none; -webkit-user-select: none; cursor: grab; will-change: transform;
}
.polaroid.is-drag { cursor: grabbing; box-shadow: 0 34px 60px -18px rgba(0, 0, 0, .85); }
.polaroid .media { aspect-ratio: 1; pointer-events: none; }
.polaroid figcaption { position: absolute; left: 12px; right: 12px; bottom: 9px; font-family: var(--f-serif); font-style: italic; font-size: 1.05rem; line-height: 1; display: flex; justify-content: space-between; align-items: baseline; }
.polaroid figcaption small { font-family: var(--f-mono); font-style: normal; font-size: .58rem; letter-spacing: .1em; color: #8d160c; }
.polaroid--video .media::before { content: "REC"; position: absolute; left: 8px; top: 8px; z-index: 2; padding: 2px 6px 2px 16px; font-family: var(--f-mono); font-size: .55rem; color: #fff; border-radius: 3px; background: rgba(0, 0, 0, .5) radial-gradient(circle at 8px 50%, #ff3d2e 3px, transparent 3.5px); }
.polaroid:focus-visible { outline: 3px solid var(--amber); }

/* ---------- 12. Scatti: cilindro 3D ---------- */
.shots { position: relative; z-index: 1; padding: clamp(90px, 12vw, 180px) 0 clamp(60px, 8vw, 120px); background: var(--bg-2); overflow: hidden; }
.filters { display: flex; flex-wrap: wrap; gap: .5rem; }
.ring-stage { position: relative; height: clamp(420px, 70vh, 720px); perspective: 1500px; perspective-origin: 50% 40%; touch-action: pan-y; user-select: none; -webkit-user-select: none; margin-top: clamp(20px, 4vw, 60px); }
.ring { position: absolute; left: 50%; top: 46%; width: 0; height: 0; transform-style: preserve-3d; }
.ring__item {
  position: absolute; left: 0; top: 0; width: var(--w, 260px); aspect-ratio: 4 / 5;
  margin-left: calc(var(--w, 260px) / -2); margin-top: calc(var(--w, 260px) * -.625);
  border-radius: 14px; overflow: hidden; backface-visibility: hidden; -webkit-backface-visibility: hidden;
  transition: filter .4s;
}
.ring__item .media { position: absolute; inset: 0; }
.ring__item::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12); pointer-events: none; }
.ring__item:focus-visible { outline: 3px solid var(--amber); outline-offset: 3px; }
.ring__caption { position: absolute; left: 0; right: 0; bottom: 0; text-align: center; font-family: var(--f-mono); font-size: .74rem; letter-spacing: .14em; text-transform: uppercase; color: var(--fg-dim); }
.ring__caption b { color: var(--fg); font-family: var(--f-display); font-weight: 700; font-size: 1.4rem; letter-spacing: -.01em; text-transform: none; display: block; }
.ring__ctrls { position: absolute; right: var(--gut); bottom: 0; display: flex; gap: .4rem; }
.ring__ctrls .nav__btn { border-color: var(--line); }
.ring__ctrls .nav__btn:hover { background: var(--fg); color: var(--bg); }

/* ---------- 13. Banda citazione ---------- */
.qband { position: relative; height: 110vh; display: grid; place-items: center; overflow: hidden; background: #000; color: #fff; }
.qband__media { position: absolute; inset: 0; background: #000; }
.qband__media img { height: 130%; margin-top: -15%; }
.qband__shade { position: absolute; inset: 0; background: radial-gradient(60% 60% at 50% 50%, rgba(0, 0, 0, .15), rgba(0, 0, 0, .55)); pointer-events: none; }
.qband__quote { position: relative; z-index: 2; display: grid; gap: 1.4rem; justify-items: center; text-align: center; padding: 0 var(--gut); }
.qband__quote p { font-family: var(--f-display); font-weight: 700; font-variation-settings: "wdth" 78; font-size: clamp(2.2rem, 6.4vw, 6.4rem); line-height: .95; letter-spacing: -.035em; text-transform: uppercase; max-width: 16ch; text-shadow: 0 4px 40px rgba(0, 0, 0, .5); }
.qband__quote p .word { opacity: .2; }
html.no-gsap .qband__quote p .word, html.is-reduced .qband__quote p .word { opacity: 1; }
.qband__quote cite { font-family: var(--f-serif); font-style: italic; font-size: 1.3rem; color: var(--amber); }
.qband__corner { position: absolute; z-index: 2; width: 60px; height: 60px; border: 1.5px solid #fff; opacity: .8; }
.qband__corner--tl { left: 6%; top: 10%; border-right: 0; border-bottom: 0; }
.qband__corner--br { right: 6%; bottom: 10%; border-left: 0; border-top: 0; }

/* ---------- 14. Servizi ---------- */
.services { position: relative; z-index: 1; padding: clamp(90px, 12vw, 180px) 0; background: var(--bg); }
.services__grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: clamp(14px, 1.6vw, 24px); padding: clamp(40px, 6vw, 90px) var(--gut) 0; perspective: 1200px; }
.service { grid-column: span 2; }
.service:nth-child(1) { grid-column: 1 / span 3; }
.service:nth-child(2) { grid-column: 4 / span 3; margin-top: clamp(0px, 8vw, 120px); }
.service:nth-child(3) { grid-column: 1 / span 2; }
.service:nth-child(4) { grid-column: 3 / span 2; margin-top: clamp(0px, 4vw, 60px); }
.service:nth-child(5) { grid-column: 5 / span 2; margin-top: clamp(0px, -2vw, 0px); }
.card {
  --gx: 50%; --gy: 50%; --rx: 0deg; --ry: 0deg;
  position: relative; display: grid; gap: 1rem; align-content: space-between; min-height: clamp(260px, 26vw, 380px);
  padding: clamp(22px, 2.4vw, 34px); border-radius: var(--radius); background: var(--bg-2); overflow: hidden;
  transform: perspective(900px) rotateX(var(--rx)) rotateY(var(--ry)); transform-style: preserve-3d;
  transition: transform .5s var(--ease-out), background .4s;
}
.card.is-tilting { transition: transform .1s linear, background .4s; }
.card::before { /* riflesso che segue il mouse */
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .4s;
  background: radial-gradient(380px circle at var(--gx) var(--gy), rgba(255, 181, 71, .22), transparent 45%);
}
.card:hover::before { opacity: 1; }
.card__border { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.card__border rect { fill: none; stroke: var(--safe); stroke-width: 1.2; vector-effect: non-scaling-stroke; }
.service__top { display: flex; justify-content: space-between; align-items: start; gap: 1rem; }
.service__num { font-family: var(--f-display); font-weight: 800; font-variation-settings: "wdth" 75; font-size: clamp(3rem, 5vw, 5rem); line-height: .8; color: transparent; -webkit-text-stroke: 1px var(--fg-dim); transition: color .4s, -webkit-text-stroke-color .4s; }
.card:hover .service__num { color: var(--safe); -webkit-text-stroke-color: var(--safe); }
.service__exif { font-family: var(--f-mono); font-size: .62rem; letter-spacing: .1em; text-transform: uppercase; color: var(--fg-dim); text-align: right; }
.service__title { font-family: var(--f-display); font-weight: 700; font-variation-settings: "wdth" 85; font-size: clamp(1.5rem, 2.2vw, 2.2rem); line-height: 1; letter-spacing: -.02em; transform: translateZ(30px); }
.service__desc { color: var(--fg-dim); font-size: .98rem; max-width: 40ch; }
.service__price { display: inline-flex; align-self: start; padding: .4rem .8rem; border: 1px solid var(--line); border-radius: 999px; font-family: var(--f-mono); font-size: .74rem; letter-spacing: .06em; }

/* ---------- 15. Clienti ---------- */
.clients { position: relative; z-index: 1; padding: clamp(90px, 12vw, 180px) 0; background: var(--bg-2); }
.clients__list { display: grid; gap: clamp(16px, 2vw, 28px); padding: clamp(40px, 6vw, 90px) var(--gut) 0; }
.client {
  position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: clamp(16px, 3vw, 48px); align-items: start;
  padding: clamp(24px, 3.4vw, 54px); border-radius: var(--radius); background: var(--bg); border: 1px solid var(--line);
  width: min(100%, 1100px);
}
.client:nth-child(2) { margin-left: auto; }
.client:nth-child(3) { margin-left: 8%; }
.client__mark { font-family: var(--f-serif); font-size: clamp(5rem, 10vw, 9rem); line-height: .6; color: var(--safe); }
.client__text { font-family: var(--f-display); font-weight: 500; font-variation-settings: "wdth" 92; font-size: clamp(1.3rem, 2.4vw, 2.2rem); line-height: 1.15; letter-spacing: -.015em; }
.client__who { display: flex; align-items: center; gap: .9rem; margin-top: 1.4rem; }
.client__avatar { position: relative; width: 52px; height: 52px; border-radius: 50%; overflow: hidden; display: grid; place-items: center; background: var(--grad-safe); color: #fff; font-family: var(--f-display); font-weight: 700; font-size: .95rem; flex: none; }
.client__avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.client__name { font-weight: 600; }
.client__role { font-family: var(--f-mono); font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; color: var(--fg-dim); }

/* ---------- 16. Contatti ---------- */
.contact { position: relative; z-index: 1; padding: clamp(90px, 12vw, 180px) var(--gut) clamp(80px, 10vw, 150px); background: var(--bg); overflow: hidden; }
.contact__headline {
  white-space: nowrap; overflow: visible;
  margin: 2rem 0 clamp(40px, 6vw, 90px); font-family: var(--f-display); font-weight: 800;
  font-size: clamp(4rem, 17vw, 18rem); line-height: .8; letter-spacing: -.055em; text-transform: uppercase;
  font-variation-settings: "wdth" 75, "wght" 800;
}
.contact__headline .char { transition: font-variation-settings .3s var(--ease-out), color .3s; }
.contact__headline .char:last-child { color: var(--safe); }
.contact__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(30px, 6vw, 100px); }
.contact__sub { font-family: var(--f-serif); font-style: italic; font-size: clamp(1.6rem, 2.6vw, 2.4rem); line-height: 1.05; margin-bottom: 1rem; }
.contact__intro { color: var(--fg-dim); max-width: 46ch; margin-bottom: 2rem; }
.contact__list li { display: flex; flex-wrap: wrap; align-items: baseline; gap: .4rem 1rem; padding: 1rem 0; border-top: 1px solid var(--line); }
.contact__list .label { width: 5.6rem; font-family: var(--f-mono); font-size: .68rem; letter-spacing: .14em; text-transform: uppercase; color: var(--fg-dim); }
.contact__list a, .contact__list span:not(.label):not(.badge) { font-size: clamp(1rem, 1.4vw, 1.2rem); }
.copy { font-family: var(--f-mono); font-size: .64rem; letter-spacing: .1em; text-transform: uppercase; padding: .25rem .6rem; border: 1px solid var(--line); border-radius: 999px; color: var(--fg-dim); }
.copy:hover { color: var(--fg); border-color: var(--fg); }
.badge { display: inline-flex; align-items: center; gap: .4rem; padding: .2rem .6rem; border-radius: 999px; font-family: var(--f-mono); font-size: .62rem; letter-spacing: .08em; text-transform: uppercase; background: rgba(255, 181, 71, .14); color: var(--amber); }
.badge.is-open { background: rgba(80, 220, 120, .14); color: #59d986; }
:root[data-theme="light"] .badge.is-open { color: #187a3a; }

.form { display: grid; gap: 1.4rem; align-content: start; }
.field { position: relative; }
.field input, .field textarea {
  width: 100%; padding: 1.5rem 2rem .7rem 0; border: 0; border-bottom: 1px solid var(--line); background: transparent;
  color: var(--fg); font: inherit; font-size: clamp(1.05rem, 1.4vw, 1.25rem); outline: none; resize: vertical; border-radius: 0;
}
.field textarea { min-height: 8rem; }
.field label { position: absolute; left: 0; top: 1.4rem; color: var(--fg-dim); pointer-events: none; transform-origin: 0 0; transition: transform .45s var(--ease-out), color .3s; }
.field input:focus + label, .field input:not(:placeholder-shown) + label,
.field textarea:focus + label, .field textarea:not(:placeholder-shown) + label { transform: translateY(-1.25rem) scale(.72); color: var(--safe); }
.field__line { position: absolute; left: 0; right: 0; top: calc(100% - 1px); height: 1px; background: var(--safe); transform: scaleX(0); transform-origin: 0 50%; transition: transform .6s var(--ease-out); }
.field:has(textarea) .field__line { top: auto; bottom: calc(1.4rem + 6px); }
.field input:focus ~ .field__line, .field textarea:focus ~ .field__line { transform: scaleX(1); }
.field__ok { position: absolute; right: 0; top: 1.4rem; width: 22px; height: 22px; fill: none; stroke: #59d986; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 30; stroke-dashoffset: 30; transition: stroke-dashoffset .5s var(--ease-out); }
.field.is-valid .field__ok { stroke-dashoffset: 0; }
.field__msg { min-height: 1.4rem; padding-top: .3rem; font-family: var(--f-mono); font-size: .7rem; letter-spacing: .04em; color: var(--safe); }
.field.is-invalid input, .field.is-invalid textarea { border-bottom-color: var(--safe); }
.field.is-shake { animation: shake .45s var(--ease); }
@keyframes shake { 20% { transform: translateX(-8px); } 40% { transform: translateX(7px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(2px); } }
.form__status { min-height: 1.5rem; font-family: var(--f-mono); font-size: .8rem; color: var(--amber); }
.form.is-sent .field, .form.is-sent #submitBtn { opacity: .35; pointer-events: none; transition: opacity .6s; }
.form__done { padding: 1.4rem; border: 1px solid var(--safe); border-radius: var(--radius); background: rgba(255, 61, 46, .06); }
.form__done b { display: block; font-family: var(--f-display); font-size: 1.6rem; letter-spacing: -.02em; color: var(--fg); margin-bottom: .3rem; }

/* ---------- 17. Footer (si rivela dal basso) ---------- */
main { position: relative; z-index: 2; background: var(--bg); }
body.has-reveal-footer main { margin-bottom: var(--footer-h, 0px); box-shadow: 0 40px 80px -20px rgba(0, 0, 0, .6); }
.footer {
  position: relative; z-index: 1; overflow: hidden; background: #0c0a0b; color: var(--paper);
  padding: clamp(50px, 7vw, 100px) var(--gut) calc(clamp(20px, 3vw, 36px) + env(safe-area-inset-bottom));
}
body.has-reveal-footer .footer { position: fixed; left: 0; right: 0; bottom: 0; }
.footer::before { content: ""; position: absolute; inset: 0; background: radial-gradient(80% 90% at 50% 120%, rgba(255, 61, 46, .35), transparent 60%); pointer-events: none; }
.footer__top { position: relative; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 2rem; }
.footer__nav, .footer__social { display: flex; flex-wrap: wrap; gap: .4rem 1.6rem; font-size: .95rem; }
.footer__nav a, .footer__social a { position: relative; }
.footer__nav a::after, .footer__social a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 1px; background: var(--safe); transform: scaleX(0); transform-origin: 100% 50%; transition: transform .5s var(--ease-out); }
.footer__nav a:hover::after, .footer__social a:hover::after, .footer__nav a:focus-visible::after { transform: scaleX(1); transform-origin: 0 50%; }
.footer__giant {
  position: relative; margin: clamp(30px, 5vw, 70px) 0 clamp(10px, 2vw, 20px); text-align: center; white-space: nowrap;
  font-family: var(--f-display); font-weight: 800; font-variation-settings: "wdth" 75, "wght" 800;
  font-size: clamp(3.4rem, 15.4vw, 17rem); line-height: .78; letter-spacing: -.055em; text-transform: uppercase;
  cursor: default; user-select: none;
}
.footer__giant .char { transition: font-variation-settings .35s var(--ease-out), color .35s, transform .5s var(--ease-out); }
.footer__bottom { position: relative; display: flex; flex-wrap: wrap; justify-content: space-between; gap: .6rem 1.6rem; padding-top: 1.2rem; border-top: 1px solid rgba(239, 232, 220, .14); font-family: var(--f-mono); font-size: .68rem; letter-spacing: .08em; color: #a59a91; }
.footer__secret kbd, .palette kbd { display: inline-block; padding: .05rem .35rem; border: 1px solid currentColor; border-radius: 4px; font-family: var(--f-mono); font-size: .9em; opacity: .9; }
/* Pulsante di scatto "torna su" */
.shutter { position: relative; display: grid; place-items: center; width: 96px; height: 96px; }
.shutter__ring { position: absolute; inset: 0; border-radius: 50%; border: 1.5px dashed rgba(239, 232, 220, .5); animation: spin 14s linear infinite; }
.shutter__btn { width: 54px; height: 54px; border-radius: 50%; background: var(--grad-safe); box-shadow: 0 6px 0 #6d0f08, 0 12px 30px -6px rgba(255, 61, 46, .7); transition: transform .15s, box-shadow .15s; }
.shutter:hover .shutter__btn { transform: translateY(-2px); }
.shutter:active .shutter__btn, .shutter.is-pressed .shutter__btn { transform: translateY(5px); box-shadow: 0 1px 0 #6d0f08, 0 4px 14px -6px rgba(255, 61, 46, .7); }
.shutter__label { position: absolute; top: calc(100% + .3rem); white-space: nowrap; font-family: var(--f-mono); font-size: .62rem; letter-spacing: .16em; text-transform: uppercase; color: #a59a91; }
@keyframes spin { to { transform: rotate(360deg); } }
.flash { position: fixed; inset: 0; z-index: 1200; background: #fff; pointer-events: none; animation: flash .7s var(--ease) forwards; }
@keyframes flash { 0% { opacity: .95; } 100% { opacity: 0; } }

/* ---------- 18. Lightbox ---------- */
.lightbox { position: fixed; inset: 0; z-index: 1000; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 1rem; padding: clamp(14px, 3vw, 40px); background: rgba(8, 6, 7, .94); color: #fff; backdrop-filter: blur(8px); }
.lightbox.is-in { animation: fade-in .4s var(--ease) both; }
@keyframes fade-in { from { opacity: 0; } }
.lightbox__figure { display: grid; gap: .8rem; justify-items: center; min-width: 0; }
.lightbox__img { max-width: 100%; clip-path: inset(0 round 10px); }
.lightbox__img img { max-height: 80vh; max-height: 80svh; width: auto; margin: 0 auto; border-radius: 10px; }
.lightbox__img.is-enter { animation: lb-enter .7s var(--ease-out) both; }
@keyframes lb-enter { from { clip-path: inset(48% 48% 48% 48% round 10px); transform: scale(1.06); } to { clip-path: inset(0 0 0 0 round 10px); transform: none; } }
.lightbox figcaption { display: flex; gap: 1.4rem; font-family: var(--f-mono); font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; color: #cfc6bc; }
.lightbox__close { position: absolute; right: clamp(12px, 2vw, 26px); top: clamp(12px, 2vw, 26px); width: 48px; height: 48px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .3); font-size: 1.6rem; line-height: 1; z-index: 2; transition: background .3s, transform .4s var(--ease-out); }
.lightbox__close:hover { background: var(--safe); transform: rotate(90deg); }
.lightbox__nav { width: 52px; height: 52px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .3); font-size: 1.2rem; transition: background .3s; }
.lightbox__nav:hover { background: rgba(255, 255, 255, .15); }

/* ---------- 19. Command palette e terminale ---------- */
.palette { position: fixed; inset: 0; z-index: 1050; display: grid; justify-items: center; align-items: start; padding: 14vh var(--gut) 0; background: rgba(8, 6, 7, .6); backdrop-filter: blur(10px); }
.palette__box { width: min(640px, 100%); border-radius: 16px; overflow: hidden; background: var(--bg-2); border: 1px solid var(--line); box-shadow: var(--shadow); animation: pop .35s var(--ease-out) both; color: var(--fg); }
@keyframes pop { from { opacity: 0; transform: translateY(-14px) scale(.97); } }
.palette__input { width: 100%; padding: 1.2rem 1.4rem; border: 0; border-bottom: 1px solid var(--line); background: transparent; color: var(--fg); font: inherit; font-size: 1.15rem; outline: none; }
.palette__list { max-height: 50vh; overflow: auto; padding: .4rem; }
.palette__list li { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .75rem 1rem; border-radius: 10px; cursor: pointer; }
.palette__list li small { font-family: var(--f-mono); font-size: .64rem; letter-spacing: .1em; text-transform: uppercase; color: var(--fg-dim); }
.palette__list li[aria-selected="true"] { background: var(--safe); color: #fff; }
.palette__list li[aria-selected="true"] small { color: #ffe1dc; }
.palette__list .empty { color: var(--fg-dim); cursor: default; }
.palette__foot { padding: .7rem 1.2rem; border-top: 1px solid var(--line); font-family: var(--f-mono); font-size: .66rem; color: var(--fg-dim); }

.terminal { position: fixed; left: 50%; bottom: 4vh; z-index: 1060; width: min(720px, calc(100% - 32px)); translate: -50% 0; border-radius: 12px; overflow: hidden; background: #070505; border: 1px solid #3a1612; box-shadow: 0 30px 80px -20px #000, 0 0 60px -20px rgba(255, 61, 46, .5); color: #ff7b6e; font-family: var(--f-mono); font-size: .85rem; animation: pop .3s var(--ease-out) both; }
.terminal__bar { display: flex; justify-content: space-between; align-items: center; padding: .5rem .9rem; background: #1a0b09; color: #a55b52; font-size: .7rem; letter-spacing: .1em; }
.terminal__bar button { font-size: 1.1rem; color: #a55b52; }
.terminal__out { height: 260px; overflow: auto; padding: .8rem 1rem; white-space: pre-wrap; line-height: 1.55; text-shadow: 0 0 8px rgba(255, 61, 46, .55); }
.terminal__out .t-cmd { color: #ffd9a0; }
.terminal__out .t-dim { color: #8f4a42; }
.terminal__row { display: flex; gap: .6rem; padding: .6rem 1rem .9rem; border-top: 1px solid #2a0f0c; }
.terminal__row span { color: #ffb547; white-space: nowrap; }
.terminal__row input { flex: 1; min-width: 0; border: 0; background: transparent; color: #ffe6d6; font: inherit; outline: none; caret-color: var(--safe); }

/* ---------- 20. Mini-gioco: bagno di sviluppo ---------- */
.toy { position: fixed; inset: 0; z-index: 1050; display: grid; place-items: center; padding: var(--gut); background: rgba(5, 2, 2, .9); }
.toy__box { position: relative; width: min(860px, 100%); display: grid; gap: 1rem; color: #f4ddd6; animation: pop .4s var(--ease-out) both; }
.toy__head { position: relative; padding-right: 60px; }
.toy__head h2 { font-family: var(--f-display); font-weight: 800; font-variation-settings: "wdth" 78; font-size: clamp(1.8rem, 4vw, 3rem); text-transform: uppercase; letter-spacing: -.02em; color: #ff5b4c; }
.toy__head p { color: #c49a92; }
.toy__close { top: 0; right: 0; }
.toy__tray { position: relative; aspect-ratio: 3 / 2; border-radius: 10px; overflow: hidden; background: #2a0d09; box-shadow: inset 0 0 0 10px #3d120d, 0 0 80px rgba(255, 40, 20, .25); touch-action: none; }
.toy__tray img { position: absolute; inset: 10px; width: calc(100% - 20px); height: calc(100% - 20px); object-fit: cover; filter: sepia(.35) saturate(1.1); }
.toy__tray canvas { position: absolute; inset: 10px; width: calc(100% - 20px); height: calc(100% - 20px); }
.toy__foot { display: flex; justify-content: space-between; align-items: center; font-family: var(--f-mono); font-size: .8rem; color: #ff8a7e; }

/* ---------- 21. Cursore, scia, ripple, modalità cinema, toast ---------- */
.cursor-dot, .cursor-ring { position: fixed; left: 0; top: 0; z-index: 1300; pointer-events: none; mix-blend-mode: difference; }
.cursor-dot { width: 6px; height: 6px; margin: -3px 0 0 -3px; border-radius: 50%; background: #fff; }
.cursor-ring {
  width: 38px; height: 38px; margin: -19px 0 0 -19px; border-radius: 50%; border: 1px solid #fff;
  display: grid; place-items: center; color: #000; font-family: var(--f-mono); font-size: .58rem; letter-spacing: .1em; text-transform: uppercase;
  transition: width .35s var(--ease-out), height .35s var(--ease-out), margin .35s var(--ease-out), background .3s, border-radius .35s;
}
.cursor-ring span { opacity: 0; transition: opacity .2s; white-space: nowrap; }
.cursor-ring.is-hover { width: 64px; height: 64px; margin: -32px 0 0 -32px; background: #fff; }
.cursor-ring.has-label { width: 84px; height: 84px; margin: -42px 0 0 -42px; background: #fff; }
.cursor-ring.has-label span { opacity: 1; }
.cursor-ring.is-text { width: 4px; height: 34px; margin: -17px 0 0 -2px; border-radius: 2px; background: #fff; }
.cursor-ring.is-down { width: 26px; height: 26px; margin: -13px 0 0 -13px; }
.cursor-dot.is-hidden, .cursor-ring.is-hidden { opacity: 0; }
html.has-cursor, html.has-cursor a, html.has-cursor button, html.has-cursor .polaroid, html.has-cursor [data-cursor] { cursor: none; }
html.has-cursor input, html.has-cursor textarea { cursor: none; }
.trail { position: fixed; inset: 0; z-index: 1290; pointer-events: none; width: 100%; height: 100%; }
.ripple { position: fixed; z-index: 1280; width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%; border: 1.5px solid var(--safe); pointer-events: none; animation: ripple .8s var(--ease-out) forwards; }
.ripple::after { content: ""; position: absolute; inset: -1.5px; border-radius: 50%; border: 1px solid var(--amber); animation: ripple2 .8s var(--ease-out) .08s forwards; }
@keyframes ripple { to { transform: scale(9); opacity: 0; } }
@keyframes ripple2 { to { transform: scale(1.5); opacity: 0; } }

.focuswin { position: fixed; left: 0; top: 0; z-index: 930; width: 260px; height: 260px; border-radius: 50%; pointer-events: none; opacity: 0; box-shadow: 0 0 0 300vmax rgba(5, 3, 3, .88); transition: opacity .5s, width .5s var(--ease-out), height .5s var(--ease-out), border-radius .5s var(--ease-out), transform .5s var(--ease-out); }
html.is-cinema .focuswin { opacity: 1; }
html.is-cinema .focuswin.is-snap { transition: opacity .5s, width .5s var(--ease-out), height .5s var(--ease-out), border-radius .5s var(--ease-out), transform .5s var(--ease-out); }

.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); z-index: 1250; translate: -50% 0; padding: .8rem 1.2rem; border-radius: 999px; background: var(--fg); color: var(--bg); font-family: var(--f-mono); font-size: .76rem; letter-spacing: .06em; opacity: 0; transform: translateY(20px); transition: opacity .4s, transform .5s var(--ease-out); pointer-events: none; max-width: calc(100% - 32px); text-align: center; }
.toast.is-on { opacity: 1; transform: none; }

/* Confetti/particelle */
.fx-canvas { position: fixed; inset: 0; z-index: 1240; pointer-events: none; width: 100%; height: 100%; }

/* ---------- 22. Konami: modalità "Polaroid '79" ---------- */
html.is-retro { --safe: #e0662b; --amber: #f2c14e; }
html.is-retro img, html.is-retro video { filter: sepia(.55) saturate(1.25) contrast(1.05) hue-rotate(-8deg); }
html.is-retro .grain { opacity: .22; }
html.is-retro body::after { content: ""; position: fixed; inset: 0; z-index: 980; pointer-events: none; background: radial-gradient(ellipse at center, transparent 50%, rgba(40, 15, 0, .55) 100%); }
.film-rain { position: fixed; top: -80px; z-index: 1230; width: 40px; height: 54px; pointer-events: none; border-radius: 3px; background: #f6f1e7; box-shadow: 0 6px 16px rgba(0, 0, 0, .4); animation: fall linear forwards; }
.film-rain::before { content: ""; position: absolute; inset: 4px 4px 12px; background: var(--c, #ff3d2e); border-radius: 2px; }
@keyframes fall { to { transform: translate3d(var(--dx, 0), 115vh, 0) rotate(var(--r, 360deg)); } }

/* ---------- View Transitions: cambio tema col cerchio ---------- */
::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
::view-transition-new(root) { z-index: 2; }
.theme-fallback { position: fixed; z-index: 1150; border-radius: 50%; pointer-events: none; transform: scale(0); transition: transform .8s var(--ease-in-out); }

/* ---------- 23. Fallback (senza GSAP) e movimento ridotto ---------- */
html.no-gsap .works__pin { height: auto; overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; }
html.no-gsap .works__track > * { scroll-snap-align: start; }
html.is-reduced .works__pin { height: auto; overflow-x: auto; scroll-snap-type: x mandatory; }
html.is-reduced .works__track > * { scroll-snap-align: start; }
html.is-reduced *, html.is-reduced *::before, html.is-reduced *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
html.is-reduced .grain { animation: none; }
html.is-reduced .hero__title .char { transition: opacity .3s; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .grain { animation: none; }
}

/* Touch: niente cursore custom né effetti solo-hover */
@media (hover: none), (pointer: coarse) {
  .cursor-dot, .cursor-ring, .trail { display: none !important; }
  .card::before { display: none; }
}

/* ---------- 24. Responsive ---------- */
@media (max-width: 1024px) {
  .nav__current { display: none; }
  .nav { grid-template-columns: 1fr auto; }
  .services__grid { grid-template-columns: 1fr 1fr; }
  .service, .service:nth-child(n) { grid-column: auto; margin-top: 0; }
  .service:nth-child(5) { grid-column: 1 / -1; }
}
@media (max-width: 860px) {
  .story__pin { grid-template-columns: 1fr; grid-template-rows: auto 1fr; align-content: start; gap: 1rem; padding-top: calc(var(--nav-h) + 1vh); }
  .story__stage { order: -1; height: 42vh; height: 42svh; }
  .story__count { font-size: 2.6rem; }
  .story__text { gap: .6rem; }
  .phase__title { font-size: clamp(1.7rem, 7vw, 2.6rem); }
  .phase__text { font-size: .95rem; }
  .story__readout { display: none; }
  .about__grid, .about__lower, .contact__grid { grid-template-columns: 1fr; }
  .about__portrait { margin-left: calc(var(--gut) * -1); margin-right: 0; }
  .menu { grid-template-columns: 1fr; }
  .menu__preview { display: none; }
  .hero__frame { width: clamp(150px, 40vw, 260px); right: var(--gut); top: calc(var(--nav-h) + 1vh); }
  .hero__strip { left: 4%; top: 30%; }
  .hero__sticker { left: 8%; top: 20%; }
  .hero__sticker--b { display: none; }
  .client, .client:nth-child(n) { margin-left: 0; grid-template-columns: 1fr; }
  .client__mark { font-size: 4.5rem; line-height: .5; }
}
@media (max-width: 600px) {
  :root { --nav-h: 64px; }
  .nav__name, .nav__clock, .nav__kbd { display: none; }
  .nav__btn { min-width: 36px; height: 36px; }
  .nav__menu-label { display: none; }
  .nav__menu { padding: 0 .2rem; }
  .services__grid { grid-template-columns: 1fr; }
  .service:nth-child(5) { grid-column: auto; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stat { min-height: 130px; padding: 1rem; }
  .hero__scroll { display: none; }
  .project { width: 84vw; }
  .project--video { width: 64vw; }
  .soon { width: 84vw; }
  .lighttable { height: 560px; }
  .polaroid { width: 132px; padding: 7px 7px 30px; }
  .polaroid figcaption { font-size: .9rem; bottom: 7px; }
  .lightbox { grid-template-columns: 1fr; grid-template-rows: 1fr auto; }
  .lightbox__nav { position: absolute; bottom: 20px; }
  .lightbox__nav--prev { left: 20px; } .lightbox__nav--next { right: 20px; }
  .contact__list .label { width: 100%; }
  .footer__giant { font-size: 15vw; }
  .qband { height: 90vh; }
}
@media (min-width: 1800px) {
  :root { --gut: 120px; }
  .about__statement { max-width: 30ch; }
}

/* Lightbox: segnaposto se la foto non si carica */
.lightbox__img.is-missing { min-width: min(70vw, 900px); aspect-ratio: 3 / 2; background: repeating-linear-gradient(135deg, transparent 0 14px, rgba(255, 61, 46, .08) 14px 15px), #1d181a; display: grid; place-items: center; }
.lightbox__img.is-missing img { display: none; }
.lightbox__img.is-missing::after { content: "Foto mancante"; font-family: var(--f-mono); font-size: .75rem; letter-spacing: .14em; text-transform: uppercase; color: #a59a91; }
@media (max-width: 600px) {
  .ring__ctrls { bottom: auto; top: 0; }
  .ring__caption { padding: 0 var(--gut); }
}

/* Link all'area riservata (footer) */
.footer__private { color: #efe8dc; border-bottom: 1px solid rgba(239, 232, 220, .3); transition: color .3s, border-color .3s; }
.footer__private:hover, .footer__private:focus-visible { color: var(--safe); border-color: var(--safe); }

/* Transizione Lavori → Mani in pasta: stesso fondo, nessuno stacco di colore */
.story { background: linear-gradient(var(--bg) 0, var(--bg-2) 30vh); }
.works__pin { will-change: transform, opacity; }

/* ---------- 25. Area personale (chat clienti ↔ studio) ---------- */
.area { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(30px, 6vw, 100px); align-items: start; padding: clamp(90px, 12vw, 180px) var(--gut); background: var(--bg-2); }
.area__intro { display: grid; gap: 1.4rem; position: sticky; top: calc(var(--nav-h) + 20px); }
.area__intro .section-title { font-size: clamp(2.4rem, 5.2vw, 5.4rem); overflow-wrap: anywhere; }
.area__points { display: grid; gap: .8rem; margin-top: .6rem; }
.area__points li { display: flex; gap: 1rem; align-items: baseline; padding-top: .8rem; border-top: 1px solid var(--line); color: var(--fg-dim); }
.area__points b { font-family: var(--f-mono); font-weight: 400; font-size: .75rem; color: var(--safe); }
.ap-card { position: relative; border-radius: var(--radius); background: var(--bg); border: 1px solid var(--line); padding: clamp(20px, 3vw, 34px); box-shadow: var(--shadow); }
.ap-note { color: var(--fg-dim); }
.ap-note h3 { font-family: var(--f-display); font-size: 1.6rem; color: var(--fg); margin-bottom: .4rem; }
.ap-switch { display: inline-flex; padding: 4px; border-radius: 999px; background: var(--bg-2); margin-bottom: 1.4rem; flex-wrap: wrap; }
.ap-switch button { padding: .55rem 1rem; border-radius: 999px; font-size: .85rem; color: var(--fg-dim); }
.ap-switch button[aria-selected="true"] { background: var(--fg); color: var(--bg); }
.ap-form { display: grid; gap: 1.1rem; }
.ap-err { min-height: 1.2rem; font-family: var(--f-mono); font-size: .75rem; color: var(--safe); }
.ap-hint { font-size: .85rem; color: var(--fg-dim); }
.ap-label { font-family: var(--f-mono); font-size: .68rem; letter-spacing: .16em; text-transform: uppercase; color: var(--safe); }
.ap-chat { display: grid; gap: 1rem; padding: clamp(16px, 2.4vw, 26px); }
.ap-chat__head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding-bottom: 1rem; border-bottom: 1px solid var(--line); }
.ap-chat__head h3 { font-family: var(--f-display); font-weight: 700; font-size: clamp(1.4rem, 2.4vw, 2rem); letter-spacing: -.02em; overflow-wrap: anywhere; }
.ap-list { display: flex; flex-direction: column; gap: .7rem; height: clamp(320px, 52vh, 520px); overflow-y: auto; overscroll-behavior: contain; padding: .4rem .2rem; }
.ap-msg { max-width: 80%; display: grid; gap: .25rem; }
.ap-msg p { margin: 0; padding: .75rem 1rem; border-radius: 16px; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.45; }
.ap-msg time { font-family: var(--f-mono); font-size: .62rem; letter-spacing: .06em; color: var(--fg-dim); }
.ap-msg--cliente { align-self: flex-end; justify-items: end; }
.ap-msg--cliente p { background: var(--safe); color: #fff; border-bottom-right-radius: 4px; }
.ap-msg--studio { align-self: flex-start; }
.ap-msg--studio p { background: var(--bg-2); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.ap-empty { margin: auto; max-width: 34ch; text-align: center; display: grid; gap: .4rem; color: var(--fg-dim); }
.ap-empty b { font-family: var(--f-display); font-size: 1.4rem; color: var(--fg); }
.ap-sugg { display: flex; flex-wrap: wrap; gap: .5rem; }
.ap-sugg .chip { text-transform: none; letter-spacing: 0; font-family: var(--f-body); font-size: .8rem; }
.ap-send { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .6rem; align-items: end; }
.ap-send textarea { width: 100%; min-height: 52px; max-height: 160px; resize: vertical; padding: .85rem 1rem; border-radius: 14px; border: 1px solid var(--line); background: var(--bg-2); color: var(--fg); font: inherit; outline: none; }
.ap-send textarea:focus { border-color: var(--safe); }
@media (max-width: 860px) {
  .area { grid-template-columns: 1fr; }
  .area__intro { position: static; }
  .ap-msg { max-width: 92%; }
}

/* Cursore più discreto: anello pieno solo in parte */
.cursor-ring.is-hover { background: rgba(255, 255, 255, .55); }
.cursor-ring.has-label { background: rgba(255, 255, 255, .8); }
.cursor-ring { border-color: rgba(255, 255, 255, .7); }

/* ---------- 26. Rifiniture telefono ---------- */
@media (max-width: 600px) {
  /* Hero: foto e pellicola in alto, senza coprire i testi */
  .hero { padding-bottom: 28px; }
  .hero__frame { width: 36vw; top: calc(var(--nav-h) + 6px); right: 16px; padding: 6px 6px 0; }
  .hero__frame figcaption { font-size: .5rem; padding: .35rem 0 .45rem; flex-direction: column; gap: .1rem; }
  .hero__strip { left: 16px; top: calc(var(--nav-h) + 26vw); padding: 8px 6px; rotate: -8deg; }
  .hero__strip .media { width: 58px; }
  .hero__sticker { left: 16px; top: calc(var(--nav-h) + 8vw); font-size: .68rem; }
  .hero__content { gap: .9rem; }
  .hero__subtitle { font-size: .98rem; }
  .btn { min-height: 46px; padding: 0 1.2rem; }
  /* Carosello più compatto */
  .ring-stage { height: 400px; }
  /* Clienti: virgolette sopra il testo, senza sovrapporsi */
  .client { gap: .4rem; padding: 22px 20px; }
  .client__mark { font-size: 3.6rem; line-height: .7; height: 2.2rem; overflow: visible; }
  /* Sezioni con meno spazio vuoto */
  .about, .shots, .services, .clients, .contact, .area { padding-top: 72px; }
  .lighttable-wrap { padding-top: 64px; }
  .about__quote { margin-top: 56px; }
}
@media (max-width: 600px) and (max-height: 720px) {
  /* Telefoni bassi (es. iPhone SE): solo la polaroid */
  .hero__strip, .hero__sticker { display: none; }
  .hero__frame { width: 30vw; }
  .hero__subtitle { display: none; }
}
