/* The living sky. Hand-written, not part of the Tailwind build: the storefront
   layout and the assessment funnel layout both link this one file, and
   storefront/partials/sky-live.blade.php is the markup it styles.

   The stars are pale blue on purpose. Arabic body copy is white and full of
   dots, and a white star beside a letter reads as part of the word. */
/* Hero only, so a page never has two moving skies. Five star
   groups fade on different clocks, which reads as single stars twinkling, and
   the three depths slide apart as the page scrolls. Every loop sits inside
   no-preference; without it the stars are simply there, at full strength. */
.sky-live{position:absolute; inset:0; z-index:-1; overflow:hidden; pointer-events:none}
.sky-live i{position:absolute; inset:-120px 0 0; display:block}
.sky-live i::before,.sky-live i::after{content:""; position:absolute; inset:0}
.sky-live .s1::before{background:url('../../assets/funnel/sky-tw-1.svg') 40px 30px/530px 710px}
.sky-live .s1::after{background:url('../../assets/funnel/sky-tw-2.svg') 210px 150px/690px 470px}
.sky-live .s2::before{background:url('../../assets/funnel/sky-tw-3.svg') 90px 60px/830px 590px}
.sky-live .s2::after{background:url('../../assets/funnel/sky-tw-4.svg') 300px 10px/610px 970px}
.sky-live .s3::before{background:url('../../assets/funnel/sky-tw-5.svg') 160px 110px/1090px 770px}
.sky-live .s3::after{content:none}
.sky-live b{position:absolute; top:12%; left:62%; width:150px; height:2px; border-radius:2px; opacity:0;
  background:linear-gradient(to right, #fff, rgba(255,255,255,0)); --sx:-360px; --sy:159px}
@media (max-width:759px){
  /* On a phone the copy fills the hero, so the big haloed stars would sit in
     the middle of sentences. Two groups of small ones stay. */
  .sky-live i::after{content:none}
  .sky-live .s3{display:none}
  .sky-live b{left:70%; width:96px; --sx:-220px; --sy:97px}
}
@media (prefers-reduced-motion:no-preference){
  .sky-live i::before,.sky-live i::after{animation:sky-twinkle 5.3s ease-in-out infinite alternate}
  .sky-live .s1::after{animation-duration:7.1s; animation-delay:-2.4s}
  .sky-live .s2::before{animation-duration:4.3s; animation-delay:-1.1s}
  .sky-live .s2::after{animation-duration:8.3s; animation-delay:-5s}
  .sky-live .s3::before{animation-duration:6.1s; animation-delay:-3.3s}
  .sky-live b{animation:sky-shoot 23s linear 5s infinite}
  .hero-b .moon,.auth .moon{animation:sky-float 9s ease-in-out infinite alternate}
  .is-asleep > .sky-live i::before,.is-asleep > .sky-live i::after,
  .is-asleep > .sky-live b,.is-asleep .moon{animation-play-state:paused}
  @supports (animation-timeline:scroll()){
    .sky-live i{animation:sky-drift linear both; animation-timeline:scroll(root block); animation-range:0px 100vh}
    .sky-live .s1{--drift:28px}
    .sky-live .s2{--drift:66px}
    .sky-live .s3{--drift:118px}
  }
}
@keyframes sky-twinkle{0%,30%{opacity:1} 100%{opacity:.14}}
@keyframes sky-drift{to{transform:translate3d(0,var(--drift,0px),0)}}
@keyframes sky-float{from{transform:translate3d(0,0,0) rotate(0deg)} to{transform:translate3d(0,-10px,0) rotate(-4deg)}}
/* One streak every 23 seconds: it is on screen for under a second of that. */
@keyframes sky-shoot{
  0%{opacity:0; transform:translate3d(0,0,0) rotate(-23.8deg) scaleX(.3)}
  .6%{opacity:1}
  3.4%{opacity:0; transform:translate3d(var(--sx),var(--sy),0) rotate(-23.8deg) scaleX(1)}
  100%{opacity:0; transform:translate3d(var(--sx),var(--sy),0) rotate(-23.8deg) scaleX(1)}
}

/* The deep sky. sky-canvas.js draws every star on a canvas and marks the hero
   .sky-on, which takes the still stars out from under it: the tiles and streak
   here, and the star tile in the hero's own background. */
.sky-canvas{position:absolute; inset:0; width:100%; height:100%}
.sky-on > .sky-live i,.sky-on > .sky-live b{display:none}
.sky.sky-on{background:url('../../assets/funnel/sky-wash-v2.jpg') center/cover var(--navy)}
.hero.sky-on{--sky-field:none}
