/* ==========================================================================
   RoofLeadHQ — Public form pages (Phase 2A, 2026-09-25)
   Standard signup (signup.html) and the private pilot page (pilot-signup.html).

   Layers on public.css (tokens, type, header, buttons, motion utilities). Every
   rule is scoped under `.rl-form` so no other page is affected. The existing
   form behaviour classes (.rlhq-input, .rlhq-choice, .rlhq-next-step,
   .rlhq-form-status, …) keep their names — forms.js depends on them — and are
   restyled here to match the homepage. Controls themselves are untouched.
   ========================================================================== */

.rl-form { background: var(--rl-warm); }

/* ---------- slim header: brand + way back, no marketing nav on a form ---------- */
.rl-form .form-header { background: var(--rl-midnight); }   /* solid: no hero sits behind it here */
.rl-form .form-header .site-header__bar { min-height: 68px; }
.rl-form .form-header__back {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px;
  font-size: 15px; font-weight: 600; color: var(--rl-on-dark-2); text-decoration: none;
  transition: color var(--rl-t-micro) var(--rl-ease);
}
.rl-form .form-header__back:hover { color: #fff; }
.rl-form .form-header__back svg { width: 18px; height: 18px; }
.rl-form .brand img { width: 40px; height: 40px; }
.rl-form .brand span { font-size: 20px; }

/* ---------- hero band ---------- */
.rl-form .form-hero {
  background:
    radial-gradient(900px 420px at 85% -10%, rgba(10, 114, 185, 0.18), transparent 60%),
    linear-gradient(180deg, var(--rl-midnight), var(--rl-navy));
  color: var(--rl-on-dark-2);
  padding: clamp(44px, 7vw, 84px) 0 clamp(104px, 12vw, 148px);
}
.rl-form .form-hero .eyebrow { color: var(--rl-copper); }
.rl-form .form-hero h1 {
  color: #fff; margin-top: 16px;
  font-size: clamp(34px, 4.4vw, 56px); line-height: 1.04; letter-spacing: -0.022em; max-width: 20ch;
}
.rl-form .form-hero .lead { color: var(--rl-on-dark-2); margin-top: 18px; }

/* "Guided setup included · No activation fee · …" — four plain statements. */
.rl-form .assure {
  display: grid; gap: 10px 14px; margin-top: 30px;
  grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 760px;
}
@media (min-width: 900px) { .rl-form .assure { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.rl-form .assure li {
  display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 10px 14px;
  border: 1px solid var(--rl-line-dark); border-radius: var(--rl-radius);
  background: rgba(255, 255, 255, 0.04); color: #fff; font-weight: 600; font-size: 15px; line-height: 1.3;
}
.rl-form .assure svg { width: 18px; height: 18px; flex: 0 0 auto; color: var(--rl-green-on-dark); }

/* ---------- body ---------- */
.rl-form .form-main { position: relative; margin-top: clamp(-112px, -9vw, -72px); padding-bottom: clamp(56px, 8vw, 96px); }
.rl-form .form-shell { max-width: 820px; margin: 0 auto; }

.rl-form .form-card {
  background: var(--rl-paper); border: 1px solid var(--rl-line-cool); border-radius: var(--rl-radius-lg);
  box-shadow: var(--rl-shadow); padding: clamp(22px, 4vw, 44px);
}
.rl-form .form-card + .form-card { margin-top: 20px; }

.rl-form .form-section + .form-section { margin-top: 36px; padding-top: 32px; border-top: 1px solid var(--rl-line-cool); }
.rl-form .form-section > * + * { margin-top: 16px; }
.rl-form .grid-2 { display: grid; gap: 16px 20px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .rl-form .grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.rl-form .stack > * + * { margin-top: 12px; }

/* Section titles: "1 · Personal Information" stays as written; the number reads as a step. */
.rl-form .rlhq-section-title {
  font-family: var(--rl-display); font-weight: 800; font-size: clamp(20px, 2vw, 24px);
  letter-spacing: -0.015em; color: var(--rl-ink);
}

/* Labels, hints, required marker */
.rl-form .rlhq-label { font-family: var(--rl-sans); font-weight: 600; font-size: 15px; color: var(--rl-ink); margin-bottom: 6px; }
.rl-form .rlhq-hint { font-size: 14px; color: var(--rl-muted); margin: -2px 0 8px; }
.rl-form .rlhq-required { color: var(--rl-red); }

/* Inputs */
.rl-form .rlhq-input {
  min-height: 52px; padding: 13px 15px; font-family: var(--rl-sans); font-size: 16px; color: var(--rl-ink);
  background: #fff; border: 1px solid #C9D0DA; border-radius: var(--rl-radius);
  transition: border-color var(--rl-t-micro) var(--rl-ease), box-shadow var(--rl-t-micro) var(--rl-ease);
}
.rl-form textarea.rlhq-input { min-height: 120px; line-height: 1.5; resize: vertical; }
.rl-form .rlhq-input:hover { border-color: #9AA5B5; }
.rl-form .rlhq-input:focus { outline: none; border-color: var(--rl-copper); box-shadow: 0 0 0 3px rgba(217, 126, 31, 0.28); }
.rl-form .rlhq-input.rlhq-invalid { border-color: var(--rl-red); box-shadow: 0 0 0 3px var(--rl-red-soft); }
.rl-form .rlhq-field-error { color: #A8322C; font-size: 14px; font-weight: 600; margin-top: 6px; }

/* Choice cards: billing, plan, and every legal acknowledgment */
.rl-form .rlhq-choice {
  gap: 14px; padding: 16px 18px; border: 1px solid var(--rl-line-cool); border-radius: var(--rl-radius);
  background: #fff; transition: border-color var(--rl-t-micro) var(--rl-ease), background var(--rl-t-micro) var(--rl-ease);
}
.rl-form .rlhq-choice:hover { border-color: #9AA5B5; }
.rl-form .rlhq-choice:has(input:checked) { border-color: var(--rl-copper); background: #FDF6EE; }
.rl-form .rlhq-choice:has(input:focus-visible) { outline: 3px solid rgba(217, 126, 31, 0.6); outline-offset: 2px; }
.rl-form .rlhq-choice input { width: 20px; height: 20px; margin-top: 1px; accent-color: var(--rl-copper); }
.rl-form .rlhq-choice-body { flex: 1 1 auto; font-size: 15px; line-height: 1.55; color: var(--rl-body); }
.rl-form .rlhq-choice-body strong { color: var(--rl-ink); }
.rl-form .rlhq-choice-body a { color: var(--rl-ink); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.rl-form .rlhq-choice-note { border-top-color: var(--rl-line-cool); color: var(--rl-muted); font-size: 14px; }

/* Submit, certification and closing line */
.rl-form .form-submit { margin-top: 36px; padding-top: 28px; border-top: 1px solid var(--rl-line-cool); }
.rl-form .form-submit > * + * { margin-top: 14px; }
.rl-form .rlhq-submit {
  min-height: 56px; border-radius: var(--rl-radius); font-family: var(--rl-sans); font-weight: 700; font-size: 17px;
  background: var(--rl-copper); color: var(--rl-copper-ink); box-shadow: 0 6px 18px rgba(217, 126, 31, 0.28);
}
.rl-form .rlhq-submit:hover:not(:disabled) { background: var(--rl-copper-hover); color: #fff; transform: translateY(-1px); }
.rl-form .rlhq-submit:focus-visible { outline: 3px solid rgba(217, 126, 31, 0.6); outline-offset: 3px; }
.rl-form .fine { font-size: 14px; line-height: 1.55; color: var(--rl-muted); text-align: center; }
.rl-form .fine a { color: var(--rl-ink); font-weight: 700; }
.rl-form .terms-line { font-size: 14px; font-weight: 600; color: var(--rl-ink); text-align: center; letter-spacing: 0.01em; }

/* Status panels (forms.js) and the next-step confirmation */
.rl-form .rlhq-form-status { border-radius: var(--rl-radius); padding: 16px 18px; }
.rl-form .rlhq-status-title { font-family: var(--rl-sans); font-weight: 700; }
.rl-form .rlhq-status-body { font-size: 15px; line-height: 1.5; }
.rl-form .rlhq-next-step { margin-top: 24px; border: 1px solid rgba(30, 158, 106, 0.35); background: #F1FAF5; border-radius: var(--rl-radius); padding: 20px 22px; }
.rl-form .rlhq-next-step .next-title { font-family: var(--rl-display); font-weight: 800; font-size: 20px; color: var(--rl-ink); }
.rl-form .rlhq-next-step .next-body { margin-top: 6px; font-size: 15px; line-height: 1.55; color: var(--rl-body); }
.rl-form .rlhq-next-step a, .rl-form .rlhq-status-link { color: var(--rl-ink); font-weight: 700; }

.rl-form .noscript-note { background: #fff; border: 1px solid var(--rl-line-cool); border-radius: var(--rl-radius); padding: 18px; margin-bottom: 20px; text-align: center; color: var(--rl-ink); }

/* ---------- compact footer ---------- */
.rl-form .form-footer { background: var(--rl-midnight); color: var(--rl-on-dark-2); padding: 32px 0; font-size: 14px; }
.rl-form .form-footer .wrap { display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; align-items: center; }
.rl-form .form-footer nav { display: flex; flex-wrap: wrap; gap: 6px 22px; }
.rl-form .form-footer a { color: var(--rl-on-dark-2); display: inline-flex; min-height: 44px; align-items: center; }
.rl-form .form-footer a:hover { color: #fff; }

/* ==========================================================================
   Pilot page
   ========================================================================== */
.rl-form .pilot-offer {
  border-left: 4px solid var(--rl-copper);
}
.rl-form .pilot-offer p { font-size: 17px; line-height: 1.6; color: var(--rl-body); }
.rl-form .pilot-offer p + p { margin-top: 14px; }
.rl-form .pilot-offer strong { color: var(--rl-ink); }

.rl-form .card-title { font-size: clamp(22px, 2.4vw, 28px); line-height: 1.15; letter-spacing: -0.015em; }
.rl-form .card-sub { font-family: var(--rl-sans); font-size: 13px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--rl-copper-text); margin: 22px 0 10px; }
.rl-form .note { margin-top: 18px; font-size: 15px; line-height: 1.6; color: var(--rl-muted); }

/* How the 30 days run: a vertical timeline with nodes. */
.rl-form .timeline { margin: 22px 0 0; padding: 0; list-style: none; position: relative; }
.rl-form .timeline li { position: relative; padding: 0 0 22px 44px; font-size: 16px; line-height: 1.6; color: var(--rl-body); }
.rl-form .timeline li:last-child { padding-bottom: 0; }
.rl-form .timeline li::before {
  content: ""; position: absolute; left: 7px; top: 6px; width: 14px; height: 14px; border-radius: 50%;
  background: #fff; border: 3px solid var(--rl-copper);
}
.rl-form .timeline li::after { content: ""; position: absolute; left: 13px; top: 24px; bottom: 2px; width: 2px; background: var(--rl-line-cool); }
.rl-form .timeline li:last-child::after { display: none; }
.rl-form .timeline li.is-optional::before { border-color: var(--rl-muted); border-style: dashed; }
.rl-form .timeline strong { color: var(--rl-ink); }

/* Commitments: two columns on wide screens. */
.rl-form .sides { display: grid; gap: 8px 36px; grid-template-columns: 1fr; }
@media (min-width: 760px) { .rl-form .sides { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.rl-form .ticks li { position: relative; padding-left: 28px; font-size: 16px; line-height: 1.55; color: var(--rl-body); }
.rl-form .ticks li + li { margin-top: 10px; }
.rl-form .ticks li::before {
  content: ""; position: absolute; left: 2px; top: 7px; width: 12px; height: 7px;
  border-left: 2px solid var(--rl-copper); border-bottom: 2px solid var(--rl-copper); transform: rotate(-45deg);
}
.rl-form .ticks strong { color: var(--rl-ink); }

/* Pilot form: its controls carry no classes (pinned), so they are styled by element. */
.rl-form .pilot-form .form-title { margin-bottom: 4px; }
.rl-form .pilot-form label { display: block; font-size: 15px; font-weight: 600; color: var(--rl-ink); margin: 18px 0 6px; }
.rl-form .pilot-form .row { display: grid; gap: 0 20px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .rl-form .pilot-form .row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.rl-form .pilot-form input:not([type="checkbox"]), .rl-form .pilot-form select, .rl-form .pilot-form textarea {
  width: 100%; min-height: 52px; padding: 13px 15px; font: inherit; font-size: 16px; color: var(--rl-ink);
  background: #fff; border: 1px solid #C9D0DA; border-radius: var(--rl-radius);
  transition: border-color var(--rl-t-micro) var(--rl-ease), box-shadow var(--rl-t-micro) var(--rl-ease);
}
.rl-form .pilot-form textarea { min-height: 104px; line-height: 1.5; resize: vertical; }
.rl-form .pilot-form input:not([type="checkbox"]):hover, .rl-form .pilot-form select:hover, .rl-form .pilot-form textarea:hover { border-color: #9AA5B5; }
.rl-form .pilot-form input:not([type="checkbox"]):focus, .rl-form .pilot-form select:focus, .rl-form .pilot-form textarea:focus {
  outline: none; border-color: var(--rl-copper); box-shadow: 0 0 0 3px rgba(217, 126, 31, 0.28);
}
.rl-form .pilot-form .help { font-size: 14px; line-height: 1.5; color: var(--rl-muted); margin-top: 8px; }
.rl-form .pilot-form .consents { margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--rl-line-cool); }
.rl-form .pilot-form label.consent {
  display: flex; gap: 14px; align-items: flex-start; margin: 12px 0 0; padding: 16px 18px; min-height: 44px;
  border: 1px solid var(--rl-line-cool); border-radius: var(--rl-radius); background: #fff; cursor: pointer;
  font-weight: 400; font-size: 15px; line-height: 1.55; color: var(--rl-body);
  transition: border-color var(--rl-t-micro) var(--rl-ease), background var(--rl-t-micro) var(--rl-ease);
}
.rl-form .pilot-form label.consent:hover { border-color: #9AA5B5; }
.rl-form .pilot-form label.consent:has(input:checked) { border-color: var(--rl-copper); background: #FDF6EE; }
.rl-form .pilot-form label.consent:has(input:focus-visible) { outline: 3px solid rgba(217, 126, 31, 0.6); outline-offset: 2px; }
.rl-form .pilot-form .consent input { width: 20px; height: 20px; margin-top: 2px; flex: 0 0 auto; accent-color: var(--rl-copper); }
.rl-form .pilot-form .consent a { color: var(--rl-ink); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.rl-form .pilot-form button {
  width: 100%; min-height: 56px; margin-top: 28px; border: 0; border-radius: var(--rl-radius); cursor: pointer;
  font: inherit; font-size: 17px; font-weight: 700; background: var(--rl-copper); color: var(--rl-copper-ink);
  box-shadow: 0 6px 18px rgba(217, 126, 31, 0.28);
  transition: background var(--rl-t-micro) var(--rl-ease), color var(--rl-t-micro) var(--rl-ease), transform var(--rl-t-micro) var(--rl-ease);
}
.rl-form .pilot-form button:hover:not([disabled]) { background: var(--rl-copper-hover); color: #fff; transform: translateY(-1px); }
.rl-form .pilot-form button:focus-visible { outline: 3px solid rgba(217, 126, 31, 0.6); outline-offset: 3px; }
.rl-form .pilot-form button[disabled] { opacity: 0.6; cursor: default; transform: none; }
/* #msg states written by the (pinned) pilot script */
.rl-form #msg { margin-top: 14px; font-size: 15px; line-height: 1.5; }
.rl-form #msg:empty { display: none; }
.rl-form .msg-err { color: #8A2A24; background: #FDF2F1; border: 1px solid #F3C7C3; border-radius: var(--rl-radius); padding: 12px 14px; font-weight: 600; }
.rl-form .msg-ok { color: #166F4B; font-weight: 600; }
.rl-form .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.rl-form .hide { display: none !important; }
.rl-form .done { text-align: center; }
.rl-form .done h2 { color: var(--rl-green); font-size: clamp(26px, 3vw, 32px); }
.rl-form .done p { margin: 12px auto 0; max-width: 56ch; font-size: 17px; line-height: 1.6; color: var(--rl-body); }

/* ---------- restrained motion (runs once; html.rl-motion only) ---------- */
.rl-motion .rl-form .assure[data-sequence] li { opacity: 0; transform: translateY(8px); }
.rl-motion .rl-form .assure[data-sequence].is-run li {
  animation: rl-form-rise var(--rl-t-reveal) var(--rl-ease) forwards;
  animation-delay: calc(var(--i, 0) * 90ms + 120ms);
}
.rl-motion .rl-form .timeline[data-sequence] li::before { transform: scale(0.4); opacity: 0; }
.rl-motion .rl-form .timeline[data-sequence].is-run li::before {
  animation: rl-form-node 420ms var(--rl-ease) forwards; animation-delay: calc(var(--i, 0) * 140ms);
}
@keyframes rl-form-rise { to { opacity: 1; transform: none; } }
@keyframes rl-form-node { to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .rl-motion .rl-form .assure[data-sequence] li, .rl-motion .rl-form .timeline[data-sequence] li::before { opacity: 1 !important; transform: none !important; }
  .rl-form .rlhq-submit:hover:not(:disabled), .rl-form .pilot-form button:hover:not([disabled]) { transform: none; }
}
