/* ==========================================================================
   Contact
   Ports + project brief, then "what happens next".
   The form markup comes from [contact_form_shortcode]
   (lib/functions/functions-shortcodes.php); it is styled here, not changed.
   ========================================================================== */

.cwx-contact {
    position: relative;
    margin-top: calc(-1 * var(--cwx-hdr));
    padding: calc(var(--cwx-hdr) + 100px) 0 130px;
    background:
        radial-gradient(70% 60% at 85% 30%, rgba(69, 249, 171, .06), transparent 70%),
        var(--cwx-board);
    color: var(--cwx-silk);
}
.cwx-contact__grid {
    display: grid;
    grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr);
    gap: 56px 80px;
    align-items: start;
}
.cwx-contact__intro .cwx-h1 { color: #fff; }
.cwx-contact__intro .cwx-lead { margin-top: 26px; }

/* ---------------------------------- Ports -------------------------------- */

.cwx-ports { display: grid; gap: 12px; margin: 48px 0 0; padding: 0; list-style: none; }
.cwx-ports li { padding: 0; }
.cwx-port {
    display: grid;
    grid-template-columns: 40px 38px minmax(0, 1fr) 10px;
    align-items: center;
    gap: 14px;
    padding: 18px 20px 18px 0;
    background: rgba(232, 238, 243, .03);
    border: 1px solid var(--cwx-line);
    color: var(--cwx-silk);
    text-decoration: none;
    clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 0 100%);
    transition: background .3s, border-color .3s;
}
.cwx-port:hover, .cwx-port:focus-visible { background: rgba(69, 249, 171, .06); border-color: rgba(69, 249, 171, .4); color: var(--cwx-silk); }

/* Three pins that slide home on hover. */
.cwx-port__plug {
    display: grid;
    gap: 5px;
    justify-items: end;
    transform: translateX(-10px);
    transition: transform .45s var(--cwx-ease);
}
.cwx-port__plug i { display: block; width: 22px; height: 3px; background: var(--cwx-mute); transition: background .3s; }
.cwx-port:hover .cwx-port__plug { transform: translateX(0); }
.cwx-port:hover .cwx-port__plug i { background: var(--cwx-mint); }

.cwx-port__ref {
    padding: 3px 0;
    border: 1px solid var(--cwx-mute);
    font-family: var(--cwx-mono);
    font-size: 10.5px;
    text-align: center;
    color: var(--cwx-mute);
}
.cwx-port__txt { display: grid; gap: 2px; min-width: 0; }
.cwx-port__txt small { font-family: var(--cwx-mono); font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--cwx-mute); }
.cwx-port__txt b { font-weight: 500; font-size: 1.08rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cwx-port__led { width: 8px; height: 8px; border-radius: 50%; background: #2c3a4b; transition: background .3s, box-shadow .3s; }
.cwx-port:hover .cwx-port__led { background: var(--cwx-mint); box-shadow: 0 0 10px var(--cwx-mint); }

/* ---------------------------------- Brief -------------------------------- */

.cwx-brief {
    position: relative;
    padding: 30px 40px 40px;
    background: var(--cwx-paper);
    color: var(--cwx-ink);
    clip-path: polygon(0 0, calc(100% - 30px) 0, 100% 30px, 100% 100%, 0 100%);
}
.cwx-brief__head {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px 20px;
    padding-bottom: 14px;
    border-bottom: 2px solid var(--cwx-ink);
}
.cwx-brief__head .cwx-silk { color: var(--cwx-ink-2); font-size: 10.5px; }
.cwx-brief__title { margin: 28px 0 6px; }

/* The shortcode prints its own heading; the brief has one already. */
.cwx-brief .contact-form-container > h3 { display: none; }
.cwx-brief .contact-form-container { margin: 0; padding: 0; background: none; box-shadow: none; }

.cwx-brief .contact-form { position: relative; margin: 0; }
.cwx-brief .contact-form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0 28px;
    margin: 0;
}

.cwx-brief .contact-form input[type="text"],
.cwx-brief .contact-form input[type="email"],
.cwx-brief .contact-form select,
.cwx-brief .contact-form textarea {
    display: block;
    width: 100%;
    margin: 14px 0 0;
    padding: 18px 0 12px;
    background: transparent;
    border: 0;
    border-bottom: 1.5px solid rgba(13, 21, 34, .28);
    border-radius: 0;
    box-shadow: none;
    color: var(--cwx-ink);
    font-family: var(--cwx-body);
    font-size: 16px;
    line-height: 1.4;
    outline: none;
    transition: border-color .3s, box-shadow .3s;
}
.cwx-brief .contact-form textarea { min-height: 150px; resize: vertical; }
.cwx-brief .contact-form ::placeholder {
    font-family: var(--cwx-mono);
    font-size: 12px;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: #6b7889;
    opacity: 1;
}
.cwx-brief .contact-form select {
    -webkit-appearance: none;
    appearance: none;
    padding-right: 30px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5' fill='none' stroke='%230d1522' stroke-width='1.6'/%3E%3C/svg%3E") right 4px center / 12px 8px no-repeat;
    cursor: pointer;
}
.cwx-brief .contact-form select:invalid { font-family: var(--cwx-mono); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: #6b7889; }
.cwx-brief .contact-form select option { color: var(--cwx-ink); font-family: var(--cwx-body); font-size: 15px; letter-spacing: 0; text-transform: none; }

/* Locked promo code carried over from the floating voucher. */
.cwx-brief .contact-form-promo { position: relative; }
.cwx-brief .contact-form-promo::before {
    content: "Promo code";
    position: absolute;
    left: 0;
    top: 4px;
    font-family: var(--cwx-mono);
    font-size: 10px;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: #0a8f6a;
}
.cwx-brief .contact-form input[readonly] {
    font-family: var(--cwx-mono);
    font-weight: 700;
    letter-spacing: .12em;
    color: #0a8f6a;
    border-bottom-style: dashed;
    border-bottom-color: #0a8f6a;
    cursor: default;
}
.cwx-brief .contact-form input[readonly]:focus { box-shadow: none; }

.cwx-brief .contact-form input:focus,
.cwx-brief .contact-form select:focus,
.cwx-brief .contact-form textarea:focus {
    border-bottom-color: #0a8f6a;
    box-shadow: 0 1.5px 0 #0a8f6a;
}

.cwx-brief .contact-form button[type="submit"] {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    margin-top: 32px;
    padding: 19px 24px;
    border: 0;
    border-radius: 0;
    background: var(--cwx-ink);
    color: #fff;
    font-family: var(--cwx-body);
    font-size: 15px;
    font-weight: 600;
    letter-spacing: .01em;
    cursor: pointer;
    clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
    transition: background .3s, color .3s;
}
.cwx-brief .contact-form button[type="submit"]::after { content: '\2192'; font-size: 18px; transition: transform .35s var(--cwx-ease); }
.cwx-brief .contact-form button[type="submit"]:hover { background: var(--cwx-mint); color: var(--cwx-ink); }
.cwx-brief .contact-form button[type="submit"]:hover::after { transform: translateX(5px); }

.cwx-brief .cwx-recaptcha-note { color: var(--cwx-ink-2); }

/* The success note is styled inline by the shortcode; bring it on-brand. */
.cwx-brief .thank-you-message {
    margin: 24px 0 0 !important;
    padding: 22px 22px 22px 54px !important;
    position: relative;
    background: var(--cwx-ink) !important;
    border: 0 !important;
    border-radius: 0 !important;
    color: #fff !important;
    font-size: 15px;
    line-height: 1.6;
}
.cwx-brief .thank-you-message::before {
    content: '';
    position: absolute;
    left: 22px;
    top: 50%;
    width: 14px;
    height: 14px;
    margin-top: -7px;
    border-radius: 50%;
    background: var(--cwx-mint);
    box-shadow: 0 0 12px var(--cwx-mint);
}

/* ------------------------------ What happens next ------------------------ */

.cwx-next {
    padding: 130px 0 140px;
    background: var(--cwx-paper);
    color: var(--cwx-ink);
}
.cwx-next__list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 40px;
    margin: 56px 0 0;
    padding: 0;
    list-style: none;
}
.cwx-next__list li { position: relative; padding: 44px 0 0; }
/* One trace through all three vias. */
.cwx-next__list li::before {
    content: '';
    position: absolute;
    top: 7px;
    left: 16px;
    right: -40px;
    height: 2px;
    background: var(--cwx-ink);
}
.cwx-next__list li:last-child::before { right: 0; }
.cwx-next__via {
    position: absolute;
    top: 0;
    left: 0;
    width: 16px;
    height: 16px;
    border: 2.5px solid var(--cwx-ink);
    border-radius: 50%;
    background: var(--cwx-paper);
}
.cwx-next__list li:first-child .cwx-next__via { background: #0a8f6a; border-color: #0a8f6a; }
.cwx-next__list h3 { margin: 0 0 10px; font-family: var(--cwx-display); font-size: 1.25rem; font-weight: 500; letter-spacing: -.02em; }
.cwx-next__list p { margin: 0; color: var(--cwx-ink-2); line-height: 1.65; max-width: 30em; }

@media (max-width: 960px) {
    .cwx-contact { padding-top: calc(var(--cwx-hdr) + 64px); padding-bottom: 90px; }
    .cwx-contact__grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
    .cwx-next { padding: 100px 0; }
    .cwx-next__list { grid-template-columns: 1fr; gap: 0; }
    .cwx-next__list li { padding: 0 0 40px 44px; }
    .cwx-next__list li::before { top: 16px; bottom: 0; left: 7px; right: auto; width: 2px; height: auto; }
    .cwx-next__list li:last-child::before { display: none; }
}
@media (max-width: 520px) {
    .cwx-brief { padding: 24px 22px 30px; }
}
