/* "Our corporate projects" — fig 7035:6607. Centred head, a grid of project
   cards, one dark button under them. */

/* Every card in the three-column frames measures 461, including the rows whose
   copy is shorter, so the rows take the tallest card rather than their own. */
.corp-projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: 1fr;
    gap: 25px;
    margin-top: 50px;
}

.corp-projects-cta {
    display: flex;
    justify-content: center;
    margin-top: 50px;
}

.corp-project {
    display: flex;
    flex-direction: column;
    gap: 20px;
    border-radius: 23px;
    background: var(--corp-canvas);
    box-shadow: 4px 4px 14px 4px rgba(0, 0, 0, .04);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
}

.corp-project-media {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-end;
    height: 250px;
    padding: 16px;
}

.corp-project-photo {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.corp-project-size,
.corp-project-chips {
    position: relative;
}

.corp-project-size {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 35px;
    height: 35px;
    border-radius: 46px;
    background: rgba(23, 27, 28, .75);
    backdrop-filter: blur(2.5px);
    -webkit-backdrop-filter: blur(2.5px);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    line-height: normal;
}

.corp-project-chips {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    width: 100%;
}

.corp-project-chip {
    padding: 10px 16px;
    border-radius: 40px;
    background: rgba(23, 27, 28, .75);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    line-height: normal;
}

.corp-project-body {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 20px;
    flex: 1 1 auto;
    padding: 0 16px 20px;
}

.corp-project-text {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.corp-project-title {
    margin: 0;
    font-family: "Unbounded", sans-serif;
    font-size: 18px;
    font-weight: 600;
    line-height: normal;
    color: var(--corp-ink);
}

.corp-project-excerpt {
    /* three lines and an ellipsis: project intros run longer than the frame's
       card, and the row's cards have to end on the same button line */
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    overflow: hidden;
    margin: 0;
    font-size: 16px;
    font-weight: 400;
    /* Figma lays 16px Montserrat on 20; the browser's normal loses a pixel a
       line, and three lines of it shortens the whole card */
    line-height: 20px;
    color: var(--corp-muted);
}

.corp-project-more {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    /* the frame draws the pill 42 tall with its 1.5 stroke inside; the browser
       lays that stroke down as 1px at DPR 1, so the padding carries the rest */
    padding: 9px 20px;
    border: 1.5px solid var(--corp-ink);
    border-radius: 12px;
    color: var(--corp-ink);
    font-size: 18px;
    font-weight: 600;
    line-height: 22px;
}

.corp-project-more img {
    width: 20px;
    height: 20px;
}

.corp-project:hover .corp-project-more,
.corp-project:focus-visible .corp-project-more {
    background: var(--corp-ink);
    color: #fff;
}

/* the arrow is an ink-coloured export, so it has to flip with the fill */
.corp-project:hover .corp-project-more img,
.corp-project:focus-visible .corp-project-more img {
    filter: invert(1) brightness(2);
}

@media (max-width: 1470px) {
    .corp-projects-grid {
        gap: 20px;
    }
}

/* both narrow mocks give each card the full column, and draw four of them */
@media (max-width: 1199px) {
    .corp-projects-grid {
        grid-template-columns: 1fr;
        /* one column: both narrow frames let each card take its own height */
        grid-auto-rows: auto;
    }

    .corp-projects-grid > :nth-child(n+5) {
        display: none;
    }
}

@media (max-width: 767px) {
    .corp-projects-grid {
        gap: 16px;
        margin-top: 20px;
    }

    .corp-projects-cta {
        margin-top: 20px;
    }

    /* the phone frame keeps the desktop type and only tightens the corner */
    .corp-project {
        border-radius: 16px;
    }
}
