/* site.css: visuele metgezel bij Dit is ons land #2 (Kholoud).
   Kleuren uit het dageraad-palet in lib/pw.js; Georgia voor lopende tekst. */

:root {
  --papier: #efe8da;
  --inkt: #42392f;
  --inkt-zacht: #5c5346;
  --duin: #a89a84;
  --zand: #d9c9a3;
  --zand-rand: #8a7c62;
  --land: #e6ddc8;
  --accent: #b56a5e;
  --groen-diep: #6f7f60;
}

* { box-sizing: border-box; }

/* Proximity-snap: handmatig scrollen komt vanzelf netjes op een sectie uit,
   maar vecht niet met het programmatische scrollen van de audio. */
html { scroll-behavior: auto; scroll-snap-type: y proximity; }

body {
  margin: 0;
  padding: 0 20px 140px;
  background: var(--papier);
  color: var(--inkt);
  font-family: Georgia, 'Times New Roman', serif;
  line-height: 1.6;
}

a { color: var(--inkt-zacht); text-decoration: underline; text-decoration-color: var(--duin); text-underline-offset: 2px; }
a:hover { color: var(--accent); }

/* ---------- kop ---------- */
.kop { max-width: 680px; margin: 56px auto 40px; }
.kop-kicker {
  font-family: system-ui, sans-serif; font-size: 11px; letter-spacing: .16em;
  text-transform: uppercase; color: var(--duin);
}
.kop h1 { font-size: 54px; line-height: 1.05; margin: 10px 0 12px; font-weight: normal; letter-spacing: -.01em; }
.kop-sub { font-size: 19px; line-height: 1.55; color: var(--inkt-zacht); margin: 0 0 22px; }
.kop-noot {
  border: 1px solid var(--zand); border-radius: 14px; background: #f4ecdd;
  padding: 14px 18px; font-size: 14.5px; color: var(--inkt-zacht);
}
.kop-noot p { margin: 6px 0; }

/* ---------- inhoudsopgave ---------- */
.toc { max-width: 680px; margin: 0 auto 56px; }
.toc h2 {
  font-family: system-ui, sans-serif; font-size: 11px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--duin); margin: 0 0 10px 2px; font-weight: 600;
}
.toc ol { list-style: none; margin: 0; padding: 0; columns: 2; column-gap: 28px; }
.toc li { break-inside: avoid; }
.toc button {
  display: flex; gap: 10px; align-items: baseline; width: 100%; text-align: left;
  background: none; border: 0; padding: 4px 2px; cursor: pointer;
  font-family: Georgia, serif; font-size: 15px; color: var(--inkt); border-radius: 6px;
}
.toc button:hover { color: var(--accent); }
.toc button .t {
  font-family: system-ui, sans-serif; font-size: 11px; color: var(--duin);
  font-variant-numeric: tabular-nums; min-width: 38px;
}
.toc li.actief button { color: var(--accent); }
.toc-hint { font-family: system-ui, sans-serif; font-size: 12px; color: var(--duin); margin: 10px 2px 0; }

/* ---------- verhaalsecties: één verhaalonderdeel per scherm ---------- */
.sectie {
  max-width: 680px;
  margin: 0 auto;
  /* vol scherm per sectie; onderin ruimte voor de vaste speler */
  min-height: 100svh;
  padding: 34px 0 130px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  scroll-margin-top: 0;
  scroll-snap-align: start;
  transition: opacity .55s ease;
}
/* Tijdens het afspelen ligt de focus op de actieve sectie; de rest dimt.
   Hover haalt een sectie terug (lezen mag altijd), pauze ook. */
body.speelt .sectie:not(.actief) { opacity: .38; }
body.speelt .sectie:not(.actief):hover { opacity: 1; }
.sectie-kicker {
  font-family: system-ui, sans-serif; font-size: 11px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--duin); font-variant-numeric: tabular-nums;
}
.sectie h2 { font-size: 29px; font-weight: normal; line-height: 1.2; margin: 6px 0 14px; }
.sectie p { font-size: 17px; margin: 0 0 14px; max-width: 620px; }
.sectie.actief .sectie-kicker { color: var(--accent); }

/* aquarel-scenes */
.scenes { display: grid; grid-template-columns: 1fr; gap: 16px; margin: 22px 0 8px; }
.scenes.twee { grid-template-columns: 1fr 1fr; }
.scenes figure { margin: 0; }
.scenes img {
  display: block; width: 100%; max-width: 100%; height: auto; border-radius: 14px;
  box-shadow: 0 10px 30px rgba(66, 57, 47, .16);
}

/* widget-hosts: iets breder dan de tekstkolom */
.widget-host { margin: 26px auto 6px; max-width: 680px; }
.widget-host.breed { max-width: 680px; }

/* ---------- kolofon ---------- */
.kolofon { max-width: 680px; margin: 40px auto 0; padding-top: 34px; border-top: 2px solid var(--zand-rand); }
.kolofon h2 { font-size: 22px; font-weight: normal; margin: 0 0 14px; }
.kolofon p { font-size: 14.5px; color: var(--inkt-zacht); margin: 0 0 12px; }

/* ---------- vaste speler onderin ---------- */
.speler {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: 14px; z-index: 30;
  width: min(760px, calc(100vw - 28px));
  background: #f4ecdd; border: 1px solid var(--zand); border-radius: 16px;
  box-shadow: 0 8px 28px rgba(66, 57, 47, .28);
  padding: 10px 14px; display: flex; align-items: center; gap: 14px;
}
.speler audio { flex: 1; min-width: 0; height: 40px; }
.speler-info {
  flex: 0 1 auto; display: flex; flex-direction: column; align-items: flex-end;
  font-family: system-ui, sans-serif; max-width: 42%;
}
.speler-klok { font-size: 12px; color: var(--duin); font-variant-numeric: tabular-nums; }
.speler-titel {
  font-size: 12.5px; color: var(--inkt); text-align: right; line-height: 1.3;
  overflow: hidden; text-overflow: ellipsis; display: -webkit-box;
  -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}

@media (max-width: 640px) {
  .kop { margin-top: 36px; }
  .kop h1 { font-size: 40px; }
  .toc ol { columns: 1; }
  .scenes.twee { grid-template-columns: 1fr; }
  .speler { flex-wrap: wrap; gap: 6px; padding: 8px 12px; }
  .speler audio { flex-basis: 100%; }
  .speler-info { flex-direction: row; gap: 10px; align-items: baseline; max-width: 100%; }
  body { padding-bottom: 170px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto !important; }
}
