/* ==========================================================================
   GIANTEC · MOVIMENTO E DETTAGLI
   Animazioni discrete, tono medicale. Tutto si spegne con prefers-reduced-motion.
   Le animazioni di comparsa partono solo se il JS è attivo (classe html.gt-motion).
   ========================================================================== */
:root{--gt-ease-soft:cubic-bezier(.22,1,.36,1)}
@media (prefers-reduced-motion:no-preference){ html{scroll-behavior:smooth} }

/* --- Comparsa allo scroll ---------------------------------------------------- */
html.gt-motion [data-reveal]{opacity:0;transform:translate3d(0,22px,0);
  transition:opacity .9s var(--gt-ease-soft),transform 1.1s var(--gt-ease-soft);transition-delay:calc(var(--rd,0) * 90ms)}
html.gt-motion [data-reveal].is-in{opacity:1;transform:none}
/* immagini: si scoprono dal basso con zoom leggero */
html.gt-motion [data-reveal="media"]{opacity:1;transform:none;clip-path:inset(12% 0 0 0 round var(--gt-radius-lg));
  transition:clip-path 1.2s var(--gt-ease-soft);transition-delay:calc(var(--rd,0) * 90ms)}
html.gt-motion [data-reveal="media"] img{transform:scale(1.08);transition:transform 1.6s var(--gt-ease-soft)}
html.gt-motion [data-reveal="media"].is-in{clip-path:inset(0 0 0 0 round var(--gt-radius-lg))}
html.gt-motion [data-reveal="media"].is-in img{transform:scale(1)}

/* --- Hero home: ingresso al caricamento (l'immagine resta visibile: niente ritardi LCP) --- */
@keyframes gt-rise{from{opacity:0;transform:translate3d(0,18px,0)}to{opacity:1;transform:none}}
@keyframes gt-settle{from{transform:scale(1.06)}to{transform:scale(1)}}
@media (prefers-reduced-motion:no-preference){
  .gt-hero2__copy > *{animation:gt-rise 1s var(--gt-ease-soft) both}
  .gt-hero2__copy > :nth-child(2){animation-delay:.08s}
  .gt-hero2__copy > :nth-child(3){animation-delay:.16s}
  .gt-hero2__copy > :nth-child(4){animation-delay:.24s}
  .gt-hero2__copy > :nth-child(5){animation-delay:.32s}
  .gt-hero2__media{overflow:visible}
  .gt-hero2__media img{animation:gt-settle 1.8s var(--gt-ease-soft) both}
}
@keyframes gt-pulse{0%,100%{box-shadow:0 0 0 4px rgb(47 172 102 / .18)}50%{box-shadow:0 0 0 8px rgb(47 172 102 / .06)}}

/* --- Molecola (cannabinoide) come filigrana ------------------------------------------- */
.gt-sec--hero{position:relative;isolation:isolate}
.gt-sec--hero::before,.gt-band::after{
  content:"";position:absolute;pointer-events:none;z-index:-1;background:currentColor;
  -webkit-mask:url("assets/molecule.svg") center/contain no-repeat;mask:url("assets/molecule.svg") center/contain no-repeat
}
.gt-sec--hero::before{width:min(380px,32vw);aspect-ratio:2/1;left:-4%;bottom:-20%;color:var(--gt-green);opacity:.09;animation:gt-drift 18s ease-in-out infinite alternate}
.gt-band::after{width:min(520px,60%);aspect-ratio:2/1;right:-4%;bottom:-8%;color:var(--gt-mint);opacity:.08;z-index:-1;animation:gt-drift 22s ease-in-out infinite alternate}
@keyframes gt-drift{from{transform:translate3d(0,0,0) rotate(-2deg)}to{transform:translate3d(14px,-10px,0) rotate(2deg)}}

/* --- Rifiniture interattive ------------------------------------------------------- */
/* card: leggera luce che segue il cursore (impostata dal JS con --mx/--my) */
.gt-card,.gt-line,.gt-related__card,.gt-guide-card{background-image:radial-gradient(420px circle at var(--mx,50%) var(--my,-40%),rgb(47 172 102 / .07),transparent 60%)}
.gt-band .gt-card{background-image:radial-gradient(420px circle at var(--mx,50%) var(--my,-40%),rgb(168 229 183 / .10),transparent 60%)}
/* prodotti nei chip: miniatura che ruota appena */
.gt-line__products a .gt-line__thumb img{transition:transform .5s var(--gt-ease-soft)}
.gt-line__products a:hover .gt-line__thumb img{transform:scale(1.15) rotate(-6deg)}
/* icone dei punti di forza: piccolo sollevamento */
.gt-feature .wp-block-image img{transition:transform .5s var(--gt-ease-soft),background-color .3s}
.gt-feature:hover .wp-block-image img{transform:translateY(-3px);background-color:#e3f1e7}
/* link con freccia: la freccia avanza */
.gt-link-arrow .gt-ico{transition:transform .4s var(--gt-ease-soft)}
.gt-link-arrow:hover .gt-ico{transform:translateX(4px)}
/* prodotto nelle schede Wellness & Beauty: fluttua appena */
@media (prefers-reduced-motion:no-preference){
  .parent-pageid-121 .gt-content > .gt-section:first-of-type img{animation:gt-float 6s ease-in-out infinite}
}
@keyframes gt-float{0%,100%{transform:translateY(0)}50%{transform:translateY(-8px)}}

/* --- Barra di lettura (articoli) e "torna su" ------------------------------------- */
.gt-progress{position:fixed;left:0;top:0;z-index:100002;height:3px;width:100%;transform-origin:left;transform:scaleX(var(--p,0));
  background:linear-gradient(90deg,var(--gt-green),var(--gt-mint));pointer-events:none}
.admin-bar .gt-progress{top:32px}
@media (max-width:782px){.admin-bar .gt-progress{top:46px}}
.gt-totop{position:fixed;right:clamp(14px,2.5vw,28px);bottom:clamp(14px,2.5vw,28px);z-index:90;display:grid;place-items:center;
  width:46px;height:46px;padding:0;border:0;border-radius:50%;background:var(--gt-ink);color:var(--gt-mint);cursor:pointer;
  box-shadow:0 10px 30px -10px rgb(16 21 18 / .45);opacity:0;visibility:hidden;transform:translateY(12px);
  transition:opacity .4s var(--gt-ease-soft),transform .5s var(--gt-ease-soft),visibility 0s linear .4s,background-color .2s}
.gt-totop.is-visible{opacity:1;visibility:visible;transform:none;transition:opacity .4s var(--gt-ease-soft),transform .5s var(--gt-ease-soft),background-color .2s}
.gt-totop:hover{background:var(--gt-green-700);color:#fff}
.gt-totop svg{transition:transform .4s var(--gt-ease-soft)}
.gt-totop:hover svg{transform:translateY(-2px)}
html.gt-lock .gt-totop{display:none}

/* --- Accessibilità: niente movimento se richiesto ---------------------------------- */
@media (prefers-reduced-motion:reduce){
  html.gt-motion [data-reveal],html.gt-motion [data-reveal="media"]{opacity:1!important;transform:none!important;clip-path:none!important}
  html.gt-motion [data-reveal="media"] img{transform:none!important}
  .gt-sec--hero::before,.gt-band::after{animation:none}
}

/* prodotti nelle griglie importate (Oli CBD, Prodotti, Green Labs): si sollevano al passaggio */
.gt-content .gt-col:has(> .gt-banner:not(.wp-block-cover) > figure.wp-block-image:only-child) img{transition:transform .6s var(--gt-ease-soft),filter .6s}
.gt-content .gt-col:has(> .gt-banner:not(.wp-block-cover) > figure.wp-block-image:only-child):hover img{transform:translateY(-6px) scale(1.03);filter:drop-shadow(0 14px 14px rgb(16 43 26 / .12))}
/* foto del team: zoom leggero */
.gt-profile-image img{transition:transform .6s var(--gt-ease-soft),box-shadow .4s}
.gt-profile-image:hover img{transform:scale(1.04);box-shadow:0 0 0 4px #fff,0 0 0 6px var(--gt-green)}
