/* The trail: the logo's three growing dots light up one by one, and the star at the end (the mascot) flares, opens its
   eyes, blinks and shuts them as it fades. On the home page's hero (home.js plays it) and the sign-in screen
   (trail.js). Uses the page's --accent, --gold and --ease. */
.trail { position: relative; display: flex; align-items: center; gap: 10px; height: 32px; margin-bottom: -4px; }
.trail i { border-radius: 50%; background: var(--accent); opacity: .18; transform: scale(.7);
  transition: opacity .3s var(--ease), transform .5s cubic-bezier(.34, 1.56, .64, 1); }
.trail i:nth-child(1) { width: 9px; height: 9px; } .trail i:nth-child(2) { width: 12px; height: 12px; } .trail i:nth-child(3) { width: 15px; height: 15px; }
.trail .spark { width: 40px; height: 40px; margin-left: 2px; opacity: .25; transform: scale(.8); overflow: visible;
  transition: opacity .35s var(--ease), transform .7s cubic-bezier(.34, 1.7, .64, 1); }
/* the star is the mascot (brand/mascot): asleep at rest, it opens its eyes as it lights up, blinks once while it
   shines, and shuts them again as it fades */
.trail .spark .st { fill: var(--gold); stroke: var(--gold); stroke-width: 95px; stroke-linejoin: round; }
.trail .spark .eye ellipse { fill: #17161C; }
/* the pupil: a soft bite in the body's colour on the side away from the gaze (as brand/mascot's bean) */
.trail .spark .eye .nt { fill: var(--gold); stroke: var(--gold); stroke-linejoin: round; }
.trail .spark .eye { transform-box: fill-box; transform-origin: 59% 50%; transform: scaleY(.12);
  transition: transform .3s var(--ease); }
.trail.lit .spark .eye { transform: none; transition: transform .45s cubic-bezier(.34, 1.56, .64, 1) .1s; }
.trail.glow .spark .eye { animation: trail-blink .34s ease-in-out 1.1s; }
@keyframes trail-blink { 50% { transform: scaleY(.1); } }
.trail.out .spark .eye { transition: transform .5s var(--ease); }
.trail.still .spark .eye { transform: none; }
.trail i.on { opacity: 1; transform: none; }
.trail.lit .spark { opacity: 1; transform: scale(1.06); }
/* while it shines, the spark breathes a little; it always comes back to the same size, so nothing jumps */
.trail.glow .spark { animation: trail-twinkle 1.8s ease-in-out infinite; }
@keyframes trail-twinkle { 50% { opacity: .86; transform: scale(.98); } }
.trail .bits { position: absolute; left: 88px; top: 16px; }
.trail .bits em { position: absolute; width: 6px; height: 6px; margin: -3px; border-radius: 50%; background: var(--gold); opacity: 0; }
.trail .bits em:nth-child(even) { width: 4px; height: 4px; margin: -2px; }
.trail.lit .bits em { animation: trail-bit .8s var(--ease) .08s forwards; }
/* eight sparks, evenly round the star (long and short in turn), so it flares on every side */
.trail .bits em:nth-child(1) { --x: 0px; --y: -34px; }
.trail .bits em:nth-child(2) { --x: 19px; --y: -19px; }
.trail .bits em:nth-child(3) { --x: 34px; --y: 0px; }
.trail .bits em:nth-child(4) { --x: 19px; --y: 19px; }
.trail .bits em:nth-child(5) { --x: 0px; --y: 34px; }
.trail .bits em:nth-child(6) { --x: -19px; --y: 19px; }
.trail .bits em:nth-child(7) { --x: -34px; --y: 0px; }
.trail .bits em:nth-child(8) { --x: -19px; --y: -19px; }
@keyframes trail-bit { 0% { opacity: 0; transform: none; } 15% { opacity: 1; } 100% { opacity: 0; transform: translate(var(--x), var(--y)) scale(.5); } }
/* the end: dots and spark fade back to rest together, slowly and without a turn; the next round starts from there */
.trail.out i, .trail.out .spark { transition: opacity .9s var(--ease), transform .9s var(--ease); }
.trail.still i, .trail.still .spark { opacity: 1; transform: none; }
/* the sign-in star awake (trail.js): now and then a blink, shut fast and open a touch slower */
.trail.awake .spark .eye { transition: transform .15s ease-out; }
.trail.lit .spark .eye.shut { transform: scaleY(.1); transition: transform .09s ease-in; }
