/* Real skyline hero (2026-11-11). Replaces the live 3D build with a real photo of Kuala Lumpur at dusk
   (Unsplash photo 1596422846543-75c6fc197f07, Unsplash License). The header is taller than the screen and the
   scene sticks while you scroll through it: the camera pulls back over the city, the headline lifts away,
   and a drone light show spells "JOLLITECH" in the sky BEHIND the towers (assets/hero-kl-sky.png masks it to open sky only).
   theme-skyline.js writes --p (0..1, eased scroll progress) on the header; everything else is derived here.
   Layered over company.css + theme-prisma.css; built by output/hero-work/make-sky-mask.mjs. */

#jollitech-site .jt-hero.jt-sky{
  --p:0;
  --run:140svh;                                          /* scroll distance the scene stays pinned */
  --cp:clamp(0,calc(var(--p) / .34),1);                  /* copy leaving */
  --nt:clamp(0,calc((var(--p) - .08) / .3),1);           /* night falling */
  --et:clamp(0,calc((var(--p) - .7) / .22),1);           /* end caption */
  position:relative;height:calc(100svh + var(--run));min-height:0;
  overflow:visible;background:none;border-radius:0;isolation:isolate
}
#jollitech-site .jt-sky-pin{
  position:sticky;top:0;height:100svh;overflow:hidden;isolation:isolate;
  border-radius:0 0 32px 32px;background:#020617
}

/* Scene: the photo covers the pin like object-fit:cover, but as a box so the brand mask lines up pixel for pixel. */
#jollitech-site .jt-sky-art{position:absolute;inset:0;z-index:0;margin:0;width:auto;height:auto}
#jollitech-site .jt-sky-stage{position:absolute;inset:0;width:100%;height:100%;aspect-ratio:auto;container-type:size;transform:none!important;overflow:hidden}
/* Drone camera: starts low and close, pitched down over the city, then climbs and levels out as you scroll.
   --q is the distance left to travel, squared, so the climb starts quickly and glides to a stop. */
#jollitech-site .jt-sky-cam{position:absolute;inset:0;transform-origin:51% 38%;
  --q:calc((1 - var(--p)) * (1 - var(--p)));
  transform:perspective(1800px) translate3d(0,calc(var(--q) * -6%),0) rotateX(calc(var(--q) * 8deg)) rotateZ(calc(var(--q) * -1.2deg)) scale(calc(1 + .2 * var(--q)));
  will-change:transform;backface-visibility:hidden}
#jollitech-site .jt-sky-drift{position:absolute;inset:0;transform-origin:51% 40%;animation:jt-sky-drift 26s ease-in-out infinite alternate}
#jollitech-site .jt-sky-art[data-motion="paused"] .jt-sky-drift{animation-play-state:paused}
@keyframes jt-sky-drift{
  0%{transform:scale(1) translate3d(0,0,0)}
  50%{transform:scale(1.018) translate3d(-.35%,.2%,0)}
  100%{transform:scale(1.03) translate3d(.3%,-.25%,0)}
}
#jollitech-site .jt-sky-scene{
  /* --sh is the scene height. The scene is centred, but on wide, short screens (a desktop browser window) that
     crops the sky off the top and hides the word under the nav, so it is lowered until the word clears the nav
     (word top = 9.5% of the scene), never leaving a gap above or below the photo. */
  --sh:max(calc(100cqw * 1613 / 2400),100cqh);
  position:absolute;left:50%;top:0;
  width:max(100cqw,calc(100cqh * 2400 / 1613));aspect-ratio:2400/1613;
  transform:translate(-50%,clamp(calc(100cqh - var(--sh)),max(calc(50cqh - .48 * var(--sh)),calc(var(--sky-safe,96px) - .095 * var(--sh))),0px));
  container-type:inline-size
}
#jollitech-site .jt-sky-photo{position:absolute;inset:0;width:100%;height:100%;max-width:none;display:block;object-fit:fill;border-radius:0}

/* Sky layer, clipped to open sky by the mask so the lit towers keep their glow. The drone light show itself
   (theme-skyline.js, .jt-sky-drones) flies in front of the city, like a real show. */
#jollitech-site .jt-sky-brand{position:absolute;inset:0;pointer-events:none;
  -webkit-mask:url("hero-kl-sky.png") 0 0/100% 100% no-repeat;mask:url("hero-kl-sky.png") 0 0/100% 100% no-repeat}
/* Night falls over the sky only (the lit city keeps its glow) as the show begins. */
#jollitech-site .jt-sky-brand::before{content:"";position:absolute;inset:0;
  background:linear-gradient(180deg,rgba(2,6,23,.9) 0%,rgba(3,8,32,.78) 26%,rgba(8,14,46,.52) 46%,rgba(2,6,23,.18) 64%,rgba(2,6,23,0) 76%);
  opacity:var(--nt)}
#jollitech-site .jt-sky-drones{position:absolute;left:0;top:0;width:100%;height:62%;display:block;pointer-events:none}

/* Shade: keeps the nav and the headline readable over the lit city, lifts as the scene opens up. */
#jollitech-site .jt-sky-shade{position:absolute;inset:0;z-index:2;pointer-events:none;background:
  linear-gradient(180deg,rgba(2,6,23,.62) 0%,rgba(2,6,23,.28) 9%,rgba(2,6,23,0) 20%),
  linear-gradient(0deg,rgba(2,6,23,calc(.94 - .3 * var(--p))) 0%,rgba(2,6,23,calc(.74 - .48 * var(--p))) 22%,rgba(2,6,23,calc(.3 - .25 * var(--p))) 46%,rgba(2,6,23,0) 64%),
  radial-gradient(ellipse 70% 60% at 18% 88%,rgba(2,6,23,calc(.55 * (1 - var(--p)))) 0%,rgba(2,6,23,0) 70%)}

/* Copy lifts and blurs away during the first third of the scroll. */
#jollitech-site .jt-sky .jt-hero-layout{position:relative;z-index:3;min-height:100svh;
  opacity:calc(1 - var(--cp));transform:translateY(calc(var(--cp) * -42px));filter:blur(calc(var(--cp) * 8px))}
#jollitech-site .jt-sky.jt-sky-copy-off .jt-hero-layout,#jollitech-site .jt-sky.jt-sky-copy-off .jt-hero-copy{pointer-events:none}
#jollitech-site .jt-sky .jt-hero-label{background:rgba(2,6,23,.38)}

/* Closing caption under the skyline. */
#jollitech-site .jt-sky-end{position:absolute;left:0;right:0;bottom:clamp(30px,6.5svh,64px);z-index:3;margin:0;padding:0 20px;
  display:flex;flex-direction:column;align-items:center;gap:8px;text-align:center;pointer-events:none;
  opacity:var(--et);transform:translateY(calc((1 - var(--et)) * 16px))}
#jollitech-site .jt-sky-end span{font:600 11px/1 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;letter-spacing:.28em;text-transform:uppercase;color:#bef264}
#jollitech-site #home .jt-sky-end b{font-weight:600;font-size:clamp(15px,1.5vw,20px);color:rgba(255,250,240,.92)!important;background:none!important;-webkit-text-fill-color:currentColor;text-shadow:0 2px 18px rgba(2,6,23,.95),0 0 2px rgba(2,6,23,.6)}

/* Scroll progress hairline. */
#jollitech-site .jt-sky-bar{position:absolute;left:0;right:0;bottom:0;z-index:4;height:2px;background:rgba(255,250,240,.1)}
#jollitech-site .jt-sky-bar i{display:block;height:100%;background:linear-gradient(90deg,#a3e635,#bef264);transform-origin:0 50%;transform:scaleX(var(--p))}

@media(max-width:760px){
  #jollitech-site .jt-hero.jt-sky{--run:110svh}
  #jollitech-site .jt-sky-pin{border-radius:0 0 22px 22px}
  #jollitech-site .jt-sky-cam{transform-origin:51% 30%}
}

/* No pinning or movement for reduced motion (or if the script never runs): a still photo behind the headline. */
#jollitech-site .jt-hero.jt-sky:not(.jt-sky-live){height:auto;--p:0;--nt:1}
#jollitech-site .jt-hero.jt-sky:not(.jt-sky-live) .jt-sky-pin{position:relative}
#jollitech-site .jt-hero.jt-sky:not(.jt-sky-live) .jt-sky-end,#jollitech-site .jt-hero.jt-sky:not(.jt-sky-live) .jt-sky-bar{display:none}
@media(prefers-reduced-motion:reduce){#jollitech-site .jt-sky-drift{animation:none!important}}
