/* ============================================================
   BUILD WITH US — Contact Page
   ============================================================ */

/* ── Section ── */
.bwu-contact {
    padding: calc(var(--header-height) + 2rem) 0 clamp(var(--space-16), 6vw, var(--space-24));
    background: var(--color-white);
}

/* ── Section eyebrow label ── */
.bwu-lbl {
    display: block;
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #0a0e1a;
    margin-bottom: 1.25rem;
}

/* ── Full-width intro above the split ── */
.bwu-intro {
    margin-bottom: clamp(var(--space-10), 4vw, var(--space-12));
    max-width: 800px;
}

/* ── Two-column split ── */
.bwu-split {
    display: grid;
    grid-template-columns: 5fr 7fr;
    gap: clamp(var(--space-10), 5vw, var(--space-16));
    align-items: start;
}

/* ── Page title ── */
.bwu-title {
    font-family: var(--font-body);
    font-size: clamp(2.25rem, 5vw, 3.5rem);
    font-weight: 900;
    color: #0a0e1a;
    line-height: 1.08;
    letter-spacing: -0.04em;
    margin-bottom: 1.5rem;
}

.bwu-title__accent {
    color: var(--color-primary);
}

/* ── Lead paragraph ── */
.bwu-lead {
    font-size: 1.125rem;
    color: #1f2937;
    line-height: 1.7;
    margin-bottom: 0;
    max-width: 52ch;
}

/* ── Team photo ── */
.bwu-photo {
    border-radius: var(--radius-xl);
    overflow: hidden;
    margin-bottom: var(--space-8);
    aspect-ratio: 4 / 3;
}

.bwu-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ── Contact info blocks (Let's talk, jobs, etc.) ── */
.bwu-contact-blocks {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.bwu-contact-block {
    padding: var(--space-7) 0;
}

.bwu-contact-block:last-child {
    border-bottom: none;
}

.bwu-contact-block__title {
    font-family: var(--font-body);
    font-size: var(--text-xl);
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: var(--space-2);
}

.bwu-contact-block p {
    font-size: var(--text-sm);
    color: var(--color-text-muted);
    margin-bottom: var(--space-3);
    line-height: 1.6;
}

.bwu-contact-block__phone {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--text-lg);
    font-weight: 700;
    color: var(--color-text);
    text-decoration: none;
    margin-bottom: var(--space-2);
}

.bwu-contact-block__phone svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    color: var(--color-primary);
}

.bwu-contact-block__note {
    font-size: var(--text-xs) !important;
    color: var(--color-text-faint) !important;
    margin-bottom: 0 !important;
}

/* ── Right column ── */
.bwu-split__form {
    padding-top: var(--space-1);
}

.bwu-form-heading {
    font-family: var(--font-body);
    font-size: clamp(1.75rem, 2.8vw, 2.5rem);
    font-weight: 900;
    color: #0a0e1a;
    line-height: 1.08;
    letter-spacing: -0.04em;
    margin-bottom: var(--space-4);
}

.bwu-form-sub {
    font-size: var(--text-sm);
    color: var(--color-text-muted);
    line-height: 1.65;
    margin-bottom: var(--space-8);
    max-width: 54ch;
}

/* ── CF7 outer wrapper ── */
.bwu-split__form .wpcf7 {
    /* no extra styles needed */
}

/* ── Form fields grid ── */
.bwu-form-fields {
    display: grid;
    gap: var(--space-6);
}

/* CF7 autop injects <br> and <p> tags inside form groups — neutralise them */
.bwu-form-fields p {
    margin: 0;
    padding: 0;
}
.bwu-form-fields br {
    display: none;
}

/* ── Underline-style inputs ──
   Covers CF7's generated classes AND .bwu-input fallback.
   ── */
.bwu-form-fields .wpcf7-text,
.bwu-form-fields .wpcf7-email,
.bwu-form-fields .wpcf7-tel,
.bwu-form-fields .wpcf7-textarea,
.bwu-form-fields .wpcf7-select,
.bwu-input {
    width: 100%;
    padding: 9px 0;
    background: transparent;
    border: none;
    border-bottom: 1.5px solid var(--color-mist);
    border-radius: 0;
    font-family: var(--font-body);
    font-size: var(--text-base);
    color: var(--color-text);
    transition: border-color var(--transition-fast);
    appearance: none;
    display: block;
}

.bwu-form-fields .wpcf7-text:focus,
.bwu-form-fields .wpcf7-email:focus,
.bwu-form-fields .wpcf7-tel:focus,
.bwu-form-fields .wpcf7-textarea:focus,
.bwu-form-fields .wpcf7-select:focus,
.bwu-input:focus {
    outline: none;
    border-bottom-color: var(--color-primary);
    box-shadow: none;
}

.bwu-form-fields .wpcf7-text::placeholder,
.bwu-form-fields .wpcf7-email::placeholder,
.bwu-form-fields .wpcf7-tel::placeholder,
.bwu-form-fields .wpcf7-textarea::placeholder,
.bwu-input::placeholder {
    color: var(--color-stone);
}

.bwu-form-fields .wpcf7-textarea,
textarea.bwu-input {
    resize: vertical;
    min-height: 120px;
    line-height: 1.6;
}

/* Select: underline arrow + right padding */
.bwu-form-fields .wpcf7-select,
select.bwu-input {
    padding-right: 28px;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238a8780' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 2px center;
    background-size: 16px;
}

/* CF7 control-wrap: reset any inherited line-height that adds phantom space */
.bwu-form-fields .wpcf7-form-control-wrap {
    display: block;
    width: 100%;
    line-height: 1;
}

/* ── Field label ── */
.bwu-field-label {
    display: block;
    font-size: var(--text-sm);
    font-weight: 700;
    color: var(--color-text);
    letter-spacing: 0.01em;
    margin-bottom: var(--space-1);
}

/* ── Required field asterisk ── */
.bwu-field-label abbr[title="required"] {
    text-decoration: none;
    border-bottom: none;
    color: #e53e3e;
}

/* ── Service chips (CF7 checkbox as pill tags) ── */
.bwu-chips-label {
    display: block;
    font-size: var(--text-xs);
    color: var(--color-text-muted);
    margin-bottom: var(--space-3);
}

.bwu-form-fields .wpcf7-checkbox {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
}

.bwu-form-fields .wpcf7-checkbox .wpcf7-list-item {
    margin: 0;
}

.bwu-form-fields .wpcf7-checkbox .wpcf7-list-item label {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: 7px var(--space-4);
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius-full);
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--color-text-muted);
    cursor: pointer;
    user-select: none;
    transition:
        border-color var(--transition-fast),
        background var(--transition-fast),
        color var(--transition-fast);
}

.bwu-form-fields .wpcf7-checkbox .wpcf7-list-item label:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.bwu-form-fields .wpcf7-checkbox .wpcf7-list-item input[type="checkbox"] {
    display: none;
}

/* Checked chip state — requires :has() (all modern browsers) */
.bwu-form-fields .wpcf7-checkbox .wpcf7-list-item label:has(input:checked) {
    background: var(--color-primary-faint);
    border-color: var(--color-primary);
    color: var(--color-primary);
    font-weight: 700;
}

/* ── Phone row: country select + number input ── */
.bwu-phone-row {
    display: grid;
    grid-template-columns: 160px 1fr;
    gap: var(--space-4);
    align-items: end;
}

/* CF7 autop may wrap both fields in a <p> — dissolve it so spans become direct grid children */
.bwu-phone-row > p {
    display: contents;
}

.bwu-phone-row .wpcf7-form-control-wrap {
    width: 100%;
}

/* ── Submit button ── */
.bwu-form-fields [type="submit"].btn {
    margin-top: var(--space-2);
}

/* ── Inline validation error ── */
.bwu-form-fields .wpcf7-not-valid-tip {
    display: block;
    font-size: var(--text-xs);
    color: #b91c1c;
    margin-top: var(--space-1);
}

.bwu-form-fields .wpcf7-not-valid.bwu-input,
.bwu-form-fields .wpcf7-not-valid.wpcf7-text,
.bwu-form-fields .wpcf7-not-valid.wpcf7-email,
.bwu-form-fields .wpcf7-not-valid.wpcf7-tel,
.bwu-form-fields .wpcf7-not-valid.wpcf7-textarea {
    border-bottom-color: #b91c1c;
}

/* ── Response output ── */
.bwu-split__form .wpcf7-response-output {
    margin-top: var(--space-5);
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-sm);
    border-width: 1px;
    border-style: solid;
    font-size: var(--text-sm);
    font-weight: 600;
}

.bwu-split__form .wpcf7-mail-sent-ok {
    background: rgba(0, 102, 68, 0.08);
    border-color: rgba(0, 102, 68, 0.25);
    color: var(--color-primary-dark);
}

.bwu-split__form .wpcf7-mail-sent-ng,
.bwu-split__form .wpcf7-spam-blocked,
.bwu-split__form .wpcf7-aborted {
    background: rgba(185, 28, 28, 0.06);
    border-color: rgba(185, 28, 28, 0.20);
    color: #b91c1c;
}

.bwu-split__form .wpcf7-spinner {
    display: none !important;
}

/* ── Responsive: tablet ── */
@media (max-width: 1024px) {
    .bwu-split {
        grid-template-columns: 1fr 1.2fr;
    }
}

/* ── Responsive: mobile ── */
@media (max-width: 768px) {
    .bwu-intro {
        max-width: 100%;
    }

    .bwu-split {
        grid-template-columns: 1fr;
        gap: var(--space-12);
    }

    .bwu-split__form {
        padding-top: 0;
    }
}

@media (max-width: 480px) {
    .bwu-phone-row {
        grid-template-columns: 1fr;
    }
}

/* ============================================================
   OFFICE LOCATIONS SECTION
   ============================================================ */

.bwu-offices {
    padding: clamp(var(--space-20), 7vw, var(--space-24)) 0;
    background: var(--color-smoke);
}

.bwu-offices__heading {
    font-family: var(--font-body);
    font-size: clamp(1.75rem, 2.4vw, 2.5rem);
    font-weight: 800;
    color: var(--color-text);
    line-height: 1.25;
    letter-spacing: -0.02em;
    max-width: 680px;
    margin-bottom: clamp(var(--space-10), 3vw, var(--space-12));
}

/* ── Two-card grid ── */
.bwu-offices__grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-6);
}

/* ── Individual office card ── */
.bwu-office-card {
    background: var(--color-white);
    border-radius: var(--radius-xl);
    overflow: hidden;
    transition: box-shadow var(--transition-base), transform var(--transition-base);
}

.bwu-office-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-3px);
}

/* ── Card image — edge-to-edge, top corners clipped by card ── */
.bwu-office-card__img {
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: var(--color-mist);
}

.bwu-office-card__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.bwu-office-card:hover .bwu-office-card__img img {
    transform: scale(1.04);
}

/* ── Card text body ── */
.bwu-office-card__body {
    padding: 20px 24px 24px 24px;
}

.bwu-office-card__city {
    font-family: var(--font-body);
    font-size: var(--text-xl);
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: var(--space-2);
}

.bwu-office-card__address {
    font-size: var(--text-sm);
    color: var(--color-text-muted);
    line-height: 1.6;
    margin: 0;
}

/* ── Responsive ── */
@media (max-width: 640px) {
    .bwu-offices__grid {
        grid-template-columns: 1fr;
    }
}
