/* =========================================
   JG NEW MEDIA DESIGN
   Contact Modal
   ========================================= */

.jg-contact-button {
    border: 0;
    cursor: pointer;
    font-family: inherit;
}

/* Modal Container */

.jg-contact-modal {
    position: fixed;
    inset: 0;
    margin: auto;

    width: min(600px, calc(100% - 32px));
    max-height: 92vh;
    max-height: 92dvh;

    padding: 0;
    overflow-y: auto;
    overscroll-behavior: contain;

    background: #111827;
    color: #f8fafc;

    border: 1px solid #29364d;
    border-radius: 18px;

    box-shadow: 0 30px 100px rgba(0,0,0,.5);

    font-family: 'Inter', sans-serif;
    color-scheme: dark;
}

.jg-contact-modal[open] {
    animation: jg-modal-enter .3s ease-out;
}

.jg-contact-modal::backdrop {
    background: rgba(4,8,16,.8);
    backdrop-filter: blur(8px);
}

@keyframes jg-modal-enter {
    from {
        opacity: 0;
        transform: translateY(18px) scale(.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

body.jg-modal-open {
    overflow: hidden;
}

.jg-modal-inner {
    position: relative;
    padding: 38px;
}

/* Close Button */

.jg-modal-close {
    position: absolute;
    top: 18px;
    right: 18px;

    display: grid;
    place-items: center;

    width: 36px;
    height: 36px;

    background: rgba(255,255,255,.04);
    border: 1px solid #29364d;
    border-radius: 8px;

    color: #a1aec3;
    cursor: pointer;

    transition: .2s ease;
}

.jg-modal-close:hover {
    background: #2563eb;
    color: #fff;
}

.jg-modal-close svg {
    width: 18px;
    height: 18px;
}

/* Heading */

.jg-modal-eyebrow {
    margin-bottom: 14px;
    padding-right: 35px;

    color: #93c5fd;

    font-size: 10px;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.jg-contact-modal h2 {
    font-family: 'Outfit', sans-serif;
    font-size: clamp(30px, 5vw, 44px);
    font-weight: 700;
    letter-spacing: -.035em;
    line-height: 1.1;

    margin: 0 0 16px;
}

.jg-contact-modal h2 span {
    color: #60a5fa;
}

.jg-modal-intro {
    font-size: 14px;
    line-height: 1.7;
    color: #a1aec3;

    margin: 0 0 26px;
}

/* Form */

.jg-contact-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.jg-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.jg-form-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

.jg-form-field label {
    font-size: 12px;
    font-weight: 500;
    color: #e2e8f0;
}

.jg-form-field input,
.jg-form-field select,
.jg-form-field textarea {
    width: 100%;
    min-width: 0;

    background: #0b101c;
    border: 1px solid #334155;
    border-radius: 7px;

    color: #f8fafc;

    padding: 13px 14px;

    font-family: inherit;
    font-size: 16px;
    line-height: 1.5;

    transition: border-color .2s,
                box-shadow .2s;
}

.jg-form-field textarea {
    resize: vertical;
    min-height: 110px;
}

.jg-form-field input::placeholder,
.jg-form-field textarea::placeholder {
    color: #8490a5;
}

.jg-form-field input:focus,
.jg-form-field select:focus,
.jg-form-field textarea:focus {
    outline: none;
    border-color: #60a5fa;
    box-shadow: 0 0 0 3px rgba(37,99,235,.15);
}

/* Submit Button */

.jg-submit-button {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;

    width: 100%;
    padding: 15px 20px;

    background: #2563eb;
    border: 0;
    border-radius: 7px;

    color: #fff;

    font-family: inherit;
    font-size: 14px;
    font-weight: 600;

    cursor: pointer;
    transition: background .2s;
}

.jg-submit-button:hover {
    background: #1d4ed8;
}

.jg-submit-button svg {
    width: 18px;
    height: 18px;
}

/* Social Divider */

.jg-social-divider {
    display: flex;
    align-items: center;
    gap: 15px;

    margin: 28px 0 20px;

    color: #94a3b8;

    font-size: 10px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.jg-social-divider::before,
.jg-social-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: #334155;
}

/* Social Links */

.jg-modal-socials {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
}

.jg-modal-socials a {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 10px 13px;

    border: 1px solid #334155;
    border-radius: 7px;

    color: #cbd5e1;

    font-size: 11px;
    font-weight: 500;
    text-decoration: none;

    transition: .2s ease;
}

.jg-modal-socials a:hover {
    background: #2563eb;
    border-color: #2563eb;
    color: #fff;
    transform: translateY(-2px);
}

.jg-contact-modal button:focus-visible,
.jg-modal-socials a:focus-visible {
    outline: 2px solid #93c5fd;
    outline-offset: 4px;
}

/* Spam Protection */

.jg-honeypot {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* Form Notifications */

.jg-form-notice {
    padding: 14px;
    margin-bottom: 20px;
    border-radius: 7px;
    font-size: 13px;
    line-height: 1.6;
}

.jg-form-notice.success {
    background: rgba(34,197,94,.08);
    border: 1px solid rgba(34,197,94,.3);
    color: #86efac;
}

.jg-form-notice.error {
    background: rgba(239,68,68,.08);
    border: 1px solid rgba(239,68,68,.3);
    color: #fca5a5;
}

/* Responsive */

@media (max-width: 600px) {

    .jg-modal-inner {
        padding: 30px 22px;
    }

    .jg-form-row {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .jg-contact-modal h2 {
        font-size: 32px;
    }

    .jg-modal-socials {
        gap: 8px;
    }

    .jg-modal-socials a {
        padding: 9px 11px;
    }
}

@media (prefers-reduced-motion: reduce) {

    .jg-contact-modal[open] {
        animation: none;
    }

    .jg-contact-modal * {
        transition: none;
    }
}