/*
 * Bespoke Selections - Contact Us page
 * banner image / "Let's talk" intro / details on the left, enquiry form on the right
 */

.contact-page {
    --contact-edge: max(24px, calc((100vw - 1560px) / 2), 4vw);
    --contact-line: #4B4E53;
    color: #4B4E53;
}

/* banner - starts below the fixed header */
.contact-banner {
    margin: 0;
    padding-top: 100px;
}

.contact-banner img {
    display: block;
    width: 100%;
    height: clamp(240px, 32vw, 620px);
    object-fit: cover;
    object-position: center 55%;
}

/* intro row */
.contact-intro {
    display: grid;
    /* same columns as the details/form row, so the text starts where the form does */
    grid-template-columns: minmax(240px, 1fr) minmax(0, 2.1fr);
    gap: 24px 0;
    align-items: center;
    padding: clamp(36px, 3.4vw, 60px) var(--contact-edge);
    border-bottom: 1px solid var(--contact-line);
}

.contact-intro h1 {
    margin: 0;
    font-family: var(--font-headline);
    font-weight: 400;
    font-size: clamp(32px, 3vw, 50px);
    line-height: 1.1;
    letter-spacing: 0.01em;
    text-transform: uppercase;
    color: #8A7E2D;
}

.contact-intro p {
    max-width: calc(620px + clamp(24px, 3vw, 56px));
    margin: 0;
    padding-left: clamp(24px, 3vw, 56px);
    font-size: 17px;
    font-weight: 500;
    line-height: 1.6;
}

/* details + form */
.contact-body {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) minmax(0, 2.1fr);
    padding: clamp(36px, 3vw, 56px) var(--contact-edge) clamp(36px, 3vw, 56px);
}

.contact-details {
    padding-right: clamp(24px, 3vw, 56px);
    margin-bottom: 70px;   /* divider stops short of the button */
    border-right: 1px solid var(--contact-line);
    font-size: 17px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.contact-details p {
    margin: 0 0 30px;
    line-height: 1.6;
}

.contact-details p:last-child {
    margin-bottom: 0;
}

.contact-company {
    font-weight: 500;
}

/* short gold rule under the company name */
.contact-company::after {
    content: "";
    display: block;
    width: 70px;
    height: 2px;
    margin-top: 22px;
    background-color: #8A7E2D;
}

.contact-label {
    display: block;
    font-weight: 500;
}

.contact-details a {
    color: #4B4E53;
    text-decoration: none;
}

.contact-details a.contact-email {
    color: #8A7E2D;
    text-transform: none;
    letter-spacing: 0.02em;
}

.contact-details a:hover {
    color: #8A7E2D;
    text-decoration: underline;
}

/* form */
.contact-form {
    padding-left: clamp(24px, 3vw, 56px);
}

.cf-field {
    display: block;
    margin: 0 0 20px;
    padding: 4px 10px 1px;
    border: 1px solid var(--contact-line);
    background-color: #fff;
    cursor: text;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.cf-field:focus-within {
    border-color: #8A7E2D;
    box-shadow: 0 0 0 1px #8A7E2D;
}

.cf-field span {
    display: block;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.03em;
    color: #4B4E53;
}

.cf-field input,
.cf-field textarea {
    display: block;
    width: 100%;
    margin: 0;
    padding: 0 0 2px;
    border: none;
    background: transparent;
    font-family: var(--font-body);
    font-size: 16px;
    color: #4B4E53;
    outline: none;
    box-shadow: none;
}

.cf-field textarea {
    min-height: 96px;
    resize: vertical;
}

.cf-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 20px;
    flex-wrap: wrap;
}

.cf-status {
    margin: 0;
    font-size: 15px;
}

.cf-status.is-error {
    color: #A23B2A;
}

.cf-submit:disabled {
    opacity: 0.6;
    cursor: wait;
}

/* spam trap: a field people never see */
.cf-hp {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* Cloudflare security check: only takes room when it asks the visitor to tick a box */
.cf-captcha {
    display: flex;
    justify-content: flex-end;
}

.cf-captcha:empty {
    display: none;
}

.cf-submit {
    display: inline-block;
    padding: 10px 66px 10px 20px;   /* text sits a little left of centre */
    border: 2px solid #000;
    background-color: #7F7D4F;
    color: #fff;
    font-family: var(--font-body);
    font-size: 16px;
    font-weight: 800;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: background-color 0.25s ease;
}

.cf-submit:hover,
.cf-submit:focus-visible {
    background-color: #4B4E53;
}

/* tablets: intro and body stack */
@media (max-width: 991.98px) {
    .contact-intro {
        grid-template-columns: minmax(0, 1fr);
    }

    .contact-intro p {
        padding-left: 0;
    }

    .contact-body {
        grid-template-columns: minmax(0, 1fr);
    }

    .contact-details {
        margin-bottom: 0;
        padding: 0 0 36px;
        border-right: none;
        border-bottom: 1px solid var(--contact-line);
    }

    .contact-form {
        padding: 36px 0 0;
    }
}

@media (max-width: 575.98px) {
    .contact-banner {
        padding-top: 75px;
    }

    .cf-actions {
        justify-content: stretch;
    }

    .cf-submit {
        width: 100%;
    }
}
