.festival-header {
    background: var(--background-white);
    border-bottom: 1px solid var(--border-color);
}

.festival-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 4.5rem;
}

.festival-brand, .festival-return {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    color: var(--primary-color);
    font-weight: 700;
    text-decoration: none;
}

.festival-brand img {
    flex: none;
    object-fit: contain;
}

.festival-return {
    color: var(--secondary-color);
}

.festival-brand:hover, .festival-return:hover {
    text-decoration: underline;
}

.festival-main {
    padding-bottom: clamp(2.5rem, 6vw, 5rem);
}

.festival-intro {
    padding: clamp(2rem, 5vw, 4rem) 0 clamp(1.5rem, 4vw, 2.75rem);
}

.festival-intro p {
    color: var(--secondary-color);
    font-size: .95rem;
    font-weight: 700;
}

.festival-intro h1 {
    color: var(--primary-color);
    font: 700 clamp(3rem, 8vw, 6.25rem)/1 'Cormorant Garamond', Georgia, serif;
    letter-spacing: -.035em;
}

.festival-gallery {
    --festival-gap: clamp(.65rem, 1.6vw, 1.25rem);
}

.festival-gallery, .festival-row {
    display: grid;
    gap: var(--festival-gap);
}

.festival-featured {
    grid-template-columns: 4fr 5fr;
}

.festival-portraits, .festival-finale {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.festival-row a {
    display: block;
    min-width: 0;
    overflow: hidden;
    border-radius: .65rem;
    background: var(--background-light);
    box-shadow: var(--shadow-sm);
}

.festival-row img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.festival-featured a:first-child { aspect-ratio: 1; }
.festival-featured a:last-child { aspect-ratio: 5 / 4; }
.festival-portraits a { aspect-ratio: 7 / 10; }
.festival-finale a { aspect-ratio: 6 / 5; }
.festival-portraits a:nth-child(4) img { object-position: center 25%; }
.festival-portraits a:nth-child(7) img { object-position: center 20%; }
.festival-finale a:nth-child(2) img { object-position: 55% center; }

.festival-row a:focus-visible, .festival-header a:focus-visible {
    outline: 3px solid var(--secondary-color);
    outline-offset: 3px;
}

.festival-viewer {
    position: fixed;
    inset: 0;
    margin: auto;
    width: min(76rem, calc(100% - 1rem));
    max-width: none;
    max-height: calc(100% - 1rem);
    padding: .5rem clamp(.5rem, 2vw, 1.5rem) 1rem;
    border: 0;
    border-radius: .75rem;
    background: var(--primary-dark);
    color: white;
    text-align: center;
}

.festival-viewer::backdrop { background: rgb(8 13 24 / 88%); }
.festival-viewer form { text-align: right; }

.festival-viewer-image {
    display: block;
    width: 100%;
    height: min(70vh, 48rem);
    height: min(70dvh, 48rem);
    object-fit: contain;
}

.festival-viewer button {
    min-width: 2.75rem;
    min-height: 2.75rem;
    border: 1px solid #8090aa;
    border-radius: .35rem;
    background: var(--primary-color);
    color: white;
    cursor: pointer;
    font-family: inherit;
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1;
}

.festival-viewer button:focus-visible { outline: 2px solid var(--accent-light); }

.festival-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: .75rem;
}

.festival-controls span { min-width: 4.5rem; }

@media (max-width: 620px) {
    .festival-main, .festival-header-inner { padding-inline: 1rem; }
    .festival-featured, .festival-finale { grid-template-columns: 1fr; }
    .festival-portraits { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .festival-portraits a:last-child:nth-child(odd) {
        grid-column: 1 / -1;
        justify-self: center;
        width: calc((100% - var(--festival-gap)) / 2);
    }
}
