/* Activity pages (views/partials/page/activity.handlebars): a wide photo, the text on a cream
   card that overlaps its bottom edge, then a gallery of the other photos, all on the site's
   green. Text never sits on a photo, and the card grows with its text. */

.act {
    --act-green: #2d5432;  /* the site's green (home page, footer) */
    --act-deep: #1c4022;
    --act-cream: #f6f1e7;
    --act-brown: #6b5434;
    font-family: 'Readex Pro', sans-serif;
    background: var(--act-green);
}

.act-hero {
    --hero-h: min(62vh, 620px);
    height: var(--hero-h);
    position: relative;
    overflow: hidden;
}

.act-hero img,
.act-gallery img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border: 0;
}

/* A 16:9 background video, cropped to fill the band like a photo. */
.act-video {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: max(100%, calc(var(--hero-h) * 16 / 9));
    height: max(56.25vw, var(--hero-h));
    border: 0;
}

/* About 70 characters a line at 18px. */
.act-text {
    position: relative;
    max-width: 800px;
    margin: -96px auto 56px;
    padding: 56px 64px 48px;
    background: var(--act-cream);
    color: var(--act-deep);    /* 10.3:1 */
    box-shadow: 0 24px 60px rgba(0, 0, 0, .25);
}

.act-title {
    font-family: 'Readex Pro', sans-serif;
    font-weight: 300;
    font-size: clamp(30px, 3.2vw, 46px);
    line-height: 1.15;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--act-green);   /* 7.7:1 */
    margin: 0 0 28px;
}

.act-lead p,
.act-body p,
.act-body li {
    font-size: 18px;
    line-height: 1.7;
    margin: 0 0 1em;
}

.act-body h2 {
    font-family: 'Readex Pro', sans-serif;
    font-size: 20px;
    font-weight: 500;
    line-height: 1.4;
    color: var(--act-brown);   /* 6.3:1 */
    margin: 36px 0 12px;
}

.act-body ul {
    padding-left: 1.2em;
    margin: 0 0 1em;
}

.act-body li {
    margin-bottom: .4em;
}

.act-body li::marker {
    color: var(--act-brown);
}

.act-note {
    font-style: italic;
}

.act-button {
    display: inline-block;
    margin-top: 20px;
    padding: 12px 32px;
    border: 1px solid var(--act-green);
    color: var(--act-green);
    font-size: 15px;
    font-weight: 500;
    letter-spacing: .08em;
    text-transform: uppercase;
    text-decoration: none;
    transition: background-color .2s, color .2s;
}

.act-button:hover,
.act-button:focus-visible {
    background: var(--act-green);
    color: var(--act-cream);
}

/* Three photos a row; a last row of one or two photos fills the width. */
.act-gallery {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 16px;
    list-style: none;
    margin: 0;
    padding: 0 clamp(16px, 4vw, 56px) 56px;
}

.act-gallery li {
    grid-column: span 2;
    aspect-ratio: 4 / 3;
    overflow: hidden;
}

.act-gallery li:nth-child(3n+1):last-child {
    grid-column: span 6;
    aspect-ratio: 21 / 9;
}

.act-gallery li:nth-child(3n+1):nth-last-child(2),
.act-gallery li:nth-child(3n+2):last-child {
    grid-column: span 3;
}

@media (max-width: 900px) {
    .act-hero {
        --hero-h: 66vw;
    }

    .act-text {
        margin: -40px 8px 12px;
        padding: 28px 20px;
    }

    .act-lead p,
    .act-body p,
    .act-body li {
        font-size: 17px;
    }

    /* Two photos a row; an odd last photo fills the width. */
    .act-gallery {
        gap: 8px;
        padding: 0 8px 40px;
    }

    .act-gallery li,
    .act-gallery li:nth-child(n):last-child {
        grid-column: span 3;
        aspect-ratio: 4 / 3;
    }

    .act-gallery li:nth-child(2n+1):last-child {
        grid-column: span 6;
    }
}
