/* ============================================================================
 * /request-a-free-estimate/form.css
 * Scoped to body.req-v2. Layered on top of /free-roof-estimate/v2.css so the
 * page inherits the v2 design system (tokens, hero, headers, footer) while
 * this file owns the 3-step lead-capture form + page-specific extras.
 * ============================================================================ */

/* Treat req-v2 as a roof-v2 dialect — reuse all roof-v2 tokens by aliasing
   the body class. Anything that targets body.roof-v2 elsewhere keeps working. */
body.req-v2 {
  background: var(--rv2-cream);
}

/* ── Hero adjustments — we want the form ABOVE the fold ──────────────────── */
body.req-v2 .rv2-hero {
  min-height: auto;
  padding-top: clamp(110px, 14vh, 170px);
  padding-bottom: clamp(56px, 8vw, 90px);
  align-items: flex-start;
}
body.req-v2 .req-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: start;
  width: 100%;
}
body.req-v2 .req-hero-copy { max-width: 560px; }
body.req-v2 .req-hero-copy .rv2-hero-headline {
  font-size: clamp(40px, 5.2vw, 68px);
  margin-bottom: 18px;
}
body.req-v2 .req-hero-copy .rv2-hero-sub {
  font-size: clamp(17px, 1.4vw, 19px);
  margin-bottom: 22px;
  max-width: 540px;
}
body.req-v2 .req-hero-bullets {
  display: flex; flex-direction: column; gap: 10px;
  list-style: none; padding: 0; margin: 0 0 26px;
  font-size: 15px; color: rgba(255,255,255,0.86) !important;
}
body.req-v2 .req-hero-bullets li {
  display: flex; align-items: flex-start; gap: 10px;
  line-height: 1.5;
}
body.req-v2 .req-hero-bullets li::before {
  content: ""; flex-shrink: 0;
  width: 18px; height: 18px; margin-top: 2px;
  background: var(--rv2-orange);
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'><polyline points='20 6 9 17 4 12'/></svg>") center / 14px no-repeat;
          mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'><polyline points='20 6 9 17 4 12'/></svg>") center / 14px no-repeat;
  border-radius: 999px;
  background-color: rgba(255, 140, 0, 0.95);
}
body.req-v2 .req-hero-trustline {
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.78) !important;
  margin-top: 18px;
}

/* ── The form card itself ────────────────────────────────────────────────── */
body.req-v2 .req-form-card {
  background: var(--rv2-cream);
  border-radius: 22px;
  padding: clamp(24px, 3vw, 36px);
  box-shadow:
    0 30px 60px -20px rgba(8, 17, 31, 0.45),
    0 8px 20px -8px rgba(8, 17, 31, 0.30);
  position: relative;
  color: var(--rv2-ink);
}
body.req-v2 .req-form-card .req-form-eyebrow {
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--rv2-accent) !important;
  margin-bottom: 8px;
}
body.req-v2 .req-form-card .req-form-title {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: clamp(22px, 2.2vw, 28px);
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--rv2-ink) !important;
  margin: 0 0 6px;
}
body.req-v2 .req-form-card .req-form-sub {
  font-size: 14px; line-height: 1.5;
  color: var(--rv2-ink-soft) !important;
  margin: 0 0 18px;
}

/* Progress bar */
body.req-v2 .req-progress {
  display: flex; align-items: center; gap: 8px;
  margin: 4px 0 18px;
}
body.req-v2 .req-progress-bar {
  flex: 1; height: 4px; border-radius: 999px;
  background: rgba(10, 23, 51, 0.10);
  position: relative; overflow: hidden;
}
body.req-v2 .req-progress-fill {
  position: absolute; inset: 0 auto 0 0;
  width: 33.33%;
  background: linear-gradient(90deg, var(--rv2-accent), var(--rv2-orange));
  border-radius: inherit;
  transition: width 0.4s cubic-bezier(.2,.7,.2,1);
}
body.req-v2 .req-progress-text {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--rv2-accent) !important;
  white-space: nowrap;
}

/* Step container — only the active step is visible */
body.req-v2 .req-step { display: none; }
body.req-v2 .req-step.is-active { display: block; animation: reqStepIn 0.35s ease both; }
@keyframes reqStepIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

body.req-v2 .req-step-q {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: clamp(20px, 2vw, 24px);
  line-height: 1.2;
  color: var(--rv2-ink) !important;
  margin: 0 0 14px;
}

/* Service tiles (step 1) */
body.req-v2 .req-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 18px;
}
body.req-v2 .req-option {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 14px;
  border: 1.5px solid rgba(10, 23, 51, 0.12);
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  text-align: left;
  font: inherit;
  color: var(--rv2-ink) !important;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s;
}
body.req-v2 .req-option:hover {
  border-color: var(--rv2-accent);
  box-shadow: 0 6px 18px -8px rgba(194, 65, 12, 0.35);
  transform: translateY(-1px);
}
body.req-v2 .req-option.is-selected {
  border-color: var(--rv2-accent);
  background: var(--rv2-warm);
  box-shadow: 0 8px 22px -10px rgba(194, 65, 12, 0.40);
}
body.req-v2 .req-option-icon {
  width: 38px; height: 38px; flex-shrink: 0;
  background: var(--rv2-warm-2);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: var(--rv2-accent) !important;
}
body.req-v2 .req-option.is-selected .req-option-icon {
  background: var(--rv2-accent);
  color: #fff !important;
}
body.req-v2 .req-option-icon svg { width: 20px; height: 20px; }
body.req-v2 .req-option-label {
  font-size: 15px; font-weight: 600;
  color: var(--rv2-ink) !important;
  line-height: 1.2;
}

/* Inputs */
body.req-v2 .req-field {
  display: block;
  margin-bottom: 12px;
}
body.req-v2 .req-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
body.req-v2 .req-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--rv2-ink) !important;
  margin: 0 0 6px;
}
body.req-v2 .req-input,
body.req-v2 .req-select,
body.req-v2 .req-textarea {
  width: 100%;
  padding: 12px 14px;
  font: inherit;
  font-size: 15px;
  border: 1.5px solid rgba(10, 23, 51, 0.14);
  border-radius: 10px;
  background: #fff;
  color: var(--rv2-ink) !important;
  transition: border-color 0.2s, box-shadow 0.2s;
  -webkit-appearance: none;
  appearance: none;
}
body.req-v2 .req-textarea { resize: vertical; min-height: 80px; line-height: 1.45; }
body.req-v2 .req-input:focus,
body.req-v2 .req-select:focus,
body.req-v2 .req-textarea:focus {
  outline: none;
  border-color: var(--rv2-accent);
  box-shadow: 0 0 0 3px rgba(194, 65, 12, 0.15);
}
body.req-v2 .req-select {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230A1733' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
  padding-right: 36px;
}

/* SMS consent */
body.req-v2 .req-consent {
  display: flex; align-items: flex-start; gap: 10px;
  font-size: 12px; line-height: 1.5;
  color: var(--rv2-ink-soft) !important;
  margin: 4px 0 14px;
}
body.req-v2 .req-consent input[type="checkbox"] {
  margin: 3px 0 0; flex-shrink: 0;
  accent-color: var(--rv2-accent);
}

/* Step nav */
body.req-v2 .req-nav {
  display: flex; align-items: center; gap: 10px;
  margin-top: 14px;
}
body.req-v2 .req-btn-primary {
  flex: 1;
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px;
  padding: 15px 22px;
  font-size: 15px; font-weight: 700;
  letter-spacing: 0.01em;
  border: none; border-radius: 999px;
  background: linear-gradient(90deg, var(--rv2-accent) 0%, var(--rv2-orange) 100%);
  color: #fff !important;
  cursor: pointer;
  transition: transform 0.18s, box-shadow 0.18s;
  box-shadow: 0 10px 24px -10px rgba(194, 65, 12, 0.55);
}
body.req-v2 .req-btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px -10px rgba(194, 65, 12, 0.65);
}
body.req-v2 .req-btn-primary:disabled {
  opacity: 0.55; cursor: not-allowed; transform: none;
  box-shadow: 0 6px 14px -8px rgba(194, 65, 12, 0.40);
}
body.req-v2 .req-btn-back {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 13px 18px;
  font-size: 14px; font-weight: 600;
  border: 1.5px solid rgba(10, 23, 51, 0.14);
  border-radius: 999px;
  background: transparent;
  color: var(--rv2-ink) !important;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}
body.req-v2 .req-btn-back:hover {
  background: rgba(10, 23, 51, 0.04);
  border-color: rgba(10, 23, 51, 0.24);
}

body.req-v2 .req-form-trust {
  margin-top: 14px;
  padding: 12px 14px;
  background: var(--rv2-warm);
  border: 1px solid rgba(194, 65, 12, 0.20);
  border-radius: 12px;
  font-size: 13px; line-height: 1.5;
  color: var(--rv2-ink) !important;
}

body.req-v2 .req-form-error {
  display: none;
  margin-top: 10px;
  padding: 10px 12px;
  background: rgba(220, 38, 38, 0.08);
  border: 1px solid rgba(220, 38, 38, 0.30);
  border-radius: 10px;
  font-size: 13px;
  color: #B91C1C !important;
}
body.req-v2 .req-form-error.is-shown { display: block; }

/* Success state */
body.req-v2 .req-success {
  display: none;
  text-align: center;
  padding: 24px 8px 12px;
}
body.req-v2 .req-success.is-shown { display: block; }
body.req-v2 .req-success-icon {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--rv2-accent), var(--rv2-orange));
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 16px;
  color: #fff !important;
  box-shadow: 0 12px 24px -10px rgba(194, 65, 12, 0.50);
}
body.req-v2 .req-success-icon svg { width: 32px; height: 32px; }
body.req-v2 .req-success h3 {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 26px;
  margin: 0 0 8px;
  color: var(--rv2-ink) !important;
}
body.req-v2 .req-success p {
  font-size: 15px; line-height: 1.55;
  color: var(--rv2-ink-soft) !important;
  margin: 0 auto 6px;
  max-width: 380px;
}
body.req-v2 .req-success-ref {
  display: inline-block;
  margin-top: 12px;
  padding: 6px 12px;
  font-size: 12px;
  letter-spacing: 0.1em;
  font-weight: 600;
  background: rgba(10, 23, 51, 0.06);
  border-radius: 999px;
  color: var(--rv2-ink-soft) !important;
}

/* ── "What happens next" section ─────────────────────────────────────────── */
body.req-v2 .req-steps-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 48px;
}
body.req-v2 .req-step-card {
  background: #fff;
  border: 1px solid var(--rv2-line);
  border-radius: 16px;
  padding: 28px 24px;
  position: relative;
}
body.req-v2 .req-step-card-num {
  position: absolute;
  top: -16px; left: 24px;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--rv2-accent), var(--rv2-orange));
  color: #fff !important;
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 18px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 16px -6px rgba(194, 65, 12, 0.55);
}
body.req-v2 .req-step-card h3 {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 22px;
  line-height: 1.2;
  margin: 0 0 8px;
  color: var(--rv2-ink) !important;
}
body.req-v2 .req-step-card p {
  font-size: 15px; line-height: 1.55;
  color: var(--rv2-ink-soft) !important;
  margin: 0;
}

/* ── Services-covered grid ───────────────────────────────────────────────── */
body.req-v2 .req-services-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 40px;
}
body.req-v2 .req-service-card {
  background: #fff;
  border: 1px solid var(--rv2-line);
  border-radius: 16px;
  padding: 28px 26px;
}
body.req-v2 .req-service-card h3 {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 24px;
  margin: 0 0 12px;
  color: var(--rv2-ink) !important;
}
body.req-v2 .req-service-card ul {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: 8px;
}
body.req-v2 .req-service-card li {
  display: flex; align-items: flex-start; gap: 10px;
  font-size: 15px; line-height: 1.5;
  color: var(--rv2-ink-soft) !important;
}
body.req-v2 .req-service-card li::before {
  content: ""; flex-shrink: 0;
  width: 16px; height: 16px; margin-top: 3px;
  background-color: var(--rv2-accent);
  border-radius: 999px;
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'><polyline points='20 6 9 17 4 12'/></svg>") center / 12px no-repeat;
          mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'><polyline points='20 6 9 17 4 12'/></svg>") center / 12px no-repeat;
}

/* ── Why-Nova value cards ─────────────────────────────────────────────────── */
body.req-v2 .req-why-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 40px;
}
body.req-v2 .req-why-card {
  text-align: left;
  padding: 22px 0;
}
body.req-v2 .req-why-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: var(--rv2-warm);
  color: var(--rv2-accent) !important;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 14px;
}
body.req-v2 .req-why-card h3 {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 20px; line-height: 1.2;
  margin: 0 0 6px;
  color: var(--rv2-ink) !important;
}
body.req-v2 .req-why-card p {
  font-size: 15px; line-height: 1.55;
  color: var(--rv2-ink-soft) !important;
  margin: 0;
}

/* ── FAQ (reuse roof-v2 details/summary styling visually) ────────────────── */
body.req-v2 .req-faq {
  margin-top: 32px;
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}
body.req-v2 .req-faq details {
  border-top: 1px solid var(--rv2-line);
  padding: 18px 0;
}
body.req-v2 .req-faq details:last-of-type { border-bottom: 1px solid var(--rv2-line); }
body.req-v2 .req-faq summary {
  cursor: pointer;
  list-style: none;
  display: flex; align-items: center; justify-content: space-between;
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 19px;
  line-height: 1.3;
  color: var(--rv2-ink) !important;
}
body.req-v2 .req-faq summary::-webkit-details-marker { display: none; }
body.req-v2 .req-faq summary::after {
  content: "+";
  font-family: 'Inter', sans-serif;
  font-weight: 300;
  font-size: 26px;
  color: var(--rv2-accent) !important;
  transition: transform 0.25s;
}
body.req-v2 .req-faq details[open] summary::after { content: "–"; }
body.req-v2 .req-faq details p {
  margin: 14px 0 0;
  font-size: 15px; line-height: 1.6;
  color: var(--rv2-ink-soft) !important;
}

/* ── Mobile ──────────────────────────────────────────────────────────────── */
@media (max-width: 920px) {
  body.req-v2 .req-hero-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  body.req-v2 .req-hero-copy { max-width: 100%; }
  body.req-v2 .rv2-hero { min-height: auto; padding-top: clamp(100px, 14vh, 140px); }
  body.req-v2 .req-services-grid,
  body.req-v2 .req-why-grid,
  body.req-v2 .req-steps-row {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}
@media (max-width: 520px) {
  body.req-v2 .req-options { grid-template-columns: 1fr; }
  body.req-v2 .req-field-row { grid-template-columns: 1fr; }
  body.req-v2 .req-nav { flex-direction: column-reverse; gap: 8px; }
  body.req-v2 .req-nav .req-btn-back,
  body.req-v2 .req-nav .req-btn-primary { width: 100%; }
}
