/* ---------- Roya pre-roll sting (films / series / cartoons, never live) ----------
   Transforms + opacity only. The leaf and its red glow reuse .roya-logo / .rl-glow from app.css. */
.rsting { position: fixed; inset: 0; z-index: 96; display: grid; place-items: center; overflow: hidden; cursor: pointer;
  background: #000; contain: strict; -webkit-tap-highlight-color: transparent; }
.rsting .rs-bloom { position: absolute; left: 50%; top: 50%; width: 140vmax; height: 140vmax; margin: -70vmax 0 0 -70vmax; pointer-events: none;
  background: radial-gradient(circle, rgba(225, 29, 42, 0.34) 0%, rgba(140, 12, 24, 0.16) 22%, rgba(40, 4, 8, 0) 46%); will-change: transform, opacity; }
.rsting .rs-stage { position: relative; display: grid; justify-items: center; gap: 14px; will-change: transform; }
.rsting .rs-mark { position: relative; display: grid; place-items: center; }
.rsting .rs-logo { will-change: transform; }
/* hold the brand mark still: the sting choreographs it instead of the idle breath/ping loops */
.rsting .rs-logo .rl-glow { animation: none; will-change: transform, opacity; }
.rsting .rs-logo .rl-glow::after { animation: none; opacity: 0; }
.rsting .rs-logo .rl-shine { display: none; }
.rsting .rs-logo > img { will-change: transform, opacity; }
.rsting .rs-ring { position: absolute; inset: 18%; border-radius: 50%; border: 2px solid rgba(255, 90, 100, 0.85); opacity: 0; pointer-events: none; will-change: transform, opacity; }
/* light sweep: a bright band slides through a mask cut to the leaf's shape */
.rsting .rs-sweep { position: absolute; inset: 0; z-index: 3; overflow: hidden; opacity: 0; pointer-events: none;
  -webkit-mask: url(/media/brand/roya-logo.png) center / contain no-repeat; mask: url(/media/brand/roya-logo.png) center / contain no-repeat; }
.rsting .rs-sweep i { position: absolute; inset: 0; transform: translateX(-120%); will-change: transform;
  background: linear-gradient(105deg, transparent 30%, rgba(255, 110, 118, 0.95) 48%, rgba(255, 235, 235, 1) 50%, rgba(255, 110, 118, 0.95) 52%, transparent 70%); }
.rsting .rs-word { font-weight: 800; font-size: clamp(1.5rem, 5vmin, 2.4rem); line-height: 1.1; color: #fff; opacity: 0; letter-spacing: 0;
  text-shadow: 0 0 18px rgba(255, 45, 60, 0.55); will-change: transform, opacity; }
.rsting.rs-skip { transition: opacity 0.18s ease-in; opacity: 0 !important; }

/* ---- fallback when GSAP is missing: same beats in CSS keyframes ---- */
.rsting.rs-css { --k: var(--rs-k, 1); animation: rsOut calc(0.35s * var(--k)) ease-in calc(1.05s * var(--k)) both; }
.rs-css .rs-bloom { animation: rsBloom calc(0.6s * var(--k)) ease-out both; }
.rs-css .rs-logo .rl-glow { animation: rsIgnite calc(0.88s * var(--k)) ease-out calc(0.08s * var(--k)) both; }
.rs-css .rs-logo > img { animation: rsLeaf calc(0.55s * var(--k)) cubic-bezier(.2,.8,.2,1) calc(0.1s * var(--k)) both; }
.rs-css .rs-ring { animation: rsRing calc(0.7s * var(--k)) ease-out calc(0.36s * var(--k)) both; }
.rs-css .rs-sweep { opacity: 1; }
.rs-css .rs-sweep i { animation: rsSweep calc(0.5s * var(--k)) ease-in-out calc(0.42s * var(--k)) both; }
.rs-css .rs-word { animation: rsWord calc(0.34s * var(--k)) cubic-bezier(.2,.8,.2,1) calc(0.55s * var(--k)) both; }
.rs-css .rs-stage { animation: rsPush calc(1.4s * var(--k)) linear both; }
@keyframes rsBloom { from { opacity: 0; transform: scale(0.55); } to { opacity: 1; transform: none; } }
@keyframes rsIgnite { 0% { opacity: 0; transform: scale(0.3); } 43% { opacity: 1; transform: scale(1.18); } 100% { opacity: 0.8; transform: none; } }
@keyframes rsLeaf { from { opacity: 0; transform: scale(0.84); } to { opacity: 1; transform: none; } }
@keyframes rsRing { from { opacity: 0.9; transform: scale(0.55); } to { opacity: 0; transform: scale(2.2); } }
@keyframes rsSweep { from { transform: translateX(-120%); } to { transform: translateX(120%); } }
@keyframes rsWord { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes rsPush { from { transform: scale(0.97); } to { transform: scale(1.04); } }
@keyframes rsOut { to { opacity: 0; } }

@media (prefers-reduced-motion: reduce) { .rsting { display: none; } }
