/* ---------- Side stars (parallax) ---------- */
.stars-parallax {
  --star-color: #fff;       /* use a darker colour (e.g. #b8892b) if the page behind is light */

  position: fixed;
  inset: 0;
  z-index: 1;               /* raise/lower if it sits over or under your sections */
  pointer-events: none;
  overflow: hidden;
}

.stars-layer {
  position: absolute;
  top: -20%;                /* extra room so the scrolling mask never shows an edge */
  bottom: -20%;
  width: var(--w);
  background-color: var(--star-color);
  /* the PNG is used as a mask, so the star colour is just a colour you pick */
  -webkit-mask-repeat: repeat-y;  mask-repeat: repeat-y;
  -webkit-mask-size: 100% auto;   mask-size: 100% auto;
  opacity: var(--o);
  will-change: mask-position;
}

.stars-layer--left  { left: 0;  -webkit-mask-image: url("../img/redesign/stars-left.png");  mask-image: url("../img/redesign/stars-left.png");  -webkit-mask-position: left top;  mask-position: left top; }
.stars-layer--right { right: 0; -webkit-mask-image: url("../img/redesign/stars-right.png"); mask-image: url("../img/redesign/stars-right.png"); -webkit-mask-position: right top; mask-position: right top; }

/* far layer: smaller, dimmer, slower. near layer: bigger, brighter, faster (speed is data-speed in the HTML) */
.stars-layer--far  { --w: clamp(5rem, 14vw, 16rem); --o: 0.45; }
.stars-layer--near { --w: clamp(8rem, 22vw, 26rem); --o: 0.9; }

/* keep it subtle on phones */
@media (max-width: 600px) {
  .stars-layer--far  { --w: 4.5rem; --o: 0.35; }
  .stars-layer--near { --w: 7rem;   --o: 0.7;  }
}

@media (prefers-reduced-motion: reduce) {
  .stars-layer { will-change: auto; }
}
