/* Homepage Book a Demo — scoped to match TFY-Home Figma (node 1:53) */

:root {
    --hp-bd-navy: #172679;
    --hp-bd-highlight: #dbddff;
    --hp-bd-pill-border: #dbe1e9;
    --hp-bd-muted: #7c7a7f;
    --hp-bd-disclaimer: rgba(12, 12, 12, 0.5);
    --hp-bd-input-border: #d0d5dd;
}

.hp-bd-hero__inner {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    align-items: center;
    width: 100%;
}

/* Mobile visual order: Text → Video → Form (DOM stays copy, form, video) */
.hp-bd-hero__copy {
    order: 1;
    text-align: center;
}

.hp-bd-hero__video {
    order: 2;
}

.hp-bd-hero__form-wrap {
    order: 3;
}

.hp-bd-hero__title {
    margin: 0;
    color: var(--hp-bd-navy);
    font-family: "Open Sans", sans-serif;
    font-size: clamp(1.75rem, 4.2vw, 2.9375rem); /* ≤47px */
    font-weight: 700;
    line-height: 1.23; /* ~58/47 */
}

/* Same size as the h1 line — highlighter bar, not a small badge */
.hp-bd-hero__highlight {
    display: inline;
    padding: 0.08em 0.22em;
    border-radius: 5px;
    background: var(--hp-bd-highlight);
    color: inherit;
    font-size: inherit;
    font-weight: inherit;
    line-height: inherit;
    box-decoration-break: clone;
    -webkit-box-decoration-break: clone;
}

/* Figma 1:59 — Lato 26px / lh 40px / width 562px → 5 lines */
.hp-bd-hero__lead {
    max-width: 562px;
    margin: 24px auto 0;
    color: var(--hp-bd-navy);
    font-family: Lato, "Open Sans", sans-serif;
    font-size: 26px;
    font-weight: 400;
    line-height: 40px;
}

.hp-bd-hero__trust {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 28px;
}

.hp-bd-hero__pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 36px;
    padding: 6px 14px 6px 10px;
    border: 1.5px solid var(--hp-bd-pill-border);
    border-radius: 500px;
    background: #fff;
    font-family: "Open Sans", sans-serif;
    font-size: 17px;
    font-weight: 600;
    line-height: 1.2;
}

.hp-bd-hero__pill img {
    display: block;
    width: 22px;
    height: 23px;
    object-fit: contain;
}

.hp-bd-hero__pill-label {
    color: var(--hp-bd-muted);
}

.hp-bd-hero__pill-score {
    color: rgba(0, 0, 0, 0.5);
}

.hp-bd-hero__form-wrap {
    width: 100%;
    max-width: 651px;
    margin: 0 auto;
}

.hp-bd-card {
    box-sizing: border-box;
    width: 100%;
    padding: 28px 24px 32px;
    border: 0.8px solid var(--hp-bd-navy);
    border-radius: 15px;
    background: #fff;
}

.hp-bd-card__title {
    margin: 0 0 28px;
    color: var(--hp-bd-navy);
    font-family: Lato, "Open Sans", sans-serif;
    font-size: clamp(1.25rem, 2.2vw, 1.6875rem); /* ≤27px */
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
}

.hp-bd-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.hp-bd-form__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
}

.hp-bd-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

.hp-bd-label {
    margin: 0;
    color: var(--hp-bd-navy);
    font-family: Lato, "Open Sans", sans-serif;
    font-size: 1.125rem; /* 18–20px */
    font-weight: 600;
    line-height: 1.2;
}

.hp-bd-input {
    box-sizing: border-box;
    width: 100%;
    height: 48px;
    padding: 10px 14px;
    border: 1px solid var(--hp-bd-input-border);
    border-radius: 8px;
    background: #fff;
    color: var(--hp-bd-navy);
    font-family: Lato, "Open Sans", sans-serif;
    font-size: 16px;
    line-height: 1.3;
}

.hp-bd-input:focus {
    outline: none;
    border-color: var(--hp-bd-navy);
    box-shadow: 0 0 0 2px rgba(23, 38, 121, 0.15);
}

.hp-bd-input[aria-invalid="true"] {
    border-color: #dc2626;
}

.hp-bd-field-error {
    color: #dc2626;
    font-family: Lato, "Open Sans", sans-serif;
    font-size: 12px;
    line-height: 1.3;
}

/* Same as before Cloudflare flex-center tweak — flexible widget fills form width */
.hp-bd-turnstile {
    width: 100%;
    min-height: 65px;
}

.hp-bd-disclaimer {
    margin: 4px 0 0;
    color: var(--hp-bd-disclaimer);
    font-family: Lato, "Open Sans", sans-serif;
    font-size: clamp(0.875rem, 1.5vw, 1.25rem); /* ≤20px */
    font-weight: 400;
    line-height: 1.5;
    text-align: center;
}

.hp-bd-error {
    margin: 0;
    color: #dc2626;
    font-family: Lato, "Open Sans", sans-serif;
    font-size: 13px;
    line-height: 1.4;
    text-align: center;
}

.hp-bd-text {
    margin: 0;
    color: var(--hp-bd-navy);
    font-family: Lato, "Open Sans", sans-serif;
    font-size: 15px;
    line-height: 1.5;
    text-align: center;
}

.hp-bd-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    align-self: center;
    width: 100%;
    max-width: 299px;
    min-height: 48px;
    margin-top: 8px;
    padding: 10px 20px;
    border: 0;
    border-radius: 5px;
    background: var(--hp-bd-navy);
    color: #fff;
    font-family: "Open Sans", sans-serif;
    font-size: clamp(1.125rem, 2vw, 1.5625rem); /* ≤25px */
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.hp-bd-submit:hover:not(:disabled) {
    background: #0f1a57;
}

.hp-bd-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

@media (min-width: 640px) {
    .hp-bd-card {
        padding: 32px 36px 40px;
    }

    .hp-bd-form__grid {
        grid-template-columns: 1fr 1fr;
        column-gap: 24px;
        row-gap: 22px;
    }

    .hp-bd-label {
        font-size: 1.25rem; /* 20px */
    }
}

@media (min-width: 992px) {
    .hp-bd-hero__inner {
        grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
        grid-template-areas:
            "copy form"
            "video video";
        gap: 48px;
        /* Top-align so H1 can line up with form title via padding-top */
        align-items: start;
    }

    .hp-bd-hero__copy {
        grid-area: copy;
        order: unset;
        text-align: left;
    }

    .hp-bd-hero__form-wrap {
        grid-area: form;
        order: unset;
        margin-left: auto;
        margin-right: 0;
    }

    .hp-bd-hero__video {
        grid-area: video;
        order: unset;
    }

    .hp-bd-hero__lead {
        margin-left: 0;
        margin-right: 0;
    }

    .hp-bd-hero__trust {
        justify-content: flex-start;
        margin-top: 36px;
    }
}

/* Disabled shell fields keep the same size as interactive React fields */
#homepage-book-demo .hp-bd-input:disabled,
#homepage-book-demo .hp-bd-submit:disabled {
    opacity: 1;
    cursor: default;
}

/*
 * Top Book a Demo band — map background + form + video (first glance).
 */
.hp-bd-top {
    padding: 48px 0 36px; /* a little down again; video still in first view */
    background: url("/assets/img/home/hero-background.webp") no-repeat center top;
    background-size: cover;
    border-radius: 0 0 80px 80px;
    overflow: hidden;
}

.hp-bd-top .container {
    max-width: 1320px;
}

.hp-bd-top .hp-bd-hero__copy {
    text-align: left;
}

.hp-bd-top .hp-bd-hero__trust {
    justify-content: flex-start;
}

/* Video in the same top band */
.hp-bd-hero__video {
    width: 100%;
    max-width: 880px;
    margin-left: auto;
    margin-right: auto;
}

@media (min-width: 992px) {
    .hp-bd-top {
        padding: 56px 0 40px;
    }

    .hp-bd-hero__inner {
        /* tighter row gap so video stays in first viewport */
        gap: 20px 36px;
        align-items: start;
    }

    /*
     * Line H1 up with "Book your 30-minute…" (card padding-top 32px),
     * then a touch lower as in updated design.
     */
    .hp-bd-hero__copy {
        padding-top: 48px;
    }

    .hp-bd-hero__lead {
        margin-top: 16px;
    }

    .hp-bd-hero__trust {
        margin-top: 20px;
    }

    .hp-bd-hero__video {
        margin-top: 10px;
    }
}

@media (min-width: 1200px) {
    .hp-bd-top {
        border-radius: 0 0 150px 150px;
    }
}

@media (max-width: 991px) {
    .hp-bd-top {
        border-radius: 0 0 48px 48px;
        padding: 48px 0 40px;
    }

    .hp-bd-hero__lead {
        font-size: 18px;
        line-height: 28px;
    }

    .hp-bd-top .hp-bd-hero__copy {
        text-align: center;
    }

    .hp-bd-top .hp-bd-hero__lead {
        margin-left: auto;
        margin-right: auto;
    }

    .hp-bd-top .hp-bd-hero__trust {
        justify-content: center;
    }
}
