/* =========================================================
   Lead popup  (includes/lead-popup.php + js/lead-popup.js)
   Everything is scoped under .lead-popup so it never touches page styles.
   ========================================================= */
.lead-popup{--lp-blue: #0799d3;--lp-ink: #16161D;--lp-muted: #5F6170;--lp-field: #F2F2F7;--lp-ease: cubic-bezier(.22, 1, .36, 1);
    position: fixed;inset: 0;z-index: 99990;display: flex;align-items: center;justify-content: center;padding: 24px;
    visibility: hidden;pointer-events: none;font-family: inherit;}
.lead-popup *,
.lead-popup *::before,
.lead-popup *::after{box-sizing: border-box;}
.lead-popup.is-open{visibility: visible;pointer-events: auto;}

.lead-popup .lp-overlay{position: absolute;inset: 0;background: rgba(0, 0, 0, .62);backdrop-filter: blur(4px);-webkit-backdrop-filter: blur(4px);opacity: 0;transition: opacity .45s ease;}
.lead-popup.is-open .lp-overlay{opacity: 1;}

/* dialog */
.lead-popup .lp-dialog{position: relative;display: grid;grid-template-columns: 400px minmax(0, 1fr);width: 100%;max-width: 960px;min-height: 536px;max-height: calc(100vh - 48px);
    border-radius: 24px;overflow: hidden;box-shadow: 0 30px 80px rgba(0, 0, 0, .45);outline: none;
    opacity: 0;transform: translateY(28px) scale(.94);transition: opacity .45s var(--lp-ease), transform .6s var(--lp-ease);}
.lead-popup.is-open .lp-dialog{opacity: 1;transform: none;}
.lead-popup.is-closing .lp-dialog{opacity: 0;transform: translateY(16px) scale(.97);transition-duration: .3s, .35s;}
.lead-popup.is-closing .lp-overlay{opacity: 0;transition-duration: .35s;}

.lead-popup .lp-handle{display: none;}
.lead-popup .lp-close{position: absolute;top: 20px;right: 20px;z-index: 3;display: flex;align-items: center;justify-content: center;width: 44px;height: 44px;padding: 0;
    border: 0;border-radius: 50%;background: #F0F0F4;color: var(--lp-ink);cursor: pointer;transition: background .25s ease, transform .35s var(--lp-ease);}
.lead-popup .lp-close:hover{background: #E4E4EA;transform: rotate(90deg);}

/* left side */
.lead-popup .lp-side{position: relative;display: flex;flex-direction: column;align-items: flex-start;padding: 40px;color: #fff;overflow: hidden;border-radius: 24px 0 0 24px;
    background: radial-gradient(120% 70% at 0% 0%, #1E3B29 0%, rgba(30, 59, 41, 0) 55%), radial-gradient(90% 60% at 100% 100%, #1F2C47 0%, rgba(31, 44, 71, 0) 60%), #121212;}
.lead-popup .lp-badge{display: inline-block;padding: 8px 14px;border-radius: 40px;background: rgba(255, 255, 255, .1);color: #D8D8D8;font-size: 11px;font-weight: 600;letter-spacing: .08em;line-height: 1;text-transform: uppercase;}
.lead-popup .lp-heading{margin: 28px 0 0;font-size: 34px;font-weight: 600;line-height: 1.22;color: #fff;}
.lead-popup .lp-heading span{display: block;background: linear-gradient(90deg, #4ADE80 0%, #4F8EF7 100%);-webkit-background-clip: text;background-clip: text;color: transparent;}
.lead-popup .lp-lead{margin: 16px 0 0;font-size: 15px;line-height: 1.6;color: #CFCFCF;}
.lead-popup .lp-mob{display: none;}

.lead-popup .lp-proof{position: relative;width: 100%;margin-top: 28px;padding:16px 18px 18px;border-radius: 16px;background: rgba(255, 255, 255, .06);border: 1px solid rgba(255, 255, 255, .08);}
.lead-popup .lp-proof-label{display: block;font-size: 11px;font-weight: 600;letter-spacing: .08em;text-transform: uppercase;color: #A9A9A9;}
.lead-popup .lp-proof-slides{display: grid;margin-top: 8px;}
.lead-popup .lp-proof-slide{grid-area: 1 / 1;display: flex;flex-direction: column;opacity: 0;transform: translateY(8px);transition: opacity .6s ease, transform .6s var(--lp-ease);pointer-events: none;}
.lead-popup .lp-proof-slide.is-active{opacity: 1;transform: none;}
.lead-popup .lp-proof-num{font-size: 34px;font-weight: 600;line-height: 1.2;background: linear-gradient(90deg, #4ADE80 0%, #5FCB9A 100%);-webkit-background-clip: text;background-clip: text;color: transparent;}
.lead-popup .lp-proof-text{margin-top: 4px;font-size: 15px;font-weight: 500;color: #EDEDED;}
.lead-popup .lp-proof-text span{color: #ABABAB;}
.lead-popup .lp-dots{display: flex;gap: 6px;margin-top: 16px;}
.lead-popup .lp-dots button{position: relative;width: 5px;height: 5px;padding: 0;border: 0;border-radius: 5px;cursor: pointer;background: rgba(255, 255, 255, .35);transition: width .4s var(--lp-ease), background .4s ease;}
.lead-popup .lp-dots button.is-active{width: 18px;background: #fff;}
.lead-popup .lp-dots button::before{content: "";position: absolute;inset: -8px -3px;}

.lead-popup .lp-person{display: flex;align-items: center;gap: 12px;margin-top: auto;padding-top: 28px;}
.lead-popup .lp-avatar{flex-shrink: 0;width: 44px;height: 44px;border-radius: 50%;object-fit: cover;}
.lead-popup .lp-person-info{display: flex;flex-direction: column;line-height: 1.35;}
.lead-popup .lp-person-info strong{font-size: 15px;font-weight: 600;color: #fff;}
.lead-popup .lp-person-info small{font-size: 13px;color: #ABABAB;}

/* right side */
.lead-popup .lp-main{position: relative;display: flex;flex-direction: column;justify-content: center;padding: 44px 44px 36px;overflow-y: auto;background: #fff;}
.lead-popup .lp-form-title{margin: 0 0 22px;padding-right: 56px;font-size: 20px;font-weight: 600;line-height: 1.3;color: var(--lp-ink);}
/* form: reuses the site's light contact-form classes (.input-form .field-row in css/style.css + css/new-home.css),
   .validation-error / .field-validation-error (css/style.css) and the site button - only the popup's compact sizing lives here */
.lead-popup .input-form .field-row{margin-bottom: 16px;}
.lead-popup .input-form .field-row > label{margin-bottom: 8px;font-size: 13px;line-height: 1.4;}
.lead-popup .input-form .field-row input[type='text'],
.lead-popup .input-form .field-row textarea{min-height: 48px;padding-inline: 16px;font-size: 15px;border-radius: 14px;}
.lead-popup .input-form .field-row textarea{height: 100px;resize: none;}
.lead-popup .validation-error{font-size: 14px;}
.lead-popup .lp-form-error{display: none;margin: 0 0 12px;font-size: 13px;}
.lead-popup .lp-form-error.is-visible{display: block;}
/* phone field: intl-tel-input wrapper fills the field-row */
.lead-popup .input-form .field-row .iti{width: 100%;}
/* popup dropdown lives in .iti--container on <body> (dropdownContainer:body) so the
   .input-form/.iti--inline-dropdown selectors in new-home.css don't reach it - mirror them here */
.iti--container{z-index: 100000;}
.iti--container .iti__dropdown-content{position: relative;padding: 4px 13px 12px;border-radius: 12px;box-shadow: 1px 1px 4px rgba(129,129,129,.47);border: 0;}
.iti--container input[type='text'].iti__search-input{border-radius: 0;min-height: 42px;font-size: 15px;padding: 0 12px 0 34px;line-height: 1.2;background: transparent;border: 0;border-bottom: 1px solid #eee;}
.iti--container input[type='text'].iti__search-input:focus{border-color: #eee !important;}
.iti--container .iti__country-list li.iti__country.iti__highlight{border-color: #666;}
.iti--container .iti__country-list li.iti__country.phone-country-active{position: relative;}
.iti--container .iti__country-list li.iti__country.phone-country-active::after{content: '';position: absolute;background-image: url("data:image/svg+xml,%3Csvg width='13' height='9' viewBox='0 0 13 9' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0.75 4.35L4.4836 7.95L11.95 0.75' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round' stroke='%23444444' stroke-opacity='0.729412'/%3E%3C/svg%3E%0A");width: 13px;height: 9px;right: 8px;}

.lead-popup .lp-hp{position: absolute !important;left: -9999px !important;width: 1px;height: 1px;opacity: 0;}
.lead-popup .lp-submit{display: inline-flex;align-items: center;gap: 10px; cursor: pointer;}
.lead-popup .lp-spinner{display: none;width: 16px;height: 16px;border: 2px solid rgba(255, 255, 255, .45);border-top-color: #fff;border-radius: 50%;animation: lpSpin .7s linear infinite;}
.lead-popup .lp-submit.is-loading .lp-spinner{display: inline-block;}
.lead-popup .lp-note{margin: 14px 0 0;font-size: 12px;color: #6B6D7A;}
.lead-popup .lp-note a{color: #0799d3;text-decoration: underline;}

/* success state */
.lead-popup .lp-success{position: absolute;inset: 0;display: flex;flex-direction: column;align-items: center;justify-content: center;padding: 40px;text-align: center;
    opacity: 0;visibility: hidden;transform: translateY(16px);}
/* transition only while open - otherwise it would briefly show (and fade out) on page load */
.lead-popup.is-open .lp-success{transition: opacity .5s ease .15s, transform .6s var(--lp-ease) .15s, visibility 0s linear .65s;}
.lead-popup .lp-form{transition: opacity .35s ease, transform .45s var(--lp-ease);}
.lead-popup.is-success .lp-form{opacity: 0;transform: translateY(-16px);pointer-events: none;}
.lead-popup.is-success .lp-success{opacity: 1;visibility: visible;transform: none;transition-delay: .15s, .15s, 0s;}
.lead-popup .lp-check{position: relative;display: flex;align-items: center;justify-content: center;width: 72px;height: 72px;border-radius: 50%;background: var(--lp-blue);color: #fff;box-shadow: 0 0 0 8px #D6F3FF;}
.lead-popup .lp-check svg{width: 30px;height: 30px;stroke-dasharray: 24;stroke-dashoffset: 24;}
.lead-popup.is-success .lp-check{animation: lpPop .6s var(--lp-ease) .25s both;}
.lead-popup.is-success .lp-check svg{animation: lpDraw .45s ease .6s forwards;}
.lead-popup.is-success .lp-check::after{content: "";position: absolute;inset: -8px;border-radius: 50%;border: 2px solid var(--lp-blue);animation: lpRing 1.1s ease-out .55s both;}
.lead-popup .lp-success-title{margin: 30px 0 0;font-size: 26px;font-weight: 600;line-height: 1.3;color: var(--lp-ink);}
.lead-popup .lp-success-text{max-width: 320px;margin: 12px 0 0;font-size: 15px;line-height: 1.6;color: var(--lp-muted);}
.lead-popup .lp-outline-btn{display: inline-flex;align-items: center;justify-content: center;height: 48px;margin-top: 28px;padding: 0 26px;border: 1px solid #0799d3;border-radius: 40px;
    color: #0799d3;font-size: 16px;font-weight: 600;text-decoration: none;transition: background .3s ease, color .3s ease;}
.lead-popup .lp-outline-btn:hover{background: #0799d3;color: #fff;}
.lead-popup .lp-text-btn{margin-top: 18px;padding: 4px;border: 0;background: none;color: #0799d3;font: inherit;font-size: 15px;font-weight: 500;text-decoration: underline;cursor: pointer;}

/* entrance stagger */
.lead-popup .lp-anim{opacity: 0;transform: translateY(14px);}
.lead-popup.is-open .lp-anim{animation: lpUp .6s var(--lp-ease) forwards;animation-delay: calc(.12s + var(--d, 0) * .055s);}

@keyframes lpUp{to{opacity: 1;transform: none;}}
@keyframes lpSpin{to{transform: rotate(360deg);}}
@keyframes lpPop{0%{transform: scale(.4);opacity: 0;}70%{transform: scale(1.08);opacity: 1;}100%{transform: scale(1);}}
@keyframes lpDraw{to{stroke-dashoffset: 0;}}
@keyframes lpRing{0%{transform: scale(1);opacity: .7;}100%{transform: scale(1.6);opacity: 0;}}
@keyframes lpShake{0%, 100%{transform: none;}25%{transform: translateX(-4px);}75%{transform: translateX(4px);}}

body.lead-popup-open{overflow: hidden;}

.popup-phone-field .iti__selected-country{
    padding: 0px 5px;
}
.popup-phone-field .iti .iti__selected-dial-code{margin-left: 6px;}

.popup-phone-field{position: relative;z-index: 1;}
.popup-phone-field{position: relative;z-index: 1;}
.input-form .popup-phone-field .iti--inline-dropdown .iti__search-input[type='text']{border-radius: 0;min-height: 38px;padding: 0 12px 0 29px;}
.popup-phone-field .iti--inline-dropdown .iti__dropdown-content {padding: 4px 8px 12px;}
.popup-phone-field .iti__dropdown-content:not(.iti__hide)::after { --sz: 19px; top: 13px; left: 10px; }
.popup-phone-field .iti__country-list .iti__country-name,.popup-phone-field .iti__country-list .iti__dial-code {font-size: 13px;}


/* tablet */
@media (max-width: 900px){
    .lead-popup .lp-dialog{grid-template-columns: 340px minmax(0, 1fr);}
    .lead-popup .lp-side{padding: 32px;}
    .lead-popup .lp-main{padding: 40px 32px 32px;}
    .lead-popup .lp-heading{font-size: 30px;}
}

/* mobile: bottom sheet */
@media (max-width: 680px){
    .lead-popup{align-items: flex-end;padding: 0;}
    .lead-popup .lp-dialog{display: block;max-width: none;min-height: 0;max-height: 92vh;max-height: 92dvh;border-radius: 24px 24px 0 0;overflow-y: auto;overscroll-behavior: contain;
        transform: translateY(100%);opacity: 1;transition: transform .55s var(--lp-ease);}
    .lead-popup.is-open .lp-dialog{transform: none;background-color: #ffffff;}
    .lead-popup.is-closing .lp-dialog{transform: translateY(100%);opacity: 1;transition-duration: .4s;}
    .lead-popup .lp-handle{position: absolute;top: 10px;left: 50%;z-index: 3;display: block;width: 40px;height: 4px;margin-left: -20px;border-radius: 4px;background: rgba(255, 255, 255, .35);}
    .lead-popup .lp-close{top: 14px;right: 14px;width: 40px;height: 40px;background: rgba(255, 255, 255, .14);color: #fff;}
    .lead-popup .lp-close:hover{background: rgba(255, 255, 255, .24);}

    .lead-popup .lp-side{padding: 28px 22px 20px;border-radius: 24px 24px 0 0;}
    .lead-popup .lp-badge,
    .lead-popup .lp-person,
    .lead-popup .lp-proof-label,
    .lead-popup .lp-dots,
    .lead-popup .lp-desk{display: none;}
    .lead-popup .lp-mob{display: inline;}
    .lead-popup .lp-heading{margin: 0;padding-right: 48px;font-size: 26px;}
    .lead-popup .lp-lead{margin-top: 10px;font-size: 14px;}
    .lead-popup .lp-proof{margin-top: 14px;padding: 0;border: 0;background: none;}
    .lead-popup .lp-proof-slides{margin-top: 0;}
    .lead-popup .lp-proof-slide{flex-direction: row;align-items: baseline;gap: 10px;}
    .lead-popup .lp-proof-num{font-size: 22px;background: linear-gradient(90deg, #4ADE80 0%, #4F8EF7 100%);-webkit-background-clip: text;background-clip: text;}
    .lead-popup .lp-proof-text{margin: 0;font-size: 14px;}

    .lead-popup .lp-main{display: block;padding: 24px 22px 22px;overflow: visible;}
    .lead-popup .lp-form-title{display: none;}
    .lead-popup .input-form .field-row{width: 100%;margin-left: 0;}
    .lead-popup .lp-submit{width: 100%;justify-content: center;}
    .lead-popup .lp-success{position: static;display: none;padding: 36px 8px 20px;}
    .lead-popup.is-success .lp-form{display: none;}
    .lead-popup.is-success .lp-success{display: flex;}
    .lead-popup .lp-success-title{font-size: 22px;}
}

/* reduced motion: no movement, proof card stays on the first result (handled in JS) */
@media (prefers-reduced-motion: reduce){
    .lead-popup .lp-dialog,
    .lead-popup .lp-overlay,
    .lead-popup .lp-form,
    .lead-popup .lp-success,
    .lead-popup .lp-proof-slide{transition: opacity .2s linear !important;transform: none !important;}
    .lead-popup .lp-anim{opacity: 1;transform: none;}
    .lead-popup.is-open .lp-anim,
    .lead-popup.is-success .lp-check,
    .lead-popup.is-success .lp-check::after{animation: none;}
    .lead-popup.is-success .lp-check svg{animation: none;stroke-dashoffset: 0;}
}

/* keep scrolling when the screen is short, but hide the scrollbar */
.lead-popup .lp-dialog,
.lead-popup .lp-main{scrollbar-width: none;-ms-overflow-style: none;}
.lead-popup .lp-dialog::-webkit-scrollbar,
.lead-popup .lp-main::-webkit-scrollbar{display: none;}