/* whybim.it — pagina "coming soon" v1.4, ricavata dal prototipo whybim v0.45 (solo intro e hero) */
@font-face{font-family:'Outfit';font-style:normal;font-display:swap;font-weight:100 800;src:url(../fonts/outfit-latin-wght-normal.woff2) format('woff2-variations'),url(../fonts/outfit-latin-wght-normal.woff2) format('woff2')}
:root{
  --black:#000000;
  --anthracite:#0a0d10;
  --white:#eef2f5;
  --text:#d9dfe5;
  --muted:#7e8894;
  --hair:rgba(238,242,245,.10);
  --logo:#f2f4f6;            /* v0.39: colore del logo vettoriale */
  --accent:#eef2f5;          /* v0.18: niente colori, accenti in bianco (solo il grafo animato resta colorato) */
  --font:'Outfit', 'Avenir Next', 'Segoe UI', system-ui, sans-serif;
  --gutter:clamp(20px, 3.4vw, 56px);
  --ease:cubic-bezier(.2,.7,.15,1);
}
:root.light{--black:#f5f5f7;--anthracite:#e8e8ed;--white:#1d1d1f;--text:#333336;--muted:#6e6e73;--hair:rgba(29,29,31,0.115);--logo:#1d1d1f;--accent:#1d1d1f}
*{box-sizing:border-box}
html{scroll-behavior:smooth;-webkit-text-size-adjust:100%}
html,body{margin:0;background:var(--black);color:var(--text);font-family:var(--font);}
body{min-height:100vh;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;}
body.is-intro{overflow:hidden;height:100vh}
a{color:inherit}
:focus-visible{outline:1.5px solid var(--accent);outline-offset:4px;border-radius:2px}

/* ---------- fondo + canvas del grafo ---------- */
.tone{
  position:fixed;inset:0;z-index:0;pointer-events:none;
  background:radial-gradient(110% 85% at 50% 46%, #0d1115 0%, #06080a 48%, #000 100%);
  opacity:0;transition:opacity 2.6s ease .25s;
}
:where(html.light) .tone{background:#f5f5f7}
body.is-started .tone{opacity:1}
#graph{position:fixed;inset:0;width:100%;height:100%;display:block;z-index:1;transition:opacity .45s ease}
body.is-skipping #graph{opacity:0}

/* ---------- logo che si forma dai nodi ---------- */
.stage{
  position:fixed;left:50%;top:50%;z-index:2;pointer-events:none;
  transform:translate(-50%,-50%);
}
.stage svg{display:block;width:100%;height:100%;overflow:visible}
.stage .sym,.stage .word{opacity:0;will-change:opacity}

/* ---------- header ---------- */
.site-header{
  position:fixed;top:0;left:0;right:0;z-index:20;
  display:flex;align-items:center;justify-content:space-between;
  padding:calc(env(safe-area-inset-top) + clamp(18px,2.6vw,34px)) var(--gutter) 18px;
  background:linear-gradient(to bottom, rgba(0,0,0,.72), rgba(0,0,0,.35) 60%, rgba(0,0,0,0));
  opacity:0;transform:translateY(-10px);
  transition:opacity 1.2s var(--ease), transform 1.2s var(--ease);
}
:where(html.light) .site-header{background:linear-gradient(to bottom, rgba(245,245,247,.96), rgba(245,245,247,.51) 60%, rgba(245,245,247,0))}
body.is-ready .site-header{opacity:1;transform:none}
.brand{display:inline-flex;align-items:center;gap:12px;text-decoration:none;color:var(--white)}
.brand svg{width:auto;display:block}
.brand #brand-logo{height:62px;width:auto}
/* ---------- hero ---------- */
.hero{position:relative;z-index:21;height:100vh;height:100svh;min-height:520px;pointer-events:none}
.hero-claim{
  position:absolute;left:var(--gutter);right:var(--gutter);bottom:calc(env(safe-area-inset-bottom) + clamp(40px,9vh,110px));
  display:flex;align-items:flex-end;justify-content:space-between;gap:40px;
}
.claim{
  margin:0;color:var(--white);
  font-weight:100;font-size:clamp(34px,5.2vw,84px);line-height:1.04;letter-spacing:-.01em;
  opacity:0;transform:translateY(18px);
  transition:opacity 1.4s var(--ease) .35s, transform 1.4s var(--ease) .35s;
}
.claim .row{display:flex;align-items:baseline}
.claim .ini{font-weight:200;color:var(--accent)}
.claim .swap{display:inline-grid}
.claim .swap>span{grid-area:1/1;transition:opacity .7s var(--ease), transform .7s var(--ease)}
.claim .swap>span:last-child{opacity:0;transform:translateY(.38em)}
.claim .row.alt .swap>span:first-child{opacity:0;transform:translateY(-.38em)}
.claim .row.alt .swap>span:last-child{opacity:1;transform:none}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.brand{perspective:400px}
.brand #brand-logo{transition:transform .6s var(--ease)}
.brand:hover #brand-logo{transform:rotateY(-18deg) rotateX(8deg) translateZ(10px)}
/* ---------- v0.16: la scritta bim nasce sotto il logo durante l'intro e poi si aggancia accanto al logo in alto a sinistra ---------- */
/* niente inclinazione 3D: solo le parole che cambiano */
.claim-dock{position:fixed;left:0;top:0;z-index:22;pointer-events:none;opacity:0;transition:opacity .6s ease}
.claim-dock.is-on{opacity:1}
.claim-dock .claim{opacity:1;transform:none;margin:0;font-weight:200;line-height:1.04;text-shadow:0 0 18px rgba(0,0,0,.9),0 0 4px rgba(0,0,0,.8)}
:where(html.light) .claim-dock .claim{text-shadow:0 0 18px rgba(245,245,247,.95),0 0 4px rgba(245,245,247,.9)}
.claim-dock.is-row .claim{display:flex;gap:.42em;justify-content:center;font-size:clamp(18px,2.1vw,34px);font-weight:200;letter-spacing:.01em}
.claim-dock.is-row .claim .row{opacity:0;transition:opacity .9s ease}
.claim-dock.is-row.is-lit .claim .row{opacity:1}
.claim-dock.is-docked .claim{display:block;font-weight:100}
.claim-dock.is-docked .claim .row{display:flex;opacity:1}
.claim .row{will-change:transform}
.claim-dots{position:fixed;inset:0;width:100%;height:100%;z-index:3;pointer-events:none}
/* intro: il logo dell'header compare al centro, sopra il logo di punti, e vola nell'angolo */
body.is-docking .site-header{opacity:1;transform:none;background:none;transition:none}
#brand-logo.is-flying{transform-origin:0 0;will-change:transform}
/* ---------- v0.16: claim dell'hero ---------- */
.why{max-width:min(880px,100%);color:var(--white)}
.why-h{margin:0;font-weight:100;font-size:clamp(64px,10.5vw,176px);line-height:.9;letter-spacing:-.035em;display:flex;align-items:baseline;gap:.22em;flex-wrap:wrap}
.why-h .w,.why-h .b{display:inline-block;overflow:hidden;padding-bottom:.06em}
.why-h .b{padding:.12em .2em .06em 0;margin:-.12em -.2em 0 0} /* v0.20: spazio per l'oscillazione del punto di domanda */
.why-h .w>span,.why-h .b>span{display:inline-block;transform:translateY(105%);transition:transform 1.3s var(--ease)}
.why-h .b>span{transition-delay:.18s;font-weight:200;color:var(--accent)}
.why-h .q{display:inline-block;transform-origin:50% 90%}
.why-rule{display:block;height:1px;width:clamp(120px,22vw,320px);margin:clamp(18px,2.6vh,30px) 0 clamp(16px,2.2vh,26px);background:linear-gradient(90deg,var(--accent),rgba(238,242,245,0));transform:scaleX(0);transform-origin:left;transition:transform 1.4s var(--ease) .55s}
:where(html.light) .why-rule{background:linear-gradient(90deg,var(--accent),rgba(29,29,31,0.000))}
.why-t{margin:0;font-weight:200;font-size:clamp(20px,2.15vw,34px);line-height:1.25;letter-spacing:-.005em;color:#c9d0d7}
:where(html.light) .why-t{color:#424245}
.why-t .ln{display:block;overflow:hidden}
.why-t .ln>span{display:inline-block;transform:translateY(110%);opacity:0;transition:transform 1.1s var(--ease), opacity 1.1s ease}
.why-t .ln:nth-child(1)>span{transition-delay:.7s}.why-t .ln:nth-child(2)>span{transition-delay:.85s}.why-t .ln:nth-child(3)>span{transition-delay:1.15s}
.why-t .ln.hi>span{color:var(--white);font-weight:300}
.why-t .ln.hi em{font-style:normal;color:var(--accent)}
body.is-ready .why-h .w>span,body.is-ready .why-h .b>span,body.is-ready .why-t .ln>span{transform:none;opacity:1}
body.is-ready .why-rule{transform:none}
@media (prefers-reduced-motion: reduce){
  .why-h .w>span,.why-h .b>span,.why-t .ln>span,.why-rule{transform:none!important;opacity:1!important;transition:none}
}

/* ---------- salta intro ---------- */

.skip{
  position:fixed;right:var(--gutter);bottom:calc(env(safe-area-inset-bottom) + 22px);z-index:25;
  appearance:none;border:0;background:none;padding:10px 0;cursor:pointer;
  font:350 13px/1 var(--font);letter-spacing:.02em;color:#5f6873;
  opacity:0;transition:opacity .8s ease, color .3s ease;
}
:where(html.light) .skip{color:#86868b}
.skip:hover{color:var(--white)}
body.is-started .skip{opacity:1}
body.is-ready .skip{opacity:0;pointer-events:none}
/* ---------- senza WebGL / movimento ridotto ---------- */
body.no-webgl .stage .sym, body.no-webgl .stage .word{opacity:1}
@media (prefers-reduced-motion: reduce){
  .claim .swap>span{transform:none!important;transition:opacity .4s ease}
  html{scroll-behavior:auto}
  .site-header,.claim,.soon,.tone{transition:none}
  .soon-k i{animation:none}
}

/* ---------- v0.39: velo dietro al claim dell'hero (stesso effetto di Metodo e Progetti) ---------- */
.hero::before{
  content:"";position:absolute;inset:clamp(96px,14vh,140px) 0 0 0;pointer-events:none; /* parte sotto l'header: l'hero sta sopra l'header e non deve velare il logo */
  -webkit-mask-image:linear-gradient(to bottom, transparent 0, #000 22%);mask-image:linear-gradient(to bottom, transparent 0, #000 22%);
  background:linear-gradient(90deg, rgba(0,0,0,.7) 0, rgba(0,0,0,.52) 36%, rgba(0,0,0,0) 62%);
  opacity:0;transition:opacity 1.6s ease .4s;
}
:where(html.light) .hero::before{background:linear-gradient(90deg, rgba(245,245,247,.96) 0, rgba(245,245,247,.75) 36%, rgba(245,245,247,0) 62%)}
body.is-ready .hero::before{opacity:1}
@media (max-width: 860px){
  .hero::before{background:linear-gradient(0deg, rgba(0,0,0,.7) 0, rgba(0,0,0,.52) 45%, rgba(0,0,0,0) 80%)}
:where(html.light) .hero::before{background:linear-gradient(0deg, rgba(245,245,247,.96) 0, rgba(245,245,247,.75) 45%, rgba(245,245,247,0) 80%)}
}
[hidden]{display:none!important}
#brand-logo,.stage svg{color:var(--logo)}
/* ---------- v0.39: interruttore tema nero / bianco ---------- */
.brand{margin-right:auto}
.theme-toggle{
  appearance:none;cursor:pointer;position:relative;z-index:31;flex:none;
  width:54px;height:28px;margin:0 0 0 clamp(20px,2.6vw,44px);padding:0;
  border:1px solid rgba(238,242,245,.32);border-radius:999px;background:transparent;color:var(--white);
  transition:opacity 1s ease, border-color .3s ease;
}
:where(html.light) .theme-toggle{border:1px solid rgba(29,29,31,0.368)}
.theme-toggle:hover{border-color:var(--white)}
.theme-toggle:focus-visible{outline-offset:3px;border-radius:999px}
.theme-toggle .tt-knob{position:absolute;top:3px;left:3px;width:20px;height:20px;border-radius:50%;background:var(--white);transition:transform .45s var(--ease)}
.theme-toggle svg{position:absolute;top:6px;width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round;transition:color .45s ease, opacity .45s ease}
.theme-toggle .tt-moon{left:6px;color:var(--black)}
.theme-toggle .tt-sun{right:6px;color:var(--muted)}
html.light .theme-toggle .tt-knob{transform:translateX(26px)}
html.light .theme-toggle .tt-moon{color:var(--muted)}
html.light .theme-toggle .tt-sun{color:var(--black)}
body:not(.is-ready) .theme-toggle{opacity:0;pointer-events:none}
@media (max-width: 860px){
  .theme-toggle{order:2;margin:0 12px 0 0}
}
/* cambio tema: dissolvenza (browser con View Transitions) */
::view-transition-old(root),::view-transition-new(root){animation-duration:.6s;animation-timing-function:ease}
@media (prefers-reduced-motion: reduce){.brand:hover #brand-logo{transform:none!important}}
@media (max-width: 860px){
  .brand #brand-logo{height:48px}
  .hero-claim{flex-direction:column;align-items:flex-start;gap:28px}
}

/* ---------- coming soon (accanto al claim, in basso a destra; sotto al claim su mobile) ---------- */
.soon{
  pointer-events:auto;flex:none;max-width:360px;text-align:right;
  opacity:0;transform:translateY(14px);
  transition:opacity 1.2s var(--ease) 1.5s, transform 1.2s var(--ease) 1.5s;
}
body.is-ready .soon{opacity:1;transform:none}
/* velo dietro al "coming soon": stesso principio del velo a sinistra (pieno sul bordo, sfuma verso il centro e verso l'alto) */
.hero::after{
  content:"";position:absolute;z-index:-1;right:0;bottom:0;width:min(900px,58vw);height:min(620px,72vh);pointer-events:none;
  -webkit-mask-image:linear-gradient(to bottom, transparent 0, #000 42%);mask-image:linear-gradient(to bottom, transparent 0, #000 42%);
  background:linear-gradient(270deg, rgba(0,0,0,.88) 0, rgba(0,0,0,.74) 38%, rgba(0,0,0,0) 82%);
  opacity:0;transition:opacity 1.6s ease 1.5s;
}
:where(html.light) .hero::after{background:linear-gradient(270deg, rgba(245,245,247,.97) 0, rgba(245,245,247,.86) 38%, rgba(245,245,247,0) 82%)}
body.is-ready .hero::after{opacity:1}
.soon-k{display:inline-flex;align-items:center;gap:12px;margin:0 0 16px;font-size:13px;font-weight:350;letter-spacing:.08em;text-transform:uppercase;color:var(--muted)}
.soon-k i{display:block;width:7px;height:7px;border-radius:50%;background:var(--accent);animation:soon 2.4s ease-in-out infinite}
@keyframes soon{0%,100%{opacity:.25;transform:scale(.8)}50%{opacity:1;transform:scale(1)}}
.soon-t{margin:0 0 14px;font-weight:200;font-size:clamp(20px,1.7vw,28px);line-height:1.25;letter-spacing:-.005em;color:var(--white)}
.soon-m{display:inline-block;padding:4px 0 5px;font-size:15px;font-weight:300;letter-spacing:.01em;color:#aab3bd;text-decoration:none;border-bottom:1px solid rgba(238,242,245,.22);transition:color .3s ease, border-color .3s ease}
.soon-m:hover,.soon-m:focus-visible{color:var(--white);border-bottom-color:var(--accent)}
.soon-m span{color:var(--muted);margin-right:.45em}
:where(html.light) .soon-m{color:#515154;border-bottom-color:rgba(29,29,31,.22)}
@media (max-width: 860px){
  .hero::after{display:none}
  .soon{text-align:left;max-width:none}
  .soon-k{margin-bottom:10px}
  .soon-t{margin-bottom:10px}
}
@media (max-height: 560px) and (orientation: landscape){
  .why-t{font-size:18px}
}

