/* ==========================================================================
   EDGE IT! (services) page
   ========================================================================== */

body::before {
    background-image:
        linear-gradient(rgba(10, 10, 11, 0.72), rgba(10, 10, 11, 0.97)),
        url('../images/bg/services.jpg');
}

#projects--container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 400px), 1fr));
    gap: clamp(1rem, 2.5vw, 1.75rem);
    margin-top: clamp(2.5rem, 6vw, 4rem);
}

.project--card {
    container-type: inline-size;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius-card);
    background-color: var(--surface);
}

.project--layout {
    display: grid;
    grid-template-rows: auto 1fr; /* extra height goes to the text, not the video */
    height: 100%;
}

.project--card video {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    background-color: #000;
}

.info {
    padding: clamp(1.25rem, 4cqi, 1.9rem);
}

.project--title {
    font-family: var(--font-display);
    font-size: clamp(1.15rem, 0.6vw + 1rem, 1.35rem);
    font-weight: 500;
    line-height: 1.3;
    color: var(--text);
    text-wrap: balance;
}

.project--desc {
    margin-top: 0.75rem;
    font-size: 0.98rem;
    line-height: 1.7;
    color: var(--text-muted);
    text-wrap: pretty;
}

/* A card that is wide but on its own row (tablets) puts the video beside the text */
@container (min-width: 620px) {
    .project--layout {
        grid-template-columns: 2fr 3fr;
        grid-template-rows: auto;
    }

    .project--card video {
        height: 100%;
        aspect-ratio: auto;
    }

    .info {
        align-self: center;
    }
}
