/*
 * Locafolia — public site styles.
 *
 * The site steps back in front of the artworks: a paper background, deep text
 * and two accents (one for actions, one for focus and the active language).
 * The palette changes with the seasons (<html data-season>, chosen in the admin
 * or automatic by date). Autumn is the original palette of the "Direction
 * visuelle" mockups, taken from the reference artwork: warm paper, terracotta, sky.
 */

@font-face {
    font-family: 'Fraunces';
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url("../fonts/fraunces-latin-opsz-normal-SfWU466.woff2") format('woff2');
}

@font-face {
    font-family: 'Source Sans 3';
    font-style: normal;
    font-weight: 200 900;
    font-display: swap;
    src: url("../fonts/source-sans-3-latin-wght-normal-u4wvMPu.woff2") format('woff2');
}

@font-face {
    font-family: 'Source Sans 3';
    font-style: italic;
    font-weight: 200 900;
    font-display: swap;
    src: url("../fonts/source-sans-3-latin-wght-italic-Oar1uEQ.woff2") format('woff2');
}

:root {
    /* Palette: autumn, the default (contrast ratios measured on --color-paper). */
    --color-paper: #fbf7ee;          /* site background */
    --color-sand: #f1e8d6;           /* bands, image placeholders */
    --color-rule: #e3d8c3;           /* separators, borders */
    --color-ink: #3a2a1f;            /* text (≈ 12.8:1) */
    --color-ink-soft: #6b5444;       /* secondary text (≈ 6.6:1) */
    --color-accent: #a2461f;         /* links, buttons (≈ 5.7:1, white text on it ≈ 6.1:1) */
    --color-accent-dark: #7e3517;    /* hover */
    --color-highlight: #2784ae;      /* focus, current page — never text (≥ 3.2:1 on every background) */
    --color-field: #fffdf8;          /* form fields */
    --color-field-border: #8f7a62;   /* field borders (≈ 4:1 on --color-field) */

    --font-serif: 'Fraunces', Georgia, 'Times New Roman', serif;
    --font-sans: 'Source Sans 3', system-ui, -apple-system, 'Segoe UI', sans-serif;

    --text-body: clamp(1.0625rem, 1rem + 0.25vw, 1.25rem); /* 17 → 20 px */
    --text-small: 0.9375rem;                                /* 15 px */
    --measure: 66ch;

    --gutter: clamp(1.25rem, 4vw, 3.5rem);
    --max-width: 1440px;
    --radius: 2px;
    --transition: 160ms ease-out;
}

/*
 * Seasonal palettes. Each one meets the same minimums as autumn: text and
 * accent ≥ 4.5:1 on paper, sand and fields, white on the accent ≥ 4.5:1,
 * highlight and field borders ≥ 3:1.
 */
:root[data-season="winter"] {
    /* Snow, slate blue and cranberry. */
    --color-paper: #f6f8fa;
    --color-sand: #e3eaf1;
    --color-rule: #d0dae4;
    --color-ink: #1e2935;
    --color-ink-soft: #4b5a6a;
    --color-accent: #2e5a85;
    --color-accent-dark: #1f405f;
    --color-highlight: #b03a48;
    --color-field: #ffffff;
    --color-field-border: #748597;
}

:root[data-season="spring"] {
    /* Pale green, new leaves and blossom pink. */
    --color-paper: #f9f9f1;
    --color-sand: #ebefdc;
    --color-rule: #d9e0c6;
    --color-ink: #262f1e;
    --color-ink-soft: #535e45;
    --color-accent: #4a6a24;
    --color-accent-dark: #344d17;
    --color-highlight: #b5487a;
    --color-field: #fffffa;
    --color-field-border: #7f8a6a;
}

:root[data-season="summer"] {
    /* Sand, lake teal and sun orange. */
    --color-paper: #fdf9ee;
    --color-sand: #f5eacc;
    --color-rule: #e8dab3;
    --color-ink: #2b291e;
    --color-ink-soft: #5c5440;
    --color-accent: #1b6b74;
    --color-accent-dark: #124f56;
    --color-highlight: #c05a12;
    --color-field: #fffef8;
    --color-field-border: #8a7d5c;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    background: var(--color-paper);
    color: var(--color-ink);
    font-family: var(--font-sans);
    font-size: var(--text-body);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

h1,
h2,
h3 {
    font-family: var(--font-serif);
    font-weight: 600;
    line-height: 1.12;
    letter-spacing: -0.01em;
    margin: 0 0 0.5em;
}

h1 {
    font-size: clamp(2.25rem, 1.6rem + 2.6vw, 3.25rem);
}

h2 {
    font-size: clamp(1.6rem, 1.3rem + 1.2vw, 2rem);
}

p {
    margin: 0 0 1em;
    max-width: var(--measure);
}

a {
    color: var(--color-accent);
    text-decoration-thickness: 1px;
    text-underline-offset: 0.2em;
    transition: color var(--transition);
}

a:hover {
    color: var(--color-accent-dark);
}

:focus-visible {
    outline: 3px solid var(--color-highlight);
    outline-offset: 2px;
}

/* Target of the skip link: focused by script, no ring needed. */
main:focus {
    outline: none;
}

.visually-hidden {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: absolute;
    left: var(--gutter);
    top: -100px;
    background: var(--color-ink);
    color: var(--color-paper);
    padding: 0.5rem 1rem;
    z-index: 10;
}

.skip-link:focus {
    top: 0.5rem;
    color: var(--color-paper);
}

.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--gutter);
}

.eyebrow {
    font-size: var(--text-small);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-ink-soft);
    margin-bottom: 1rem;
}

.lead {
    color: var(--color-ink-soft);
}

/* Buttons: accent colour for acting, outlined for secondary actions. */
.button {
    display: inline-block;
    padding: 0.6em 1.2em;
    border: 2px solid var(--color-accent);
    border-radius: var(--radius);
    background: var(--color-accent);
    color: #fff;
    font: inherit;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: background-color var(--transition), border-color var(--transition);
}

.button:hover {
    background: var(--color-accent-dark);
    border-color: var(--color-accent-dark);
    color: #fff;
}

.button--outline {
    background: transparent;
    color: var(--color-accent);
}

.button--outline:hover {
    background: transparent;
    color: var(--color-accent-dark);
}

/* Header */
.site-header {
    border-bottom: 1px solid var(--color-rule);
}

.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    min-height: 4.25rem;
}

.site-logo {
    font-family: var(--font-serif);
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--color-ink);
    text-decoration: none;
}

.site-logo:hover {
    color: var(--color-ink);
}

.language-switcher {
    display: flex;
    gap: 0.75rem;
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: var(--text-small);
}

.language-switcher a {
    display: inline-block;
    min-width: 1.5rem;
    padding: 0.25rem 0.25rem;
    text-align: center;
    color: var(--color-ink-soft);
    text-decoration: none;
    border-bottom: 2px solid transparent;
}

.language-switcher a[aria-current='true'] {
    color: var(--color-ink);
    font-weight: 600;
    border-bottom-color: var(--color-highlight);
}

/* Home hero */
.hero {
    padding: clamp(3rem, 8vw, 6rem) 0;
}

/* Footer */
.site-footer {
    border-top: 1px solid var(--color-rule);
    padding: 2rem 0;
    font-size: var(--text-small);
    color: var(--color-ink-soft);
}

.site-footer__name {
    font-family: var(--font-serif);
    font-weight: 700;
    font-size: 1.125rem;
    color: var(--color-ink);
    margin: 0;
}

/* Visible on English pages whose content falls back to French. */
.untranslated-notice {
    display: inline-block;
    font-size: var(--text-small);
    color: var(--color-ink-soft);
    background: var(--color-sand);
    border: 1px solid var(--color-rule);
    border-radius: 999px;
    padding: 0.1rem 0.75rem;
}

/* Header navigation */
.site-header__nav {
    display: flex;
    align-items: center;
    gap: clamp(1rem, 3vw, 2.5rem);
}

.main-nav {
    display: flex;
    gap: clamp(0.75rem, 2.5vw, 2rem);
    list-style: none;
    margin: 0;
    padding: 0;
}

.main-nav a {
    display: inline-block;
    padding: 0.25rem 0;
    color: var(--color-ink);
    text-decoration: none;
    border-bottom: 2px solid transparent;
}

.main-nav a:hover {
    color: var(--color-accent-dark);
}

.main-nav a[aria-current='page'] {
    font-weight: 600;
    border-bottom-color: var(--color-highlight);
}

/*
 * Below ~620 px the four links no longer fit beside the logo: the logo and the
 * languages share the first line, the links take the whole second line.
 */
@media (max-width: 39em) {
    .site-header__inner {
        flex-wrap: wrap;
        padding-block: 0.75rem;
        row-gap: 0.5rem;
    }

    .site-header__nav {
        display: contents;
    }

    .site-header__nav > nav:first-child {
        order: 1;
        width: 100%;
    }

    .main-nav {
        justify-content: space-between;
        gap: 0.5rem;
    }
}

/* Pages */
.page {
    padding-block: clamp(1.5rem, 4vw, 3rem) clamp(3rem, 6vw, 5rem);
}

.page--narrow {
    max-width: calc(var(--measure) + 2 * var(--gutter));
}

.page-section {
    padding-block: clamp(2.5rem, 6vw, 4.5rem);
}

.section-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.5rem 1.5rem;
    margin-bottom: 1.5rem;
}

.section-head h2 {
    margin: 0;
}

.band {
    background: var(--color-sand);
    padding-block: clamp(2.5rem, 6vw, 4.5rem);
}

.image-placeholder {
    aspect-ratio: 4 / 5;
    background: var(--color-sand);
    border: 1px solid var(--color-rule);
}

/* Shown to administrators on unpublished pages. */
.preview-banner {
    background: var(--color-ink);
    color: var(--color-paper);
    text-align: center;
    padding: 0.6rem var(--gutter);
    font-size: var(--text-small);
}

/* Home */
.hero__inner {
    display: grid;
    gap: clamp(2rem, 5vw, 4rem);
    align-items: center;
}

@media (min-width: 52em) {
    .hero__inner {
        grid-template-columns: 1.3fr 1fr;
    }
}

.hero__image {
    justify-self: center;
    max-width: 32rem;
}

.hero__image img,
.artwork-card__image img,
.artwork__main img {
    border: 1px solid var(--color-rule);
    background: var(--color-sand);
}

.hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.lead p {
    color: var(--color-ink-soft);
}

.event-teaser h2 {
    margin-bottom: 0.75rem;
}

.event-teaser__when,
.event-teaser__where {
    margin: 0;
    color: var(--color-ink-soft);
}

.event-teaser__when::first-letter {
    text-transform: uppercase;
}

.cta-band {
    border-top: 1px solid var(--color-rule);
    padding-block: clamp(2.5rem, 6vw, 4rem);
    text-align: center;
}

.cta-band__inner p {
    margin-inline: auto;
}

/* Artwork cards: the image keeps its own proportions, never cropped. */
.artwork-card {
    break-inside: avoid;
    margin: 0 0 clamp(1.5rem, 3vw, 2.5rem);
}

.artwork-card__link {
    display: block;
    color: var(--color-ink);
    text-decoration: none;
}

.artwork-card__link:hover .artwork-card__title {
    color: var(--color-accent-dark);
    text-decoration: underline;
}

.artwork-card__image img {
    width: 100%;
    transition: opacity var(--transition);
}

.artwork-card__link:hover img {
    opacity: 0.92;
}

.artwork-card__title {
    font-family: var(--font-sans);
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0;
    margin: 0.6rem 0 0.1rem;
}

.artwork-card__status {
    font-size: var(--text-small);
    color: var(--color-ink-soft);
    margin: 0;
}

.card-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 clamp(1rem, 3vw, 2rem);
    align-items: start;
}

@media (min-width: 52em) {
    .card-row {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

.band .card-row {
    align-items: end;
}

/* Gallery */
.gallery-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem 2rem;
    margin-bottom: 1.5rem;
}

.gallery-head h1 {
    margin-bottom: 0.25rem;
}

.gallery-head__count {
    color: var(--color-ink-soft);
    margin: 0;
}

.search {
    width: min(100%, 22rem);
}

.search__label {
    display: block;
    font-size: var(--text-small);
    color: var(--color-ink-soft);
    margin-bottom: 0.25rem;
}

.search__row {
    display: flex;
}

.search__input {
    flex: 1;
    min-width: 0;
    font: inherit;
    font-size: 1rem;
    color: var(--color-ink);
    background: var(--color-field);
    border: 1px solid var(--color-field-border);
    border-right: 0;
    border-radius: var(--radius) 0 0 var(--radius);
    padding: 0.5rem 0.75rem;
}

.search__button {
    font: inherit;
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-accent);
    background: var(--color-field);
    border: 1px solid var(--color-field-border);
    border-radius: 0 var(--radius) var(--radius) 0;
    padding: 0.5rem 0.9rem;
    cursor: pointer;
}

.search__input::placeholder,
.field input::placeholder,
.field textarea::placeholder {
    color: var(--color-ink-soft);
    opacity: 1;
}

.search__button:hover {
    color: var(--color-accent-dark);
}

.filters ul {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    list-style: none;
    margin: 0 0 2rem;
    padding: 0;
}

.chip {
    display: inline-block;
    padding: 0.3rem 0.9rem;
    border: 1px solid var(--color-rule);
    border-radius: 999px;
    color: var(--color-ink);
    font-size: var(--text-small);
    text-decoration: none;
}

.chip:hover {
    border-color: var(--color-ink-soft);
    color: var(--color-ink);
}

.chip[aria-current='true'] {
    background: var(--color-ink);
    border-color: var(--color-ink);
    color: var(--color-paper);
    font-weight: 600;
}

.collection-intro,
.gallery-results {
    color: var(--color-ink-soft);
    margin-bottom: 2rem;
}

.gallery-empty {
    padding-block: 3rem;
    color: var(--color-ink-soft);
}

/* Each page of results is its own block of columns: loading more never moves
   the artworks already seen. */
.gallery__page {
    columns: 2;
    column-gap: clamp(1rem, 3vw, 2rem);
}

@media (min-width: 52em) {
    .gallery__page {
        columns: 3;
    }
}

@media (min-width: 72em) {
    .gallery__page {
        columns: 4;
    }
}

.gallery__more {
    text-align: center;
    padding-top: 1rem;
}

.gallery__status {
    font-size: var(--text-small);
    color: var(--color-ink-soft);
    margin: 0 auto 1rem;
}

.gallery__previous {
    margin-bottom: 1.5rem;
}

/* Artwork page */
.breadcrumb ol {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    margin: 0 0 1.5rem;
    padding: 0;
    font-size: var(--text-small);
    color: var(--color-ink-soft);
}

.breadcrumb li + li::before {
    content: '/';
    padding: 0 0.4rem;
}

.artwork {
    display: grid;
    gap: clamp(1.5rem, 5vw, 5rem);
    align-items: start;
}

@media (min-width: 52em) {
    .artwork {
        grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    }
}

.artwork__main {
    display: block;
    cursor: zoom-in;
}

.artwork__main img {
    width: 100%;
    max-height: 85vh;
    object-fit: contain;
}

.artwork__thumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    list-style: none;
    margin: 0.75rem 0 0;
    padding: 0;
}

.artwork__thumbs a {
    display: block;
    width: 5.5rem;
    aspect-ratio: 1;
    padding: 2px;
    border: 1px solid var(--color-rule);
    background: var(--color-sand);
}

.artwork__thumbs a[aria-current='true'] {
    border: 2px solid var(--color-ink);
    padding: 1px;
}

.artwork__thumbs img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.artwork__zoom {
    display: inline-block;
    margin-top: 0.75rem;
    font-size: var(--text-small);
    font-weight: 600;
}

.artwork__details h1 {
    margin-bottom: 0.75rem;
}

.artwork__offer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 1rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--color-rule);
}

.badge {
    display: inline-block;
    padding: 0.15rem 0.75rem;
    border-radius: 999px;
    background: var(--color-sand);
    border: 1px solid var(--color-rule);
    font-size: var(--text-small);
    font-weight: 600;
}

.badge--muted {
    color: var(--color-ink-soft);
    font-weight: 400;
}

.artwork__price abbr {
    text-decoration: none;
    font-size: var(--text-small);
    color: var(--color-ink-soft);
}

.artwork__price--request {
    color: var(--color-ink-soft);
}

.artwork__facts {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: 0.4rem 2rem;
    margin: 1.25rem 0;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--color-rule);
    font-size: var(--text-small);
}

.artwork__facts:empty {
    display: none;
}

.artwork__facts dt {
    color: var(--color-ink-soft);
}

.artwork__facts dd {
    margin: 0;
}

.artwork__cta {
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

.button--block {
    display: block;
    width: 100%;
    max-width: 26rem;
    text-align: center;
}

.artwork__note {
    font-size: var(--text-small);
    color: var(--color-ink-soft);
    max-width: 26rem;
}

/* Full-screen viewer */
/* The page behind does not scroll (nor show its scrollbar over the viewer). */
:root:has(.viewer[open]) {
    overflow: hidden;
}

.viewer {
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    margin: 0;
    padding: 0;
    border: 0;
    background: #1f1712;
    color: var(--color-paper);
}

.viewer::backdrop {
    background: rgb(31 23 18 / 0.9);
}

.viewer[open] {
    display: flex;
    flex-direction: column;
}

.viewer__bar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem var(--gutter);
}

.viewer__counter {
    flex: 1;
    max-width: none;
    margin: 0;
    font-size: var(--text-small);
}

.viewer__button,
.viewer__nav {
    font: inherit;
    font-size: var(--text-small);
    font-weight: 600;
    color: var(--color-paper);
    background: transparent;
    border: 1px solid rgb(251 247 238 / 0.4);
    border-radius: var(--radius);
    min-height: 2.75rem;
    padding: 0.4rem 0.9rem;
    cursor: pointer;
}

.viewer__button:hover,
.viewer__nav:hover {
    border-color: var(--color-paper);
}

.viewer__button[aria-pressed='true'] {
    background: var(--color-paper);
    color: var(--color-ink);
}

.viewer__stage {
    flex: 1;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 var(--gutter) var(--gutter);
    overflow: hidden;
}

.viewer__stage img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    cursor: zoom-in;
}

/* The <picture> wrapper must not limit the image's box. */
.viewer__stage picture {
    display: contents;
}

/* Zoomed: the image at full web size, scrolled by hand or finger. */
.viewer__stage.is-zoomed {
    display: block;
    overflow: auto;
}

/* Focusable when zoomed, so the arrow keys scroll the image. */
.viewer__stage:focus-visible {
    outline-offset: -3px;
}

.viewer__stage.is-zoomed img {
    max-width: none;
    max-height: none;
    margin: 0 auto;
    cursor: zoom-out;
}

.viewer__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    min-width: 2.75rem;
    font-size: 1.25rem;
    background: rgb(31 23 18 / 0.8); /* light text stays ≥ 4.5:1 over any image */
}

.viewer__nav--prev {
    left: 0.75rem;
}

.viewer__nav--next {
    right: 0.75rem;
}

/* Long texts typed in the admin. */
.prose p,
.prose ul,
.prose ol,
.prose blockquote,
.prose h2,
.prose h3,
.prose > div {
    max-width: var(--measure);
}

.prose blockquote {
    margin-inline: 0;
    padding-left: 1.25rem;
    border-left: 3px solid var(--color-rule);
    color: var(--color-ink-soft);
}

/* News list: date (or day/month of the event), text, optional image. */
.news-page h1 {
    margin-bottom: clamp(1.5rem, 4vw, 2.5rem);
}

.news-section + .news-section {
    margin-top: clamp(2.5rem, 6vw, 4rem);
}

.news-section__title {
    margin-bottom: 0;
}

.news-item {
    display: grid;
    grid-template-columns: 5.5rem 1fr;
    gap: 0.5rem clamp(1rem, 3vw, 2rem);
    padding-block: clamp(1.5rem, 3vw, 2.25rem);
    border-bottom: 1px solid var(--color-rule);
}

.news-item__image {
    grid-column: 1 / -1;
}

@media (min-width: 52em) {
    .news-item {
        grid-template-columns: 7rem 1fr;
    }

    .news-item--with-image {
        grid-template-columns: 7rem 1fr 16rem;
    }

    .news-item__image {
        grid-column: auto;
    }
}

.news-item__image img {
    border: 1px solid var(--color-rule);
    background: var(--color-sand);
}

.news-item__published {
    display: block;
    font-size: var(--text-small);
    line-height: 1.4;
    color: var(--color-ink-soft);
}

.date-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.5rem 0.25rem;
    border: 1px solid var(--color-rule);
    background: var(--color-sand);
    line-height: 1.1;
}

.date-block__day {
    font-family: var(--font-serif);
    font-size: 2rem;
}

.date-block__month {
    font-size: var(--text-small);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-ink-soft);
}

.news-item__badge {
    margin: 0 0 0.5rem;
}

.news-item__title {
    margin: 0 0 0.5rem;
}

.news-item__title a {
    color: var(--color-ink);
    text-decoration: none;
}

.news-item__title a:hover {
    color: var(--color-accent-dark);
    text-decoration: underline;
}

.news-item__when {
    margin: 0 0 0.5rem;
    color: var(--color-ink-soft);
}

.news-item__when::first-letter {
    text-transform: uppercase;
}

.news-item__summary {
    margin: 0 0 0.5rem;
    max-width: var(--measure);
}

.news-item__more {
    margin: 0;
}

.news-empty {
    color: var(--color-ink-soft);
}

/* Numbered pages: "Newer 1 2 3 Older". */
.pagination ul {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.5rem 1rem;
    list-style: none;
    margin: clamp(2rem, 5vw, 3rem) 0 0;
    padding: 0;
}

.pagination [aria-current="page"] {
    font-weight: 600;
    border-bottom: 2px solid var(--color-highlight);
}

/* News page */
.news-article {
    max-width: calc(48rem + 2 * var(--gutter));
}

.news-article__head h1 {
    margin-bottom: 0.5rem;
}

.news-article__published {
    font-size: var(--text-small);
    color: var(--color-ink-soft);
}

.event-box {
    margin-block: 1.5rem;
    padding: 1.25rem 1.5rem;
    background: var(--color-sand);
    border: 1px solid var(--color-rule);
}

.event-box__facts {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: 0.4rem 1.5rem;
    margin: 0;
}

.event-box__facts dt {
    color: var(--color-ink-soft);
}

.event-box__facts dd {
    margin: 0;
}

.event-box__facts dd time {
    display: inline-block;
}

.event-box__facts dd time::first-letter {
    text-transform: uppercase;
}

.event-box__link {
    margin: 1rem 0 0;
}

.news-article__image {
    margin: 0 0 1.5rem;
}

.news-article__image img {
    border: 1px solid var(--color-rule);
    background: var(--color-sand);
}

.news-article__back {
    margin-top: clamp(2rem, 5vw, 3rem);
}

/* Home: next event with its optional image. */
@media (min-width: 52em) {
    .event-teaser--with-image {
        display: grid;
        grid-template-columns: 1.3fr 1fr;
        gap: clamp(2rem, 5vw, 4rem);
        align-items: center;
    }
}

.event-teaser h2 a {
    color: inherit;
    text-decoration: none;
}

.event-teaser h2 a:hover {
    color: var(--color-accent-dark);
    text-decoration: underline;
}

.event-teaser__more {
    margin: 1rem 0 0;
}

.event-teaser__image {
    display: block;
    margin-top: 1.5rem;
}

@media (min-width: 52em) {
    .event-teaser__image {
        margin-top: 0;
    }
}

.event-teaser__image img {
    border: 1px solid var(--color-rule);
}

/* Contact */
.contact-layout {
    display: grid;
    gap: clamp(1.5rem, 4vw, 4rem);
    align-items: start;
}

@media (min-width: 52em) {
    .contact-layout {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr);
    }
}

.contact-intro__note,
.contact-intro__email {
    font-size: var(--text-small);
    color: var(--color-ink-soft);
}

.contact-intro__email a {
    overflow-wrap: anywhere;
}

.contact-form {
    display: grid;
    gap: 1.25rem;
    max-width: 40rem;
}

.form-alert {
    border: 1px solid var(--color-accent);
    border-left-width: 4px;
    background: var(--color-field);
    padding: 0.75rem 1rem;
}

.form-alert p {
    margin: 0;
}

.form-alert p + p {
    margin-top: 0.5rem;
}

.field {
    display: grid;
    gap: 0.3rem;
    min-width: 0;
}

.field label,
.field legend {
    font-weight: 600;
}

.field input[type='text'],
.field input[type='email'],
.field input[type='tel'],
.field textarea {
    width: 100%;
    font: inherit;
    font-size: 1rem;
    color: var(--color-ink);
    background: var(--color-field);
    border: 1px solid var(--color-field-border); /* ≥ 3:1 against the field background */
    border-radius: var(--radius);
    padding: 0.6rem 0.75rem;
}

.field textarea {
    resize: vertical;
    min-height: 9rem;
}

.field input:focus-visible,
.field textarea:focus-visible,
.choice input:focus-visible {
    outline: 3px solid var(--color-highlight);
    outline-offset: 1px;
}

.field__help {
    margin: 0;
    font-size: var(--text-small);
    color: var(--color-ink-soft);
}

.field__error {
    margin: 0;
    font-size: var(--text-small);
    font-weight: 600;
    color: var(--color-accent-dark);
}

.field--invalid input,
.field--invalid textarea {
    border-color: var(--color-accent);
}

.field-pair {
    display: grid;
    gap: 1.25rem;
}

@media (min-width: 40em) {
    .field-pair {
        grid-template-columns: 1fr 1fr;
    }
}

fieldset.field {
    border: 0;
    margin: 0;
    padding: 0;
}

.field legend {
    padding: 0;
    margin-bottom: 0.3rem;
}

.choices {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.5rem;
}

.choice {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.choice input {
    flex: none;
    width: 1.15rem;
    height: 1.15rem;
    margin: 0.2rem 0 0;
    accent-color: var(--color-accent);
}

.choice label {
    font-weight: 400;
}

.contact-artwork {
    display: flex;
    gap: 1rem;
    align-items: center;
    padding: 0.75rem;
    background: var(--color-sand);
    border: 1px solid var(--color-rule);
}

.contact-artwork__image {
    flex: none;
    width: 5rem;
}

.contact-artwork__image img {
    display: block;
    border: 1px solid var(--color-rule);
}

.contact-artwork__image .image-placeholder {
    aspect-ratio: 1;
}

.contact-artwork p {
    margin: 0;
}

.contact-artwork__label {
    font-size: var(--text-small);
    color: var(--color-ink-soft);
}

.contact-artwork__title {
    font-family: var(--font-serif);
    font-size: 1.125rem;
}

.contact-artwork__title a {
    color: var(--color-ink);
}

.contact-artwork__remove {
    font-size: var(--text-small);
}

/* Honeypot: out of sight and out of the keyboard path, but still in the form. */
.contact-form__trap {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.contact-form__submit {
    margin: 0;
}

/* Footer */
.site-footer__inner {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 1rem 2rem;
}

.site-footer__copyright {
    margin: 0;
}

.site-footer__links {
    display: flex;
    gap: 1.25rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

/* Calm by design: honour the system's "reduce motion" setting. */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Legal pages */
.site-footer__links {
    flex-wrap: wrap;
    row-gap: 0.5rem;
}

.legal-page .prose h2 {
    margin-top: 2rem;
}

.legal-page__updated {
    color: var(--color-ink-soft);
    font-size: var(--text-small);
}
