/* Silvia Turazza — portfolio
   Ricostruzione fedele del sito Adobe Portfolio: header nero, intro grigio scuro,
   griglia 3 colonne a filo, Montserrat, accento verde menta #71daad. */

@font-face{font-family:"Montserrat";src:url(montserrat-400-normal.woff2) format("woff2");font-weight:400;font-style:normal;font-display:swap}
@font-face{font-family:"Montserrat";src:url(montserrat-700-normal.woff2) format("woff2");font-weight:700;font-style:normal;font-display:swap}
@font-face{font-family:"Montserrat";src:url(montserrat-400-italic.woff2) format("woff2");font-weight:400;font-style:italic;font-display:swap}
@font-face{font-family:"Montserrat";src:url(montserrat-700-italic.woff2) format("woff2");font-weight:700;font-style:italic;font-display:swap}

:root{--black:#000;--intro:#1c1c1d;--ink:#fff;--muted:#8a8a8a;--accent:#71daad;--line:#2a2a2a;--hdr:54px}
*{box-sizing:border-box;min-width:0}
html{scroll-behavior:smooth;scroll-padding-top:var(--hdr)}
body{margin:0;background:var(--black);color:var(--ink);font:16px/1.5 "Montserrat",Helvetica,Arial,sans-serif;overflow-x:clip;-webkit-font-smoothing:antialiased}
a{color:inherit}
img,video{display:block;max-width:100%}
.sr,.hp{position:absolute!important;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
@media (prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}

/* Header */
.top{position:sticky;top:0;z-index:50;height:var(--hdr);background:var(--black);display:grid;grid-template-columns:1fr auto 1fr;align-items:center;padding:0 24px}
.menu{display:flex;gap:20px}
.menu a{text-decoration:none;font-size:16px;font-weight:400;opacity:.92}
.menu a:hover{opacity:1}
.menu a.on{font-weight:700;opacity:1}
.logo{display:block;line-height:0}
.mark{width:28px;height:28px;overflow:visible}
.mark g,.splash-mark g{fill:none;stroke:#fff;stroke-width:6;stroke-linecap:round;stroke-linejoin:round}
.social{display:flex;gap:16px;justify-content:flex-end}
.social a{display:grid;place-items:center;width:20px;height:20px;opacity:.95}
.social a:hover{opacity:1;color:var(--accent)}
.social svg{width:15px;height:15px;fill:currentColor}
.burger{display:none;background:none;border:0;padding:10px;margin-left:-10px;cursor:pointer}
.burger span{display:block;width:22px;height:2px;background:#fff;margin:5px 0;transition:transform .2s}

/* Intro (home) */
.intro{background:var(--intro);min-height:clamp(440px,68svh,620px);display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:90px max(5vw,20px) 40px;position:relative}
.intro h1{max-width:620px;margin:0;font-size:clamp(16px,1.6vw,20px);font-weight:400;line-height:1.3}
.cta{margin:42px 0 26px;color:var(--accent);font-weight:700;font-style:italic;font-size:clamp(18px,1.8vw,22px)}
.pill{display:inline-block;background:#fff;color:var(--accent);text-decoration:none;font-size:11px;font-weight:700;letter-spacing:.04em;padding:10px 22px;border-radius:30px;transition:background .2s,color .2s}
.pill:hover{background:var(--accent);color:#fff}
.down{margin-top:auto;padding-top:60px}
.down svg{width:36px;height:18px;fill:none;stroke:#fff;stroke-width:1.5}

/* Griglia progetti */
.grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:1px;background:var(--line);padding-top:0}
#work{margin-top:64px}
.cover{position:relative;display:block;aspect-ratio:1280/1001;overflow:hidden;background:#111}
.cover img{width:100%;height:100%;object-fit:cover;transition:transform .5s ease,filter .3s}
.cover-title{position:absolute;inset:0;display:grid;place-items:center;text-align:center;padding:12%;font-size:clamp(15px,1.5vw,20px);font-weight:700;line-height:1.2;color:#222;background:rgba(255,255,255,.55);opacity:0;transition:opacity .3s}
.cover:hover .cover-title,.cover:focus-visible .cover-title{opacity:1}
.cover:hover img{transform:scale(1.03)}

/* Pagina progetto */
.phead{text-align:center;padding:clamp(48px,7vw,90px) max(6vw,20px) clamp(40px,6vw,70px)}
.phead h1{margin:0 auto;max-width:640px;font-size:clamp(28px,3.4vw,40px);font-weight:700;line-height:1.15;text-wrap:balance}
.phead .sub{margin:18px auto 0;max-width:620px;color:#cfcfcf}
.phead .pill{margin-top:28px}
.modules img,.modules video{width:100%;height:auto}
.modules video{background:#191919}
.text{max-width:760px;margin:0 auto;padding:clamp(32px,5vw,64px) max(6vw,20px)}
.text p{margin:0 0 1.2em;line-height:1.7;color:#e6e6e6}
.more{padding-top:clamp(56px,8vw,100px)}
.more h2{text-align:center;font-size:clamp(20px,2vw,26px);font-weight:700;margin:0 0 36px}

/* Art */
.art{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:4px}
.art-item{display:block;overflow:hidden;cursor:zoom-in}
.art-item img{width:100%;height:100%;object-fit:cover;aspect-ratio:4/5;transition:transform .5s}
.art-item:hover img{transform:scale(1.03)}

/* Contatti */
.contact{max-width:620px;margin:0 auto;padding:0 20px 40px}
.contact form{display:grid;gap:16px}
.contact input,.contact textarea{width:100%;font:inherit;font-size:16px;color:#fff;background:#1a1a1a;border:1px solid #1a1a1a;padding:14px 16px;border-radius:0;resize:vertical}
.contact input:focus,.contact textarea:focus{outline:none;border-color:var(--accent)}
.contact ::placeholder{color:#777}
.contact button{justify-self:start;font:inherit;font-weight:700;font-size:14px;color:#000;background:#fff;border:0;padding:13px 30px;cursor:pointer;transition:background .2s}
.contact button:hover{background:var(--accent)}
.alt{margin-top:32px;color:#bdbdbd;font-size:14px}
.alt a{color:var(--accent)}

/* Footer */
.foot{text-align:center;padding:70px 20px 40px}
.foot .social{justify-content:center;gap:28px}
.foot .social svg{width:17px;height:17px}
.foot p{margin:26px 0 0;color:#555;font-size:13px}

/* Torna su */
.totop{position:fixed;right:32px;bottom:32px;width:46px;height:46px;border-radius:50%;background:rgba(40,40,40,.85);display:grid;place-items:center;opacity:0;pointer-events:none;transition:opacity .3s;z-index:40}
.totop.show{opacity:1;pointer-events:auto}
.totop svg{width:20px;height:20px;fill:none;stroke:#bbb;stroke-width:1.6}

/* Lightbox */
.lightbox{position:fixed;inset:0;z-index:100;background:rgba(0,0,0,.94);display:grid;place-items:center;padding:4vh 4vw;cursor:zoom-out}
.lightbox[hidden]{display:none}
.lightbox img{max-height:92vh;width:auto;object-fit:contain}
.lb-close{position:absolute;top:14px;right:20px;background:none;border:0;color:#fff;font-size:38px;line-height:1;cursor:pointer}

/* Tablet e telefono */
@media (max-width:900px){.grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media (max-width:640px){
  .top{padding:0 16px}
  .burger{display:block}
  .menu{position:fixed;top:var(--hdr);left:0;right:0;flex-direction:column;gap:0;background:#000;padding:8px 16px 20px;transform:translateY(-120%);transition:transform .3s;z-index:-1}
  .menu a{padding:12px 0;font-size:18px}
  .top.open .menu{transform:none}
  .top.open .burger span:first-child{transform:translateY(3.5px) rotate(45deg)}
  .top.open .burger span:last-child{transform:translateY(-3.5px) rotate(-45deg)}
  .top>.social{gap:12px}
  .grid,.art{grid-template-columns:minmax(0,1fr)}
  .cover-title{opacity:1;background:linear-gradient(transparent 55%,rgba(255,255,255,.75));align-items:end;padding:16px;font-size:15px}
  .totop{right:16px;bottom:16px}
}

/* Moduli immagine */
.stack img{width:100%;height:auto}
.row{display:grid;grid-auto-flow:column;grid-auto-columns:minmax(0,1fr);gap:clamp(8px,1.5vw,20px);padding:clamp(16px,3vw,40px) max(4vw,16px);max-width:1400px;margin:0 auto}
.row img{width:100%;height:auto}
@media (max-width:640px){.row{grid-auto-flow:row}}

/* Intro animata: T e Z entrano, si uniscono nella clessidra, che si capovolge e va nel menu */
.splash{display:none}
html.st-splash .splash{display:grid;place-items:center;position:fixed;inset:0;z-index:1000;background:#000;cursor:pointer}
html.st-splash .top .logo{opacity:0}
.splash-mark{--far:600px;width:clamp(90px,14vw,140px);height:auto;overflow:visible;transform-origin:50% 50%;
  animation:st-flip .6s cubic-bezier(.65,0,.35,1) 1.25s both}
.splash-mark .lt{animation:st-in-left 1s cubic-bezier(.5,0,.15,1) .15s both}
.splash-mark .lz{animation:st-in-right 1s cubic-bezier(.5,0,.15,1) .15s both}
@keyframes st-in-left{from{transform:translateX(calc(var(--far) * -1))}to{transform:none}}
@keyframes st-in-right{from{transform:translateX(var(--far))}to{transform:none}}
@keyframes st-flip{from{transform:rotate(0)}to{transform:rotate(180deg)}}

/* ================= VERSIONE CREATIVA ================= */

/* Hero */
.hero{min-height:calc(100svh - var(--hdr));display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:60px max(6vw,20px) 30px;position:relative}
.hero h1{margin:0;font-size:clamp(46px,9vw,128px);font-weight:700;line-height:.95;letter-spacing:-.02em;text-wrap:balance}
.hero p{max-width:600px;margin:28px auto 0;font-size:clamp(15px,1.4vw,18px);line-height:1.55;color:#cfcfcf}
.hero .cta{margin:34px 0 22px;color:var(--accent);font-weight:700;font-style:italic;font-size:clamp(17px,1.6vw,21px)}
.hero .down{margin-top:auto;padding-top:40px;animation:bob 2.4s ease-in-out infinite}
@keyframes bob{50%{transform:translateY(8px)}}

/* Collage dei progetti: come icone sparse su una scrivania */
.collage{position:relative;container-type:inline-size;width:min(100%,1500px);margin:clamp(20px,3vw,48px) auto 5vw;height:calc(118 * 1cqw)}
@supports not (height:1cqw){.collage{height:118vw}}
.tile{position:absolute;left:calc(var(--x) * 1%);top:calc(var(--y) * 1cqw);width:calc(var(--w) * 1%);z-index:var(--z);will-change:transform;touch-action:pan-y}
.tile:hover,.tile:focus-within{z-index:40}
.tile.top{z-index:41}
.tile-in{opacity:0;transform:translateY(80px) scale(.92);transition:opacity .9s ease var(--d),transform 1.1s cubic-bezier(.16,1,.3,1) var(--d)}
.tile.in .tile-in{opacity:1;transform:none}
.collage .cover{aspect-ratio:1280/1001;box-shadow:0 0 0 1px rgba(255,255,255,.1),0 30px 60px -20px rgba(0,0,0,.95);transition:transform .5s cubic-bezier(.16,1,.3,1),filter .5s}
.collage .cover img{transition:transform .8s cubic-bezier(.16,1,.3,1)}
.collage:hover .tile:not(:hover) .cover,.collage:hover .tile:not(:hover) .about-card{filter:brightness(.45)}
.tile:hover .cover,.tile .cover:focus-visible{transform:scale(1.05)}
.tile.dragging .cover{transform:scale(1.08);box-shadow:0 0 0 1px rgba(255,255,255,.15),0 50px 90px -20px rgba(0,0,0,1)}
.cap{display:none}
.grid .cover-title{display:none}
.grid:hover .cover:not(:hover){filter:brightness(.5)}
.grid .cover{transition:filter .4s}

/* Presentazione: foto + testo come grafica */
.about-card{position:relative;margin:0;aspect-ratio:1280/1001;overflow:hidden;background:#111;box-shadow:0 0 0 1px rgba(255,255,255,.1),0 30px 60px -20px rgba(0,0,0,.95);transition:filter .5s}
.about-card img{width:100%;height:100%;object-fit:cover;object-position:50% 28%}
.about-card figcaption{position:absolute;inset:auto 0 0 0;padding:6% 7%;background:linear-gradient(transparent,rgba(0,0,0,.85) 42%)}
.about-card h1{margin:0;font-size:clamp(26px,3cqw,48px);line-height:.95;font-weight:700;letter-spacing:-.02em}
.about-card p{margin:8px 0 0;font-size:clamp(12px,.92cqw,15px);line-height:1.5;color:#ddd}
.about-card .pill{font-size:10px;padding:8px 18px}

/* Pagina Art come collage */
.art-collage{height:calc(102 * 1cqw)}
.artwork .art-item{display:block;aspect-ratio:3/4;overflow:hidden;cursor:zoom-in;box-shadow:0 0 0 1px rgba(255,255,255,.1),0 30px 60px -20px rgba(0,0,0,.95);transition:transform .5s cubic-bezier(.16,1,.3,1),filter .5s}
.artwork .art-item img{width:100%;height:100%;object-fit:cover;aspect-ratio:auto;transition:none}
.tile.artwork:hover .art-item{transform:scale(1.05)}
.art-collage:hover .tile:not(:hover) .art-item{filter:brightness(.45)}
.tile.dragging .art-item{transform:scale(1.08)}

/* Cartella Art */
.art-folder{position:relative;display:block;aspect-ratio:5/4;text-decoration:none;perspective:900px}
.f-back{position:absolute;inset:9% 0 0 0;background:#161616;border:1px solid rgba(255,255,255,.14);border-radius:10px;box-shadow:0 30px 60px -20px rgba(0,0,0,.95)}
.f-back::before{content:"";position:absolute;left:-1px;top:-11%;width:36%;height:12%;background:#161616;border:1px solid rgba(255,255,255,.14);border-bottom:0;border-radius:10px 14px 0 0}
.f-art{position:absolute;bottom:30%;width:36%;aspect-ratio:3/4;overflow:hidden;box-shadow:0 10px 30px rgba(0,0,0,.7);transition:transform .7s cubic-bezier(.16,1,.3,1)}
.f-art img{width:100%;height:100%;object-fit:cover}
.f-art.a1{left:8%;transform:rotate(-7deg)}
.f-art.a2{left:32%;transform:translateY(-6%) rotate(1deg)}
.f-art.a3{left:56%;transform:rotate(8deg)}
.art-folder:hover .f-art.a1{transform:translate(-22%,-34%) rotate(-16deg)}
.art-folder:hover .f-art.a2{transform:translateY(-48%) rotate(0)}
.art-folder:hover .f-art.a3{transform:translate(22%,-34%) rotate(16deg)}
.f-front{position:absolute;left:0;right:0;bottom:0;height:58%;display:flex;flex-direction:column;justify-content:flex-end;padding:7% 8%;background:rgba(24,24,24,.94);border:1px solid rgba(255,255,255,.18);border-radius:10px;transform-origin:50% 100%;transition:transform .7s cubic-bezier(.16,1,.3,1);-webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px)}
.art-folder:hover .f-front{transform:rotateX(-16deg)}
.f-front b{font-size:clamp(28px,3.9cqw,64px);line-height:.9;font-weight:700;letter-spacing:-.02em;color:#fff}
.f-front small{margin-top:8px;font-size:clamp(11px,.95cqw,15px);color:#9a9a9a;letter-spacing:.02em}
.collage:hover .tile.folder:not(:hover) .art-folder{filter:brightness(.6)}
.art-folder{transition:filter .5s}

/* Rivelazione allo scroll (pagine progetto) */
.reveal{opacity:0;transform:translateY(60px);transition:opacity 1s ease,transform 1.2s cubic-bezier(.16,1,.3,1)}
.reveal.in{opacity:1;transform:none}

/* Galleria Art */
.gallery{position:relative;height:calc(100svh - var(--hdr));display:flex;flex-direction:column;justify-content:center;overflow:hidden}
.wall{display:flex;align-items:center;gap:clamp(60px,9vw,160px);overflow-x:auto;overflow-y:hidden;scroll-snap-type:x mandatory;padding:0 max(30vw,40px);height:100%;scrollbar-width:none;outline:none;cursor:grab}
.wall::-webkit-scrollbar{display:none}
.wall.drag{cursor:grabbing;scroll-snap-type:none}
.work{flex:none;margin:0;scroll-snap-align:center;position:relative;height:min(68svh,760px);aspect-ratio:1600/2133}
.work::before{content:"";position:absolute;left:50%;top:-22%;width:190%;height:150%;transform:translateX(-50%);background:radial-gradient(ellipse 45% 55% at 50% 30%,rgba(255,255,255,.075),transparent 70%);pointer-events:none}
.work .art-item{display:block;height:100%;overflow:visible;cursor:zoom-in}
.work img{height:100%;width:100%;object-fit:cover;aspect-ratio:auto;box-shadow:0 40px 80px -30px rgba(0,0,0,1),0 0 0 1px rgba(255,255,255,.04);transition:transform .8s cubic-bezier(.16,1,.3,1)}
.work:hover img{transform:scale(1.02)}
.gal-ui{position:absolute;left:0;right:0;bottom:clamp(14px,3vh,34px);display:flex;justify-content:center;align-items:center;gap:22px;color:#888;font-size:13px;letter-spacing:.06em}
.gal-ui b{color:#fff;font-weight:700}
.gal-ui button{width:44px;height:44px;border-radius:50%;border:1px solid #333;background:none;color:#fff;cursor:pointer;display:grid;place-items:center;transition:border-color .3s,background .3s}
.gal-ui button:hover{border-color:#fff}
.gal-ui svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.6}
body:has(.gallery) .foot{display:none}

.work.design-slot{aspect-ratio:5/4;height:min(46svh,500px);container-type:inline-size}
.work.design-slot::before{display:none}
.design-slot .f-front b{font-size:15cqw}
.design-folder .f-front b{font-size:clamp(28px,4.2cqw,64px)}
.design-slot .f-front small{font-size:max(11px,2.6cqw)}
.design-slot .f-art{aspect-ratio:4/3;width:44%}
.design-slot .f-art.a1{left:4%}.design-slot .f-art.a2{left:28%}.design-slot .f-art.a3{left:52%}

/* Clessidra "torna su" */
.totop .mark{width:18px;height:18px;transition:transform .6s cubic-bezier(.65,0,.35,1)}
.totop:hover .mark{transform:rotate(180deg)}

/* Cursore personalizzato (solo con mouse) */
.cursor{display:none}
@media (hover:hover) and (pointer:fine){
  html.has-cursor,html.has-cursor a,html.has-cursor button{cursor:none}
  html.has-cursor .wall{cursor:none}
  .cursor{display:grid;place-items:center;position:fixed;left:0;top:0;width:12px;height:12px;margin:-6px 0 0 -6px;border-radius:50%;background:#fff;pointer-events:none;z-index:2000;mix-blend-mode:difference;transition:width .35s cubic-bezier(.16,1,.3,1),height .35s cubic-bezier(.16,1,.3,1),margin .35s cubic-bezier(.16,1,.3,1),opacity .3s;opacity:0}
  .cursor.on{opacity:1}
  .cursor span{color:#000;font-size:12px;font-weight:700;text-align:center;line-height:1.15;padding:0 12px;opacity:0;transition:opacity .2s}
  .cursor.link{width:44px;height:44px;margin:-22px 0 0 -22px}
  .cursor.label{width:112px;height:112px;margin:-56px 0 0 -56px;mix-blend-mode:normal}
  .cursor.label span{opacity:1}
  .cursor.down{transform:scale(.85)}
}

/* Passaggi tra pagine */
body{animation:pagein .6s ease both}
@keyframes pagein{from{opacity:0}}
html.st-splash body{animation:none}
body.leaving{opacity:0;transition:opacity .3s ease}

/* Telefono */
@media (max-width:700px){
  .collage{height:calc((548 + 60) * 1cqw)}
  .art-collage{height:calc((3 + 7 * 52 + 75 + 20) * 1cqw)}
  .tile.artwork:hover .art-item{transform:none}
  .art-collage:hover .tile:not(:hover) .art-item{filter:none}
  .f-front b{font-size:48px}
  .f-front small{font-size:12px}
  .tile{left:calc(var(--mx) * 1%);top:calc(var(--my) * 1cqw);width:calc(var(--mw) * 1%)}
  .tile:hover .cover{transform:none}
  .collage:hover .tile:not(:hover) .cover,.collage:hover .tile:not(:hover) .about-card{filter:none}
  .cap{display:none;position:absolute;left:0;right:0;bottom:-20px;font-size:10.5px;color:#9a9a9a;text-align:center;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .collage .cover{overflow:visible}
  .about-card h1{font-size:26px}
  .about-card p{font-size:12px;line-height:1.4}
  .top .menu{gap:14px}
  .top .menu a{font-size:14px}
  .work{height:min(62svh,560px);max-width:78vw}
  .wall{padding:0 11vw;gap:14vw}
}
@media (prefers-reduced-motion:reduce){.tile-in,.reveal{opacity:1!important;transform:none!important}body{animation:none}}

/* ===== Header essenziale + dock in basso ===== */
.top{display:grid;grid-template-columns:1fr auto 1fr}
.top .burger{display:none!important}
.top .menu{display:flex!important;position:static;transform:none;flex-direction:row;background:none;padding:0;gap:20px;z-index:auto}
.top .menu a{padding:0;font-size:16px}
body{padding-bottom:96px}
.foot{padding:50px 20px 30px}
.foot p{margin:0}
.totop{bottom:104px}
@media (max-width:640px){.totop{bottom:84px}}
.dock{position:fixed;left:50%;bottom:14px;transform:translateX(-50%);z-index:60;display:flex;align-items:flex-end;gap:8px;height:64px;padding:8px 10px;
  background:rgba(28,28,30,.6);border:1px solid rgba(255,255,255,.12);border-radius:20px;-webkit-backdrop-filter:blur(18px) saturate(1.4);backdrop-filter:blur(18px) saturate(1.4);box-shadow:0 20px 50px -10px rgba(0,0,0,.8)}
.dock-item{--s:1;position:relative;display:block;width:calc(46px * var(--s));height:calc(46px * var(--s));flex:none;transition:width .18s ease,height .18s ease;text-decoration:none}
.dock .ico{display:grid;place-items:center;width:100%;height:100%;border-radius:calc(12px * var(--s));background:linear-gradient(#262628,#141415);border:1px solid rgba(255,255,255,.1);color:#fff}
.dock .ico svg{width:46%;height:46%;fill:currentColor}
.dock .ico svg.line,.dock .ico .mark{fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
.dock .ico .mark{width:44%;height:44%;transition:transform .6s cubic-bezier(.65,0,.35,1)}
.dock .ico .mark g{stroke-width:9}
.dock-item:hover .mark{transform:rotate(180deg)}
.dock [data-brand] .ico{border:0}
.dock [data-brand] .ico svg{width:56%;height:56%}
.dock [data-brand="linkedin"] .ico{background:#0a66c2}
.dock [data-brand="instagram"] .ico{background:radial-gradient(circle at 30% 107%,#fdf497 0%,#fdf497 5%,#fd5949 45%,#d6249f 60%,#285aeb 90%)}
.dock [data-brand="tiktok"] .ico{background:#000;border:1px solid rgba(255,255,255,.14)}
.dock [data-brand="tiktok"] .ico svg{filter:drop-shadow(-1.6px -1.2px 0 #25f4ee) drop-shadow(1.6px 1.2px 0 #fe2c55)}
.dock [data-brand="whatsapp"] .ico{background:#25d366}
.dock [data-brand="mail"] .ico{background:linear-gradient(#3aa0ff,#0b62e0)}
.dock [data-brand="mail"] .ico svg{fill:none;stroke:#fff;stroke-width:1.7;width:58%;height:58%}
.dock-item.on::after{content:"";position:absolute;left:50%;bottom:-6px;width:4px;height:4px;margin-left:-2px;border-radius:50%;background:#fff}
.dock-sep{width:1px;height:38px;align-self:center;background:rgba(255,255,255,.18);margin:0 2px}
.tip{position:absolute;left:50%;bottom:calc(100% + 12px);transform:translateX(-50%) translateY(4px);padding:5px 10px;border-radius:7px;background:rgba(40,40,42,.92);border:1px solid rgba(255,255,255,.12);color:#fff;font-size:12px;white-space:nowrap;opacity:0;pointer-events:none;transition:opacity .15s,transform .15s}
.dock-item:hover .tip,.dock-item:focus-visible .tip{opacity:1;transform:translateX(-50%)}
.gal-ui{bottom:104px}
.gallery{height:calc(100svh - var(--hdr) - 96px)}
.gallery .gal-ui{bottom:8px}
@media (max-width:640px){
  .dock{bottom:10px;gap:5px;height:54px;padding:7px 8px;border-radius:17px}
  .dock-item{width:38px;height:38px}
  .dock .ico{border-radius:10px}
  .dock-sep{height:30px;margin:0}
  .tip{display:none}
  body{padding-bottom:80px}
  .gallery{height:calc(100svh - var(--hdr) - 80px)}
}

/* Icona About nella barra + finestra */
.dock .ico.photo{padding:0;overflow:hidden;background:#222}
.dock .ico.photo img{width:100%;height:100%;object-fit:cover}
/* Finestre stile Mac */
html.win-open{overflow:hidden}
html{scrollbar-gutter:stable}
.win-backdrop{position:fixed;inset:0;z-index:1500;display:grid;place-items:center;padding:clamp(10px,3vw,40px);background:rgba(0,0,0,.5);-webkit-backdrop-filter:blur(5px);backdrop-filter:blur(5px);animation:fade .25s ease}
.win-backdrop.closing{animation:fade .2s ease reverse forwards}
.win-backdrop.closing .win{animation:pop .2s ease reverse forwards}
@keyframes fade{from{opacity:0}}
.win{display:flex;flex-direction:column;width:min(760px,100%);max-height:100%;background:#141415;border:1px solid rgba(255,255,255,.14);border-radius:14px;overflow:hidden;box-shadow:0 40px 100px -20px rgba(0,0,0,1);animation:pop .4s cubic-bezier(.16,1,.3,1)}
.win.big{width:100%;height:100%;max-width:1500px}
@keyframes pop{from{opacity:0;transform:translateY(30px) scale(.95)}}
.win-bar{flex:none;display:grid;grid-template-columns:1fr auto 1fr;align-items:center;height:40px;padding:0 14px;background:#1d1d1f;border-bottom:1px solid rgba(255,255,255,.08);font-size:13px;color:#aaa}
.win-dots{display:flex;gap:8px;align-items:center}
.win-dots i,.win-dots .red{width:12px;height:12px;border-radius:50%;background:#3a3a3c;border:0;padding:0}
.win-dots .red{position:relative;background:#ff5f57;cursor:pointer;box-shadow:inset 0 0 0 .5px rgba(0,0,0,.25)}
.win-dots .red::before,.win-dots .red::after{content:"";position:absolute;left:50%;top:50%;width:7px;height:1.4px;background:#4d0000;opacity:0;transform:translate(-50%,-50%) rotate(45deg)}
.win-dots .red::after{transform:translate(-50%,-50%) rotate(-45deg)}
.win-dots:hover .red::before,.win-dots:hover .red::after,.win-dots .red:focus-visible::before,.win-dots .red:focus-visible::after{opacity:1}
.win-dots .red:focus-visible{outline:2px solid #fff;outline-offset:2px}
.win-title{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:60vw}
.win-nav{justify-self:end;display:flex;gap:4px}
.win-nav button{width:30px;height:28px;border:0;border-radius:6px;background:none;color:#ccc;cursor:pointer;display:grid;place-items:center}
.win-nav button:hover{background:rgba(255,255,255,.08)}
.win-nav svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.8}
.win-body{position:relative;flex:1;min-height:0;overflow:auto;background:#000}
.win-body iframe{display:block;width:100%;height:100%;border:0;background:#000}
.win-art{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;padding:clamp(10px,2vw,30px);background:#0b0b0b}
.win-art img{max-width:100%;max-height:100%;width:auto;height:auto;object-fit:contain;box-shadow:0 30px 70px -20px rgba(0,0,0,1)}
.about-body{display:grid;grid-template-columns:minmax(0,5fr) minmax(0,6fr);background:#141415}
.about-body img{width:100%;height:100%;aspect-ratio:4/5;object-fit:cover}
.about-text{padding:clamp(22px,4vw,44px);display:flex;flex-direction:column;justify-content:center}
.about-text h2,.about-text p{font-size:16px;line-height:1.6;margin:0}
.about-text h2{font-weight:700;margin-bottom:6px}
.about-text p{color:#d5d5d5}
@media (max-width:640px){
  .about-body{grid-template-columns:minmax(0,1fr)}
  .about-body img{aspect-ratio:4/3;object-position:50% 25%}
  .about-text h2,.about-text p{font-size:15px}
  .win.big{border-radius:12px}
}

/* Pagina caricata dentro una finestra */
html.in-win .top,html.in-win .dock,html.in-win .foot,html.in-win .totop,html.in-win .more,html.in-win .splash,html.in-win .cursor{display:none!important}
html.in-win body{padding-bottom:0;animation:none}
html.in-win,html.in-win a{cursor:auto!important}
html.win-iframe .cursor{opacity:0!important}
html.win-iframe.has-cursor,html.win-iframe.has-cursor a,html.win-iframe.has-cursor button{cursor:auto}
html.win-iframe .win-bar button{cursor:pointer}
.dock .ico.doc{background:linear-gradient(#f4f4f5,#d9d9dc);border:0}
.dock .ico.doc svg{width:56%;height:64%}
.dock .ico.doc .pg{fill:#fff;stroke:#9a9aa0;stroke-width:1}
.dock .ico.doc .fold{fill:#e4e4e7;stroke:#9a9aa0;stroke-width:1}
.dock .ico.doc text{font:700 7.5px Montserrat,sans-serif;fill:#e0412f}
.win-cv{position:absolute;inset:0;background:#2a2a2c}
.win-cv iframe{width:100%;height:100%;border:0}
.win-open-ext{justify-self:end;font-size:12px;color:#ccc;text-decoration:none;padding:5px 10px;border-radius:6px;border:1px solid rgba(255,255,255,.15)}
.win-open-ext:hover{background:rgba(255,255,255,.08)}
.top .menu:empty{min-height:1px}
.win-nav [hidden]{display:none!important}

/* ===== Icone da desktop (sezioni) ===== */
.desk-icons{position:fixed;top:calc(var(--hdr) + 22px);right:22px;z-index:55;display:flex;flex-direction:column;gap:18px;width:96px}
.dicon{display:flex;flex-direction:column;align-items:center;gap:7px;text-decoration:none;color:#fff}
.dimg{width:64px;height:58px;display:grid;place-items:center;filter:drop-shadow(0 8px 14px rgba(0,0,0,.7));transition:transform .3s cubic-bezier(.16,1,.3,1)}
.dimg svg{width:100%;height:100%}
.dimg .fb{fill:#9ea3ab}.dimg .ff{fill:url(#none);fill:#d4d7dc}
.dimg .pg{fill:#fff}.dimg .fold{fill:#dcdce0}.dimg .tag{fill:#e0412f}
.dimg text{font:700 10px Montserrat,sans-serif;fill:#fff}
.dimg.photo{width:58px;height:58px;padding:3px;background:#fff;border-radius:4px;transform:rotate(-3deg)}
.dimg.photo img{width:100%;height:100%;object-fit:cover}
.dlab{font-size:12px;font-weight:600;line-height:1.2;padding:2px 7px;border-radius:5px;text-shadow:0 1px 3px rgba(0,0,0,.9);white-space:nowrap}
.dicon:hover .dimg{transform:translateY(-3px)}
.dicon:hover .dlab,.dicon:focus-visible .dlab{background:#2563eb;text-shadow:none}
.dicon:hover .dimg.photo{transform:translateY(-3px) rotate(-3deg)}
@media (min-width:701px){
  .collage{width:min(calc(100% - 150px),1400px);margin-left:max(10px,calc((100% - 150px - 1400px) / 2))}
}
@media (max-width:700px){
  .desk-icons{position:static;flex-direction:row;justify-content:center;gap:26px;width:auto;margin:14px 0 4px}
  .dimg{width:52px;height:46px}
  .dimg.photo{width:46px;height:46px}
  .dlab{font-size:11px}
}
html.in-win .desk-icons{display:none!important}

/* ===== Finestre su misura ===== */
.win.fit{width:auto;max-width:100%}
.win.fit .win-body{flex:none;overflow:hidden}
.win.fit .win-art{position:static;padding:0;display:block;background:#000}
.win.fit .win-art img{display:block;width:auto;height:auto;max-width:calc(100vw - 2 * clamp(10px,3vw,40px) - 2px);max-height:calc(100svh - 2 * clamp(10px,3vw,40px) - 42px);box-shadow:none}
.win.project{max-width:1240px}
.win.cv{width:auto;height:100%;aspect-ratio:auto}
.win.cv .win-body{width:min(calc((100svh - 2 * clamp(10px,3vw,40px) - 42px) * .7071),calc(100vw - 2 * clamp(10px,3vw,40px)))}
.win.about-w{width:min(760px,100%)}
html.in-win .phead h1{display:none}
html.in-win .phead{padding:0}
html.in-win .phead .sub{margin:0;padding:14px 20px;font-size:13px;color:#999;text-align:center}

/* ===== Niente header: logo come sfondo ===== */
:root{--hdr:0px}
.top{display:none!important}
.bg-logo{position:fixed;inset:0;z-index:0;display:grid;place-items:center;pointer-events:none;transition:opacity .6s ease}
.bg-logo .mark{width:min(68vmin,720px);height:auto;opacity:.18}
.bg-logo .mark g{stroke-width:2.6}
html.st-splash .bg-logo{opacity:0}
html.in-win .bg-logo{display:none}
main,.foot{position:relative;z-index:1}
.desk-icons{top:22px}
.collage{margin-top:clamp(30px,4vw,60px)}
.cv-open{align-self:flex-start;margin-top:22px;display:inline-flex;align-items:center;gap:8px;padding:10px 18px;border-radius:30px;background:#fff;color:#000;font-size:13px;font-weight:700;text-decoration:none;transition:background .25s}

.cv-open:hover{background:#71daad}
@media (max-width:700px){
  .collage{height:calc(362 * 1cqw)}
  .art-collage{height:calc(290 * 1cqw)}
  .desk-icons{margin:22px 0 6px}
  .bg-logo .mark{width:82vmin}
}

/* Copertine sempre accese: al passaggio solo un leggero ingrandimento */
.collage:hover .tile:not(:hover) .cover,.collage:hover .tile:not(:hover) .about-card,
.art-collage:hover .tile:not(:hover) .art-item,.grid:hover .cover:not(:hover){filter:none}
.tile:hover .cover,.tile .cover:focus-visible,.tile.artwork:hover .art-item{transform:scale(1.07)}

/* ===== Tre sezioni affiancate ===== */
html:has(.panels),html:has(.panels) body{height:100%;overflow:hidden}
html:has(.panels) body{padding-bottom:0}
html:has(.panels) .foot{display:none}
.panels{position:fixed;inset:0;z-index:1;overflow:hidden}
.panel{position:absolute;inset:0;visibility:hidden;width:100vw;height:100%;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;padding-bottom:110px;scrollbar-width:none}
.panel::-webkit-scrollbar{display:none}
.pcopy{text-align:center;color:#555;font-size:13px;margin:30px 0 0}
@media (min-width:701px){
  .panel .collage{width:min(calc(100% - 300px),1300px);margin:clamp(30px,4vw,56px) auto 0;height:calc(90 * 1cqw)}
  .panel .art-collage{height:calc(68 * 1cqw)}
}
/* cartelle sui bordi (computer) */
.side-nav{position:fixed;inset:0;pointer-events:none;z-index:56}
.side{position:absolute;top:50%;transform:translateY(-50%);display:flex;flex-direction:column;align-items:center;gap:7px;width:110px;padding:10px 0;border:0;background:none;color:#fff;cursor:pointer;pointer-events:auto;font:inherit;transition:opacity .4s,transform .4s}
.side.left{left:14px}.side.right{right:14px}
.side[hidden]{display:flex!important;opacity:0;pointer-events:none}
.side.left[hidden]{transform:translate(-30px,-50%)}.side.right[hidden]{transform:translate(30px,-50%)}
.side:hover .dimg{transform:translateY(-3px)}
.side:hover .dlab,.side:focus-visible .dlab{background:#2563eb;text-shadow:none}
.side .dimg.photo img,.tabs .dimg.photo img{width:100%;height:100%;object-fit:cover}
/* icone in alto (telefono) */
.tabs{display:none}
/* About come sezione */
.about-panel{min-height:100%;display:grid;place-items:center;padding:60px max(150px,8vw) 40px}
.about-panel .about-body{width:min(900px,100%);border:1px solid rgba(255,255,255,.12);border-radius:14px;overflow:hidden;box-shadow:0 40px 100px -30px rgba(0,0,0,1)}
.about-panel .about-text h2,.about-panel .about-text p{font-size:17px}
@media (max-width:700px){
  .side-nav{display:none}
  .tabs{display:flex;position:fixed;top:0;left:0;right:0;z-index:56;justify-content:center;gap:22px;padding:12px 0 10px;background:linear-gradient(#000 60%,rgba(0,0,0,0))}
  .tabs button[data-go]{display:flex;flex-direction:column;align-items:center;gap:5px;border:0;background:none;color:#fff;font:inherit;padding:0;cursor:pointer;opacity:.55;transition:opacity .3s}
  .tabs button[data-go].on{opacity:1}
  .tabs button[data-go].on .dlab{background:#2563eb;text-shadow:none}
  .tabs .dimg{width:44px;height:40px}
  .tabs .dimg.photo{width:40px;height:40px}
  .tabs .dlab{font-size:11px}
  .panel{padding-top:92px}
  .panel .collage{margin-top:6px}
  .about-panel{padding:10px 16px 30px;place-items:start center}
  .about-panel .about-text h2,.about-panel .about-text p{font-size:15px}
}

/* ===== Finestre: solo il pallino rosso, più grande ===== */
.win-dots i{display:none}
.win-dots .red{width:15px;height:15px}
.win-dots .red::before,.win-dots .red::after{display:none}
.win-dots .red:hover{filter:brightness(1.1)}
@media (max-width:640px){
  .win-bar{height:50px}
  .win-dots .red{width:22px;height:22px}
}

/* Icone a rotazione (telefono): quella al centro è la sezione corrente */
@media (max-width:700px){
  .tabs{display:block;height:112px;padding:0;gap:0}
  .tabs button[data-go]{position:absolute;left:50%;top:14px;width:96px;transform:translateX(-50%);transition:transform .55s cubic-bezier(.65,0,.35,1),opacity .55s;opacity:.5}
  .tabs button[data-go].pos-l{transform:translateX(calc(-50% - 112px)) scale(.82)}
  .tabs button[data-go].pos-r{transform:translateX(calc(-50% + 112px)) scale(.82)}
  .tabs button[data-go].pos-c{transform:translateX(-50%) scale(1.3);opacity:1;z-index:2;top:20px}
  .tabs button[data-go].pos-c .dlab{background:#2563eb;text-shadow:none}
  .tabs button[data-go].on .dlab{background:none}
  .tabs button[data-go].pos-c.on .dlab{background:#2563eb}
  .panel{padding-top:122px}
}

/* Frecce che suggeriscono lo scorrimento */
.side{position:absolute}
.side .chev{position:absolute;top:22px;width:14px;height:28px;fill:none;stroke:#fff;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round;opacity:.65}
.side.left .chev{left:-6px;animation:nudge-l 2.2s ease-in-out infinite}
.side.right .chev{right:-6px;animation:nudge-r 2.2s ease-in-out infinite}
.side:hover .chev{opacity:1}
@keyframes nudge-l{50%{transform:translateX(-5px)}}
@keyframes nudge-r{50%{transform:translateX(5px)}}
.tchev{display:none}
@media (max-width:700px){
  .tchev{display:block;position:absolute;top:30px;width:12px;height:24px;opacity:.5}
  .tchev svg{width:100%;height:100%;fill:none;stroke:#fff;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
  .tchev.l{left:12px;animation:nudge-l 2.2s ease-in-out infinite}
  .tchev.r{right:12px;animation:nudge-r 2.2s ease-in-out infinite}
}

.panel.cur,.panel.moving{visibility:visible}
@media (max-width:640px){
  .dock{bottom:12px;gap:8px;height:66px;padding:9px 10px;border-radius:20px}
  .dock-item{width:48px;height:48px}
  .dock .ico{border-radius:12px}
  body,.panel{padding-bottom:96px}
}

/* Cursore più piccolo e copertine che "si aprono" */
@media (hover:hover) and (pointer:fine){
  .cursor.label{width:72px;height:72px;margin:-36px 0 0 -36px}
  .cursor span{font-size:12px;padding:0 6px}
}
.tile:hover .cover,.tile .cover:focus-visible,.tile.artwork:hover .art-item{transform:scale(1.24)}
/* freccette cliccabili (telefono) */
.tchev{border:0;background:none;padding:0;cursor:pointer;color:#fff}
@media (max-width:700px){
  .tchev{top:22px;width:40px;height:44px;display:grid;place-items:center;opacity:.6}
  .tchev svg{width:12px;height:24px}
  .tchev.l{left:2px}.tchev.r{right:2px}
}
@media (max-width:640px){.totop{bottom:94px!important}}

.dimg .fb,.dimg .ff{fill:none}

/* fine animazione: niente dissolvenza della pagina né del logo */
html.splashed body{animation:none}
html.splashed .bg-logo{transition:none}

/* Copertine che galleggiano (telefono e computer) */
@keyframes float{0%,100%{translate:0 0}50%{translate:0 -9px}}
.tile.in .cover,.tile.in .art-item{animation:float 4.2s ease-in-out infinite}
.tile:nth-child(3n) .cover,.tile:nth-child(3n) .art-item{animation-duration:5.1s;animation-delay:-1.3s}
.tile:nth-child(3n+1) .cover,.tile:nth-child(3n+1) .art-item{animation-duration:3.6s;animation-delay:-2.4s}
.tile:nth-child(4n) .cover{animation-duration:4.7s;animation-delay:-.6s}
.tile.dragging .cover,.tile.dragging .art-item{animation-play-state:paused}
@media (prefers-reduced-motion:reduce){.tile .cover,.tile .art-item{animation:none!important}}
.win.fit .win-art img[alt*="CV"]{background:#fff}

/* invito a scorrere nelle finestre dei progetti */
.scroll-hint{position:absolute;left:50%;bottom:22px;z-index:3;display:flex;align-items:center;gap:7px;padding:9px 14px 9px 18px;border:0;border-radius:999px;background:rgba(18,18,18,.78);-webkit-backdrop-filter:blur(12px);backdrop-filter:blur(12px);box-shadow:0 6px 24px rgba(0,0,0,.4),inset 0 0 0 1px rgba(255,255,255,.12);color:#fff;font:500 13px/1 Montserrat,sans-serif;letter-spacing:.06em;cursor:pointer;opacity:0;pointer-events:none;transform:translate(-50%,10px);transition:opacity .4s,transform .4s}
.scroll-hint.show{opacity:1;pointer-events:auto;transform:translate(-50%,0)}
.scroll-hint svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:2;animation:hint-bob 1.4s ease-in-out infinite}
.scroll-hint:hover{background:rgba(40,40,40,.9)}
@keyframes hint-bob{0%,100%{transform:translateY(-2px)}50%{transform:translateY(3px)}}
@media (prefers-reduced-motion:reduce){.scroll-hint svg{animation:none}}
