/* Scroll motion for jlvorster.co.za: reveals, word-by-word headlines, glass header, progress bar. Colours are untouched. */
html { scroll-padding-top: 90px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

/* soft moving glow behind everything */
body::before { content: ""; position: fixed; inset: -10% -10% -10% -10%; z-index: -1; pointer-events: none;
  background: radial-gradient(38% 32% at 18% 12%, rgba(0,242,255,.10), transparent 70%), radial-gradient(34% 30% at 88% 62%, rgba(37,99,235,.11), transparent 70%), radial-gradient(30% 26% at 30% 100%, rgba(0,242,255,.06), transparent 70%);
  transform: translate3d(0, calc(var(--sy, 0) * -0.10px), 0); will-change: transform; }

/* reading progress */
.mo-bar { position: fixed; top: 0; left: 0; width: 100%; height: 3px; transform-origin: 0 50%; transform: scaleX(0); background: linear-gradient(90deg, #0b63ce, #00f2ff); z-index: 1000; pointer-events: none; box-shadow: 0 0 10px rgba(0,242,255,.55); }

/* header turns to glass once you scroll */
.gx-header { transition: background .3s, box-shadow .3s, backdrop-filter .3s; }
.gx-header .gx-bar { transition: padding .3s; }
.gx-header .gx-brand img { transition: width .3s, height .3s; }
.gx-header.is-scrolled { background: rgba(2,6,23,.74) !important; -webkit-backdrop-filter: blur(14px) saturate(1.4); backdrop-filter: blur(14px) saturate(1.4); box-shadow: 0 6px 24px rgba(0,0,0,.35); }
.gx-header.is-scrolled .gx-bar { padding-top: .5rem !important; padding-bottom: .5rem !important; }
.gx-header.is-scrolled .gx-brand img { width: 34px; height: 34px; }

/* the page fades in */
@media (prefers-reduced-motion: no-preference) { body { animation: mo-page .6s ease both; } }
@keyframes mo-page { from { opacity: 0; } to { opacity: 1; } }

/* reveal on scroll (only hidden when the script is running, so nothing is lost without JavaScript) */
.mo-js [data-mo] { opacity: 0; translate: 0 34px; scale: .985; transition: opacity .8s cubic-bezier(.2,.7,.2,1) var(--d, 0s), translate .9s cubic-bezier(.2,.7,.2,1) var(--d, 0s), scale .9s cubic-bezier(.2,.7,.2,1) var(--d, 0s); }
.mo-js [data-mo="l"] { translate: -42px 0; }
.mo-js [data-mo="r"] { translate: 42px 0; }
.mo-js [data-mo="m"] { translate: 0 22px; scale: .94; }
.mo-js [data-mo].in { opacity: 1; translate: 0 0; scale: 1; }
.mo-js [data-mo].in.mo-tilt { transition: opacity .8s, translate .9s, scale .9s, transform .25s ease-out; }

/* headline words light up as you scroll */
.mo-w { opacity: .2; transition: opacity .18s linear; }
.mo-hw { display: inline-block; animation: mo-rise .85s cubic-bezier(.2,.7,.2,1) both; animation-delay: calc(var(--i, 0) * 70ms + .15s); }
@keyframes mo-rise { from { opacity: 0; transform: translateY(.6em); } to { opacity: 1; transform: none; } }

/* buttons feel alive */
.hm-btn, .gb-btn, .btn, .jl-form-submit-btn { transition: transform .2s ease, filter .2s ease, box-shadow .2s ease !important; }
.hm-btn:hover, .gb-btn:hover, .btn:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(0,242,255,.18); }

/* Devices that ask for reduced motion still get gentle fades and the word highlight, but no big movement, parallax, drift or tilt */
@media (prefers-reduced-motion: reduce) {
  .mo-js [data-mo], .mo-js [data-mo="l"], .mo-js [data-mo="r"], .mo-js [data-mo="m"] { translate: 0 12px; scale: 1; transition: opacity .6s ease var(--d, 0s), translate .6s ease var(--d, 0s); }
  .mo-js [data-mo].in { translate: 0 0; }
  .mo-hw { animation-duration: .5s; }
  body::before { transform: none !important; }
}
