/* One velvet stage curtain, hoisted from the bottom up.
   It is built from stacked fold bands; on scroll each band travels up and stacks under the valance,
   which reads as fabric gathering into folds. Only transforms are animated (cheap on low-spec phones). */

.ct-stage { perspective: 1200px; }

.ct-glow {
  position: absolute; left: 50%; top: 42%; width: 120%; aspect-ratio: 1; z-index: 1;
  transform: translate(-50%, -50%) scale(.4); opacity: 0; pointer-events: none;
  background: radial-gradient(circle, rgba(255, 236, 178, .95) 0%, rgba(255, 214, 128, .55) 28%, rgba(255, 214, 128, 0) 65%);
}

.ct-curtain { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.ct-fold {
  --pleat: 54px;
  position: absolute; left: -2%; right: -2%;
  top: calc(var(--i) * 12.5%); height: calc(12.5% + 26px);
  z-index: calc(var(--i) + 1);
  border-radius: 0 0 50% 50% / 0 0 20px 20px;
  background:
    repeating-linear-gradient(90deg,
      rgba(35, 0, 6, .60) 0,
      rgba(35, 0, 6, .16) calc(var(--pleat) * .22),
      rgba(255, 150, 140, .22) calc(var(--pleat) * .46),
      rgba(255, 220, 210, .14) calc(var(--pleat) * .54),
      rgba(35, 0, 6, .20) calc(var(--pleat) * .76),
      rgba(35, 0, 6, .60) var(--pleat)),
    linear-gradient(90deg, #8c1220, #b01f2c 50%, #8c1220);
  box-shadow: 0 8px 12px -2px rgba(30, 0, 5, .55);
  will-change: transform;
}
/* soft light on the top of each fold and a deep shadow under its lip; the lip deepens as it folds */
.ct-fold i {
  position: absolute; inset: 0; border-radius: inherit; opacity: .18;
  background: linear-gradient(180deg, rgba(255, 190, 170, .22), rgba(255, 190, 170, 0) 22%, rgba(25, 0, 5, 0) 62%, rgba(25, 0, 5, .62));
}
/* gold fringe on the hem of the lowest band */
.ct-fold:last-child::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 22px;
  background:
    linear-gradient(#e7c36a, #b58a2c) 0 0 / 100% 5px no-repeat,
    repeating-linear-gradient(90deg, #f3d98f 0 2px, #b58a2c 2px 3px, transparent 3px 6px) 0 5px / 100% 17px no-repeat;
}

/* valance: pleated top, gold rod and scalloped swags */
.ct-valance {
  height: 70px !important; z-index: 20;
  background:
    repeating-linear-gradient(90deg, rgba(35, 0, 6, .5) 0, rgba(255, 170, 160, .16) 12px, rgba(35, 0, 6, .5) 24px) 0 0 / 100% 38px no-repeat,
    linear-gradient(#7d0f1b, #a31d2b) 0 0 / 100% 38px no-repeat !important;
  filter: drop-shadow(0 8px 10px rgba(30, 0, 5, .45));
}
.ct-valance::before {
  content: ""; position: absolute; left: -4px; right: -4px; top: 0; height: 8px;
  background: linear-gradient(#f6e2a2, #b58a2c); border-radius: 0 0 4px 4px; z-index: 1;
}
.ct-valance::after {
  content: ""; position: absolute; left: 0; right: 0; top: 36px; height: 34px;
  background: radial-gradient(circle at 50% 0, #a31d2b 0 21px, #e7c36a 21px 23px, transparent 24px) 0 0 / 46px 34px repeat-x !important;
}
