/* ==========================================================================
   base.css — condiviso da tutte le pagine (anche dalla futura versione /en/)
   Regola del movimento: una cosa alla volta.
   Gli stati "nascosti" delle animazioni esistono solo sotto html.motion:
   senza JavaScript o con prefers-reduced-motion tutto è già al suo posto.
   ========================================================================== */

/* ---------- Font in locale ---------- */
@font-face{
  font-family:"Archivo";
  font-style:normal;
  font-display:swap;
  font-weight:100 900;
  font-stretch:62% 125%;
  src:url("../fonts/archivo-wdth-latin.woff2") format("woff2-variations"),
      url("../fonts/archivo-wdth-latin.woff2") format("woff2");
  unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face{
  font-family:"Archivo";
  font-style:normal;
  font-display:swap;
  font-weight:100 900;
  font-stretch:62% 125%;
  src:url("../fonts/archivo-wdth-latin-ext.woff2") format("woff2-variations"),
      url("../fonts/archivo-wdth-latin-ext.woff2") format("woff2");
  unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
@font-face{
  font-family:"Cormorant Garamond";
  font-style:normal;
  font-display:swap;
  font-weight:300;
  src:url("../fonts/cormorant-garamond-300-latin.woff2") format("woff2");
}
@font-face{
  font-family:"Permanent Marker";
  font-style:normal;
  font-display:swap;
  font-weight:400;
  src:url("../fonts/permanent-marker-latin.woff2") format("woff2");
}

/* ---------- Variabili ---------- */
:root{
  --nero:#0b0b0b;
  --carta:#fff;
  --crema:#f1efe9;
  --grigio:#555;
  --grigio-chiaro:#8c8c8c;
  --matita:#d4241c;      /* matita grassa rossa dei provini */
  --arancio:#d9872e;     /* numeri dei fotogrammi */
  --pad:clamp(18px,3.4vw,52px);
  --ease-out:cubic-bezier(.16,1,.3,1);
  --ease-in:cubic-bezier(.7,0,.84,0);
  --sans:"Archivo",system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;
  --serif:"Cormorant Garamond",Georgia,"Times New Roman",serif;
  --mano:"Permanent Marker","Comic Sans MS",cursive;
}

/* ---------- Reset essenziale ---------- */
*,*::before,*::after{box-sizing:border-box}
html{-webkit-text-size-adjust:100%;text-size-adjust:100%}
body{
  margin:0;
  background:var(--carta);
  color:var(--nero);
  font-family:var(--sans);
  font-size:17px;
  line-height:1.55;
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
  overflow-x:clip;
}
img,video,svg{display:block;max-width:100%}
img,video{height:auto}
a{color:inherit}
h1,h2,h3,h4,p,figure,dl,dd,ul{margin:0}
ul{padding:0;list-style:none}
button{font:inherit;color:inherit}

/* Lenis */
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}

/* ---------- Tipografia ---------- */
.big{
  font-weight:800;
  font-stretch:72%;
  letter-spacing:-.02em;
  line-height:.88;
  overflow-wrap:break-word;
}
.visually-hidden{
  position:absolute!important;width:1px;height:1px;padding:0;margin:-1px;
  overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0;
}

/* ---------- Tastiera ---------- */
:focus-visible{outline:2px solid currentColor;outline-offset:4px}
.skip{
  position:fixed;left:12px;top:12px;z-index:200;
  padding:10px 16px;border-radius:999px;background:#000;color:#fff;
  text-decoration:none;font-weight:600;transform:translateY(-160%);
}
.skip:focus{transform:none}
.skip:focus-visible{outline:2px solid #fff;outline-offset:2px}

/* ---------- Barra in alto ---------- */
.bar{
  position:fixed;top:0;left:0;right:0;z-index:70;
  display:flex;justify-content:space-between;align-items:center;gap:16px;
  padding:16px var(--pad);
  mix-blend-mode:difference;color:#fff;
  font-size:15px;font-weight:500;
  pointer-events:none;
}
.bar a{text-decoration:none;pointer-events:auto;padding:6px 0;white-space:nowrap}
.bar a:hover{text-decoration:underline;text-underline-offset:4px}
.bar nav ul{display:flex;gap:clamp(14px,2.2vw,28px)}
@media (max-width:420px){
  .bar{font-size:14px}
  .bar nav ul{gap:12px}
}

/* ---------- Pulsanti a pillola ---------- */
.pill{
  display:inline-flex;align-items:center;justify-content:center;
  min-height:52px;padding:0 26px;border-radius:999px;
  border:1px solid currentColor;
  text-decoration:none;font-weight:600;
  transition:background-color .3s,color .3s;
}
.pill--pieno{background:var(--nero);color:#fff;border-color:var(--nero)}
.pill--pieno:hover{background:transparent;color:var(--nero)}
.pill:not(.pill--pieno):hover{background:var(--nero);color:#fff}

/* ---------- Grana di pellicola ---------- */
.grain{
  position:fixed;inset:-50%;width:200%;height:200%;
  pointer-events:none;z-index:90;opacity:.07;mix-blend-mode:overlay;
  background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
.motion .grain{animation:grain 1s steps(6) infinite}
@keyframes grain{
  0%,100%{transform:translate(0,0)}
  25%{transform:translate(-3%,2%)}
  50%{transform:translate(2%,-3%)}
  75%{transform:translate(3%,3%)}
}

/* ---------- Cursore a punto (solo computer, puntatore fine) ---------- */
.cursor{display:none}
.has-cursor .cursor{
  position:fixed;left:0;top:0;z-index:100;
  width:12px;height:12px;margin:-6px 0 0 -6px;border-radius:50%;
  background:#fff;mix-blend-mode:difference;pointer-events:none;
  display:grid;place-items:center;
  font-size:13px;font-weight:600;color:#000;
  transition:width .35s var(--ease-out),height .35s var(--ease-out),margin .35s var(--ease-out),opacity .2s;
}
.has-cursor .cursor span{opacity:0;transition:opacity .2s}
.has-cursor .cursor.is-link{width:28px;height:28px;margin:-14px 0 0 -14px}
.has-cursor .cursor.is-open{width:84px;height:84px;margin:-42px 0 0 -42px;mix-blend-mode:normal}
.has-cursor .cursor.is-open span{opacity:1}
.has-cursor .cursor{opacity:0}
.has-cursor .cursor.is-visible{opacity:1}
.has-cursor .cursor.is-hidden{opacity:0}
/* il cursore di sistema resta dove serve: campi, testo selezionabile nei form */
.has-cursor,.has-cursor a,.has-cursor button,.has-cursor [tabindex]{cursor:none}
.has-cursor input,.has-cursor textarea,.has-cursor select{cursor:auto}

/* ---------- Otturatore (cambio pagina) ---------- */
.shutter{
  position:fixed;left:0;right:0;height:50.5vh;z-index:95;
  background:#000;transform:scaleY(0);pointer-events:none;
  transition:transform .55s var(--ease-in);
}
.shutter--top{top:0;transform-origin:top}
.shutter--bot{bottom:0;transform-origin:bottom}
.shutter-in .shutter{transform:scaleY(1);animation:shutter-open .85s var(--ease-out) .12s forwards}
.is-leaving .shutter{animation:none;transform:scaleY(1)}
@keyframes shutter-open{to{transform:scaleY(0)}}

/* ---------- Piè di pagina ---------- */
.piede{
  display:flex;flex-wrap:wrap;justify-content:space-between;gap:12px 24px;
  padding:28px var(--pad);
  background:var(--nero);color:#bdbdbd;font-size:14px;
}
.piede a{text-decoration:none}
.piede a:hover{text-decoration:underline}

/* ---------- Pagine di testo (privacy) ---------- */
.testo-legale{max-width:760px;margin:0 auto;padding:clamp(110px,16vh,160px) var(--pad) 12vh}
.testo-legale h1{font-size:clamp(48px,8vw,110px);margin-bottom:28px}
.testo-legale h2{font-size:22px;font-weight:700;margin:44px 0 10px}
.testo-legale p{margin-bottom:14px;color:#222}
.testo-legale__intro{font-size:clamp(19px,1.7vw,23px);line-height:1.45}
.testo-legale a{text-underline-offset:3px}
.testo-legale__data{margin-top:44px;font-size:14px;color:var(--grigio)!important}

/* ---------- Movimento ridotto: tutto fermo ---------- */
@media (prefers-reduced-motion:reduce){
  *,*::before,*::after{animation-duration:.001ms!important;animation-iteration-count:1!important;transition-duration:.001ms!important;scroll-behavior:auto!important}
  .shutter{display:none}
}
