/* Creative4All — THE FINAL SPARK v0.5.0. Every selector is namespaced c4all-fs-* or scoped to a class the
   scripts add at runtime, so this file changes nothing on its own (no-JS / reduced motion = original footer). */

/* ---------- Scene 01 · World → idea → [4] → through the 4 ---------- */
.c4all-fs-portal { position: relative; display: block; width: 100%; margin: 0; padding: 0; pointer-events: none; background: transparent; z-index: 2; }
.c4all-fs-portal__stage { position: sticky; top: 0; width: 100%; overflow: hidden; pointer-events: none; }
.c4all-fs-portal__svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
/* Opaque parts of the portal absorb clicks meant for footer content hidden beneath them; the clipped
   opening lets clicks through to the footer that is visible there. Wheel/touch scrolling is unaffected. */
.c4all-fs-portal .c4all-fs-hit { pointer-events: visiblePainted; cursor: default; }
.c4all-fs-portal__halo { position: absolute; left: 0; top: 0; transform-origin: 0 0; will-change: transform, opacity; pointer-events: none; }
.c4all-fs-dots { position: absolute; left: 0; top: 0; width: 100%; height: 100%; display: block; pointer-events: none; }
/* Fallback pin for themes whose wrappers clip (overflow): the script switches the stage absolute/fixed. */
.c4all-fs-portal.is-fixed-mode .c4all-fs-portal__stage { position: absolute; top: 0; left: 0; }
.c4all-fs-portal__halo::before { content: ""; position: absolute; inset: 0; border-radius: 50%; opacity: .8; background: radial-gradient(closest-side, rgba(70,160,230,.36), rgba(52,135,194,.11) 55%, rgba(52,135,194,0)); }
.c4all-fs-root { position: relative; z-index: 1; }

.c4all-fs-rim { opacity: .28; }
.c4all-fs-aperture { opacity: .55; }
.c4all-fs-portal.is-live .c4all-fs-portal__halo::before { animation: c4all-fs-breathe 5.5s ease-in-out infinite; }
.c4all-fs-portal.is-live .c4all-fs-rim { animation: c4all-fs-rim 5.5s ease-in-out infinite; }
@keyframes c4all-fs-breathe { 0%, 100% { opacity: .7; } 50% { opacity: 1; } }
@keyframes c4all-fs-rim { 0%, 100% { opacity: .22; } 50% { opacity: .5; } }

.c4all-fs-portal__cue { position: absolute; left: 50%; bottom: max(28px, 5.5vh); transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 14px; color: rgba(214, 232, 248, .78); font-family: inherit; font-size: 11px; font-weight: 500; line-height: 1.2; letter-spacing: .32em; text-transform: uppercase; white-space: nowrap; }
html[dir="rtl"] .c4all-fs-portal__cue { letter-spacing: 0; font-size: 13px; }
.c4all-fs-portal__cue-line { position: relative; width: 1px; height: 46px; overflow: hidden; background: rgba(160, 205, 240, .18); }
.c4all-fs-portal__cue-line::after { content: ""; position: absolute; left: 0; top: -40%; width: 1px; height: 40%; background: linear-gradient(transparent, #7fc6ff); }
.c4all-fs-portal.is-live .c4all-fs-portal__cue-line::after { animation: c4all-fs-cue 2.4s cubic-bezier(.6, 0, .3, 1) infinite; }
@keyframes c4all-fs-cue { to { top: 100%; } }

/* ---------- Scene 03 · Interactive signature (only when the script adds .c4all-fs-sig-on) ---------- */
.c4all-final-wordmark-row .c4all-signature.c4all-fs-sig-on .c4all-signature__light {
  opacity: calc(.2 + .8 * var(--c4all-fs-i, 0));
  transition: none;
  background:
    radial-gradient(clamp(46px, 7vw, 140px) clamp(34px, 4.6vw, 96px) at var(--c4all-spot-x, 76.5%) var(--c4all-spot-y, 50%), rgba(246, 250, 255, .95) 0%, rgba(206, 222, 240, .55) 36%, rgba(170, 195, 225, 0) 74%),
    radial-gradient(clamp(120px, 20vw, 400px) clamp(60px, 8vw, 170px) at var(--c4all-fs-bx, 76.5%) var(--c4all-fs-by, 50%), rgba(74, 160, 240, .78) 0%, rgba(45, 110, 200, .3) 50%, rgba(45, 110, 200, 0) 80%),
    linear-gradient(102deg, rgba(225, 236, 250, 0) calc(var(--c4all-spot-x, 76.5%) - 15%), rgba(225, 236, 250, .16) var(--c4all-spot-x, 76.5%), rgba(225, 236, 250, 0) calc(var(--c4all-spot-x, 76.5%) + 15%));
}
.c4all-final-wordmark-row .c4all-signature.c4all-fs-sig-on .c4all-signature__light::after {
  content: ""; position: absolute; inset: 0;
  -webkit-mask: var(--c4all-fs-four-mask) center / 100% 100% no-repeat;
          mask: var(--c4all-fs-four-mask) center / 100% 100% no-repeat;
  background:
    radial-gradient(clamp(60px, 9vw, 170px) clamp(50px, 6vw, 120px) at var(--c4all-spot-x, 76.5%) var(--c4all-spot-y, 50%), rgba(236, 247, 255, .98), rgba(120, 196, 255, .7) 42%, rgba(60, 140, 230, 0) 80%),
    linear-gradient(rgba(80, 170, 245, .4), rgba(80, 170, 245, .4));
  opacity: calc(var(--c4all-fs-i, 0) * (.3 + .7 * var(--c4all-fs-four, 0)));
}

@media (prefers-reduced-motion: reduce) { .c4all-fs-portal { display: none !important; } }
