/* Homepage hero: example drone footage, swept away by a scan line onto the real satellite view of
   Christina Lake, which pulls back while the public record draws itself in. Driven by orbit.js
   ([data-orbit]); layout and type come from the shared .hx-tl hero.
   .hz-world is the 54 by 35 km frame in its own pixels (1280 x 829), so one transform zooms every
   layer together; the 10 m image sits inside it at its true place. */

.hz-stage{position:absolute;inset:0;z-index:0;overflow:hidden;background:#0A1D16}
.hz-world{position:absolute;left:0;top:0;width:1280px;height:829px;transform-origin:0 0}
.hz-world img{position:absolute;display:block;max-width:none}
.hz-world img:not([src]){display:none}   /* not fetched yet; keeps the grey layer's mask from loading early too */
.hz-wide,.hz-ov,.hz-grey{left:0;top:0;width:1280px;height:829px}
/* the 10 m image the pull-back starts on, on the frame's own grid (tools/data/real_hero/map.json) */
.hz-near{left:800.37px;top:441.57px;width:379.26px;height:236.86px}
/* each layer of the public record wipes on along its own front */
.hz-ov{--p:-12;
  -webkit-mask-image:linear-gradient(100deg,#000 calc(var(--p) * 1% - 7%),transparent calc(var(--p) * 1%));
          mask-image:linear-gradient(100deg,#000 calc(var(--p) * 1% - 7%),transparent calc(var(--p) * 1%))}
/* the land within 250 m of any of it: the same image, greyed, through the zone's mask */
.hz-grey{opacity:0;filter:grayscale(1) brightness(.7) contrast(.92);
  -webkit-mask:url(../images/hero/map-zone.png) 0 0/100% 100% no-repeat;
          mask:url(../images/hero/map-zone.png) 0 0/100% 100% no-repeat}
/* 45,197 cutlines: drawn at 60% so they read as the grid they are, under the rest */
.hz-cut{opacity:.6}
.hz-stage::after{content:"";position:absolute;inset:0;z-index:1;pointer-events:none;
  background:linear-gradient(90deg,rgba(8,22,16,.9) 0%,rgba(8,22,16,.76) 30%,rgba(8,22,16,.22) 56%,rgba(8,22,16,0) 100%),
             linear-gradient(0deg,rgba(8,22,16,.88) 0%,rgba(8,22,16,0) 24%)}

/* the footage: the poster image with the video over it, in one box; orbit.js eases the box back
   while the video plays, then fades it out over the map, which is already pulling back under it */
.hz-filmbox{position:absolute;inset:-6px;z-index:0;overflow:hidden;transform-origin:62% 50%;will-change:transform,opacity}
.hz-poster,.hz-film{position:absolute;inset:0;display:block;width:100%;height:100%;object-fit:cover;object-position:50% 50%}

/* the readout along the bottom edge */
.hz-read{display:flex;align-items:baseline;gap:12px;margin:0;min-width:0}
.hz-big{font:600 30px/1 var(--font-sans);font-stretch:76%;letter-spacing:-.01em;font-variant-numeric:tabular-nums;color:#F4FAF6;white-space:nowrap}
.hz-small{font-size:13.5px;line-height:1.35;color:rgba(234,243,237,.82);max-width:40ch}
.hx-orbit .hx-bar .wrap{align-items:center;gap:16px}
/* Pause and Play as an icon: the hero moves on its own, so it keeps a way to stop it */
.hx-orbit .hz-play{display:grid;place-items:center;min-width:0;width:34px;height:34px;padding:0;flex:none}
.hz-play svg{width:12px;height:12px;fill:currentColor}
.hz-play .i-play,.hz-play[data-state="paused"] .i-pause{display:none}
.hz-play[data-state="paused"] .i-play{display:block}

/* no script: the poster, still, with its label */
html:not(.js) .hz-world,html:not(.js) .hz-film{display:none}

@media (max-width:760px){
  .hx-orbit .hz-stage{bottom:auto;height:calc(min(52vw,300px) + 160px)}
  .hz-stage::after{background:linear-gradient(0deg,#0A1D16 0%,rgba(10,29,22,.6) 34%,rgba(10,29,22,0) 62%),
                              linear-gradient(180deg,rgba(10,29,22,.95) 0%,rgba(10,29,22,.8) 15%,rgba(10,29,22,0) 34%)}
  .hz-grey{-webkit-mask-image:url(../images/hero/map-zone-sm.png);mask-image:url(../images/hero/map-zone-sm.png)}
  .hz-filmbox{transform-origin:50% 50%}
  .hx-orbit .hz-read{position:absolute;top:16px;left:20px;right:20px;z-index:2;flex-wrap:wrap;row-gap:4px;text-shadow:0 1px 10px rgba(8,22,16,.8)}
  .hz-big{font-size:26px}
  .hz-small{font-size:12.5px}
}
