/* sky.css — the Atlas night sky (pairs with ../js/sky.js). Colours come from the page's custom properties. */

/* page layer: fixed, full viewport, behind everything. ALL stars and shooting stars live here (sky.js).
   Page content must be position:relative; z-index:1 so it sits above. */
.sky-page{position:fixed;inset:0 0 auto 0;height:100lvh;z-index:0;pointer-events:none;overflow:hidden;background:var(--color-night,#0b121b)}
.sky-page canvas{position:absolute;left:0;top:0;display:block;pointer-events:none}
/* a non-scrolling design-canvas frame as tall as the page: the layer covers the whole body */
html.is-frame body{position:relative}
html.is-frame .sky-page{position:absolute;inset:0;height:auto}

/* hero: the globe only (transparent outside the disc, opaque night inside) + the figure; the page sizes the box */
.hero-scene{position:relative;pointer-events:none}
.hero-scene .sky-hero-canvas{position:absolute;inset:0;width:100%;height:100%;display:block}
.hero-scene .sky-figure{
  position:absolute;background:var(--color-sky-2,#d6e9fb);opacity:.9;pointer-events:none;
  -webkit-mask:url(../assets/atlas.png) center/contain no-repeat;
  mask:url(../assets/atlas.png) center/contain no-repeat;
}

/* horizon: the same globe, a much larger sphere, only its top cap; sinks into the footer's night */
.close-horizon{position:relative;pointer-events:none;overflow:hidden}
.close-horizon .sky-horizon-canvas{
  position:absolute;inset:0;width:100%;height:100%;display:block;
  -webkit-mask-image:linear-gradient(90deg,transparent 0,#000 6%,#000 94%,transparent 100%),linear-gradient(180deg,#000 0,#000 70%,transparent 100%);
  mask-image:linear-gradient(90deg,transparent 0,#000 6%,#000 94%,transparent 100%),linear-gradient(180deg,#000 0,#000 70%,transparent 100%);
  -webkit-mask-composite:source-in;mask-composite:intersect;
}

/* shooting star (CRM): 150 x 2 streak on the page layer, behind all content */
.sky-shoot-star{
  position:absolute;left:0;top:0;z-index:0;width:150px;height:2px;border-radius:2px;
  transform-origin:0 50%;pointer-events:none;will-change:transform;
  background:linear-gradient(90deg,transparent,var(--color-sky-2,#d6e9fb));
  box-shadow:0 0 6px rgb(214 233 251/.5);
}
@media (prefers-reduced-motion:reduce){.sky-shoot-star{display:none}}
html.is-frame .sky-shoot-star{display:block;will-change:auto}
