/* ==================================================================
   Enquiry popup (includes/enquiry-modal.php, assets/js/enquiry-modal.js)
   Not in Figma – built from the site's tokens: ivory surface, Libre Bodoni heading, champagne rule,
   and the unchanged shared lead form (.lead-form / .field / .btn styles from style.css + motion.css).
   ================================================================== */
.enquiry-modal {
    position: fixed; inset: 0; z-index: 400;
    display: flex; align-items: flex-start; justify-content: center;
    padding: 40px 24px;
    background: rgba(17, 17, 16, .72);
    opacity: 0;
    transition: opacity .35s cubic-bezier(0, 0, .58, 1);
}
.enquiry-modal.is-open { opacity: 1; }

.enquiry-modal__dialog {
    position: relative; display: flex; flex-direction: column;
    width: 100%; max-width: 760px;
    /* Centred by enquiry-modal.js on open/resize (--modal-top), then pinned so validation messages or
       the success panel grow the dialog downwards instead of moving it (no layout shift). */
    margin-top: var(--modal-top, auto);
    max-height: calc(100vh - 80px); max-height: calc(100dvh - 80px);
    max-height: var(--modal-max-h, calc(100dvh - 80px));
    background: var(--c-ivory); color: var(--c-charcoal);
    box-shadow: 0 30px 80px rgba(17, 17, 16, .35);
    outline: none;
    transform: translateY(16px);
    transition: transform .45s cubic-bezier(.22, 1, .36, 1);
}
.enquiry-modal.is-open .enquiry-modal__dialog { transform: none; }

/* The body scrolls; the close button stays put */
.enquiry-modal__body {
    overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
    padding: 56px 56px 48px;
}
.enquiry-modal__close {
    position: absolute; z-index: 2; top: 12px; right: 12px;
    display: grid; place-items: center; width: 44px; height: 44px;
    color: var(--c-charcoal); background: var(--c-ivory);
    transition: color .35s cubic-bezier(0, 0, .58, 1);
}
.enquiry-modal__close svg { width: 18px; height: 18px; }
.enquiry-modal__close:focus-visible { color: var(--c-champagne); outline-offset: -2px; }
@media (hover: hover) { .enquiry-modal__close:hover { color: var(--c-champagne); } }

.enquiry-modal__eyebrow {
    display: flex; align-items: center; gap: 20px;
    font-size: var(--fs-label); font-weight: 500; line-height: 1.4; letter-spacing: 0.22em; text-transform: uppercase;
}
.enquiry-modal__rule { flex: none; width: 56px; height: 1px; background: var(--c-champagne); }
.enquiry-modal__title { margin-top: 24px; font-size: clamp(34px, 3.2vw, 56px); }
.enquiry-modal__text { margin-top: 16px; max-width: 560px; color: rgba(32, 32, 30, .8); }
.enquiry-modal .lead-form-wrap { margin-top: 40px; }

/* Shared form inside the popup: fixed, comfortable rhythm independent of the 1920 → viewport scale */
.enquiry-modal .lead-form { gap: 28px; --fs-input: 17px; }
.enquiry-modal .lead-form__row { gap: 28px 32px; }
.enquiry-modal .field__control { margin: 12px 0; }
.enquiry-modal .field__error { margin-top: 10px; }
.enquiry-modal .field--textarea .field__control { min-height: 72px; }
.enquiry-modal .lead-form__notice { width: auto; max-width: 300px; }
.enquiry-modal .lead-success { gap: 24px; }
.enquiry-modal .lead-success__mark { width: 48px; height: 63px; }

@media (min-width: 768px) {
    .enquiry-modal .lead-form__row { grid-template-columns: 1fr 1fr; }
    .enquiry-modal .lead-form__submit-row { flex-direction: row; align-items: center; justify-content: space-between; gap: 32px; }
    .enquiry-modal .lead-form__submit { width: auto; }
}

/* Phones: edge-to-edge margins of 12px, field stack, full-width submit (existing mobile form rules) */
@media (max-width: 767.98px) {
    .enquiry-modal { padding: 12px; }
    .enquiry-modal__dialog { max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px); max-height: var(--modal-max-h, calc(100dvh - 24px)); }
    .enquiry-modal__body { padding: 48px 20px 28px; }
    .enquiry-modal__close { top: 4px; right: 4px; }
    .enquiry-modal__eyebrow { gap: 14px; }
    .enquiry-modal__rule { width: 40px; }
    .enquiry-modal__title { margin-top: 18px; }
    .enquiry-modal .lead-form-wrap { margin-top: 28px; }
    .enquiry-modal .lead-form { gap: 20px; }
    .enquiry-modal .lead-form__row { gap: 20px; }
    .enquiry-modal .lead-form__notice { max-width: none; }
}

/* Keep the page from shifting sideways when scrolling is locked (no-op with overlay scrollbars) */
html:has(body.is-locked) { scrollbar-gutter: stable; }
