/* Foreground decorations: real print strips + gold sparkles/confetti.
   Pieces sit in the section's side margins, never behind text.
   deco.js adds light parallax and hides any piece that would touch text. */

.has-deco { position: relative; overflow: hidden; }
.has-deco > .container,
.has-deco > .marquee { position: relative; z-index: 1; }
.has-deco--strips { padding-top: calc(var(--space-section) + 40px); }
.has-deco--tall { padding-top: calc(var(--space-section) + 96px); }

.deco {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.deco__p {
  position: absolute;
  top: var(--y, 40px);
  width: var(--w, 24px);
  height: auto;
  transform: translate3d(0, var(--py, 0px), 0) rotate(var(--r, 0deg));
  will-change: transform;
  transition: opacity 0.9s var(--ease-out);
}
.deco__p--l { left: max(var(--edge, 16px), calc(50% - var(--c, 480px))); }
.deco__p--r { right: max(var(--edge, 16px), calc(50% - var(--c, 480px))); }
.deco__p.is-clash { display: none; }

/* Real print strip */
.deco__strip {
  display: block;
  aspect-ratio: 1 / 3;
  object-fit: cover;
  border: 3px solid #fff;
  border-radius: 2px;
  box-shadow: 0 10px 24px rgba(11, 31, 20, 0.16), 0 2px 6px rgba(11, 31, 20, 0.10);
}

/* Four-point gold sparkle */
.deco__spark {
  display: block;
  aspect-ratio: 1;
  background: var(--gold);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath d='M50 0 Q53 44 100 50 Q53 56 50 100 Q47 56 0 50 Q47 44 50 0Z'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath d='M50 0 Q53 44 100 50 Q53 56 50 100 Q47 56 0 50 Q47 44 50 0Z'/%3E%3C/svg%3E") center / contain no-repeat;
  opacity: var(--o, 0.85);
}

/* Confetti bit and dot */
.deco__bit {
  display: block;
  height: calc(var(--w, 12px) * 0.36);
  border-radius: 1px;
  background: var(--bg, var(--gold));
  opacity: var(--o, 0.55);
}
.deco__dot {
  display: block;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--gold);
  opacity: var(--o, 0.45);
}

/* Fade in once the section scrolls into view (only when JS is running) */
.deco-js .deco__p { opacity: 0; }
.deco-js .deco.is-in .deco__p { opacity: 1; }
.deco-js .deco.is-in .deco__spark { opacity: var(--o, 0.85); }
.deco-js .deco.is-in .deco__bit { opacity: var(--o, 0.55); }
.deco-js .deco.is-in .deco__dot { opacity: var(--o, 0.45); }

/* Gentle twinkle on sparkles */
@keyframes deco-twinkle {
  0%, 100% { scale: 1; }
  50% { scale: 0.78; }
}
.deco.is-in .deco__spark { animation: deco-twinkle 5s ease-in-out infinite; animation-delay: var(--d, 0s); }

@media (max-width: 1100px) {
  .deco__p--wideonly { display: none; }
}

@media (max-width: 1024px) {
  .deco__p { width: var(--tw, var(--w, 24px)); }
}

@media (max-width: 768px) {
  .has-deco--strips, .has-deco--tall { padding-top: 172px; }
  .deco__p {
    top: var(--my, var(--y, 24px));
    width: var(--mw, var(--tw, var(--w, 24px)));
  }
  .deco__p--l { left: var(--mx, 10px); }
  .deco__p--r { right: var(--mx, 10px); }
  .deco__p--nomobile { display: none; }
  /* Phones: the two strips fan together, centred above the heading */
  .deco__strip { top: 14px; width: 42px; border-width: 2px; }
  .deco__strip.deco__p--l { left: calc(50% - 40px); transform: translate3d(0, var(--py, 0px), 0) rotate(-9deg); }
  .deco__strip.deco__p--r { left: auto; right: calc(50% - 40px); transform: translate3d(0, var(--py, 0px), 0) rotate(8deg); }
}

@media (prefers-reduced-motion: reduce) {
  .deco__p { transition: none; transform: rotate(var(--r, 0deg)); will-change: auto; }
  .deco-js .deco__p { opacity: 1; }
  .deco.is-in .deco__spark { animation: none; }
}
