body.case-study-form-open {
    overflow: hidden;
}

.case-study-form-modal {
    position: fixed;
    inset: 0;
    z-index: 20000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 32px;
    overflow-y: auto;
    scrollbar-width: none;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    background: rgba(0, 0, 0, 0.88);
    backdrop-filter: blur(3px);
    transition: opacity 240ms ease, visibility 0s linear 240ms;
}

.case-study-form-modal::-webkit-scrollbar {
    display: none;
}

.case-study-form-modal.is-open {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
    transition-delay: 0s;
}

.case-study-form-modal__dialog {
    position: relative;
    width: min(640px, 100%);
    margin: auto 0;
    overflow: visible;
    padding: 38px 36px 30px;
    background:
        radial-gradient(ellipse 75% 105% at 85% 15%, rgba(12, 91, 137, 0.36), transparent 68%),
        radial-gradient(ellipse 60% 100% at 5% 90%, rgba(0, 227, 122, 0.1), transparent 70%),
        #071017;
    border: 1px solid rgba(139, 183, 212, 0.22);
    box-shadow: 0 32px 100px rgba(0, 0, 0, 0.55);
}

.case-study-form-modal__close {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    padding: 0;
    color: var(--offwhite);
    background: rgba(5, 7, 10, 0.76);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 50%;
    font-family: var(--inter);
    font-size: 25px;
    font-weight: 300;
    line-height: 1;
    cursor: pointer;
}

.case-study-form-modal__close:hover,
.case-study-form-modal__close:focus-visible {
    color: var(--green);
    background: rgba(0, 227, 122, 0.08);
    border-color: var(--green);
    outline: none;
    transform: none;
}

.case-study-form-modal__mount {
    min-height: 200px;
    padding-top: 10px;
}

.case-study-form-modal__status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-height: 180px;
    color: var(--mute-70);
    font-family: var(--mono);
    font-size: 12px;
    letter-spacing: 0.6px;
    text-transform: uppercase;
}

.case-study-form-modal__status::before {
    content: '';
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-top-color: var(--green);
    border-radius: 50%;
    animation: case-study-form-spin 800ms linear infinite;
}

.case-study-form-modal.is-form-ready .case-study-form-modal__status {
    display: none;
}

.case-study-form-modal .hbspt-form input[type='text'],
.case-study-form-modal .hbspt-form input[type='email'],
.case-study-form-modal .hbspt-form input[type='tel'] {
    min-height: 44px;
    padding-top: 10px;
    padding-bottom: 10px;
}

.case-study-form-modal .hbspt-form textarea {
    height: 58px;
    min-height: 58px;
}

.case-study-form-modal .hbspt-form .hs-form-field {
    margin-bottom: 14px;
}

.case-study-form-modal .hbspt-form .legal-consent-container,
.case-study-form-modal .hbspt-form .hs-richtext {
    font-size: 14px;
    line-height: 1.35;
}

.case-study-form-modal .hbspt-form .hs-submit {
    margin-top: 10px;
}

.case-study-form-modal__fallback {
    min-height: 180px;
    color: var(--mute-80);
    font-size: 16px;
    line-height: 1.6;
}

@keyframes case-study-form-spin {
    to { transform: rotate(360deg); }
}

@media screen and (max-width: 767px) {
    .case-study-form-modal {
        align-items: flex-start;
        padding: 0 16px;
        overflow-y: auto;
    }

    .case-study-form-modal__dialog {
        max-height: none;
        margin: auto 0;
        padding: 48px 20px 28px;
    }

    .case-study-form-modal__close {
        top: 10px;
        right: 10px;
        width: 38px;
        height: 38px;
    }

    .case-study-form-modal .hbspt-form .form-columns-2 {
        display: block;
    }

    .case-study-form-modal .hbspt-form .form-columns-2 .hs-form-field {
        width: 100% !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    .case-study-form-modal {
        transition-duration: 0.01ms;
    }

    .case-study-form-modal__status::before {
        animation: none;
    }
}
