/* Wardrop Digital effects library — stack-cards 1.0.0 (Wardrop Digital original). */
/* Each card sticks a little lower than the one before it. No ancestor may use overflow: hidden (it breaks sticky);
   use overflow-x: clip if something must be cut. */
.fx-stack-cards__card {
  position: sticky;
  top: calc(var(--fx-stack-top, 96px) + var(--i, 0) * var(--fx-stack-gap, 18px));
  margin-bottom: var(--fx-stack-space, 12vh);
  transform-origin: 50% 0%;
}
.fx-stack-cards__card:last-child { margin-bottom: 0; }
/* Without JavaScript the script has not numbered the cards, so number the first six here. */
.fx-stack-cards__card:nth-child(2) { --i: 1; }
.fx-stack-cards__card:nth-child(3) { --i: 2; }
.fx-stack-cards__card:nth-child(4) { --i: 3; }
.fx-stack-cards__card:nth-child(5) { --i: 4; }
.fx-stack-cards__card:nth-child(6) { --i: 5; }
/* The dimming overlay: only its opacity changes, never a filter or a shadow (contract 11). */
.fx-stack-cards__card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: var(--fx-stack-dim-colour, #14181f);
  opacity: var(--fx-stack-dim, 0);
  pointer-events: none;
}
/* A card taller than the screen (set by script) cannot stack: the cards read as a plain list. */
.fx-stack-cards--flat .fx-stack-cards__card { position: relative; top: auto; margin-bottom: var(--fx-stack-gap, 18px); }
/* Contract 18, tier 1: reduced motion shows a plain list in normal flow. */
@media (prefers-reduced-motion: reduce) {
  .fx-stack-cards__card { position: relative; top: auto; margin-bottom: var(--fx-stack-gap, 18px); }
  .fx-stack-cards__card::after { display: none; }
}
