.contact-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    width: min(940px, calc(100% - 32px));
    max-width: 940px;
    max-height: min(90vh, 820px);
    margin: 0;
    padding: 0;
    overflow: hidden;
    border: 0;
    border-radius: 16px;
    background: #fff;
    color: #172033;
    box-shadow: 0 24px 80px rgba(10, 16, 47, 0.28);
    transform: translate(-50%, -50%);
}

.contact-modal::backdrop {
    background: rgba(10, 16, 47, 0.62);
    backdrop-filter: blur(4px);
}

.contact-modal[open] {
    animation: contact-modal-enter 180ms ease-out;
}

.contact-modal__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    padding: 24px 28px 18px;
}

.contact-modal__header h2 {
    margin: 0;
    color: #111827;
    font-family: "Inter Tight", Inter, sans-serif;
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 700;
    line-height: 1.2;
}

.contact-modal__header p {
    margin: 8px 0 0;
    color: #566273;
    font-size: 0.95rem;
    line-height: 1.5;
}

.contact-modal__close {
    display: inline-flex;
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 50%;
    background: #f1f3f6;
    color: #273244;
    cursor: pointer;
    font-size: 1.75rem;
    line-height: 1;
    transition: background-color 160ms ease, color 160ms ease;
}

.contact-modal__close:hover,
.contact-modal__close:focus-visible {
    background: #e5e9ef;
    color: #111827;
}

.contact-modal__close:focus-visible {
    outline: 3px solid #8050c8;
    outline-offset: 2px;
}

.contact-modal__body {
    height: min(640px, calc(90vh - 100px));
    min-height: 420px;
    border-top: 1px solid #e8ebf0;
    background: #fff;
}

.contact-modal__body iframe {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
}

.contact-page {
    padding: 110px 24px 90px;
    background: #f7f8fb;
}

.contact-page__layout {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(360px, 1.1fr);
    gap: clamp(32px, 6vw, 80px);
    width: min(100%, 1160px);
    align-items: center;
    margin: 0 auto;
}

.contact-page__intro h1 {
    margin: 0 0 20px;
    color: #111827;
    font-family: "Inter Tight", Inter, sans-serif;
    font-size: clamp(2rem, 4vw, 3.25rem);
    font-weight: 700;
    letter-spacing: -0.035em;
    line-height: 1.1;
}

.contact-page__intro > p {
    margin: 0;
    color: #566273;
    font-size: 1.05rem;
    line-height: 1.75;
}

.contact-page__email {
    display: inline-block;
    margin-top: 28px;
    color: #5c39a5;
    font-weight: 600;
    text-decoration: none;
}

.contact-page__email:hover {
    text-decoration: underline;
}

.contact-page__form {
    min-height: 595px;
    overflow: hidden;
    border: 1px solid #e3e7ef;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 18px 50px rgba(10, 16, 47, 0.1);
}

.contact-page__form iframe {
    display: block;
    width: 100%;
    height: 595px;
    border: 0;
}

@keyframes contact-modal-enter {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@media (max-width: 700px) {
    .contact-modal {
        width: calc(100% - 20px);
        max-height: 94vh;
        border-radius: 12px;
    }

    .contact-modal__header {
        padding: 19px 18px 14px;
    }

    .contact-modal__body {
        height: calc(94vh - 86px);
        min-height: 400px;
    }

    .contact-page {
        padding: 64px 16px;
    }

    .contact-page__layout {
        grid-template-columns: minmax(0, 1fr);
        gap: 32px;
    }

    .contact-page__form {
        min-height: 580px;
    }

    .contact-page__form iframe {
        height: 580px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .contact-modal[open] {
        animation: none;
    }
}
