/* Harpenden Santa: the moving hero (The Studio, 29 Nov 2026). Drop-in, CSS only, no libraries.
   Jamie's brief: the reindeer and Santa gallop and float in front of the moon and never leave the screen; the clouds move;
   Godfrey's searchlight sways gently; the low cloud between the rooftops ebbs and flows; the moon turns very gently, as if in 3D.
   It replaces the hero's santa-drift and santa-fog divs and the two searchlight SVGs (they now sit inside the frames).
   Keep santa-hero-wide.webp / santa-hero-phone.webp as the hero background: it shows while the layers load,
   and for visitors with reduced motion every layer simply stands still on the same picture. */
.santa-hero .santa-loop{position:absolute;inset:0;z-index:1;overflow:hidden;pointer-events:none;container-type:size;isolation:isolate}
.santa-loop__frame{position:absolute;left:50%;transform:translateX(-50%)}
/* desktop: the same crop as the background (center bottom, cover) */
.santa-loop__frame--wide{bottom:0;width:max(100cqw,calc(100cqh * 1640 / 624));aspect-ratio:1640/624}
/* phones: center top, cover */
.santa-loop__frame--phone{top:0;width:max(100cqw,calc(100cqh * 1080 / 2340));aspect-ratio:1080/2340;display:none}
@media (max-width:700px){.santa-loop__frame--wide{display:none}.santa-loop__frame--phone{display:block}}
.santa-loop .sl-l{position:absolute;inset:0;width:100%;height:100%;display:block;max-width:none}
.santa-loop .sl-screen{mix-blend-mode:screen}
.santa-loop .santa-searchlight{position:absolute;inset:0;width:100%;height:100%;overflow:visible;display:block}
/* the moon: the picture slides slowly behind a fixed round edge and shading, so it reads as a globe turning */
.santa-loop .sl-moon{position:absolute;border-radius:50%;overflow:hidden;filter:brightness(1.07) saturate(1.06) contrast(1.03)}
.santa-loop .sl-moon i{position:absolute;inset:-6%;background:url(../img/santa/loop/santa-loop-moon.webp) center/100% 100% no-repeat;animation:santa-moon-turn 70s ease-in-out infinite alternate;will-change:transform}
.santa-loop .sl-moon::after{content:"";position:absolute;inset:0;border-radius:50%;background:radial-gradient(circle at 46% 44%,transparent 56%,rgba(40,22,0,.20) 80%,rgba(20,10,0,.42) 100%)}
@keyframes santa-moon-turn{0%{transform:translateX(-3.6%) rotate(-1.2deg)}100%{transform:translateX(3.6%) rotate(1.2deg)}}
/* the team: five slices of the sleigh artwork, each reindeer pair a beat behind the one in front, the whole team floating on the moon */
.santa-loop .sl-team{position:absolute;aspect-ratio:826/386;transform:rotate(-5deg);filter:drop-shadow(0 0 4px rgba(255,190,90,.55)) drop-shadow(0 0 14px rgba(251,175,51,.30))}
.santa-loop .sl-team b{position:absolute;inset:0;animation:santa-float 16s ease-in-out infinite;will-change:transform}
.santa-loop .sl-team i{position:absolute;inset:0;background:url(../img/santa/loop/santa-loop-sleigh.webp) 0 0/100% 100% no-repeat;animation:santa-gallop .95s linear infinite;will-change:transform}
.santa-loop__frame--wide .sl-moon{left:61.524%;top:5.609%;width:21.341%;height:56.090%}
.santa-loop__frame--wide .sl-team{left:63.415%;top:20.192%;width:17.073%}
.santa-loop__frame--phone .sl-moon{left:58.981%;top:4.231%;width:37.963%;height:17.521%}
.santa-loop__frame--phone .sl-team{left:43.519%;top:9.872%;width:37.037%}

@keyframes santa-gallop{0%{transform:translateY(0.00%) rotate(3.08deg)}12%{transform:translateY(1.06%) rotate(2.79deg)}25%{transform:translateY(1.50%) rotate(0.86deg)}38%{transform:translateY(1.06%) rotate(-1.58deg)}50%{transform:translateY(0.00%) rotate(-3.08deg)}62%{transform:translateY(-1.06%) rotate(-2.79deg)}75%{transform:translateY(-1.50%) rotate(-0.86deg)}88%{transform:translateY(-1.06%) rotate(1.58deg)}100%{transform:translateY(-0.00%) rotate(3.08deg)}}
@keyframes santa-gallop-sleigh{0%{transform:translateY(0.00%) rotate(0.77deg)}12%{transform:translateY(0.35%) rotate(0.70deg)}25%{transform:translateY(0.50%) rotate(0.21deg)}38%{transform:translateY(0.35%) rotate(-0.39deg)}50%{transform:translateY(0.00%) rotate(-0.77deg)}62%{transform:translateY(-0.35%) rotate(-0.70deg)}75%{transform:translateY(-0.50%) rotate(-0.21deg)}88%{transform:translateY(-0.35%) rotate(0.39deg)}100%{transform:translateY(-0.00%) rotate(0.77deg)}}
.santa-loop .sl-team i:nth-child(1){clip-path:inset(0 83.9% 0 0.0%);transform-origin:8.05% 62%;animation-delay:-0.000s}
.santa-loop .sl-team i:nth-child(2){clip-path:inset(0 66.1% 0 15.8%);transform-origin:25.00% 62%;animation-delay:-0.199s}
.santa-loop .sl-team i:nth-child(3){clip-path:inset(0 48.3% 0 33.6%);transform-origin:42.80% 62%;animation-delay:-0.399s}
.santa-loop .sl-team i:nth-child(4){clip-path:inset(0 27.1% 0 51.4%);transform-origin:62.30% 62%;animation-delay:-0.598s}
.santa-loop .sl-team i:nth-child(5){clip-path:inset(0 0.0% 0 72.6%);transform-origin:86.45% 62%;animation-delay:-0.798s;animation-name:santa-gallop-sleigh}

@keyframes santa-float{0%,100%{transform:translate(0,0) rotate(0)}30%{transform:translate(-1%,-3%) rotate(-.6deg)}62%{transform:translate(.7%,1.8%) rotate(.4deg)}}
/* the cloud over the moon drifts, its shadow (the matte) with it */
.santa-loop .sl-clouds,.santa-loop .sl-matte{animation:santa-cloud 38s ease-in-out infinite alternate;will-change:transform}
@keyframes santa-cloud{0%{transform:translateX(0)}100%{transform:translateX(-1.4%) translateY(.2%)}}
/* the low cloud between the rooftops ebbs and flows */
.santa-loop .sl-fog1{animation:santa-ebb 26s ease-in-out infinite alternate;will-change:transform,opacity}
.santa-loop .sl-fog2{animation:santa-ebb 32s ease-in-out -9s infinite alternate-reverse;will-change:transform,opacity}
@keyframes santa-ebb{0%{transform:translate(-1.4%,0) scaleY(1);opacity:.8}50%{opacity:1}100%{transform:translate(1.4%,-.6%) scaleY(1.03);opacity:.88}}
@media (prefers-reduced-motion:reduce){.santa-loop *,.santa-loop .sl-team b,.santa-loop .sl-team i,.santa-loop .sl-moon i{animation:none!important}}
