:root {
  --linen: #f2ebdf;
  --card: #ede4d5;
  --card-edge: #ddd0bc;
  --ink: #3a2e26;
  --muted: #7b6b5e;
  --rose: #a8787a;
  --oak: #7d5a3c;
  --gold: #b38f4c;
  --silver: #9c9892;
  --bronze: #9a6a46;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --r: 12px;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--linen);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.5;
  padding: 0 16px 72px;
  -webkit-font-smoothing: antialiased;
}
main, .bar-inner { max-width: 1040px; margin: 0 auto; }

/* Cinzel, served from our own server (SIL Open Font Licence, assets/fonts/Cinzel-OFL.txt) */
@font-face {
  font-family: "Cinzel"; font-style: normal; font-weight: 400 900; font-display: swap;
  src: url(/assets/fonts/cinzel-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Cinzel"; font-style: normal; font-weight: 400 900; font-display: swap;
  src: url(/assets/fonts/cinzel-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Top bar: name on the left, menu and language on the right; stays on screen */
.bar {
  position: sticky; top: 0; z-index: 20;
  background: var(--linen); border-bottom: 1px solid var(--card-edge);
  margin: 0 -16px; padding: 0 16px;
  transition: box-shadow .2s;
}
.bar.scrolled { box-shadow: 0 6px 18px rgb(58 46 38 / .08); }
.bar-inner {
  display: grid; grid-template-columns: auto 1fr auto auto; grid-template-areas: "brand . menu lang";
  align-items: center; column-gap: 8px; height: 76px;
}
.bar .home-logo { grid-area: brand; display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); min-width: 0; }
.bar .home-logo img { height: 48px; width: auto; display: block; }
.brand-text { display: flex; flex-direction: column; gap: 5px; padding-left: 14px; border-left: 1px solid var(--card-edge); }
.brand-name { font-family: "Cinzel", var(--serif); font-weight: 600; font-size: 1.3rem; letter-spacing: .05em; line-height: 1; white-space: nowrap; }
.brand-org { font-size: .66rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); line-height: 1; white-space: nowrap; }
.menu { grid-area: menu; display: flex; gap: 26px; margin-right: 18px; }
.menu a {
  position: relative; font-weight: 600; font-size: .92rem; letter-spacing: .01em; color: var(--muted); text-decoration: none;
  padding: 8px 0; transition: color .2s;
}
.menu a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; border-radius: 1px;
  background: var(--rose); transform: scaleX(0); transition: transform .25s cubic-bezier(.2, .8, .2, 1);
}
.menu a:hover { color: var(--ink); }
.menu a[aria-current="page"] { color: var(--ink); }
.menu a[aria-current="page"]::after { transform: scaleX(1); }
.lang { grid-area: lang; position: relative; padding-left: 10px; border-left: 1px solid var(--card-edge); }
.lang-btn {
  appearance: none; border: 0; background: none; cursor: pointer; color: var(--muted);
  display: flex; align-items: center; gap: 5px; padding: 8px 10px; border-radius: 999px;
  font: inherit; font-size: .85rem; font-weight: 600; letter-spacing: .04em;
  transition: background-color .2s;
}
.lang-btn:hover, .lang-btn[aria-expanded="true"] { background: var(--card); color: var(--ink); }
.lang-btn svg { width: 18px; height: 18px; }
.lang-menu {
  position: absolute; right: 0; top: calc(100% + 10px); z-index: 10; min-width: 190px;
  background: var(--linen); border: 1px solid var(--card-edge); border-radius: var(--r);
  box-shadow: 0 10px 30px rgb(58 46 38 / .14); padding: 6px;
  opacity: 0; transform: translateY(-4px) scale(.98); transform-origin: top right;
  pointer-events: none; visibility: hidden;
  transition: opacity .16s, transform .16s, visibility 0s .16s;
}
.lang-btn[aria-expanded="true"] + .lang-menu {
  opacity: 1; transform: none; pointer-events: auto; visibility: visible;
  transition: opacity .16s, transform .16s, visibility 0s;
}
.lang-menu button {
  appearance: none; border: 0; background: none; width: 100%; cursor: pointer; text-align: left;
  display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px;
  font: inherit; font-size: .95rem; color: var(--ink);
}
.lang-menu button:hover, .lang-menu button:focus-visible { background: var(--card); outline: none; }
.lang-menu button span { flex: 1; }
.lang-menu img { width: 22px; height: 15px; border-radius: 2px; object-fit: cover; box-shadow: 0 0 0 1px rgb(0 0 0 / .08); }
.lang-menu svg { width: 16px; height: 16px; color: var(--oak); }

/* Phones: name and language on top, menu centred underneath */
@media (max-width: 720px) {
  .bar-inner { grid-template-columns: 1fr auto; grid-template-areas: "brand lang" "menu menu"; height: auto; row-gap: 8px; padding: 10px 0 0; }
  .bar .home-logo { gap: 10px; }
  .bar .home-logo img { height: 40px; }
  .brand-text { padding-left: 10px; gap: 4px; }
  .brand-name { font-size: 1.05rem; letter-spacing: .04em; }
  .brand-org { font-size: .58rem; letter-spacing: .12em; }
  .menu { justify-content: center; gap: 16px; padding: 2px 8px 0; border-top: 1px solid var(--card-edge); margin: 0 -16px; overflow-x: auto; scrollbar-width: none; }
  .menu::-webkit-scrollbar { display: none; }
  .menu a { padding: 10px 0; font-size: .86rem; white-space: nowrap; flex: none; }
  .lang { border-left: 0; padding-left: 0; }
}

/* Page headings */
.page-head { text-align: center; margin: 40px 0 32px; }
h1 {
  font-family: var(--serif);
  font-size: clamp(1.9rem, 5.5vw, 3.2rem);
  font-weight: 600; letter-spacing: -0.01em; line-height: 1.15;
  margin: 0 0 8px; text-wrap: balance;
}
.memorial { font-family: var(--serif); font-style: italic; color: var(--rose); margin: 0 0 4px; font-size: 1.1rem; }
.sub { color: var(--muted); margin: 0; }

h2 {
  font-family: var(--serif); font-weight: 600; font-size: clamp(1.4rem, 4vw, 1.8rem);
  text-align: center; margin: 0 0 24px;
}
h2::after {
  content: ""; display: block; width: 48px; height: 2px; margin: 12px auto 0;
  background: var(--rose); border-radius: 2px;
}
section { margin-top: 56px; }

/* Year buttons */
.years { display: flex; justify-content: center; gap: 6px; flex-wrap: wrap; margin: 0 0 32px; }
.years[hidden] { display: none; }
.years button {
  appearance: none; font: inherit; font-weight: 600; font-size: .95rem; font-variant-numeric: tabular-nums;
  color: var(--oak); background: none; border: 1px solid var(--card-edge);
  padding: 6px 16px; border-radius: 999px; cursor: pointer; transition: background-color .2s;
}
.years button:hover { background: var(--card); }
.years button[aria-pressed="true"] { background: var(--oak); border-color: var(--oak); color: var(--linen); }

/* Home */
.poster { margin: 0; }
.poster img { width: 100%; height: auto; border-radius: var(--r); display: block; }
.go { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; margin: 28px 0 0; }
.go a {
  font-weight: 600; text-decoration: none; color: var(--linen); background: var(--oak);
  padding: 12px 24px; border-radius: 999px; transition: background-color .2s;
}
.go a.alt { background: none; color: var(--oak); box-shadow: inset 0 0 0 1px var(--card-edge); }
.go a:hover { background: var(--ink); }
.go a.alt:hover { background: var(--card); }
.org { margin: 24px auto 0; max-width: 560px; text-align: center; color: var(--muted); text-wrap: balance; }
.sponsors { max-width: 640px; margin: 28px auto 0; text-align: center; color: var(--muted); font-size: .85rem; }
.sponsors h3 {
  margin: 0 0 6px; font-size: .75rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--oak);
}
.sponsors ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; column-gap: 22px; row-gap: 2px; line-height: 1.8; }
.sponsors li { white-space: nowrap; }

.summary { max-width: 680px; margin: 28px auto 0; text-align: center; font-family: var(--serif); font-size: 1.12rem; line-height: 1.6; text-wrap: pretty; }

/* News */
.news-item { max-width: 720px; margin: 0 auto; }
.news-item + .news-item { margin-top: 48px; padding-top: 40px; border-top: 1px solid var(--card-edge); }
.news-item time { display: block; color: var(--muted); font-size: .85rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; margin: 0 0 8px; }
.news-item h2 { text-align: left; font-size: clamp(1.4rem, 3.6vw, 1.9rem); line-height: 1.25; margin: 0 0 20px; text-wrap: balance; }
.news-item h2::after { margin: 14px 0 0; }
.news-item p { margin: 0 0 16px; font-family: var(--serif); font-size: 1.08rem; line-height: 1.7; text-wrap: pretty; }
.news-item .original { font-family: var(--sans); font-size: .85rem; color: var(--muted); font-style: italic; }
.news-item .more a { font-family: var(--sans); font-weight: 600; font-size: .95rem; color: var(--oak); text-decoration: none; border-bottom: 1px solid var(--card-edge); }
.news-item .more a:hover { border-bottom-color: var(--oak); }

/* Home: latest news */
.latest { margin-top: 56px; }
.latest-list { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); max-width: 1040px; margin: 0 auto; }
.latest-list:has(> :only-child) { max-width: 720px; }
.latest-item {
  display: block; text-decoration: none; color: var(--ink);
  background: var(--card); border: 1px solid var(--card-edge); border-radius: var(--r); padding: 22px 24px;
  transition: border-color .2s, transform .2s;
}
.latest-item:hover { border-color: var(--rose); transform: translateY(-2px); }
.latest-item time { display: block; color: var(--muted); font-size: .8rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; margin: 0 0 8px; }
.latest-item h3 { font-family: var(--serif); font-size: 1.3rem; font-weight: 600; line-height: 1.3; margin: 0 0 10px; text-wrap: balance; }
.latest-item p { font-family: var(--serif); font-size: 1rem; line-height: 1.6; color: var(--ink); margin: 0 0 14px; }
.latest-item .read { font-weight: 600; font-size: .92rem; color: var(--oak); }
.latest .all { text-align: center; margin: 18px 0 0; }
.latest .all a { font-weight: 600; font-size: .92rem; color: var(--oak); text-decoration: none; border-bottom: 1px solid var(--card-edge); }
.news-item { scroll-margin-top: 120px; }
.photo-strip { display: grid; gap: 8px; grid-template-columns: repeat(6, 1fr); }
.photo-strip a { display: block; aspect-ratio: 1; border-radius: 8px; overflow: hidden; background: var(--card); }
.photo-strip img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s cubic-bezier(.2, .8, .2, 1); }
.photo-strip a:hover img { transform: scale(1.04); }
@media (max-width: 720px) { .photo-strip { grid-template-columns: repeat(3, 1fr); } }
.grid button { scroll-margin-top: 120px; }
.go.left { justify-content: flex-start; margin-top: 8px; }

/* About */
.about { max-width: 720px; margin: 0 auto; }
.about > p { font-family: var(--serif); font-size: 1.12rem; line-height: 1.7; margin: 0 0 18px; text-wrap: pretty; }
.film { margin: 36px 0 0; }
.film-frame {
  position: relative; aspect-ratio: 16 / 9; border-radius: var(--r); overflow: hidden;
  background: var(--ink); border: 1px solid var(--card-edge); box-shadow: 0 10px 30px rgb(58 46 38 / .16);
}
.film-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.film-play { appearance: none; border: 0; padding: 0; margin: 0; position: absolute; inset: 0; width: 100%; cursor: pointer; background: none; }
.film-play img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s cubic-bezier(.2, .8, .2, 1); }
.film-play:hover img { transform: scale(1.02); }
.film-btn {
  position: absolute; left: 50%; top: 50%; width: 78px; height: 78px; margin: -39px 0 0 -39px; border-radius: 50%;
  display: grid; place-items: center; background: var(--linen); color: var(--oak);
  box-shadow: 0 6px 24px rgb(0 0 0 / .3); transition: transform .25s cubic-bezier(.2, .8, .2, 1);
}
.film-btn svg { width: 34px; height: 34px; margin-left: 4px; }
.film-play:hover .film-btn, .film-play:focus-visible .film-btn { transform: scale(1.08); }
.film-note {
  position: absolute; right: 12px; bottom: 12px; padding: 4px 10px; border-radius: 999px;
  background: rgb(242 235 223 / .92); color: var(--ink); font-size: .75rem; font-weight: 600;
}
.film figcaption { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 12px; font-size: .9rem; color: var(--muted); }
.film figcaption span { font-family: var(--serif); font-style: italic; }
.film figcaption a { font-weight: 600; color: var(--oak); text-decoration: none; border-bottom: 1px solid var(--card-edge); }
.foot-links { margin: 0 0 10px !important; }
.foot-links a { font-weight: 600; color: var(--oak); text-decoration: none; }
.foot-links a:hover, .foot-links a[aria-current="page"] { color: var(--ink); }

/* Results */
.categories { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.cat { background: var(--card); border: 1px solid var(--card-edge); border-radius: var(--r); padding: 20px 20px 8px; }
.cat h3 { font-family: var(--serif); font-size: 1.2rem; font-weight: 600; color: var(--oak); margin: 0 0 8px; }
.cat ol { list-style: none; margin: 0; padding: 0; }
.cat li {
  display: grid; grid-template-columns: 32px 1fr auto; gap: 12px; align-items: start;
  padding: 12px 0; border-top: 1px solid var(--card-edge);
}
.cat li:first-child { border-top: 0; }
.place {
  width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center;
  font-weight: 700; font-size: .95rem; color: #fff; font-variant-numeric: tabular-nums;
  background: var(--muted);
}
.p1 { background: var(--gold); }
.p2 { background: var(--silver); }
.p3 { background: var(--bronze); }
.who { min-width: 0; }
.name { font-weight: 600; display: block; }
.from { color: var(--muted); font-size: .9rem; display: flex; align-items: center; gap: 6px; }
.from img { width: 18px; height: 12px; border-radius: 2px; object-fit: cover; flex: none; box-shadow: 0 0 0 1px rgb(0 0 0 / .08); }
.members { color: var(--muted); font-size: .85rem; display: block; margin-top: 2px; }
.score { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.score b { font-family: var(--serif); font-size: 1.5rem; font-weight: 600; display: block; line-height: 1.1; }
.score span { color: var(--muted); font-size: .8rem; }

/* Gallery */
.occasion + .occasion { margin-top: 40px; }
.occasion h3 { font-family: var(--serif); font-weight: 600; font-size: 1.25rem; margin: 0; color: var(--oak); }
.occasion time { color: var(--muted); font-size: .9rem; display: block; margin: 0 0 12px; }
.grid { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.grid button {
  appearance: none; border: 0; padding: 0; margin: 0; background: var(--card);
  border-radius: 8px; overflow: hidden; cursor: zoom-in; aspect-ratio: 3 / 2;
}
.grid img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s cubic-bezier(.2, .8, .2, 1); }
.grid button:hover img { transform: scale(1.03); }

dialog.viewer {
  border: 0; padding: 0; margin: 0; max-width: none; max-height: none;
  width: 100vw; height: 100dvh; background: rgb(242 235 223 / .97);
  opacity: 0; transition: opacity .25s, overlay .25s allow-discrete, display .25s allow-discrete;
}
dialog.viewer[open] { opacity: 1; }
@starting-style { dialog.viewer[open] { opacity: 0; } }
dialog.viewer::backdrop { background: transparent; }
.viewer figure { margin: 0; height: 100%; display: grid; place-items: center; padding: 56px 16px; }
.viewer img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 8px; box-shadow: 0 8px 32px rgb(58 46 38 / .2); }
.viewer .btn {
  position: absolute; appearance: none; border: 1px solid var(--card-edge); background: var(--card);
  width: 44px; height: 44px; border-radius: 50%; cursor: pointer; color: var(--ink);
  display: grid; place-items: center; transition: background-color .2s;
}
.viewer .btn:hover { background: var(--card-edge); }
.viewer .btn svg { width: 20px; height: 20px; }
.viewer .close { top: 8px; right: 8px; }
.viewer .prev { left: 8px; top: 50%; transform: translateY(-50%); }
.viewer .next { right: 8px; top: 50%; transform: translateY(-50%); }
.viewer .count { position: absolute; bottom: 16px; left: 0; right: 0; text-align: center; color: var(--muted); font-size: .9rem; font-variant-numeric: tabular-nums; }

.status { text-align: center; color: var(--muted); }

/* Footer */
footer.foot {
  max-width: 1040px; margin: 72px auto 0; padding-top: 32px; border-top: 1px solid var(--card-edge);
  color: var(--muted); font-size: .95rem; text-align: center;
}
.contact { display: flex; justify-content: center; gap: 12px; margin: 0 0 16px; }
.contact a {
  width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center;
  color: var(--oak); background: var(--card); border: 1px solid var(--card-edge);
  transition: background-color .2s, color .2s;
}
.contact a:hover { background: var(--card-edge); color: var(--ink); }
.contact svg { width: 22px; height: 22px; }
.foot p { margin: 0; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}
