/* ======================================================================
   2020 · HQ zone — the 2576x1932 renders are shown at 100% (1:1), never upscaled.
   Load AFTER 2020.bundle.min.css.

   The limit:  image width  <= 2576px   and   image height <= 1440px (cap).
   Cover-scale = max(viewport-w / 2576, viewport-h / 1932)  →  always <= 1,
   so on every screen the browser only DOWN-scales (sharp). On bigger screens
   the picture stops growing and stays centred in the starry page background.
   ====================================================================== */

/* 1 · the cap (all widths): never wider than the source, never taller than it */
.b20 .band.win .ph{
  max-width:2576px!important;
  margin-inline:auto!important;
  height:min(100svh,1440px)!important;
}

/* 2 · BIG SCREENS: above 2576px the photo is a centred 2560-wide frame, no stretching */
@media (min-width:2577px){
  .b20 .band.win .ph{width:2576px!important}
  .b20 .band.win .ph img{width:100%!important;height:100%!important;object-fit:cover}
}

/* 3 · parallax zoom was 1.06 → 1.20 (pure upscaling). Now:
       - up to 2199px wide: at most +5%  (cover-scale there is <= .86, so it stays below 1:1)
       - from 2200px wide : no zoom at all (we are at the 1:1 limit) */
@media (prefers-reduced-motion:no-preference){
  .b20 .band.win .ph img{
    transform:translate3d(calc(var(--lx,0)*-1.2%),calc(var(--ly,0)*-.9%),0) scale(calc(1 + var(--w,0)*.05 + (1 - var(--m))*.04))!important;
  }
}
@media (min-width:2200px){
  .b20 .band.win .ph img{
    transform:translate3d(calc(var(--lx,0)*-.6%),calc(var(--ly,0)*-.5%),0) scale(1)!important;
  }
}

/* 4 · framed pairs (14, 15): max 1500px wide → the 2560 file is always downscaled */
.b20 .pair.stack .ph{max-width:min(100%,1500px)!important}
.b20 .pair.stack .ph img{width:100%;height:auto}

/* 5 · crisp decode: no filters on the room renders */
.b20 .band.win .ph img,.b20 .pair.stack .ph img{image-rendering:auto;filter:none}

/* ======================================================================
   05 · 06  —  "Two rooms · one wavelength"
   The two renders drift together SLOWLY (3.6s, independent of scroll speed),
   a thin warm thread grows between them, and a halo blooms when they meet.
   ====================================================================== */
@property --j{syntax:"<number>";inherits:true;initial-value:1}

/* state: JS adds html.pj; .joined is added when the pair is ~60% in view */
html.pj .b20 .conv{--j:0;transition:--j 3.6s cubic-bezier(.22,.61,.36,1)}
html.pj .b20 .conv.joined{--j:1}

/* the glow must not be clipped to a hard rectangle any more (.b20 already clips the page sideways) */
.b20 .conv .pair2{position:relative;overflow:visible}

.b20 .conv .pair2 .ph{
  opacity:calc(.35 + var(--j)*.65);
  box-shadow:0 0 calc(var(--j)*110px) calc(var(--j)*12px) rgba(255,150,60,calc(var(--j)*.5)),
             0 0 calc(var(--j)*220px) calc(var(--j)*30px) rgba(244,140,170,calc(var(--j)*.28))!important;
}
.b20 .conv .pair2 .ph:first-child{transform:translateX(calc((1 - var(--j))*-46%))!important}
.b20 .conv .pair2 .ph:last-child {transform:translateX(calc((1 - var(--j))*46%))!important}

/* the thread between two: grows from the middle as they meet */
.b20 .conv .pair2::after{
  content:"";position:absolute;z-index:4;left:50%;top:4%;bottom:4%;width:2px;pointer-events:none;
  transform:translateX(-50%) scaleY(calc(.15 + var(--j)*.85));
  background:linear-gradient(transparent,#ffe3b8 18%,#ff9a3c 50%,#ffe3b8 82%,transparent);
  box-shadow:0 0 26px 7px rgba(255,160,70,.7),0 0 70px 18px rgba(244,140,170,.35);
  opacity:max(0,calc((var(--j) - .55)*2.2));
}

/* caption fades in only once they are together */
.b20 .band.conv .hint{opacity:max(0,calc((var(--j) - .6)*2.5*.7));transform:translateY(calc((1 - var(--j))*10px))}

@media (prefers-reduced-motion:reduce){
  .b20 .conv .pair2 .ph{opacity:1}
  .b20 .conv .pair2 .ph:first-child,.b20 .conv .pair2 .ph:last-child{transform:none!important}
}

/* ======================================================================
   INSIDE THE ROOM — the zoom the screen can afford, never more.
   --zmax is set by a tiny script from the real screen size and DPR:
        zmax = 1 / (cover-scale * DPR)   clamped to 1 … 1.3
   Small / low-DPR screens have a lot of spare pixels → they "walk" up to 30% deeper
   into the room while scrolling; screens that are already at 1:1 do not zoom at all.
   ====================================================================== */
.b20 .band.win{height:calc(100svh + 110svh)!important}     /* a longer, slower dolly */
.b20 .band.win .ph img{
  transform:translate3d(calc(var(--lx,0)*-.8%),calc(var(--ly,0)*-.6%),0)
            scale(calc(1.02 + (var(--zmax,1.04) - 1)*var(--w,0)))!important;
}

/* PHONES: portrait art-direction (3:4 crops) and a shorter window so more of the room is visible */
@media (max-width:700px){
  .b20 .band.win .ph{height:78svh!important}
  .b20 .band.win{height:calc(78svh + 70svh)!important}
  .b20 .band.win .ph img{object-position:50% 50%}
}

/* ======================================================================
   DESCENT — physical depth while you scroll the hero (driven by 2020-descent.js)
   --hp : 0…1 progress through the hero (smoothed)     --v : 0…1 scroll speed (smoothed)
   ====================================================================== */
.h20-fall{position:absolute;inset:0;width:100%;height:100%;z-index:1;pointer-events:none;mix-blend-mode:screen}

/* near things rise faster than far things: text (near) > stars > planet (far) */
html body.p20 .h20-chips,html body.p20 .h20-room,html body.p20 .h20-digits,
html body.p20 .h20-tag,html body.p20 .h20-note,html body.p20 .h20-cue{
  transform:translate3d(0,calc(var(--hp,0)*-10svh),0);
}
html body.p20 .h20-planet{transform:translateX(-50%) translateY(calc(var(--hp,0)*-6svh))}

/* cold rush of air from below, proportional to speed */
html body.p20 .h20::after{
  content:"";position:absolute;inset:0;z-index:2;pointer-events:none;
  background:radial-gradient(120% 70% at 50% 118%,rgba(110,150,255,calc(var(--v,0)*.55)),rgba(150,110,255,calc(var(--v,0)*.22)) 42%,transparent 72%);
}

/* the "Check in" cue: a droplet that actually falls */
html body.p20 .h20-cue i{height:46px}
@media (prefers-reduced-motion:reduce){
  html body.p20 .h20-chips,html body.p20 .h20-room,html body.p20 .h20-digits,html body.p20 .h20-tag,
  html body.p20 .h20-note,html body.p20 .h20-cue{transform:none}
  .h20-fall{display:none}
}
@font-face{font-family:"Fraunces";font-style:normal;font-weight:300 600;font-display:swap;
  src:url("../fonts/fraunces-latin-wght-normal.woff2") format("woff2")}
@font-face{font-family:"Fraunces";font-style:italic;font-weight:300 600;font-display:swap;
  src:url("../fonts/fraunces-latin-wght-italic.woff2") format("woff2")}
@font-face{font-family:"Inter";font-style:normal;font-weight:200 600;font-display:swap;
  src:url("../fonts/inter-latin-wght-normal.woff2") format("woff2")}