/* =========================================================
   Edizioni Gomitolo: quello che non c'è in base.css.
   base.css dà token, pulsanti, hero, bento, libreria, libro 3D, FAQ.
   ========================================================= */

/* Libro 3D: proporzione della copertina per formato (6×9″ = 1.5, 8,5×11″ = 1.294) */
.eg-b3d{height:calc(var(--w) * var(--ar,1.5))}
.eg-chiprow{display:flex;flex-wrap:wrap;gap:6px}
.eg-lib-info .eg-chiprow{align-self:flex-start}
.eg-btn--off{background:var(--soft);color:var(--muted);border:1.5px dashed var(--line);cursor:default;box-shadow:none}
.eg-btn--off::before,.eg-btn--off::after{display:none}
.eg-hero .eg-btn--off,.eg-dark .eg-btn--off{background:rgba(255,255,255,.06);border-color:rgba(255,255,255,.25);color:#C9D2EC}
.eg-text-lg{font-size:19px;line-height:1.65;color:var(--text);margin:14px 0 0}
:root{--tg-ico:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 6.5C10 5 7 4.5 3.5 5v13c3.5-.5 6.5 0 8.5 1.5 2-1.5 5-2 8.5-1.5V5C17 4.5 14 5 12 6.5zM12 6.5v13'/%3E%3C/svg%3E")} /* icona libro sul pulsante dell'header */
.eg-shelf-meta .eg-chip{white-space:nowrap}

/* ---------- Hero della home: i libri al posto dell'orbita ---------- */
.eg-stack{position:relative;width:min(100%,580px);aspect-ratio:1/.86;margin-left:auto;perspective:1600px}
.eg-stack-item{position:absolute;display:block;animation:eg-bob 7s ease-in-out infinite}
.eg-stack-item .eg-b3d{--w:clamp(110px,11.500vw,158px)}
.eg-stack-item:hover{z-index:9!important}
.eg-stack-item:hover .eg-b3d{--ry:-6deg}
.eg-stack-item--1{left:0;top:22%;z-index:1}
.eg-stack-item--2{left:24%;top:8%;z-index:2;animation-delay:-1.800s}
.eg-stack-item--3{left:49%;top:22%;z-index:3;animation-delay:-3.600s}
.eg-stack-item--4{left:73%;top:8%;z-index:4;animation-delay:-5.400s}
.eg-stack .eg-float--a{left:-4%;bottom:0;z-index:6}
.eg-stack .eg-float--b{right:-3%;bottom:10%;top:auto;z-index:6}
.eg-float i{color:var(--brand-ink)}
.eg-float i svg{width:20px;height:20px}

/* ---------- Scheda del libro ---------- */
.eg-bookhero{padding:64px 0 84px}
.eg-bookhero .eg-aurora span:nth-child(1){background:radial-gradient(circle,hsla(var(--h),85%,58%,.800),transparent 65%)}
.eg-bookhero-grid{display:grid;grid-template-columns:minmax(0,.850fr) minmax(0,1.150fr);gap:clamp(30px,6vw,90px);align-items:center}
.eg-bookhero-stage{display:grid;place-items:center;perspective:1500px;padding:20px 0}
.eg-bookhero-stage .eg-b3d{--w:clamp(190px,24vw,320px);--t:34px}
.eg-crumbs{display:flex;gap:10px;font-size:14px;color:#94A2C8;margin:0 0 18px}
.eg-crumbs a{color:#B9C4E2;text-decoration:none}
.eg-crumbs a:hover{color:#fff}
.eg-bookhero .eg-chip{background:rgba(255,255,255,.100);color:#FBD9C8}
.eg-bookhero h1{font-size:clamp(38px,5.200vw,70px);margin:16px 0 18px}
.eg-bookhero .eg-stats{flex-wrap:wrap;gap:22px 40px;margin-top:44px!important}
.eg-bookhero .eg-stats li{max-width:150px;line-height:1.350}
.eg-two{display:grid;grid-template-columns:minmax(0,7fr) minmax(0,5fr);gap:clamp(30px,5vw,72px);align-items:start}
.eg-two--even{grid-template-columns:1fr 1fr}
.eg-two h2{font-size:clamp(30px,3.600vw,44px);line-height:1.050;margin:0 0 18px}
.eg-prose{font-size:18px;line-height:1.750;color:var(--text)}
.eg-prose p{margin:0 0 1.100em}
.eg-prose h2{margin-top:1.500em}
.eg-prose h2:first-child,.eg-prose .eg-eyebrow+h2{margin-top:0}
.eg-inside{padding:32px;border-radius:var(--r-lg);background:#fff;border:1px solid var(--line);box-shadow:var(--shadow);position:sticky;top:110px}
.eg-inside h2{font-size:24px;margin:0 0 18px}
.eg-inside ul{list-style:none;margin:0;padding:0;display:grid;gap:13px}
.eg-inside li{display:flex;gap:12px;line-height:1.500;font-size:15.500px;margin:0}
.eg-inside .eg-ln{flex:0 0 20px;width:20px;height:20px;margin-top:2px;color:var(--brand-ink)}
.eg-inside .eg-logo-img{width:min(100%,260px);height:auto;display:block;margin:0 auto 6px}
.eg-pages{display:flex;gap:24px;overflow-x:auto;scroll-snap-type:x mandatory;padding:12px 6px 30px;scrollbar-width:thin}
.eg-page{flex:0 0 clamp(200px,24vw,290px);scroll-snap-align:start;background:#fff;border-radius:6px;box-shadow:0 2px 4px rgba(8,20,40,.080),0 18px 40px rgba(8,20,40,.140);transition:transform .450s var(--ease);cursor:zoom-in}
.eg-page:nth-child(odd){transform:rotate(-1.200deg)}
.eg-page:nth-child(even){transform:rotate(1deg)}
.eg-page:hover{transform:rotate(0) translateY(-8px)}
.eg-page img{display:block;width:100%;height:auto;border-radius:6px}
.eg-banners{display:grid;gap:22px}
.eg-banners figure{margin:0}
.eg-banners img{display:block;width:100%;height:auto;border-radius:var(--r);box-shadow:var(--shadow)}
.eg-specs{width:100%;border-collapse:separate;border-spacing:0;font-size:16px;background:#fff;border-radius:var(--r);overflow:hidden;border:1px solid var(--line)}
.eg-specs th,.eg-specs td{padding:14px 20px;text-align:left;border:0;border-bottom:1px solid var(--line);vertical-align:top}
.eg-specs tr:last-child th,.eg-specs tr:last-child td{border-bottom:0}
.eg-specs th{width:38%;font-family:var(--font-d);font-weight:700;color:var(--ink)}
.eg-viewer{border:0;padding:0;background:transparent;max-width:100vw;max-height:100vh;width:100vw;height:100vh}
.eg-viewer::backdrop{background:rgba(8,20,40,.920)}
.eg-viewer__in{display:grid;place-items:center;width:100%;height:100%;padding:56px 64px}
.eg-viewer img{max-width:100%;max-height:100%;object-fit:contain;border-radius:6px;background:#fff;box-shadow:0 30px 80px rgba(0,0,0,.500)}
.eg-viewer button{position:absolute;appearance:none;border:0;width:48px;height:48px;border-radius:50%;background:rgba(255,255,255,.140);color:#fff;font-size:26px;line-height:1;cursor:pointer}
.eg-viewer button:hover{background:var(--brand-1)}
.eg-viewer [data-x]{top:14px;right:14px}
.eg-viewer [data-p]{left:10px;top:50%;margin-top:-24px}
.eg-viewer [data-n]{right:10px;top:50%;margin-top:-24px}

/* ---------- Libreria: una scheda sola (Idee regalo) e numeri a 3 colonne ---------- */
.eg-lib--one .eg-lib-grid{grid-template-columns:1fr}
.eg-lib--one .eg-lib-book{grid-template-columns:minmax(260px,.800fr) 1.200fr}
.eg-lib--one .eg-lib-info h3{font-size:clamp(26px,2.800vw,36px)}
.eg-lib--one .eg-lib-pitch{font-size:17px;line-height:1.650}
.eg-stop{scroll-margin-top:110px}
.eg-stop+.eg-stop{margin-top:26px}
.eg-num-grid--3{grid-template-columns:repeat(3,1fr)}
.eg-contacts--3{grid-template-columns:repeat(3,1fr)}
div.eg-contact{cursor:default}

/* ---------- Footer ---------- */
.eg-foot{background:var(--ink);color:#AEB9D8;padding:72px 0 26px;font-size:15.500px;position:relative;overflow:hidden}
.eg-foot::before{content:"";position:absolute;inset:0;background:radial-gradient(700px 360px at 90% 0%,rgba(212,85,45,.280),transparent 60%);pointer-events:none}
.eg-foot>*{position:relative}
.eg-foot__grid{display:grid;grid-template-columns:1.400fr 1.200fr 1fr 1fr;gap:40px}
.eg-foot h2{font-family:var(--font-d);font-size:13px;letter-spacing:.140em;text-transform:uppercase;color:#fff;margin:0 0 16px;font-weight:800}
.eg-foot ul{list-style:none;margin:0;padding:0;display:grid;gap:10px}
.eg-foot li{margin:0}
.eg-foot a{color:#DCE5F7;text-decoration:none}
.eg-foot a:hover{color:#F7B79C}
.eg-foot__brand img{width:220px;height:auto;display:block}
.eg-foot__brand p{margin:18px 0 0;max-width:270px;line-height:1.550}
.eg-foot__legal{margin-top:48px;padding-top:22px;border-top:1px solid rgba(255,255,255,.100);font-size:13.500px;line-height:1.550;color:#7D8AB0}
.eg-foot__legal p{margin:0;max-width:900px}
.ct-footer{background:var(--ink)!important}
.ct-footer .ct-footer-copyright,.ct-footer .ct-footer-copyright a{color:#7D8AB0;font-size:13.500px}

/* ---------- Header: logo ---------- */
#header .site-logo-container img{width:auto;height:52px;max-height:none}

@media (max-width:1000px){
	.eg-two,.eg-two--even,.eg-bookhero-grid{grid-template-columns:1fr}
	.eg-inside{position:static}
	.eg-foot__grid{grid-template-columns:1fr 1fr}
	.eg-stack{margin:20px auto 0;width:min(100%,520px)}
	.eg-stack-item .eg-b3d{--w:clamp(80px,22vw,140px)}
	.eg-lib--one .eg-lib-book{grid-template-columns:1fr}
	.eg-num-grid--3,.eg-contacts--3{grid-template-columns:1fr}
}
@media (max-width:640px){
	#header .site-logo-container img{height:40px}
	.eg-foot__grid{grid-template-columns:1fr;gap:30px}
	.eg-viewer__in{padding:64px 10px}
	.eg-stack .eg-float{display:none}
}

/* Mobile: hero più basso e ventaglio di copertine sotto il testo */
@media (max-width:640px){
	.eg-stack{aspect-ratio:1/.64;margin-top:8px}
	.eg-stack-item--1,.eg-stack-item--3{top:16%}
	.eg-stack-item--2,.eg-stack-item--4{top:0}
	.eg-b-books{flex-direction:column;align-items:stretch}
	.eg-b-books .eg-bb-fan{flex:none;width:100%;height:170px;min-height:0;overflow:hidden;margin:6px 0 -30px}
	.eg-b-books .eg-bb-fan img{width:32%;bottom:-80px}
	.eg-b-books .eg-bb-fan img:nth-child(2){left:22%}.eg-b-books .eg-bb-fan img:nth-child(3){left:44%}.eg-b-books .eg-bb-fan img:nth-child(4){left:66%}
}

/* Numeri: il titolo del libro sotto l'etichetta */
a.eg-num{text-decoration:none!important;color:inherit}
.eg-num-book{display:block;margin-top:6px;font-style:normal;font-size:12.5px;color:#F7B79C}

/* Vetrina: i libri poggiano tutti sulla stessa base, così etichette e titoli sono allineati
   anche quando un formato è più basso (8,5×11″). La fila si centra finché non serve lo scorrimento. */
.eg-shelf-scroll{justify-content:safe center}
.eg-shelf-item{justify-content:flex-start}
.eg-shelf-item .eg-b3d{margin-top:calc(var(--w) * (1.5 - var(--ar,1.5)))}

/* Social: card (quante sono i canali), riga di icone e footer */
.eg-social-tiles{grid-template-columns:repeat(var(--n,5),1fr)}
.eg-st--amazon{--g:255,153,0}.eg-st--amazon .eg-st-icon{background:#232F3E}.eg-st--amazon .eg-st-body small{color:#B36B00}
.eg-st--instagram .eg-st-body small{color:#C1356F}
.eg-soc-row{display:flex;gap:10px;margin-top:20px;padding-top:18px;border-top:1px solid var(--line)}
.eg-soc-mini{display:grid;place-items:center;width:42px;height:42px;border-radius:12px;background:rgb(var(--g,8,20,40));transition:transform .3s var(--ease)}
.eg-soc-mini.eg-st--instagram{background:radial-gradient(circle at 30% 107%,#fdf497 0%,#fd5949 45%,#d6249f 60%,#285AEB 90%)}
.eg-soc-mini.eg-st--tiktok{background:#111}.eg-soc-mini.eg-st--amazon{background:#232F3E}
.eg-soc-mini:hover{transform:translateY(-3px)}
.eg-soc-mini svg{width:20px;height:20px;fill:#fff}
.eg-foot__h-soc{margin-top:26px!important}
.eg-foot__soc{display:flex!important;gap:10px!important}
.eg-foot__soc a{display:grid;place-items:center;width:40px;height:40px;border-radius:12px;background:rgba(255,255,255,.08);border:1px solid rgba(255,255,255,.12);transition:background .3s,transform .3s}
.eg-foot__soc a:hover{background:var(--brand-1);transform:translateY(-3px)}
.eg-foot__soc svg{width:19px;height:19px;fill:#fff}
@media (max-width:1000px){.eg-social-tiles{grid-template-columns:repeat(min(var(--n,5),3),1fr)}}
@media (max-width:640px){.eg-social-tiles{grid-template-columns:1fr 1fr}.eg-social-tiles .eg-st:last-child:nth-child(odd){grid-column:1/-1}}
