/* Contact form popup — matches the site's dark theme (#121212 / #161616, accent #2c5dec) */
html.contact-open { overflow: hidden; }

.contact-modal {
    width: calc(100% - 32px);
    max-width: 560px;
    max-height: calc(100% - 32px);
    margin: auto;
    padding: 0;
    border: 1px solid #1d1d1d;
    border-radius: 0;
    background: #161616;
    color: #b1b1b1;
    font-family: Geomanist, Arial, Helvetica, sans-serif;
    box-shadow: 0 30px 80px rgba(0, 0, 0, .6);
    overflow: auto;
}

.contact-modal:not([open]) { display: none; }

/* Fallback for browsers without <dialog> support */
.contact-modal[open] {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 100000;
}

.contact-modal::backdrop { background: rgba(0, 0, 0, .8); }

.contact-modal-inner {
    position: relative;
    padding: 56px 48px 48px;
}

.contact-modal h2 {
    margin: 0 0 40px;
    color: #fff;
    font-family: Playfair, Geomanist, Arial, Helvetica, sans-serif;
    font-size: 30px;
    font-weight: 400;
    line-height: 1.3;
    text-align: center;
}

.contact-modal h2 .small {
    display: block;
    margin-bottom: 6px;
    color: #929292;
    font-family: Geomanist, Arial, Helvetica, sans-serif;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 3.5px;
    text-transform: uppercase;
}

.contact-modal .contact-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 40px;
    min-width: 0;
    height: 40px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    box-shadow: none;
    color: #929292;
    font-family: Geomanist, Arial, Helvetica, sans-serif;
    font-size: 28px;
    line-height: 40px;
    cursor: pointer;
}

.contact-modal .contact-close:before { display: none; }

.contact-modal .contact-close:hover,
.contact-modal .contact-close:focus-visible {
    background: transparent;
    color: #fff;
}

.contact-field { margin: 0 0 30px; }

.contact-field label {
    display: block;
    margin: 0 0 4px;
    color: #929292;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 3.5px;
    text-transform: uppercase;
}

.contact-modal .contact-field input,
.contact-modal .contact-field select,
.contact-modal .contact-field textarea {
    display: block;
    width: 100%;
    height: auto;
    padding: 6px 0;
    border: 0;
    border-bottom: 1px solid #373737;
    border-radius: 0;
    background: transparent;
    color: #fff;
    font-family: Playfair, Geomanist, Arial, Helvetica, sans-serif;
    font-size: 18px;
    font-weight: 400;
    line-height: 1.5;
    transition: border-color .2s ease;
}

.contact-modal .contact-field select {
    -webkit-appearance: none;
    appearance: none;
    padding-right: 24px;
    background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23929292' stroke-width='1.5'/%3E%3C/svg%3E") no-repeat right 4px center;
    cursor: pointer;
}

.contact-modal .contact-field select option { background: #161616; color: #fff; }

.contact-modal .contact-field textarea { min-height: 110px; resize: vertical; }

.contact-modal .contact-field input:focus,
.contact-modal .contact-field select:focus,
.contact-modal .contact-field textarea:focus {
    border-bottom-color: #2c5dec;
    outline: none;
}

/* Honeypot: hidden from people, visible to spam bots */
.contact-hp {
    position: absolute !important;
    left: -9999px !important;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* Same as the site's "Send Message" button (.link-b a) */
.contact-modal .contact-submit {
    display: block;
    position: relative;
    overflow: hidden;
    width: 100%;
    margin-top: 10px;
    padding: 12px 23px;
    border: 2px solid #2c5dec;
    border-radius: 25px;
    background: #121212;
    box-shadow: none;
    color: #2c5dec;
    font-family: Geomanist, Arial, Helvetica, sans-serif;
    font-size: 12px;
    font-weight: 700;
    text-align: center;
    text-transform: uppercase;
    cursor: pointer;
}

.contact-modal .contact-submit:hover,
.contact-modal .contact-submit:focus-visible {
    border-color: #2c5dec;
    background: #2c5dec;
    color: #121212;
}

.contact-modal .contact-submit[disabled] { opacity: .6; cursor: wait; }

.contact-status { min-height: 1.4em; margin: 16px 0 0; font-size: 14px; text-align: center; }
.contact-status.is-error { color: #e5675c; }

.contact-modal.is-sent #contact-modal-title { display: none; }
.contact-done { padding: 10px 0 0; text-align: center; }
.contact-done h2 { margin-bottom: 20px; }
.contact-done p { margin: 0 0 32px; color: #b1b1b1; font-size: 16px; }

@media (max-width: 480px) {
    .contact-modal-inner { padding: 48px 22px 28px; }
    .contact-modal h2 { font-size: 24px; }
}
