/* Foam jacking uses the same scroll settle as spray foam, on a short travel. */

#lift .job-pin--lift .job-pin__travel {
  height: 85svh;
}

#lift .job-pin--lift.is-static .job-pin__travel,
#lift .job-pin--lift.is-static-plate .job-pin__travel {
  height: 0;
}

@media (max-width: 768px) {
  #lift .job-pin--lift .job-pin__travel {
    height: 100svh;
  }
}

/* Live spray foam plate measures against 92.5rem, not this build's 76rem rail.
   Foam jacking uses the same rail so its right inset matches the spray foam left inset. */
#spray-foam,
#lift {
  --max: 92.5rem;
  --gutter: clamp(1rem, 3vw, 2rem);
}

#lift .gain--plate p,
#lift .job-pin__scope {
  max-width: none;
  margin-left: 0;
  text-wrap: pretty;
}

#lift .line-end {
  white-space: nowrap;
}

@media (min-width: 769px) {
  #lift .job-pin__figure {
    justify-content: center;
    padding-top: calc(var(--header, 4.5rem) + 0.85rem);
    padding-bottom: 0.85rem;
  }

  #lift .gains-on-plate {
    gap: 1.15rem;
  }
}

/* A short laptop cannot hold the wrapped right rail at the open gap. */
@media (min-width: 769px) and (max-height: 860px) {
  #lift .job-pin__figure {
    padding-top: calc(var(--header, 4.5rem) + 0.35rem);
    padding-bottom: 0.4rem;
  }

  #lift .gains-on-plate {
    gap: 0.55rem;
  }

  #lift .gain--plate h2 {
    font-size: 1.62rem;
    line-height: 1.02;
  }

  #lift .job-pin__sub {
    font-size: 1.2rem;
  }

  #lift .gain--plate p,
  #lift .job-pin__scope {
    line-height: 1.32;
  }
}

/* Body measure sits just inside the old 34ch, so a sentence does not end on its own two-word line. */
#spray-foam .gain--plate p {
  max-width: 32ch;
}

.range-band {
  position: relative;
  z-index: 1;
  padding: clamp(1.5rem, 4vw, 2.5rem) 0 clamp(3rem, 7vw, 5rem);
}

.range-band__inner {
  width: min(88rem, calc(100% - var(--gutter) * 2));
  margin: 0 auto;
}

.range-band__lead {
  margin: 0 0 clamp(1.25rem, 2.5vw, 1.75rem);
  color: var(--ink, #0a1014);
  font-size: clamp(1.85rem, 3.4vw, 2.7rem);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1.05;
  white-space: nowrap;
}

@media (max-width: 879px) {
  .range-band__lead {
    white-space: normal;
  }
}

.range-band__photo {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
}

.range-band__photo img {
  display: block;
  width: 100%;
  max-width: none;
  height: auto;
  margin: 0;
}

/* One arrival ease for the sections under the pins. Hidden only when JS asks. */
html.will-arrive .us-band__head,
html.will-arrive .range-band__lead,
html.will-arrive .end-band__inner {
  opacity: 0;
  transform: translate3d(0, 0.7rem, 0);
  transition:
    opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}

html.will-arrive .range-band__photo {
  opacity: 0;
  transition: opacity 1s cubic-bezier(0.22, 1, 0.36, 1);
}

html.will-arrive .us-mod {
  --reveal: 0;
  transition-duration: 0.9s, 0.9s;
  transition-timing-function: cubic-bezier(0.22, 1, 0.36, 1), cubic-bezier(0.22, 1, 0.36, 1);
}

html.will-arrive .us-mod:nth-child(2) {
  transition-delay: 0.1s;
}

html.will-arrive .us-mod:nth-child(3) {
  transition-delay: 0.2s;
}

html.will-arrive .us-band__head.is-in,
html.will-arrive .range-band__lead.is-in,
html.will-arrive .end-band__inner.is-in,
html.will-arrive .range-band__photo.is-in {
  opacity: 1;
  transform: none;
}

html.will-arrive .us-mod.is-in {
  --reveal: 1;
}

#spray-foam .job-pin__sticky::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 2.75rem;
  z-index: 4;
  pointer-events: none;
  background: linear-gradient(
    to bottom,
    color-mix(in oklch, var(--mist, #e6eef7) 20%, transparent) 0%,
    color-mix(in oklch, var(--mist, #e6eef7) 7%, transparent) 55%,
    transparent 100%
  );
}

body.has-film .us-band {
  padding-bottom: clamp(2.25rem, 5vw, 3.5rem);
}

body.has-film .end-band {
  padding-top: clamp(1.75rem, 5vw, 2.75rem);
  padding-bottom: 0.85rem;
}
