@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Space+Grotesk:wght@400;500;600;700&display=swap');
:root{--bg:#0b1118;--card:#141f29;--line:#2c3d48;--text:#eaf3f0;--dim:#a4b5b7;--mint:#7aefc4;--orange:#edb982}*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;background:var(--bg);color:var(--text);font-family:'DM Sans',sans-serif}a{color:inherit;text-decoration:none}button{font:inherit;cursor:pointer}.nav{height:78px;position:absolute;inset:0 0 auto;z-index:20;display:flex;align-items:center;justify-content:space-between;padding:0 clamp(22px,5vw,92px);border-bottom:1px solid #ffffff16}.logo{font:700 23px 'Space Grotesk',sans-serif;letter-spacing:-1px}.logo span{color:var(--mint)}.logo i{color:var(--mint);font-style:normal;animation:blink 1.1s steps(1) infinite}@keyframes blink{50%{opacity:0}}nav{display:flex;gap:36px;font-size:13px}nav a{color:#c6d5d1;transition:color .2s}nav a:hover,.inline-link:hover{color:var(--mint)}.navmenu{display:none;background:none;border:0;color:#fff;font-size:27px}.home{overflow:hidden}.home main{height:100svh;min-height:650px;position:relative}#scene{position:absolute;inset:0;background:radial-gradient(ellipse at 50% 47%,#1d3034 0%,#101820 48%,#070b10 100%)}#scene canvas{display:block;width:100%;height:100%;touch-action:pan-y}.vignette{position:absolute;inset:0;background:linear-gradient(90deg,#080e18a9 0%,transparent 55%),linear-gradient(0deg,#050a10c9 0%,transparent 28%);pointer-events:none}.boot{position:absolute;left:clamp(24px,8vw,140px);top:50%;transform:translateY(-38%);z-index:4;max-width:620px}.eyebrow{text-transform:uppercase;color:var(--mint);letter-spacing:.21em;font-size:10px;font-weight:700}.boot h1{font:700 clamp(58px,7vw,116px)/.97 'Space Grotesk',sans-serif;letter-spacing:-.075em;margin:26px 0}.boot h1 em{font-style:normal;color:var(--mint)}.boot p{color:#c4d0ce;max-width:340px;line-height:1.65;font-size:15px}.button{display:inline-flex;align-items:center;justify-content:space-between;gap:52px;background:var(--mint);color:#071c19;border:0;border-radius:4px;font-weight:700;padding:17px 20px;margin-top:24px;transition:transform .2s,background .2s}.button:hover{transform:translateY(-3px);background:#a1ffdb}.boot small{display:block;color:#87959c;margin-top:26px;font-size:10px;letter-spacing:.07em}.hidden{display:none!important}.lab-ui{pointer-events:none;position:absolute;inset:0;z-index:5}.lab-ui button,.lab-ui a{pointer-events:auto}.section-top{position:absolute;top:110px;left:clamp(24px,5vw,92px)}.section-top p{font-size:12px;color:#bac7c4}.spotlight{position:absolute;bottom:118px;left:clamp(24px,5vw,92px);max-width:405px}.spotlight>span{color:var(--mint);font-size:11px;letter-spacing:.15em}.spotlight h2{font:600 clamp(32px,3.8vw,54px)/1.03 'Space Grotesk',sans-serif;letter-spacing:-.05em;margin:12px 0}.spotlight p{line-height:1.6;color:#c8d3d1;font-size:13px;max-width:330px}.inline-link{display:inline-block;margin-top:14px;font-weight:700;font-size:13px;border-bottom:1px solid var(--mint);padding-bottom:8px}.lab-controls{position:absolute;bottom:55px;right:clamp(24px,5vw,92px);display:flex;align-items:center;gap:19px}.lab-controls button{width:42px;height:42px;background:#101d23cf;color:var(--text);border:1px solid #69867c77;border-radius:50%;font-size:22px}.lab-controls button:hover{background:#2b4744}.dots{display:flex;gap:8px}.dots button{height:6px;width:6px;border:0;background:#a7ada8;border-radius:99px;padding:0}.dots button.active{width:25px;background:var(--mint)}.bottom-hint{position:absolute;bottom:44px;left:clamp(24px,5vw,92px);color:#819497;font-size:9px;letter-spacing:.13em}.inner{background:radial-gradient(circle at 75% 0%,#173139,transparent 40%),var(--bg);min-height:100vh}.inner .nav{position:relative}.page{max-width:1150px;padding:95px 28px 120px;margin:auto}.page-hero{max-width:900px}.page h1{font:700 clamp(45px,7vw,88px)/1.03 'Space Grotesk',sans-serif;letter-spacing:-.065em;margin:24px 0}.page h1 em{font-style:normal;color:var(--mint)}.lead{color:#afc3c2;line-height:1.7;font-size:clamp(16px,2vw,20px);max-width:730px}.grid{display:grid;grid-template-columns:repeat(2,1fr);gap:18px;margin-top:65px}.tile{background:#17242ce8;border:1px solid var(--line);padding:32px;border-radius:12px;min-height:270px;transition:transform .2s,border-color .2s}.tile:hover{transform:translateY(-4px);border-color:#62bd9e}.tile .num{font-size:11px;color:var(--mint);letter-spacing:.2em}.tile h2{font:600 30px 'Space Grotesk',sans-serif;letter-spacing:-.045em;margin:28px 0 12px}.tile p{color:#acbfc0;line-height:1.7;font-size:14px}.pillrow{display:flex;flex-wrap:wrap;gap:8px;margin-top:20px}.pill{font-size:11px;border:1px solid #446066;padding:7px 10px;border-radius:99px;color:#d1dfdc}.foot{border-top:1px solid #2a3e44;padding:30px clamp(22px,5vw,92px);display:flex;justify-content:space-between;color:#91a9a9;font-size:12px}.foot a{color:var(--mint)}.project-label{color:var(--orange);font-size:11px;letter-spacing:.15em}.contact-link{font:600 clamp(28px,5vw,65px) 'Space Grotesk',sans-serif;letter-spacing:-.055em;border-bottom:2px solid var(--mint);display:inline-block;padding:20px 0}.notice{font-size:12px;color:#91a9a9;margin-top:25px}@media(max-width:740px){.nav{height:66px}.navmenu{display:block}nav{display:none;position:absolute;right:15px;top:67px;background:#111f28;border:1px solid #34505b;border-radius:10px;flex-direction:column;padding:24px;min-width:180px}nav.open{display:flex}.home main{min-height:570px}.boot{top:45%;left:25px;transform:translateY(-25%)}.boot h1{font-size:57px}.boot p{font-size:13px}.boot small{max-width:240px}.section-top{top:83px}.spotlight{bottom:125px;max-width:260px}.spotlight h2{font-size:33px}.spotlight p{font-size:12px}.lab-controls{bottom:37px}.bottom-hint{display:none}.grid{grid-template-columns:1fr}.page{padding-top:70px}.tile{min-height:230px}.foot{gap:15px;flex-direction:column}}

/* VirtualTag signature: reference to the attribution used on Lavermicocca */
.signature{display:inline-flex;align-items:center;gap:9px;text-decoration:none;color:var(--text);white-space:nowrap}.signature .signed{font:500 10px/1.4 monospace;color:var(--mint);opacity:.85}.signature strong{font:600 14px 'Space Grotesk',sans-serif;letter-spacing:-.02em}.signature .cursor{color:var(--mint);animation:blink 1.1s steps(1) infinite}.signature:hover strong{color:var(--mint)}
.cta-band{border-top:1px solid var(--line);margin-top:78px;padding:52px 0 15px}.cta-band h2{font:600 clamp(34px,5vw,55px)/1.1 'Space Grotesk',sans-serif;letter-spacing:-.045em;margin:12px 0 2px}.cta-band .button{gap:45px}.home-secondary{display:block;margin-top:22px;font-size:13px;font-weight:600;color:#dceae5;text-decoration:underline;text-decoration-color:var(--mint);text-underline-offset:7px}.home-secondary:hover{color:var(--mint)}.noscript{position:absolute;top:120px;left:5%;z-index:10}.contact-phone{margin-top:24px;font-size:17px;color:var(--dim)}.contact-phone a:hover{color:var(--mint)}.project{min-height:280px}.home .foot{position:absolute;bottom:0;width:100%;z-index:9;background:linear-gradient(0deg,#071018e8,#07101800);border:0;padding-top:18px;padding-bottom:15px}.home .bottom-hint{bottom:80px}.home .lab-controls{bottom:85px}.home .spotlight{bottom:154px}.home .boot{transform:translateY(-48%)}
@media(max-width:740px){.home .foot{font-size:10px;flex-direction:row;align-items:center;gap:10px;flex-wrap:wrap}.signature{white-space:normal;gap:5px;flex-wrap:wrap}.signature .signed{font-size:9px}.signature strong{font-size:12px}.home .spotlight{bottom:142px}.home .lab-controls{bottom:65px}.home .boot{top:42%}.foot{align-items:flex-start}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation-duration:.01ms!important;transition-duration:.01ms!important;scroll-behavior:auto!important}}

/* Graceful non-WebGL state: controls remain functional independently of Three.js */
.scene-fallback{position:absolute;inset:12% 10% 13% 28%;display:grid;place-items:center;perspective:800px;pointer-events:none;background:radial-gradient(ellipse,#183d3f 0%,#0a141b 65%,transparent 78%)}.fallback-display{font:700 clamp(17px,3vw,35px) monospace;color:#7aefc4;letter-spacing:.12em;padding:55px 25px;border:22px solid #a19e8d;border-radius:12px;background:#06271f;box-shadow:0 40px 0 -12px #868679,0 50px 100px #000;transform:rotateY(-12deg)}.has-webgl .scene-fallback{display:none}.sr-only{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}.home .spotlight{max-width:440px}.home .lab-controls{z-index:10}.home .lab-ui{z-index:10}.tile{scroll-margin-top:95px}.tile h2{overflow-wrap:anywhere}@media(max-width:740px){.scene-fallback{inset:10% 3% 25% 6%;opacity:.5}.fallback-display{border-width:12px;padding:32px 10px}.home .lab-controls{bottom:78px;right:16px}.home .spotlight{bottom:160px}.home .spotlight h2{font-size:29px}.home .foot{background:#08151de8}}

/* VirtualTag v4: hero and footer layout rebuilt to avoid overlap and clipping */
.home{overflow-x:hidden;overflow-y:auto;min-height:100svh;display:flex;flex-direction:column}
.home main{height:auto;min-height:calc(100svh - 102px);flex:1;overflow:hidden}
.home .nav{position:relative;flex:0 0 78px;background:#091218;z-index:30}
.home .foot{position:relative;bottom:auto;width:100%;z-index:12;background:#07141b;border-top:1px solid #29443f;min-height:102px;padding:22px clamp(24px,5vw,92px);align-items:center;gap:20px;flex-wrap:wrap}
.footer-nav{display:flex;gap:22px}.footer-nav a{color:#c1d4ce}.footer-nav a:hover{color:var(--mint)}
.signature{white-space:normal;flex-wrap:wrap}.signature .signed{font-size:11px}
.home .boot{top:46%;left:clamp(24px,6vw,95px);transform:translateY(-45%);max-width:min(480px,43vw)}
.home .boot h1{font-size:clamp(55px,6.4vw,102px);margin:24px 0 20px}
.home .boot p{max-width:390px;font-size:15px;text-shadow:0 2px 8px #071119}
.hero-actions{display:flex;align-items:center;gap:clamp(22px,3vw,50px);flex-wrap:wrap;margin-top:30px}
.hero-actions .button{margin:0;gap:28px;flex-shrink:0}.hero-actions .home-secondary{display:inline-block;margin:0;white-space:nowrap}
.home .vignette{background:linear-gradient(90deg,#071119ed 0%,#071119c9 27%,#07111950 50%,transparent 78%),linear-gradient(0deg,#050b11bd,transparent 27%)}
.home .lab-controls{bottom:48px}.home .spotlight{bottom:116px}.home .bottom-hint{bottom:38px}
.scene-fallback{background:radial-gradient(ellipse at center,#21494a,#0a151b 60%,transparent 75%)}
.scene-fallback::after{content:'';display:block;width:210px;height:145px;border:16px solid #b8b5a8;border-radius:18px;background:linear-gradient(125deg,#1a6757,#06201d);box-shadow:0 24px 0 -5px #9c9a87,0 42px 75px #0008;transform:perspective(500px) rotateY(-12deg)}
@media(max-width:940px){.home .boot{max-width:430px}.home .boot h1{font-size:65px}.hero-actions{align-items:flex-start;flex-direction:column;gap:22px}.home .vignette{background:linear-gradient(90deg,#071119ed 0%,#071119b3 50%,transparent 100%),linear-gradient(0deg,#050b11a8,transparent 36%)}}
@media(max-width:740px){.home .nav{flex-basis:66px}.home main{min-height:690px}.home .boot{top:45%;left:25px;max-width:calc(100vw - 50px);transform:translateY(-38%)}.home .boot h1{font-size:clamp(49px,10vw,68px)}.home .boot p{max-width:320px}.home .foot{min-height:140px;padding:22px 24px;gap:17px}.footer-nav{order:3;width:100%;gap:16px}.home .lab-controls{bottom:55px}.home .spotlight{bottom:144px}.home .bottom-hint{display:none}.home .vignette{background:linear-gradient(90deg,#071119e8,#07111984),linear-gradient(0deg,#050b11b5,transparent 40%)}}

/* V5: altezza home vincolata al viewport, footer compatto */
html:has(body.home),body.home{height:100%;overflow:hidden}
body.home{display:grid;grid-template-rows:66px minmax(0,1fr) 68px;min-height:0;height:100svh;height:100dvh;overflow:hidden}
body.home .nav{height:66px;min-height:0;position:relative;flex:none;padding-inline:clamp(18px,4vw,70px)}
body.home main{height:100%;min-height:0;min-width:0;overflow:hidden;flex:none;position:relative}
body.home .foot{height:68px;min-height:0;padding:10px clamp(18px,4vw,70px);margin:0;flex:none;display:flex;flex-wrap:nowrap;justify-content:space-between;gap:16px;background:#08151a;border-top:1px solid #29443f}
body.home .foot .footer-nav{display:none!important}
body.home .signature{display:flex;gap:10px;align-items:center;flex-wrap:wrap;text-align:right}
body.home .signature .signed{font-size:10px}
body.home .signature strong{font-size:12px}
body.home .boot{top:48%;transform:translateY(-50%)}
body.home .boot h1{font-size:clamp(47px,5.8vw,86px);margin:18px 0 14px}
body.home .boot p{font-size:clamp(12px,1.15vw,14px);line-height:1.55}
body.home .hero-actions{margin-top:22px;gap:20px 32px}
body.home .button{padding:14px 18px}
body.home .lab-controls{bottom:24px}
body.home .spotlight{bottom:82px}
body.home .bottom-hint{bottom:22px}
body.home #scene{overflow:hidden}
@media(max-width:740px){
  body.home{grid-template-rows:60px minmax(0,1fr) 63px}
  body.home .nav{height:60px;flex-basis:auto}
  body.home .boot{top:48%;left:20px;max-width:calc(100% - 40px);transform:translateY(-50%)}
  body.home .boot h1{font-size:clamp(42px,10vw,61px)}
  body.home .boot p{max-width:300px}
  body.home .hero-actions{gap:15px;align-items:flex-start}
  body.home .foot{height:63px;min-height:0;font-size:10px;gap:8px;padding:8px 16px}
  body.home .foot>span{max-width:32%;font-size:9px}
  body.home .signature{max-width:65%;justify-content:flex-end;gap:2px}
  body.home .signature .signed{font-size:9px}
  body.home .signature strong{font-size:10px}
  body.home .spotlight{bottom:87px;left:20px;max-width:calc(100% - 40px)}
  body.home .spotlight h2{font-size:clamp(27px,8vw,35px)}
  body.home .lab-controls{bottom:18px}
}
@media(max-height:680px){
  body.home .boot h1{font-size:clamp(40px,5vw,69px);margin:12px 0 10px}
  body.home .boot p{line-height:1.4;margin:10px 0}
  body.home .hero-actions{margin-top:14px}
  body.home .button{padding:11px 14px}
  body.home .spotlight{bottom:68px}
}

/* v6: collegamenti esterni nei progetti */
.project{display:flex;flex-direction:column;align-items:flex-start}
.project .pillrow{margin-bottom:16px}
.project-link{display:inline-flex;align-items:center;gap:8px;margin-top:auto;padding:9px 0;color:var(--mint);font-size:13px;font-weight:700;border-bottom:1px solid rgba(122,239,196,.65);text-decoration:none}
.project-link:hover,.project-link:focus-visible{color:#b9ffdf;border-bottom-color:#b9ffdf}
