/* ==========================================================================
   Career page
   Ruled blocks and a full-bleed team strip, matching the service pages.
   Section headers come from `.section-head` in the design system
   (`.section-intro` is an alias of it).
   ========================================================================== */

.career-content-section {
    padding-block: var(--section-y) 0;
    background-color: var(--surface-subtle);
}

/* Section mastheads -------------------------------------------------------
   The same composition as the goals page: a hairline rule, the heading on
   the first track and the standfirst across the remaining two, aligned on a
   shared baseline so the header sits on the grid of the blocks below it.
   -------------------------------------------------------------------------- */

.career-content-section .section-intro {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    column-gap: clamp(24px, 4vw, 56px);
    row-gap: var(--space-4);
    align-items: baseline;
    margin-bottom: clamp(36px, 3.6vw, 52px);
    padding-top: var(--space-8);
    /* A seam rather than the design system's 2px band, which read as a
       stripe when the page repeats it three times. */
    border-top: 1px solid rgba(220, 38, 38, 0.45);
}

.career-content-section .section-intro > p {
    grid-column: 2 / -1;
    max-width: none;
    padding-bottom: 0;
    color: var(--muted);
    font-size: var(--text-md);
    line-height: var(--leading-normal);
}

/* Benefits ---------------------------------------------------------------- */

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(24px, 4vw, 56px);
    margin-bottom: clamp(48px, 5.5vw, 76px);
}

.benefit-card {
    position: relative;
    padding: var(--space-6) 0 0;
    text-align: left;
    background: none;
    border: none;
    border-top: 1px solid var(--line);
    border-radius: 0;
}

/* A short brand tick at the head of each rule, as on the goals columns. */
.benefit-card::before {
    content: '';
    position: absolute;
    top: -2px;
    left: 0;
    width: 44px;
    height: 2px;
    background-color: var(--primary-color);
}

/* Sized to the glyph and flush left, so the icon, title and body all start
   on the same edge as the rule above them. */
.benefit-icon {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: auto;
    height: auto;
    margin: 0 0 var(--space-4);
    border: none;
    border-radius: 0;
    background: none;
    color: var(--primary-color);
    font-size: 1.125rem;
    line-height: 1;
}

.benefit-card h3 {
    margin-bottom: var(--space-2);
    color: var(--ink);
    font-size: var(--text-lg);
    font-weight: 600;
    letter-spacing: var(--tracking-tight);
}

.benefit-card p {
    color: var(--muted);
    font-size: var(--text-base);
    line-height: var(--leading-normal);
}

/* Team strip --------------------------------------------------------------
   Full-bleed, like the project galleries on the service pages. `50%` resolves
   against the container's content box, so the strip centres on the viewport;
   the half-scrollbar overhang is clipped by `body { overflow-x: hidden }`.
   -------------------------------------------------------------------------- */

.team-showcase-section,
.team-showcase {
    margin-bottom: clamp(48px, 5.5vw, 76px);
}

.team-gallery {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2px;
    width: 100vw;
    margin: var(--space-10) 0 0;
    margin-inline: calc(50% - 50vw);
}

.gallery-item {
    position: relative;
    height: clamp(240px, 26vw, 380px);
    overflow: hidden;
    border: none;
    border-radius: 0;
    background-color: var(--surface-sunken);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--dur-slow) var(--ease);
}

.gallery-item:hover img {
    transform: scale(1.03);
}

/* Caption stays visible so the information is not hover-only. */
.gallery-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-end;
    background: linear-gradient(to top, rgba(10, 12, 16, 0.88) 0%, rgba(10, 12, 16, 0.1) 55%, rgba(10, 12, 16, 0) 100%);
}

.overlay-content {
    width: 100%;
    padding: var(--space-5);
    color: #fff;
}

.overlay-content h4 {
    margin-bottom: var(--space-1);
    font-size: var(--text-md);
    font-weight: 600;
    color: #fff;
}

.overlay-content p {
    margin-bottom: 0;
    color: rgba(255, 255, 255, 0.75);
    font-size: var(--text-sm);
    line-height: var(--leading-snug);
}

/* Job openings ------------------------------------------------------------ */

.job-openings-section {
    margin-top: clamp(48px, 5.5vw, 76px);
}

.job-openings-section h3 {
    margin-bottom: var(--space-6);
    padding-top: var(--space-8);
    border-top: 1px solid rgba(220, 38, 38, 0.45);
    font-size: var(--h3);
    color: var(--ink);
}

.job-table-container {
    margin-bottom: 0;
}

.job-table td:last-child,
.job-table th:last-child {
    text-align: right;
    width: 1%;
}

/* Closing CTA -------------------------------------------------------------
   Full-bleed light band closing the page, as on the service pages.
   -------------------------------------------------------------------------- */

.cta-box {
    width: 100vw;
    margin-block: var(--section-y) 0;
    margin-inline: calc(50% - 50vw);
    padding: clamp(48px, 6vw, 88px) var(--gutter);
    text-align: center;
    background-color: var(--surface-sunken);
    border-top: 1px solid var(--line);
    border-radius: 0;
    color: var(--body);
}

.cta-box h3 {
    margin-bottom: var(--space-3);
    font-size: var(--h2);
    color: var(--ink);
}

.cta-box p {
    max-width: 56ch;
    margin: 0 auto var(--space-8);
    font-size: var(--text-md);
    line-height: var(--leading-normal);
}

.cta-box .btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
}

.cta-box .btn-primary:hover {
    background-color: var(--primary-hover);
    border-color: var(--primary-hover);
}

/* The masthead stacks before the grids do: the standfirst needs a full
   measure well before three tracks become uncomfortable. */
@media (max-width: 860px) {
    .career-content-section .section-intro {
        grid-template-columns: 1fr;
        align-items: start;
        padding-top: var(--space-6);
    }

    .career-content-section .section-intro > p {
        grid-column: 1;
        max-width: 62ch;
    }
}

@media (max-width: 991px) {
    .benefits-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        row-gap: var(--space-8);
        margin-bottom: clamp(48px, 5.5vw, 64px);
    }
}

@media (max-width: 700px) {
    .benefits-grid,
    .team-gallery {
        grid-template-columns: 1fr;
    }

    .benefits-grid {
        margin-bottom: var(--space-12);
    }

    .gallery-item {
        height: clamp(220px, 56vw, 300px);
    }

    .job-openings-section,
    .team-showcase-section {
        margin-top: var(--space-12);
        margin-bottom: var(--space-12);
    }
}
