:root {
  --black: #000000;
  --ash: #d9d5cc;
  --text: #bdb9b0;
  --dim: #6f6c68;
  --pulse: 143, 138, 173;
  --gold: 208, 170, 84;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --beat: 0;
  box-sizing: border-box;
}
*, *::before, *::after { box-sizing: inherit; }
html { background: var(--black); scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--black);
  color: var(--ash);
  font-family: var(--serif);
  overflow-x: hidden;
}

#fog {
  position: fixed; inset: 0;
  width: 100%; height: 100%;
  z-index: 0;
  pointer-events: none;
}

.sr {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* ---------- Kop ---------- */
.top {
  position: relative; z-index: 2;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  max-width: 52rem; margin: 0 auto;
  padding: calc(1.2rem + env(safe-area-inset-top, 0px)) 1.5rem 0;
}
.seal { display: block; width: 2.6rem; height: 2.6rem; }
.seal .halo { opacity: calc(.2 + var(--beat) * .6); transform: scale(calc(.85 + var(--beat) * .5)); }
.seal .core { fill: #000; stroke: rgb(var(--gold)); stroke-width: calc(.9 + var(--beat) * 1.1); }
.top nav { display: flex; gap: 1.6rem; font-size: .95rem; }
a { color: var(--dim); text-decoration: none; transition: color .3s ease; }
a:hover, a:focus-visible { color: var(--ash); }
a[aria-current="page"] { color: var(--ash); }
a:focus-visible { outline: 1px solid rgba(var(--pulse), .8); outline-offset: 4px; }

/* ---------- Inhoud ---------- */
main {
  position: relative; z-index: 1;
  max-width: 36rem;
  margin: 0 auto;
  padding: 14vh 1.5rem 8vh;
}
h1 {
  margin: 0 0 1.4rem;
  font-size: clamp(2rem, 7vw, 3.2rem);
  font-weight: 400;
  letter-spacing: .01em;
}
.intro {
  margin: 0 0 6rem;
  font-size: clamp(1rem, 3.4vw, 1.15rem);
  font-style: italic;
  line-height: 1.7;
  color: var(--dim);
}
.entry { margin: 0 0 7rem; }
.entry h2 {
  margin: 0 0 .5rem;
  font-size: clamp(1.4rem, 4.6vw, 1.9rem);
  font-weight: 400;
  letter-spacing: .01em;
}
.entry .meta {
  margin: 0 0 2.4rem;
  font-size: .85rem;
  font-style: italic;
  color: var(--dim);
}
.entry p {
  margin: 0 0 1.6rem;
  font-size: clamp(1.05rem, 3.6vw, 1.2rem);
  line-height: 1.85;
  color: var(--text);
}
.empty { font-style: italic; color: var(--dim); }

footer {
  position: relative; z-index: 1;
  padding: 3rem 1.5rem calc(3rem + env(safe-area-inset-bottom, 0px));
  text-align: center;
  font-size: .8rem;
  color: var(--dim);
}
footer nav { display: flex; justify-content: center; gap: 1.6rem; margin-bottom: 1.2rem; }

/* ---------- Cijfer ---------- */
.cipher {
  font-family: var(--serif), "Segoe UI Symbol", "Apple Symbols", "Noto Sans Symbols 2", "Noto Sans Symbols";
}
.cipher .fb { color: #262428; }
.cw { display: inline-block; white-space: nowrap; }
.cipher .c {
  display: inline-block;
  height: 1.2em; line-height: 1.2em;
  text-align: center;
  color: rgba(var(--pulse), .62);
  text-shadow: 0 0 10px rgba(var(--pulse), .4);
  transition: color .5s ease;
}
.cipher .c.t { color: var(--ash); text-shadow: none; }
.cipher .p { color: var(--dim); }

/* ---------- Beweging ---------- */
.js .rv {
  opacity: 0; filter: blur(10px);
  transition: opacity 2.2s ease, filter 2.2s ease;
}
.js .rv.in { opacity: 1; filter: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .rv { opacity: 1; filter: none; transition: none; }
  .cipher .c { transition: none; }
}

/* ---------- Uitwisseling ---------- */
footer nav { flex-wrap: wrap; }
.meter { display: grid; place-items: center; margin: 0 0 4.5rem; text-align: center; }
.meter svg { display: block; width: min(62vw, 13rem); height: auto; overflow: visible; }
.meter .track { fill: none; stroke: rgba(var(--gold), .16); stroke-width: 1.2; }
.meter .arc {
  fill: none; stroke: rgb(var(--gold)); stroke-width: 2; stroke-linecap: round;
  transition: stroke-dashoffset 3.2s cubic-bezier(.2, .6, .2, 1);
}
.meter .core { fill: #000; }
.meter .halo { opacity: calc(.2 + var(--beat) * .6); transform: scale(calc(.85 + var(--beat) * .5)); }
.meter .pct { fill: var(--ash); font-family: var(--serif); font-size: 11px; text-anchor: middle; }
.meter figcaption { margin-top: 1.6rem; font-size: .95rem; color: var(--dim); }

.give {
  display: inline-block;
  padding: .9rem 2.2rem;
  border: 1px solid rgba(var(--gold), .7);
  color: rgb(var(--gold));
  font-size: 1rem;
  letter-spacing: .04em;
  transition: background .4s ease, color .4s ease, box-shadow .4s ease;
}
.give:hover, .give:focus-visible {
  background: rgba(var(--gold), .12);
  color: var(--ash);
  box-shadow: 0 0 24px rgba(var(--gold), .25);
}
.give[aria-disabled="true"] { opacity: .5; pointer-events: none; }

.tiers { list-style: none; margin: 1rem 0 3rem; padding: 0; }
.tiers li {
  display: flex; justify-content: space-between; gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  color: var(--text);
  font-size: clamp(1rem, 3.4vw, 1.1rem);
}
.tiers li:first-child { border-top: 1px solid rgba(255, 255, 255, .08); }
.tiers .a { color: var(--dim); }
.tiers li.open .a { color: rgb(var(--gold)); }
.note { font-size: .9rem; font-style: italic; color: var(--dim); }

/* ---------- Colofon ---------- */
.mark { width: min(50vw, 9rem); height: auto; margin: 0 0 3rem; }
.swatches { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.4rem; margin: 0 0 1rem; padding: 0; list-style: none; }
.swatches li { font-size: .95rem; color: var(--text); }
.swatches i { display: block; height: 3rem; margin-bottom: .6rem; border: 1px solid rgba(255, 255, 255, .14); }
.swatches small { display: block; color: var(--dim); font-size: .85rem; }

@media (prefers-reduced-motion: reduce) {
  .meter .arc { transition: none; }
  .give { transition: none; }
}

/* ---------- Werkgegevens ---------- */
.intro.has-context { margin-bottom: 1.4rem; }
.context { margin: 0 0 6rem; font-size: .82rem; line-height: 1.6; color: var(--dim); }
.facts {
  display: grid; grid-template-columns: auto 1fr; gap: .35rem 1.2rem;
  margin: 0 0 2.4rem; font-size: .85rem; color: var(--dim);
}
.facts dt { font-style: italic; }
.facts dd { margin: 0; color: var(--text); }
.entry .cite { margin-top: 3rem; font-size: .82rem; line-height: 1.6; color: var(--dim); }

/* ---------- Handshake ---------- */
.zha { display: inline-block; width: .96em; height: 1em; vertical-align: -.14em; fill: currentColor; }
.handshake {
  font-family: var(--serif), "Segoe UI Symbol", "Apple Symbols", "Noto Sans Symbols 2", "Noto Sans Math", "Noto Sans Symbols";
  text-align: center; letter-spacing: .5em; text-indent: .5em;
  color: var(--dim);
  text-shadow: 0 0 calc(var(--beat) * 12px) rgba(var(--pulse), calc(var(--beat) * .6));
}
.entry .handshake { margin: 0 0 1.6rem; font-size: clamp(1.1rem, 4vw, 1.4rem); }

/* ---------- Mailinglijst: Lost Concord ---------- */
.concord { margin: 3rem 0 0; }
.concord label { display: block; margin: 0 0 1rem; font-size: clamp(1.05rem, 3.6vw, 1.2rem); line-height: 1.7; color: var(--text); }
.concord .row, .key .row { display: flex; gap: .8rem; flex-wrap: wrap; }
.concord input, .key input {
  flex: 1 1 14rem; min-width: 0;
  background: transparent; border: 1px solid rgba(255, 255, 255, .2); border-radius: 0;
  color: var(--ash); font: inherit; font-size: 1rem; padding: .8rem 1rem;
}
.concord input::placeholder, .key input::placeholder { color: var(--dim); }
.concord input:focus-visible, .key input:focus-visible { outline: 1px solid rgba(var(--pulse), .9); outline-offset: 3px; border-color: rgba(var(--pulse), .7); }
.concord button, .key button {
  background: transparent; border: 1px solid rgba(var(--gold), .7); border-radius: 0;
  color: rgb(var(--gold)); font: inherit; font-size: .95rem; letter-spacing: .04em;
  padding: .8rem 1.6rem; cursor: pointer;
  transition: background .4s ease, color .4s ease, box-shadow .4s ease;
}
.concord button:hover, .concord button:focus-visible, .key button:hover, .key button:focus-visible {
  background: rgba(var(--gold), .12); color: var(--ash); box-shadow: 0 0 24px rgba(var(--gold), .25);
}
.concord button:disabled, .concord input:disabled { opacity: .5; cursor: default; box-shadow: none; }
.concord .fine { margin: .9rem 0 0; font-size: .8rem; line-height: 1.6; color: var(--dim); }
.concord .fine a { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Fragmenten ---------- */
.tracker { margin: 0 0 5rem; }
.slots { display: flex; flex-wrap: wrap; gap: .7rem; margin: 0 0 1.1rem; min-height: .9rem; }
.slots i { width: .9rem; height: .9rem; border-radius: 50%; border: 1px solid rgba(var(--gold), .6); transition: background .8s ease, box-shadow .8s ease; }
.slots i.on { background: rgb(var(--gold)); box-shadow: 0 0 12px rgba(var(--gold), .6); }
.tracker .count { margin: 0; font-size: 1rem; color: var(--text); }
.tracker .next { margin: .4rem 0 0; font-size: .9rem; font-style: italic; color: var(--dim); }
.fbody p { margin: 0 0 1.6rem; }
.key { margin: 0 0 1rem; }
.key .msg { min-height: 1.4em; margin: .8rem 0 0; font-size: .85rem; font-style: italic; color: var(--dim); }
.fragment .empty { margin: 0; }
@media (prefers-reduced-motion: reduce) {
  .slots i, .concord button, .key button { transition: none; }
}
