/* FamilyTree — FamilyTree.clardware.be
   Eén stylesheet, geen build, geen framework. Licht en donker. */

:root {
  --bg: #fbfaf8;
  --panel: #ffffff;
  --line: #e2ddd5;
  --text: #221f1b;
  --muted: #6b645a;
  --accent: #7a4f2a;
  --accent-soft: #f3ece3;
  --ok: #2f6b43;
  --radius: 10px;
  --maxw: 74rem;
  /* lopende tekst: ~80 tekens per regel leest het rustigst */
  --textw: 50rem;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #171512;
    --panel: #201d19;
    --line: #35302a;
    --text: #ece7e0;
    --muted: #a49a8c;
    --accent: #d9a16a;
    --accent-soft: #2a241d;
    --ok: #6fbf8b;
  }
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.65 "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
}

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 16px; }

/* --- kop --- */
header.site {
  border-bottom: 1px solid var(--line);
  background: var(--panel);
}
header.site .wrap {
  display: flex;
  align-items: baseline;
  gap: 1.2rem;
  flex-wrap: wrap;
  padding-top: 14px;
  padding-bottom: 14px;
}
header.site .brand .by {
  font-weight: 400;
  color: var(--muted);
}

header.site .brand {
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
  color: var(--text);
  text-decoration: none;
  margin-right: auto;
}
header.site nav { display: flex; gap: 1rem; flex-wrap: wrap; }
header.site nav a { color: var(--muted); text-decoration: none; font-size: 0.95rem; }
header.site nav a:hover, header.site nav a[aria-current] { color: var(--accent); }
.lang { font-size: 0.85rem; color: var(--muted); }
.lang a { color: var(--muted); }

/* --- tekst --- */
main { padding: 2.2rem 0 3.5rem; }
h1 { font-size: 2rem; line-height: 1.2; margin: 0 0 0.6rem; letter-spacing: -0.02em; }
h2 { font-size: 1.35rem; margin: 2.4rem 0 0.6rem; letter-spacing: -0.01em; }
h3 { font-size: 1.05rem; margin: 1.6rem 0 0.4rem; }
p, li { color: var(--text); }
main > p, main > ul, main > ol, main > pre, main > table, main > blockquote, main > .note, main > h1, main > h2, main > h3 { max-width: var(--textw); }
.lead { font-size: 1.12rem; color: var(--muted); margin-bottom: 1.6rem; }
a { color: var(--accent); }
code, kbd {
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: 0.88em;
  background: var(--accent-soft);
  padding: 0.1em 0.35em;
  border-radius: 4px;
}
pre {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.9rem 1rem;
  overflow-x: auto;
  font-size: 0.85rem;
  line-height: 1.5;
}
pre code { background: none; padding: 0; }

table { border-collapse: collapse; width: 100%; margin: 1rem 0; font-size: 0.94rem; }
th, td { text-align: left; padding: 0.45rem 0.6rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 600; font-size: 0.85rem; }

blockquote {
  margin: 1.2rem 0;
  padding: 0.2rem 0 0.2rem 1rem;
  border-left: 3px solid var(--line);
  color: var(--muted);
}

/* --- onderdelen --- */
.button {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  padding: 0.6rem 1.1rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
}
.button.ghost { background: transparent; color: var(--accent); border: 1px solid var(--line); }
.row { display: flex; gap: 0.7rem; flex-wrap: wrap; align-items: center; margin: 1.2rem 0; }

figure { margin: 1.6rem 0; }
figure img {
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: block;
}
figcaption { color: var(--muted); font-size: 0.88rem; margin-top: 0.5rem; }

.cards { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); margin: 1.4rem 0; }
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
}
.card h3 { margin-top: 0; }
.card p { margin-bottom: 0; color: var(--muted); font-size: 0.94rem; }

.shots { display: grid; gap: 1.2rem; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); margin: 1.2rem 0 2rem; }
.shots a { display: block; color: var(--text); text-decoration: none; }
.shots img { width: 100%; height: auto; display: block; border: 1px solid var(--line); border-radius: var(--radius); }
.shots a:hover img { border-color: var(--accent); }
.shots strong { display: block; margin-top: 0.45rem; }
.shots span { display: block; color: var(--muted); font-size: 0.88rem; line-height: 1.4; }

.note {
  background: var(--accent-soft);
  border-radius: var(--radius);
  padding: 0.9rem 1.1rem;
  font-size: 0.94rem;
}

footer.site {
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.88rem;
  padding: 1.6rem 0 2.4rem;
}
footer.site a { color: var(--muted); }

@media (max-width: 34rem) {
  h1 { font-size: 1.6rem; }
  body { font-size: 15px; }
}

/* Schermafbeeldingen groot bekijken (js/lightbox.js) */
body.lb-open { overflow: hidden; }
.lightbox {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(20, 18, 15, 0.88);
  display: flex; align-items: center; justify-content: center; gap: 0.6rem;
  padding: 1rem;
}
.lightbox[hidden] { display: none; }
.lb-figure { margin: 0; max-width: min(92vw, 1400px); display: flex; flex-direction: column; align-items: center; }
.lb-figure img { max-width: 100%; max-height: 78vh; border-radius: var(--radius); box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5); background: #fff; }
.lb-figure figcaption { color: #f3efe8; text-align: center; margin-top: 0.8rem; max-width: 46rem; line-height: 1.45; }
.lb-figure figcaption strong { display: block; font-size: 1.1rem; }
.lb-figure figcaption span { display: block; color: #d8d0c4; }
.lb-figure figcaption em { display: block; font-style: normal; font-size: 0.85rem; color: #a99f91; margin-top: 0.3rem; }
.lightbox button {
  background: rgba(255, 255, 255, 0.14); color: #fff; border: 0; cursor: pointer;
  border-radius: 999px; width: 3rem; height: 3rem; font-size: 2rem; line-height: 1;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.lightbox button:hover, .lightbox button:focus-visible { background: rgba(255, 255, 255, 0.3); outline: none; }
.lb-close { position: absolute; top: 1rem; right: 1rem; font-size: 1.8rem; }
@media (max-width: 34rem) {
  .lb-prev, .lb-next { position: absolute; bottom: 1rem; }
  .lb-prev { left: 1rem; }
  .lb-next { right: 1rem; }
  .lb-figure img { max-height: 64vh; }
}
