/* One consistent scroll-in style for every section (loaded last so it wins).
   Tuned "cinematic": longer, blurrier, more travel. Adjust the variables below
   to make the whole site faster/slower/softer in one place.

   Note: transitions live ONLY on the "in view" state. The hidden state is added by
   script after first paint, and if it had a transition the browser would visibly
   animate things *out* on load before animating them back in. */

:root {
  --rv-ease: cubic-bezier(0.16, 1, 0.3, 1);
  --rv-dur: 1.4s;          /* slide / scale duration */
  --rv-fade: 1.1s;         /* opacity duration */
  --rv-blur-dur: 1.2s;     /* how long the blur takes to clear */
  --rv-step: 110ms;        /* stagger between items */
  --rv-blur-head: 10px;    /* headings */
  --rv-blur-card: 12px;    /* cards / blocks */
  --rv-rise-head: 26px;
  --rv-rise-card: 40px;
  --rv-in:
    opacity var(--rv-fade) ease,
    transform var(--rv-dur) var(--rv-ease),
    translate var(--rv-dur) var(--rv-ease),
    scale var(--rv-dur) var(--rv-ease),
    filter var(--rv-blur-dur) ease;
}

/* ---------- Headings (badge → title → subtitle) ---------- */
.rv-head-anim > *,
.rv-head-anim + .rv-summary,
.sx-js .luxe-head > *,
.scxze-section.bx-head-anim .luxe-head > * {
  transform: translateY(var(--rv-rise-head));
  filter: blur(var(--rv-blur-head));
  transition: none;
}
.rv-head-anim.is-in > *,
.rv-head-anim.is-in + .rv-summary,
.sx-js.sx-in .luxe-head > *,
.scxze-section.bx-head-in .luxe-head > * { transition: var(--rv-in); }
.rv-head-anim.is-in > :nth-child(2),
.sx-js.sx-in .luxe-head > :nth-child(2),
.scxze-section.bx-head-in .luxe-head > :nth-child(2) { transition-delay: calc(var(--rv-step) * 1); }
.rv-head-anim.is-in > :nth-child(3),
.sx-js.sx-in .luxe-head > :nth-child(3),
.scxze-section.bx-head-in .luxe-head > :nth-child(3) { transition-delay: calc(var(--rv-step) * 2); }
.rv-head-anim.is-in > :nth-child(4) { transition-delay: calc(var(--rv-step) * 3); }
.rv-head-anim.is-in + .rv-summary { transition-delay: calc(var(--rv-step) * 3); }

/* ---------- Social cards ---------- */
.sx-stage {
  transform: translateY(var(--rv-rise-card)) scale(0.96);
  filter: blur(var(--rv-blur-card));
  transition: none;
}
.sx-in .sx-stage {
  transition: var(--rv-in);
  transition-delay: calc(0.15s + var(--i, 0) * var(--rv-step));
}

/* ---------- "Built different" bento cards ---------- */
.bx.bx-js .bx-card {
  translate: 0 var(--rv-rise-card);
  scale: 0.96;
  filter: blur(var(--rv-blur-card));
  transition: none;
}
.bx.bx-js.bx-in .bx-card {
  filter: none;
  scale: 1;
  transition: var(--rv-in), border-color 0.4s ease, box-shadow 0.5s ease;
  transition-delay:
    calc(var(--i, 0) * var(--rv-step)), calc(var(--i, 0) * var(--rv-step)),
    calc(var(--i, 0) * var(--rv-step)), calc(var(--i, 0) * var(--rv-step)),
    calc(var(--i, 0) * var(--rv-step)), 0s, 0s;
}

/* ---------- Product cards ---------- */
.pc-js .luxe-products__grid > [class*="col-"] > .product-card {
  translate: 0 var(--rv-rise-card);
  scale: 0.96;
  filter: blur(var(--rv-blur-card));
  transition: none;
}
.pc-js.pc-in .luxe-products__grid > [class*="col-"] > .product-card {
  scale: 1;
  filter: none;
  transition: var(--rv-in), border-color 0.4s ease, box-shadow 0.5s ease;
  transition-delay:
    calc(var(--pci, 0) * var(--rv-step)), calc(var(--pci, 0) * var(--rv-step)),
    calc(var(--pci, 0) * var(--rv-step)), calc(var(--pci, 0) * var(--rv-step)),
    calc(var(--pci, 0) * var(--rv-step)), 0s, 0s;
}

/* ---------- Discord panel ---------- */
.dsx.dsx-anim .dsx-copy > *,
.dsx.dsx-anim .dsx-invite {
  transform: translateY(var(--rv-rise-head));
  filter: blur(var(--rv-blur-head));
  transition: none;
}
.dsx.dsx-anim.dsx-in .dsx-copy > *,
.dsx.dsx-anim.dsx-in .dsx-invite { filter: none; transition: var(--rv-in), box-shadow 0.45s ease; }
.dsx.dsx-in .dsx-copy > :nth-child(2) { transition-delay: calc(var(--rv-step) * 1); }
.dsx.dsx-in .dsx-copy > :nth-child(3) { transition-delay: calc(var(--rv-step) * 2); }
.dsx.dsx-anim.dsx-in .dsx-invite { transition-delay: calc(var(--rv-step) * 2); }

/* ---------- Generic reveal (reviews wall + footer, tagged by scripts/reveal.js) ---------- */
.rvx {
  opacity: 0;
  translate: 0 var(--rv-rise-card);
  filter: blur(var(--rv-blur-card));
  transition: none;
}
.rvx.is-in {
  opacity: 1;
  translate: 0 0;
  filter: none;
  transition: var(--rv-in);
  transition-delay: calc(var(--rvx-i, 0) * var(--rv-step));
}
/* the wordmark sits at the very bottom: fade + blur only, no travel */
.af-wordmark.rvx { translate: 0 0; }
