/* Talk-to-sales page design layer.
 *
 * The presentation layer for Components/Pages/TalkToSalesPage.razor. Global CSS,
 * linked from App.razor, so the same three rules pages/book-demo.css sets out
 * apply here:
 *
 * 1. Nothing confines these rules to this page, so every selector is qts-
 *    prefixed or a descendant of one.
 * 2. @keyframes names are global too — hence qts- on them, so they cannot
 *    collide with the compiled Tailwind bundle, Home's qh- animations, the
 *    demo page's qbd- ones or the trial page's qft- ones.
 * 3. These rules are unlayered and Tailwind v4's utilities live inside @layer,
 *    so they win regardless of specificity. Every selector stays class-based and
 *    prefixed — a bare element selector at the top level here would leak.
 *
 * WHY HAND-WRITTEN CSS AND NOT UTILITIES. The Tailwind bundle in wwwroot is a
 * Next.js build artefact containing only the utilities that build emitted, so a
 * class this page invents does not exist at runtime and an arbitrary value like
 * grid-cols-[1fr_372px] renders as nothing. The previous version of this page
 * carried a comment about exactly that trap and worked around it with
 * grid-cols-3 + col-span-2; owning the CSS removes the constraint.
 *
 * SIBLING, NOT CLONE. /book-qhrm-demo is the other half of this pair and the two
 * are deliberately built from the same parts — same violet field, same overlap,
 * same card language — but the texture differs: a diagonal hairline weave here
 * against the demo page's square mesh, and the aside leads with a checklist
 * rather than a numbered rail, because this page asks the visitor to recognise
 * their own question rather than to follow a sequence.
 *
 * WHAT THIS FILE DOES NOT STYLE. <SignupFlow /> renders on six other routes, so
 * every rule that reaches into it is a descendant of .qts-form and touches
 * nothing on those routes.
 *
 * Colour. The site ramp only: #4f46e5 → #7c3aed → #a22dea over the dark violet
 * field #221049 → #140f33. Emerald (#10b981) is the one hue from outside it and
 * carries a single meaning — "sales can answer this" — which is why it appears
 * on the question checklist and nowhere else.
 */

.qts-page {
    position: relative;
    background: #fff;
}

/* ── hero ───────────────────────────────────────────────────────────── */
/* The tall lower padding is structural, not decorative: .qts-main pulls itself
   up into it so the form card overlaps the dark field. */
.qts-hero {
    position: relative;
    overflow: hidden;
    padding: 66px 0 158px;
    background:
        radial-gradient(ellipse 88% 60% at 18% 0%, #3a1c7d 0%, transparent 58%),
        linear-gradient(162deg, #221049 0%, #1a1240 48%, #140f33 100%);
}

.qts-glow,
.qts-weave {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.qts-glow i {
    position: absolute;
    display: block;
    border-radius: 50%;
    filter: blur(108px);
    opacity: .8;
    animation: qts-drift 34s ease-in-out infinite;
}

.qts-glow i:nth-child(1) {
    width: 640px;
    height: 640px;
    top: -300px;
    left: -180px;
    background: radial-gradient(circle, rgba(124, 58, 237, .55), transparent 62%);
}

.qts-glow i:nth-child(2) {
    width: 600px;
    height: 600px;
    bottom: -330px;
    right: -150px;
    animation-delay: -13s;
    background: radial-gradient(circle, rgba(162, 45, 234, .46), transparent 62%);
}

.qts-glow i:nth-child(3) {
    width: 420px;
    height: 420px;
    top: 26%;
    right: 30%;
    animation-delay: -23s;
    background: radial-gradient(circle, rgba(79, 70, 229, .38), transparent 64%);
}

@keyframes qts-drift {
    0%, 100% { transform: translate(0, 0) scale(1); }
    36%      { transform: translate(-38px, 30px) scale(1.06); }
    68%      { transform: translate(34px, -28px) scale(.95); }
}

/* A diagonal weave rather than the demo page's square mesh — same family,
   different texture, so the two conversion pages read as siblings. */
.qts-weave {
    opacity: .5;
    background-image:
        repeating-linear-gradient(48deg, rgba(255, 255, 255, .07) 0 1px, transparent 1px 46px),
        repeating-linear-gradient(-48deg, rgba(255, 255, 255, .05) 0 1px, transparent 1px 46px);
    -webkit-mask-image: radial-gradient(ellipse 78% 70% at 76% 16%, #000, transparent 76%);
    mask-image: radial-gradient(ellipse 78% 70% at 76% 16%, #000, transparent 76%);
}

.qts-hero__in {
    position: relative;
    z-index: 5;
}

.qts-hero__title {
    font-size: clamp(31px, 4vw, 53px);
    line-height: 1.06;
    letter-spacing: -.035em;
    font-weight: 800;
    color: #fff;
    margin: 0 0 22px;
    max-width: 700px;
}

.qts-hero__lede {
    font-size: clamp(15.5px, 1.2vw, 18px);
    line-height: 1.72;
    color: rgba(255, 255, 255, .8);
    margin: 0 0 30px;
    max-width: 660px;
}

.qts-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

/* The leading mark is a pseudo-element, not an icon: these three chips state
   three unrelated facts, so any glyph specific enough to be meaningful would be
   wrong on two of them. */
.qts-chip {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 9px 18px;
    border-radius: 999px;
    font-size: 13.5px;
    font-weight: 650;
    color: #fff;
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(255, 255, 255, .18);
    backdrop-filter: blur(6px);
}

.qts-chip::before {
    content: "";
    width: 7px;
    height: 7px;
    flex: 0 0 auto;
    border-radius: 99px;
    background: linear-gradient(135deg, #c4b5fd, #a22dea);
    box-shadow: 0 0 0 4px rgba(162, 45, 234, .22);
}

/* ── layout ─────────────────────────────────────────────────────────── */
/* Rides up over the hero's lower edge so the form reads as the point of the
   page rather than as the section after it. Deliberately no background of its
   own — a fade-to-white gradient here would be keyed to this element's height,
   which is the signup form's height, and would smear violet down the white
   page. */
.qts-main {
    position: relative;
    z-index: 6;
    margin-top: -100px;
    padding-bottom: 92px;
}

.qts-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 372px;
    gap: 32px;
    align-items: start;
}

/* ── form card ──────────────────────────────────────────────────────── */
/* A gradient hairline rather than a border: the card's top half sits on the
   dark violet field, where a flat 1px slate line disappears. */
.qts-formcard {
    position: relative;
    padding: 1.5px;
    border-radius: 28px;
    background: linear-gradient(155deg, rgba(255, 255, 255, .62), rgba(124, 58, 237, .5) 48%, rgba(79, 70, 229, .42));
    box-shadow: 0 54px 108px -48px rgba(0, 0, 0, .8), 0 12px 32px -20px rgba(15, 23, 42, .45);
}

.qts-formcard__in {
    position: relative;
    overflow: hidden;
    padding: 34px 34px 30px;
    border-radius: 26.5px;
    background: linear-gradient(172deg, #fff 0%, #fdfcff 58%, #f9f6ff 100%);
}

.qts-formcard__in::before {
    content: "";
    position: absolute;
    width: 340px;
    height: 340px;
    top: -230px;
    right: -120px;
    border-radius: 50%;
    pointer-events: none;
    background: radial-gradient(circle, rgba(124, 58, 237, .15), transparent 66%);
}

/* Lifts the flow above ::before — a positioned pseudo-element paints over
   non-positioned content in the same stacking context, so without this the
   corner glow tints the first two fields. */
.qts-form {
    position: relative;
    z-index: 1;
}

/* ── the form itself ────────────────────────────────────────────────── */
/* <SignupFlow /> renders on seven routes and owns its own markup, so every rule
   below is a descendant of .qts-form and reaches nothing on the other six.
 *
 * Two consequences of styling another component's DOM from outside, both
 * deliberate:
 *
 * 1. Selectors lean on structure (label > span:first-child) and on stable
 *    semantics (role="alert", type="checkbox", maxlength) rather than on the
 *    flow's utility class strings, which are an implementation detail. The two
 *    exceptions are commented where they occur.
 * 2. These rules are unlayered and Tailwind's utilities are layered, so they win
 *    without !important — which also means a utility the flow relies on can be
 *    overridden by accident. The dial-code input is reset back explicitly below
 *    for exactly that reason.
 *
 * Two of the classes the flow asks for have no rule in the prebuilt bundle at
 * all — tracking-[0.5em] on the verification code and bg-indigo-50/70 on the
 * explainer — so the spaced code digits and the tinted explainer panel below are
 * restoring intent, not overriding it. */

/* Fields. One shape for every control: the grid mixes inputs, a select and a
   textarea, and they have to read as one column. */
.qts-form input:not([type="checkbox"]),
.qts-form select,
.qts-form textarea {
    width: 100%;
    padding: 12px 15px;
    border-radius: 13px;
    border: 1px solid #e6e3f5;
    background: #fbfaff;
    color: #0b1020;
    font-size: 14.5px;
    line-height: 1.5;
    box-shadow: inset 0 1px 2px rgba(15, 23, 42, .04);
    transition: border-color .18s, box-shadow .18s, background .18s;
}

/* Taller than the demo page's: the message is required here, so it is a field
   the visitor is meant to write in rather than an optional afterthought. */
.qts-form textarea { min-height: 138px; resize: vertical; }

.qts-form input::placeholder,
.qts-form textarea::placeholder { color: #a3a0bb; }

.qts-form input:not([type="checkbox"]):hover,
.qts-form select:hover,
.qts-form textarea:hover { border-color: #d6d0f0; }

/* Beats the flow's focus:ring-2 utility on specificity, so the ring is this
   page's violet rather than the stock indigo. */
.qts-form input:not([type="checkbox"]):focus,
.qts-form select:focus,
.qts-form textarea:focus {
    outline: none;
    background: #fff;
    border-color: #7c3aed;
    box-shadow: 0 0 0 4px rgba(124, 58, 237, .14), 0 1px 2px rgba(15, 23, 42, .05);
}

/* Blazor stamps .invalid on a field that failed validation — the border says so
   before the message underneath is read. */
.qts-form input.invalid:not([type="checkbox"]),
.qts-form select.invalid,
.qts-form textarea.invalid {
    border-color: #fda4af;
    background: #fff7f8;
}

.qts-form input.invalid:focus,
.qts-form select.invalid:focus,
.qts-form textarea.invalid:focus {
    border-color: #f43f5e;
    box-shadow: 0 0 0 4px rgba(244, 63, 94, .14);
}

/* Field labels. Qualified on .block, which is what separates a field label from
   the consent row's — that one is a flex label owned by <ConsentCheck /> and
   must keep its own layout. */
.qts-form label.block > span:first-child {
    display: block;
    margin-bottom: 7px;
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: .005em;
    color: #334155;
}

/* The helper line under a field, and the flow's closing reassurance note. */
.qts-form label.block > span:last-child:not(:first-child),
.qts-form form > p {
    display: block;
    margin-top: 7px;
    font-size: 12px;
    line-height: 1.6;
    color: #7c7a93;
}

.qts-form .validation-message {
    display: block;
    margin-top: 7px;
    font-size: 12px;
    font-weight: 600;
    color: #e11d48;
}

/* Dial code + number. The wrapper is the only span sitting where a field would
   be, so the pair is addressed by position rather than by its utility classes. */
.qts-form label.block > span:nth-child(2) {
    display: flex;
    align-items: stretch;
    gap: 9px;
}

.qts-form label.block > span:nth-child(2) > span:first-child {
    display: flex;
    align-items: center;
    gap: 2px;
    flex: 0 0 auto;
    width: 96px;
    padding: 0 6px 0 13px;
    border-radius: 13px;
    border: 1px solid #e6e3f5;
    background: #f4f1fd;
    color: #6b7280;
    font-size: 14.5px;
}

/* Puts the general field rule back: this input is chrome inside the box above,
   not a box of its own. */
.qts-form label.block > span:nth-child(2) > span:first-child input {
    width: 100%;
    padding: 11px 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    font-weight: 700;
    color: #0b1020;
}

.qts-form label.block > span:nth-child(2) > span:first-child input:focus {
    background: transparent;
    box-shadow: none;
}

/* Verification code. maxlength="6" is what distinguishes it from the dial code,
   the page's only other numeric input. */
.qts-form input[maxlength="6"] {
    padding: 15px 12px;
    font-size: 26px;
    font-weight: 800;
    text-align: center;
    letter-spacing: .42em;
    text-indent: .42em;
    color: #1e1b4b;
    background: #fff;
}

/* The explainer panel — what submitting actually does. Its bg-indigo-50/70 has
   no rule in the bundle, so this is the only fill it has ever had. */
.qts-form form > div[class*="bg-indigo-50"] {
    position: relative;
    padding: 16px 18px 16px 20px;
    border-radius: 15px;
    border: 1px solid #e4e0fb;
    border-left: 0;
    background: linear-gradient(135deg, #f8f6ff, #f4f1fe);
    font-size: 13px;
    line-height: 1.7;
    color: #4a4763;
}

.qts-form form > div[class*="bg-indigo-50"]::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    border-radius: 15px 0 0 15px;
    background: linear-gradient(180deg, #7c3aed, #4f46e5);
}

/* Consent. Boxed so the one thing being agreed to is not a loose line of small
   print between the explainer and the submit button. */
.qts-form form > div.pt-1 {
    padding: 14px 16px;
    border-radius: 15px;
    border: 1px solid #eceaf7;
    background: #fcfcfe;
}

.qts-form input[type="checkbox"] {
    width: 17px;
    height: 17px;
    accent-color: #7c3aed;
    cursor: pointer;
}

/* Status panels — alert, status and the success screens. Keyed on the ARIA
   roles the flow already sets, so nothing here depends on its colour classes. */
.qts-form div[role="alert"],
.qts-form div[role="status"] {
    border-radius: 15px;
    font-size: 13.5px;
    line-height: 1.6;
}

/* Step headings on verify / set-password / done. */
.qts-form h2 { letter-spacing: -.02em; }

/* Buttons. The flow's .startFreeTrial gradient and .bookADemo fill are left
   alone — only geometry, shadow and the pressed states change, so a column of
   full-width fields does not end in a shrink-to-fit control. Anchored on button
   so the Done step's <a> — which sits inside a narrow success panel — is left
   as it is. */
.qts-form button.startFreeTrial,
.qts-form button.bookADemo {
    width: 100%;
    padding: 14px 24px;
    border-radius: 14px;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: -.01em;
}

.qts-form button.startFreeTrial {
    box-shadow: 0 16px 34px -14px rgba(79, 70, 229, .75), 0 2px 6px -2px rgba(79, 70, 229, .3);
}

.qts-form button.startFreeTrial:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 22px 42px -14px rgba(79, 70, 229, .85), 0 3px 8px -2px rgba(79, 70, 229, .35);
}

.qts-form button.startFreeTrial:active:not(:disabled) { transform: translateY(0); }

.qts-form button.startFreeTrial:disabled,
.qts-form button.bookADemo:disabled {
    opacity: .55;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.qts-form button.bookADemo:hover:not(:disabled) { border-color: #cfc6f0; }

/* The two text-only escape hatches under the code field. */
.qts-form button.underline {
    font-size: 12.5px;
    color: #6d6a86;
    text-underline-offset: 3px;
}

.qts-form button.underline:hover { color: #4f46e5; }

/* ── progress rail ──────────────────────────────────────────────────── */
/* The flow's step list is its only direct-child <ol>; the success screen's
   next-steps list is a <ul> inside a panel, so it is not touched. Boxed and
   pulled to the card's edges so the rail reads as a header for the form rather
   than as its first row of content. */
.qts-form > ol {
    gap: 10px 14px;
    margin: -6px -6px 26px;
    padding: 13px 16px;
    border-radius: 15px;
    background: linear-gradient(135deg, #faf9ff, #f5f2fe);
    border: 1px solid #efecfb;
}

.qts-form > ol li > span:first-child {
    width: 25px;
    height: 25px;
    border-radius: 9px;
    font-size: 11.5px;
    font-weight: 800;
}

/* The one place a utility class is selected on. The flow marks the live step
   with bg-indigo-600 and nothing else distinguishes it structurally, so the
   halo has to key on that. */
.qts-form > ol li > span.bg-indigo-600 {
    box-shadow: 0 0 0 4px rgba(79, 70, 229, .14);
}

.qts-form > ol li > span:nth-child(2) { font-size: 12.5px; }

/* The em dash between steps, redrawn as a rule. font-size:0 hides the glyph;
   the box then carries the line. */
.qts-form > ol li > span:nth-child(3) {
    width: 20px;
    height: 2px;
    margin-left: 4px;
    border-radius: 99px;
    font-size: 0;
    background: #e2ddf6;
}

/* ── aside ──────────────────────────────────────────────────────────── */
.qts-aside {
    position: sticky;
    top: 96px;
    display: grid;
    gap: 20px;
    min-width: 0;
}

.qts-card {
    position: relative;
    overflow: hidden;
    padding: 26px 26px 28px;
    border-radius: 24px;
    background: #fff;
    border: 1px solid #ebeaf5;
    box-shadow: 0 30px 66px -44px rgba(79, 70, 229, .55);
}

.qts-card::after {
    content: "";
    position: absolute;
    width: 280px;
    height: 280px;
    top: -200px;
    right: -110px;
    border-radius: 50%;
    pointer-events: none;
    background: radial-gradient(circle, rgba(162, 45, 234, .12), transparent 66%);
}

.qts-card__head {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 22px;
}

.qts-card__ic {
    width: 38px;
    height: 38px;
    flex: 0 0 auto;
    border-radius: 12px;
    display: grid;
    place-items: center;
    color: #fff;
    background: linear-gradient(135deg, #059669, #10b981);
    box-shadow: 0 14px 28px -14px rgba(5, 150, 105, .95);
}

/* The routes card is not part of the emerald "sales answers this" thread, so it
   stays on the site ramp. */
.qts-card__ic--violet {
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    box-shadow: 0 14px 28px -14px rgba(79, 70, 229, .95);
}

.qts-card__ic svg { width: 19px; height: 19px; }

.qts-card__title {
    font-size: 17px;
    line-height: 1.3;
    font-weight: 800;
    letter-spacing: -.02em;
    color: #0b1020;
    margin: 0;
}

/* ── question checklist ─────────────────────────────────────────────── */
.qts-checks {
    position: relative;
    display: grid;
    gap: 13px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.qts-checks li {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    font-size: 13.5px;
    line-height: 1.6;
    color: #475569;
}

.qts-checks li span:first-child {
    width: 21px;
    height: 21px;
    flex: 0 0 auto;
    margin-top: 1px;
    border-radius: 99px;
    display: grid;
    place-items: center;
    color: #059669;
    background: #ecfdf5;
    border: 1px solid #bbf7e0;
}

.qts-checks li svg { width: 12px; height: 12px; }

/* ── alternative routes ─────────────────────────────────────────────── */
/* Each route is a target in its own right, so the whole row lights up rather
   than only the link text — the description is part of what is being chosen. */
.qts-routes {
    position: relative;
    display: grid;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.qts-route {
    position: relative;
    padding: 13px 15px;
    border-radius: 15px;
    border: 1px solid #efeef8;
    background: #fcfcfe;
    transition: border-color .18s, background .18s, transform .18s, box-shadow .18s;
}

.qts-route:hover {
    transform: translateY(-1px);
    border-color: #ddd6fe;
    background: #fbf9ff;
    box-shadow: 0 12px 26px -18px rgba(79, 70, 229, .8);
}

.qts-route__link {
    display: block;
    font-size: 13.5px;
    font-weight: 700;
    letter-spacing: -.01em;
    color: #4f46e5;
    text-decoration: none;
    transition: color .18s;
}

/* Stretches the anchor over the whole row, so the padded card is the hit area
   without nesting anything else inside a link. */
.qts-route__link::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 15px;
}

.qts-route:hover .qts-route__link { color: #6d28d9; }

.qts-route__d {
    display: block;
    margin-top: 3px;
    font-size: 12px;
    line-height: 1.6;
    color: #7c7a93;
}

/* ── responsive ─────────────────────────────────────────────────────── */
@media (max-width: 1180px) {
    .qts-layout { grid-template-columns: minmax(0, 1fr) 330px; gap: 26px; }
}

@media (max-width: 1024px) {
    /* The aside drops below the form, so it stops being sticky — a panel that
       tracks the viewport once it is full-width covers the content behind it.
       Its two cards go side by side rather than stacking into a long tail. */
    .qts-layout { grid-template-columns: minmax(0, 1fr); gap: 28px; }

    .qts-aside {
        position: static;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        align-items: start;
    }
}

@media (max-width: 760px) {
    .qts-hero { padding: 44px 0 132px; }
    .qts-hero__title { max-width: none; }
    .qts-chips { gap: 8px; }
    .qts-chip { font-size: 12.5px; padding: 8px 15px; }

    .qts-main { margin-top: -88px; padding-bottom: 60px; }
    .qts-formcard__in { padding: 24px 20px 22px; }

    /* The rail wraps to two rows on a phone, so the negative side margins that
       bleed it to the card edge on desktop would crowd it. */
    .qts-form > ol { margin: 0 0 22px; padding: 12px 13px; gap: 9px 11px; }
    .qts-form > ol li > span:nth-child(3) { width: 12px; margin-left: 2px; }

    .qts-form label.block > span:nth-child(2) > span:first-child { width: 88px; }
    .qts-form input[maxlength="6"] { font-size: 22px; letter-spacing: .3em; text-indent: .3em; }

    .qts-aside { grid-template-columns: minmax(0, 1fr); }
    .qts-card { padding: 22px 20px 24px; }
}

@media (prefers-reduced-motion: reduce) {
    .qts-glow i { animation: none !important; }
    .qts-route:hover { transform: none; }
}
