/* Juice Lab — textura de fundo
   Ingredientes dos sucos em traço fino (e a garrafa, o copo e o frasco da marca).
   Claro: verde bem suave no fundo das páginas. Escuro: lima no topo (herói), na chamada do
   WhatsApp e no cartão de oferta do celular; o rodapé fica liso por causa do letreiro.
   Sem JavaScript. No computador, a textura do escuro ganha uma leve profundidade ao rolar
   (só onde o navegador suporta e a pessoa não pediu para reduzir o movimento). */

/* ---- claro: o fundo das páginas (carrinho e pagamento ficam lisos: só formulário) */
html body.jl-site:not(.woocommerce-cart):not(.woocommerce-checkout) {
  background-image: url(textura-clara.svg?v=1.0.0);
  background-size: 720px 720px;
  background-position: 50% 0;
  background-repeat: repeat;
}

/* ---- escuro */
body.jl-site .e-con.jl-hero > .e-con-inner,
body.jl-site .e-con.jl-sec.jl-foot,
body.jl-site .e-con.jl-promo {
  isolation: isolate;
}
body.jl-site .e-con.jl-sec.jl-foot { overflow: clip; }

body.jl-site .e-con.jl-hero > .e-con-inner::after,
body.jl-site .e-con.jl-sec.jl-foot::after,
body.jl-site .e-con.jl-promo::after {
  content: "";
  position: absolute;
  inset: -44px 0;
  z-index: -1;
  pointer-events: none;
  background: url(textura-escura.svg?v=1.0.0) 50% 0 / 720px 720px repeat;
}

/* topo: a textura fica mais nas bordas e baixa atrás do texto e das garrafas */
body.jl-site .e-con.jl-hero > .e-con-inner::after {
  -webkit-mask-image: radial-gradient(75% 70% at 50% 50%, rgb(0 0 0 / .32) 40%, #000 100%);
  mask-image: radial-gradient(75% 70% at 50% 50%, rgb(0 0 0 / .32) 40%, #000 100%);
}

/* chamada do WhatsApp: a textura se desfaz antes do rodapé (sem emenda com ele) */
body.jl-site .e-con.jl-sec.jl-foot::after {
  -webkit-mask-image: linear-gradient(#000 calc(100% - 210px), transparent calc(100% - 80px));
  mask-image: linear-gradient(#000 calc(100% - 210px), transparent calc(100% - 80px));
}

@media (max-width: 900px) {
  html body.jl-site:not(.woocommerce-cart):not(.woocommerce-checkout) { background-size: 480px 480px; }
  body.jl-site .e-con.jl-hero > .e-con-inner::after,
  body.jl-site .e-con.jl-sec.jl-foot::after,
  body.jl-site .e-con.jl-promo::after { background-size: 480px 480px; }
}

/* ---- profundidade ao rolar (computador) */
@keyframes jl-tx-deriva {
  from { translate: 0 36px; }
  to { translate: 0 -36px; }
}
@supports ((animation-timeline: view()) and (animation-range: entry)) {
  @media (min-width: 901px) and (prefers-reduced-motion: no-preference) {
    body.jl-site .e-con.jl-hero > .e-con-inner,
    body.jl-site .e-con.jl-sec.jl-foot {
      view-timeline: --jl-tx;
    }
    body.jl-site .e-con.jl-hero > .e-con-inner::after,
    body.jl-site .e-con.jl-sec.jl-foot::after {
      animation: jl-tx-deriva linear both;
      animation-timeline: --jl-tx;
    }
  }
}
