/* Landing first screen («living universe»): CSS animations; the Earth is drawn by /assets/hero/globe.js (WebGL). */
.header{position:relative;z-index:3}
.uni{position:relative;min-height:min(calc(100vh - 92px),860px);display:flex;align-items:center;padding:40px 0 90px;isolation:isolate}
.uni-scene{position:absolute;z-index:-1;top:-92px;bottom:-40px;left:calc(50% - 50vw);width:100vw;overflow:hidden;pointer-events:none}
.uni-scene img{display:block;width:100%;height:auto;-webkit-user-drag:none}

/* Far layers: deep space (Codex backdrop) and stars */
.uni-bg{position:absolute;inset:0;background:url(/assets/hero/bg-space.webp) center right/cover no-repeat}
.uni-bg:after{content:"";position:absolute;inset:0;background:linear-gradient(180deg,rgba(8,11,16,0) 62%,#080b10 100%),linear-gradient(90deg,#080b10 0%,rgba(8,11,16,.6) 24%,rgba(8,11,16,0) 46%)}
.uni-stars{position:absolute;inset:-10%;background-repeat:repeat}
.uni-stars.s1{background-image:radial-gradient(circle,#f3ead0 1px,transparent 1.6px),radial-gradient(circle,#9fd8ff 1px,transparent 1.6px);background-size:131px 149px,197px 211px;background-position:0 0,40px 60px;opacity:.55;animation:uni-twinkle 5s ease-in-out infinite alternate}
.uni-stars.s2{background-image:radial-gradient(circle,#ffffff 1.4px,transparent 2px);background-size:263px 241px;background-position:90px 30px;opacity:.75;animation:uni-twinkle 3.6s ease-in-out infinite alternate-reverse}

/* The stage on the right where the heroes live */
.uni-stage{position:absolute;top:70px;bottom:0;right:max(0px,calc(50vw - 660px));width:min(48vw,720px)}
.uni-stage>*{position:absolute}
.p{will-change:transform}

/* The Earth is drawn live by proto/globe.js (WebGL); the canvas has room around the sphere for the atmosphere
   glow (sphere radius = canvas half-size / 1.14). Until it is ready, or without WebGL, a still picture shows. */
.uni-planet{width:73%;right:-18.5%;bottom:-10.5%;z-index:1}
.uni-planet:before{content:"";position:absolute;inset:6.1%;border-radius:50%;background:url(/assets/hero/globe-poster.webp) center/cover;box-shadow:0 0 70px 6px rgba(110,160,255,.35);transition:opacity .8s}
.uni-planet:has(.globe-gl.ready):before{opacity:0}
.globe-gl{position:relative;display:block;width:100%;height:auto;aspect-ratio:1;opacity:0;transition:opacity .8s}
.globe-gl.ready{opacity:1}

/* The bolts ship far away, small and a little dimmed */
.uni-ship{width:22%;left:8%;top:2%;opacity:.9;z-index:1}
.uni-ship img{animation:uni-float 9s ease-in-out infinite;--r0:-14deg;--r1:-10deg;filter:brightness(.85) saturate(.9) drop-shadow(0 0 30px rgba(80,140,255,.25))}
/* The hero: the Mini Cosmos astronaut */
.uni-astro{width:50%;left:22%;top:14%;z-index:1}
.uni-astro img{animation:uni-float 7s ease-in-out -2s infinite;--r0:-6deg;--r1:2deg;--dy:-22px;filter:drop-shadow(0 34px 50px rgba(0,0,0,.55)) drop-shadow(0 0 60px rgba(120,160,255,.28))}
/* The ginger kitten from Cosmo Blast */
.uni-cat{left:70%;top:4%;width:27%;z-index:1}
.uni-cat img{animation:uni-bob 4.2s ease-in-out infinite}

/* The shuttle circles in the background without end, nose along the flight, behind every hero
   (z-index 0, like the rocks, under the heroes' 1), a little smaller and dimmer as befits the distance. */
.uni-shuttle{width:40px;left:0;top:0;z-index:0;offset-path:path("M 70 330 C 70 240, 300 190, 460 196 C 600 202, 660 250, 625 300 C 585 360, 360 432, 210 424 C 120 418, 70 386, 70 330 Z");offset-rotate:auto 90deg;offset-anchor:50% 50%;animation:uni-orbit 18s linear infinite}
.uni-shuttle .body{position:relative;filter:brightness(.82) saturate(.9)}
.uni-shuttle .flame{position:absolute;width:64%;left:18%;top:86%;transform-origin:50% 0;filter:drop-shadow(0 0 10px rgba(255,150,60,.8));animation:uni-flame .16s steps(2) infinite alternate}

/* Rocks and dust (Codex art): behind the planet and the heroes, so no rock hangs over the Earth */
.uni-dust{position:absolute;inset:0;z-index:0;background:url(/assets/hero/bg-dust.webp) center/cover no-repeat;opacity:.9}

@keyframes uni-twinkle{from{opacity:.25}to{opacity:.8}}
@keyframes uni-float{0%,100%{transform:translate3d(0,0,0) rotate(var(--r0,-1.5deg))}50%{transform:translate3d(0,var(--dy,-14px),0) rotate(var(--r1,1.5deg))}}
@keyframes uni-bob{0%,100%{transform:translate3d(0,0,0) rotate(-6deg)}50%{transform:translate3d(6px,-16px,0) rotate(5deg)}}
@keyframes uni-flame{from{transform:scaleY(.85);opacity:.85}to{transform:scaleY(1.15);opacity:1}}
@keyframes uni-orbit{0%{offset-distance:0%;transform:scale(.8)}25%{transform:scale(.68)}50%{transform:scale(.8)}75%{transform:scale(.9)}100%{offset-distance:100%;transform:scale(.8)}}

/* Scroll parallax where supported: farther layers move less */
@supports (animation-timeline:scroll()){
  .p{animation:uni-px linear both;animation-timeline:scroll(root);animation-range:0 100vh}
  .p.far{--px:-60px}.p.mid{--px:-140px}.p.near{--px:-260px}.p.front{--px:-420px}
  @keyframes uni-px{to{transform:translate3d(0,var(--px),0)}}
}

/* Text */
.uni-copy{position:relative;max-width:560px}
.uni-copy h1{font-family:var(--display);font-size:clamp(44px,5.6vw,84px);font-weight:600;letter-spacing:-.055em;line-height:1.02;margin:22px 0 24px}
.uni-copy h1 em{font-style:normal;background:linear-gradient(90deg,#9cc8ff,#d3abff 45%,#ffc870 90%);background-size:200% 100%;-webkit-background-clip:text;background-clip:text;color:transparent;animation:uni-shine 8s ease-in-out infinite alternate}
@keyframes uni-shine{from{background-position:0% 0}to{background-position:100% 0}}
.uni-copy .lead{max-width:500px;color:#b7c2d1}
.uni-cta{display:flex;flex-wrap:wrap;gap:12px;align-items:center;margin-top:32px}
.uni-cta .store.play{min-height:54px;padding:0 26px;font-size:14px;border-radius:14px;box-shadow:0 10px 40px rgba(156,200,255,.25)}
.uni-chips{display:flex;align-items:center;gap:14px;margin-top:30px;color:#8e9bb0;font-size:12.5px}
.uni-chips .faces{display:flex}
.uni-chips .faces a{width:40px;height:40px;border-radius:12px;overflow:hidden;margin-right:-8px;box-shadow:0 0 0 2px #080b10;transition:transform .2s}
.uni-chips .faces a:hover{transform:translateY(-4px) scale(1.06);z-index:1}
.uni-chips .faces img{width:100%;height:100%;display:block}

@media(max-width:860px){
  .uni{min-height:auto;align-items:flex-end;padding:330px 0 56px}
  .uni-stage{width:100%;right:0;top:80px;height:350px;bottom:auto}
  .uni-bg:after{background:linear-gradient(180deg,rgba(8,11,16,0) 30%,rgba(8,11,16,.75) 52%,#080b10 64%)}
  .uni-planet{width:80%;right:-27%;bottom:auto;top:41%}
  .uni-ship{width:22%;left:2%;top:22%}
  .uni-astro{width:54%;left:24%;top:8%}
  .uni-cat{left:68%;top:2%;width:30%}
  .uni-shuttle{width:30px;offset-path:path("M 70 170 C 70 110, 200 70, 300 76 C 380 82, 410 120, 388 150 C 360 190, 240 236, 150 230 C 95 226, 70 205, 70 170 Z")}
  .uni-copy h1{font-size:clamp(38px,11vw,60px)}
}
@media(prefers-reduced-motion:reduce){
  .uni *,.uni *:before{animation:none!important}
  .uni-shuttle{display:none}
}
