/* Quote page: the multistep quote form. Shared form rules live in site.css
   (section 7); everything here is layout and the step-specific pieces. */

.bar h1 { color: var(--white); font-size: var(--t-80); line-height: .7; }

/* two columns: intro + what happens next on the left, the form on the right */
.qpage { padding: calc(100 * var(--s)) var(--gutter) calc(140 * var(--s)); }
.qpage__inner { display: grid; grid-template-columns: calc(560 * var(--s)) 1fr; gap: calc(120 * var(--s)); align-items: start; width: calc(1640 * var(--s)); max-width: 100%; margin-inline: auto; }

/* left column */
.qside > img { width: calc(200 * var(--s)); min-width: 110px; margin-bottom: calc(30 * var(--s)); }
.qside h2 { font-size: var(--t-60); }
.qside h2 + p { margin: calc(24 * var(--s)) 0 0; line-height: 1.43; }
.qside__prefer { font-family: var(--font-nav); font-weight: 900; font-size: var(--t-22); letter-spacing: .12em; text-transform: uppercase; line-height: 1; margin: calc(40 * var(--s)) 0 0; color: var(--ink-3); }
.qside__phone { display: inline-block; font-family: var(--font-head); font-weight: 900; font-size: var(--t-55); line-height: 1; color: var(--brand); margin-top: calc(10 * var(--s)); }
.qside__next { font-size: var(--t-32); letter-spacing: .08em; margin: calc(56 * var(--s)) 0 calc(30 * var(--s)); }
.qside .bullets { gap: calc(24 * var(--s)); }
.qside .bullets li { grid-template-columns: calc(44 * var(--s)) 1fr; gap: calc(20 * var(--s)); font-size: var(--t-22); }

/* the form */
.qform { scroll-margin-top: calc(var(--header-h) + 24px); }
.qform fieldset { gap: calc(30 * var(--s)); }
.qform legend { font-size: var(--t-45); letter-spacing: .06em; line-height: .95; margin-bottom: 0; float: left; width: 100%; } /* float keeps the legend inside the grid flow so the step count can sit above it */
.qstep__count { order: -1; margin: 0; font-family: var(--font-nav); font-weight: 900; font-size: var(--t-20); letter-spacing: .12em; text-transform: uppercase; color: var(--brand); line-height: 1; }
.qform fieldset > .field--row + .qgroup, .qform fieldset > .field + .qgroup { margin-top: calc(6 * var(--s)); }

/* progress: the four numbered houses from How It Works, grey until reached */
.qform .form-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 0 0 calc(30 * var(--s)); padding: 0 0 calc(34 * var(--s)); border-bottom: 3px solid var(--brand); list-style: none; counter-reset: none; }
.qform .form-steps span { display: flex; flex-direction: column; align-items: center; gap: 12px; width: auto; height: auto; border-radius: 0; background: none; text-align: center; font-family: var(--font-head); font-weight: 900; font-size: var(--t-20); letter-spacing: .08em; text-transform: uppercase; line-height: 1.05; color: var(--ink-3); filter: grayscale(1); opacity: .4; transition: opacity .3s var(--ease), filter .3s var(--ease); }
.qform .form-steps span img { width: calc(78 * var(--s)); min-width: 44px; }
.qform .form-steps span.is-done { background: none; filter: none; opacity: 1; }

/* group of pills (radios / checkboxes) */
.qgroup { display: grid; gap: 12px; }
.qgroup__label { margin: 0; font-weight: 700; font-size: .8em; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-2); }
.qgroup__label small { display: block; margin-top: 4px; font-weight: 400; text-transform: none; letter-spacing: 0; color: var(--muted); }
.qchoices { display: flex; flex-wrap: wrap; gap: 12px; }
.qchoices label { display: inline-flex; align-items: center; gap: 10px; padding: .45em 1em .45em .8em; border: 2px solid var(--ink-3); background: var(--white); color: var(--ink); font-size: var(--t-22); line-height: 1.2; cursor: pointer; transition: background .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease); }
.qchoices label:hover { border-color: var(--brand); }
.qchoices input { accent-color: var(--brand); width: 1.1em; height: 1.1em; margin: 0; flex: none; }
.qchoices label:has(input:checked) { background: var(--brand); border-color: var(--brand); color: var(--white); }
.qchoices label:has(input:checked) input { accent-color: var(--white); }
.qchoices label:has(input:focus-visible) { outline: 3px solid var(--accent); outline-offset: 3px; }

/* step 1: building type as beige tiles with the service icons */
.qcards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.qcard { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; min-height: calc(220 * var(--s)); padding: 26px 16px 22px; background: var(--surface); border: 3px solid transparent; text-align: center; font-family: var(--font-head); font-weight: 900; font-size: var(--t-22); letter-spacing: .08em; text-transform: uppercase; line-height: 1.05; color: var(--ink-2); cursor: pointer; transition: border-color .2s var(--ease), background .2s var(--ease); }
.qcard:hover { border-color: var(--brand); }
.qcard img { width: calc(96 * var(--s)); min-width: 52px; height: auto; }
.qcard--wide { grid-column: 1 / -1; flex-direction: row; min-height: 0; padding: 18px 24px; }
.qcard--wide img { width: calc(56 * var(--s)); min-width: 36px; }
.qcard input { position: absolute; top: 12px; left: 12px; margin: 0; width: 1.1em; height: 1.1em; accent-color: var(--brand); }
.qcard--wide input { position: static; } /* the wide tile is one row, so the radio sits inline before the icon */
.qcard:has(input:checked) { border-color: var(--brand); background: var(--white); color: var(--brand); }
.qcard:has(input:focus-visible) { outline: 3px solid var(--accent); outline-offset: 3px; }

.qfine { margin: 0; font-size: var(--t-20); color: var(--muted); line-height: 1.4; }
.qfine a { color: var(--brand); text-decoration: underline; }

/* back / next / send */
.qform__actions { margin-top: calc(20 * var(--s)); justify-content: space-between; }
.qform__actions .arrow-btn { border: 0; margin-left: auto; }
.qform__actions .btn { min-width: 0; padding: 0 1.6em; }

/* thank-you box */
.qsuccess { grid-column: 2; }
.qsuccess h3 { font-size: var(--t-40); }
.qsuccess a { color: var(--brand); }
.qsuccess .btn { color: var(--white); margin-top: 8px; }

@media (max-width: 900px) {
  .qpage { padding: 40px var(--gutter) 60px; }
  .qpage__inner { grid-template-columns: 1fr; gap: 40px; width: 100%; }
  .qside > img { width: 120px; margin-bottom: 18px; }
  .qside h2 + p { margin-top: 14px; }
  .qside__prefer { margin-top: 24px; }
  .qside__next { margin: 32px 0 16px; }
  .qside .bullets { gap: 14px; }
  .qside .bullets li { grid-template-columns: 30px 1fr; gap: 14px; line-height: 1.15; }
  .qform fieldset { gap: 22px; }
  .qform .form-steps { gap: 6px; margin-bottom: 20px; padding-bottom: 20px; }
  .qform .form-steps span { font-size: 12px; gap: 8px; letter-spacing: .04em; }
  .qform .form-steps span img { width: 44px; }
  .qcards { grid-template-columns: 1fr 1fr; gap: 12px; }
  .qcard { min-height: 0; padding: 22px 12px 18px; font-size: 15px; }
  .qcard img { width: 52px; }
  .qcard--wide { padding: 14px 16px; font-size: 15px; }
  .qform__actions { flex-direction: column-reverse; align-items: stretch; gap: 16px; }
  .qform__actions .btn { width: 100%; }
  .qform__actions .arrow-btn { margin-left: 0; align-self: center; }
  .qsuccess { grid-column: auto; }
}
