/* ==========================================================================
   Cluster lead form  (.stf-*)  —  used by the ServiceTitan cluster
   ==========================================================================
   Ports the interaction model from the /free-audit form (pill-style choices
   instead of dropdowns, inline per-field errors, honeypot, submit spinner)
   into the cluster theme.

   Written standalone rather than by loading free-audit.css, because that
   file's custom properties live on .fa-body and its page-level rules (body
   background, sticky bar, section padding) would fight the cluster layout.
   Palette is the same brand teal, so the two read as one system.
   ========================================================================== */

.qb-int-page .stf {
    --stf-teal:   #009282;
    --stf-teal-b: #0EAFA0;
    --stf-teal-d: #007a6d;
    --stf-ink:    #00293a;
    --stf-text:   #294049;
    --stf-muted:  #5a747c;
    --stf-line:   #e2ecee;
    --stf-err:    #c0392b;

    padding: 72px 0 84px;
    background: linear-gradient(180deg, #f6fafa 0%, #eef6f5 100%);
}

.qb-int-page .stf-wrap {
    max-width: 780px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ---- trust strip above the card ---- */
.qb-int-page .stf-trust {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px 26px;
    margin: 0 0 22px;
}
.qb-int-page .stf-trust-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13.5px;
    font-weight: 700;
    color: var(--stf-ink);
}
.qb-int-page .stf-trust-item svg {
    width: 17px;
    height: 17px;
    flex: 0 0 auto;
    stroke: var(--stf-teal);
}

/* ---- the card ---- */
.qb-int-page .stf-card {
    background: #ffffff;
    border: 1px solid var(--stf-line);
    border-radius: 26px;
    box-shadow: 0 22px 50px -24px rgba(0, 41, 58, 0.34);
    padding: 34px 30px 32px;
}
.qb-int-page .stf-eyebrow {
    display: inline-block;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 1.6px;
    text-transform: uppercase;
    color: var(--stf-teal-d);
    background: #e7f6f1;
    padding: 5px 12px;
    border-radius: 999px;
    margin-bottom: 12px;
}
.qb-int-page .stf-card h2 {
    font-family: Lexend, Manrope, system-ui, sans-serif;
    font-size: clamp(23px, 4vw, 30px);
    font-weight: 900;
    letter-spacing: -0.02em;
    line-height: 1.18;
    color: var(--stf-ink);
    margin: 0 0 10px;
}
.qb-int-page .stf-lead {
    color: var(--stf-muted);
    font-size: 15px;
    line-height: 1.6;
    margin: 0 0 24px;
}

/* ---- field groups ----
   Related fields sit together in a lightly tinted panel, so the form reads as a
   few short steps instead of one long column. The panel is tinted and the
   controls inside it go WHITE: without that inversion the inputs (normally
   #f8fbfb) would sink into the panel and the grouping would not register. */
.qb-int-page .stf-group {
    background: #f2f8f8;
    border: 1px solid #e4eeee;
    border-radius: 16px;
    padding: 20px 18px;
    margin-bottom: 14px;
}
.qb-int-page .stf-group > .stf-field:last-child { margin-bottom: 0; }
.qb-int-page .stf-group .stf-input,
.qb-int-page .stf-group .stf-textarea,
.qb-int-page .stf-group .stf-pill-txt { background: #ffffff; }
.qb-int-page .stf-group .stf-pill:hover .stf-pill-txt { background: #ffffff; border-color: #8FD9BF; }
/* checked pills keep their teal fill, which the rule above must not undo */
.qb-int-page .stf-group .stf-pill input:checked + .stf-pill-txt {
    background: linear-gradient(150deg, var(--stf-teal), var(--stf-teal-d));
}

/* ---- fields ---- */
.qb-int-page .stf-field { margin-bottom: 20px; }
.qb-int-page .stf-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
.qb-int-page .stf-label {
    display: block;
    font-weight: 800;
    font-size: 14.5px;
    color: var(--stf-ink);
    margin-bottom: 9px;
}
.qb-int-page .stf-req { color: var(--stf-teal); }
.qb-int-page .stf-input,
.qb-int-page .stf-textarea {
    width: 100%;
    box-sizing: border-box;
    font-family: inherit;
    font-size: 15.5px;
    color: var(--stf-text);
    background: #f8fbfb;
    border: 1.5px solid #dbe7e8;
    border-radius: 12px;
    padding: 14px 16px;
    transition: border-color 0.14s ease, box-shadow 0.14s ease, background 0.14s ease;
}
.qb-int-page .stf-textarea { min-height: 104px; resize: vertical; }
.qb-int-page .stf-input::placeholder,
.qb-int-page .stf-textarea::placeholder { color: #9fb2b8; }
.qb-int-page .stf-input:focus,
.qb-int-page .stf-textarea:focus {
    outline: none;
    background: #ffffff;
    border-color: var(--stf-teal);
    box-shadow: 0 0 0 4px rgba(0, 146, 130, 0.15);
}

/* ---- pill choices (radio), the free-audit interaction ---- */
.qb-int-page .stf-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.qb-int-page .stf-pills--stack { flex-direction: column; }
.qb-int-page .stf-pill {
    position: relative;
    margin: 0;
    cursor: pointer;
}
.qb-int-page .stf-pill input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
    margin: 0;
}
.qb-int-page .stf-pill-txt {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14.5px;
    font-weight: 700;
    color: var(--stf-text);
    background: #f8fbfb;
    border: 1.5px solid #dbe7e8;
    border-radius: 12px;
    padding: 12px 16px;
    transition: all 0.14s ease;
}
.qb-int-page .stf-pill-txt::before {
    content: "";
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid #c4d4d4;
    transition: all 0.12s ease;
}
.qb-int-page .stf-pill:hover .stf-pill-txt {
    border-color: #8FD9BF;
    background: #ffffff;
}
.qb-int-page .stf-pill input:focus-visible + .stf-pill-txt {
    box-shadow: 0 0 0 4px rgba(0, 146, 130, 0.18);
}
.qb-int-page .stf-pill input:checked + .stf-pill-txt {
    color: #ffffff;
    background: linear-gradient(150deg, var(--stf-teal), var(--stf-teal-d));
    border-color: var(--stf-teal-d);
    box-shadow: 0 8px 20px -10px rgba(0, 146, 130, 0.7);
}
.qb-int-page .stf-pill input:checked + .stf-pill-txt::before {
    border-color: #ffffff;
    background: #ffffff;
    box-shadow: inset 0 0 0 3px var(--stf-teal);
}
/* Checkbox variant: square box + tick, so a multi-select reads as a multi-select
   rather than looking like a radio group that is behaving oddly. */
.qb-int-page .stf-pill--check .stf-pill-txt::before {
    border-radius: 6px;
}
.qb-int-page .stf-pill--check input:checked + .stf-pill-txt::before {
    border-color: #ffffff;
    background: #ffffff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23009282' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center/12px no-repeat;
    box-shadow: none;
}

/* trade pills sit 3-up so the row does not get ragged */
.qb-int-page .stf-pill--half { flex: 1 1 30%; }
.qb-int-page .stf-pill--full { width: 100%; }
.qb-int-page .stf-pill--full .stf-pill-txt { width: 100%; box-sizing: border-box; }

/* ---- inline errors ---- */
.qb-int-page .stf-error {
    display: none;
    color: var(--stf-err);
    font-size: 13.5px;
    font-weight: 600;
    margin-top: 8px;
}
.qb-int-page .stf-field.stf-has-error .stf-error { display: block; }
.qb-int-page .stf-field.stf-has-error .stf-input,
.qb-int-page .stf-field.stf-has-error .stf-textarea,
.qb-int-page .stf-field.stf-has-error .stf-pill-txt { border-color: #e0a4a0; }

/* ---- submit ---- */
.qb-int-page .stf-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    min-height: 56px;
    font-family: inherit;
    font-size: 16.5px;
    font-weight: 800;
    color: #ffffff;
    background: linear-gradient(150deg, var(--stf-teal-b), var(--stf-teal-d));
    border: none;
    border-radius: 999px;
    cursor: pointer;
    box-shadow: 0 18px 34px -14px rgba(0, 146, 130, 0.7);
    transition: transform 0.16s ease, box-shadow 0.16s ease, filter 0.16s ease;
}
.qb-int-page .stf-submit:hover {
    transform: translateY(-2px);
    filter: brightness(1.05);
    box-shadow: 0 22px 40px -12px rgba(0, 146, 130, 0.75);
}
.qb-int-page .stf-submit:active { transform: translateY(0); }
.qb-int-page .stf-submit[disabled] { opacity: 0.75; cursor: default; transform: none; }
.qb-int-page .stf-submit svg { width: 20px; height: 20px; }
.qb-int-page .stf-submit.is-sending svg { display: none; }

.qb-int-page .stf-note {
    text-align: center;
    font-size: 13px;
    color: var(--stf-muted);
    margin: 14px 0 0;
}
.qb-int-page .stf-ok {
    background: #ecfdf5;
    border: 1px solid #16a34a;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 22px;
    text-align: center;
    color: #15803d;
    font-weight: 700;
}

@media (max-width: 640px) {
    .qb-int-page .stf { padding: 52px 0 60px; }
    .qb-int-page .stf-card { padding: 26px 18px 26px; border-radius: 20px; }
    .qb-int-page .stf-row { grid-template-columns: 1fr; gap: 0; }
    .qb-int-page .stf-pill--half { flex: 1 1 100%; }
}

@media (prefers-reduced-motion: reduce) {
    .qb-int-page .stf-submit,
    .qb-int-page .stf-pill-txt,
    .qb-int-page .stf-input,
    .qb-int-page .stf-textarea { transition: none; }
}
