/* Book-a-demo page design layer.
 *
 * The presentation layer for Components/Pages/BookDemoPage.razor. Global CSS,
 * linked from App.razor, so the same three rules pages/free-trial.css sets out
 * apply here:
 *
 * 1. Nothing confines these rules to this page, so every selector is qbd-
 *    prefixed or a descendant of one.
 * 2. @keyframes names are global too — hence qbd- on them, so they cannot
 *    collide with the compiled Tailwind bundle, Home's qh- animations, the
 *    trial page's qft- ones or the partner page's pp- 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 the way
 *    the deleted css/site.css did.
 *
 * 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_380px] renders as nothing — the trap the previous version of
 * this page carried a comment about (it worked around it with grid-cols-3 +
 * col-span-2). Owning the CSS removes the constraint entirely.
 *
 * WHAT THIS FILE DOES NOT STYLE. <SignupFlow /> renders on six other routes, so
 * its fields, progress rail and status panels keep their own Tailwind classes
 * and are not touched from here. Card chrome lives on .qbd-formcard — the
 * wrapper written in this file — exactly as .qft-formcard does on the trial
 * page. The single exception is button width under .qbd-form, which follows the
 * precedent .qc-panel__form already sets in pages/help-center.css.
 *
 * 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 on this page — "the demo covers this" — which is why
 * it appears on the coverage list and nowhere else.
 */

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

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

.qbd-glow,
.qbd-mesh {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.qbd-glow i {
    position: absolute;
    display: block;
    border-radius: 50%;
    filter: blur(104px);
    opacity: .82;
    animation: qbd-float 30s ease-in-out infinite;
}

.qbd-glow i:nth-child(1) {
    width: 660px;
    height: 660px;
    top: -320px;
    right: -160px;
    background: radial-gradient(circle, rgba(162, 45, 234, .52), transparent 62%);
}

.qbd-glow i:nth-child(2) {
    width: 580px;
    height: 580px;
    bottom: -320px;
    left: -140px;
    animation-delay: -11s;
    background: radial-gradient(circle, rgba(79, 70, 229, .5), transparent 62%);
}

.qbd-glow i:nth-child(3) {
    width: 400px;
    height: 400px;
    top: 34%;
    left: 40%;
    animation-delay: -20s;
    background: radial-gradient(circle, rgba(124, 58, 237, .34), transparent 64%);
}

@keyframes qbd-float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    34%      { transform: translate(42px, 34px) scale(1.07); }
    67%      { transform: translate(-36px, -26px) scale(.94); }
}

/* A ruled mesh rather than the trial page's dot field — same family, different
   texture, so the two conversion pages are siblings and not duplicates. */
.qbd-mesh {
    opacity: .55;
    background-image:
        linear-gradient(rgba(255, 255, 255, .07) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .07) 1px, transparent 1px);
    background-size: 62px 62px;
    -webkit-mask-image: radial-gradient(ellipse 74% 66% at 22% 12%, #000, transparent 74%);
    mask-image: radial-gradient(ellipse 74% 66% at 22% 12%, #000, transparent 74%);
}

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

.qbd-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;
}

.qbd-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: 620px;
}

.qbd-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. */
.qbd-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);
}

.qbd-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 hundreds of pixels
   down the white page. */
.qbd-main {
    position: relative;
    z-index: 6;
    margin-top: -100px;
    padding-bottom: 92px;
}

.qbd-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. */
.qbd-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);
}

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

.qbd-formcard__in::before {
    content: "";
    position: absolute;
    width: 340px;
    height: 340px;
    top: -230px;
    left: -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. */
.qbd-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 .qbd-form and reaches nothing on the other six. That
   containment is the whole design of this block — /free-qhrm-trial and the rest
   keep the flow's stock Tailwind appearance untouched.
 *
 * 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. */
.qbd-form input:not([type="checkbox"]),
.qbd-form select,
.qbd-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;
}

.qbd-form textarea { min-height: 118px; resize: vertical; }

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

.qbd-form input:not([type="checkbox"]):hover,
.qbd-form select:hover,
.qbd-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. */
.qbd-form input:not([type="checkbox"]):focus,
.qbd-form select:focus,
.qbd-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. */
.qbd-form input.invalid:not([type="checkbox"]),
.qbd-form select.invalid,
.qbd-form textarea.invalid {
    border-color: #fda4af;
    background: #fff7f8;
}

.qbd-form input.invalid:focus,
.qbd-form select.invalid:focus,
.qbd-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. Both SignupFlow and the LeadForm fallback mark every
   field label with it. */
.qbd-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. */
.qbd-form label.block > span:last-child:not(:first-child),
.qbd-form form > p {
    display: block;
    margin-top: 7px;
    font-size: 12px;
    line-height: 1.6;
    color: #7c7a93;
}

.qbd-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. */
.qbd-form label.block > span:nth-child(2) {
    display: flex;
    align-items: stretch;
    gap: 9px;
}

.qbd-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. */
.qbd-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;
}

.qbd-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. */
.qbd-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. */
.qbd-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;
}

.qbd-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. */
.qbd-form form > div.pt-1 {
    padding: 14px 16px;
    border-radius: 15px;
    border: 1px solid #eceaf7;
    background: #fcfcfe;
}

.qbd-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. */
.qbd-form div[role="alert"],
.qbd-form div[role="status"] {
    border-radius: 15px;
    font-size: 13.5px;
    line-height: 1.6;
}

/* Step headings on verify / set-password / done. */
.qbd-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. */
.qbd-form button.startFreeTrial,
.qbd-form button.bookADemo {
    width: 100%;
    padding: 14px 24px;
    border-radius: 14px;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: -.01em;
}

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

.qbd-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);
}

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

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

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

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

.qbd-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. */
.qbd-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;
}

.qbd-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. */
.qbd-form > ol li > span.bg-indigo-600 {
    box-shadow: 0 0 0 4px rgba(79, 70, 229, .14);
}

.qbd-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. */
.qbd-form > ol li > span:nth-child(3) {
    width: 20px;
    height: 2px;
    margin-left: 4px;
    border-radius: 99px;
    font-size: 0;
    background: #e2ddf6;
}

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

.qbd-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);
}

.qbd-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%);
}

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

.qbd-card__ic {
    width: 38px;
    height: 38px;
    flex: 0 0 auto;
    border-radius: 12px;
    display: grid;
    place-items: center;
    color: #fff;
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    box-shadow: 0 14px 28px -14px rgba(79, 70, 229, .95);
}

/* Emerald means "the demo covers this" everywhere on this page. */
.qbd-card__ic--emerald {
    background: linear-gradient(135deg, #059669, #10b981);
    box-shadow: 0 14px 28px -14px rgba(5, 150, 105, .95);
}

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

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

/* ── step rail ──────────────────────────────────────────────────────── */
.qbd-steps {
    position: relative;
    margin: 0;
    padding: 0;
    list-style: none;
}

.qbd-step {
    position: relative;
    display: flex;
    gap: 14px;
}

.qbd-step + .qbd-step { margin-top: 20px; }

/* Connector between the numbered nodes. 16px + the 2px rule centres it under a
   34px badge; the negative bottom carries it across the 20px gap to the next. */
.qbd-step:not(:last-child)::before {
    content: "";
    position: absolute;
    left: 16px;
    top: 40px;
    bottom: -20px;
    width: 2px;
    border-radius: 99px;
    background: linear-gradient(180deg, #c7d2fe, #ede9fe);
}

.qbd-step__n {
    position: relative;
    width: 34px;
    height: 34px;
    flex: 0 0 auto;
    border-radius: 99px;
    display: grid;
    place-items: center;
    font-size: 13px;
    font-weight: 800;
    color: #fff;
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    box-shadow: 0 12px 24px -14px rgba(79, 70, 229, .95), 0 0 0 4px #f1efff;
}

.qbd-step__body { min-width: 0; }

.qbd-step__t {
    font-size: 14px;
    font-weight: 700;
    letter-spacing: -.01em;
    line-height: 1.4;
    color: #0b1020;
    margin: 6px 0 5px;
}

.qbd-step__d {
    font-size: 12.5px;
    line-height: 1.65;
    color: #64748b;
    margin: 0;
}

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

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

.qbd-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;
}

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

.qbd-note {
    position: relative;
    font-size: 12.5px;
    line-height: 1.7;
    color: #64748b;
    margin: 22px 0 0;
    padding-top: 20px;
    border-top: 1px solid #f1f0fa;
}

.qbd-note a {
    color: #5b21b6;
    font-weight: 650;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.qbd-note a:hover { color: #4f46e5; }

/* ── responsive ─────────────────────────────────────────────────────── */
@media (max-width: 1180px) {
    .qbd-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. */
    .qbd-layout { grid-template-columns: minmax(0, 1fr); gap: 28px; }

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

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

    .qbd-main { margin-top: -88px; padding-bottom: 60px; }
    .qbd-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. */
    .qbd-form > ol { margin: 0 0 22px; padding: 12px 13px; gap: 9px 11px; }
    .qbd-form > ol li > span:nth-child(3) { width: 12px; margin-left: 2px; }

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

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

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