/* Inquadrature e comandi delle fotografie di apertura, anche con movimento ridotto. */
.hero-photo[src$="/chitarra-in-ginocchio.webp"] { object-fit: contain; object-position: center; }
.hero-photo:is([src$="/famiglia-in-studio.webp"], [src$="/dejavu-sulle-scale.webp"]) { object-fit: contain; object-position: center; }
.shots img[src$="/pupi-avati.webp"], .encounter-strip img[src$="/pupi-avati.webp"] { object-position: 50% 25%; }
.shots.portraits img[src$="/ritratto-cuffie.webp"] { object-fit: contain; }
/* Due file uniformi per gli incontri, con accesso alle fotografie intere. */
.encounter-strip { grid-template-columns: repeat(4, minmax(0,1fr)); }
@media (max-width: 700px) {
  .encounter-strip { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .encounter-strip figure:nth-child(n+4) { display: block; }
  .hero-photo[src$="/chitarra-in-ginocchio.webp"] { object-position: center 10%; }
  .hero-photo:is([src$="/famiglia-in-studio.webp"], [src$="/dejavu-sulle-scale.webp"]) { object-position: center 10%; }
  .hero-caption { max-width: calc(100% - 2 * var(--edge) - 138px); line-height: 1.15; }
  .slide-control { gap: 0; }
  .slide-control button { min-width: 33px; justify-content: center; gap: 3px; }
  .slide-control i { width: 5px; }
  .slide-control button[aria-pressed=true] i { width: 9px; }
}
#sc-intro[hidden] { display: none !important; }

@media (prefers-reduced-motion: no-preference) {
  /* Pellicola d'ingresso. Le due metà sono opache finché il fotogramma è pronto. */
  #sc-intro { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; color: var(--gold); isolation: isolate; }
  #sc-intro .wow-gate { position: absolute; inset-inline: 0; height: 50.15%; overflow: hidden; background-color: #0d0e0c; transition: transform .6s cubic-bezier(.74,.02,.23,1); }
  .wow-gate::before, .wow-gate::after { content: ""; position: absolute; top: -12px; bottom: -12px; width: 13px; background: repeating-linear-gradient(0deg, transparent 0 14px, #554d3a 14px 22px, transparent 22px 33px); opacity: .31; }
  .wow-gate::before { left: clamp(10px,2vw,32px); } .wow-gate::after { right: clamp(10px,2vw,32px); }
  .wow-gate-top { top: 0; border-bottom: 1px solid #554e3c; } .wow-gate-bottom { bottom: 0; }
  .wow-leaving .wow-gate-top { transform: translateY(-101%); } .wow-leaving .wow-gate-bottom { transform: translateY(101%); }
  .wow-slate { z-index: 1; width: min(56vw,265px); text-align: center; display: grid; justify-items: center; align-content: center; gap: 16px; transition: opacity .2s; }
  .wow-slate img { width: auto; height: clamp(82px,15vh,130px); }
  .wow-count { font: 500 clamp(1rem,2vw,1.35rem)/1 var(--mono); letter-spacing: .2em; font-variant-numeric: tabular-nums; }
  .wow-progress { display: block; width: min(90%,170px); height: 2px; background: #3c382d; }
  .wow-progress i { display: block; height: 100%; background: var(--gold); transform: scaleX(var(--progress,0)); transform-origin: left; }
  .wow-reticle { position: absolute; inset: 8% 8%; pointer-events: none; transition: opacity .2s; }
  .wow-reticle i { position: absolute; width: 19px; height: 19px; border: 0 solid currentColor; opacity: .7; }
  .wow-reticle i:nth-child(1) { top: 0; left: 0; border-width: 1px 0 0 1px; }
  .wow-reticle i:nth-child(2) { top: 0; right: 0; border-width: 1px 1px 0 0; }
  .wow-reticle i:nth-child(3) { bottom: 0; right: 0; border-width: 0 1px 1px 0; }
  .wow-reticle i:nth-child(4) { bottom: 0; left: 0; border-width: 0 0 1px 1px; }
  .wow-skip { position: absolute; z-index: 2; right: 8%; bottom: 3%; min-height: 36px; padding-inline: 8px; color: var(--gold); font-size: .875rem; }
  .wow-leaving :is(.wow-slate,.wow-reticle,.wow-skip) { opacity: 0; pointer-events: none; }
  /* Lettere e parole conservano i corsivi del sito. */
  .wow-letter { display: inline-block; }
  .hero h1 em .wow-letter { padding-left: 0; }
  .wow-title-wait .wow-letter { opacity: 0; }
  .wow-title-in .wow-letter { animation: wow-letter-in .63s cubic-bezier(.18,.7,.25,1) both; animation-delay: calc(var(--i) * 30ms); }
  @keyframes wow-letter-in { from { opacity: 0; transform: translateY(.32em) rotate(5deg); filter: blur(5px); } to { opacity: 1; transform: none; filter: none; } }
  .wow-hero-light, .wow-dust { position: absolute; inset: 0; pointer-events: none; }
  .wow-hero-light { background: radial-gradient(ellipse 36% 53% at var(--light-x,66%) var(--light-y,40%), #c79c5226, transparent 85%); mix-blend-mode: screen; }
  .wow-dust { width: 100%; height: 100%; opacity: .7; }
  .hero-photo { translate: 0 var(--film-y,0px); }
  /* Lo stato iniziale si applica soltanto dopo aver registrato l'osservatore. */
  .wow-reveal { transition: opacity .65s, translate .72s cubic-bezier(.2,.68,.2,1); transition-delay: var(--lag,0ms); }
  .wow-reveal.wow-pending { opacity: 0; translate: 0 18px; }
  .wow-curtain { transition: clip-path .85s cubic-bezier(.22,.76,.22,1); transition-delay: var(--lag,0ms); clip-path: inset(0); }
  .wow-curtain.wow-pending { clip-path: inset(0 0 99%); }
  .wow-word-mask { display: inline-block; overflow: clip; vertical-align: bottom; padding: .1em .13em .14em .05em; margin: -.1em -.13em -.14em -.05em; }
  .wow-word { display: inline-block; transition: transform .7s cubic-bezier(.2,.74,.22,1); transition-delay: calc(var(--i) * 52ms); }
  .wow-heading.wow-pending .wow-word { transform: translateY(120%); }
  .wow-rule i { transform-origin: left; transition: transform .65s .12s; }
  .wow-rule.wow-pending i { transform: scaleX(0); }
  .wow-pending:focus-within { opacity: 1; translate: none; clip-path: none; }
  /* Nastri tipografici ispirati ai titoli di coda. La larghezza rimane nel viewport. */
  .wow-marquee { overflow: hidden; background: #11120f; border-block: 1px solid var(--line); padding-block: clamp(12px,2.3vw,34px); user-select: none; }
  .wow-track { display: flex; width: max-content; }
  .wow-strip { display: flex; align-items: center; justify-content: space-around; min-width: 100vw; flex: none; gap: .36em; padding-right: .36em; font: 400 clamp(3rem,7.5vw,7.6rem)/1 var(--serif); color: var(--gold); white-space: nowrap; }
  .wow-outline { color: transparent; -webkit-text-stroke: 1px var(--gold); }
  .wow-star { display: inline-block; font-size: .24em; color: var(--gold-bright); transform: rotate(var(--star-angle,0deg)); }
  /* Micro-interazioni su menu, collaborazioni, immagini e schede. */
  .wow-micro #nav a { position: relative; }
  .wow-micro #nav a::before { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--gold); transform: scaleX(0); transform-origin: left; transition: transform .28s ease; }
  .wow-micro #nav a:is(:hover,:focus-visible)::before { transform: scaleX(1); }
  .wow-micro .partner { position: relative; }
  .wow-micro .partner::after { content: ""; position: absolute; bottom: -1px; left: 0; right: 0; height: 1px; background: var(--gold); transform: scaleX(0); transform-origin: left; transition: transform .41s; pointer-events: none; }
  .wow-micro .partner > div { transition: translate .36s; }
  .wow-micro .partner:is(:hover,:focus-within)::after { transform: scaleX(1); }
  .wow-micro .partner:is(:hover,:focus-within) > div { translate: 5px 0; }
  .wow-micro dialog[open] { animation: wow-dialog .38s cubic-bezier(.17,.63,.26,1) both; }
  .wow-micro dialog[open] .dialog-body { animation: wow-dialog-content .42s ease-out both; }
  @keyframes wow-dialog { from { opacity: 0; transform: translateY(10px) scale(.966); filter: blur(3px); } to { opacity: 1; transform: none; filter: none; } }
  @keyframes wow-dialog-content { from { transform: scale(.985); } to { transform: none; } }
  .wow-grain { position: fixed; inset: -5%; z-index: 12; pointer-events: none; opacity: .038; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='144' height='144'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.86' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Cpath fill='%23fff' filter='url(%23n)' d='M0 0h144v144H0z'/%3E%3C/svg%3E"); animation: wow-grain .64s steps(1,end) infinite; }
  @keyframes wow-grain { 25% {transform:translate(-1%,1%)} 50% {transform:translate(1%,-1%)} 75% {transform:translate(-.6%,-1.1%)} }
  .wow-idle .wow-grain { animation-play-state: paused; }
}
@media (prefers-reduced-motion: no-preference) and (hover: hover) and (pointer: fine) {
  .wow-pointer-on, .wow-pointer-on :where(a,button,summary,[data-frame]) { cursor: none; }
  .wow-cursor-ring, .wow-cursor-dot { pointer-events: none; position: fixed; z-index: 900; top: 0; left: 0; border-radius: 50%; visibility: hidden; }
  .wow-pointer-on .wow-cursor-ring, .wow-pointer-on .wow-cursor-dot { visibility: visible; }
  .wow-cursor-ring { width: 30px; height: 30px; margin: -15px; display: grid; place-items: center; color: #f7e8be; border: 1px solid #d8c38bcc; transition: width .2s,height .2s,margin .2s,background .2s; font: 500 11px/1 var(--mono); text-shadow: 0 1px 3px #000; }
  .wow-cursor-ring.hot { width: 47px; height: 47px; margin: -23.5px; background: #17180f70; }
  .wow-cursor-ring.label { width: 56px; height: 56px; margin: -28px; background: #17180fbf; }
  .wow-cursor-dot { width: 4px; height: 4px; margin: -2px; background: var(--gold-bright); }
  .wow-pointer-label .wow-cursor-dot { opacity: 0; }
  .wow-ripple { pointer-events: none; position: fixed; z-index: 899; border: 1px solid var(--gold); border-radius: 50%; width: 14px; height: 14px; margin: -7px; animation: wow-ripple .45s ease-out forwards; }
  @keyframes wow-ripple { to { transform: scale(4); opacity: 0; } }
  .wow-tilt { transform: perspective(850px) translateY(var(--lift,0px)) rotateX(var(--rx,0deg)) rotateY(var(--ry,0deg)); transition: transform .17s ease-out; }
  .wow-magnet { translate: var(--mx,0px) var(--my,0px); transition: translate .18s ease-out; }
}
@media (prefers-reduced-motion: reduce) { #sc-intro, .wow-grain, .wow-marquee, .wow-dust, .wow-hero-light, .wow-cursor-ring, .wow-cursor-dot { display: none !important; } }
