/* ============================================================
   LEAD FORM MODAL (home page)
   Left: brand panel in the home-hero style. Right: the lead form
   (re-uses .di-contact-form from di-services.css, flattened here).
============================================================ */
html.di-modal-open, html.di-modal-open body { overflow: hidden; }

.di-modal {
    width: min(980px, calc(100% - 32px));
    max-height: calc(100dvh - 32px);
    margin: auto;
    padding: 0;
    border: 0;
    border-radius: 20px;
    background: var(--white, #fff);
    color: var(--gray-500, #333);
    box-shadow: 0 30px 80px rgba(9, 2, 53, .45);
    overflow: auto;
    overscroll-behavior: contain;
}
.di-modal::backdrop { background:#000000db; backdrop-filter: blur(3px); }
.di-modal[open] { animation: di-modal-in .28s cubic-bezier(.2, .7, .2, 1); }
.di-modal[open]::backdrop { animation: di-modal-fade .28s ease; }
@keyframes di-modal-in { from { opacity: 0; transform: translateY(16px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes di-modal-fade { from { opacity: 0; } to { opacity: 1; } }

.di-modal-grid { display: grid; grid-template-columns: 400px minmax(0, 1fr); min-height: 560px; }

/* ---------- Left: brand panel ---------- */
.di-modal-brand {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 40px;
    padding: 36px 36px 40px;
    overflow: hidden;
    color: var(--white, #fff);
    background: #090235;
}
/* Hero building render, faded into the navy like the home hero. */
.di-modal-brand::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url('../images/hero-bg.png') no-repeat 70% 100% / auto 85%;
    opacity: .45;
    pointer-events: none;
}
.di-modal-brand::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, #090235 30%, rgba(9, 2, 53, .55) 70%, rgba(9, 2, 53, .85) 100%);
    pointer-events: none;
}
.di-modal-brand > * { position: relative; z-index: 1; }
.di-modal-logo { display: block; align-self: flex-start; width: auto; height: 36px; }
.di-modal-brand-copy { display: flex; flex-direction: column; align-items: flex-start; margin-top: auto; }
.di-modal-brand-title {
    margin-top: 18px;
    font-size: 30px;
    line-height: 38px;
    font-weight: 700;
    color: var(--white, #fff);
}
.di-modal-grad {
    background: linear-gradient(90deg, #9900d0 0%, #d400a1 50%, #ff0077 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}
.di-modal-accent {
    display: block;
    width: 80px;
    height: 4px;
    margin: 22px 0;
    border-radius: 60px;
    background: linear-gradient(90deg, #f60074 0%, #ab00e1 100%);
}
.di-modal-brand-sub { font-size: 15px; line-height: 24px; color: rgba(255, 255, 255, .85); }
.di-modal-points { display: grid; gap: 12px; margin-top: 26px; }
.di-modal-points li {
    position: relative;
    padding-left: 30px;
    font-size: 14px;
    line-height: 20px;
    color: var(--white, #fff);
}
.di-modal-points li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 12px no-repeat,
        linear-gradient(90deg, #f60074 0%, #ab00e1 100%);
}

/* ---------- Right: form ---------- */
.di-modal-main { display: flex; flex-direction: column; justify-content: center; min-width: 0; }
.di-modal-body { padding: 40px 40px 36px; }
.di-modal-form-title { font-size: 22px; line-height: 30px; font-weight: 700; color: var(--gray-700, #131313); padding-right: 40px; }
.di-modal-form-sub { margin: 4px 0 22px; font-size: 14px; line-height: 22px; color: #666; }

/* Flatten the contact form card inside the modal; fields get the soft tint instead. */
.di-modal .di-contact-form { margin: 0; padding: 0; border: 0; border-radius: 0; background: none; }
.di-modal .di-contact-form label { margin-bottom: 8px; }
.di-modal .di-contact-form .form-control {
    height: 50px;
    border: 1px solid #e3e6f3;
    background: #f5f8fe;
    transition: border-color .15s, box-shadow .15s, background .15s;
}
.di-modal .di-contact-form textarea.form-control { height: 92px; padding-top: 14px; }
.di-modal .di-contact-form .form-control:focus {
    border-color: #ab00e1;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(171, 0, 225, .12);
}
.di-modal .di-contact-form .di-submit { height: 52px; }
.di-modal .di-form-status:empty { display: none; }
.di-modal .di-form-status { margin: 0 0 10px; font-size: 14px; }

/* Modal OTP step style adjustments */
.di-modal .di-otp-step {
    margin: 0;
    padding: 10px 0;
    border: 0;
    background: none;
}
.di-modal .di-otp-digit {
    background: #f5f8fe;
}
.di-modal .di-otp-digit:focus {
    background: #fff;
}

.di-modal-close {
    position: absolute;
    top: 18px;
    right: 18px;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #f5f8fe;
    color: var(--gray-500, #333);
    cursor: pointer;
    transition: background .15s;
}
.di-modal-close:hover { background: #e9ecf8; }
.di-modal-close:focus-visible, .di-modal-done-btn:focus-visible { outline: 2px solid #ab00e1; outline-offset: 2px; }

/* ---------- Success state (replaces the form, brand panel stays) ---------- */
.di-modal-done { display: none; padding: 36px 32px; text-align: center; }
.di-modal.is-done .di-modal-body { display: none; }
.di-modal.is-done .di-modal-done { display: block; }
.di-modal .di-modal-done.di-thanks-card {
    border: none;
    box-shadow: none;
    background: transparent;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
    .di-modal { width: min(620px, calc(100% - 24px)); }
    .di-modal-grid { grid-template-columns: minmax(0, 1fr); min-height: 0; }
    /* Compact brand header on top. */
    .di-modal-brand { gap: 20px; padding: 24px 24px 26px; }
    .di-modal-brand::before { background-position: 100% 100%; background-size: auto 140%; opacity: .3; }
    .di-modal-brand::after { background: linear-gradient(90deg, #090235 45%, rgba(9, 2, 53, .6) 100%); }
    .di-modal-logo { height: 30px; }
    .di-modal-brand-copy { margin-top: 0; }
    .di-modal-brand-title { margin-top: 12px; font-size: 22px; line-height: 30px; padding-right: 30px; }
    .di-modal-accent { margin: 14px 0 12px; width: 60px; }
    .di-modal-brand-sub { font-size: 14px; }
    .di-modal-points { display: none; }
    .di-modal-close { background: rgba(255, 255, 255, .14); color: #fff; }
    .di-modal-close:hover { background: rgba(255, 255, 255, .24); }
    .di-modal-body { padding: 26px 24px 28px; }
    .di-modal-form-title { font-size: 19px; padding-right: 0; }
    .di-modal-done { padding: 36px 24px; }
}
@media (max-width: 560px) {
    .di-modal { width: calc(100% - 16px); max-height: calc(100dvh - 16px); border-radius: 16px; }
    .di-modal-brand { padding: 20px 18px 22px; }
    .di-modal-body { padding: 22px 18px 24px; }
    .di-modal .di-contact-form .di-form-row { grid-template-columns: 1fr; gap: 0; }
}

@media (prefers-reduced-motion: reduce) {
    .di-modal[open], .di-modal[open]::backdrop { animation: none; }
}
