/* The archive (archive-voorstelling.php, template-parts/show-scene.php).

   Desktop: every show on one gold thread, from what is coming up to the first
   production. The year sits on the thread, the large photo runs to the edge of
   the screen on alternating sides, the card overlaps the photo and crosses the
   thread.

   Phone: no thread, like a programme booklet. The year as a gold heading, the
   photo running to the left or right edge of the screen in turn, and a card
   with a gold top that overlaps the bottom of the photo from the other side. */

/* ---------- Shared ---------- */

.timeline {
    position: relative;
    display: grid;
}

.scene {
    position: relative;
}

.scene-photo {
    display: block;
    overflow: hidden;
    background-color: var(--line);
}

.scene-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.scene:hover .scene-photo img {
    transform: scale(1.03);
}

.scene-photo-2 {
    display: none;
}

.scene-when {
    margin-bottom: var(--space-2xs);
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--gold-ink);
    font-variant-numeric: tabular-nums;
}

.scene-title {
    font-family: var(--font-serif);
    font-size: var(--text-2xl);
    font-weight: 600;
    line-height: 1.05;
}

.scene-title a {
    text-decoration: underline;
    text-decoration-color: transparent;
    text-decoration-thickness: 1px;
    text-underline-offset: 0.15em;
    transition: text-decoration-color var(--duration-normal) ease;
}

.scene:hover .scene-title a {
    text-decoration-color: var(--gold);
}

.scene-summary {
    margin-top: var(--space-sm);
    color: var(--smoke);
}

.scene-summary p {
    margin: 0;
}

.scene-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-sm) var(--space-lg);
    margin-top: var(--space-md);
}

.scene-year {
    font-family: var(--font-serif);
    font-style: italic;
    font-weight: 500;
    line-height: 0.9;
    color: var(--gold);
    font-variant-numeric: lining-nums;
}

/* ---------- Phone and tablet: a programme booklet ---------- */

@media (max-width: 1023px) {
    .timeline {
        gap: var(--space-2xl);
    }

    /* "Binnenkort", "Eerder gespeeld": like every section heading. */
    .timeline-station {
        margin-bottom: calc(var(--heading-gap) - var(--space-2xl));
        font-family: var(--font-serif);
        font-size: var(--text-2xl);
        font-style: italic;
        font-weight: 500;
        line-height: 1.1;
    }

    .timeline-station:not(:first-child) {
        margin-top: var(--space-xl);
    }

    .timeline-station::after {
        content: '';
        display: block;
        width: 3rem;
        height: 2px;
        margin-top: var(--space-sm);
        background-color: var(--gold);
    }

    .scene-year {
        margin-bottom: var(--space-sm);
        font-size: var(--text-4xl);
    }

    .scene--right .scene-year {
        text-align: right;
    }

    .scene-photo {
        aspect-ratio: 4 / 3;
    }

    .scene-card {
        position: relative;
        z-index: 1;
        margin-top: calc(-1 * var(--space-2xl));
        padding: var(--space-md) var(--space-md) var(--space-lg);
        border-top: 3px solid var(--gold);
        background-color: var(--paper);
    }

    /* Photo to the left edge, card in from the right; and the other way round. */
    .scene--left .scene-photo {
        margin: 0 var(--space-xl) 0 calc(-1 * var(--gutter));
    }

    .scene--left .scene-card {
        margin-left: var(--space-lg);
    }

    .scene--right .scene-photo {
        margin: 0 calc(-1 * var(--gutter)) 0 var(--space-xl);
    }

    .scene--right .scene-card {
        margin-right: var(--space-lg);
    }

    .scene-title {
        font-size: var(--text-xl);
    }

    .scene-summary {
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 3;
        overflow: hidden;
        margin-top: var(--space-xs);
        font-size: var(--text-sm);
        line-height: 1.55;
    }

    /* The card opens the show; only a show that is coming up has a button. */
    .scene-title a::after {
        content: '';
        position: absolute;
        inset: 0;
    }

    .scene:not(.scene--upcoming) .scene-actions,
    .scene-actions .section-link {
        display: none;
    }

    .scene-actions {
        position: relative;
        z-index: 1;
    }

    .scene--upcoming .scene-card {
        background-color: var(--ink);
        color: var(--paper);
    }

    .scene--upcoming .scene-when {
        color: var(--gold);
    }

    .scene--upcoming .scene-summary {
        color: var(--muted-on-ink);
    }
}

@media (min-width: 640px) and (max-width: 1023px) {
    .scene-title {
        font-size: var(--text-2xl);
    }

    .scene--left .scene-photo {
        margin-right: 25%;
    }

    .scene--left .scene-card {
        margin-left: 35%;
    }

    .scene--right .scene-photo {
        margin-left: 25%;
    }

    .scene--right .scene-card {
        margin-right: 35%;
    }
}

/* ---------- Desktop: the gold thread down the middle ---------- */

@media (min-width: 1024px) {
    /* The thread comes out of the hero (hero.css) without a gap. */
    .act--thread {
        padding-top: 0;
    }

    .timeline {
        gap: var(--space-3xl);
        padding-top: var(--space-xl);
    }

    .timeline::before {
        content: '';
        position: absolute;
        top: 0;
        bottom: 0;
        left: calc(50% - 1px);
        width: 2px;
        background-color: var(--gold);
    }

    /* "Binnenkort", "Eerder gespeeld": stations on the thread. */
    .timeline-station {
        position: relative;
        z-index: 1;
        justify-self: center;
        padding: var(--space-sm) var(--space-lg);
        background-color: var(--paper);
        font-family: var(--font-serif);
        font-size: var(--text-4xl);
        font-style: italic;
        font-weight: 500;
        line-height: 1.1;
    }

    .scene {
        display: grid;
        grid-template-columns: repeat(12, 1fr);
        column-gap: var(--space-md);
        align-items: start;
    }

    .scene-year {
        position: relative;
        z-index: 1;
        grid-column: 4 / 10;
        grid-row: 1;
        justify-self: center;
        margin: 0 0 var(--space-lg);
        padding: 0 var(--space-md);
        background-color: var(--paper);
        font-size: clamp(5rem, 9vw, 8.5rem);
    }

    .scene-photo {
        grid-row: 2;
        aspect-ratio: 4 / 3;
    }

    .scene-photo-2 {
        display: block;
        grid-row: 1 / 3;
        align-self: start;
        z-index: 1;
        aspect-ratio: 4 / 5;
        margin-top: var(--space-4xl);
        overflow: hidden;
        border: var(--space-sm) solid var(--paper);
    }

    .scene-photo-2 img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .scene-card {
        position: relative;
        z-index: 2;
        grid-row: 2;
        align-self: end;
        margin: 0 0 calc(-1 * var(--space-3xl));
        padding: var(--space-xl);
        border-top: 3px solid var(--gold);
        background-color: var(--paper);
    }

    .scene-title {
        font-size: var(--text-4xl);
    }

    /* Coming up: the card is ink, the gold button sells. */
    .scene--upcoming .scene-card {
        background-color: var(--ink);
        color: var(--paper);
    }

    .scene--upcoming .scene-when {
        color: var(--gold);
    }

    .scene--upcoming .scene-summary {
        color: var(--muted-on-ink);
    }

    /* Large photo left: bleeds left, card crosses the thread to the right. */
    .scene--left .scene-photo {
        grid-column: 1 / 8;
        margin-left: calc(-1 * var(--bleed));
    }

    .scene--left .scene-card {
        grid-column: 6 / 12;
    }

    .scene--left .scene-photo-2 {
        grid-column: 10 / 13;
        margin-right: calc(-1 * var(--space-md));
    }

    /* Large photo right: the mirror image. */
    .scene--right .scene-photo {
        grid-column: 6 / 13;
        margin-right: calc(-1 * var(--bleed));
    }

    .scene--right .scene-card {
        grid-column: 2 / 8;
    }

    .scene--right .scene-photo-2 {
        grid-column: 1 / 4;
        margin-left: calc(-1 * var(--space-md));
    }
}
