/* Contact Page – production-matched layout (circular office image left, text right) */

.contact-section {
    padding: 160px 0 var(--spacing-xl);
    min-height: 100vh;
}

.contact-wrapper {
    max-width: var(--container-max-width);
    margin: 0 auto;
}

.contact-card {
    display: grid;
    grid-template-columns: 360px 1fr;
    gap: var(--spacing-xl);
    align-items: start;
}

.contact-image {
    width: 360px;
    height: 360px;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
}

.contact-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.contact-content {
    padding: var(--spacing-sm) 0;
    max-width: 620px;
}

.contact-title {
    color: #46587D;
    font-size: 1.3rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: var(--spacing-sm);
}

.contact-divider {
    border: none;
    height: 2px;
    background: #7FC4DD;
    margin: var(--spacing-xs) 0 var(--spacing-md);
    width: 100%;
}

.location-title {
    color: #46587D;
    font-size: 1.15rem;
    font-weight: 700;
    margin: var(--spacing-md) 0 var(--spacing-xs);
}

.contact-content p {
    font-size: 1rem;
    line-height: 1.8;
    margin-bottom: var(--spacing-md);
    color: var(--color-text-dark);
}

.contact-content a {
    color: var(--color-primary);
    font-weight: 600;
}

.linkedin-section {
    margin: var(--spacing-md) 0;
}

.linkedin-section a {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-sm);
    color: var(--color-primary);
    font-weight: 600;
}

@media (max-width: 768px) {
    .contact-section {
        padding: 110px 0 var(--spacing-lg);
    }
    .contact-card {
        grid-template-columns: 1fr;
        justify-items: center;
        text-align: center;
        gap: var(--spacing-lg);
    }
    .contact-image {
        width: 240px;
        height: 240px;
    }
    .contact-content {
        text-align: left;
    }
}

/* ============================================================
   CONTACT — RECONCILED TO LIVE (measured @1707x842)
     grey panel   x578 y160 w537 h1040
     office photo x378 y140 320x320, overhanging the panel's left edge
     text column  x768 w347
     HEAD OFFICE  y229 19.2/700   Oakville y273 16/700 Title Case
     phone        y386 16/400
     OFFICE LOCATIONS y537, Pickering y581, Cambridge y710, London y839
   ============================================================ */
.contact-section {
    padding: 160px 0 var(--spacing-xl);
    min-height: 0;
}

.contact-wrapper {
    max-width: none;
}

.contact-card {
    position: relative;
    display: block;
    grid-template-columns: none;
    width: 537px;
    max-width: 100%;
    margin: 0 auto;
    padding: 69px 0 0 190px;
    min-height: 1040px;
    background: #F6F7F9;
    gap: 0;
}

.contact-image {
    position: absolute;
    left: -200px;
    top: -20px;
    width: 320px;
    height: 320px;
    box-shadow: none;
}

.contact-content {
    padding: 0;
    max-width: 347px;
}

.contact-title {
    color: var(--color-primary);
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: normal;
    line-height: 1.6;
    margin: 0;
}

.contact-divider {
    margin: 4px 0 8px;
}

.location-title {
    color: var(--color-primary);
    font-size: 1rem;
    font-weight: 700;
    text-transform: none;
    line-height: 1.6;
    margin: 0;
}

.contact-content p {
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.8;
    margin: 0 0 var(--spacing-md);
    color: var(--color-primary);
}

.contact-content a {
    font-weight: 400;
}

@media (max-width: 768px) {
    .contact-card {
        width: auto;
        padding: 40px 16px;
        min-height: 0;
    }

    .contact-image {
        position: static;
        width: 240px;
        height: 240px;
        margin: 0 auto var(--spacing-lg);
    }

    .contact-content {
        max-width: none;
        text-align: left;
    }
}

/* second pass — live's exact box model for the contact column:
     H1 19.2/700 lh1.6 margin 12.864
     the rule between the heading and the city is a zero-height spacer
       on live, not a visible divider
     city H2 16/700 lh1.6 with 20px of padding above, margin 13.28
     paragraphs 16/400 on 1.6 leading with 16px margins */
.contact-card {
    padding-top: 56.14px;
}

.contact-title {
    margin: 12.864px 0;
    line-height: 1.6;
}

.contact-divider {
    height: 0;
    border: 0;
    background: none;
    margin: 0;
}

.location-title {
    padding: 20px 0 0;
    margin: 13.28px 0;
    line-height: 1.6;
}

.contact-content p {
    line-height: 1.6;
    margin: 16px 0;
}

/* the divider element stops the heading and city margins collapsing the
   way they do on live, so the city carries no top margin of its own */
.location-title {
    margin-top: 0;
}

/* live's second heading sits 13px lower than a plain 12.864 margin gives,
   so the margin is carried on the heading and taken back off the panel */
.contact-card {
    padding-top: 43.14px;
}

.contact-title {
    margin-top: 25.86px;
}

/* ============================================================
   CONTACT ON PHONES
   The panel goes full width with the photo above the text, and the
   type steps down to live's phone sizes.
   ============================================================ */
@media (max-width: 768px) {
    .contact-title {
        font-size: 1.2rem;
        margin: 15.94px 0;
    }

    .location-title {
        font-size: 1rem;
        padding-top: 16px;
    }

    .contact-content p {
        font-size: 0.8rem;
        line-height: 1.8;
    }
}

/* the 578-767 tier */
@media (min-width: 578px) and (max-width: 767px) {
    .contact-title {
        font-size: 1.5rem;
    }

    .contact-content p {
        font-size: 1rem;
    }
}

/* ------------------------------------------------------------------
   Office photo — always a full circle  (v13)

   Reported on QA: the photograph rendered as a dome, rounded on top and
   cut off flat across the middle. That is what a circular mask does
   when the <img> inside it is shorter than the mask: the base rule
   gives the image height:100%, but a source photograph that is not
   square — or any rule that lets height fall back to auto — leaves the
   bottom half of the circle empty. Pinning the height on the image and
   giving the frame a 1:1 aspect ratio makes the circle complete
   whatever the source file's proportions are.
   ------------------------------------------------------------------ */
.contact-card .contact-image {
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: 50%;
}

.contact-card .contact-image img {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 100%;
    object-fit: cover;
    object-position: center;
}
