/* Memorial site: Maman Ndeuwa Suzanne. The printed faire-part, online. */

@font-face {
  font-family: "Montserrat";
  src: url("../fonts/montserrat-latin.woff2") format("woff2");
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Great Vibes";
  src: url("../fonts/great-vibes-latin.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --frame: #efe6dc;      /* the flyer's beige border */
  --sheet: #ffffff;
  --warm: #fdf6ee;       /* the flyer's warm lower wash */
  --ink: #1a1a1a;
  --ink-2: #4a4540;
  --ink-3: #6f6861;
  --past: #7a736c;
  --gold: #a67c3d;       /* rules and ornaments */
  --gold-text: #85602a;  /* gold that passes as text */
  --blush: #f6ddd5;
  --rule: #e9dfd3;

  --script: "Great Vibes", "Segoe Script", cursive;
  --sans: "Montserrat", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --gutter: clamp(1.25rem, 5vw, 2.75rem);
  --measure: 38rem;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 4rem; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--frame);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.55;
  padding: 8px;
}
img, svg { display: block; max-width: 100%; }
h1, h2, h3, p, ol, ul, figure { margin: 0; }
ol, ul { padding: 0; list-style: none; }
::selection { background: var(--blush); color: var(--ink); }
a { color: inherit; text-underline-offset: .2em; text-decoration-thickness: 1px; text-decoration-color: var(--gold); }
a:hover { color: var(--gold-text); }
:focus-visible { outline: 2px solid var(--gold-text); outline-offset: 3px; border-radius: 2px; }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 1rem; top: 1rem; z-index: 10; background: var(--sheet); padding: .5rem .75rem; }

.sheet {
  max-width: 46rem;
  margin: 0 auto;
  background: var(--sheet);
  min-height: calc(100vh - 16px);
  overflow: clip;
}
@media (min-width: 52rem) {
  body { padding: 1.5rem; }
  .sheet { box-shadow: 0 1px 2px rgba(80, 60, 30, .06), 0 12px 40px rgba(80, 60, 30, .08); }
}

/* ---------- Top bar: section links + language ---------- */
.bar {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; gap: .25rem;
  padding: 0 max(.5rem, calc(var(--gutter) - .5rem));
  background: rgba(255, 255, 255, .94);
  backdrop-filter: saturate(1.2) blur(6px);
  -webkit-backdrop-filter: saturate(1.2) blur(6px);
  border-bottom: 1px solid var(--rule);
  font-size: clamp(.78rem, 3.3vw, .875rem); font-weight: 600; letter-spacing: 0;
}
.bar nav { display: flex; flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; }
@media (max-width: 26rem) {
  .bar a { padding-inline: .4rem; }
  .lang a, .lang span { padding-inline: .3rem; }
  .bar nav { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - .75rem), transparent); mask-image: linear-gradient(to right, #000 calc(100% - .75rem), transparent); }
}
.bar nav::-webkit-scrollbar { display: none; }
.bar a { text-decoration: none; padding: .95rem .5rem; white-space: nowrap; color: var(--ink-2); }
.bar a:hover { color: var(--ink); }
.bar nav a[aria-current="true"] { color: var(--ink); box-shadow: inset 0 -2px 0 var(--gold); }
.lang { display: flex; align-items: center; flex: none; }
.lang a, .lang span { padding: .95rem .35rem; }
.lang [aria-current="page"] { color: var(--gold-text); font-weight: 800; }
.lang .sep { color: var(--rule); padding: 0; }

/* ---------- Cover ---------- */
.cover { padding: clamp(1.75rem, 6vw, 3.5rem) var(--gutter) 0; text-align: center; }
.cover h1 { font-weight: inherit; }
.obs {
  display: block;
  font-weight: 900; text-transform: uppercase;
  font-size: clamp(2.5rem, 11.5vw, 4.5rem);
  letter-spacing: .045em; line-height: 1;
  margin-right: -.045em;
}
.de {
  display: flex; align-items: center; justify-content: center; gap: .9rem;
  font-size: clamp(1.1rem, 4.6vw, 1.6rem); font-weight: 500; line-height: 1;
  margin: .55rem 0 0;
}
.de::before, .de::after { content: ""; height: 2px; width: min(30%, 9rem); background: var(--gold); }
.name {
  display: block;
  font-family: var(--script); font-weight: 400;
  font-size: clamp(2.9rem, 13.5vw, 5rem);
  line-height: 1.02;
  margin-top: .7rem;
}
.name span { display: block; }

.cover-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44%;
  align-items: start;
  gap: .5rem;
  margin-top: .4rem;
  text-align: center;
}
.cover-facts { padding-top: .6rem; }
.spouse { font-size: 1rem; line-height: 1.35; color: var(--ink); }
.spouse b { font-weight: 600; letter-spacing: .01em; white-space: nowrap; }
.years {
  font-weight: 800; color: var(--gold-text);
  font-size: clamp(1.55rem, 7vw, 2.4rem);
  line-height: 1.1; margin-top: .65rem;
  font-variant-numeric: lining-nums;
}
.ornament { width: min(100%, 11.5rem); height: auto; margin: .55rem auto 0; }

.portrait {
  position: relative;
  margin-right: calc(var(--gutter) * -1);
  aspect-ratio: 555 / 890;
  max-height: 34rem;
  -webkit-mask-image: linear-gradient(to bottom, #000 72%, transparent 100%), linear-gradient(to right, transparent 0, #000 12%);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(to bottom, #000 72%, transparent 100%), linear-gradient(to right, transparent 0, #000 12%);
  mask-composite: intersect;
}
.portrait img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 0; }

.next {
  margin: 1.5rem auto 0;
  max-width: 28rem;
  text-align: center;
}
.next h2 {
  display: flex; align-items: center; justify-content: center; gap: .75rem;
  font-size: .9375rem; font-weight: 600; color: var(--ink-2);
}
.next h2::before, .next h2::after { content: ""; height: 1.5px; flex: 1; max-width: 4.5rem; background: var(--gold); }
.next-when { margin-top: .5rem; font-weight: 800; font-size: 1.25rem; color: var(--gold-text); line-height: 1.25; }
.next-what { margin-top: .25rem; font-size: 1.0625rem; }
.next-where { color: var(--ink-2); font-size: .9375rem; }
.next-link { display: inline-block; margin-top: .6rem; font-weight: 700; font-size: .9375rem; }
.next[hidden] { display: none; }

.verse {
  margin: 2.25rem auto 0;
  max-width: 26rem;
  font-size: 1.0625rem; line-height: 1.5;
}
.verse cite {
  display: flex; align-items: center; justify-content: center; gap: .9rem;
  font-style: normal; font-size: .9375rem; margin-top: .9rem; color: var(--ink-2);
}
.verse cite::before, .verse cite::after { content: ""; height: 1.5px; width: 4rem; background: var(--gold); }

.flowers {
  margin: 1.25rem calc(var(--gutter) * -1) 0;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 35%);
  mask-image: linear-gradient(to bottom, transparent 0, #000 35%);
}
.flowers img { width: 100%; height: auto; }

.cover-body { grid-template-areas: "facts portrait" "next next"; }
.cover-facts { grid-area: facts; }
.portrait { grid-area: portrait; }
.next { grid-area: next; }

@media (min-width: 40rem) {
  .cover-body {
    grid-template-columns: minmax(0, 1fr) 46%;
    grid-template-areas: "facts portrait" "next portrait";
    grid-template-rows: auto 1fr;
    column-gap: 1.5rem;
    margin-top: 1rem;
  }
  .cover-facts { padding-top: 2.5rem; }
  .next { margin-top: 2.5rem; align-self: start; }
}

/* ---------- Sections ---------- */
.section {
  padding: clamp(3rem, 9vw, 4.5rem) var(--gutter) 0;
}
.section-title {
  text-align: center;
  font-family: var(--script); font-weight: 400;
  font-size: clamp(3rem, 13vw, 4.4rem);
  line-height: 1.05;
}
.brush {
  width: min(86%, 25rem); height: auto;
  margin: .15rem auto 0;
}
.reveal .brush { clip-path: inset(0 100% 0 0); transition: clip-path 1.1s cubic-bezier(.16, 1, .3, 1) .15s; }
.reveal.is-in .brush { clip-path: inset(0 0 0 0); }

.lede { max-width: var(--measure); margin: 1.5rem auto 0; color: var(--ink-2); text-align: center; font-size: 1rem; }

/* Programme */
.days { max-width: var(--measure); margin: 2rem auto 0; }
.day + .day { margin-top: 2.25rem; }
.day-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: .25rem .75rem; }
.day h3 {
  font-size: clamp(1.35rem, 5.6vw, 1.625rem);
  font-weight: 800; color: var(--gold-text); line-height: 1.2;
}
.place { font-size: .8125rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.tag {
  font-size: .75rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
  background: var(--gold-text); color: #fff; padding: .2rem .5rem; border-radius: 2px;
}
.tag[hidden] { display: none; }
.events { margin-top: .65rem; }
.event {
  display: grid; grid-template-columns: 4.1rem 1fr; gap: .9rem;
  padding: .55rem 0;
}
.event time {
  font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: .01em;
}
.event p { line-height: 1.45; }
.event .addr { display: block; color: var(--ink-2); font-size: .9375rem; }
.event .note {
  display: block; margin-top: .4rem; font-size: .9375rem; font-style: italic; color: var(--ink-2);
}
.event.is-next time, .event.is-next p { color: var(--ink); }
.event.is-next { position: relative; }
.event.is-next::before {
  content: ""; position: absolute; left: -.85rem; top: .95rem;
  width: .4rem; height: .4rem; border-radius: 50%; background: var(--gold);
}
.event.is-past time, .event.is-past p, .event.is-past .addr, .event.is-past .note { color: var(--past); }
.day.is-past h3 { color: var(--past); }

/* Faire-part */
.announcers { max-width: var(--measure); margin: 2rem auto 0; }
.announcers li {
  padding: .3rem 0 .3rem 1rem; text-indent: -1rem;
  line-height: 1.4;
}
.announce {
  display: grid; grid-template-columns: minmax(0, 1fr) min(34%, 9.5rem); align-items: center; gap: 1.25rem;
  max-width: var(--measure); margin: 2rem auto 0;
}
.announce-text { font-size: 1.125rem; line-height: 1.45; text-align: center; }
.walking {
  -webkit-mask-image: linear-gradient(to bottom, #000 85%, transparent 100%), linear-gradient(to right, transparent 0, #000 10%, #000 90%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(to bottom, #000 85%, transparent 100%), linear-gradient(to right, transparent 0, #000 10%, #000 90%, transparent 100%);
  mask-composite: intersect;
}
.walking img { width: 100%; height: auto; }
.deaconess { text-align: center; margin-top: 1.25rem; }
.deaconess .name { font-size: clamp(2.4rem, 11vw, 3.75rem); margin: 0; }
.deaconess .spouse { margin-top: .4rem; font-size: 1.0625rem; }

/* Plan */
.map { max-width: 30rem; margin: 2rem auto 0; }
.map svg { width: 100%; height: auto; font-family: var(--sans); }
.map figcaption { margin-top: .5rem; font-size: .875rem; color: var(--ink-3); text-align: center; }
.routes { max-width: var(--measure); margin: 2rem auto 0; }
.routes h3 { font-size: 1rem; font-weight: 800; }
.routes li + li { margin-top: 1.1rem; }
.routes p { color: var(--ink-2); margin-top: .15rem; }
.original { display: block; text-align: center; margin-top: 1.5rem; font-weight: 700; font-size: .9375rem; }

/* Originals */
.originals { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .6rem; max-width: var(--measure); margin: 1.75rem auto 0; }
.originals a { display: block; text-decoration: none; font-size: .8125rem; font-weight: 600; color: var(--ink-2); text-align: center; }
.originals img { width: 100%; height: auto; aspect-ratio: 941 / 1672; object-fit: cover; border: 1px solid var(--rule); margin-bottom: .4rem; }
.originals a:hover img { border-color: var(--gold); }
@media (max-width: 26rem) { .originals { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem .75rem; } }

/* ---------- Close ---------- */
.close {
  margin-top: clamp(3.5rem, 10vw, 5rem);
  background: linear-gradient(to bottom, var(--sheet), var(--warm));
  text-align: center;
  padding: 0 var(--gutter);
}
.share {
  display: inline-flex; align-items: center; gap: .6rem;
  font: inherit; font-weight: 700; font-size: 1rem;
  color: var(--ink); background: var(--sheet);
  border: 1.5px solid var(--gold); border-radius: 999px;
  padding: .8rem 1.4rem; cursor: pointer;
  transition: background-color .2s ease, color .2s ease;
}
.share:hover { background: var(--gold-text); border-color: var(--gold-text); color: #fff; }
.share svg { width: 1.15rem; height: 1.15rem; }
.share[hidden] { display: none; }
.share-done { display: block; min-height: 1.5em; margin-top: .5rem; font-size: .875rem; color: var(--ink-2); }
.credit { font-size: .8125rem; color: var(--ink-3); margin-top: 1rem; }


/* Watercolour corner sprays, cut from the printed cards, close a section */
.corners {
  display: flex; justify-content: space-between; align-items: flex-end;
  margin: 2.5rem calc(var(--gutter) * -1) 0;
  pointer-events: none;
}
.corners img { width: min(36%, 12rem); height: auto; }
.close .corners { margin-top: 1rem; }
.section .corners img {
  -webkit-mask-image: linear-gradient(to bottom, #000 45%, transparent 96%);
  mask-image: linear-gradient(to bottom, #000 45%, transparent 96%);
}
