/* =====================================================================
   /refer on the service pages v4 system (svc4.css).
   Only what that sheet does not already have: a hero with the form in it,
   the "what happens next" tracker, and the few form parts the audit form
   never needed (textarea, consent, a question label).
   ===================================================================== */

/* ---------- Hero: copy on the left, the form on the right ---------- */
.svc4-refer .s4-hero { padding-bottom: clamp(72px, 9vw, 124px); }
.svc4-refer .s4-bloom { left: 68%; top: 44%; }
.rf-hero-grid { display: grid; grid-template-columns: 1fr minmax(0, 540px); gap: clamp(40px, 6vw, 88px); align-items: start; }
.rf-hero-copy { padding-top: clamp(4px, 3vw, 44px); }
.rf-hero-copy .s4-h1 { margin-inline: 0; max-width: 12.5ch; font-size: clamp(42px, 5.2vw, 72px); line-height: 1; }
.rf-hero-copy .s4-lede { margin: 24px 0 0; max-width: 520px; }

.rf-points { list-style: none; margin: 36px 0 0; padding: 0; max-width: 520px; }
.rf-points li { display: grid; grid-template-columns: 40px 1fr; gap: 16px; align-items: start; padding: 16px 0; border-top: 1px solid var(--s4-line-d); }
.rf-points li:last-child { border-bottom: 1px solid var(--s4-line-d); }
.rf-points-ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: rgba(139, 123, 255, .14); color: #c9c2ff; }
.rf-points-ic svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.rf-points b { display: block; font-family: var(--s4-display); font-size: 17px; letter-spacing: -0.015em; color: #fff; }
.rf-points span span { display: block; margin-top: 2px; font-size: 15px; line-height: 1.5; color: var(--s4-on-2); }
.svc4-refer .s4-hero .s4-founder { margin-top: 30px; flex-wrap: wrap; max-width: 520px; }
.svc4-refer .s4-hero .s4-founder span { color: var(--s4-on-3); }

/* ---------- The form ---------- */
.svc4-refer .s4-form-wrap { position: relative; top: auto; }
.svc4-refer .s4-form { min-height: 540px; scroll-margin-top: 110px; }
.svc4-refer .s4-fld { min-width: 0; }
.svc4-refer .s4-fld input, .svc4-refer .s4-fld textarea { width: 100%; }
.svc4-refer .s4-fs-k { margin-bottom: 20px; }
.rf-full { grid-column: 1 / -1; }
.rf-q { display: block; margin: 22px 0 10px; font-size: 14px; font-weight: 600; color: var(--s4-ink-2); }
.rf-q em { font-style: normal; font-weight: 400; color: var(--s4-ink-3); }
.svc4-refer .s4-seg { margin-top: 22px; }
.svc4-refer .s4-seg-k { font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.svc4-refer .s4-seg-k em { font-style: normal; font-weight: 400; color: var(--s4-ink-3); }
.svc4-refer .s4-seg label span { white-space: nowrap; padding-inline: 6px; }
.rf-note { margin-top: 22px; }
.s4-fld textarea {
  min-height: 96px; padding: 14px 16px; border-radius: 14px; border: 0; outline: 0; resize: vertical;
  background: var(--s4-paper); box-shadow: 0 0 0 1px var(--s4-line) inset;
  font: 500 16px/1.5 var(--s4-body); color: var(--s4-ink); transition: box-shadow .2s;
}
.s4-fld textarea:focus { box-shadow: 0 0 0 2px var(--s4-violet) inset, 0 0 0 5px rgba(109, 92, 246, .14); }
.s4-fld input::placeholder, .s4-fld textarea::placeholder { color: var(--s4-ink-3); opacity: .75; font-weight: 400; }

.rf-consent { position: relative; display: grid; grid-template-columns: 24px 1fr; gap: 12px; align-items: start; margin-top: 20px; padding: 14px 16px; border-radius: 14px; background: var(--s4-paper); box-shadow: 0 0 0 1px var(--s4-line) inset; cursor: pointer; font-size: 14.5px; line-height: 1.5; color: var(--s4-ink-2); transition: box-shadow .2s; }
.rf-consent input { position: absolute; opacity: 0; width: 24px; height: 24px; margin: 0; left: 16px; top: 14px; cursor: pointer; }
.rf-consent i { width: 24px; height: 24px; border-radius: 8px; background: #fff; box-shadow: 0 0 0 1.5px rgba(21, 19, 29, .28) inset; transition: background .2s, box-shadow .2s, transform .35s var(--s4-snap); }
.rf-consent input:checked + i {
  background: var(--s4-ink) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 12.5 4 4 8-9'/%3E%3C/svg%3E") center / 15px no-repeat;
  box-shadow: none;
}
.rf-consent input:active + i { transform: scale(.9); }
.rf-consent input:focus-visible + i { outline: 2px solid var(--s4-violet); outline-offset: 2px; }
.rf-consent.is-bad { box-shadow: 0 0 0 2px #d9533e inset; }

.rf-done-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px; }
.rf-again { padding: 0; background: none; border: 0; font: 600 15px var(--s4-body); color: var(--s4-ink-2); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.rf-again:hover { color: var(--s4-ink); }

/* Without the script every step shows at once and the form posts natively. */
.s4-form:not(.rf-live) .s4-form-top, .s4-form:not(.rf-live) .s4-back { display: none; }
.s4-form:not(.rf-live) .s4-fs + .s4-fs { margin-top: 36px; padding-top: 30px; border-top: 1px solid var(--s4-line); }

/* ---------- What happens next ---------- */
.rf-flow { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 5vw, 80px); align-items: center; }
.rf-steps { list-style: none; margin: 0; padding: 0; }
.rf-steps li { display: grid; grid-template-columns: 52px 1fr; gap: 6px; padding: 26px 0; border-top: 1px solid var(--s4-line); }
.rf-steps li:last-child { border-bottom: 1px solid var(--s4-line); }
.rf-step-n { align-self: start; justify-self: start; margin-top: 3px; font-family: var(--s4-mono); font-size: 13px; color: var(--s4-violet-ink); padding: 3px 8px; border-radius: 8px; background: var(--s4-violet-soft); }
.rf-steps h3 { font-size: 22px; margin-bottom: 8px; }
.rf-steps p { margin: 0; font-size: 16.5px; color: var(--s4-ink-2); max-width: 46ch; }

.rf-art { aspect-ratio: 0.92; }
.rf-track { width: min(86%, 400px); padding: 20px 22px 10px; margin: -9% 8% 0 0; }
.rf-track-rows { list-style: none; margin: 16px 0 0; padding: 0; }
.rf-track-rows li { display: grid; grid-template-columns: 22px 1fr auto; gap: 12px; align-items: center; padding: 12px 0; border-top: 1px solid var(--s4-line); font-size: 14.5px; }
.rf-track-rows b { display: block; font-size: 15px; }
.rf-track-rows span span { display: block; font-size: 12.5px; color: var(--s4-ink-3); }
.rf-track-rows time { font-family: var(--s4-mono); font-size: 12px; color: var(--s4-ink-3); white-space: nowrap; }
.rf-dot-wait { width: 22px; height: 22px; border-radius: 50%; box-shadow: 0 0 0 1.5px rgba(21, 19, 29, .22) inset; }
.rf-track-rows li.is-wait b { color: var(--s4-ink-3); }
.rf-pay { width: min(74%, 320px); }
.js .rf-art[data-rv] .rf-track { transform: scale(1.06); transition: transform 1.2s var(--s4-snap); }
.js .rf-art[data-rv].is-in .rf-track { transform: none; }
.js .rf-art[data-rv] .s4-tick { transform: scale(0); transition: transform .45s var(--s4-snap); }
.js .rf-art[data-rv].is-in .s4-tick { transform: none; }
.js .rf-art[data-rv].is-in li:nth-child(1) .s4-tick { transition-delay: .35s; }
.js .rf-art[data-rv].is-in li:nth-child(2) .s4-tick { transition-delay: .6s; }
.js .rf-art[data-rv].is-in li:nth-child(3) .s4-tick { transition-delay: .85s; }
.js .rf-art[data-rv] .rf-pay { opacity: 0; transform: translateY(24px) scale(.95); transition: transform .7s var(--s4-snap) 1.05s, opacity .2s linear 1.05s; }
.js .rf-art[data-rv].is-in .rf-pay { opacity: 1; transform: none; }

/* ---------- Fit, reviews, questions ---------- */
.svc4-refer .s4-fit-sec { padding-top: 0; }
.rf-fit-foot { text-align: center; }
.svc4-refer .s4-reviews { padding-top: 0; }
.rf-faq-cta { margin-top: 32px; }

@media (max-width: 980px) {
  /* one column, and the form comes straight after the pitch: the copy block
     dissolves so its children can be ordered around the form */
  .rf-hero-grid { grid-template-columns: 1fr; gap: 0; }
  .rf-hero-copy { display: contents; }
  .rf-hero-copy .s4-h1 { max-width: 14ch; }
  .svc4-refer .s4-form-wrap { order: 1; margin-top: 36px; }
  .rf-points { order: 2; margin-top: 48px; max-width: none; }
  .svc4-refer .s4-hero .s4-founder { order: 3; max-width: none; }
  .svc4-refer .s4-bloom { left: 50%; top: 40%; }
}
@media (max-width: 860px) {
  .rf-flow { grid-template-columns: 1fr; }
  .rf-art { aspect-ratio: 1.05; }
}
@media (max-width: 640px) {
  .rf-steps li { grid-template-columns: 46px 1fr; padding: 22px 0; }
  .rf-steps h3 { font-size: 20px; }
  .rf-art { aspect-ratio: auto; padding: 20px; display: flex; flex-direction: column; align-items: stretch; gap: 12px; }
  .rf-track { width: 100%; margin: 0; }
  .rf-art .rf-pay { position: relative; inset: auto; width: 88%; align-self: flex-end; }
  .svc4-refer .s4-seg label { flex: 1 1 30%; }
}
@media (prefers-reduced-motion: reduce) {
  .js .rf-art[data-rv] .rf-track, .js .rf-art[data-rv] .s4-tick, .js .rf-art[data-rv] .rf-pay { transform: none; opacity: 1; }
}
