/* Ciclobottega – supporto animazioni (caricato solo dove servono le animazioni). */

/* Prima che GSAP parta, gli elementi da animare sono nascosti SOLO se html.cb-anim
   (impostata via JS e rimossa dopo 3 s se lo script non parte). L'hero non viene mai nascosto. */
.cb-anim:not(.cb-anim-ready) [data-anim]:not([data-anim="stagger"]),
.cb-anim:not(.cb-anim-ready) [class*="anim-fade"],
.cb-anim:not(.cb-anim-ready) .anim-zoom,
.cb-anim:not(.cb-anim-ready) [data-anim="stagger"] > *,
.cb-anim:not(.cb-anim-ready) .anim-stagger > * { visibility: hidden; }
.cb-hero [data-anim], .cb-hero [class*="anim-"] { visibility: visible !important; }

/* Lenis */
html.has-lenis, html.has-lenis body { height: auto; }
.has-lenis .lenis-smooth { scroll-behavior: auto !important; }
.has-lenis .lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }

/* Parallax: l'immagine è leggermente più grande per non mostrare bordi */
.cb-hero { overflow: hidden; }
.cb-hero .wp-block-cover__image-background { will-change: transform; }

/* Video hero facoltativo */
.cb-hero__video { position: absolute; inset: 0; z-index: 0; opacity: 0; transition: opacity 1.2s ease; pointer-events: none; }
.cb-hero__video.is-playing { opacity: 1; }
.cb-hero__video video { width: 100%; height: 100%; object-fit: cover; }
.cb-hero .wp-block-cover__background { z-index: 1; }
.cb-hero .wp-block-cover__inner-container { z-index: 2; }

/* Ruota "wow" */
.cbx-wheel { position: absolute; z-index: 0; pointer-events: none; color: var(--cb-orange); opacity: .22; width: min(70vw, 620px); aspect-ratio: 1; right: -12%; top: 50%; margin-top: calc(min(70vw, 620px) / -2); will-change: transform; }
.cbx-wheel svg { width: 100%; height: 100%; display: block; }
.cbx-wheel.is-static { transform: rotate(18deg); }
.cbx-teaser { position: relative; overflow: hidden; isolation: isolate; }
.cbx-teaser .cb-container { position: relative; z-index: 1; }
@media (max-width: 781px) { .cbx-wheel { width: 110vw; right: -55vw; margin-top: -55vw; opacity: .14; } }

/* Hover discreti */
@media (hover: hover) {
	.cb-cards > .wp-block-column, .cbx-product, .cb-trail { transition: transform .35s var(--cb-ease), box-shadow .35s; }
	.wp-block-button__link, .cb-btn { will-change: transform; }
}

@media (prefers-reduced-motion: reduce) {
	.cbx-wheel { transform: rotate(18deg) !important; }
	.cb-hero__video { display: none; }
}

/* Spaccato motore */
.cbx-explode { margin: 2.5rem 0 0; padding: clamp(1rem, 3vw, 2rem); border-radius: 22px; background: radial-gradient(ellipse at 50% 40%, rgba(236, 73, 19, .12), transparent 65%), rgba(255, 255, 255, .03); border: 1px solid rgba(255, 255, 255, .08); }
.cbx-explode svg { width: 100%; height: auto; display: block; overflow: visible; }
.cbx-explode__label { font: 700 15px var(--cb-font); fill: #e5e7eb; letter-spacing: .01em; }
.cbx-explode figcaption { margin-top: 1rem; font-size: .85rem; color: var(--cb-muted-dark); text-align: center; }
@media (max-width: 700px) { .cbx-explode__label { font-size: 22px; } .cbx-explode { margin-inline: calc(-1 * var(--cb-gutter)); border-radius: 0; } }