/* MATIS LABS download dialog — shared by flyer, product and consulting pages. */
body.flyer-modal-open {
    overflow: hidden;
}

body.flyer-modal-open elevenlabs-convai {
    visibility: hidden !important;
}

.flyer-modal[hidden] {
    display: none;
}

.flyer-modal {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: grid;
    place-items: center;
    padding: clamp(0.75rem, 2.5vw, 2rem);
}

.flyer-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(5, 6, 15, 0.76);
    backdrop-filter: blur(12px);
    opacity: 0;
    transition: opacity 220ms ease;
}

.flyer-modal__dialog {
    position: relative;
    width: min(1060px, 100%);
    max-height: calc(100svh - 2rem);
    display: grid;
    grid-template-columns: minmax(280px, 0.78fr) minmax(0, 1.35fr);
    overflow: auto;
    overscroll-behavior: contain;
    border: 1px solid rgba(196, 162, 97, 0.46);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 28px 90px rgba(5, 6, 15, 0.35);
    opacity: 0;
    transform: translateY(22px) scale(0.985);
    transition: opacity 220ms ease, transform 260ms cubic-bezier(.2, .8, .2, 1);
}

.flyer-modal.is-open .flyer-modal__backdrop,
.flyer-modal.is-open .flyer-modal__dialog {
    opacity: 1;
}

.flyer-modal.is-open .flyer-modal__dialog {
    transform: translateY(0) scale(1);
}

.flyer-modal__close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 2;
    width: 2.75rem;
    height: 2.75rem;
    display: grid;
    place-items: center;
    border: 1px solid #d9dbe4;
    border-radius: 50%;
    background: #fff;
    color: #09090e;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.flyer-modal__close:hover {
    border-color: #8a6d33;
    background: #f8f5ef;
    transform: rotate(4deg);
}

.flyer-modal__intro {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 100%;
    padding: clamp(2rem, 4vw, 3.35rem);
    overflow: hidden;
    color: #f8f8fb;
    background:
        radial-gradient(circle at 12% 10%, rgba(196, 162, 97, 0.19), transparent 36%),
        linear-gradient(145deg, #05060f 0%, #111b36 100%);
}

.flyer-modal__intro::after {
    content: "";
    position: absolute;
    width: 20rem;
    height: 20rem;
    right: -10rem;
    bottom: -10rem;
    border: 1px solid rgba(196, 162, 97, 0.22);
    border-radius: 50%;
    box-shadow: 0 0 0 3.5rem rgba(196, 162, 97, 0.035), 0 0 0 7rem rgba(196, 162, 97, 0.02);
}

.flyer-modal__eyebrow,
.flyer-modal__field-label,
.flyer-download-prompt__eyebrow,
.flyer-modal__meta {
    font-family: var(--font-mono, "Space Mono", monospace);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.flyer-modal__eyebrow {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.7rem;
    color: #d7b875;
    font-size: 0.7rem;
}

.flyer-modal__eyebrow::before {
    content: "";
    width: 1.75rem;
    height: 1px;
    background: #c4a261;
}

.flyer-modal__intro h2 {
    position: relative;
    margin: 1.5rem 0 1rem;
    max-width: 10ch;
    color: #fff;
    font-size: clamp(2.1rem, 4vw, 3.45rem);
    line-height: 0.98;
    letter-spacing: -0.045em;
}

.flyer-modal__intro-copy {
    position: relative;
    margin: 0;
    color: rgba(248, 248, 251, 0.72);
    font-size: 0.96rem;
    line-height: 1.65;
}

.flyer-modal__benefits {
    position: relative;
    display: grid;
    gap: 0.85rem;
    margin: auto 0 0;
    padding: 2.25rem 0 0;
    list-style: none;
}

.flyer-modal__benefits li {
    display: grid;
    grid-template-columns: 1.75rem 1fr;
    gap: 0.65rem;
    align-items: start;
    color: rgba(248, 248, 251, 0.82);
    font-size: 0.82rem;
    line-height: 1.45;
}

.flyer-modal__benefits b {
    color: #d7b875;
    font-family: var(--font-mono, "Space Mono", monospace);
    font-size: 0.67rem;
    font-weight: 500;
}

.flyer-modal__form-panel {
    padding: clamp(2rem, 4vw, 3.35rem);
    background: linear-gradient(180deg, #fff 0%, #f8f8fb 100%);
}

.flyer-modal__form-panel h3 {
    margin: 0 3.5rem 0.55rem 0;
    color: #09090e;
    font-size: clamp(1.7rem, 3vw, 2.5rem);
    letter-spacing: -0.035em;
}

.flyer-modal__form-lead {
    margin: 0 0 1.55rem;
    max-width: 58ch;
    color: #555563;
    font-size: 0.92rem;
    line-height: 1.6;
}

.flyer-modal__form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.flyer-modal__field {
    display: grid;
    gap: 0.42rem;
}

.flyer-modal__field--wide,
.flyer-modal__consent,
.flyer-modal__submit-row {
    grid-column: 1 / -1;
}

.flyer-modal__field-label {
    color: #6b6b7a;
    font-size: 0.66rem;
}

.flyer-modal__field input,
.flyer-modal__field select {
    width: 100%;
    min-height: 3.25rem;
    padding: 0.75rem 0.9rem;
    border: 1px solid #d8dae4;
    border-radius: 9px;
    background: #fff;
    color: #09090e;
    font: inherit;
    transition: border-color 160ms ease, box-shadow 160ms ease;
}

.flyer-modal__field input:focus,
.flyer-modal__field select:focus,
.flyer-modal__close:focus-visible {
    outline: none;
    border-color: #8a6d33;
    box-shadow: 0 0 0 3px rgba(196, 162, 97, 0.2);
}

.flyer-modal__consent {
    display: grid;
    grid-template-columns: 1.15rem 1fr;
    gap: 0.75rem;
    align-items: start;
    margin-top: 0.15rem;
    color: #555563;
    font-size: 0.75rem;
    line-height: 1.52;
    cursor: pointer;
}

.flyer-modal__consent input {
    width: 1.05rem;
    height: 1.05rem;
    margin: 0.2rem 0 0;
    accent-color: #8a6d33;
}

.flyer-modal__submit-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 0.25rem;
}

.flyer-modal__submit {
    min-height: 3.2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 1.75rem;
    padding: 0.85rem 1.2rem;
    border: 1px solid #8a6d33;
    border-radius: 8px;
    background: #c4a261;
    color: #09090e;
    font: 700 0.9rem var(--font-body, Inter, sans-serif);
    cursor: pointer;
    transition: background 160ms ease, transform 160ms ease;
}

.flyer-modal__submit:hover {
    background: #d2b478;
    transform: translateY(-1px);
}

.flyer-modal__meta {
    color: #6b6b7a;
    font-size: 0.62rem;
}

.flyer-modal__privacy {
    grid-column: 1 / -1;
    margin: 0;
    color: #6b6b7a;
    font-size: 0.7rem;
    line-height: 1.5;
}

.flyer-modal__privacy a {
    color: #6f5525;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.flyer-download-prompt {
    padding-top: 1rem;
}

.flyer-download-prompt__inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 2rem;
    align-items: center;
    padding: clamp(2rem, 4vw, 3rem);
    border: 1px solid rgba(196, 162, 97, 0.5);
    border-radius: 16px;
    background:
        linear-gradient(90deg, rgba(196, 162, 97, 0.09), transparent 46%),
        #fff;
    box-shadow: 0 16px 45px rgba(17, 27, 54, 0.08);
}

.flyer-download-prompt__eyebrow {
    display: block;
    margin-bottom: 0.7rem;
    color: #8a6d33;
    font-size: 0.68rem;
}

.flyer-download-prompt h2 {
    margin: 0 0 0.6rem;
    color: #09090e;
    font-size: clamp(1.75rem, 3.5vw, 2.8rem);
    letter-spacing: -0.04em;
}

.flyer-download-prompt p {
    margin: 0;
    max-width: 62ch;
    color: #555563;
    line-height: 1.6;
}

.flyer-download-prompt__action {
    min-width: 15rem;
    min-height: 3.35rem;
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.9rem 1.15rem;
    border: 1px solid #8a6d33;
    border-radius: 8px;
    background: #c4a261;
    color: #09090e;
    font: 700 0.9rem var(--font-body, Inter, sans-serif);
    text-align: left;
    cursor: pointer;
    transition: background 160ms ease, transform 160ms ease;
}

.flyer-download-prompt__action:hover {
    background: #d2b478;
    transform: translateY(-2px);
}

@media (max-width: 780px) {
    .flyer-modal {
        padding: 0.5rem;
    }

    .flyer-modal__dialog {
        max-height: calc(100svh - 1rem);
        grid-template-columns: 1fr;
        border-radius: 13px;
    }

    .flyer-modal__intro {
        min-height: auto;
        padding: 1.65rem 4.2rem 1.65rem 1.5rem;
    }

    .flyer-modal__intro h2 {
        max-width: 14ch;
        margin: 0.8rem 0 0.65rem;
        font-size: 2rem;
    }

    .flyer-modal__benefits {
        display: none;
    }

    .flyer-modal__form-panel {
        padding: 1.5rem;
    }

    .flyer-modal__form-panel h3 {
        margin-right: 0;
        font-size: 1.65rem;
    }

    .flyer-modal__form {
        grid-template-columns: 1fr;
    }

    .flyer-modal__field,
    .flyer-modal__field--wide,
    .flyer-modal__consent,
    .flyer-modal__submit-row,
    .flyer-modal__privacy {
        grid-column: 1;
    }

    .flyer-modal__submit-row {
        align-items: stretch;
        flex-direction: column;
    }

    .flyer-download-prompt__inner {
        grid-template-columns: 1fr;
        gap: 1.35rem;
    }

    .flyer-download-prompt__action {
        width: 100%;
        min-width: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .flyer-modal__backdrop,
    .flyer-modal__dialog,
    .flyer-modal__close,
    .flyer-modal__submit,
    .flyer-download-prompt__action {
        transition: none;
    }
}
