/* Feedback round 3: decorative backgrounds for empty-looking sections (Contact, Partners).
   Base colour is the existing .bg-sage (#0c5039, cinematic.css). Hooks are scoped with :has()
   so no other .bg-sage section on the site is affected:
   - Contact  : section.bg-sage containing a.btn[href*="instagram.com/lrs.lums"]  (only match on the site)
   - Partners : section.bg-sage containing a[href*="subject=Partnership"]          (only match on the site) */

/* Shared frame + Islamic 8-point star tiling + soft gold glow */
section.bg-sage:has(a[href*="instagram.com/lrs.lums"].btn),
section.bg-sage:has(a[href*="subject=Partnership"]) {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background-image:
    radial-gradient(circle at 82% 18%, rgba(227, 190, 115, .16), transparent 52%),
    radial-gradient(circle at 6% 96%, rgba(227, 190, 115, .08), transparent 45%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'%3E%3Cg fill='none' stroke='%23e3be73' stroke-width='1' stroke-opacity='.11'%3E%3Cpath d='M116 60 L82.2 69.2 L99.6 99.6 L69.2 82.2 L60 116 L50.8 82.2 L20.4 99.6 L37.8 69.2 L4 60 L37.8 50.8 L20.4 20.4 L50.8 37.8 L60 4 L69.2 37.8 L99.6 20.4 L82.2 50.8 Z'/%3E%3Ccircle cx='60' cy='60' r='12'/%3E%3Cpath d='M60 0 L120 60 L60 120 L0 60 Z' stroke-opacity='.06'/%3E%3C/g%3E%3C/svg%3E");
  background-size: auto, auto, 120px 120px;
  background-repeat: no-repeat, no-repeat, repeat;
}

/* Keep real content above every decoration */
section.bg-sage:has(a[href*="instagram.com/lrs.lums"].btn) > .wrap,
section.bg-sage:has(a[href*="subject=Partnership"]) > .wrap {
  position: relative;
  z-index: 1;
}

/* Thin gold double frame (both sections) */
section.bg-sage:has(a[href*="instagram.com/lrs.lums"].btn)::after,
section.bg-sage:has(a[href*="subject=Partnership"])::after {
  content: "";
  position: absolute;
  inset: 16px;
  border: 1px solid rgba(227, 190, 115, .25);
  outline: 1px solid rgba(227, 190, 115, .10);
  outline-offset: 6px;
  pointer-events: none;
  z-index: 0;
}

/* Contact: slow drifting outlined marquee word */
section.bg-sage:has(a[href*="instagram.com/lrs.lums"].btn)::before {
  content: "FOLLOW @LRS \00B7 FOLLOW @LRS \00B7 FOLLOW @LRS \00B7 FOLLOW @LRS \00B7 ";
  position: absolute;
  top: 14%;
  left: 0;
  width: max-content;
  white-space: nowrap;
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: clamp(90px, 13vw, 190px);
  line-height: .9;
  letter-spacing: .02em;
  text-transform: uppercase;
  color: transparent;
  -webkit-text-stroke: 1px rgba(227, 190, 115, .18);
  pointer-events: none;
  z-index: 0;
  animation: lrs-marquee-drift 90s linear infinite;
}

@keyframes lrs-marquee-drift {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* Partners: large faint Arabic word for partnership (shirakah) */
section.bg-sage:has(a[href*="subject=Partnership"])::before {
  content: "\0634\0631\0627\0643\0629";
  position: absolute;
  right: -2%;
  bottom: -8%;
  font-family: 'Amiri', serif;
  font-size: clamp(180px, 28vw, 420px);
  line-height: 1;
  color: rgba(227, 190, 115, .06);
  direction: rtl;
  pointer-events: none;
  z-index: 0;
  animation: lrs-float-gentle 14s ease-in-out infinite;
}

@keyframes lrs-float-gentle {
  0%, 100% { transform: translate3d(0, 0, 0) rotate(-2deg); }
  50% { transform: translate3d(0, -14px, 0) rotate(-2deg); }
}

/* Reduced motion: keep the static decoration, no movement */
@media (prefers-reduced-motion: reduce) {
  section.bg-sage:has(a[href*="instagram.com/lrs.lums"].btn)::before,
  section.bg-sage:has(a[href*="subject=Partnership"])::before {
    animation: none;
  }
}

/* Small screens: shrink decorations, no horizontal overflow (section already clips) */
@media (max-width: 760px) {
  section.bg-sage:has(a[href*="instagram.com/lrs.lums"].btn),
  section.bg-sage:has(a[href*="subject=Partnership"]) {
    background-size: auto, auto, 90px 90px;
  }
  section.bg-sage:has(a[href*="instagram.com/lrs.lums"].btn)::after,
  section.bg-sage:has(a[href*="subject=Partnership"])::after {
    inset: 8px;
    outline-offset: 4px;
  }
  section.bg-sage:has(a[href*="instagram.com/lrs.lums"].btn)::before {
    font-size: 84px;
    top: 8%;
    opacity: .8;
  }
  section.bg-sage:has(a[href*="subject=Partnership"])::before {
    font-size: 160px;
    right: -6%;
    bottom: -4%;
  }
}
