/* chateau-de-chenaux.ch — the only stylesheet.
   Colours from the place: the lake (dark bands), the meadow (the Pré), the brick of Chenaux
   (dates). One motif: the battlements, cut into the bottom of the hero and the top of the footer. */

@font-face { font-family: "Alegreya"; src: url("../fonts/alegreya.woff2") format("woff2"); font-weight: 400 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Alegreya"; src: url("../fonts/alegreya-italic.woff2") format("woff2"); font-weight: 400 900; font-style: italic; font-display: swap; }
@font-face { font-family: "Alegreya Sans"; src: url("../fonts/alegreya-sans-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Alegreya Sans"; src: url("../fonts/alegreya-sans-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --lake: #1c4656;
  --lake-deep: #133440;
  --lake-soft: #e7eff1;
  --meadow: #4a6727;
  --meadow-soft: #eef3e5;
  --brick: #8f3d27;
  --ink: #1d2629;
  --muted: #4f6168;
  --line: #d3dde0;
  --paper: #fff;
  --serif: "Alegreya", Georgia, "Times New Roman", serif;
  --sans: "Alegreya Sans", "Segoe UI", system-ui, sans-serif;
  --wrap: 72rem;
  --gut: clamp(1rem, 4vw, 2.5rem);
  --merlon: 42px;   /* width of a merlon; the crenel between two is 2/3 of it */
  --crenel-h: 20px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 1rem; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 1.125rem/1.6 var(--serif);
  font-kerning: normal; text-rendering: optimizeLegibility;
}
img, video { max-width: 100%; height: auto; display: block; }
a { color: var(--lake); text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { color: var(--brick); }
:focus-visible { outline: 3px solid #d08a2e; outline-offset: 2px; }
h1, h2, h3 { font-family: var(--serif); line-height: 1.15; margin: 0 0 .5em; color: var(--lake-deep); text-wrap: balance; }
h1 { font-size: clamp(2.1rem, 1.4rem + 3vw, 3.4rem); font-weight: 800; letter-spacing: -.01em; }
h2 { font-size: clamp(1.6rem, 1.3rem + 1.2vw, 2.2rem); font-weight: 700; }
h3 { font-size: 1.35rem; font-weight: 700; }
p { margin: 0 0 1em; }
sup { font-size: .68em; line-height: 0; }
time, .meta, .crumb, .topics, .btn, .note, .filter, .filter-count, .more, .pager span, .docs span, .join label, figcaption {
  font-family: var(--sans); font-weight: 500;
}
.wrap { width: min(100% - 2 * var(--gut), var(--wrap)); margin-inline: auto; }
.lead { font-size: clamp(1.2rem, 1.1rem + .5vw, 1.45rem); line-height: 1.45; color: var(--muted); max-width: 38em; }
.vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: .5rem; z-index: 10; background: #fff; padding: .5rem 1rem; }
.skip:focus { left: .5rem; }

/* ── buttons ─────────────────────────────────────────────────────────────── */
.btn {
  display: inline-block; padding: .6em 1.15em; border-radius: 3px; border: 2px solid var(--lake);
  background: var(--lake); color: #fff; text-decoration: none; font-size: 1.05rem; line-height: 1.2; cursor: pointer;
}
.btn:hover { background: var(--lake-deep); border-color: var(--lake-deep); color: #fff; }
.btn-quiet { background: transparent; color: var(--lake); }
.btn-quiet:hover { background: var(--lake-soft); color: var(--lake-deep); }
.btn-light { background: #fff; border-color: #fff; color: var(--lake-deep); }
.btn-light:hover { background: var(--meadow-soft); border-color: var(--meadow-soft); color: var(--lake-deep); }

/* ── header ──────────────────────────────────────────────────────────────── */
.masthead { background: var(--lake-deep); color: #fff; }
.masthead-inner { display: flex; align-items: center; justify-content: space-between; gap: .75rem 2rem; flex-wrap: wrap; padding-block: .7rem; }
.brand { display: flex; align-items: center; gap: .7rem; color: #fff; text-decoration: none; }
.brand img { width: 2.9rem; height: 2.9rem; border-radius: 50%; }
.brand span { display: flex; flex-direction: column; line-height: 1.05; }
.brand strong { font-size: 1.25rem; font-weight: 700; }
.brand em { font-style: italic; color: #cfe0e4; font-size: 1rem; }
.brand:hover { color: #fff; }
.masthead nav ul { list-style: none; display: flex; flex-wrap: wrap; gap: .1rem 1.3rem; margin: 0; padding: 0; }
.masthead nav a { color: #e9f2f4; text-decoration: none; font: 500 1.08rem/1.2 var(--sans); padding-block: .45rem; display: inline-block; border-bottom: 2px solid transparent; }
.masthead nav a:hover { color: #fff; border-bottom-color: #9fc0c8; }
.masthead nav a[aria-current] { color: #fff; border-bottom-color: #fff; }
@media (max-width: 47.99rem) {
  .masthead nav { width: 100%; }
  .masthead nav ul { gap: 0 1rem; }
  .masthead nav a { font-size: 1rem; }
}

/* ── battlements ─────────────────────────────────────────────────────────── */
/* The bottom edge of the hero and the top edge of the footer are cut as a crenellated wall. */
.hero-image {
  -webkit-mask: linear-gradient(#000 0 0) top / 100% calc(100% - var(--crenel-h)) no-repeat,
                linear-gradient(90deg, #000 0 60%, transparent 0) bottom left / calc(var(--merlon) * 5 / 3) var(--crenel-h) repeat-x;
          mask: linear-gradient(#000 0 0) top / 100% calc(100% - var(--crenel-h)) no-repeat,
                linear-gradient(90deg, #000 0 60%, transparent 0) bottom left / calc(var(--merlon) * 5 / 3) var(--crenel-h) repeat-x;
}

/* ── the hero photo ──────────────────────────────────────────────────────── */
.hero-image { margin: 0; background: var(--lake-deep); overflow: hidden; }
.hero-image img { width: 100%; height: min(100vw / 1.8, 74vh); min-height: 12rem; object-fit: cover; object-position: 50% 55%; }

/* ── home ────────────────────────────────────────────────────────────────── */
.hero h1 { font-size: clamp(2rem, 1.3rem + 2.6vw, 3.2rem); max-width: 14em; margin: 0; }
@media (min-width: 60rem) { .hero .lead { padding-top: .35rem; } }
.hero .lead { margin: 0; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1.4rem; }

.band { padding-block: clamp(2.5rem, 5vw, 4.5rem); }
.band-flush { padding-top: 0; padding-bottom: 1rem; }
.band-soft { background: var(--lake-soft); }
.band-join { background: var(--lake); color: #fff; }
.band-join h2 { color: #fff; }
.band-join p { max-width: 36em; }
.join-action { text-align: left; }
.join-action span { font-family: var(--sans); color: #d5e5e8; font-size: 1rem; }
.split { display: grid; gap: 2rem 4rem; }
@media (min-width: 56rem) {
  .split { grid-template-columns: 1fr 1fr; align-items: start; }
  .split-pre { grid-template-columns: 5fr 7fr; }
  .pre-intro { position: sticky; top: 1.5rem; }
  .band-join .split { align-items: center; }
  .join-action { text-align: right; }
}

.feature { display: grid; gap: 1.8rem 4rem; align-items: center; }
@media (min-width: 56rem) {
  .feature { grid-template-columns: 1fr 1fr; }
  .feature-flip .feature-image { order: 2; }
}
.feature-image { margin: 0; }
.feature-image img { width: 100%; border-radius: 3px; }
.feature-text { max-width: 34rem; }
.feature-text h2 { margin-bottom: .6rem; }
.kicker { margin: 0 0 .3rem; }
.kicker { font: 500 1.05rem var(--sans); color: var(--brick); }
.links { display: flex; flex-wrap: wrap; gap: .4rem 1.5rem; font: 500 1.05rem var(--sans); }
.band-news { padding-bottom: clamp(2rem, 4vw, 3.5rem); }
.news-home { display: grid; gap: 2rem 3.5rem; }
@media (min-width: 60rem) { .news-home { grid-template-columns: 7fr 5fr; } }
.lead-post img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 3px; margin-bottom: .9rem; }
.lead-post time, .post-list time, .meta time { color: var(--brick); font-size: 1rem; }
.lead-post h3 { font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem); margin-top: .2rem; }
.lead-post h3 a { color: inherit; text-decoration: none; }
.lead-post h3 a:hover { color: var(--brick); }
.lead-post p { color: var(--muted); max-width: 36em; }
.more { margin-top: 1.5rem; }

/* ── lists of articles ───────────────────────────────────────────────────── */
.post-list { list-style: none; margin: 0; padding: 0; }
.post-list li { border-top: 1px solid var(--line); padding-block: 1rem; display: grid; grid-template-columns: 7.5rem minmax(0, 1fr); gap: 1rem; align-items: start; position: relative; }
.post-list li:last-child { border-bottom: 1px solid var(--line); }
.post-list a { display: flex; flex-direction: column; gap: .15rem; text-decoration: none; color: inherit; }
.post-list a::after { content: ""; position: absolute; inset: 0; }   /* the whole line is clickable */
.post-list a:hover .item-title { color: var(--brick); text-decoration: underline; text-decoration-thickness: 1px; }
.post-list .thumb { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 2px; background: var(--lake-soft); }
.thumb-empty { display: block; background:
  linear-gradient(90deg, var(--lake-soft) 0 60%, transparent 0) 0 38% / 1.25rem 18% repeat-x,
  linear-gradient(var(--lake-soft) 0 38%, #b9ccd2 0); }
.item-text { min-width: 0; }
.item-title { font-size: 1.22rem; font-weight: 700; line-height: 1.25; color: var(--lake-deep); overflow-wrap: anywhere; }
.post-list p { overflow-wrap: anywhere; margin: .4rem 0 0; color: var(--muted); font-size: 1.05rem; max-width: 42em; }
.post-list.compact li { grid-template-columns: 5.5rem minmax(0, 1fr); }
.post-list.compact li:first-child { border-top: 0; padding-top: 0; }
.post-list.compact .item-title { font-size: 1.12rem; }
@media (max-width: 35.99rem) {
  .post-list li { grid-template-columns: 5.5rem minmax(0, 1fr); }
}
.band-soft .post-list li { border-color: #c5d4d8; }

.page-head { padding-block: clamp(2rem, 5vw, 3.5rem) 1.5rem; }
.news-list .year { display: grid; gap: 0 2rem; margin-bottom: 2.5rem; }
.news-list .year h2 { color: var(--brick); font-size: 1.8rem; margin: 0 0 .6rem; }
@media (min-width: 56rem) {
  .news-list .year { grid-template-columns: 8rem 1fr; }
  .news-list .year h2 { position: sticky; top: 1rem; align-self: start; padding-top: .8rem; }
}
.news-list .year[hidden] { display: none; }
.post-list li[hidden] { display: none; }

.filter { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.4rem; }
.filter[hidden] { display: none; }
.filter button {
  font: 500 1rem/1.2 var(--sans); padding: .45rem .85rem; border-radius: 999px; cursor: pointer;
  border: 1px solid #a9bdc2; background: #fff; color: var(--lake-deep);
}
.filter button:hover { border-color: var(--lake); }
.filter button[aria-pressed="true"] { background: var(--lake); border-color: var(--lake); color: #fff; }
.filter-count { color: var(--muted); font-size: 1rem; margin: .8rem 0 0; min-height: 1.6em; }

/* ── article ─────────────────────────────────────────────────────────────── */
.article-width { --wrap: 44rem; }
.article { --wrap: 44rem; padding-block: clamp(2rem, 5vw, 3.5rem) 2rem; }
.article-head h1 { font-size: clamp(1.9rem, 1.3rem + 2.4vw, 2.9rem); }
.crumb { margin: 0 0 .6rem; font-size: 1.02rem; }
.crumb a { text-decoration: none; }
.crumb a::before { content: "‹ "; }
.meta { margin: 0 0 .6rem; }
.topics { list-style: none; display: flex; flex-wrap: wrap; gap: .4rem; margin: 0 0 1.8rem; padding: 0; font-size: .95rem; }
.topics a { display: inline-block; padding: .15rem .6rem; border-radius: 999px; background: var(--meadow-soft); color: #36501a; text-decoration: none; }
.topics a:hover { background: #dde8cc; }
.article-image { margin: 0 0 2rem; }
.article-image img { border-radius: 3px; }

.prose { overflow-wrap: anywhere; }
.prose > * { margin-block: 0 1.1em; }
.prose h2 { font-size: 1.6rem; margin-top: 1.8em; }
.prose h3 { font-size: 1.3rem; margin-top: 1.5em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin-bottom: .35em; }
.prose li::marker { color: var(--brick); }
.prose figure { margin-inline: 0; }
.prose figure img { border-radius: 3px; margin-inline: auto; }
figcaption, .caption { font-size: .98rem; font-family: var(--sans); font-weight: 500; color: var(--muted); margin-top: .5rem; line-height: 1.4; }
.prose hr { border: 0; height: var(--crenel-h); margin-block: 2.2em;
  background: linear-gradient(90deg, var(--line) 0 60%, transparent 0) center / calc(var(--merlon) * 5 / 3) 100% repeat-x;
  width: calc(var(--merlon) * 5 / 3 * 5 - var(--merlon) * 2 / 3); max-width: 100%; }
.prose blockquote, blockquote { margin: 1.5em 0; padding: .2em 0 .2em 1.2rem; border-left: 3px solid var(--meadow); font-style: italic; }
blockquote footer { font: 500 .98rem var(--sans); font-style: normal; color: var(--muted); }
.prose video { width: 100%; border-radius: 3px; background: #000; }

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

.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr)); gap: .6rem; margin-block: 0 1.5em; }
.gallery-wide { grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: .8rem; }
.gallery figure { margin: 0; }
.gallery img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 2px; }
.gallery-wide img { aspect-ratio: 2 / 1; }

.embed { position: relative; aspect-ratio: 16 / 9; background: var(--lake-deep); color: #dfeaed; border-radius: 3px; display: grid; place-content: center; gap: .8rem; padding: 1rem; text-align: center; }
.embed-load { justify-self: center; display: flex; align-items: center; gap: .7rem; font: 700 1.15rem var(--sans); color: #fff; text-decoration: none; cursor: pointer; padding: .4rem .6rem; }
.embed .play { width: 3.4rem; height: 3.4rem; border-radius: 50%; background: #fff; position: relative; flex: none; }
.embed .play::after { content: ""; position: absolute; left: 1.35rem; top: 1.05rem; border-left: 1.1rem solid var(--lake-deep); border-block: .65rem solid transparent; }
.embed-load:hover .play { background: #e8f0d9; }
.embed p { margin: 0; font: 500 .95rem var(--sans); max-width: 30rem; }
.embed a { color: #fff; }
.embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; border-radius: 3px; }
.embed:has(> iframe) > p { display: none; }   /* loaded: the note and its link go */
@media (max-width: 30rem) { .embed p { display: none; } }

.pager { display: grid; gap: 1rem; padding-block: 1rem 3.5rem; --wrap: 44rem; }
@media (min-width: 40rem) { .pager { grid-template-columns: 1fr 1fr; } .pager-older { text-align: right; } }
.pager a { display: block; padding: .9rem 1rem; border: 1px solid var(--line); border-radius: 3px; text-decoration: none; color: var(--lake-deep); line-height: 1.3; }
.pager a:hover { border-color: var(--lake); color: var(--brick); }
.pager span { display: block; font-size: .95rem; color: var(--muted); margin-bottom: .2rem; }

/* ── the Pré ─────────────────────────────────────────────────────────────── */
.timeline { list-style: none; margin: 0; padding: 0; position: relative; --rail: 1.05rem; }
.timeline::before { content: ""; position: absolute; left: calc(var(--rail) - 1px); top: .9rem; bottom: 1.6rem; width: 2px; background: #9bb07a; }
.timeline li { position: relative; padding: 0 0 1.55rem calc(var(--rail) * 2 + .4rem); }
.timeline li::before {  /* a merlon on the rail */
  content: ""; position: absolute; left: calc(var(--rail) - .45rem); top: .42rem; width: .9rem; height: .9rem;
  background: var(--meadow); box-shadow: 0 0 0 4px var(--rail-bg, var(--paper));
}
.band-soft .timeline { --rail-bg: var(--meadow-soft); }
.timeline .when { display: block; font: 700 1.2rem/1.3 var(--serif); color: var(--brick); letter-spacing: .01em; }
.timeline p { margin: .15rem 0 0; max-width: 34em; }
.timeline a { font: 500 1rem var(--sans); white-space: nowrap; }
.timeline-now p { font-weight: 600; color: var(--lake-deep); }
.timeline-now::before { background: var(--brick) !important; width: 1.15rem !important; height: 1.15rem !important; left: calc(var(--rail) - .575rem) !important; top: .3rem !important; }
@media (min-width: 40rem) {
  .timeline { --rail: 9.5rem; }
  .timeline li { padding-left: calc(var(--rail) + 1.6rem); min-height: 2.6rem; }
  .timeline .when { position: absolute; left: 0; top: .02rem; width: calc(var(--rail) - 1.4rem); text-align: right; }
  .timeline p { margin-top: 0; }
}
.timeline-after { margin: .2rem 0 0; padding-left: calc(var(--rail, 1.05rem) * 2 + .4rem); font-style: italic; color: var(--muted); }
@media (min-width: 40rem) { .timeline-after { padding-left: calc(9.5rem + 1.6rem); } }
.decision { font: 500 1.05rem/1.35 var(--sans); margin-top: 1.4rem; }
.dossier { display: flex; gap: 1rem; align-items: center; margin-top: 1.8rem; text-decoration: none; font: 500 1.05rem/1.35 var(--sans); }
.dossier img { width: 5.5rem; border: 1px solid var(--line); border-radius: 2px; }


.films, .paintings { display: grid; gap: 1.2rem 1.5rem; }
@media (min-width: 48rem) { .paintings { grid-template-columns: 1fr 1fr; align-items: start; } }
.films { max-width: 54rem; }   /* one film, from a 854 px source: kept at a size it holds */
.films figure, .paintings figure { margin: 0; }
.films video { width: 100%; height: auto; border-radius: 3px; background: #000; }
.paintings img { width: 100%; aspect-ratio: 1.3; object-fit: cover; border-radius: 3px; }

.through { list-style: none; margin: 1.5rem 0 0; padding: 0; display: grid; gap: 1.8rem 1.5rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr)); }
.through figure { margin: 0; }
.through img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; object-position: 50% 20%; border-radius: 2px; box-shadow: 0 1px 0 #d3dde0; }
.through figcaption { margin-top: .6rem; }
.through .when { display: block; font: 700 1.1rem var(--serif); color: var(--brick); margin-bottom: .15rem; }

/* the Pré page, for the authorities: bases, case law, means of action */
.band-authorities { background: var(--lake-soft); }
.aut-grid { display: grid; gap: 1rem 4rem; margin-top: 1.5rem; }
@media (min-width: 60rem) { .aut-grid { grid-template-columns: 7fr 5fr; } }
.aut-grid h3 { font-size: 1.35rem; margin: 1.2rem 0 .7rem; color: var(--lake-deep); }
.aut-list { margin: 0; }
.aut-list > div { padding: .8rem 0; border-top: 1px solid #c5d4d8; }
.aut-list dt { font-weight: 700; color: var(--lake-deep); }
.aut-list dd { margin: .15rem 0 0; }
.aut-list a, .aut-tools a { font: 500 1rem var(--sans); }
.aut-cases { list-style: none; padding: 0; margin: 0; }
.aut-cases li { padding: .55rem 0; border-top: 1px solid #c5d4d8; }
.aut-cases strong { display: block; font: 700 1rem var(--sans); color: var(--brick); }
.aut-tools { list-style: none; padding: 0; margin: 0; }
.aut-tools li { position: relative; padding: .8rem 0 .8rem 1.8rem; border-top: 1px solid #c5d4d8; }
.aut-tools li::before { content: ""; position: absolute; left: 0; top: 1.15rem; width: .8rem; height: .8rem; background: var(--meadow); }
.aut-tools strong { display: block; color: var(--lake-deep); }
.aut-contact { margin-top: 1.4rem; font: 500 1.05rem var(--sans); }
.aut-contact a { white-space: nowrap; }

/* ── then and now: one image over the other, the seam follows the range input ── */
.compare { margin: 1.4rem 0 0; }
.compare-frame { position: relative; aspect-ratio: 2 / 1; overflow: hidden; border-radius: 3px; background: var(--lake-deep); --pos: 50%;
  box-shadow: 0 18px 40px -24px rgb(19 52 64 / .55); }
.compare-frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.compare-then { position: absolute; inset: 0; clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
.compare-handle { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 3px; margin-left: -1.5px; background: #fff; box-shadow: 0 0 12px rgb(0 0 0 / .35); pointer-events: none; }
.compare-handle::after { content: "‹ ›"; position: absolute; top: 50%; left: 50%; translate: -50% -50%; width: 2.9rem; height: 2.9rem; border-radius: 50%;
  background: #fff; color: var(--lake-deep); display: grid; place-items: center; font: 700 1.05rem/1 var(--sans); letter-spacing: .12em; box-shadow: 0 2px 10px rgb(0 0 0 / .3); }
.compare-label { position: absolute; bottom: .8rem; padding: .3rem .7rem; border-radius: 3px; background: rgb(19 52 64 / .78); color: #fff; font: 500 .95rem var(--sans); pointer-events: none; }
.compare-label-then { left: .8rem; }
.compare-label-now { right: .8rem; }
.compare-range { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; touch-action: pan-y; }
.compare-range:focus-visible + * , .compare-frame:has(.compare-range:focus-visible) { outline: 3px solid #d08a2e; outline-offset: 3px; }
.compare figcaption { margin-top: .6rem; }
@media (max-width: 40rem) { .compare-frame { aspect-ratio: 3 / 2; } .compare-label { font-size: .85rem; } }

.facts { list-style: none; margin: 0; padding: 0; }
.facts li { padding: .9rem 0 .9rem 1.8rem; border-top: 1px solid #c9d6b4; position: relative; }
.facts li::before { content: ""; position: absolute; left: 0; top: 1.3rem; width: .8rem; height: .8rem; background: var(--meadow); }
.facts strong { display: block; color: #36501a; font-size: 1.15rem; }

/* the hero photo settles slowly into place, once */
@media (prefers-reduced-motion: no-preference) {
  .hero-image img { animation: settle 14s cubic-bezier(.2, .6, .2, 1) both; transform-origin: 50% 60%; }
  @keyframes settle { from { transform: scale(1.08); } to { transform: scale(1); } }
}

/* the invitation to join: text over the château in winter, darkened on the text side */
.band-join { position: relative; overflow: hidden; isolation: isolate; padding-block: clamp(4rem, 9vw, 7rem) clamp(4.5rem, 9vw, 7.5rem); }
.band-join .join-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 60% 45%; z-index: -2; }
.band-join::before { content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(90deg, rgb(19 52 64 / .92) 0%, rgb(19 52 64 / .78) 45%, rgb(19 52 64 / .25) 100%); }
@media (max-width: 47.99rem) { .band-join::before { background: rgb(19 52 64 / .8); } }
.join-inner { max-width: min(100% - 2 * var(--gut), var(--wrap)); }
.join-inner > * { max-width: 32rem; }
.band-join .join-action { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1.2rem; margin-top: 1.4rem; text-align: left; }
.facts-row { margin-top: clamp(1.8rem, 4vw, 2.6rem); }
@media (min-width: 56rem) { .facts-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 2.5rem; } }

/* home: one opening section — the view, the association, the Pré's good news */
.hero { padding-bottom: clamp(2.5rem, 5vw, 4rem); }
.hero-body { display: grid; gap: 2rem 4rem; padding-top: clamp(1.8rem, 4vw, 2.8rem); }
@media (min-width: 60rem) { .hero-body { grid-template-columns: 6fr 5fr; align-items: start; } }
.hero-intro h1 { font-size: clamp(2.2rem, 1.3rem + 3vw, 3.5rem); margin-bottom: .8rem; max-width: 12em; }
.hero-intro .lead { margin: 0; }
.hero-news { background: var(--meadow-soft); border-left: 4px solid var(--meadow); padding: 1.3rem 1.5rem .6rem; border-radius: 0 3px 3px 0; }
.hero-news h2 { font-size: clamp(1.4rem, 1.2rem + .8vw, 1.8rem); color: #36501a; margin-bottom: .6rem; }
.hero-news p { font-size: 1.05rem; }
.hero .facts-row { margin-top: clamp(1.8rem, 4vw, 2.6rem); }
.hero .facts li { border-top-color: var(--line); }

/* ── history ── */
.history-head { background: linear-gradient(180deg, #f4efe4, #fbf9f4); padding-block: clamp(2rem, 5vw, 3.5rem); border-bottom: 1px solid #e3dccb; }
.history-head-inner { display: grid; gap: 1.5rem 3.5rem; align-items: center; }
@media (min-width: 60rem) { .history-head-inner { grid-template-columns: 5fr 6fr; } }
.history-head .lead { margin: .4rem 0 0; }
.history-engraving { margin: 0; }
.history-engraving img { width: 100%; border-radius: 2px; box-shadow: 0 16px 36px -22px rgb(60 40 10 / .55); }
.history-engraving figcaption { margin-top: .5rem; }

.band-landmarks { padding-block: clamp(2rem, 4vw, 3rem); }
.landmarks { list-style: none; margin: 1rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 12.5rem), 1fr)); gap: 1.6rem 1.2rem; overflow: hidden; }
.landmarks li { position: relative; padding-top: 1.6rem; }
.landmarks li::before { content: ""; position: absolute; top: .45rem; left: 0; right: -1.2rem; height: 2px; background: #c9b89a; }
.landmarks li:last-child::before { right: 0; }
.landmarks li::after { content: ""; position: absolute; top: .1rem; left: 0; width: .8rem; height: .8rem; background: var(--brick); }
.landmarks li:last-child::after { background: var(--meadow); }
.landmarks .when { display: block; font: 700 1.35rem var(--serif); color: var(--brick); }
.landmarks p { margin: .2rem 0 0; font-size: 1rem; line-height: 1.45; color: var(--ink); }

.history-text { padding-top: clamp(2rem, 4vw, 3rem); }
.legend-figure { display: grid; gap: 1rem 2rem; align-items: center; background: #f7f3ea; padding: 1.2rem; border-radius: 3px; }
@media (min-width: 40rem) { .legend-figure { grid-template-columns: 1.3fr 1fr; } }
.legend-figure figure { margin: 0; }
.legend-figure ol { margin: 0; font-size: 1rem; }
.prose .wide-figure { margin-inline: 0; }
.prose .wide-figure img { background: #fff; padding: .6rem; border: 1px solid var(--line); }
.stages { display: grid; gap: 1rem 1.5rem; }
@media (min-width: 40rem) { .stages { grid-template-columns: repeat(3, 1fr); } }
.stages section { border-top: 3px solid var(--brick); padding-top: .6rem; }
.stages h3 { margin: 0 0 .4rem; font-size: 1.2rem; color: var(--brick); }
.stages ol { margin: 0; padding-left: 1.2em; font-size: 1rem; }
.references { font: 500 .95rem/1.5 var(--sans); color: var(--muted); border-top: 1px solid var(--line); padding-top: 1rem; margin-top: 2rem; }

/* ── association: a photograph beside the goal ── */
.association-head { display: grid; gap: 1.5rem 3rem; align-items: center; }
@media (min-width: 60rem) { .association-head { grid-template-columns: 1fr 1fr; } }
.association-photo { margin: 0; }
.association-photo img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 3px; box-shadow: 0 16px 36px -24px rgb(19 52 64 / .6); }

/* ── association ─────────────────────────────────────────────────────────── */
.goal { max-width: 40em; font-size: clamp(1.25rem, 1.1rem + .6vw, 1.55rem); line-height: 1.45; margin: .5rem 0 0; }
.join { background: var(--lake-soft); padding: clamp(1.2rem, 3vw, 2rem); border-radius: 3px; }
.join p { margin-bottom: 1rem; }
.join label { display: block; font-size: 1rem; margin-bottom: .25rem; color: var(--lake-deep); }
.join label span { color: var(--muted); }
.join input, .join textarea { width: 100%; font: inherit; font-size: 1.05rem; padding: .55rem .7rem; border: 1px solid #9fb3b9; border-radius: 3px; background: #fff; color: var(--ink); }
.join input:focus-visible, .join textarea:focus-visible { outline-offset: 0; }
.join-intro, .join-note { font: 500 1rem var(--sans); color: var(--muted); }
.join-note { margin: 0; }
.committee { display: grid; grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr)); gap: 1.2rem 2rem; margin: 0 0 1.5rem; }
.committee dt { font: 500 1rem var(--sans); color: var(--brick); }
.committee dd { margin: 0; font-size: 1.25rem; font-weight: 700; color: var(--lake-deep); }
.docs { list-style: none; padding: 0; margin: 0; columns: 22rem 2; column-gap: 3rem; }
.docs li { break-inside: avoid; padding: .45rem 0; border-bottom: 1px solid var(--line); }
.docs span { color: var(--muted); font-size: .9rem; }
.note { color: var(--muted); font-size: 1rem; margin-top: .7rem; }

/* ── footer ──────────────────────────────────────────────────────────────── */
.colophon { background: var(--lake-deep); color: #d9e7ea; padding-block: calc(var(--crenel-h) + 2.2rem) 2rem; margin-top: 0;
  -webkit-mask: linear-gradient(#000 0 0) bottom / 100% calc(100% - var(--crenel-h)) no-repeat,
                linear-gradient(90deg, #000 0 60%, transparent 0) top left / calc(var(--merlon) * 5 / 3) var(--crenel-h) repeat-x;
          mask: linear-gradient(#000 0 0) bottom / 100% calc(100% - var(--crenel-h)) no-repeat,
                linear-gradient(90deg, #000 0 60%, transparent 0) top left / calc(var(--merlon) * 5 / 3) var(--crenel-h) repeat-x; }
.colophon a { color: #fff; }
.colophon-inner { display: grid; gap: 1.5rem 3rem; }
@media (min-width: 48rem) { .colophon-inner { grid-template-columns: 1.3fr 1fr; } }
.colophon-name { font-weight: 700; font-size: 1.2rem; color: #fff; margin-bottom: .4rem; }
.colophon-links { list-style: none; margin: 0; padding: 0; columns: 2; font-family: var(--sans); font-weight: 500; }
.colophon-links li { padding-block: .2rem; }
.colophon-end { font: 500 .95rem var(--sans); color: #a9c3c9; margin: 0; }
.to-top { font: 500 .95rem var(--sans); justify-self: start; }
@media (min-width: 48rem) { .to-top { justify-self: end; } }

/* ── image viewer ────────────────────────────────────────────────────────── */
.viewer { border: 0; padding: 0; margin: 0; max-width: none; max-height: none; width: 100%; height: 100%; background: rgb(10 22 27 / .96); color: #fff; }
.viewer::backdrop { background: rgb(10 22 27 / .96); }
.viewer[open] { display: grid; grid-template-rows: 1fr auto; }
.viewer figure { margin: 0; display: grid; place-items: center; min-height: 0; padding: 3.5rem .5rem .5rem; }
.viewer img { max-width: 100%; max-height: calc(100vh - 8rem); width: auto; height: auto; object-fit: contain; }
.viewer figcaption { color: #d7e3e6; text-align: center; padding: .6rem 1rem 1rem; }
.viewer button { position: absolute; font: 500 1rem var(--sans); color: #fff; background: rgb(255 255 255 / .12); border: 0; border-radius: 3px; padding: .6rem .9rem; cursor: pointer; }
.viewer button:hover { background: rgb(255 255 255 / .25); }
.viewer .v-close { top: .7rem; right: .7rem; }
.viewer .v-prev { left: .7rem; top: 50%; translate: 0 -50%; }
.viewer .v-next { right: .7rem; top: 50%; translate: 0 -50%; }
.viewer .v-count { position: absolute; top: 1.2rem; left: 1rem; font: 500 .95rem var(--sans); color: #b9cbd0; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
@media print {
  .masthead nav, .colophon, .filter, .pager, .embed-load { display: none; }
  .colophon, .hero-image { -webkit-mask: none; mask: none; }
}

/* after the winter photo, the footer's battlements stand against the photo, not against white */
main:has(> .band-join:last-child) + .colophon { margin-top: calc(-1 * var(--crenel-h)); position: relative; }

/* page to page: a cross-fade where the browser can (view transitions; others just change page) —
   the qry stack's motion signature (--qry-speed, --qry-ease) */
@media (prefers-reduced-motion: no-preference) { @view-transition { navigation: auto; } }
::view-transition-group(root) { animation-duration: var(--qry-speed, .2s); animation-timing-function: var(--qry-ease, cubic-bezier(.2, .7, .2, 1)); }
