/* Welcome intro on the homepage: a Brighton seafront at dusk, the logo, and our friends flying in.
   Shown once per visit, skipped with a click or any key, and never shown in calm mode or with reduced motion. */
html.xi-on,html.xi-on body{overflow:hidden}
.xd-intro{position:fixed;inset:0;z-index:9999;overflow:hidden;background:#0d1b3f;cursor:pointer;transition:opacity .7s ease,transform .8s cubic-bezier(.7,0,.3,1)}
.xd-intro.xi-out{opacity:0;transform:translateY(-6%);pointer-events:none}
.xi-scene{position:absolute;inset:0;width:100%;height:100%;animation:xiscene 1.8s ease-out both}
@keyframes xiscene{from{transform:scale(1.08);filter:brightness(.5)}to{transform:none;filter:none}}
.xi-scene .tw{animation:xitw 2.7s ease-in-out infinite alternate}
@keyframes xitw{to{opacity:.25}}
.xi-scene .xi-bunting{animation:xibunt 1.5s 0.45s cubic-bezier(.3,1.4,.5,1) both;transform-origin:800px 0}
@keyframes xibunt{from{transform:translateY(-120px)}}
.xi-scene .xi-wheel{transform-origin:1454px 650px;animation:xispin 9s linear infinite}
@keyframes xispin{to{transform:rotate(360deg)}}
.xi-scene .xi-pod{animation:xipod 6s ease-in-out infinite alternate}
@keyframes xipod{from{transform:translateY(120px)}to{transform:translateY(-120px)}}
.xi-scene .xi-waves{animation:xiwave 4.5s ease-in-out infinite alternate}
@keyframes xiwave{to{transform:translateX(30px)}}

/* the logo, popping in with a glow */
.xi-centre{position:absolute;left:50%;top:40%;transform:translate(-50%,-50%);text-align:center;width:min(80vw,560px);z-index:3}
.xi-logo{background:#fff;border-radius:26px;padding:clamp(12px,2.4vw,22px);box-shadow:0 0 0 6px rgba(255,255,255,.25),0 0 60px 10px rgba(255,213,79,.55),0 24px 60px rgba(0,0,0,.4);animation:xilogo 1.35s 0.52s cubic-bezier(.3,1.5,.5,1) both}
.xi-logo img{display:block;width:100%;height:auto}
@keyframes xilogo{from{transform:scale(.2) rotate(-8deg);opacity:0}to{transform:none;opacity:1}}

/* our Elf in the flying beach hut, crossing the sky */
.xi-hut{position:absolute;top:9%;left:0;width:clamp(120px,15vw,210px);z-index:5;animation:xihut 7.5s 0.9s cubic-bezier(.45,.05,.55,.95) both}
.xi-hut svg{width:100%;height:auto;overflow:visible}
@keyframes xihut{0%{transform:translate(-30vw,30px) rotate(-8deg)}50%{transform:translate(40vw,-20px) rotate(4deg)}100%{transform:translate(110vw,20px) rotate(-4deg)}}
.xi-hut .th-swirl{transform-origin:60px 78px;animation:xispin 7.5s linear infinite}
.xi-hut .th-elf{transform-origin:34px 62px;animation:xielf 2.1s ease-in-out infinite alternate}
.xi-hut .th-wave{transform-origin:2px 77px;animation:xiwav 0.75s ease-in-out infinite alternate}
@keyframes xielf{to{transform:rotate(9deg)}}
@keyframes xiwav{to{transform:rotate(-30deg)}}

/* a Fairy, flitting up from the sea with a trail of sparkles */
.xi-fairy{position:absolute;left:14%;top:60%;width:clamp(64px,7vw,100px);z-index:4;animation:xifairy 6.3s 1.8s ease-in-out both}
.xi-fairy svg{width:100%;height:auto;display:block}
@keyframes xifairy{0%{transform:translate(-20vw,20vh) scale(.6);opacity:0}15%{opacity:1}45%{transform:translate(4vw,-8vh) rotate(-6deg)}70%{transform:translate(12vw,-2vh) rotate(4deg)}100%{transform:translate(8vw,-18vh) rotate(-3deg)}}
.xi-wings{transform-origin:60px 40px;animation:xiflap 0.27s ease-in-out infinite alternate}
@keyframes xiflap{to{transform:scaleX(.55)}}
.xi-dust{position:absolute;right:6%;top:18%;width:8px;height:8px;border-radius:50%;background:#fff3b0;box-shadow:0 0 10px 3px #ffd54f;animation:xidust 1.5s linear infinite}
.xi-dust.d2{animation-delay:-.33s;width:6px;height:6px}.xi-dust.d3{animation-delay:-.66s;width:5px;height:5px}
@keyframes xidust{from{transform:translate(0,0);opacity:1}to{transform:translate(-70px,40px);opacity:0}}

/* a Brighton seagull, making off with a chip */
.xi-gull{position:absolute;top:26%;right:0;width:clamp(70px,8vw,120px);z-index:2;animation:xigull 6s 2.1s linear both}
.xi-gull svg{width:100%;height:auto;display:block;transform:scaleX(-1)}
@keyframes xigull{from{transform:translate(20vw,10px)}to{transform:translate(-120vw,-40px)}}
.xi-gwing{transform-origin:58px 36px;animation:xigw 0.45s ease-in-out infinite alternate}
@keyframes xigw{to{transform:scaleY(-.6)}}

/* our Weaving Spider, dropping down to say hello */
.xi-spider{position:absolute;top:0;right:clamp(14px,2.5vw,40px);display:flex;flex-direction:column;align-items:center;z-index:4;animation:xidrop 1.8s 2.85s cubic-bezier(.3,1.5,.5,1) both}
.xi-thread{display:block;width:2px;height:clamp(90px,18vh,170px);background:linear-gradient(rgba(255,255,255,.9),rgba(255,255,255,.5))}
.xi-spider svg{width:clamp(46px,5vw,66px);height:auto;animation:xibob 3s ease-in-out infinite alternate}
@keyframes xidrop{from{transform:translateY(-110%)}}
@keyframes xibob{to{transform:rotate(8deg) translateY(4px)}}

.xi-skip{position:absolute;right:18px;bottom:18px;z-index:5;border:0;border-radius:999px;padding:10px 18px;font:inherit;font-weight:800;background:rgba(255,255,255,.9);color:#12233b;cursor:pointer}
@media (max-width:640px){.xi-centre{top:40%}.xi-spider{right:14px}}

/* hints of each of our projects, arriving one after another */
/* Timeless Kin: a constellation drawing itself across the sky */
.xi-kin{position:absolute;left:3%;top:16%;width:clamp(150px,20vw,300px);z-index:1;overflow:visible}
.xi-kinline{stroke-dashoffset:400;stroke-dasharray:400;animation:xidraw 2.4s 1.5s ease-out forwards}
.xi-ks{opacity:0;transform-box:fill-box;transform-origin:center;filter:drop-shadow(0 0 6px #ffe9a8);animation:xistar 0.9s ease-out forwards}
@keyframes xidraw{to{stroke-dashoffset:0}}
@keyframes xistar{from{opacity:0;transform:scale(.2)}to{opacity:1;transform:none}}
/* National Care Leavers Month: our web, woven in the corner, and the spider comes down from it */
.xi-web{position:absolute;top:0;right:0;width:clamp(120px,16vw,230px);z-index:1}
.xi-wspoke{stroke-dasharray:260;stroke-dashoffset:260;animation:xidraw 1.35s 1.35s ease-out forwards}
.xi-wring{stroke-dasharray:320;stroke-dashoffset:320;animation:xidraw1 1.65s 2.25s ease-out forwards}
@keyframes xidraw1{to{stroke-dashoffset:0}}
/* Books, Belonging & Brighter Futures: books flying across with flapping pages */
.xi-books{position:absolute;left:0;top:76%;z-index:4;animation:xibooks 6s 3s linear both}
.xi-book{width:clamp(40px,4.4vw,64px);height:auto;display:inline-block;transform-origin:50% 50%;animation:xipage 0.52s ease-in-out infinite alternate}
.xi-book.b2{margin-left:18px;margin-top:30px;animation-delay:-.17s;width:clamp(34px,3.6vw,52px)}
@keyframes xibooks{from{transform:translate(-15vw,30px)}to{transform:translate(110vw,-50px)}}
@keyframes xipage{to{transform:scaleX(.45) rotate(-6deg)}}
/* Christmas Crackers: a cracker swoops in and pops */
.xi-cracker{position:absolute;left:58%;top:57%;width:clamp(110px,13vw,190px);z-index:4;animation:xicrk 1.5s 3.9s cubic-bezier(.3,1.3,.5,1) both}
.xi-cracker svg{width:100%;height:auto;overflow:visible;display:block;transform:rotate(-12deg)}
@keyframes xicrk{from{transform:translate(40vw,-30vh) rotate(40deg);opacity:0}to{transform:none;opacity:1}}
.xi-cl{animation:xicl 0.75s 5.4s ease-out forwards}.xi-cr{animation:xicr 0.75s 5.4s ease-out forwards}
@keyframes xicl{to{transform:translate(-26px,6px) rotate(-14deg)}}
@keyframes xicr{to{transform:translate(26px,-6px) rotate(14deg)}}
.xi-pop rect{opacity:0;transform-box:fill-box;transform-origin:center;animation:xiconf 1.65s 5.47s ease-out forwards}
@keyframes xiconf{0%{opacity:1;transform:translate(0,0)}100%{opacity:0;transform:translate(var(--dx),var(--dy)) rotate(var(--r))}}
/* Elves on the Shelf: an Elf pops up from behind the beach huts, waving */
.xi-elf{position:absolute;left:7%;bottom:27%;width:clamp(46px,5vw,72px);z-index:1;animation:xielfup 1.05s 4.5s cubic-bezier(.3,1.6,.5,1) both}
.xi-elf svg{width:100%;height:auto;overflow:visible;display:block}
.xi-elf .xi-elfwave{transform-origin:2px 77px;animation:xiwav 0.68s ease-in-out infinite alternate}
@keyframes xielfup{from{transform:translateY(120%)}}
@media (max-width:640px){.xi-kin{top:14%;width:150px}.xi-web{width:110px}.xi-cracker{left:52%;top:58%}.xi-elf{left:5%}}
/* a flavour of our real Fairies, Elves, Crackers and Timeless Kin */
.xi-chips{position:absolute;inset:0;pointer-events:none;z-index:4}
.xi-chip{position:absolute;right:0;display:flex;align-items:center;gap:10px;padding:8px 16px 8px 8px;border-radius:999px;background:rgba(255,255,255,.95);color:#12233b;box-shadow:0 0 0 3px var(--c),0 10px 26px rgba(0,0,0,.35);white-space:nowrap;opacity:0;animation:xichip 6.5s linear forwards}
.xi-chip-ic{display:grid;place-items:center;width:34px;height:34px;border-radius:50%;background:var(--c);font-size:18px}
.xi-chip b{display:block;font-size:.98rem;line-height:1.1}.xi-chip small{display:block;font-size:.78rem;font-weight:700;opacity:.75}
@keyframes xichip{0%{opacity:0;transform:translateX(30%)}8%{opacity:1}85%{opacity:1}100%{opacity:0;transform:translateX(-110vw)}}
