/* ==========================================================================
   JAKSON — FINAL HOMEPAGE MOTION  (loaded by index.html)
   Styles for the pieces js/final.js brings in -- see the note there. All of
   it is scoped under html.fn, which final.js adds only when GSAP loaded and
   reduced motion is not asked for.
   ========================================================================== */

html.lenis, html.lenis body{ height:auto; }
html.lenis{ scroll-behavior:auto !important; }
.lenis.lenis-smooth [data-lenis-prevent]{ overscroll-behavior:contain; }
.lenis.lenis-stopped{ overflow:hidden; }

/* ---- hero (wider than 900px only; phones keep index.html's hero) ---- */
@media (min-width:901px){
  html.fn .hb-center .h > span{ display:inline-block; will-change:transform; }
  html.fn .hero2 picture{ display:block; height:100%; will-change:transform; }
  html.fn .hj{ will-change:transform; }
}
.pm-hero-shade{ position:absolute; inset:0; z-index:15; pointer-events:none; opacity:0;
  background:linear-gradient(180deg, rgba(4,12,8,.2), rgba(4,12,8,.85)); }
/* ---- hero time travel: the year and the era over the flight ---- */
/* hidden until final.js fades it in, so it never flashes over the hero while
   the page loads, and never shows at all where the flight does not run */
.pm-tt{ visibility:hidden; opacity:0; }
.pm-tt{ position:absolute; inset:0; z-index:18; display:grid; place-content:center; justify-items:center;
  gap:10px; pointer-events:none; color:#fff; text-align:center; --eac:#f5b942; }
.pm-tt__k{ font-family:'Montserrat',sans-serif; font-weight:800; font-size:13px; letter-spacing:.3em;
  text-transform:uppercase; color:rgba(255,255,255,.8); text-shadow:0 2px 12px rgba(0,0,0,.6); }
.pm-tt__y{ font-family:'Montserrat',sans-serif; font-weight:800; line-height:.9; letter-spacing:-.04em;
  font-size:clamp(90px,15vw,230px); font-variant-numeric:tabular-nums;
  background:linear-gradient(180deg,#fff 30%, var(--eac) 100%); -webkit-background-clip:text; background-clip:text;
  color:transparent; filter:drop-shadow(0 10px 40px rgba(0,0,0,.55)); transition:--eac .4s; }
.pm-tt__l{ font-family:'Montserrat',sans-serif; font-weight:700; font-style:italic; font-size:clamp(20px,2vw,30px);
  color:var(--eac); text-shadow:0 2px 16px rgba(0,0,0,.7); transition:color .4s ease; }
.pm-tt__bar{ position:relative; width:min(360px,50vw); height:3px; margin-top:12px; border-radius:3px;
  background:rgba(255,255,255,.2); overflow:hidden; }
.pm-tt__bar i{ position:absolute; inset:0; transform-origin:left; transform:scaleX(0); background:var(--eac);
  box-shadow:0 0 14px var(--eac); transition:background .4s ease; }

/* ---- stat band: split-flap figures ---- */
/* the digits become separate boxes so each can flip; the figure must still
   read as one unbroken word at exactly index.html's size and height */
html.fn .sb-num{ white-space:nowrap; }
.cr-flap, .cr-fixed{ display:inline-block; line-height:inherit; vertical-align:baseline; }
.cr-flap{ transform-origin:50% 55%; backface-visibility:hidden; }

/* ------------------------------------------------------------------ radar -- */
.cr-radar{ position:absolute; inset:0; z-index:3; pointer-events:none; overflow:hidden; }
.cr-radar__beam{ position:absolute; left:var(--hx); top:var(--hy); width:var(--d); height:var(--d);
  translate:-50% -50%; border-radius:50%; will-change:transform;
  background:conic-gradient(from 0deg, transparent 0deg, transparent 290deg, rgba(143,208,90,.05) 305deg,
    rgba(143,208,90,.22) 350deg, rgba(220,255,200,.55) 359.5deg, transparent 360deg);
  -webkit-mask:radial-gradient(circle, #000 0, #000 45%, transparent 70%);
          mask:radial-gradient(circle, #000 0, #000 45%, transparent 70%); }
/* the same sweep painted once into a small picture (final.js) and stretched: as a
   live gradient it was a 4000px layer, which filled the graphics memory */
canvas.cr-radar__beam{ background:none; -webkit-mask:none; mask:none; }
.cr-radar__rings{ position:absolute; left:var(--hx); top:var(--hy); width:0; height:0; }
.cr-radar__rings i{ position:absolute; left:0; top:0; border-radius:50%; translate:-50% -50%;
  box-shadow:inset 0 0 0 1px rgba(143,208,90,.16); }
.cr-radar__rings i{ width:var(--rw); height:var(--rw); }
.cr-ping{ position:absolute; left:50%; top:50%; width:12px; height:12px; margin:-6px 0 0 -6px; border-radius:50%;
  pointer-events:none; opacity:0; box-shadow:0 0 0 2px #b6e59a; }
.gp-pin.cr-pinged .cr-ping{ animation:crPing 1.1s cubic-bezier(.2,.8,.2,1); }
@keyframes crPing{ 0%{ opacity:1; transform:scale(.6) } 100%{ opacity:0; transform:scale(4.2) } }
.gp.is-finding .cr-radar{ display:none; }

/* --------------------------------------------------------------- the wind -- */
.cr-wind{ position:absolute; inset:0; z-index:1; width:100%; height:100%; pointer-events:none; mix-blend-mode:screen; }

/* ---- CSR: tiles lean toward the pointer, light on the glass ---- */
html.fn.fn-fine .csr-t{ transform-style:preserve-3d; }
html.fn.fn-fine .csr-t:hover{
  transform:perspective(1100px) rotateX(var(--rx,0deg)) rotateY(var(--ry,0deg)) translateY(-6px);
  transition:opacity .45s ease, translate .8s cubic-bezier(.2,.7,.2,1), transform .18s ease-out, box-shadow .45s ease, filter .45s ease; }
.pm-glare{ position:absolute; inset:0; z-index:1; pointer-events:none; border-radius:inherit; opacity:0;
  background:radial-gradient(420px circle at var(--gx,50%) var(--gy,50%), rgba(255,255,255,.22), transparent 45%);
  mix-blend-mode:soft-light; transition:opacity .35s ease; }
html.fn.fn-fine .csr-t:hover .pm-glare{ opacity:1; }
/* the photograph gets a little spare height to drift within */
html.fn .csr-t__i{ inset:-6% 0 auto 0; height:112%; }

/* ---- sparks ---- */
.pm-sparks{ position:fixed; inset:0; width:100vw; height:100vh; z-index:96; pointer-events:none; }

@media (max-width:900px){
  .pm-tt, .pm-hero-shade{ display:none !important; }
}
@media (prefers-reduced-motion:reduce){
  .pm-tt, .pm-sparks, .cr-wind, .cr-radar{ display:none !important; }
}
