/* Motion layer for the demo. Everything that hides or moves content is scoped to
   html.motion, which is set in <head> only when prefers-reduced-motion is not "reduce".
   Only transform, opacity and clip-path are animated (no layout shift). */

/* ---------- demo label + scroll progress (always on) ---------- */
.demo-tag{position:fixed;left:12px;bottom:12px;z-index:90;display:inline-flex;align-items:center;gap:8px;
  font:600 12px/1 var(--f-body);color:#fff;background:rgba(19,46,99,.9);padding:8px 12px 8px 9px;border-radius:999px;
  box-shadow:0 6px 18px rgba(19,46,99,.25);pointer-events:none;letter-spacing:.01em}
.demo-tag::before{content:"";width:8px;height:8px;border-radius:50%;background:var(--sun)}
.scroll-bar{position:fixed;left:0;top:0;width:100%;height:3px;z-index:80;background:linear-gradient(90deg,var(--red),var(--sun));
  transform-origin:0 50%;transform:scaleX(0);pointer-events:none}

/* ---------- headline words (hero on load, section titles on reveal) ---------- */
.w{display:inline-block;overflow:hidden;vertical-align:top;padding:0 .02em .14em;margin:0 -.02em -.14em}
.w>span{display:inline-block}
.motion .hero h1 .w>span{transform:translateY(110%) rotate(7deg);transform-origin:0 100%;
  animation:wordUp .95s var(--ease-spring) both;animation-delay:calc(.18s + var(--i) * 75ms)}
@keyframes wordUp{to{transform:none}}
.motion .split-h .w>span{transform:translateY(110%) rotate(6deg);transform-origin:0 100%;
  transition:transform .9s var(--ease-spring);transition-delay:calc(var(--i) * 60ms)}
.motion .in .split-h .w>span,.motion .split-h.in .w>span{transform:none}

/* ---------- hero intro sequence ---------- */
@keyframes fadeUp{from{opacity:0;transform:translateY(24px)}}
.motion .hero .week{animation:fadeUp .7s .05s var(--ease-out) both}
.motion .hero-lead{animation:fadeUp .8s .8s var(--ease-out) both}
.motion .hero-ctas{animation:fadeUp .8s .95s var(--ease-out) both}
.motion .hero-trust p{animation:fadeUp .7s var(--ease-out) both}
.motion .hero-trust p:nth-child(1){animation-delay:1.1s}
.motion .hero-trust p:nth-child(2){animation-delay:1.2s}
.motion .hero-trust p:nth-child(3){animation-delay:1.3s}
.motion .court{animation:courtIn 1.15s .2s cubic-bezier(.7,0,.2,1) both}
@keyframes courtIn{from{clip-path:inset(14% 10% 14% 10% round 48px);transform:rotate(-3deg) scale(.96)}
  to{clip-path:inset(0 0 0 0 round 32px);transform:none}}
.motion .court .sticker{animation:stickIn .8s 1.15s var(--ease-spring) both}
.motion .court .sticker.s2{animation-delay:1.3s}
@keyframes stickIn{from{opacity:0;transform:translateY(-36px) scale(.55) rotate(-16deg)}}
/* ball: drops in from above the court, bounces three times, then the arc loop takes over */
.motion .court .ball{animation:ballDrop 1.25s 1.35s linear both,fly 3.2s 2.8s var(--ease-out) infinite}
@keyframes ballDrop{
  0%{transform:translate(-160%,-620%) rotate(-200deg);animation-timing-function:cubic-bezier(.5,0,.9,.6)}
  42%{transform:translate(0,0) rotate(0) scale(1.12,.86);animation-timing-function:cubic-bezier(.2,.6,.4,1)}
  62%{transform:translate(0,-120%) rotate(60deg);animation-timing-function:cubic-bezier(.6,0,.9,.5)}
  76%{transform:translate(0,0) scale(1.06,.92);animation-timing-function:cubic-bezier(.2,.6,.4,1)}
  88%{transform:translate(0,-38%) rotate(90deg);animation-timing-function:cubic-bezier(.6,0,.9,.5)}
  100%{transform:translate(0,0) rotate(90deg)}}
/* the photo gets parallax headroom; motion.js moves it while scrolling */
.motion .court-photo{transform:scale(1.14);will-change:transform}

/* ---------- sports ticker: JS drives it with scroll speed ---------- */
.motion .strip.js-run .strip-track{animation:none;will-change:transform}

/* ---------- programme cards: 3D tilt + light (fine pointers only) ---------- */
.prog .pic::before{content:"";position:absolute;inset:0;z-index:2;pointer-events:none;opacity:0;transition:opacity .3s;
  background:radial-gradient(420px circle at var(--mx,50%) var(--my,30%),rgba(255,255,255,.38),transparent 55%)}
.prog.tilting .pic::before{opacity:1}
.prog.tilting{transition:transform .12s linear,box-shadow .3s}
.motion .progs{perspective:1100px}

/* ---------- odometer numbers ---------- */
.odo,.num .odo{position:relative;display:inline-block;height:.9em;overflow:hidden;vertical-align:top;margin:0;font-size:inherit;color:inherit;max-width:none}
/* the invisible final digit gives each slot its natural width, so "13" keeps its normal spacing */
.num .odo>i{visibility:hidden;font-style:normal;display:inline-block}
.odo-col,.num .odo-col{position:absolute;top:0;left:-.5em;right:-.5em;text-align:center;display:block;margin:0;font-size:inherit;color:inherit;max-width:none;transition:transform 1.5s cubic-bezier(.3,1.25,.4,1)}
.odo-col>span,.num .odo-col>span{display:block;height:.9em;line-height:.9;margin:0;font-size:inherit;color:inherit;max-width:none}

/* ---------- confetti burst ---------- */
.burst{position:fixed;z-index:95;left:0;top:0;width:12px;height:12px;border-radius:50%;pointer-events:none;will-change:transform,opacity}
.burst.sq{border-radius:3px;width:9px;height:14px}

/* ---------- cursor ball (desktop, fine pointer) ---------- */
.cursor-ball{position:fixed;left:0;top:0;z-index:85;width:16px;height:16px;margin:-8px 0 0 -8px;border-radius:50%;pointer-events:none;
  background:var(--sun);box-shadow:inset -3px -3px 0 rgba(0,0,0,.12),0 0 0 2px var(--navy);opacity:0;
  transition:opacity .3s,width .3s var(--ease-spring),height .3s var(--ease-spring),margin .3s var(--ease-spring),background .3s,box-shadow .3s}
.cursor-ball.on{opacity:1}
.cursor-ball.big{width:46px;height:46px;margin:-23px 0 0 -23px;background:rgba(255,200,61,.28);box-shadow:0 0 0 2px var(--sun)}

@media (max-width:560px){.demo-tag{font-size:11px;left:8px;bottom:8px}}
@media (prefers-reduced-motion:reduce){.cursor-ball,.burst{display:none}}
