/* ---------- Design/Build "How do we pay for this?" (Oct 28, round 2) ----------
   Builds on the scene in styles.css (.pay-scene). The breather now holds the finished Park City home as a large white
   print under the question; it stays with the breather and scrolls away. The table photo rises and then pins for
   --X of scroll; while it holds, --k (0 → 1, pay.js) drops the question down and away and brings in the answer.
   The gold words: "pay for this?" and "Ariane Bibas". */
.pay-scene { --X: 90svh; --k: 0; --IW: clamp(300px, 30vw, 440px); --I: calc(var(--IW) * .6663 + 80px); }
.pay-track { height: calc(var(--B) + var(--I) + var(--X) + var(--P) * .4); }
.pay-breather { height: calc(var(--B) + var(--I)); }
/* the finished home rides under the question and fades away as the table photo comes up beneath it */
.pay-quote .pay-inset { width: var(--IW); opacity: calc(1 - var(--c)); translate: 0 calc(var(--c) * 30px); pointer-events: auto; }
.pay-scene.answered .pay-quote .pay-inset { pointer-events: none; }
.pay-pin { position: relative; height: calc(var(--P) + var(--X)); }
.pay-pin .pay-photo { position: sticky; top: 0; }
/* the swap: question and answer share one spot */
.pay-swap { display: grid; }
.pay-swap > .pay-q, .pay-swap > .pay-a { grid-area: 1 / 1; }
.pay-quote .pay-q { --q: clamp(0, calc((var(--k) - .12) / .3), 1); opacity: calc(1 - var(--q)); translate: 0 calc(var(--q) * 22svh); }
.pay-quote .pay-a { --a: clamp(0, calc((var(--k) - .42) / .3), 1); opacity: var(--a); translate: 0 calc((1 - var(--a)) * -26px); }
.pay-quote .ed-quote-main.pay-a { white-space: normal; line-height: 1.05; }
.pay-quote .ed-quote-main em { color: color-mix(in srgb, var(--champagne) calc(var(--c) * 100%), var(--brass-dark)); }
.pay-quote figcaption.pay-swap { display: grid; justify-items: center; }
.pay-quote figcaption.pay-swap { display: flex; position: relative; }
.pay-quote figcaption .pay-q, .pay-quote figcaption .pay-a { display: inline-block; }
.pay-quote figcaption .pay-a { position: absolute; left: 50%; top: 0; transform: translateX(-50%); white-space: nowrap; }
.pay-quote .pay-cta { position: absolute; left: 50%; top: calc(100% - var(--I) + 10px); transform: translateX(-50%); display: inline-flex; pointer-events: none; color: #FFFFFF; }
.pay-scene.answered .pay-quote .pay-cta { pointer-events: auto; }
@media (max-width: 680px) {
  .pay-scene { --X: 70svh; --IW: 72vw; --I: calc(var(--IW) * .6663 + 70px); }
  .pay-quote .ed-quote-main.pay-a { font-size: 8.6vw; }
}
@media (prefers-reduced-motion: reduce) {
  .pay-quote .pay-q { opacity: 1; translate: none; }
  .pay-quote .pay-a { display: none; }
}
/* colours and the print follow --cc (pay.js), which only ever moves forward */
.pay-scene { --cc: 0; }
.pay-quote .ed-quote-main { color: color-mix(in srgb, #FFFFFF calc(var(--cc) * 100%), var(--navy-dark)); text-shadow: 0 2px 26px rgba(8,27,51, calc(var(--cc) * .45)); }
.pay-quote .ed-quote-main em { color: color-mix(in srgb, var(--champagne) calc(var(--cc) * 100%), var(--brass-dark)); }
.pay-quote figcaption { color: color-mix(in srgb, var(--champagne) calc(var(--cc) * 100%), var(--brass-dark)); }
.pay-quote figcaption::before, .pay-quote figcaption::after { background: color-mix(in srgb, var(--champagne) calc(var(--cc) * 100%), var(--brass)); }
.pay-quote .pay-inset { opacity: calc(1 - var(--cc)); translate: 0 calc(var(--cc) * 30px); }
@media (max-width: 680px) {
  .pay-scene { --P: 100svh; }
  .pay-quote figcaption { font-size: .56rem; letter-spacing: .12em; white-space: nowrap; gap: 10px; }
  .pay-quote figcaption::before, .pay-quote figcaption::after { width: 16px; }
}
/* the answer (two lines) rises upward from the question's line, so the caption sits right under the one-line question */
.pay-quote blockquote.pay-swap { position: relative; display: block; }
.pay-quote blockquote.pay-swap > .pay-a { position: absolute; left: 0; right: 0; bottom: 0; }
.pay-quote figcaption.pay-swap::before, .pay-quote figcaption.pay-swap::after { opacity: calc(1 - clamp(0, calc((var(--k) - .12) / .3), 1)); }
/* the words stay pinned for as long as the photo holds, then leave together with it; a longer hold on the answer */
.pay-scene { --X: 120svh; }
.pay-track { height: auto; bottom: 0; }
@media (max-width: 680px) { .pay-scene { --X: 100svh; } }
/* the answer now lives below the scene, in the Financing Your Renovation block; the scene only drops the question */
.pay-scene { --X: 60svh; }
@media (max-width: 680px) { .pay-scene { --X: 50svh; } }
.pay-after .split-headline em { color: var(--brass-dark); }
.pay-after .pay-lic { margin: 14px 0 0; font-family: var(--label-font); font-size: .78rem; font-weight: 500; letter-spacing: .18em; text-transform: uppercase; color: var(--ink-soft); }
.pay-after .pay-sub { margin: 34px 0 0; font-family: var(--serif); font-style: italic; font-weight: 500; font-size: clamp(1.4rem, 2vw, 1.8rem); color: var(--navy-dark); }
.pay-after .pay-ctas { display: flex; flex-wrap: wrap; justify-content: center; gap: 18px 44px; margin-top: 28px; }
.pay-after .pay-ctas .ed-quote-cta { margin-top: 0; }
@media (max-width: 680px) { .pay-after .pay-lic { font-size: .64rem; letter-spacing: .12em; } }
