/* Inset-close footer: the page's last full-bleed photo clips itself into a centred window (inset 0 -> 8% 22%;
   phones 4% 32%) while a one-screen plum footer rises around it, the footer's content fading in and growing
   .75 -> 1, all on a .5 s chase of the scroll from the footer's top at 30% of the window to the page end; then the
   footer's heading turns in, its lines rise and its blocks come up. Measured from Era Residence's footer
   (initTranistionFlow, site.css .footer-w, .footer-w_bg, .footer-s). part.js sets the clip, the fade/scale and the
   reveals; this file is the layout and the rest state (no JS / reduced motion: no clip, the footer at rest).

   Markup:
     <section class="icf-last">                          the last photo section; its ground shows round the window
       <div class="icf-clip"> <div class="icf-photo"><img ...></div> ...its words... </div>
     </section>
     <footer class="icf" data-icf>                       one screen, pulled up under the photo by --icf-overlap
       <div class="icf-body">                            fades 0 -> 1 and scales .75 -> 1
         <h2 data-icf-h>(555) 014-2290</h2> <p data-icf-p>...</p> <div data-icf-ctn>...</div>
       </div>
     </footer> */

.icf-last, .icf {
  --icf-ground: #340c24;                 /* plum: the footer and the frame round the closing window */
  --icf-ink: #f3f3ec;
}
.icf-last *, .icf * { box-sizing: border-box; }
.icf-last { position: relative; background: var(--icf-ground); }
.icf-clip { position: relative; z-index: 1; will-change: clip-path; }
.icf-photo { position: absolute; inset: 0; overflow: clip; }
.icf-photo > img, .icf-photo > picture > img, .icf-photo > svg {
  display: block; width: 100%; height: 100%; object-fit: cover; object-position: var(--icf-pos, 50% 50%);
}
.icf-photo::after {                      /* the source's .img-over-grad: 30% black from the top, plus a soft base */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(rgb(0 0 0 / calc(.3 * var(--icf-scrim, 1))), rgb(0 0 0 / 0)) top / 100% 50% no-repeat,
    linear-gradient(rgb(0 0 0 / 0), rgb(0 0 0 / calc(.3 * var(--icf-scrim, 1))));
}

.icf {
  --icf-overlap: 16vw;                   /* pulled up under the photo: 48 + 2 x 96 + 16 source units (230px at 1440) */
  position: relative; margin-top: calc(-1 * var(--icf-overlap));
  min-height: 100svh; background: var(--icf-ground); color: var(--icf-ink);
  display: flex; flex-direction: column;
}
.icf-body {
  position: relative; z-index: 2; flex: 1; min-height: 100svh;
  display: flex; flex-direction: column; justify-content: space-between;
  will-change: transform, opacity;
}

/* the reveal vocabulary (split by part.js) */
.icf-word { display: inline-block; white-space: nowrap; }
.icf-char { display: inline-block; }
.icf-line-mask { display: block; overflow: clip; overflow-clip-margin: .1em; }
.icf-line { display: block; }

/* phones: < 992px wide AND portrait (the source: width alone; a narrow landscape window keeps the desktop overlap,
   or the 48vw pull-up would put the number over the closing window) */
@media (max-width: 991.98px) and (max-aspect-ratio: 1/1) {
  .icf { --icf-overlap: 48.077vw; }       /* (24 + 2 x 80 + 16) / 4.16 */
}
