:root {
  --bg: #f7faf5;
  --surface: #ffffff;
  --text: #1f2a1c;
  --muted: #5f6b5a;
  --line: #dfe8d9;
  --accent: #3f8a2e;
  --accent-strong: #2f6e21;
  --accent-soft: #e6f2df;
  --radius: 14px;
  --serif: "Fraunces", "Iowan Old Style", Georgia, serif;
  --sans: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  /* monochrome foto's met een lichte groene zweem; kleur bij hover */
  --photo-filter: grayscale(1) contrast(1.08) brightness(1.04) sepia(.18) hue-rotate(45deg);
  --ease: cubic-bezier(.2, .7, .3, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141a13;
    --surface: #1c241a;
    --text: #e9f0e4;
    --muted: #9fae98;
    --line: #2d3a2a;
    --accent: #8fd06f;
    --accent-strong: #a9e08c;
    --accent-soft: #24331f;
    --photo-filter: grayscale(1) contrast(1.05) brightness(.92) sepia(.18) hue-rotate(45deg);
  }
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1.25rem/1.7 var(--sans);
}

a {
  color: var(--accent-strong); text-underline-offset: 3px; text-decoration-thickness: 1px;
  transition: color .2s var(--ease), background-color .2s var(--ease), border-color .2s var(--ease),
    transform .25s var(--spring), box-shadow .25s var(--ease), text-underline-offset .2s var(--ease);
}
a:hover { color: var(--accent); text-underline-offset: 5px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
img { max-width: 100%; height: auto; }

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 700px) { .wrap { padding: 0 32px; } }

/* foto's */
.thumb {
  filter: var(--photo-filter);
  transition: filter .35s ease, transform .5s ease;
}
.card a:hover .thumb, .card a:focus-visible .thumb { filter: none; }

/* kop */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
}
.header-inner {
  /* even breed als de overzichten: logo links, menu in het midden, zoeken rechts */
  display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 28px;
  padding-top: 14px; padding-bottom: 14px;
}
.header-inner .logo { justify-self: start; }
/* het zoekicoontje lijnt met zijn rand (niet met zijn hover-cirkel) uit op de rechterrand */
.header-inner .search-link { justify-self: end; margin-right: -10px; }
.logo {
  display: inline-flex; align-items: baseline;
  font: 700 2.7rem/1 "Caveat", cursive; color: var(--text); text-decoration: none;
  margin-top: -4px;
}
.logo span { display: inline-block; transition: transform .35s var(--spring); }
.logo-log { color: var(--accent); }
.logo-veg { transform-origin: 80% 100%; transition-delay: .04s; }
.logo-leaf {
  width: .62em; height: .62em; margin-left: 3px; align-self: center;
  fill: none; stroke: var(--accent); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round;
  transform-origin: 50% 90%; transition: transform .45s var(--spring);
}
.logo:hover { color: var(--text); text-decoration: none; }
.logo:hover .logo-veg { transform: rotate(4deg) translateY(-1px); }
.logo:hover .logo-log { transform: rotate(-5deg) translateY(-2px); }
.logo:hover .logo-leaf { transform: rotate(14deg) scale(1.12); }
.menu {
  display: flex; gap: 6px; justify-content: safe center;
  overflow-x: auto; scrollbar-width: none; white-space: nowrap;
}
.menu::-webkit-scrollbar { display: none; }
.menu a {
  position: relative; isolation: isolate;
  color: var(--muted); text-decoration: none; font-size: 1.05rem; font-weight: 500;
  padding: 6px 14px; border-radius: 999px;
}
/* alleen de pill erachter beweegt, de tekst blijft staan */
.menu a::before {
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit;
  background: var(--accent-soft); opacity: 0; transform: scale(.7);
  transition: opacity .2s var(--ease), transform .35s var(--spring);
}
.menu a:hover { color: var(--text); text-decoration: none; }
.menu a:hover::before, .menu a[aria-current]::before { opacity: 1; transform: scale(1); }
.menu a:active::before { transform: scale(.92); }
.menu a[aria-current] { color: var(--accent-strong); }
.search-link { color: var(--muted); padding: 10px; display: flex; border-radius: 999px; }
.search-link svg { transition: transform .35s var(--spring); }
.search-link:hover { color: var(--accent); background: var(--accent-soft); }
.search-link:hover svg { transform: rotate(-12deg) scale(1.12); }

@media (max-width: 939px) {
  .header-inner { grid-template-columns: 1fr auto; gap: 8px 16px; padding-bottom: 10px; }
  .menu { grid-column: 1 / -1; grid-row: 2; margin: 0 -16px; padding: 0 10px; justify-content: flex-start; }
}

main.wrap { padding-top: 48px; padding-bottom: 32px; }
@media (max-width: 560px) { main.wrap { padding-top: 28px; padding-bottom: 24px; } }

/* intro */
.intro { text-align: center; padding: 32px 0 48px; }
.intro h1 {
  font: 600 clamp(2.2rem, 6vw, 3.8rem)/1.08 var(--serif);
  letter-spacing: -.025em; margin: 0 auto 14px; max-width: 16ch;
}
.intro p { color: var(--muted); margin: 0 0 28px; font-size: 1.3rem; }
.quicksearch input {
  width: 100%; max-width: 520px; font: inherit; font-size: 1.15rem; padding: 16px 24px;
  border: 1.5px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--text);
  box-shadow: 0 4px 24px rgb(40 80 20 / .06);
  transition: border-color .2s var(--ease), box-shadow .3s var(--ease), transform .3s var(--ease);
}
.quicksearch input:hover { border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
.quicksearch input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 5px var(--accent-soft); transform: scale(1.01); }

.list-title { font: 600 clamp(2rem, 5vw, 2.8rem)/1.1 var(--serif); letter-spacing: -.02em; margin: 0 0 28px; }
.list-title small { font: 500 1rem var(--sans); color: var(--muted); margin-left: 8px; letter-spacing: 0; }
.muted { color: var(--muted); }

/* kaarten */
.cards {
  list-style: none; padding: 0; margin: 0;
  display: grid; gap: 28px; grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr));
}
.card {
  min-width: 0; border-radius: var(--radius);
  transition: translate .35s var(--ease), box-shadow .35s var(--ease);
}
.card:hover { translate: 0 -4px; box-shadow: 0 14px 30px -12px rgb(20 40 10 / .45); }
.card:active { translate: 0 -1px; }
.card a {
  position: relative; display: block; height: 100%;
  border-radius: var(--radius); overflow: hidden; isolation: isolate;
  /* clip-path knipt ook tijdens de animatie strak af in de ronde hoeken */
  clip-path: inset(0 round var(--radius));
  text-decoration: none; color: #fff; background: #10170d;
}
.card a:hover { color: #fff; }
.card picture { display: block; height: 100%; }
.thumb { display: block; width: 100%; height: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
/* foto altijd een fractie groter dan het kader: geen randje van de foto zichtbaar */
.card .thumb:not(.thumb--leeg) { transform: scale(1.02); backface-visibility: hidden; }
.card a:hover .thumb:not(.thumb--leeg) { transform: scale(1.06); }
.thumb--leeg { filter: none; background: var(--accent-soft); display: grid; justify-items: center; align-content: start; padding-top: 18%; }
.thumb--leeg svg {
  width: 44px; height: 44px; fill: none; stroke: var(--accent); stroke-width: 1.2;
  stroke-linecap: round; stroke-linejoin: round; opacity: .5;
  transform-origin: 50% 90%; transition: transform .6s var(--spring), opacity .3s var(--ease);
}
.card a:hover .thumb--leeg { transform: none; }
.card a:hover .thumb--leeg svg { transform: rotate(-28deg) scale(1.15); opacity: .8; }
/* donkere fade van onderuit, met de tekst erover */
.card-body {
  position: absolute; inset: auto 0 0 0; z-index: 1;
  display: flex; flex-direction: column; gap: 2px;
  padding: 56px 16px 15px;
  /* zachte, geleidelijke fade zonder zichtbare overgang */
  background: linear-gradient(to top,
    rgb(10 16 8 / .86) 0%, rgb(10 16 8 / .74) 22%, rgb(10 16 8 / .55) 42%,
    rgb(10 16 8 / .34) 62%, rgb(10 16 8 / .16) 80%, rgb(10 16 8 / .05) 92%, rgb(10 16 8 / 0) 100%);
}
.card-title, .card time { transition: transform .35s var(--ease); }
.card-title { font: 600 1.35rem/1.2 var(--serif); letter-spacing: -.01em; text-shadow: 0 1px 8px rgb(0 0 0 / .35); }
.card time { color: rgb(255 255 255 / .78); font-size: .95rem; }
.card a:hover .card-title, .card a:hover time { transform: translateY(-3px); }


.pager { display: flex; justify-content: space-between; align-items: center; margin-top: 48px; color: var(--muted); font-size: 1.05rem; }
.pager a {
  text-decoration: none; font-weight: 600; padding: 10px 20px; border-radius: 999px;
  background: var(--accent-soft);
}
.pager a:hover { background: var(--accent); color: var(--surface); }

.chips { list-style: none; padding: 0; margin: 0 0 36px; display: flex; flex-wrap: wrap; gap: 10px; }
.chips a, .tags a {
  display: inline-block; padding: 6px 16px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line);
  color: var(--text); text-decoration: none; font-size: 1.05rem; font-weight: 500;
}
.chips a:hover, .tags a:hover {
  background: var(--accent); border-color: var(--accent); color: var(--surface);
  transform: translateY(-2px); box-shadow: 0 6px 14px -8px var(--accent);
}
.chips a:active, .tags a:active { transform: scale(.95); }
.chips small { color: var(--muted); font-weight: 400; }
.chips a:hover small { color: inherit; }

/* bericht */
.post { max-width: 720px; margin: 0 auto; }
.post h1 {
  font: 600 clamp(2.3rem, 6vw, 3.6rem)/1.08 var(--serif);
  margin: 8px 0 32px; letter-spacing: -.025em;
}
.meta { color: var(--muted); font-size: 1rem; margin: 0; font-weight: 500; }
.meta a { color: var(--accent-strong); text-decoration: underline transparent; }
.meta a:hover { text-decoration-color: currentColor; }
.prose a { text-decoration-color: color-mix(in srgb, currentColor 40%, transparent); }
.prose a:hover { text-decoration-color: currentColor; }
.prose > p:first-child { font-size: 1.4rem; line-height: 1.55; color: var(--text); }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose ul {
  background: var(--accent-soft); border-radius: var(--radius);
  padding: 20px 24px 20px 2.4em; margin: 24px 0;
}
.prose ul li::marker { color: var(--accent); }
.prose li { margin: 4px 0; }
.prose ol { counter-reset: stap; list-style: none; padding-left: 0; }
.prose ol li {
  counter-increment: stap; position: relative;
  margin: 14px 0; padding-left: 52px; min-height: 36px;
}
.prose ol li::before {
  transition: transform .3s var(--spring);
  content: counter(stap); position: absolute; left: 0; top: 2px;
  width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--accent); color: var(--surface);
  font: 700 1rem/1 var(--sans);
}
.prose ol li:hover::before { transform: scale(1.12); }
.prose blockquote { margin: 24px 0; padding-left: 20px; border-left: 3px solid var(--accent); color: var(--muted); }
.prose h2, .prose h3 { font-family: var(--serif); line-height: 1.2; letter-spacing: -.01em; }
.prose h2 {
  font-size: 1.7rem; margin: 48px 0 16px; padding-top: 24px;
  border-top: 1px solid var(--line);
}
.prose h3 { font-size: 1.25rem; margin: 28px 0 8px; color: var(--accent-strong); }
.prose h2 + ul, .prose h3 + ul, .prose h2 + ol { margin-top: 12px; }
.prose h2 + p { margin-top: 0; color: var(--muted); }
.prose h2 + p + ul { margin-top: 12px; }

.tags { list-style: none; padding: 0; margin: 40px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.tags a { font-size: .95rem; padding: 4px 14px; }

.prevnext {
  max-width: 720px; margin: 56px auto 0; padding-top: 28px; border-top: 1px solid var(--line);
  display: grid; grid-template-columns: 1fr 1fr; gap: 20px;
}
.prevnext a { text-decoration: none; color: var(--text); font: 600 1.2rem/1.3 var(--serif); }
.prevnext a:hover { color: var(--accent-strong); }
.arrow { display: inline-block; transition: transform .3s var(--spring); }
.prevnext a:hover .arrow, .pager a:hover .arrow { transform: translateX(4px); }
.prevnext a:first-child:hover .arrow, .pager a:first-child:hover .arrow { transform: translateX(-4px); }
.prevnext small { display: block; color: var(--muted); font: 500 .95rem var(--sans); margin-bottom: 4px; }
.prevnext .next { text-align: right; }

/* archief */
.archive { list-style: none; padding: 0; margin: 0 0 32px; }
.archive li { display: flex; gap: 18px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.archive a { color: var(--text); text-decoration: none; display: inline-block; }
.archive a:hover { color: var(--accent-strong); transform: translateX(4px); }
.archive time { color: var(--muted); font-size: 1rem; min-width: 10em; padding-top: 2px; }
h2 { font: 600 1.8rem/1.2 var(--serif); letter-spacing: -.01em; margin: 40px 0 16px; }

.site-footer { text-align: center; padding: 32px 0 40px; }
/* logo onderaan: ingetogen in één kleur, bij hover weer in kleur */
.logo--footer { font-size: 2.2rem; opacity: .3; transition: opacity .3s var(--ease); }
/* volledig in het lichtgroen, transparant; bij hover voller */
.logo--footer, .logo--footer:hover, .logo--footer .logo-log { color: var(--accent); }
.logo--footer .logo-leaf { stroke: var(--accent); }
.logo--footer:hover { opacity: .9; }

/* binnenkomen: inhoud schuift zacht in beeld, kaartjes één voor één */
@keyframes opkomen { from { opacity: 0; transform: translateY(12px); } }
main > * { animation: opkomen .5s var(--ease) both; }
.card { animation: opkomen .5s var(--ease) both; animation-delay: calc(min(var(--i, 0), 12) * 40ms); }

/* zoeken */
#search {
  --pagefind-ui-primary: var(--accent); --pagefind-ui-text: var(--text);
  --pagefind-ui-background: var(--surface); --pagefind-ui-border: var(--line);
  --pagefind-ui-tag: var(--accent-soft); --pagefind-ui-font: var(--sans);
  --pagefind-ui-scale: 1.1; --pagefind-ui-border-radius: 14px;
}
#search .pagefind-ui__result-thumb {
  border-radius: 10px; overflow: hidden; background: var(--accent-soft);
  aspect-ratio: 3 / 2; height: auto; align-self: flex-start; margin-top: 6px;
}
#search .pagefind-ui__result-thumb:not(:has(img)) {
  background: var(--accent-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233f8a2e' stroke-width='1.2' stroke-linecap='round' opacity='.5'%3E%3Cpath d='M12 21c-4-3-7-7-7-11a7 7 0 0 1 14 0c0 4-3 8-7 11z'/%3E%3Cpath d='M12 21V9'/%3E%3C/svg%3E") center / 28px no-repeat;
}
#search .pagefind-ui__result-image {
  width: 100%; height: 100%; object-fit: cover; max-width: none;
  filter: var(--photo-filter); transition: filter .35s var(--ease), transform .5s var(--ease);
}
#search .pagefind-ui__result:hover .pagefind-ui__result-image { filter: none; transform: scale(1.04); }
#search .pagefind-ui__result-link { color: var(--text); text-decoration: none; font-family: var(--serif); }
#search .pagefind-ui__result-link:hover { color: var(--accent-strong); }
/* zachte markering van de zoekterm in plaats van fel geel */
#search mark {
  background: color-mix(in srgb, var(--accent) 22%, transparent); color: inherit;
  border-radius: 4px; padding: 0 2px; box-decoration-break: clone; -webkit-box-decoration-break: clone;
}

@media (max-width: 560px) {
  body { font-size: 1.125rem; }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 14px; }
  .thumb { aspect-ratio: 3 / 4; }
  .card-body { padding: 44px 10px 10px; }
  .card-title { font-size: 1.05rem; }
  .card time { font-size: .8rem; }
  .prose > p:first-child { font-size: 1.25rem; }
  .prose ol li { padding-left: 46px; }
  .archive li { flex-direction: column; gap: 0; }
  .prevnext a { font-size: 1.05rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .card:hover { translate: none; }
  .card .thumb:not(.thumb--leeg), .card a:hover .thumb:not(.thumb--leeg) { transform: scale(1.02); }
}
