/* buy buttons, the legal line, the payment note and the thank-you page. Loaded after site.css. */
.buy { display: grid; gap: 14px; justify-items: start; margin-top: 32px; max-width: 44ch; }
.svc-row .buy .btn, .buy .btn { margin-top: 0; }
.buy .how { margin: 0; font-size: var(--step-small); line-height: 1.45; color: var(--ink); }
.legal-line { margin: 0; font-size: var(--step-small); line-height: 1.45; color: var(--soft); }
.buy .ask-link { font-size: var(--step-small); }

/* the pressed buy button dims and holds its arrow forward while Stripe's checkout loads.
   No dot and no looping motion (his rule, feedback_no_pulsing_dots); the width stays put. */
.btn[data-buy] { position: relative; }
.btn[data-buy] .wait { display: none; }
.btn[data-buy] .arr { position: relative; }
.btn[data-buy].going { cursor: progress; opacity: 0.72; }
.btn[data-buy].going .arr { transform: translateX(4px); }
@keyframes settle { from { opacity: 0; transform: translateY(10px); } }

/* the legal line wraps evenly; the ABN itself is joined with no-break spaces in the markup */
.legal-line { text-wrap: pretty; }

/* price cards: the three package blocks (phone) and the buy cells (desktop) rise in turn once the prices come on screen */
@media (prefers-reduced-motion: no-preference) {
  .js .pack[data-reveal] .stack .block, .js .pack[data-reveal] td .buy-cell { opacity: 0; transform: translateY(14px); transition: opacity 600ms var(--ease-out), transform 800ms var(--ease-expo); }
  .js .pack[data-reveal].in .stack .block, .js .pack[data-reveal].in td .buy-cell { opacity: 1; transform: none; }
  .js .pack[data-reveal].in .stack .block:nth-child(2) { transition-delay: 90ms; }
  .js .pack[data-reveal].in .stack .block:nth-child(3) { transition-delay: 180ms; }
  .js .pack[data-reveal].in td:nth-child(2) .buy-cell { transition-delay: 300ms; }
  .js .pack[data-reveal].in td:nth-child(3) .buy-cell { transition-delay: 370ms; }
  .js .pack[data-reveal].in td:nth-child(4) .buy-cell { transition-delay: 440ms; }
}

/* packages: buy button, then the question link, then the legal line */
.pack .buy-cell { display: grid; gap: 12px; justify-items: start; }
.pack .buy-cell .ul { font-size: var(--step-small); }
.pack .buy-cell .how { margin: 0; font-size: var(--step-small); line-height: 1.4; color: var(--soft); max-width: 30ch; }
.pack .stack .block .buy-cell { margin-top: 20px; }
.pack .payhow { margin-top: 40px; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); padding-top: 28px; border-top: 1px solid var(--grey); }
.pack .payhow h3 { grid-column: 1 / 5; font: 300 var(--step-head)/1 var(--display); }
.pack .payhow ul { grid-column: 5 / -1; margin: 0; padding-left: 1.15em; list-style: "\2013\00a0\00a0"; max-width: 60ch; font-size: var(--step-body); line-height: 1.45; }
.pack .payhow li { padding: 4px 0; }
.pack .payhow li::marker { color: var(--soft); }
.pack .payhow .legal-line { grid-column: 5 / -1; margin-top: 16px; padding-left: 1.15em; }
@media (max-width: 760px) {
  .pack .payhow h3, .pack .payhow ul, .pack .payhow .legal-line { grid-column: 1 / -1; }
  .pack .payhow ul { margin-top: 20px; }
}

/* thank-you page */
.thanks svg { width: 64px; height: 64px; overflow: visible; margin-bottom: 28px; display: block; }
.thanks .track { opacity: 0.15; }
.thanks .ring, .thanks .tick { stroke-dasharray: 1; stroke-dashoffset: 0; }
@media (prefers-reduced-motion: no-preference) {
  .js .thanks .ring, .js .thanks .tick { stroke-dashoffset: 1; }
  .js .thanks.go .ring { animation: draw 760ms var(--ease-io) 200ms forwards; }
  .js .thanks.go .tick { animation: draw 460ms var(--ease-expo) 860ms forwards; }
  /* the words settle in behind the ring, in reading order. A CSS animation, so the text shows even if a script fails. */
  .thanks > :not(svg) { animation: settle 800ms var(--ease-expo) backwards; animation-delay: calc(360ms + var(--n, 0) * 70ms); }
  .thanks > :nth-child(3) { --n: 1; }
  .thanks > :nth-child(4) { --n: 2; }
  .thanks > :nth-child(5) { --n: 3; }
  .thanks > :nth-child(6) { --n: 4; }
  .thanks > :nth-child(7) { --n: 5; }
}
.thanks .what { margin-top: 20px; font-size: var(--step-lead); line-height: 1.3; }
.thanks .go { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; margin-top: 40px; }
.thanks .legal-line { margin-top: 48px; }
