/* =========================================================
   Membership Quote Form — sandbox
   All selectors are prefixed with .mq so this can replace the
   #quote section on /maintenance-plan/ without collisions.
   ========================================================= */

.mq {
  --mq-ink: #0f1f3d;
  --mq-text: #334155;
  --mq-muted: #64748b;
  --mq-line: #dbe2ec;
  --mq-field-bg: #f8fafc;
  --mq-orange: #f0600f;
  --mq-orange-hover: #d4520a;
  --mq-orange-tint: #fff1e8;
  --mq-blue: #0b6bd3;
  --mq-navy: #0d1f45;

  box-sizing: border-box;
  max-width: 1440px;
  margin: 0 auto;
  padding: clamp(40px, 6vw, 72px) clamp(16px, 3vw, 32px);
  font-family: Inter, Arial, sans-serif;
  color: var(--mq-text);
  scroll-margin-top: 80px; /* clears the sticky header on #quote jumps */
}
.mq *,
.mq *::before,
.mq *::after { box-sizing: inherit; }
.mq p,
.mq h2,
.mq h3,
.mq h4,
.mq ul,
.mq fieldset,
.mq legend { margin: 0; padding: 0; }
.mq ul { list-style: none; }
.mq fieldset { border: 0; min-width: 0; }

/* Line icons share one style */
.mq-benefit__icon svg,
.mq__call-icon svg,
.mq__card-icon svg,
.mq-input svg,
.mq-submit svg,
.mq-secure svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- Layout ---------- */
.mq__layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  grid-template-areas:
    "intro    card"
    "benefits card"
    "call     card";
  grid-template-rows: auto 1fr auto;
  column-gap: clamp(28px, 3.5vw, 56px);
  row-gap: 28px;
  align-items: start;
}
.mq__intro    { grid-area: intro; }
.mq__benefits { grid-area: benefits; }
.mq__call     { grid-area: call; }
.mq__card     { grid-area: card; }

/* ---------- Intro ---------- */
.mq .mq__pill {
  display: inline-block;
  margin-bottom: 14px;
  padding: 6px 14px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid #fbd5bf;
  box-shadow: 0 6px 16px -10px rgba(240, 96, 15, 0.6);
  color: var(--mq-orange);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.mq .mq__title {
  font-family: Montserrat, Inter, Arial, sans-serif;
  font-weight: 800;
  font-size: clamp(2rem, 1.2rem + 2.2vw, 3rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--mq-ink);
  margin-bottom: 16px;
}
.mq .mq__lead {
  max-width: 34em;
  font-size: clamp(1.02rem, 0.95rem + 0.3vw, 1.2rem);
  line-height: 1.6;
  color: var(--mq-text);
}

/* ---------- Benefits ---------- */
.mq__benefits {
  display: grid;
  gap: 22px;
  align-content: space-evenly; /* spreads benefits to fill the height beside the form */
  height: 100%;
}
.mq-benefit {
  display: flex;
  align-items: flex-start;
  gap: 18px;
}
.mq-benefit__icon {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid #f1e4da;
  box-shadow: 0 8px 20px -12px rgba(240, 96, 15, 0.45);
  color: var(--mq-orange);
}
.mq-benefit__icon svg { width: 32px; height: 32px; }
.mq .mq-benefit h3 {
  margin: 4px 0 4px;
  font-family: Montserrat, Inter, Arial, sans-serif;
  font-size: clamp(1.1rem, 1rem + 0.35vw, 1.3rem);
  font-weight: 700;
  line-height: 1.25;
  color: var(--mq-ink);
}
.mq .mq-benefit p {
  font-size: 1.02rem;
  line-height: 1.5;
  color: var(--mq-text);
}

/* ---------- Call box ---------- */
.mq__call {
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 22px 26px;
  border-radius: 18px;
  background: linear-gradient(135deg, #eef5fe 0%, #f6f9ff 100%);
  border: 1px solid #dbe8f8;
}
.mq__call-icon {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: #dcebfc;
  color: var(--mq-blue);
}
.mq__call-icon svg { width: 40px; height: 40px; }
.mq .mq__call-kicker {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mq-blue);
}
.mq .mq__call-number {
  display: inline-block;
  margin: 2px 0 4px;
  font-family: Montserrat, Inter, Arial, sans-serif;
  font-size: clamp(1.5rem, 1.2rem + 1vw, 2.1rem);
  font-weight: 800;
  line-height: 1.15;
  color: var(--mq-blue);
  text-decoration: none;
}
.mq .mq__call-number:hover { text-decoration: underline; }
.mq .mq__call-note {
  font-size: 1rem;
  line-height: 1.45;
  color: var(--mq-ink);
}

/* ---------- Form card ---------- */
.mq__card {
  padding: clamp(22px, 2.6vw, 36px);
  border-radius: 22px;
  background: #fff;
  border: 1px solid #e6ebf2;
  box-shadow: 0 24px 60px -30px rgba(15, 31, 61, 0.35);
}
.mq__card-head {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 24px;
}
.mq__card-icon {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--mq-orange);
  color: #fff;
  box-shadow: 0 10px 22px -10px rgba(240, 96, 15, 0.7);
}
.mq__card-icon svg { width: 34px; height: 34px; }
.mq .mq__card-kicker {
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mq-blue);
}
.mq .mq__card-title {
  margin-top: 2px;
  font-family: Montserrat, Inter, Arial, sans-serif;
  font-size: clamp(1.35rem, 1.1rem + 0.9vw, 2rem);
  font-weight: 800;
  line-height: 1.15;
  color: var(--mq-ink);
}

/* ---------- Fields ---------- */
.mq-form__grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 18px 16px;
}
.mq-field { grid-column: span 3; }
.mq-field--full { grid-column: 1 / -1; }
.mq-field--address { grid-column: span 4; }
.mq-field--city { grid-column: span 2; }

.mq-field > label,
.mq-plans legend {
  display: block;
  margin-bottom: 8px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--mq-ink);
}
.mq-req { color: #e11d48; }
.mq-optional { font-weight: 500; color: var(--mq-muted); }

.mq-form input[type="text"],
.mq-form input[type="tel"],
.mq-form input[type="email"],
.mq-form textarea {
  display: block;
  width: 100%;
  min-height: 52px;
  padding: 12px 16px;
  border: 1px solid var(--mq-line);
  border-radius: 10px;
  background: var(--mq-field-bg);
  font: inherit;
  font-size: 1rem;
  color: var(--mq-ink);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}
.mq-form textarea {
  min-height: 96px;
  resize: vertical;
  line-height: 1.5;
}
.mq-form input::placeholder,
.mq-form textarea::placeholder { color: #94a3b8; }
.mq-form input:focus,
.mq-form textarea:focus {
  outline: none;
  border-color: var(--mq-orange);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(240, 96, 15, 0.14);
}
.mq-form.mq-tried input:invalid,
.mq-form.mq-tried textarea:invalid { border-color: #e11d48; }

/* Inputs with a leading icon */
.mq-input { position: relative; }
.mq-input svg {
  position: absolute;
  left: 16px;
  top: 50%;
  width: 20px;
  height: 20px;
  transform: translateY(-50%);
  color: #475569;
  pointer-events: none;
}
.mq-form .mq-input input { padding-left: 48px; }

/* Honeypot */
.mq-hp {
  position: absolute !important;
  left: -9999px !important;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

/* ---------- Plan picker ---------- */
.mq-plans__options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.mq-plan {
  --plan-accent: var(--mq-blue);
  --plan-tint: #eef5fe;
  --plan-icon-bg: #dcebfc;
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-rows: auto auto;
  column-gap: 12px;
  row-gap: 8px;
  align-items: center;
  padding: 14px;
  border: 1.5px solid var(--mq-line);
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}
.mq-plan--hvac { --plan-accent: var(--mq-orange); --plan-tint: #fff4ec; --plan-icon-bg: #fde6d6; }
.mq-plan--total { --plan-accent: #178a4c; --plan-tint: #f1faf4; --plan-icon-bg: #dcf1e4; }

.mq-plan input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}
.mq-plan__icon {
  grid-row: 1 / span 2;
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: var(--plan-icon-bg);
  color: var(--plan-accent);
}
.mq-plan--plumbing .mq-plan__icon { color: var(--mq-blue); }
.mq-plan__icon svg { width: 32px; height: 32px; }
.mq-plan__name {
  align-self: end;
  font-size: 0.98rem;
  font-weight: 600;
  line-height: 1.25;
  color: var(--mq-ink);
}
.mq-plan__radio {
  align-self: start;
  width: 24px;
  height: 24px;
  border: 2px solid #94a3b8;
  border-radius: 50%;
  background: #fff;
  transition: border-color 0.2s ease;
}
.mq-plan:hover { border-color: var(--plan-accent); }
.mq-plan:has(input:checked),
.mq-plan.is-checked {
  border-color: var(--plan-accent);
  background: var(--plan-tint);
  box-shadow: 0 8px 20px -14px var(--plan-accent);
}
.mq-plan input:checked ~ .mq-plan__radio {
  border-color: var(--plan-accent);
  background: radial-gradient(circle, var(--plan-accent) 0 45%, #fff 50%);
}
.mq-plan input:focus-visible ~ .mq-plan__radio {
  outline: 3px solid var(--plan-accent);
  outline-offset: 2px;
}
.mq-form.mq-tried .mq-plans:invalid .mq-plan,
.mq-form.mq-tried .mq-plans.is-invalid .mq-plan { border-color: #e11d48; }

/* ---------- Turnstile ---------- */
.mq-turnstile { min-height: 65px; }

/* ---------- Submit ---------- */
.mq-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  width: 100%;
  min-height: 64px;
  margin-top: 22px;
  padding: 14px 22px;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(135deg, #ea5a0c, #ff7b2e);
  color: #fff;
  font-family: inherit;
  font-size: 1.2rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 14px 28px -14px rgba(240, 96, 15, 0.8);
  transition: filter 0.2s ease, transform 0.2s ease;
}
.mq-submit svg { width: 24px; height: 24px; stroke-width: 2.4; transition: transform 0.2s ease; }
.mq-submit:hover { filter: brightness(0.95); }
.mq-submit:hover svg { transform: translateX(4px); }
.mq-submit:focus-visible { outline: 3px solid var(--mq-orange); outline-offset: 3px; }
.mq-submit:disabled { opacity: 0.7; cursor: wait; }

.mq .mq-secure {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 14px;
  font-size: 0.92rem;
  line-height: 1.4;
  color: var(--mq-muted);
  text-align: center;
}
.mq-secure svg { flex: 0 0 auto; width: 18px; height: 18px; color: #475569; }

/* ---------- Error / success ---------- */
.mq-error {
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px solid #fecaca;
  border-radius: 10px;
  background: #fff1f2;
  color: #9f1239;
  font-size: 0.95rem;
}
.mq-success {
  padding: 36px 12px;
  text-align: center;
}
.mq-success__icon {
  display: inline-grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin-bottom: 14px;
  border-radius: 50%;
  background: #dcf1e4;
  color: #178a4c;
  font-size: 2rem;
  font-weight: 700;
}
.mq .mq-success h4 {
  margin-bottom: 8px;
  font-family: Montserrat, Inter, Arial, sans-serif;
  font-size: 1.5rem;
  color: var(--mq-ink);
}

/* ---------- Trust bar ---------- */
.mq .mq-trust {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: clamp(32px, 4vw, 48px);
  padding: 22px clamp(16px, 3vw, 40px);
  border-radius: 18px;
  background: var(--mq-navy);
  color: #fff;
}
.mq-trust li {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 4px 18px;
}
.mq-trust li + li { border-left: 1px solid rgba(255, 255, 255, 0.18); }
.mq-trust svg {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  color: var(--mq-orange);
  stroke-linecap: round;
  stroke-linejoin: round;
}
.mq-trust strong {
  display: block;
  font-size: 1.1rem;
  font-weight: 600;
}
.mq-trust span {
  display: block;
  font-size: 0.95rem;
  color: #cbd5e1;
}

/* =========================================================
   Responsive
   ========================================================= */

@media (max-width: 1200px) {
  .mq-plans__options { grid-template-columns: minmax(0, 1fr); }
  .mq-plan {
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-rows: auto;
  }
  .mq-plan__icon { grid-row: auto; width: 48px; height: 48px; }
  .mq-plan__icon svg { width: 28px; height: 28px; }
  .mq-plan__name,
  .mq-plan__radio { align-self: center; }
}

/* Tablet & below: single column — intro, form, benefits, call box */
@media (max-width: 1023px) {
  .mq { scroll-margin-top: 110px; }
  .mq__layout {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "intro"
      "card"
      "benefits"
      "call";
    grid-template-rows: auto;
    max-width: 720px;
    margin: 0 auto;
  }
  .mq__intro { text-align: center; }
  .mq .mq__lead { margin: 0 auto; }
  .mq__benefits { grid-template-columns: repeat(2, minmax(0, 1fr)); height: auto; }
  .mq-plans__options { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .mq-plan {
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-rows: auto auto;
  }
  .mq-plan__icon { grid-row: 1 / span 2; }
  .mq-plan__name { align-self: end; }
  .mq-plan__radio { align-self: start; }
  .mq .mq-trust {
    grid-template-columns: minmax(0, 1fr);
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
    gap: 6px;
  }
  .mq-trust li { justify-content: flex-start; padding: 12px 8px; }
  .mq-trust li + li { border-left: 0; border-top: 1px solid rgba(255, 255, 255, 0.18); }
}

/* Mobile */
@media (max-width: 640px) {
  .mq__benefits { grid-template-columns: minmax(0, 1fr); }
  .mq-benefit__icon { width: 56px; height: 56px; }
  .mq-benefit__icon svg { width: 26px; height: 26px; }
  .mq-form__grid { grid-template-columns: minmax(0, 1fr); }
  .mq-field,
  .mq-field--address,
  .mq-field--city { grid-column: 1 / -1; }
  .mq-plans__options { grid-template-columns: minmax(0, 1fr); }
  .mq-plan {
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-rows: auto;
  }
  .mq-plan__icon { grid-row: auto; width: 48px; height: 48px; }
  .mq-plan__icon svg { width: 28px; height: 28px; }
  .mq-plan__name,
  .mq-plan__radio { align-self: center; }
  .mq__card-head { gap: 14px; }
  .mq__card-icon { width: 56px; height: 56px; }
  .mq__card-icon svg { width: 28px; height: 28px; }
  .mq__call { flex-direction: column; text-align: center; padding: 24px 18px; }
  .mq__call-icon { width: 64px; height: 64px; }
  .mq__call-icon svg { width: 30px; height: 30px; }
  .mq-submit { font-size: 1.1rem; min-height: 58px; }
}

@media (max-width: 380px) {
  .mq__card { padding: 18px 14px; }
  .mq__card-head { flex-direction: column; text-align: center; }
  .mq-turnstile { overflow-x: auto; } /* widget is a fixed 300px */
}

@media (prefers-reduced-motion: reduce) {
  .mq *,
  .mq *::before,
  .mq *::after { transition: none !important; }
}
